Log in

View Full Version : Caching templates


Eagle Creek
01-05-2006, 07:32 AM
Hi,

I get this warning:
Page generated in 0,25061 seconds with 12 queries (1 queries for uncached templates)
Uncached templates: opgelostlinkjes (1)

So how can I cache it?

Guest190829
01-05-2006, 07:36 AM
AdminCP -> Plugin System -> Add New Plug-In ->

Hook: Cache Templates

Title: Whatever you want (Eg: Cache opgelostlinkjes)

PHP Code::


$globaltemplates[] = 'opgelostlinkjes';



And save...

harmor19
01-05-2006, 07:40 AM
How do I find out if the template is uncached?

Guest190829
01-05-2006, 07:51 AM
When you have your forum in debug mode, there is a list of templates being used in a table called "Template Usage." If a template is uncached it's in red font, otherwise it's cached and it normal black font.

harmor19
01-05-2006, 07:58 AM
Thank you.

I fixed the uncached templates that my hack uses.

Eagle Creek
01-05-2006, 06:57 PM
Thank You!

Danny; the methode I used whas editting the showthread.php and add the item manual. Is your idea better?

Princeton
01-05-2006, 09:44 PM
You may want to report it to whoever made the hack.

Adding the template to the $globaltemplates array depends if you need the template globally. You may want to add it to the $actiontemplates array ... it all depends on your needs.

This may help ... https://vborg.vbsupport.ru/showthread.php?t=104532
(https://vborg.vbsupport.ru/showthread.php?t=104532)

Eagle Creek
01-06-2006, 04:27 PM
//
You may want to report it to whoever made the hack.
//

I did that, thankyou :).

But what's better? File edit or this methode?

Guest190829
01-06-2006, 04:28 PM
//
You may want to report it to whoever made the hack.
//

I did that, thankyou :).

But what's better? File edit or this methode?

The plug-in method, why edit a file when you don't need too? :)

Princeton
01-06-2006, 04:32 PM
If it's a vbulletin default file I suggest the plugin method.
Which variable ($globaltemplates / $actiontemplates) should you use depends on your hack.

If it's a custom product (you created it) ... edit the file.

Eagle Creek
01-06-2006, 05:29 PM
If it's a vbulletin default file I suggest the plugin method.
Which variable ($globaltemplates / $actiontemplates) should you use depends on your hack.

If it's a custom product (you created it) ... edit the file.

No, it's a plugin made by a friend of my. So no vBdefault.
But I installed many plugins and this was the only one that gave error.

But when I use $globaltemplates[] = 'opgelostlinkjes'; it's ok :).

By the way; is it true what they say; when you put many plugin your forum will slow down?

Guest190829
01-06-2006, 07:14 PM
No, it's a plugin made by a friend of my. So no vBdefault.
But I installed many plugins and this was the only one that gave error.

But when I use $globaltemplates[] = 'opgelostlinkjes'; it's ok :).

By the way; is it true what they say; when you put many plugin your forum will slow down?

Well it all depends on what they are doing, if they are running extensive queries, then yes your forum will suffer in performance...