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
  #162  
Old 06-07-2007, 11:28 AM
LaCN LaCN is offline
 
Join Date: Feb 2005
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

w00t !!

Thanx
A whole new world opened to me, lol

If anyone wants to use our button, it's in the attachement
Reply With Quote
  #163  
Old 06-15-2007, 11:10 PM
Elenna Elenna is offline
 
Join Date: Jan 2006
Location: St. Charles, MO
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there! Thanks ever so much for this mod, this is wonderful!

I have added a custom CSS and have it working for the body of the table (td), but it isn't formatting the header (thead or th). What am I doing wrong? I am trying to have it match the 'smallfont' style that is being applied to the <td> rows.

Here is what I have in my CSS (note both thead and th since I don't know which will work!):

Code:
/*********** TABLE **************/
.stg_table_smallfont {font-size: 11px;font-family: 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}
 
.stg_table_smallfont td {font-size: 11px;font-family: 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}
 
.stg_table_smallfont th {font-size: 11px;font-family: 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}
 
.stg_table_smallfont thead {font-size: 11px;font-family: 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}
/*********** END TABLE **********/
Reply With Quote
  #164  
Old 06-18-2007, 04:44 AM
dottom dottom is offline
 
Join Date: May 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StGaensler View Post
Introduction to options:
{css=myclass}
Defines the css class of the current row. This value is only valid in the first cell of a row and should be the first option (colspan defined after it - currently reversing the order works, too).
Has anyone been able to get {css=myclass} to work in a table? I haven't had any luck getting it to work. I need to set a specific class for each row becaue the tables are too large if I have to apply formatting to each individual cell. I can't use the generic table css becaues I have a few different classes, i.e. depending on the content of the row it might be colored red, yellow, green, or white.
Reply With Quote
  #165  
Old 06-18-2007, 09:51 AM
alexsinev alexsinev is offline
 
Join Date: Jun 2007
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi! It's a great mod, but I have the same problem which was reported in this message.

When I use the code

HTML Code:
[table="head;width=70%"] |[CENTER][B]column 2[/B][/CENTER]|[CENTER][B]column 3[/B][/CENTER]
[B]row 2[/B]|[CENTER]test 22[/CENTER]|[CENTER]test 23[/CENTER]
[B]row 3[/B]|[CENTER]test 32[/CENTER]|[CENTER]test 33[/CENTER][/table]
I get the wrong table (the first one in the attachment).

If I add extra line breaks, like here

HTML Code:
[table="head;width=70%"] |[CENTER][B]column 2[/B][/CENTER]|[CENTER][B]column 3[/B][/CENTER]

[B]row 2[/B]|[CENTER]test 22[/CENTER]|[CENTER]test 23[/CENTER]

[B]row 3[/B]|[CENTER]test 32[/CENTER]|[CENTER]test 33[/CENTER][/table]
everything is all right (the second image). The problem appears only when I add the [CENTER] tags.

vBulletin version 3.6.7.

Is this normal?
Attached Images
File Type: gif sample.gif (7.6 KB, 0 views)
Reply With Quote
  #166  
Old 06-18-2007, 05:43 PM
Elenna Elenna is offline
 
Join Date: Jan 2006
Location: St. Charles, MO
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dottom View Post
Has anyone been able to get {css=myclass} to work in a table? I haven't had any luck getting it to work. I need to set a specific class for each row becaue the tables are too large if I have to apply formatting to each individual cell. I can't use the generic table css becaues I have a few different classes, i.e. depending on the content of the row it might be colored red, yellow, green, or white.
I have gotten it to work somewhat. I have figured out how to apply formatting to the table and cell contents, but I can't seem to apply formatting to the header row (I'm sure I just don't know enough about CSS to figure that out on my own).

Here is what I did:

1) In AdminCP, go into Styles, and go to Main CSS for the style you are using. If you are using multiple styles, you'll need to do this for each style.

2) In the Additional CSS section (very bottom) create a new CSS entry called .stg_table_mycss (use something else other than mycss). You will need the . before.

3) If you are applying the style to the whole table, use .stg_table_mycss.
If you are applying the style to the cell contents (text), use .stg_table_mycss td. If you are applying the style to the cell row (alternating colors??) use .stg_tablerow_mycss

See my post above for examples.

4) Once you have created the CSS entries (and saved them), go into vB Options> vb code [table] options. You'll need to check the {css=} option at the top to enable that feature, and you'll also need to enter in mycss in the Styles for Table and Styles for Tablerow sections.

Save those options, and then reload your page. You may need to hard refresh (clear cache, etc) to force the download of the CSS again.
Reply With Quote
  #167  
Old 06-22-2007, 03:28 PM
ashraf_gawdat ashraf_gawdat is offline
 
Join Date: May 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Realy nice. Installed.
Reply With Quote
  #168  
Old 07-09-2007, 05:55 AM
tekguru tekguru is offline
 
Join Date: May 2007
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi guys need some help here, were using the transparent table mod as detailed in the thread which works perfectly, but are having a few problems with formatting:

The table we are using is:

PHP Code:
[table="css=transp"][IMG]http://www.4winmobile.com/cyclist/wallet/generator.gif[/IMG]|Including a password generator in a wallet program is very useful for creating website passwords to be used on the same device as the wallet. While editing a card tap and hold in a password field opens a submenu that includes a built in password generator.  There are recommended combinations of length and characters for normal, strong and very strong passwords.  If these choices don?t meet your needs, then you can set a custom combination instead.  For instance, suppose I want a very strong password for logging into my company network, to keep out all those nosy colleagues.  I start by selecting very strong, but find that this allows spaces in the password, and the corporate password policy doesn?t.  So I deselect spaces, and the strength changes to Custom, but I know that it is only a tiny bit weaker.  This customisation ability is very good.  So full marks for included functionality.The password generator mostly works fine when generating at lower strength settings.  But at the higher settings the generated password does not always contain all the elements selected, which is infuriating if you are trying to meet a request for a particular type of password.  It seems particularly fond of not including spaces when asked to.  The screenshot shows a password I generated asking for lowercase and numbers, with a pronounceable result.  There are no numbers in it.  If Spb?s generator can?t include numbers in a pronounceable password, then the program should warn me about this when I tick the checkbox for pronounceable[/table] 
Now this works fine and generates: table_01.jpg

However any time we try and put a new paragraph break in the text to give some structure we get an extra cell as per: table_02.jpg

Any ideas what we are missing? HELP
Attached Images
File Type: jpg table_01.jpg (64.1 KB, 0 views)
File Type: jpg table_02.jpg (66.6 KB, 0 views)
Reply With Quote
  #169  
Old 07-13-2007, 03:10 PM
tekguru tekguru is offline
 
Join Date: May 2007
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump.....
Reply With Quote
  #170  
Old 07-14-2007, 01:48 PM
StGaensler's Avatar
StGaensler StGaensler is offline
 
Join Date: Jan 2005
Location: Munich
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dottom View Post
Has anyone been able to get {css=myclass} to work in a table?
I got it work What have you tried to get it work? Have you enabled the css feature and put the classnames (without stg_table_) into the preferences of my mod? Have you defined the properties of the css classes (with stg_table_)? Is {css=... the very first text standing in the row?
Quote:
Originally Posted by Elenna View Post
3) If you are applying the style to the whole table, use .stg_table_mycss.
If you are applying the style to the cell contents (text), use .stg_table_mycss td. If you are applying the style to the cell row (alternating colors??) use .stg_tablerow_mycss
If you want to define a css for the table head use .stg_table_mycss th and define your table with [table="css=mycss;head]
Quote:
Originally Posted by tekguru View Post
However any time we try and put a new paragraph break in the text to give some structure we get an extra cell as per: table_02.jpg

Any ideas what we are missing? HELP
My mod interprets a linebreak as a new tablerow - so this is working as designed. If you want to use a linebreak inside a cell, use {br} instead as stated in post #122

Stefan
Reply With Quote
  #171  
Old 07-14-2007, 09:52 PM
tekguru tekguru is offline
 
Join Date: May 2007
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StGaensler View Post
My mod interprets a linebreak as a new tablerow - so this is working as designed. If you want to use a linebreak inside a cell, use {br} instead as stated in post #122

Stefan
Hi Stefan cheers I'd spotted the use of the B]{br}[/B] and now you have restated it I've seen outr mistake to simulate a new paragraph one needs to use it 2-3 times, previously I'd only been using it once. DOH!
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 01:32 PM.


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.12198 seconds
  • Memory Usage 2,391KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_php
  • (6)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
  • (3)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
  • (12)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