• New here? Register here now for access to all the forums, download game torrents, private messages, polls, Sportsbook, etc. Plus, stay connected and follow BP on Instagram @buckeyeplanet and Facebook.

BuckeyePlanet How-2.0: Making tables in posts

Clarity

Will Bryant
Staff member
This is a header cellThis is a header cell
This is a left aligned cellThis is a center aligned cell
This is a right aligned cellLeft aligned
Center alignedRight aligned
Code:
[TABLE][TR][TH]This is a header cell[/TH][TH]This is a header cell[/TH][/TR][TR1][TD]This is a left aligned cell[/TD][TD1]This is a center aligned cell[/TD1][/TR1][TR2][TD2]This is a right aligned cell[/TD2][TD]Left aligned[/TD][/TR2][TR1][TD1]Center aligned[/TD1][TD2]Right aligned[/TD2][/TR1][/TABLE]

Only 'trick' is you have to put everything on a single line for parsing, so that there are no carriage returns. So my example above works, but the one below (nicely formatted) does not:

Code:
[TABLE]
[TR][TH]This is a header cell[/TH][TH]This is a header cell[/TH][/TR]
[TR1][TD]This is a left aligned cell[/TD][TD1]This is a center aligned cell[/TD1][/TR1]
[TR2][TD2]This is a right aligned cell[/TD2][TD]Left aligned[/TD][/TR2]
[TR1][TD1]Center aligned[/TD1][TD2]Right aligned[/TD2][/TR1]
[/TABLE]

Of course you could just type it out as you please (organized like the bottom) and use backspace to turn it into a single line, but if something breaks with it, expect a line break somewhere.

This is a simple (and that's not at all a bad thing) implementation.

Another good/functional example:

Header1Header2Header3
A1A2A3
B1B2B3
C1C2C3
D1D2D3
Code:
[TABLE][TR][TH]Header1[/TH][TH]Header2[/TH][TH]Header3[/TH][/TR][TR1][TD1]A1[/TD1][TD1]A2[/TD1][TD1]A3[/TD1][/TR1][TR2][TD1]B1[/TD1][TD1]B2[/TD1][TD1]B3[/TD1][/TR2][TR1][TD1]C1[/TD1][TD1]C2[/TD1][TD1]C3[/TD1][/TR1][TR2][TD1]D1[/TD1][TD1]D2[/TD1][TD1]D3[/TD1][/TR2][/TABLE]

So in your TRs you have three options:
TR = standard background
TR1 = light background
TR2 = darker background

And in TDs three as well:
TD = left justified
TD1 = center justified
TD2 = right justified

Other BBCodes are valid inside the table, and if you fail to close a column, row, or the table itself it will do that for you.
 
Back
Top