Results 1 to 1 of 1

Thread: BBCode - Comprehensive set of TABLE tags (BB Code)

    1. BBCode - Comprehensive set of TABLE tags (BB Code) Details »»

      BBCode - Comprehensive set of TABLE tags (BB Code)

      Version: 1.00, by (Member) Jeffer_Mark is offline
      Developer Last Online: Jun 2018 Show Printable Version Email this Page
      Category: [BBCode]
      Version: 4.0.x Rating:  Installs: 0
      Released: 24th Jun 2018 Last Update: Never Downloads: 0
      Supported Code Changes

      WARNING- USING THIS CAN BE A SECURITY RISK!!!
      Using this BB Code will allow people who know what they are doing to run arbitrary JavaScript in the code. For this reason I strongly recommend you limit the use of this BB Code to admins and trusted users (mods?) only! You can use the Advanced BB Code Permissions mod to limit this by usergroup. I have it installed on 3.8.6 and it's working well. Thanks to Kyo-Dono for pointing this out.




      Mod URL: http://www.vbulletin.org/forum/showthread.php?t=250812

      [tbl],[tr],[td],[th]

      Demo URL: http://www.juot.net/forums/showthrea...497#post872497

      This is a comprehensive set of codes for making HTML tables. If you're not familiar with HTML tables this code is probably not for you, if you are this should come in very handy.

      One of the main limitations of bulletin board software is the inability to put tables into posts. The existing [table] BB Code Mod helps but it is not easy to use and the interface isn't similar to traditional HTML tables. This set of table elements mimic traditional <html> tags and allow for advanced elements like background color, alignment, height and width attributes for any element.
      (The existing mod is here: http://www.vbulletin.org/forum/showthread.php?t=107985 you may prefer that to this.)

      All HTML tables are made up of at least 3 sets of HTML tags such as:
      <table><tr><td>Some Info Here</td></tr></table>

      Using this BB Code solution the syntax for the same would simply be:
      [tbl][tr][td]Some Info Here[/td][/tr][/tbl]

      Note "tbl" is being used instead of "table" to keep compatibility with the existing [table] BB Code.

      The code above gives a pretty boring table...

      Where this code really shines is that in any of those elements you can use the "option" part of the tag to add attributes to that element, so if you wanted to make the whole table light-blue you could use:
      [tbl="bgcolor=lightblue"][tr][td]Some Info Here[/td][/tr][/tbl]

      And if you wanted to make the cell 50 pixels high:
      [tbl="bgcolor=lightblue"][tr][td="height=50"]Some Info Here[/td][/tr][/tbl]

      There are many attributes you may be familiar with for HTML tables, all and any can be used in these tags. A more complicated table would be:
      [tbl="border=0 bgcolor=grey align=center"]
      [tr][th="bgcolor=lightblue colspan=3"]Table Header[/th][/tr]
      [tr][td][/td][td="bgcolor=yellow"]:jump:[/td][td]:panic:[/td][/tr]
      [tr="bgcolor=pink height=50"][td]:sad:[/td][td]:owned:[/td][td]:thup2:[/td][/tr]
      [/tbl]

      As you can see you may use other BB Code's within these codes as well as smilies and images.

      There are many resources on the web for learning about HTML tables. This is one of many:



      To make this code work its magic we need to install 8 seperate BB Codes (6 if you don't care about table headers).

      For each code we want to install it both with and without an "option" attribute- this will make using the code easier when you have no options needed but let you use them anywhere they are needed.

      For the sake of simplicity I'm going to skip of few of the most basic steps, BB Codes are generally easy but please make sure you've installed a few before this one.

      You can call the tags anything you want, in my examples I used:
      tbl = <table> tag... (for compatibility if you have another [table] BB Code installed.
      tr = <tr> tag (Table Row)
      th = <th> tag (Table Header)
      td = <td> tag {Table Data or Cell)

      For the tags without options use the following replacements:

      [tableo]
      <table>{param}</table>

      [tho]
      <th>{param}</th>

      [tro]
      <tr>{param}</tr>

      [tdo]
      <td>{param}</td>

      For each of the above I recommend the following example:
      [tableo][tro][tho]Header[/tho][/tro][tro][tdo]test[/tdo][/tro][/tableo]
      Remember the example won't show correctly until every code in the set is installed.

      Add the following code replacements WITH Option-
      "Use Option = Enabled"

      [tableo]
      <table {option}>{param}</table>

      [tho]
      <th {option}>{param}</th>

      [tro]
      <tr {option}>{param}</tr>

      tdo]
      <td {option}>{param}</td>

      For all the above codes you want to use the following settings:
      Disable Word Wrapping inside BB Code = Yes
      All Other Disable Options = No

      You will now be able to make complete HTML tables using the tags with or without options as needed.
      See the Demo above for this code in action.


      Support Available

      ---------- Post Merged at 04:31 ---------- Previous Post was at 04:27 ----------

      This works for 4.2.x

      Tested

      Download Now


      Show Your Support

      • This modification may not be copied, reproduced or published elsewhere without author's permission.

Similar Threads

  1. HELP
    bbcode align tags not working with ed2k box
    By Spock in forum Requests & Help
    Replies: 11
    Last Post: 24th Jan 2017, 16:02
  2. SOLVED
    BB Code - Username tags
    By Hdlr in forum Solved Requests
    Replies: 4
    Last Post: 11th Nov 2016, 17:29
  3. Replies: 0
    Last Post: 19th Apr 2015, 15:02
  4. Editor BBcode Tags to embed EditArea code editor in posts
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 0
    Last Post: 23rd Feb 2015, 17:12
  5. Replies: 0
    Last Post: 23rd Feb 2015, 17:09

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •