"Corners" BBCode - this creates the placeholder for the table. {TEXT1} is used to specify a class or classes for the table, {TEXT2} is the placeholder for the rest of the table.
BBCode:
Code:
[corners={TEXT1}]{TEXT2}[/corners]
Replaced with this HTML:
Code:
<div class="{TEXT1}">
<div class="inner">
<span class="corners-top"><span></span></span>
{TEXT2}
<span class="corners-bottom"><span></span></span>
</div>
</div>
Now create the table. {TEXT1} is another placeholder for class or classes. {TEXT2} allows us to continue nesting tags.
BBCode:
Code:
[table={TEXT1}]{TEXT2}[/table]
Replaced with this HTML:
Code:
<table class="{TEXT1}" cellspacing="1" width="100%">
{TEXT2}
</table>
We need some rows. {TEXT1} is for use to specify classes, {TEXT2} allows us to continue nesting tags.
BBCode:
Code:
[tr={TEXT1}]{TEXT2}[/tr]
Replaced with this HTML:
Code:
<tr class="{TEXT1}">
{TEXT2}
</tr>
{NUMBER} MUST be specified. {TEXT1} (class) is optional, the comma following the NUMBER is *required*. This creates table cells.
BBcode:
Code:
[td={NUMBER},{TEXT1}]{TEXT2}[/td]
Replaced with this HTML:
Code:
<td class="{TEXT1}" colspan="{NUMBER}">{TEXT2}</td>
Number MUST be specified. This creates a table header row if required.
BBCode:
Code:
[th={NUMBER}]{TEXT}[/th]
Replaced with this HTML:
Code:
<th colspan="{NUMBER}">{TEXT}</th>
This is for use with THEAD to create cells.
BBCode:
Code:
[thead]{TEXT}[/thead]
Replaced with this HTML:
Code:
<thead>{TEXT}</thead>
Create a tbody tag.
BBCode:
Code:
[tbody]{TEXT}[/tbody]
Replaced with this HTML:
Code:
<tbody>{TEXT}</tbody>
Example:
Code:
[corners=forumbg forumbg-table][table=tablebg table1][thead][tr=][th=2]This is a header[/th][/tr][/thead][tbody][tr=bg1][td=1,]This is the left cell[/td][td=1,]This is the right cell[/td][/tr][tr=bg2][td=1,]This is another row[/td][td=1,]This is the second cell[/td][/tr][/tbody][/table][/corners]
This is a header |
This is the left cell | This is the right cell |
This is another row | This is the second cell |
note
In all tags with a {TEXT1} placeholder for CSS classes must be used as "tagname=" if you are not specifying a class.