Version: 0.1.7.1, by StGaensler
Developer Last Online: Dec 2012
Category: BB Code Enhancements -
Version: 3.8.x
Rating:
Released: 02-13-2006
Last Update: 03-25-2008
Installs: 1199
Uses Plugins Auto-Templates
No support by the author.
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:
install attached product XML through product manager (overwrite existing)
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)
rename a existing BB code "table" to "table_saved"
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)
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.
I've had this installed since the early 3.8 days and I've got this working for vB4.1.0 with sorting still enabled. It's very hacky though so if you're not confident with hacking files then please don't follow these instructions as I offer no support for this - it is simply a list of things I did to get it working.
1) I added the items to additional.css as instructed here.
2) I edited the "link sorttable javascript in <head>-section" plugin to remove the IMGDIR_BUTTON reference, resulting in...
3) I edited the "parse vBCode table" plugin to remove the thead class reference, so...
PHP Code:
#if a head is specified, make it
if($bbcode_table['head']['enabled']==true){
$table_head = '<thead class="thead"><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
}else{
$table_head = '';
}
...becomes...
PHP Code:
#if a head is specified, make it
if($bbcode_table['head']['enabled']==true){
$table_head = '<thead><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
}else{
$table_head = '';
}
4) Within the same plugin I had to add the restore class to the table tag, so...
5) I ran the option: AdminCP -> Maintenance -> Update Counters -> Rebuild Post Cache
I want to reiterate, the above is simply what I've done to my site to get it working with the sort. I make no guarantee that it is the correct way to fix this or that it will work for anyone else.
With that said, I hope the above proves useful to someone.
I've had this installed since the early 3.8 days and I've got this working for vB4.1.0 with sorting still enabled. It's very hacky though so if you're not confident with hacking files then please don't follow these instructions as I offer no support for this - it is simply a list of things I did to get it working.
1) I added the items to additional.css as instructed here.
2) I edited the "link sorttable javascript in <head>-section" plugin to remove the IMGDIR_BUTTON reference, resulting in...
3) I edited the "parse vBCode table" plugin to remove the thead class reference, so...
PHP Code:
#if a head is specified, make it if($bbcode_table['head']['enabled']==true){ $table_head = '<thead class="thead"><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>'; }else{ $table_head = ''; }
...becomes...
PHP Code:
#if a head is specified, make it if($bbcode_table['head']['enabled']==true){ $table_head = '<thead><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>'; }else{ $table_head = ''; }
4) Within the same plugin I had to add the restore class to the table tag, so...
5) I ran the option: AdminCP -> Maintenance -> Update Counters -> Rebuild Post Cache
I want to reiterate, the above is simply what I've done to my site to get it working with the sort. I make no guarantee that it is the correct way to fix this or that it will work for anyone else.
With that said, I hope the above proves useful to someone.
I am having a hard time finding these plugins to edit such as stg_table_options. Can you help with where to find these files to make these edits?
Happy to report that I've reinstalled this in our newly-upgraded to 4.1 mousepad.mouseplanet.com board, with mawby's changes to make it 4.1-compatible. Everything works great.