wpeloquin
03-11-2011, 07:11 PM
Not sure this is the proper forum for this question or not, but it seems like it should be. I have written a mod that has a separate php file, and multiple templates/plugins. Should the following code be in both places, or just one or the other? if the latter, which would be more ideal?
In the php file, i have the following:
// pre-cache templates used by all actions
$globaltemplates = array(
'template1',
'template2',
'template3',
'template4',
'template5'
);
I then have the following plugin:
Hook Location: cache_templates
if ($vbulletin->options['mod_enable_global'] AND (THIS_SCRIPT=='script_name'))
{
$cache = array_merge($cache, array('template1', 'template2', 'template3', 'template4', 'template5'));
}
In the php file, i have the following:
// pre-cache templates used by all actions
$globaltemplates = array(
'template1',
'template2',
'template3',
'template4',
'template5'
);
I then have the following plugin:
Hook Location: cache_templates
if ($vbulletin->options['mod_enable_global'] AND (THIS_SCRIPT=='script_name'))
{
$cache = array_merge($cache, array('template1', 'template2', 'template3', 'template4', 'template5'));
}