Manage Templates
by
24 Oct 2005
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:
$globaltemplates = array_merge($globaltemplates, array('xxxx')); 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:
$globaltemplates = array_merge($globaltemplates, array('xxxx', 'yyyy')); Grouping Custom Templates in the Admin CP Add a plugin to the following location: vBulletin : General Administration -> template_groups With the following code: Code:
$only['xxxx'] = 'Group Name'; 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:
$only['xxxx'] = $vbphrase['yyyy']; |