vBulletin code for tables

Discussion in 'PriusChat Website Questions' started by JimboK, Jul 10, 2008.

  1. JimboK

    JimboK One owner, low mileage

    Joined:
    May 1, 2006
    2,817
    180
    49
    Location:
    Chesterfield, VA
    Vehicle:
    2005 Prius
    For those of use that occasionally like to post data in tabular form, is there any way the vBulletin code for tables can be enabled? I know it exists; CleanMPG has it enabled. It's a little cumbersome to use -- here's a sample:

    Column 1 Column 2 Column 3 Column 4 Column 5
    0 Heading Column 1 Column 2 Column 3
    1 Row 1 Data 1 Data 2 Data 3
    2 Row 2 Data 4 Data 5 Data 6
    3 Row 3 Data 7 Data 8 Data 9


    But it produces a very clean looking table (with boldfacing and underlining added for "Heading"):

    [​IMG]

    I wouldn't mind spending a little extra time to create a table if it helps the reader see the data.
     
    1 person likes this.
  2. Danny

    Danny Admin/Founder
    Staff Member

    Joined:
    Nov 24, 2003
    6,978
    1,836
    1,174
    Location:
    Charlotte, NC
    Vehicle:
    2013 Prius Plug-in
    Model:
    Plug-in Base
    Do you mean like this?

    head col1 head col2 head col3
    1 row1 col1 row1 col2 row1 col3
    2 row2 col1 row2 col2 row2 col3

    Thanks for making me take the time to look for this addition - it should be very helpful!
     
  3. Sufferin' Prius Envy

    Sufferin' Prius Envy Platinum Member

    Joined:
    Jul 7, 2004
    3,998
    14
    0
    Location:
    USA
    Vehicle:
    Other Non-Hybrid
    So Exactly How
    1 does this new
    2 fangled thing work
    3 and just what
    4 is it good
    5 for :confused: ;)
     
  4. Danny

    Danny Admin/Founder
    Staff Member

    Joined:
    Nov 24, 2003
    6,978
    1,836
    1,174
    Location:
    Charlotte, NC
    Vehicle:
    2013 Prius Plug-in
    Model:
    Plug-in Base
    Here's some info on how to use it. I haven't had much time to play around with it, so I can't translate this into English right now:

    Introduction to options:
    example:
    Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8
    0 The whole option list should be wrapped with quotes.
    1 Options are seperated by a semicolon
    2 If an option has a value it is assigned with "equal to" mark. (option2)
    3 If the value contains blanks or special characters it has to be wrapped with apostrophes. (option3)
    4 If an option has more than one value they are seperated by a comma. (option4)
    5
    6 Description of options:
    7 head
    8 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.
    9
    10 sort=1d 2 3[/I]
    11 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)
    12
    13 autonum=1 (equal to autonum) autonum=a autonum=A
    14 Defines that a new first column containing a numbering should be inserted.
    15 1 -> 1 2 3 4 ... 999 1000 ....
    16 a -> a b c ... aa ab ... zz
    17 A -> A B C ... AA BB ... ZZ
    18
    19 autonumtitle=oneword autonumtitle='long value with spaces'
    20 Defines the title of the autonum-column. Can be left empty.
    21
    22 width=123px width=45em width=67%
    23 Defines the width of the table.
     
  5. JimboK

    JimboK One owner, low mileage

    Joined:
    May 1, 2006
    2,817
    180
    49
    Location:
    Chesterfield, VA
    Vehicle:
    2005 Prius
    Woo-hoo! Thanks for the quick action!!! :first:

    I've already put it to work.
     
  6. Karado58

    Karado58 New Member

    Joined:
    Nov 20, 2008
    2
    0
    0
    Vehicle:
    2004 Prius

    Hi Danny,
    I placed this code in a post in my forum, but all i got was the code and no table.
    head col1 head col2 head col3
    1 row1 col1 row1 col2 row1 col3
    2 row2 col1 row2 col2 row2 col3


    Can you please help?

    Thanks.
    Joseph
    vBulletin® Version 3.7.2
     
  7. talonts

    talonts VFAQman

    Joined:
    Jan 9, 2004
    443
    64
    1
    Location:
    Florida
    Vehicle:
    2006 Prius
    Model:
    N/A
    I'm still not seeing how to do columns in a table in a thread post. vBulletin says to separate by "|"s, but when I do so, anything after the first one on a row disappears. I've been Googling how to set up a table in a post, but no clear examples of the formatting have shown up.

    I can build tables easily enough in HTML, but vB is annoying me...
     
  8. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,702
    479
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Exactly the same problem here. Any update or tutorial for dummies? Thanks!
     
  9. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    330
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Hi 2009Prius,

    All your columns must be separate by "|" and every row should have the same no. of "|". Is this how you want your table to look like?

    Column 1 Column 2 Column 3 Column 4
    0 12V battery check
    1
    IG ​
    DMM SGII PriiDash
    2 [/LEFT]
    3 OFF 12.50 12.4 ---[/LEFT]


    Vincent
     
    1 person likes this.
  10. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,702
    479
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Thanks! How is the title done? Mine doesn't seem to show.
     
  11. Stev0

    Stev0 Honorary Hong Kong Cavalier

    Joined:
    Sep 23, 2006
    7,200
    1,066
    0
    Location:
    Northampton, MA
    Vehicle:
    2006 Prius
    Model:
    N/A
    Looks like you have to put it in Bold.
     
  12. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    330
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    You have to use the head option, your 1st row will be your header. It need not be in Bold, just my personal preference.

    e.g.
    12V battery check
    1
    2 Vincent
     
    1 person likes this.
  13. SageBrush

    SageBrush Senior Member

    Joined:
    Jun 4, 2008
    11,627
    2,515
    8
    Location:
    Southwest Colorado
    Vehicle:
    2012 Prius v wagon
    Model:
    Two
  14. SageBrush

    SageBrush Senior Member

    Joined:
    Jun 4, 2008
    11,627
    2,515
    8
    Location:
    Southwest Colorado
    Vehicle:
    2012 Prius v wagon
    Model:
    Two
    sample

    Column 1 Column 2 Column 3 Column 4 Column 5
    0 heading A B C D[/b]
    1 Row 1 a b c d
    2 Row 2 e f g h
    3 Row 3 i j k l
     
  15. dolj

    dolj Senior Member

    Joined:
    May 14, 2012
    4,033
    2,144
    0
    Location:
    Wellington, New Zealand
    Vehicle:
    2006 Prius
    No questions on tables in 6 years – y'all must be more smarter than me. lol

    Would any gurus still watching this thread have any suggestions.

    I'm trying to add text that contains commas within into a table cell, but the commas are being interpreted as delimiters ever though I am using "|" as a delimiter which it also recognises. I thought I had successfully done this on the past by enclosing the text with quotes, but this does not work – the quotes are rendered in the cell.

    So, the question is how is it done, or can it not be done.

    Example:

    using this code:
    Code:
    [TABLE=HEAD]CASE|[Left]ACTION[/LEFT]
    Case 1|"When out hiking, and you only have a day pack, be sure to check the weather."[/TABLE]
    The result is:

    CASE
    ACTION​
    1 Case 1 "When out hiking and you only have a day pack be sure to check the weather."


    Any and all input gratefully received.

    PS: I have tried many suggestions from BBCode sources as well as help on the XenForo website as well as here in this forum. A lot of the tags such as [TR] and [TD] but, it seems these are not implemented on this site. :(

    PPS: Also didn't find any help in this thread: BB Codes. It did not even mention tables. :(:(
     
    #16 dolj, May 2, 2018
    Last edited: May 2, 2018
  16. Tideland Prius

    Tideland Prius Moderator of the North
    Staff Member

    Joined:
    Oct 2, 2004
    40,433
    11,979
    41
    Location:
    Canada
    Vehicle:
    2018 Prius Prime
    Model:
    Technology
    I don't know either and it has bugged me. I've also searched to no avail :(
     
  17. Oniki

    Oniki Active Member

    Joined:
    Jun 10, 2017
    652
    494
    0
    Location:
    Colorado
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    BB Code has a tag
    Code:
    [nobbc]  [/nobbc]
    that I think acts as a code parser escape but I presume @Danny has to enable its use.
     
    #18 Oniki, May 7, 2018
    Last edited: May 7, 2018
    Tideland Prius likes this.
  18. dolj

    dolj Senior Member

    Joined:
    May 14, 2012
    4,033
    2,144
    0
    Location:
    Wellington, New Zealand
    Vehicle:
    2006 Prius
    Thanks for the suggestion, but it appears it is not implemented.

    I used this code:
    Code:
    [TABLE=HEAD]CASE|[Left]ACTION[/LEFT]
    Case 1|[nobbc]When out hiking, and you only have a day pack, be sure to check the weather.[/nobbc][/TABLE]
    
    Which gave this result:

    CASE
    ACTION​
    1 Case 1 [nobbc]When out hiking and you only have a day pack be sure to check the weather.[/nobbc]

    It seems there are a lot of bb-code tags that are not implemented in the add-on that @Danny uses.

    In Help>BB-Code it suggests the tags
    Code:
    [PLAIN][/PLAIN]
    Using this tag works both inside and outside the table, provided there are no commas.
    Code:
    [PLAIN]This is not [B]bold[/B] text.[/PLAIN]
    renders as:
    This is not [B]bold[/B] text.
    When used in a table, this code
    Code:
    [TABLE=HEAD]CASE|[Left]ACTION[/LEFT]
    Case 1|[PLAIN]When out hiking, and you only have a day pack, be sure to check the weather.[/PLAIN]
    Case 2|[PLAIN]This is not [B]bold[/B] text.[/PLAIN][/TABLE]
    renders as:

    CASE
    ACTION​
    1 Case 1 When out hiking and you only have a day pack be sure to check the weather.[/PLAIN]
    2 Case 2 This is not [B]bold[/B] text.

    It seems like an error in parsing the within the table add-on, maybe, because in Case 1 it seems like the PLAIN tag is terminated by the comma in the text, but Case 2 parses correctly.

    If I add a comma to Case 2, it breaks it:
    Code:
    [TABLE=HEAD]CASE|[Left]ACTION[/LEFT]
    Case 1|[PLAIN]When out hiking, and you only have a day pack, be sure to check the weather.[/PLAIN]
    Case 2|[PLAIN]This, is not [B]bold[/B] text.[/PLAIN][/TABLE]
    it renders as:

    CASE
    ACTION​
    1 Case 1 When out hiking and you only have a day pack be sure to check the weather.[/PLAIN]
    2 Case 2 This is not bold text.[/PLAIN]

    Hmmm.

    I guess we keep looking.
     
    #19 dolj, May 12, 2018
    Last edited: May 12, 2018
    Tideland Prius likes this.
Loading...