Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
BB Code [table] Details »
BB Code [table]
Mod Version: 0.1.7.1, by StGaensler (Member) StGaensler is offline
Developer Last Online: Dec 2012 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (100 votes - 4.77 average) Installs: 1198
Released: 14 Feb 2006 Last Update: 26 Mar 2008 Downloads: 11813
Not Supported Uses Plugins Auto-Template  

BB Code [table]
by StGaensler

Description
This Hack provides a BB code [table] to add a table to the post
The skin of the table automatically fits the style because the CSS classes of vBulletin are used.

A table is simply made of some lines (will be the rows). The cols are seperated by |. So this will be a table:

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

A screenshot of a "ready" table is attached

Usage
  1. install attached product XML through product manager (overwrite existing)
  2. install at least one language pack in AdminCP -> Languages & Phrases -> Download / Upload Languages -> Import Language XML File
    Important: Select the language you want to import the phrases into, not "(Create New Language)" - this won't work! If you use another version of vBulletin than I use enable "Ignore Language Version" to import the language pack.

Please note: (installing)
Installing this product will: (reverted during uninstall)
  1. rename a existing BB code "table" to "table_saved"
  2. add a new BB code [table]
If you want to have live sortable columns (JavaScript): Download attached sorttable.js.txt rename it to sorttable.js and place it into the /clientscript/ folder of your vBulletin. Then go to AdminCP -> vBulletin Options -> BB Code [table] Settings -> Enabled Features Of This BB Code and enable sortable
Note: Including the file on the webpages where it is necessary is done by my product. So if sortable is disabled, it won't be included automatically.
If you want to have a icon for the editor you may use this for free: Download this icon and place it in your /images/editor/ folder.

Please note: (usage)
  • Of course you can use vB Code and smilies inside the table!
  • The first line defines how much columns are in the table. If the other lines have more or less colums they are cut off or filled with   (space)
  • You can find a detailed description of the options (please read it before requesting help)
  • Empty rows are (should be ) removed.

New features
  • define colspan of cells
  • small panel in AdminCP
  • define CSS class of table and tablerows
  • live sorting of table through clicking the head of a column
  • defining maximum width of a table

Maybe planned features
  • detailed description of the vB Code in misc.php?do=bbcode depending on the features enabled in AdminCP (planned for next beta version)
  • define formatting (bold, italic), align (left, right, center) and width of the cols
Suggested but not planned features
  • none

Known problems
  • Bugfix of version 0.1.1 doesn't work if vBulletin should write template names into the source code

Version history:
0.0.1 - 0.0.5 internal releases for testing purposes (Thanks to Zombie79 from powerforen.de for testing)
0.1 first official release
0.1.1 fixed small bug: if a line ends with eg vbcode quote no new row was generated (should already have been fixed but did not work)
0.1.2 workaround: removed call to function bcmod(), it could also be done another way
0.1.3.x beta version described here (and following) - added admin panel, colpan and css feature
0.1.4 stable version - no significant changes to the last beta (0.1.3.8)
0.1.5.x beta version described here (and following) - added sortable, maxwidth, versioncheck, upgrade message, compatibility to vB 3.6
0.1.6 stable version - two bugfixes to last beta, {br} for posting linebreaks in a tablecell
0.1.7.x stable version - compatibility to vB 3.7 (description) - added tab seperated tables

This hack can be used for free. If you want to make a small donation, just contact me. We will find a way
I don't want this product to be distributed from other sources. Please don't upload it to other vBulletin related boards etc.

Download Now

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

Screenshots

Click image for larger version

Name:	table_01.jpg
Views:	8600
Size:	10.9 KB
ID:	42776   Click image for larger version

Name:	table_02.jpg
Views:	7725
Size:	10.1 KB
ID:	42777   Click image for larger version

Name:	table_03.jpg
Views:	11844
Size:	30.9 KB
ID:	42792   Click image for larger version

Name:	table_04.jpg
Views:	6960
Size:	135.1 KB
ID:	48107  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 16 Feb 2006, 08:01
Darat Darat is offline
 
Join Date: Aug 2004
Oh right - I didn't want to have this installed and find out someone could use it maliciously to disrupt the layout of the forum, I couldn't see how the could but thought I'd missed something.
Reply With Quote
  #17  
Old 16 Feb 2006, 08:17
Hellcat Hellcat is offline
 
Join Date: May 2003
Real name: Michael
Originally Posted by Darat
Oh right - I didn't want to have this installed and find out someone could use it maliciously to disrupt the layout of the forum, I couldn't see how the could but thought I'd missed something.
Huh?
I didn't say that.... :speechless:

I don't think it can be used maliciously to break the forum layout.... more like a nice "feature" to add some more formatting to a post like, lets say, a picture on the right and the text on the left of the picture, rather than just under it....
Just like it's common practice on web pages (even vB).

I didn't mean my comment negative.... sorry if it sounded so.... :ermm:
__________________
<?php eval('$post["signature"] = "' . fetch_template('hellcats_sig') . '";'); ?>

Check this:
[ WMail - vBulletin WebMailer || PM-Auto-Reply || Countdown-Timer for signature ] * [ more ]
[ Realtime Page Compressor || The allmighty IRC /me action ]
Reply With Quote
  #18  
Old 17 Feb 2006, 13:44
GenSec GenSec is offline
 
Join Date: Oct 2001
It works. Thank you!

But is it a way to change table border style?
Reply With Quote
  #19  
Old 18 Feb 2006, 08:59
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Originally Posted by GenSec
It works. Thank you!

But is it a way to change table border style?
Yes, that is possible through simple CSS:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I think you want to have the second line.
Put it into your css-definitions of your style.

Last edited by StGaensler; 18 May 2006 at 13:16.
Reply With Quote
  #20  
Old 18 Feb 2006, 17:12
GenSec GenSec is offline
 
Join Date: Oct 2001
StGaensler
Grand mercy
Reply With Quote
  #21  
Old 19 Feb 2006, 03:13
Detomah's Avatar
Detomah Detomah is offline
 
Join Date: Sep 2003
Real name: Tom
If this is as good as it looks and I think it is, one of the admins on my site is going to love you forever. Although I can see a lot of thread editing going on to update all the old one's done using the other table code I had installed.

/me uninstalls a less well made version of a table code and gets ready to install this version.
__________________
Total Format - The Total Entertainment & Leisure Site, covering games and gaming, music and musicians, movies and celebrities. Discussion, reviews, galleries and much more.
Reply With Quote
  #22  
Old 19 Feb 2006, 18:36
Detomah's Avatar
Detomah Detomah is offline
 
Join Date: Sep 2003
Real name: Tom
Could you possibly do an example table, using pretty much every formatting function available as an example please. My admins are having a bit of trouble trying to do certain tasks.

Aslo, would there be any chance of making it so you can actually doing the following:

1. Have a code to allow you to choose the cell class alt1 or alt2 instead of it being automatically alternating.
2. Make it so we can use tcat or thead for the header cells.
3. Make it so we can merge cells.

If they are already possible and i'm missing it, could you give me an example of how they work.
__________________
Total Format - The Total Entertainment & Leisure Site, covering games and gaming, music and musicians, movies and celebrities. Discussion, reviews, galleries and much more.
Reply With Quote
  #23  
Old 19 Feb 2006, 19:10
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Do you mean formating options of my vBCode or generally formatting (with vBulletin vBCode)? I am already using every (included) formating option in my example table in the first and second picture.

1. + 3. This would require some time of work - time I don't really have. I add these things on the feature list for the next version but I can not promise when I can release it.
2. My vBCode already uses thead for the header cells. This is the source code of the table in the attachment:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You only have to "say" that there is a header: [table=head] .... [/table]
Or didn't I get your question?
Reply With Quote
  #24  
Old 28 Feb 2006, 19:08
mkdevo mkdevo is offline
 
Join Date: May 2004
is there any way to merge cells? say i want to have a 2-column table, and i want something centered across 2 cells for the header cell - is that possible?


EDIT - whoops, just noticed that was #3 in the post 2 above mine, though it wasn't answered...

Last edited by mkdevo; 28 Feb 2006 at 19:12.
Reply With Quote
  #25  
Old 28 Feb 2006, 23:31
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
It was much work but I have tried it:
Here is a new version supporting colspans!

BUT this is a beta version!
You can try this version but use it on your own risk!
Currently colspan is not supported in WYSIWYG-Editor so the plain code is displayed

To add a colspan to a cell simply write {colsp=X} at the beginning of the cell. X is the number of cells the cell should be big.

If you find bugs please report them here.

Good night (I'll go to bed now)
Stefan

Edit: I wrote a better version than yesterday so I edited my post
The bugs mentioned before have been taken out

There is only one thing to consider when using colspan and sort: Cells "behind" the colspan are internally filled with "!!!colspan" and can be sorted as every other cell.

EDIT: removed attachment (4 views) - new version is out: post #915835

Last edited by StGaensler; 04 Mar 2006 at 20:50.
Reply With Quote
  #26  
Old 01 Mar 2006, 16:00
mkdevo mkdevo is offline
 
Join Date: May 2004
StGaensler - thanks for your continued support with this hack! i'm currently testing out the beta. just wanted to let you know about a small problem i ran into:

i'm testing out the colspan on the header row. i want the header row to be centered. if i use the center BBCode, it messes up the table. however, if i use the center html code, it works.

to show you what i mean, this does NOT work:


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

this DOES work:


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

Reply With Quote
  #27  
Old 01 Mar 2006, 16:08
mkdevo mkdevo is offline
 
Join Date: May 2004
also, you've described how to define table width. is there a way to define cell width?
Reply With Quote
  #28  
Old 01 Mar 2006, 16:46
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Thanks for the feedback but I can't reproduce it.
Code I used:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Result -> attachment
Could you give me a full example of the table or an account on your board so I can test it there?

No currently there is no possibility to define cell/column width, I added it to the list.
Attached Images
File Type: jpg table_bug_01.jpg (6.1 KB, 74 views)
Reply With Quote
  #29  
Old 01 Mar 2006, 16:59
mkdevo mkdevo is offline
 
Join Date: May 2004
Originally Posted by StGaensler
Thanks for the feedback but I can't reproduce it.
Code I used:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Result -> attachment
Could you give me a full example of the table or an account on your board so I can test it there?
interesting. using the exact code you have above, you can see my result in the attachment:
Attached Images
File Type: jpg table.jpg (17.1 KB, 35 views)
Reply With Quote
  #30  
Old 01 Mar 2006, 17:02
mkdevo mkdevo is offline
 
Join Date: May 2004
i figured out a workaround to make it work, but i need to add an extra line break after the header:


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

i wonder why that is...
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 00:20.

Layout Options | Width: Wide Color: