Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
BBCode - Comprehensive set of TABLE tags (BB Code) Details »
BBCode - Comprehensive set of TABLE tags (BB Code)
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Dec 2019 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (3 votes - 5.00 average) Installs: 29
Released: 19 Sep 2010 Last Update: 19 Sep 2010 Downloads: 286
Supported Re-usable Code Translations  

DO NOT USE on vBulletin 4.1.4 or above!
vBulletin 4.1.4 now includes built in support to the TABLE BB Code as part of the new editor. Installing this code will cause conflicts.
If you have this installed, delete it before upgrading to 4.1.4!


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 4.0.8 and it's working well. Thanks to Kyo-Dono for pointing this out.



[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"][B]Table Header[/B][/th][/tr]
[tr][td]:pirate:[/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:
http://www.quackit.com/html/codes/html_table_code.cfm

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)

WARNING: If you have the 4.x SUITE there are already table bbcodes for the CMS portion of your site. Because of this you can not use [tr] or [td] as valid bbcode names because they are already in use. Please use something else such as [trr] and [tdd].



For the tags without options use the following replacements:

[tbl]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[th]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[tr]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[td]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For each of the above I recommend the following example:
[tbl][tr][th]Header[/th][/tr][tr][td]test[/td][/tr][/tbl]
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"

[tbl]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[th]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[tr]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[td]

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.

Please Mark as Installed if you use this.

Download a copy of the .txt file as a backup.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	ss_tblbbcode.jpg
Views:	1237
Size:	118.3 KB
ID:	122155  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 31 Dec 2010, 08:18
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
You're not supposed to post working exploits on this site.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #32  
Old 06 Jan 2011, 17:16
rootsxrocks rootsxrocks is offline
 
Join Date: Aug 2009
Thumbs up Duhhhh

Originally Posted by BirdOPrey5 View Post
You're not supposed to post working exploits on this site.
really no need in advertising them to potential malicious users or educate kiddie scripters
Reply With Quote
  #33  
Old 27 Mar 2011, 01:57
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Installed this worked a charm for making tables in forum threads/posts and in blog entries... but
it negates the tables I've used in articles in my CMS
so have had to uninstall. Guess I'll have to wait till vB gets around (since I started with them with version 2.1) to making tables for forums & blogs built in. =S
Reply With Quote
  #34  
Old 27 Mar 2011, 18:56
Eq4bits Eq4bits is offline
 
Join Date: May 2006
In a discussion at vb.com it came about that perhaps not giving tr/td/th unique id's (i.e. bbtr/bbtd/bbth) could be the problem with it conflicting with the CMS table functionality... after all 'table' had to be renamed as 'tbl'.

I'm going to try the above. Will report back either way.
Reply With Quote
  #35  
Old 27 Mar 2011, 19:58
Eq4bits Eq4bits is offline
 
Join Date: May 2006
That did the trick! I now have tables working in CMS, Blogs & Forums!
Thanks for this sooooo much!

All I did were these changes: (I noticed in the downloaded mod there were some 'hanging' ['s in the 'html replace' code at the beginning for 'tr' and 'td' in front of the '<' so I took them out)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Marks as installed!
Reply With Quote
  #36  
Old 27 Mar 2011, 21:46
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Thanks for the info Eq4bits... As I don't have the VB4 suite I didn't even know there was a table BB Code for the CMS.

Weird they wouldn't implement it in the whole forum.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #37  
Old 03 Apr 2011, 17:48
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
I just have horrible luck with your mods BirdOPrey5
I can't get any of these to work with your code of the version in post 35..
What would need to be done to just get the table code only?
(vbulletin 4.1.1)
thx
__________________

Email me for website help: brandon[at]sheley[dot]org

Last edited by Brandon Sheley; 03 Apr 2011 at 18:19.
Reply With Quote
  #38  
Old 03 Apr 2011, 18:34
TNERatedEdge TNERatedEdge is offline
 
Join Date: Jun 2009
Originally Posted by Brandon Sheley View Post
I just have horrible luck with your mods BirdOPrey5
I can't get any of these to work with your code of the version in post 35..
What would need to be done to just get the table code only?
(vbulletin 4.1.1)
thx
Same here, please let us know how to fix.
Reply With Quote
  #39  
Old 03 Apr 2011, 22:01
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I honestly don't know what post # 35 was about. I support the code in the top post only. It should work, it works for me. Now I've learned recently that the 4.x SUITE has a table bbcode built in that only works in the CMS... if that's true if any of the bbcodes are the same, [tr] or [td] or something then you'll need to rename mine and not use the [tr] / [td] codes.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #40  
Old 04 Apr 2011, 00:10
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
Originally Posted by BirdOPrey5 View Post
I honestly don't know what post # 35 was about. I support the code in the top post only. It should work, it works for me. Now I've learned recently that the 4.x SUITE has a table bbcode built in that only works in the CMS... if that's true if any of the bbcodes are the same, [tr] or [td] or something then you'll need to rename mine and not use the [tr] / [td] codes.
okay, I'll try your version again.
as the example since we only want the table tag, should [tbl]hello[/tbl] work?

this is on the forum only install

Thanks
-Brandon
__________________

Email me for website help: brandon[at]sheley[dot]org
Reply With Quote
  #41  
Old 04 Apr 2011, 01:56
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
No, [tbl] only will never work. The way HTML tables are composed it requires the use of [tbl] [tr] and [td] tags all combined.

In HTML a basic 1 cell table is:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Translated into this BBCode the basic 1 cell table will be:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #42  
Old 04 Apr 2011, 14:52
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
thanks, got the first set working
what's the option on/off do?
__________________

Email me for website help: brandon[at]sheley[dot]org
Reply With Quote
  #43  
Old 04 Apr 2011, 22:06
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
You need option on if you use it like [td="bgcolor='red'"]data here[/td]. No option is for just [td]data here[/td].

I suggest installing each tag both ways (with and without the option) so that you can use whichever version you prefer when writing your post. If you set option to "yes" then you must include the ="" inside the [td=""] tag even if you have no option for it to work. If you do it both ways you can use either [td="something"] or just [td] as necessary.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #44  
Old 07 Apr 2011, 03:32
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Originally Posted by BirdOPrey5 View Post
Thanks for the info Eq4bits... As I don't have the VB4 suite I didn't even know there was a table BB Code for the CMS.

Weird they wouldn't implement it in the whole forum.
no kidding! It's amazing that tables aren't built into basic forum to begin with... have been 'suggesting' it (along with several hundreds of other license holders) since vB 2.x =S

Since this is in the 4.x add-on forum and 4.x IS the Suite which includes the CMS which has tables built in is why the 'tr' 'td' & 'th' (in forums/blogs) have to be called something else or it blows up the CMS tables and is why I put the code up that I did in post #35
Reply With Quote
  #45  
Old 07 Apr 2011, 04:38
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Eq4bits View Post
no kidding! It's amazing that tables aren't built into basic forum to begin with... have been 'suggesting' it (along with several hundreds of other license holders) since vB 2.x =S

Since this is in the 4.x add-on forum and 4.x IS the Suite which includes the CMS which has tables built in is why the 'tr' 'td' & 'th' (in forums/blogs) have to be called something else or it blows up the CMS tables and is why I put the code up that I did in post #35
Because I have 4.x FORUM ONLY version, there is no CMS and I had no idea the table tags existed until recently.

I will update the top post with a note about this issue.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:27.

Layout Options | Width: Wide Color: