View Full Version : Uncached templates
lasto
02-08-2009, 06:14 PM
im on vbull 3.8.1
and i have uncached templates on forumindex,does anyone know how i can cache them.
The templates which are showing up uncached are ones ive added myself so any help would be appreciated.
snakes1100
02-08-2009, 07:14 PM
Read that article, roughly in the middle of the article.
https://vborg.vbsupport.ru/showthread.php?t=62164
lasto
02-08-2009, 07:53 PM
65 pages is a lot to read m8
snakes1100
02-08-2009, 08:11 PM
The first box gives a description of how to add templates to cache them, you can also use a plugin to cache the templates.
Lynne
02-08-2009, 08:24 PM
hook location - cache_templates:
if(THIS_SCRIPT == 'index')
{
$globaltemplates = array_merge($globaltemplates, array(
'xxx_yyyy',
'aaa_bbbb'));
}
That's the basic format.
lasto
02-09-2009, 03:21 PM
Lynne
im actually after caching templates that the link above points to as im using that to display external pages.
I know u done about hooks so do i just add that to the php file etc ??
Lynne
02-09-2009, 04:07 PM
Just change:
if(THIS_SCRIPT == 'index')To:if(THIS_SCRIPT == 'yourpage')
or whatever you define THIS_SCRIPT to be in your script.
lasto
02-09-2009, 04:09 PM
cheers will do
--------------- Added 1234209531 at 1234209531 ---------------
dont follow - do i add this into the actual PHP file ?
Dismounted
02-10-2009, 05:36 AM
Plugin, no?
hook location - cache_templates
Lynne
02-10-2009, 03:05 PM
Yes, a create a plugin (Plugins & Products > Add New Plugin) using the "cache_templates" hook location.
Dismounted
02-11-2009, 08:47 AM
Sarcasm doesn't really work on the interwebs. :( I should've learnt that now.
Lynne
02-11-2009, 02:14 PM
Sarcasm doesn't really work on the interwebs. :( I should've learnt that now.
lol
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.