The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
?? Uncached Template ??
Copied from vB.com: http://www.vbulletin.com/forum/showthread.php?t=262272
I have an uncached template from a recent modification I added (https://vborg.vbsupport.ru/showthread.php?t=171918) How can I make this template (and any other future uncached templates) cached so no unneccesary queries are called? I've tried editing the index.php file to include the template in the "pre-cache templates used by all actions" section: Code:
// pre-cache templates used by all actions $globaltemplates = array( 'FORUMHOME', 'forumhome_event', 'forumhome_forumbit_level1_nopost', 'forumhome_forumbit_level1_post', 'forumhome_forumbit_level2_nopost', 'forumhome_forumbit_level2_post', 'forumhome_lastpostby', 'forumhome_loggedinuser', 'forumhome_moderator', 'forumhome_subforumbit_nopost', 'forumhome_subforumbit_post', 'forumhome_subforumseparator_nopost', 'forumhome_subforumseparator_post', 'forumhome_markread_script' ); Thanx, Jacquii. |
#2
|
||||
|
||||
He should have added this plugin as well to the xml
Code:
<plugin active="1"> <title>Quick new thread Template Cache</title> <hookname>cache_templates</hookname> <phpcode><![CDATA[$globaltemplates[] = 'cb_quickthread';]]></phpcode> </plugin> |
#3
|
||||
|
||||
WONDERFUL! Thanx so much for you help!
Jacquii. |
#4
|
||||
|
||||
im lazy like that
|
#5
|
||||
|
||||
Tsk..Tsk.. Ryan. Shame on you.
|
#6
|
|||
|
|||
If this template is only used on certain pages you show wrap the cache in a conditional for example if it was only the index.php page:
PHP Code:
PHP Code:
|
#7
|
||||
|
||||
And how would you do something like both of those for multiple templates being cached?
|
#8
|
||||
|
||||
PHP Code:
|
#9
|
|||
|
|||
Or:
PHP Code:
|
#10
|
||||
|
||||
Thank you, sir. I thought that should be included in case anyone stumbles onto this and won't have to ask for that now.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|