vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - BB Code [table] (https://vborg.vbsupport.ru/showthread.php?t=107985)

StGaensler 04-30-2008 10:48 PM

Just try a example code and you will see that it works :)

As I said many times here you will have to add the image by yourself.

JonUrban 05-05-2008 01:40 AM

Hi,

I've had this going in my forum for quite some time and it's great. I just upgraded to vB3.7, and I also upgraded this "product". It still is working, however the table is now aligned against the left side of the post, where before it was centered.

Is there a way to get it back to being centered?

THANKS again for a great set of code!

Deepdog009 05-05-2008 12:58 PM

I love BBcodes... Dank sch?n

oxblood12 05-08-2008 02:17 AM

Thank`s For Hack`s

CheeSie 05-08-2008 05:24 PM

Quote:

Originally Posted by kiwivc (Post 1502565)
If I use your supplied table code then the results still show the same error. I've got 77 mods installed which I disabled while looking for the cause however the duplicate last line still showed even after disabling postcache and testing with a new post. In the meantime I'm using {br} to generate an empty row at the end of each table. Two empty rows look better than duplicating the real data contained in the last row.

I have noticed that if I remove the ="head" part from [table="head"] then the last row does not duplicate.
[table] works fine
[table="head"] causes the last row to duplicate.

In plugin parse vBCode table, replace
Code:

if($bbcode_table['table']['rows']<$vbulletin->options['stg_table_maxrows']) $bbcode_table['table']['rows']--;
with
Code:

$bbcode_table['table']['rows']--;

mr.Travel 05-09-2008 12:28 AM

Just open /includes/class_bbcode.php

Find:
PHP Code:

            //[INDENT]
            
$tag_list['no_option']['indent'] = array(
                
'html' => '<blockquote>%1$s</blockquote>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 

Add after:
PHP Code:

// [table]

            
$tag_list['no_option']['table'] = array(
                
'html' => '<table>%1$s</table>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
// [td]

            
$tag_list['no_option']['td'] = array(
                
'html' => '<td>%1$s</td>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);

// [tr]

            
$tag_list['no_option']['tr'] = array(
                
'html' => '<tr>%1$s</tr>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 

Simple for Wemasters like HTML

HTML Code:

<table>
        <tr>
                <td>tab 1</td>
                <td>tab 2</td>
        </tr>
        <tr>
                <td>tab 3</td>
                <td>tab 4</td>
        </tr>
        <tr>
                <td>tab 5</td>
                <td>tab 6</td>
        </tr>
</table>

HTML Code:

[table]
        [tr]
                [td]tab 1[/td]
                [td]tab 2[/td]
        [/tr]
        [tr]
                [td]tab 3[/td]
                [td]tab 4[/td]
        [/tr]
        [tr]
                [td]tab 5[/td]
                [td]tab 6[/td]
        [/tr]
[/table]


kiwivc 05-12-2008 03:08 AM

Quote:

Originally Posted by CheeSie (Post 1512898)
In plugin parse vBCode table, replace
Code:

if($bbcode_table['table']['rows']<$vbulletin->options['stg_table_maxrows']) $bbcode_table['table']['rows']--;
with
Code:

$bbcode_table['table']['rows']--;

Awesome, it works great now. Cheers for that. :)

bezibaerchen 05-17-2008 01:23 PM

Getting following error messageafter trying to import on 3.7:

Code:

old table-tag moved (if existing)

Datenbankfehler in vBulletin 3.7.0:

Invalid SQL:
INSERT INTO bbcode VALUES (NULL, 'table', 'No code has to be inserted here.', '[table]column 1|column 2|column 3[/table]', 'With this vB code tables can be inserted into the post. Columns are seperated by ?|?, every new line is a new row.', 0, 'table', '');;

MySQL-Fehler  : Column count doesn't match value count at row 1
Fehler-Nr.    : 1136
Fehler-Zeit  : Saturday, 17.05.2008 @ 16:23:37
Datum        : Saturday, 17.05.2008 @ 16:23:38
Skript        : http://<cut>/admincp/plugin.php?do=productimport
Referrer      : http://<cut>/admincp/plugin.php?do=productadd
IP-Adresse    : <cut>
Benutzername  : <cut>
Klassenname  : vB_Database
MySQL-Version : 5.0.45-Debian_1ubuntu3.3-log

Any hints?

dilbert 05-20-2008 10:58 AM

I know this is a file edit and most folks prefer not to do this, but will this work? If so, it would make the use of tables so much easier.

Quote:

Originally Posted by mr.Travel (Post 1513227)
Just open /includes/class_bbcode.php

Find:
PHP Code:

            //[indent]
            
$tag_list['no_option']['indent'] = array(
                
'html' => '<blockquote>%1$s</blockquote>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 

Add after:
PHP Code:

// [table]
 
            
$tag_list['no_option']['table'] = array(
                
'html' => '<table>%1$s</table>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
// [td]
 
            
$tag_list['no_option']['td'] = array(
                
'html' => '<td>%1$s</td>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
);
 
// [tr]
 
            
$tag_list['no_option']['tr'] = array(
                
'html' => '<tr>%1$s</tr>',
                
'strip_empty' => true,
                
'strip_space_after' => 1
            
); 

Simple for Wemasters like HTML

HTML Code:

<table>
    <tr>
        <td>tab 1</td>
        <td>tab 2</td>
    </tr>
    <tr>
        <td>tab 3</td>
        <td>tab 4</td>
    </tr>
    <tr>
        <td>tab 5</td>
        <td>tab 6</td>
    </tr>
</table>

HTML Code:

[table]
    [tr]
        [td]tab 1[/td]
        [td]tab 2[/td]
    [/tr]
    [tr]
        [td]tab 3[/td]
        [td]tab 4[/td]
    [/tr]
    [tr]
        [td]tab 5[/td]
        [td]tab 6[/td]
    [/tr]
[/table]



ArnyVee 05-22-2008 02:00 AM

With what Mr Travel posted (and dilbert quoted), will that make it so that I can include tables similar to HTML code without having to do the .xml file imports?


All times are GMT. The time now is 11:11 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.01801 seconds
  • Memory Usage 1,792KB
  • 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
  • (5)bbcode_code_printable
  • (4)bbcode_html_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete