Manage Templates
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..
Caching Templates
This is probably NOT the best way of achieving this, however if you're wanting to effectively cache a template in an existing file (for example, the v3arcade award bits in showthread.php), this how to achieve this with a simple plugin.
Add a plugin to the following hook location:
vBulletin : General -> cache_templates
With the following code:
Code:
[/php]$globaltemplates = array_merge($globaltemplates, array('xxxx'));[/php]
Replace
xxxx with the template that you are wanting to cache.
It's as simple as that! Also, if you're wanting to cache multiple templates, simply add a comma after the last
' and wrap a second template name with
's. You should have something like this:
Code:
[/php]$globaltemplates = array_merge($globaltemplates, array('xxxx', 'yyyy'));[/php]
Repeat as required..
Grouping Custom Templates in the Admin CP
Add a plugin to the following location:
vBulletin : General Administration -> template_groups
With the following code:
Code:
[/php]$only['xxxx'] = 'Group Name';[/php]
Replace
xxxx with the template prefix that you are wanting to group.
Once again, this is very easy to do. If you're wanting to do add multiple groups, add a second line below this one and do the same again. If you wish to use a phrase, use:
Code:
PHP Code:
$only['xxxx'] = $vbphrase['yyyy'];
Replace
yyyy with the phrase variable.