Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Styles for 3.6.x Thread, Manage Templates in Styles; Manage Templates Want to cache templates or group custom templates in the Admin CP without editing the source code? Of ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5497


Reply
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
27-10-2008, 09:50 PM
 
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.. Egypt.Com EnForum



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.
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Styles for 3.6.x Thread, Manage Templates in Styles; Manage Templates Want to cache templates or group custom templates in the Admin CP without editing the source code? Of ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5497


Bookmarks

Tags
manage, templates


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Manage Stress? hamo81 Health And Family 3 28-12-2008 06:15 AM
CSS Templates 1.0 Developer Software and Programs 0 13-11-2008 12:45 AM
portal templates Developer Web Application 0 01-11-2008 10:20 PM
100+ CSS Templates Developer Web Application 0 13-10-2008 09:43 PM
Ghali :Egypt can manage subsidy costs SABRAWY News 0 22-04-2008 09:27 PM