PDA

View Full Version : Creating tables



DoomITP
2010-01-23, 03:20 PM
Hey guys, this is kind of embarrassing but if there is a table button I don't see it.:smallredface: If that isn't the case, does anyone know the code for tables?

Tavar
2010-01-23, 03:33 PM
{table]stuff|more
more|stuff[/table]

{table]stuff|more
more|stuff[/table]

{table=head]stuff|more
more|stuff[/table]

{table=head]stuff|more
more|stuff[/table]

Mercenary Pen
2010-01-23, 03:51 PM
For any other board code issues you may have, at the bottom of each page there should be a box on the left. The link saying "vB Code is on" takes you to a page with fully laid out examples of the coding.

Hope this'll give you the proverbial fishing rod as well as the fish- metaphorically speaking- you asked for.

Keris
2010-01-23, 04:07 PM
All you ever wanted to know, and more, about tables:

Originally posted by The vB Code List (http://www.giantitp.com/forums/misc.php?do=bbcode)
table
With this vB code tables can be inserted into the post. Columns are seperated by »|«, every new line is a new row.
Usage
{table]value[/table]
Example Usage
{table]column 1|column 2|column 3[/table]
Example Output{table]column 1|column 2|column 3[/table]

Introduction to options:
example: {table="option1;option2=value;option3='this is a long value with space';option4=value1,value2,value3"]
The whole option list should be wrapped with quotes.
Options are seperated by a semicolon
If an option has a value it is assigned with "equal to" mark. (option2)
If the value contains blanks or special characters it has to be wrapped with apostrophes. (option3)
If an option has more than one value they are seperated by a comma. (option4)

Description of options:
head
This option defines the first line as head, so the first row is shown as head of the table. If the table sould be sorted, the head is not sorted.

sort=1d,2,3
This defines the table to be sorted by column 1, then column 2, then column 3. The "d" after the first colum specifies the order: descending (default: ascending)

autonum=1 (equal to autonum) autonum=a autonum=A
Defines that a new first column containing a numbering should be inserted.
1 -> 1, 2, 3, 4, ... , 999, 1000, ....
a -> a, b, c, ... , aa, ab, ... , zz
A -> A, B, C, ... , AA, BB, ... , ZZ

autonumtitle=oneword autonumtitle='long value with spaces'
Defines the title of the autonum-column. Can be left empty.

width=123px width=45em width=67%
Defines the width of the table.

Introduction to special options (formating cells and rows):
example: {option1=value1}{option2=value2}
These "special" options can be written as the very first content of a cell to format it.

Description of special options:
{colsp=5}
Defines a colspan from current cell with the length of 5 cells
And for a linebreak within a cell, you can use a [br] tag.

{table]Two[br] lines|one line[/table]
{table]Two[br] lines|one line[/table]

Note that if previewed, edited or quoted, instances of [br] will be changed to <br>, so you'll have to go change them back to square brackets by yourself.

Dragero
2010-02-12, 12:24 PM
Yeah i'm having a bit of trouble with this too...... can I use this thread as a practice thread?

{table]A l B l C l D l
1 <br> <br> <br> <br>
2 <br> <br> <br> <br>
3 <br> <br> <br> <br>
4 <br> <br>taco <br> <br> [/table]

EDIT....yeah i don't quite get it......(trying to make a grid map) And i guesse that line isn't a lower case L?

EDIT2: And the edit messed the thing up.....

Douglas
2010-02-12, 12:39 PM
Yeah i'm having a bit of trouble with this too...... can I use this thread as a practice thread?

{table]A l B l C l D l
1 <br> <br> <br> <br>
2 <br> <br> <br> <br>
3 <br> <br> <br> <br>
4 <br> <br>taco <br> <br> [/table]

EDIT....yeah i don't quite get it......(trying to make a grid map) And i guesse that line isn't a lower case L?

EDIT2: And the edit messed the thing up.....
The line is what you get from holding shift when you press the backslash key. Shift + \ = |

For something like a grid map, remember one of your columns is the row labels and you'll need an empty cell in the first row to bump the column labels over to the columns they're actually supposed to label. For a 4x4 grid like what I think you were trying for, do this:
{table]|A|B|C|D
1||||
2||||
3||||
4||taco||[/table]

It produces this:
{table]|A|B|C|D
1||||
2||||
3||||
4||taco||[/table]

Dragero
2010-02-12, 12:48 PM
{table] |A |B |C |D
1||||
2||||
3||x||
4|||| [/table]

cool thanks a lot......I don't think i've every pressed the \ button before..lol

Shhalahr Windrider
2010-02-13, 06:18 AM
EDIT2: And the edit messed the thing up.....
That’s an outstanding bug on the [br] tag. Any time text with that tag is called back to a text box—whether you edit one of your posts, preview it, or quote someone else, it displays the HTML version with the angle brackets. So you have to go back and fix it yourself.

This bug also affects the [hr] tag.

If I use either tag in one of my posts and need to preview it, I always hit copy all the text to my computer clipboard. That way I can just paste it over the bugged text without having to manage each tag before I fix anything else.