Post by wildkuma on Jan 3, 2011 3:26:28 GMT -5
.:Advanced Tables:.
New script has been added to allow for more complex table codes. The new UBBC codes are listed below. All are to be added between the "[td]
[/td]" signs.New script has been added to allow for more complex table codes. The new UBBC codes are listed below. All are to be added between the "[td]
- [cs=n] (colspan) - Changes how many columns the cell spans. Replace "n" with the desired number.
- [rs=n] (rowSpan) - Changes how many rows the cell spans. Replace "n" with the desired number.
- [bg=color] (backgroundColor) - Changes the cell background color. Replace "color" with the name of the desired color.
- [atrb=name,value,bTable] - Adds code to all cells in table. Replace "name" with the code to be added, and "value" with the appropriate data. (See examples below.)
____________________________________________________
So for example, for a 6 cell table (3 columns, 2 rows.) like this:
[table][tr][td]1[/td][td]2[/td][td]3[/td][/tr][tr][td]4[/td][td]5[/td][td]6[/td][/tr][/table]
1 | 2 | 3 |
4 | 5 | 6 |
__________________________
You could add "[cs=3]" to cell 1, and delete cells 2 and 3 so they won't take up cell 1's space. It will result in cell 1 acting like a header.
[table][tr][td]1[/td][/tr][tr][td]4[/td][td]5[/td][td]6[/td][/tr]
[cs=3]1 | ||
4 | 5 | 6 |
__________________________
Using "[rs=2]" instead and deleting cell 4, which is the only cell in the way, will result in this:
[table][tr][td][rs=2]1[/td][td]2[/td][td]3[/td][/tr][tr][td]5[/td][td]6[/td][/tr]
[rs=2]1 | 2 | 3 |
5 | 6 |
__________________________
Adding "[bg=blue]" to a cell will result in its background becoming blue. In this case, we've added it to cell 1.
[table][tr][td][cs=3][bg=blue]1[/td][/tr][tr][td]4[/td][td]5[/td][td]6[/td][/tr]
[cs=3][bg=blue]1 | ||
4 | 5 | 6 |
__________________________
Wanna add a code to every cell without plugging it in each one? Then add the master code to any cell. Here the blue background color is applied to the entire table by adding the master code to one cell. **Remember, you have to use the full title of the UBBC code for replacing "name" rather than the bracketed code version. The names are in the parenthesis next to their bracket code versions.**
[table][tr][td][atrb=bgColor,blue,bTable][cs=3]1[/td][/tr][tr][td]4[/td][td]5[/td][td]6[/td][/tr][/table]
[atrb=bgColor,blue,bTable][cs=3]1 | ||
4 | 5 | 6 |
__________________________
And that would be about it; you still need to add the basic stuff like center and font type to each cell as needed. You could likely use the master code with those attributes as well if you wanted, though it means every cell would have the same attribute. I would advise you to experiment for yourself with the codes and the preview button until you get the desired results. No better way to train than preforming the exercise itself.
(Need a better explanation? Thought of a better way to explain it? Feel free to let us know; any means to better the site is appreciated.)
[HP=50/100]
[/size][/font][/center]