Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Group Similar vB Codes on the vB Code List Details »»
Group Similar vB Codes on the vB Code List
Version: 1.00, by Slynderdale Slynderdale is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 07-10-2004 Last Update: Never Installs: 3
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-11-2004, 12:14 AM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack... but would you mind showing me how to make the smilie with sign BBCode - that's awesome!
Reply With Quote
  #3  
Old 07-11-2004, 12:51 AM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #4  
Old 07-11-2004, 01:23 AM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you!
Reply With Quote
  #5  
Old 07-15-2004, 02:21 PM
weitalia weitalia is offline
 
Join Date: Jun 2004
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic Sandman

Reply With Quote
Reply

Thread Tools

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 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07818 seconds
  • Memory Usage 2,252KB
  • Queries Executed 18 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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