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)

A.Chakery 04-10-2011 09:26 AM

But Validatig the Codes is so important to SEO , so its kind of a big problem.

Will there be any updates ?

mickknutson 04-10-2011 11:55 AM

Quote:

Originally Posted by vitrag24 (Post 2177599)
https://vborg.vbsupport.ru/showpost....&postcount=670
can someone simplify or add modified plugin file directly so we can run on vb 4.2.1 ?

That would really help me as well.

rwoscott 04-10-2011 11:34 PM

Quote:

Originally Posted by mawby (Post 2129575)
I've had this installed since the early 3.8 days and I've got this working for vB4.1.0 with sorting still enabled. It's very hacky though so if you're not confident with hacking files then please don't follow these instructions as I offer no support for this - it is simply a list of things I did to get it working.

1) I added the items to additional.css as instructed here.

2) I edited the "link sorttable javascript in <head>-section" plugin to remove the IMGDIR_BUTTON reference, resulting in...

PHP Code:

if(($vbulletin->options['stg_table_options']&64)&&in_array(THIS_SCRIPT, array('announcement','calendar','editpost''newreply','newthread','private','showpost','showthread','usernote'))){
    
$output str_replace('</head>',"\t".'<style type="text/css">'."\n\t\tspan.sortarrow {position:absolute;}\n\t\tspan.sortarrow img {border:0;}\n\t\ta.sortheader {text-decoration:none; display:block; width:100%;}\n\t</style>\n\t".'<script type="text/javascript">'."\n\t".'</script>'."\n\t".'<script type="text/javascript" src="clientscript/sorttable.js"></script>'."\n".'</head>',$output);


3) I edited the clientscript/sorttable.js file and replace the IMGDIR_BUTTON references with hard coded paths, so this...

Code:

        if (span.getAttribute("sortdir") == 'down') {
                ARROW = '&nbsp;<img src="' + IMGDIR_BUTTON + '/sortasc.gif" />';
                newRows.reverse();
                span.setAttribute('sortdir','up');
        } else {
                ARROW = '&nbsp;<img src="' + IMGDIR_BUTTON + '/sortdesc.gif" />';
                span.setAttribute('sortdir','down');
        }

...becomes this on my site...

Code:

        if (span.getAttribute("sortdir") == 'down') {
                ARROW = '&nbsp;<img src="images/buttons/sortasc.png" />';
                newRows.reverse();
                span.setAttribute('sortdir','up');
        } else {
                ARROW = '&nbsp;<img src="images/buttons/sortdesc.png" />';
                span.setAttribute('sortdir','down');
        }

3) I edited the "parse vBCode table" plugin to remove the thead class reference, so...

PHP Code:

        #if a head is specified, make it
        
if($bbcode_table['head']['enabled']==true){
            
$table_head '<thead class="thead"><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
        }else{
            
$table_head '';
        } 

...becomes...

PHP Code:

        #if a head is specified, make it
        
if($bbcode_table['head']['enabled']==true){
            
$table_head '<thead><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
        }else{
            
$table_head '';
        } 

4) Within the same plugin I had to add the restore class to the table tag, so...

PHP Code:

        if (strlen($bbcode_table['css']['table'])>0){
            
$table_html '<table class="stg_table tborder stg_table_'.$bbcode_table['css']['table'];
        }else{
            
$table_html '<table class="stg_table tborder';
        } 

...becomes...

PHP Code:

        if (strlen($bbcode_table['css']['table'])>0){
            
$table_html '<table class="stg_table tborder restore stg_table_'.$bbcode_table['css']['table'];
        }else{
            
$table_html '<table class="stg_table tborder restore';
        } 

5) I ran the option: AdminCP -> Maintenance -> Update Counters -> Rebuild Post Cache

I want to reiterate, the above is simply what I've done to my site to get it working with the sort. I make no guarantee that it is the correct way to fix this or that it will work for anyone else.

With that said, I hope the above proves useful to someone. :D

Thankyou, worked a treat!!!

rwoscott 04-11-2011 02:27 AM

I am struggling with the CSS to change the link (.a) and the hover color for the stg_table.

Anyone can help please??

Edit:Solved - stg_table a {...}

mickknutson 04-11-2011 12:27 PM

Quote:

Originally Posted by mawby (Post 2129575)
I've had this installed since the early 3.8 days and I've got this working for vB4.1.0 with sorting still enabled. It's very hacky though so if you're not confident with hacking files then please don't follow these instructions as I offer no support for this - it is simply a list of things I did to get it working.

1) I added the items to additional.css as instructed here.

2) I edited the "link sorttable javascript in <head>-section" plugin to remove the IMGDIR_BUTTON reference, resulting in...

PHP Code:

if(($vbulletin->options['stg_table_options']&64)&&in_array(THIS_SCRIPT, array('announcement','calendar','editpost''newreply','newthread','private','showpost','showthread','usernote'))){
    
$output str_replace('</head>',"\t".'<style type="text/css">'."\n\t\tspan.sortarrow {position:absolute;}\n\t\tspan.sortarrow img {border:0;}\n\t\ta.sortheader {text-decoration:none; display:block; width:100%;}\n\t</style>\n\t".'<script type="text/javascript">'."\n\t".'</script>'."\n\t".'<script type="text/javascript" src="clientscript/sorttable.js"></script>'."\n".'</head>',$output);


3) I edited the clientscript/sorttable.js file and replace the IMGDIR_BUTTON references with hard coded paths, so this...

Code:

    if (span.getAttribute("sortdir") == 'down') {
        ARROW = '&nbsp;<img src="' + IMGDIR_BUTTON + '/sortasc.gif" />';
        newRows.reverse();
        span.setAttribute('sortdir','up');
    } else {
        ARROW = '&nbsp;<img src="' + IMGDIR_BUTTON + '/sortdesc.gif" />';
        span.setAttribute('sortdir','down');
    }

...becomes this on my site...

Code:

        if (span.getAttribute("sortdir") == 'down') {
                ARROW = '&nbsp;<img src="images/buttons/sortasc.png" />';
                newRows.reverse();
                span.setAttribute('sortdir','up');
        } else {
                ARROW = '&nbsp;<img src="images/buttons/sortdesc.png" />';
                span.setAttribute('sortdir','down');
        }

3) I edited the "parse vBCode table" plugin to remove the thead class reference, so...

PHP Code:

        #if a head is specified, make it
        
if($bbcode_table['head']['enabled']==true){
            
$table_head '<thead class="thead"><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
        }else{
            
$table_head '';
        } 

...becomes...

PHP Code:

        #if a head is specified, make it
        
if($bbcode_table['head']['enabled']==true){
            
$table_head '<thead><tr><th'.implode('</th><th',$table_head).'</th></tr></thead>';
        }else{
            
$table_head '';
        } 

4) Within the same plugin I had to add the restore class to the table tag, so...

PHP Code:

        if (strlen($bbcode_table['css']['table'])>0){
            
$table_html '<table class="stg_table tborder stg_table_'.$bbcode_table['css']['table'];
        }else{
            
$table_html '<table class="stg_table tborder';
        } 

...becomes...

PHP Code:

        if (strlen($bbcode_table['css']['table'])>0){
            
$table_html '<table class="stg_table tborder restore stg_table_'.$bbcode_table['css']['table'];
        }else{
            
$table_html '<table class="stg_table tborder restore';
        } 

5) I ran the option: AdminCP -> Maintenance -> Update Counters -> Rebuild Post Cache

I want to reiterate, the above is simply what I've done to my site to get it working with the sort. I make no guarantee that it is the correct way to fix this or that it will work for anyone else.

With that said, I hope the above proves useful to someone. :D

I am having a hard time finding these plugins to edit such as stg_table_options. Can you help with where to find these files to make these edits?

rwoscott 04-13-2011 01:09 AM

Quote:

Originally Posted by mickknutson (Post 2183371)
I am having a hard time finding these plugins to edit such as stg_table_options. Can you help with where to find these files to make these edits?

I admincp, find the Plugins and Products>plugin manager.
Then look for vbcode table.
This is where most of the edits above happen.

punterzone 04-13-2011 11:53 PM

Thanks very much for this hack...it worked perfectly :)

Carlos X 04-15-2011 01:45 AM

Looking at 4.1.3 update, seem as though there isn't one, assuming so, I have decided to remove this.

rwoscott 04-15-2011 08:51 AM

Quote:

Originally Posted by Carlos X (Post 2184809)
Looking at 4.1.3 update, seem as though there isn't one, assuming so, I have decided to remove this.

Do you mean it no longer works with 4.1.3?
It works fine with 4.1.1

AndrewRich 04-15-2011 10:49 PM

Happy to report that I've reinstalled this in our newly-upgraded to 4.1 mousepad.mouseplanet.com board, with mawby's changes to make it 4.1-compatible. Everything works great.


All times are GMT. The time now is 06:48 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.01643 seconds
  • Memory Usage 1,803KB
  • 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
  • (4)bbcode_code_printable
  • (10)bbcode_php_printable
  • (5)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