This is not a simple MyCode because there's a small addition in the global.css file, I'll do a plugin later if it's useful.
The goal: creating tables in MyBB posts with alternate lines design (odd and even).
It requires 4 MyCode and 3 css addition.
--- MyCode ---
Table
Regular Expression :
Table row
Regular Expression :
Table head
Regular Expression :
Table data
Regular Expression :
--- CSS ---
The goal: creating tables in MyBB posts with alternate lines design (odd and even).
It requires 4 MyCode and 3 css addition.
--- MyCode ---
Table
Regular Expression :
\[table\](.*?)\[/table\]
Replacement :<table class="tborder tfixed clear" cellspacing="0" cellpadding="5" style="border:0; radius:0;">$1</table>
Table row
Regular Expression :
\[tr\](.*?)\[/tr\]
Replacement :<tr class="trowaltern">$1</tr>
Table head
Regular Expression :
\[th\](.*?)\[/th\]
Replacement :<th class="thead" valign="middle" style="text-align:center; border-radius:0;"><strong>$1</strong></th>
Table data
Regular Expression :
\[td\](.*?)\[/td\]
Replacement :<td valign="top">$1</td>
--- CSS ---
/* global values for table data */
.trowaltern > td {
border: 1px solid;
border-color: #fff #ddd #ddd #fff;
}
/* even row background */
.trowaltern:nth-child(even) { background: #f5f5f5; }
/* odd row background */
.trowaltern:nth-child(odd) { background: #efefef; }