vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Group Similar vB Codes on the vB Code List (https://vborg.vbsupport.ru/showthread.php?t=67051)

Slynderdale 07-10-2004 10:00 PM

Group Similar vB Codes on the vB Code List
 
This is a small hack that affects the vB Code list. Currently if you add two vB Codes with the same tag but one uses {option} and one doesn't, they get shown in two different categories instead of grouped as one. An example of this is the quote vB Code, both [.quote] and [.quote="username"] are grouped together. This hack fixes that and groups similar custom vB tags together.

To install this hack, find in misc.php:
PHP Code:

         eval('$template[\'bbcodebits\'] .= "' fetch_template('help_bbcodes_bbcode') . '";');
         eval(
'$template[\'bbcodelinks\'] .= "' fetch_template('help_bbcodes_link') . '";');
      } 

and replace it with:
PHP Code:

      foreach($bbcode as $key => $value)
          {
            
$temp[$key] = $value;
        }
        
$bbcode_array[$bbcode['bbcodetag']][] = $temp;
      }
  
      foreach(
$bbcode_array as $key => $value)
      {
        unset(
$bbcode);
        
$array $bbcode_array[$key];
        foreach(
$array as $key => $value)
        {
          foreach(
$array[$key] as $var => $value)
          {
            
$var '_'.$var;
            $
$var $value;
          }
          
$bbcode['bbcodetag'] = $_bbcodetag;
          if (
$bbcode['title'] != $_title)
          {
            
$bbcode['title'] .= iif($bbcode['title'],'/','').$_title;
          }
          if (
$bbcode['bbcodeexplanation'] != $_bbcodeexplanation)
          {
          
$bbcode['bbcodeexplanation'] .= iif($bbcode['bbcodeexplanation'],'<br />','').$_bbcodeexplanation;
          }
          
$bbcode['tag'] .= iif($bbcode['tag'],'<br />','').$_tag;
         
$bbcode['bbcodeexample'] .= iif($bbcode['bbcodeexample'],'<br />','').$_bbcodeexample;
          
$bbcode['output'] .= iif($bbcode['output'],'<br />','').$_output;
        }
        eval(
'$template[\'bbcodebits\'] .= "' fetch_template('help_bbcodes_bbcode') . '";');
        eval(
'$template[\'bbcodelinks\'] .= "' fetch_template('help_bbcodes_link') . '";');
      } 

Thats all. I'll post some screenshots below.

the Sandman 07-11-2004 12:14 AM

Nice hack... but would you mind showing me how to make the smilie with sign BBCode - that's awesome!

Giveit2u43 07-11-2004 12:51 AM

upload the attached image to your images directory, and then create a new BB code with the following info.

Title: Sign

Tag: sign

Replacement:

Code:

<table border="0" cellspacing="0" cellpadding="0">
<tr>
        <td align="center" style="background-color: #deebff; border: 1px dashed Black; padding: 8px;"><normalfont>{param}</normalfont></td>
</tr>
<tr><td align="center">
<img src="images/sign.gif" alt="" border="0">
</td></tr>
</table>

Example:
Code:

[sign]sign test[/sign]
Description: Sign Hack

Use {option}: No

Button Image: (Optional)

the Sandman 07-11-2004 01:23 AM

Thank you! :D

weitalia 07-15-2004 02:21 PM

Fantastic Sandman ;)

;)


All times are GMT. The time now is 01:33 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.00963 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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