View Single Post
  #13  
Old 01-29-2009, 12:06 AM
mikem1981 mikem1981 is offline
 
Join Date: Apr 2008
Location: Spring Lake, NC 28390
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[quote=Oblivion Knight;803104]Want to cache templates or group custom templates in the Admin CP without editing the source code? Of course you do! Want to know how to achieve this? Read on..

Now in plain english the easiest way to do this step by step is:

Add a plugin to the following hook location:
Plugins & Products: Add New Plugin
step 1 example:
  • Product: vBulletin
  • Hook Location: template_groups
  • Title: TEST TEMPLATES
  • Plugin PHP Code: $only['testtemplate'] = $vbphrase['mytest'];
  • Plugin is Active:Yes
Next you want to add the Main Titles phrase of your Grouped Templates
step 2 example:
Languages & Phrases: => Phrase Manager => Add New Phrase
  • Phrase Type: GLOBAL
  • Product: Either your product or the default which is vBulletin
  • Varname: mytest
  • Text: TEST TEMPLATES
Now the last step is creating the template or templates
last step example:
Styles & Templates => choose your current style unless you have debug mode on, you can chooseMASTER STYLE => Add New Template
  • Product: vBulletin or Your Product
  • Style: Your current style unless you have debug mode on, you can chooseMASTER STYLE to make this template for all the styles
Quote:
Now remember to always have the prefix to what you have it set on in the plugin that you gave it, we already chose $only['testtemplate'].
  • Title: testtemplate_HOMEPAGE
  • Template: you can put your HTML/PHP or whatever code you like to put here. you can even say "hi!"
  • Click save and go see your new group of templates called "TEST TEMPLATES"

I still give credits to Oblivion Knight, however, this I would rather say because it is far more easier to do these step by step. Now that I have gave you a break down on how to accomplish this the easy way, please feel free to rep me. But please, this original tutorial was by Oblivion Knight, I just broke it down in PLAIN ENGLISH! Thanks!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03450 seconds
  • Memory Usage 1,775KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete