Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2004, 08:46 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default BBCode Equivalent for <Table>

Hello everyone. I'm trying to figure out how to write a hack that allows users to construct tables. My board is one games - d20 and D&D in particular - and the users often need to display tables of varying sizes.

To date they've been told to use the code tag to and space the things out, but this a bit time consuming and frankly doesn't look nice.

I've been thinking such a tag would be similar to the {list} tag in function except that vbulletin would have to count how many items it's been given. For instance

{Table=3} would start up a table with three columsn
{*} First item, would show on row one, colum one
{*} Second item, would show on row one, colum two
{*} Third item, would show on row three, colum three
{*} Fourth item, would show on row one colum one
{/table}
If the user forgot to put in a fifth and 6th item vbulletin would put however many <td>space</td> entries that would be necessary.

Anyway, I'm gonna work on this, but I could use help if anyone has any ideals on how to do this.
Reply With Quote
  #2  
Old 09-22-2004, 02:35 PM
weitalia weitalia is offline
 
Join Date: Jun 2004
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found it FANTASTIC as idea,and i'm really interested in it.
But i think it'd be so much complicated,and i don't know how to do,especially to capture all those parameters [?!?!?]....

Reply With Quote
  #3  
Old 09-23-2004, 10:27 AM
Symbian.info Symbian.info is offline
 
Join Date: Nov 2001
Location: Netherlands
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm also really interested in it!
Reply With Quote
  #4  
Old 10-12-2004, 10:14 AM
weitalia weitalia is offline
 
Join Date: Jun 2004
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So,at the end I did it
You have to add those 3 BB Codes

1st CODE
  1. Add New BB Code
  2. Title : Grid
  3. Tag : grid
  4. Replacement : <table {option} summary="">{param}</table>
  5. Example : [grid="your attributes"]Table content[/grid]
  6. Description : Make a Table
  7. Use {option} : YES
2nd CODE
  1. Add New BB Code
  2. Title : Row
  3. Tag : row
  4. Replacement : <tr>{param}</tr>
  5. Example : [row]Row cells[/row]
  6. Description : Add Row
  7. Use {option} : NO
3rd CODE
  1. Add New BB Code
  2. Title : Cell
  3. Tag : cell
  4. Replacement : <td {option}>{param}</td>
  5. Example : [cell="your attributes"]Cell 1[/cell]
  6. Description : Add Cell
  7. Use {option} : YES
That's everything!! Here's an example of how use it :
Quote:
[grid="cellpadding=2 cellspacing=2 border=1"][row][cell=""] Cella 1[/cell][cell=""] Cella 2[/cell][cell=""] Cella 3[/cell][/row][row][cell=""] Cella 4[/cell][cell=""] Cella 5[/cell][cell=""] Cella 6[/cell][/row][row][cell=""] Cella 7[/cell][cell=""] Cella 8[/cell][cell=""] Cella 9[/cell][/row][row][cell=""] Cella 10[/cell][cell=""] Cella 11[/cell][cell=""] Cella 12[/cell][/row][/grid]
Have fun!!!

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:35 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.03803 seconds
  • Memory Usage 2,188KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete