![]() |
The templates that I wish to group start with NewTemplategroup. And this is what I found:
Use newtemplategroup in lower-case as the array index, otherwise it doesn't work :) // This works like a charm :) $only['newtemplategroup'] = 'New Template group'; // This does not work :( $only['NewTemplategroup'] = 'New Template group'; Thanks for the quick reply. I hope this helps someone :) |
[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:
step 2 example: Languages & Phrases: => Phrase Manager => Add New Phrase
last step example: Styles & Templates => choose your current style unless you have debug mode on, you can chooseMASTER STYLE => Add New Template
Quote:
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!;) |
For some reason when I did this with a prefix with an underscore (_) it did not work, but as soon as I took the underscore out it worked just fine.
From the examples above it would appear that some people have gotten it to work with an underscore in their prefix, but it's just not working for me in 3.8. But the thing is, all of my vBa scripts have underscores in their template groups (adv_portal, adv_links), so I know it should work. Any ideas? PHP Code:
PHP Code:
|
hello vB experts
i need some help i tried to add template into ad location section (template) and i did exactly the tutor said temlate group Code:
$only['ad_'] = $vbphrase['group_ad_location']; but seem not work the template i created it till outside of the ad location group any suggestion will be appriciated Sincerely, |
Quote:
Code:
$only['ad'] = $vbphrase['group_ad_location']; |
oh wow ... it works like champ
thanks so much .... Digital Jedi |
I did it on my custom templates using 'Postbit' to try and put my custom postbits into that category with the default postbits that comes with vbulletin.
but for some strange reason i now have two "Postbit Templates" instead with the exact same spelling lol :( Code:
$only['menufortgm'] = 'Postbit'; |
I started creating products, and I am stuck
Can I ask, the footer and header templates, can it be a part of caching, or can I use the caching on footer or header template... and which templates can be reffered to or as $globaltemplates... Here is the HOOK for caching my template below: <hookname>cache_templates</hookname> and my PHPCODE: $globaltemplates = array_merge($globaltemplates, array('MYCODENAME')); and my replacement code: if ($vbulletin->options['social_five_on']) { $replace = '$ad_location[ad_footer_start]'; $vbulletin->templatecache['footer'] = str_replace($replace,$replace.fetch_template('MYCODENAME'),$vbulletin->templatecache['footer']); IS this done right? by the way this is for vB3.8 |
All times are GMT. The time now is 02:19 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|