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:	8604
Size:	10.9 KB
ID:	42776   Click image for larger version

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

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

Name:	table_04.jpg
Views:	6964
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.
  #46  
Old 17 May 2006, 11:41
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
As no one of the 21 people having downloaded the beta version reported any bug I released the last beta version (0.1.3.8) as stable (0.1.4) and started working on the next beta version (0.1.5.x). No significant changes have been made between theese two.
Reply With Quote
  #47  
Old 17 May 2006, 16:18
twitch's Avatar
twitch twitch is offline
 
Join Date: Apr 2005
Very cool! Thanks
Reply With Quote
  #48  
Old 18 May 2006, 09:58
Gandalf-LoJ Gandalf-LoJ is offline
 
Join Date: Mar 2005
This is great, installed.

However, a bit more detail on the CSS side would be nice.

In the BB Code table Settings there are two fields at the bottom, 'CSS Classes For The Table' and 'CSS Classes For The Tablerows'

Now, I've been playing around with different things in here but none seem to be having any effect. CSS is ticked at the top.

I'm not 100% sure on what format these boxes are expecting so I've tried a few options to see if it affects the table. eg;

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

and just

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

the table is built with

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

The font in the table stays the same in the CSS table and the one without.

Are these boxes expecting normal CSS formatting or are there only specific things that you can do? I may be missing something really obvious here, but I just can't get any format to stick!
Reply With Quote
  #49  
Old 18 May 2006, 13:24
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
I already posted an example css: http://www.vbulletin.org/forum/showp...8&postcount=19
I know I spend more time writing my code than explaining it

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

contains some mistakes:
  • "large" is not a valid property of font-weight - "bold" would be one
  • to format a css class you need to add a point before the class name: .stg_table_transp
  • You want to format the text in the table, not the table itself. Theoretically the property would inherit but the vBulletin css defines a format for the <td>-tag
So this will work:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you want to format only a single row you will have to use the css class stg_tablerow_transp e.g. in this way:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #50  
Old 18 May 2006, 13:45
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Can this be set so a user can not make it any bigger than a predifined setting? I have a fixed width skin.
Reply With Quote
  #51  
Old 18 May 2006, 14:44
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
I don't like fixed width skins

Yes, that's no problem, will be aviable in next beta version coming out soon.

Last edited by StGaensler; 18 May 2006 at 15:09.
Reply With Quote
  #52  
Old 18 May 2006, 14:47
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by StGaensler
I don't like fixed widht skins

Yes, that's no problem, will be aviable in next beta version coming out soon.
Ok, I can accept that. But it is proven that fixed skins make it easier to read as you don't have to read across the whole screen. And I still get members on 800x600, believe it or not. Not many, but a few.

I will be looking forward to the version that has this capability, then. Thank you, sir.
Reply With Quote
  #53  
Old 18 May 2006, 15:57
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Originally Posted by Boofo
I will be looking forward to the version that has this capability, then. Thank you, sir.
You don't have to wait any longer, here is it

New beta version out!
Changed: Whole part recognizing the options was rewritten.
New: defining maximum width in AdminCP
New: Tables (with a head) now can be live sorted through 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
PS: Including the file on the pages where it is necessary is done by my product. If sortable is disabled, it won't be included automatically.

Edit: Replaced product-bbcode_table-multi_beta.xml (27.9 KB, 15 views)
A plugin was missing so the live-sorting of the table didn't work.

Edit2: Replaced product-bbcode_table-multi_beta.xml (29.0 KB, 2 views) and sorttable.js.txt (6.2 KB, 17 views) because the path to the arrow image of the sorttable was hardcoded.

Edit3: Replaced sorttable.js.txt (6.1 KB, 5 views) Reason

Edit4: Replaced sorttable.js.txt (6.8 KB, 3 views) as it didn't work with IE.

Edit5: Removed attachments - new version can be found here.
product-bbcode_table-multi_beta.xml (29.1 KB, 19 views)
table_bbcode-language-en.xml (3.4 KB, 24 views)
table_bbcode-language-de.xml (3.5 KB, 11 views)
sorttable.js.txt (6.8 KB, 15 views)

Last edited by StGaensler; 21 Aug 2006 at 19:25.
Reply With Quote
  #54  
Old 18 May 2006, 16:34
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Ok I got the js file uploaded. Which of the other files do I need to import?
Reply With Quote
  #55  
Old 18 May 2006, 16:43
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Ok, figured it out and got it installed. Now, all I have to do is figure out how to use it. Feel like teaching an old dog new tricks?
Reply With Quote
  #56  
Old 18 May 2006, 16:43
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Install attached product (product-bbcode_table-multi_beta.xml) through product manager (overwrite existing) and install one (or both) language packs 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!

Edit: four seconds to slow
I posted a example table in my first post and wrote a description in my second post

Last edited by StGaensler; 18 May 2006 at 16:45.
Reply With Quote
  #57  
Old 18 May 2006, 17:03
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Thank you, sir.

My width for the forum is set at 777. What do I set for posts and where do I set it?
Reply With Quote
  #58  
Old 18 May 2006, 17:16
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Real name: Stefan
Go to AdminCP -> vBulletin Options -> BB Code [table] Settings -> Maximum Width Of A Table there you can set it.

I don't know which width you need - you have to try it out. Once for "px" and once for "em" (first and second number in the field).
Reply With Quote
  #59  
Old 22 May 2006, 09:48
Gandalf-LoJ Gandalf-LoJ is offline
 
Join Date: Mar 2005
Originally Posted by StGaensler
I already posted an example css: http://www.vbulletin.org/forum/showp...8&postcount=19
I know I spend more time writing my code than explaining it

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

contains some mistakes:
  • "large" is not a valid property of font-weight - "bold" would be one
  • to format a css class you need to add a point before the class name: .stg_table_transp
  • You want to format the text in the table, not the table itself. Theoretically the property would inherit but the vBulletin css defines a format for the <td>-tag
So this will work:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you want to format only a single row you will have to use the css class stg_tablerow_transp e.g. in this way:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
ahh, thanks. I was putting the styles in the wrong place (in the options part! d'oh!). I take it the options are just for listing the styles that the user can use. So I'd just put 'transp' in there.

Oh and the error, I only copied one line that I was using, and it happened to be the one with the error! I would have caught that when viewing the table
Reply With Quote
  #60  
Old 22 May 2006, 14:26
Gandalf-LoJ Gandalf-LoJ is offline
 
Join Date: Mar 2005
Quick question. I'm struggling to get a certain style to stick and I've found the issue.

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

set to get a borderless table that's the same color as the background. It all works great apart from the border. That is still there.

I've looked at the code that is generated and copied into an html editor and see that the class for the table is
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and if I remove the tborder from that it works fine. So tborder is overwriting my custom style. Is this intentional?

Everything else is fine, and I've created some nice styles now that work really well, it's just the border issue that I just can't seem to work out.

Any suggestions?
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 10:29.

Layout Options | Width: Wide Color: