Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #542  
Old 10-21-2009, 12:54 PM
War.Frog's Avatar
War.Frog War.Frog is offline
 
Join Date: Aug 2009
Location: Ontario, Canada
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.k. figured it out. Wow, it had nothing to do with Excel in this case. I found that this hack (or perhaps vBulletin) handles certain BB codes differently. For instance, if [center] is the primary modifier to a cell (the outside modifier) in addition to other codes, this hack goes haywire even though VISIBLY the code appears to be correct.

For instance:

[ center ] [ b ] TEST [ /b ] [ /center ] causes this hack grief.

Making the alignment tags the innermost modifiers fixes it:

[ b ] [ center ] TEST [ /center ] [ /b ]

I just moved the alignment tag adds to the beginning of the loop - I would suggest it's a problem you may run into too Bruno since it appears vBulletin is doing the rendering funny business.

Code:
For Each rngCell In rngRow.Cells
  c = c + 1
  sCell = rngCell.Text
  sFont = rngCell.Font.Name
            
  'If cell text is right aligned, add the [right] tag
  If rngCell.HorizontalAlignment = xlRight Then
     sCell ...
  End If
            
  'If cell text is centered, add the [center] tag
  If rngCell.HorizontalAlignment = xlCenter Then
      sCell = ...
  End If
Fix attached:
Attached Files
File Type: zip BB Table Maker 2.2.zip (21.6 KB, 58 views)
Reply With Quote
  #543  
Old 10-21-2009, 07:15 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and some others...

Thanks for the Update! ... and good night, 10:13 PM here ...

Greetings, Bruno
Reply With Quote
  #544  
Old 10-22-2009, 02:34 AM
War.Frog's Avatar
War.Frog War.Frog is offline
 
Join Date: Aug 2009
Location: Ontario, Canada
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Someone earlier in this thread asked what outside-the-box things people are doing with their tables.

Just for "fun" to demonstrate how one can begin creating some very complex tables, I did a 19x25 table using four different 16x16 px squares...just three different shades (black, dark grey, light grey) and a white square.

Using BB Table Maker 2.2.xls, I was able to create this image. I can't imaging trying to do this manually.
Attached Images
File Type: jpg AbeCode.jpg (176.6 KB, 0 views)
File Type: png AbeResult.png (18.6 KB, 0 views)
Attached Files
File Type: txt AbeCode.txt (36.1 KB, 33 views)
Reply With Quote
  #545  
Old 10-22-2009, 10:24 AM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL...that's great War.Frog!

I want to try to do that to make a Mickey Mouse head! :up:
Reply With Quote
  #546  
Old 10-22-2009, 11:58 AM
Ads1980 Ads1980 is offline
 
Join Date: Mar 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HI guys, do you know how I can add a background image so it's behind the table?

should I do a table within a table maybe that works? I'll test and report back

Cheers,
Ads
Reply With Quote
  #547  
Old 10-22-2009, 12:30 PM
Ads1980 Ads1980 is offline
 
Join Date: Mar 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm nope that didn't work so I guessed next move was css.... can't get that to work either here's what I have so far:

css in the following area:
css=myclass
Defines the aditional css class of the whole table. Possible values have to be defined in admincp.
The value is prepended by stg_table_ so the resulting css class with above example would be stg_table_myclass
The css code has to be added to "Additional CSS Definitions" of your style (AdminCP -> Styles & Templates -> Style Manager -> (Dropdown) Main CSS -> Additional CSS Definitions)

a quick warning about the style below, I've added a png transparency so the table shows up better on my image, IE doesn't support this! I've tried various ways of getting around this but I've not been successful yet I'll keep you posted

Code:
/* ***** table styles ***** */

.stg_table_myclass {
background-image: url(http://www.gamersdomain.net/images/games/forza3/forza3banner_1.jpg);
background-repeat: none;
}

.stg_table_myclass td {
border: none; 
background:transparent; 
text-align: center; 
} 

.stg_table_myclass .alt1 {background-image: url(http://www.gamersdomain.net/images/transpancy.png); background: -ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=90)”;
filter: alpha(opacity=90);
-khtml-opacity: 0.9;
-moz-opacity: 0.9;
opacity: 0.9;
}

.stg_table_myclass .alt2 {
background-image: url(http://www.gamersdomain.net/images/transpancy.png);
background: -ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=70)”;
filter: alpha(opacity=70);
-khtml-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
}

/* ***** end of table styles ***** */
BB Code [table] Settings: CSS Classes For The Table
Code:
myclass
table:
Code:
[table="css=myclass;width=100%"]testcol11|testcol21|testcol31
testcol12|testcol22|testcol32
testcol13|testcol23|testcol33
testcol14|testcol24|testcol34[/table]
ok figured it out forgot the . in front of my style doh!
Reply With Quote
  #548  
Old 10-24-2009, 05:52 PM
trotskid trotskid is offline
 
Join Date: Feb 2009
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trotskid View Post
Hi. If sort a column of numbers with "." or "," (Project column), the values does not sort properly. For example:

30,274,388 will post higher than 101,274,388 (3>1).

How can I fix that with the current code?

Thank you




PHP Code:
[table="head;sort=2d;autonum=1;autonumtitle=Rank;width=65%"]xxxx|Project|Points|P/day|National

test1
|30,274,388|68,520|60|3|

test2|101,274,388|50,956|80|2|

test3|20,274,388|21,325|29|6|

[/
table
Bump
Reply With Quote
  #549  
Old 10-27-2009, 05:50 PM
jmpa jmpa is offline
 
Join Date: Apr 2008
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now all we need is an html <table> to bb table converter!
Reply With Quote
  #550  
Old 10-27-2009, 06:37 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@trotskid: I think, no one has the time yet to repair this... Often it's more complicated to solve it, than it seems. So it's up to you to get into the code or find a workaround (a leading 0? in background color? ...)

Bruno
Reply With Quote
  #551  
Old 10-28-2009, 07:16 PM
War.Frog's Avatar
War.Frog War.Frog is offline
 
Join Date: Aug 2009
Location: Ontario, Canada
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jmpa View Post
Now all we need is an html <table> to bb table converter!
I would think you could pseudo pull this off by copying the html table from the web page and pasting it into Excel, then using the content in the converter.
Reply With Quote
Reply

Thread Tools

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 02:30 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.09852 seconds
  • Memory Usage 2,377KB
  • Queries Executed 28 (?)
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
  • (5)bbcode_code
  • (1)bbcode_php
  • (2)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
  • (13)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_postinfo_query
  • fetch_postinfo
  • 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