vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   BBCode Equivalent for <Table> (https://vborg.vbsupport.ru/showthread.php?t=67819)

Michael Morris 07-31-2004 08:46 AM

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.

weitalia 09-22-2004 02:35 PM

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 [?!?!?]....

;)

Symbian.info 09-23-2004 10:27 AM

i'm also really interested in it!

weitalia 10-12-2004 10:14 AM

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!!! ;)

;)


All times are GMT. The time now is 11:16 AM.

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.00954 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete