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

Reply
 
Thread Tools
BB code tables 1.0 for vB 3.5.x Details »»
BB code tables 1.0 for vB 3.5.x
Version: 1.00, by EvilHawk EvilHawk is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 01-19-2006 Last Update: Never Installs: 45
Uses Plugins
 
No support by the author.

This plugin permits the creation of a table in a post! Tables support for thread postbit, post review and post preview!

This is a just port which is based on the original JohnWoo BB code tables 1.0 hack for vB 3.0.x . This is posted with his permission. All credits to the original author!

Quote:
How it works :
1) starting code is [table] or [table 1 2 3] where
1 2 3 any numbers separated by space
first - border
second - cellpadding
third - cellspacing

- ending tag is always [/table]
- table lines separated by line break
- each line can have 7 styles. To specify a style add in the beginning number and ^ symbol without spaces
example:
2^
you may skip 7^ - it is default (alt1) style
- cells in line separated by |
- there is no need to add | before first and after last cell
- each cell can have each own align. Use align mark as a first symbol of cell without spaces
blank (default) - left
= - center
~ - right

- if number of cells different in lines, last cell of shorter lines will get colspan= with needed number

so table in post may look like

[table 1 3 0]
1|2|test 16798789789797979799879797979|4|5|6|7
1^~right with colspan
2^333|=center with colspan
3^1|2|left with colspan
4^1|=center without colspan|3|4|5|6|7
5^1|blablabla|3|4|5
6^1|2|3|4|5|6|7
[/table]
Minor bugs:
a)It inserts an empty cell if you leave a space after the [table] tag, so the first line has to be like this
[table 1 3 0] 1|2|test 16798789789797979799879797979|4|5|6|7
b) you can not use other bbcodes or smilies inside the table tag as they will not get parsed...

You can see demos at the screenshots

Show Your Support

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

Comments
  #22  
Old 05-19-2006, 12:36 PM
EvilHawk EvilHawk is offline
 
Join Date: Feb 2005
Location: Greece
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AFAIK yes (allthough i don't have a fixed width style to test it).
Reply With Quote
  #23  
Old 07-21-2006, 01:22 PM
haris_led haris_led is offline
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dear EvilHawk, I think that it is better working with phrases!
so, I changed the text in your xml, and I replaced it with some vbphrases
bb_table_title
bb_table_explanation
bb_table_example
bb_table_usage

so, by adding 4 phrases to the system, we can change or translate it easily
Here is what theese phrases should replace:
Code:
bb_table_title:
Table


bb_table_explanation:
Creates a table with parameters.


bb_table_example:
[table 1 3 0]<br/>
1|2|test 16798789789797979799879797979|4|5|6|7<br/>
1^~right with colspan<br/>
2^333|=center with colspan<br/> 
3^1|2|left with colspan <br/>
4^1|~center without colspan|3|4|5|6|7<br/>
5^1|blablabla|3|4|5<br/>
6^1|2|3|4|5|6|7<br/>
[/table] 


bb_table_usage:
[table]table contents[/table]
starting code is [table] or [table 1 2 3] where 1 2 3 any numbers separated by space (
first - border
second - cellpadding
third - cellspacing

- ending tag is always [/table]
- table lines separated by line break
- each line can have 7 styles. To specify a style add in the beginning number and ^ symbol without spaces example:2^ you may skip 7^ - it is default (alt1) style
- cells in line separated by |
- there is no need to add | before first and after last cell
- each cell can have each own align. Use align mark as a first symbol of ceil without spaces blank (default) - left
= - center
~ - right
- you can use any other BB code inside cells :)
- if number of ceils different in lines, last cell of shorter lines will get colspan= with needed number

I also include the new xml file(I just changed that part, nothing else )
Reply With Quote
  #24  
Old 07-28-2006, 10:47 AM
haris_led haris_led is offline
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello again, I think there is a bug!
When I type an url in a cell, and the system makes it a link with [url] tag, the link is wrong.
If the url is http://www.site.com, then the link will be: http://www.site.com\"/
What could it be?
Reply With Quote
  #25  
Old 08-02-2006, 08:02 AM
abosaleh's Avatar
abosaleh abosaleh is offline
 
Join Date: Jul 2006
Location: ksa
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

كفوا ا والله
thanksssss
Reply With Quote
  #26  
Old 08-08-2006, 07:41 PM
ChuckH's Avatar
ChuckH ChuckH is offline
 
Join Date: Mar 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by haris_led
Hello again, I think there is a bug!
When I type an url in a cell, and the system makes it a link with [url] tag, the link is wrong.
If the url is http://www.site.com, then the link will be: http://www.site.com\"/
What could it be?
Just saw this myself. Doing the same thing.
Reply With Quote
  #27  
Old 08-10-2006, 08:12 PM
EvilHawk EvilHawk is offline
 
Join Date: Feb 2005
Location: Greece
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suggest to use this hack instead https://vborg.vbsupport.ru/showthread.php?t=107985
Reply With Quote
  #28  
Old 02-07-2007, 10:17 PM
Dr.Vince Dr.Vince is offline
 
Join Date: Nov 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

here's a code correction for bbcode (like url and image) working :

Replace all code like that (in modules) :

Code:
$this->post['message'] = preg_replace("~(\[table.+\[/table\])~iUse", "fetch_html_table('\\1')", $this->post['message']);
by :

Code:
preg_match("~(\[table.+\[/table\])~iUs", $this->post['message'], $matches);
$replace = fetch_html_table($matches[1]);
$this->post['message'] = preg_replace("~(\[table.+\[/table\])~iUs", $replace, $this->post['message']);
Explanation :

the e search option of preg_replace escape simple and double quote.
Reply With Quote
  #29  
Old 11-23-2009, 03:54 AM
Selena Huynh's Avatar
Selena Huynh Selena Huynh is offline
 
Join Date: Feb 2008
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's great code but complicated in used. However, thanks for advance
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:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04328 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete