Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 11-01-2004, 04:16 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now if somebody could only get the "adv_portal" templates do do that for vBa CMPS I'd be happy.
Reply With Quote
  #13  
Old 11-01-2004, 04:44 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KW802
Now if somebody could only get the "adv_portal" templates do do that for vBa CMPS I'd be happy.
Thats not hard, if you read the first post you will know how to do that.

Find:
PHP Code:
'subscription' => $vbphrase['group_paid_subscriptions'], 
Below Add:
PHP Code:
'adv_portal' => $vbphrase['vbadvanced_cmps_templates'], 
Add new phrase:
vbadvanced_cmps_templates
vBadvanced CMPS Templates

Done!
Reply With Quote
  #14  
Old 11-01-2004, 04:49 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Live Wire
Thats not hard, if you read the first post you will know how to do that. <snip>
Actually, mine already looks like.....
Code:
'adv_portal' => 'vBadvanced CMPS',
'adv_links' => $vbphrase['group_adv_links'],
If the code you posted on your site is working to group the CMPS templates then I must've screwed something else up somewhere.

Knowing how to do it isn't the problem..... why it isn't working is.
Reply With Quote
  #15  
Old 11-01-2004, 05:35 PM
DS MrSinister DS MrSinister is offline
 
Join Date: Dec 2002
Location: the burgh
Posts: 553
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the help.. now i Just can't get the adv_portal templates to move. Like the ones i have added.

any ideas on it?
Reply With Quote
  #16  
Old 11-04-2004, 12:44 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this problem sas well, but others with the same hack installed have it working (/me points @ Boofo and Dark_Wizard) ... so I dunno what it is: the file mods are the same...
Reply With Quote
  #17  
Old 02-25-2005, 08:08 AM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works on some but not others. Not sure why...
Reply With Quote
  #18  
Old 02-25-2005, 09:59 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by venomx
This works on some but not others. Not sure why...
agree that...sometimes works but sometimes not ...so strange:ermm:
Reply With Quote
  #19  
Old 02-25-2005, 11:59 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it works for most of the cases, the only time I saw it doesn't work is when using for adv_portal. all of else works for me.
Reply With Quote
  #20  
Old 02-27-2005, 02:03 PM
teamgofast teamgofast is offline
 
Join Date: Nov 2004
Location: chicago burbs
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a great tip, cleans things up nicely, now what to do with the custom adv_portal templates?
Reply With Quote
  #21  
Old 05-27-2005, 09:33 PM
macooper macooper is offline
 
Join Date: May 2005
Location: UK
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tried this for the geek article system, and it didn't work. However, I noticed that all the templates started 'GAS_', so I used the code

PHP Code:
'GAS_' => $vbphrase['group_gas_hack'], 
which turned out to be the problem. Even though the templates started in uppercase, I had to list the filter phrase in lowercase like this

PHP Code:
'gas_' => $vbphrase['group_gas_hack'], 
Then everything worked as expected. As it wasn't obvious to me that I should always use lowercase for the filter, I thought I'd add this note.
Reply With Quote
Reply


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 05:25 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.08340 seconds
  • Memory Usage 2,355KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (6)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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