We are going to make a BBCode table look like this:
| This is a header | |
|---|---|
| This is the left cell | This is the right cell |
| This is another row | This is the second cell |
The first thing we need to do is make sure it looks nice in prosilver, to do that, we need to use the corners-top/bottom and the inner classes along with a pair of Divs and spans.
Here is what prosilver uses everywhere:
- Code: Select all
<div class="some class names">
<div class="inner">
<span class="corners-top"><span></span></span>
CONTENT
<span class="corners-bottom"><span></span></span>
</div>
</div>
- Code: Select all
[corners={TEXT1}]{TEXT2}[/corners]
HTML Replacement
- Code: Select all
<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... prosilver generally uses "table1" for the tables, and subSilver2 users tablebg, so we use both:
- Code: Select all
[table={TEXT1}]{TEXT2}[/table]
HTML Replacement
- Code: Select all
<table class="{TEXT1}" cellspacing="1" width="100%">
{TEXT2}
</table>
We need some rows:
- Code: Select all
[tr={TEXT1}]{TEXT2}[/tr]
HTML Replacement:
- Code: Select all
<tr class="{TEXT1}">
{TEXT2}
</tr>
- Code: Select all
[td={NUMBER},{TEXT1}]{TEXT2}[/td]
HTML Replacement:
- Code: Select all
<td class="{TEXT1}" colspan="{NUMBER}">{TEXT2}</td>
- Code: Select all
[th={NUMBER}]{TEXT}[/th]
HTML Replacement:
- Code: Select all
<th colspan="{NUMBER}">{TEXT}</th>
So now an the above example looks like this:
| This is a header | |
|---|---|
| This is the left cell | This is the right cell |
| This is another row | This is the second cell |
Notice how we took out any newlines between the BBCodes, this is so that it stays where you put it, as each return (newline) turns into a break, which can make a table move to the bottom of your page.
- Code: Select all
[corners=forumbg forumbg-table][table=tablebg table1][tr=][th=2]This is a header[/th][/tr][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][/table][/corners]
This is pretty good for a basic table, but we don?t really like the look of the header, so we?ll add the <thead> tag, and the <tbody> for the heck of it -- okay, not really for the "heck" of it, but the border color. ;)
- Code: Select all
[thead]{TEXT}[/thead]
- Code: Select all
<thead>{TEXT}</thead>
- Code: Select all
[tbody]{TEXT}[/tbody]
- Code: Select all
<tbody>{TEXT}</tbody>
Now it looks like this:
| This is a header | |
|---|---|
| This is the left cell | This is the right cell |
| This is another row | This is the second cell |
Much better!
- Code: Select all
[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]
Good luck!









