Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
BB Code [table] Details »»
BB Code [table]
Version: 0.1.7.1, by StGaensler StGaensler is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

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:
Code:
[table="head"]head col1|head col2|head col3
row1 col1|row1 col2|row1 col3
row2 col1|row2 col2|row2 col3[/table]
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

File Type: xml table_bbcode-language-en.xml (5.1 KB, 4209 views)
File Type: xml table_bbcode-language-de.xml (5.5 KB, 1228 views)
File Type: txt sorttable.js.txt (6.8 KB, 3630 views)
File Type: xml product-bbcode_table-multi.0.1.6.xml (31.3 KB, 1217 views)
File Type: xml product-bbcode_table-multi.xml (33.4 KB, 3664 views)

Screenshots

File Type: jpg table_01.jpg (10.9 KB, 0 views)
File Type: jpg table_02.jpg (10.1 KB, 0 views)
File Type: jpg table_03.jpg (30.9 KB, 0 views)
File Type: jpg table_04.jpg (135.1 KB, 0 views)

Show Your Support

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

Comments
  #302  
Old 04-30-2008, 10:48 PM
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Location: Munich
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just try a example code and you will see that it works

As I said many times here you will have to add the image by yourself.
Reply With Quote
  #303  
Old 05-05-2008, 01:40 AM
JonUrban JonUrban is offline
 
Join Date: Jul 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I've had this going in my forum for quite some time and it's great. I just upgraded to vB3.7, and I also upgraded this "product". It still is working, however the table is now aligned against the left side of the post, where before it was centered.

Is there a way to get it back to being centered?

THANKS again for a great set of code!
Reply With Quote
  #304  
Old 05-05-2008, 12:58 PM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love BBcodes... Dank sch?n
Reply With Quote
  #305  
Old 05-08-2008, 02:17 AM
oxblood12's Avatar
oxblood12 oxblood12 is offline
 
Join Date: Oct 2006
Location: SANTIAGO
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank`s For Hack`s
Reply With Quote
  #306  
Old 05-08-2008, 05:24 PM
CheeSie's Avatar
CheeSie CheeSie is offline
 
Join Date: Sep 2006
Location: Denmark
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kiwivc View Post
If I use your supplied table code then the results still show the same error. I've got 77 mods installed which I disabled while looking for the cause however the duplicate last line still showed even after disabling postcache and testing with a new post. In the meantime I'm using {br} to generate an empty row at the end of each table. Two empty rows look better than duplicating the real data contained in the last row.

I have noticed that if I remove the ="head" part from [table="head"] then the last row does not duplicate.
[table] works fine
[table="head"] causes the last row to duplicate.
In plugin parse vBCode table, replace
Code:
if($bbcode_table['table']['rows']<$vbulletin->options['stg_table_maxrows']) $bbcode_table['table']['rows']--;
with
Code:
$bbcode_table['table']['rows']--;
Reply With Quote
  #307  
Old 05-09-2008, 12:28 AM
mr.Travel mr.Travel is offline
 
Join Date: Apr 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just open /includes/class_bbcode.php

Find:
PHP Code:
            //[INDENT]
            
$tag_list['no_option']['indent'] = array(
                
'html' => '<blockquote>%1$s</blockquote>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 
Add after:
PHP Code:
// [table]

            
$tag_list['no_option']['table'] = array(
                
'html' => '<table>%1$s</table>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
// [td]

            
$tag_list['no_option']['td'] = array(
                
'html' => '<td>%1$s</td>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);

// [tr]

            
$tag_list['no_option']['tr'] = array(
                
'html' => '<tr>%1$s</tr>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 
Simple for Wemasters like HTML

HTML Code:
<table>
	<tr>
		<td>tab 1</td>
		<td>tab 2</td>
	</tr>
	<tr>
		<td>tab 3</td>
		<td>tab 4</td>
	</tr>
	<tr>
		<td>tab 5</td>
		<td>tab 6</td>
	</tr>
</table>
HTML Code:
[table]
	[tr]
		[td]tab 1[/td]
		[td]tab 2[/td]
	[/tr]
	[tr]
		[td]tab 3[/td]
		[td]tab 4[/td]
	[/tr]
	[tr]
		[td]tab 5[/td]
		[td]tab 6[/td]
	[/tr]
[/table]
Reply With Quote
  #308  
Old 05-12-2008, 03:08 AM
kiwivc kiwivc is offline
 
Join Date: Aug 2007
Location: New Zealand
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CheeSie View Post
In plugin parse vBCode table, replace
Code:
if($bbcode_table['table']['rows']<$vbulletin->options['stg_table_maxrows']) $bbcode_table['table']['rows']--;
with
Code:
$bbcode_table['table']['rows']--;
Awesome, it works great now. Cheers for that.
Reply With Quote
  #309  
Old 05-17-2008, 01:23 PM
bezibaerchen bezibaerchen is offline
 
Join Date: Sep 2007
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting following error messageafter trying to import on 3.7:

Code:
old table-tag moved (if existing)

Datenbankfehler in vBulletin 3.7.0:

Invalid SQL:
INSERT INTO bbcode VALUES (NULL, 'table', 'No code has to be inserted here.', '[table]column 1|column 2|column 3[/table]', 'With this vB code tables can be inserted into the post. Columns are seperated by ?|?, every new line is a new row.', 0, 'table', '');;

MySQL-Fehler  : Column count doesn't match value count at row 1
Fehler-Nr.    : 1136
Fehler-Zeit   : Saturday, 17.05.2008 @ 16:23:37
Datum         : Saturday, 17.05.2008 @ 16:23:38
Skript        : http://<cut>/admincp/plugin.php?do=productimport
Referrer      : http://<cut>/admincp/plugin.php?do=productadd
IP-Adresse    : <cut>
Benutzername  : <cut>
Klassenname   : vB_Database
MySQL-Version : 5.0.45-Debian_1ubuntu3.3-log
Any hints?
Reply With Quote
  #310  
Old 05-20-2008, 10:58 AM
dilbert dilbert is offline
 
Join Date: Nov 2004
Location: Boston
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is a file edit and most folks prefer not to do this, but will this work? If so, it would make the use of tables so much easier.

Quote:
Originally Posted by mr.Travel View Post
Just open /includes/class_bbcode.php

Find:
PHP Code:
            //[indent]
            
$tag_list['no_option']['indent'] = array(
                
'html' => '<blockquote>%1$s</blockquote>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 
Add after:
PHP Code:
// [table]
 
            
$tag_list['no_option']['table'] = array(
                
'html' => '<table>%1$s</table>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
// [td]
 
            
$tag_list['no_option']['td'] = array(
                
'html' => '<td>%1$s</td>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
 
// [tr]
 
            
$tag_list['no_option']['tr'] = array(
                
'html' => '<tr>%1$s</tr>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 
Simple for Wemasters like HTML

HTML Code:
<table>
    <tr>
        <td>tab 1</td>
        <td>tab 2</td>
    </tr>
    <tr>
        <td>tab 3</td>
        <td>tab 4</td>
    </tr>
    <tr>
        <td>tab 5</td>
        <td>tab 6</td>
    </tr>
</table>
HTML Code:
[table]
    [tr]
        [td]tab 1[/td]
        [td]tab 2[/td]
    [/tr]
    [tr]
        [td]tab 3[/td]
        [td]tab 4[/td]
    [/tr]
    [tr]
        [td]tab 5[/td]
        [td]tab 6[/td]
    [/tr]
[/table]
Reply With Quote
  #311  
Old 05-22-2008, 02:00 AM
ArnyVee's Avatar
ArnyVee ArnyVee is offline
 
Join Date: Mar 2008
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With what Mr Travel posted (and dilbert quoted), will that make it so that I can include tables similar to HTML code without having to do the .xml file imports?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07217 seconds
  • Memory Usage 2,406KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (4)bbcode_html
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete