Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
How to add your own template group
Logikos
Join Date: Jan 2003
Posts: 2,924

 

Show Printable Version Email this Page Subscription
Logikos Logikos is offline 10-03-2004, 10:00 PM

If you would like to keep your AdminCp Area nice and clean like i do and are looking for a way to group all those custom templates that say arcade_XXXX all over the place, well lets put them in its own group.

Open includes/adminfunctions_template.php

Scroll ALL the way to the bottom and you will see the following:

PHP Code:
// template groups
$only = array
(
        
// phrased groups
        
'buddylist' => $vbphrase['group_buddy_list'],
        
'calendar' => $vbphrase['group_calendar'],
        
'faq' => $vbphrase['group_faq'],
        
'reputation' => $vbphrase['group_user_reputation'],
        
'poll' => $vbphrase['group_poll'],
        
'pm' => $vbphrase['group_private_message'],
        
'register' => $vbphrase['group_registration'],
        
'search' => $vbphrase['group_search'],
        
'usercp' => $vbphrase['group_user_control_panel'],
        
'usernote' => $vbphrase['group_user_note'],
        
'whosonline' => $vbphrase['group_whos_online'],
        
'showgroup' => $vbphrase['group_show_groups'],
        
'posticon' => $vbphrase['group_post_icon'],
        
'userfield' => $vbphrase['group_user_profile_field'],
        
'bbcode' => $vbphrase['group_bb_code_layout'],
        
'help' => $vbphrase['group_help'],
        
'editor' => $vbphrase['group_editor'],
        
'forumdisplay' => $vbphrase['group_forum_display'],
        
'forumhome' => $vbphrase['group_forum_home'],
        
'pagenav' => $vbphrase['group_page_navigation'],
        
'postbit' => $vbphrase['group_postbit'],
        
'threadbit' => $vbphrase['group_threadbit'],
        
'im_' => $vbphrase['group_instant_messaging'],
        
'memberinfo' => $vbphrase['group_member_info'],
        
'memberlist' => $vbphrase['group_members_list'],
        
'modify' => $vbphrase['group_modify_user_option'],
        
'new' => $vbphrase['group_new_posting'],
        
'showthread' => $vbphrase['group_show_thread'],
        
'smiliepopup' => $vbphrase['group_smilie_popup'],
        
'subscribe' => $vbphrase['group_subscribed_thread'],
        
'whoposted' => $vbphrase['group_who_posted'],
        
'threadadmin' => $vbphrase['group_thread_administration'],
        
'phpinclude' => $vbphrase['group_php_include_code'],
        
'navbar' => $vbphrase['group_navigation_breadcrumb'],
        
'printthread' => $vbphrase['group_printable_thread'],
        
'attachmentlist' => $vbphrase['group_attachment_list'],
        
'subscription' => $vbphrase['group_paid_subscriptions'],


        
'aaa' => 'AAA Old Backup'
); 
Above the 'aaa' => 'AAA Old Backup' You can place your groups name.

For instance if you installed the arcade hack all there templates say:

arcade_blah
arcade_blah
arcade_blah
arcade_blah

Then you would add the following above 'aaa' => 'AAA Old Backup':

PHP Code:
'arcade' => $vbphrase['arcade_hack_templates'], 
Then you would add a new phrase call arcade_hack_templates with the text Arcade Hack Templates.

Now the 'arcade => part means which templates are we going to put in this group. And only the templates that start with arcade. and the $vbphrase['arcade_hack_templates'] part is the name of the catogory/group your templates will be under.

So now you should be able to make your own. Hope this is usefull for new hackers!

You can download the tutorial in a .txt format below.
Attached Files
File Type: txt group_templates_tutorial.txt (4.6 KB, 124 views)
Reply With Quote
  #22  
Old 05-30-2005, 06:26 AM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Regarding it not working with the adv_portal templates, Brian at vBadvanced said in this post that because of the way vBulletin handles things, new templates won't be grouped with the others. Maybe they'll have this fixed in 3.5...
Reply With Quote
  #23  
Old 02-25-2009, 08:51 PM
craiovaforum's Avatar
craiovaforum craiovaforum is offline
 
Join Date: Nov 2005
Location: Craiova
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, it's version 3.8 and almost 4 years passed without any changes. This is a big issue for boards like mine with alot of modifications and templates that start with adv_portal.
Reply With Quote
  #24  
Old 04-02-2009, 07:07 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by craiovaforum View Post
Heh, it's version 3.8 and almost 4 years passed without any changes. This is a big issue for boards like mine with alot of modifications and templates that start with adv_portal.
I'd guess you could do this with the hook that now exists (untested):
Quote:
if (class_exists('vBulletinHook'))
{
($hook = vBulletinHook::fetch_hook('template_groups')) ? eval($hook) : false;
}
Just make a plugin that appends a line to the end of the afforementioned array?
Reply With Quote
  #25  
Old 08-08-2009, 10:24 PM
ChrisHasenpflug ChrisHasenpflug is offline
 
Join Date: Apr 2005
Location: Kansas City, MO
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wired1 View Post
I'd guess you could do this with the hook that now exists (untested):

Just make a plugin that appends a line to the end of the afforementioned array?
Yup, you can. Make a plugin for the "template_group" hook as follows:

PHP Code:
$only['your_prefix'] = 'Template Description'
Just did this, and it works.
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 06:28 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.04510 seconds
  • Memory Usage 2,286KB
  • Queries Executed 20 (?)
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
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete