View Full Version : why precache templates, i'm not finding it in the code....
Dionysis
07-04-2005, 05:53 PM
In all the pages there are arrays like $phrasegroups, $specialtemplates, $actiontemplates etc.
what is the purpose of these? I can't find where they are called anywhere else in the code.
the templates are just pulled from
eval('print_output("' . fetch_template('TEMPLATE') . '");');
anyway
Zachery
07-04-2005, 06:00 PM
If you don't precache a template a query is issued to get the template, and or every template on the page.
Dionysis
07-04-2005, 06:32 PM
right, that is what i'm looking for in the code. But doing a bunch of crtl+F for "$actiontemplates" and associated arrays brings up nothing so i can't find where it's being used.
Adrian Schneider
07-04-2005, 06:38 PM
I think you're looking for $globaltemplates - actiontemplates are from datastore.
Andreas
07-04-2005, 06:46 PM
No ;)
$actiontemplates is an array defining Templates needed for special actions.
So these will only be loaded when the Scripts executes the assigned action - global.php merges this array with $globaltemplates for the action currently beign called.
What you mean is $specialtemplates.
Dionysis
07-04-2005, 07:02 PM
So these will only be loaded when the Scripts executes the assigned action
yea, WHERE? where in the code ^_^. I want to look it over myself :squareeyed:
Andreas
07-04-2005, 07:04 PM
global.php, but where exactly depends on the Version.
For vBulletin 3.0.7 its around line 293.
For vBulletin 3.5 Beta 3 its around line 262.
Dionysis
07-04-2005, 07:15 PM
Ah! thank you much.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.