PDA

View Full Version : Add Template to $actiontemplates into profile.php


SorentoUltimate
02-28-2010, 12:58 PM
Hello i try to cache a template to $actiontemplates into profile.php but not work

i use cache_templates plugin

here the code
if (THIS_SCRIPT=='profile')
{
$actiontemplates=array_merge($actiontemplates,arra y('editoptions'=>array('awc_ucp')));
} _

can someone help me fix that code???

(vBulletin 3.8.4 PL2)

SorentoUltimate
03-01-2010, 04:17 PM
Anyone can help on that????

SorentoUltimate
03-04-2010, 03:40 PM
Hello i try to cache a template to $actiontemplates into profile.php but not work

i use cache_templates plugin

here the code
if (THIS_SCRIPT=='profile')
{
$actiontemplates=array_merge($actiontemplates,arra y('editoptions'=>array('awc_ucp')));
} _

can someone help me fix that code???

(vBulletin 3.8.4 PL2)

Someone to help on that?????

kh99
03-04-2010, 06:19 PM
I've never done that, but it seems like what you'd want would be something like:

$actiontemplates['editoptions']=array_merge($actiontemplates['editoptions'], array('awc_ucp'));

or maybe just

$actiontemplates['editoptions'][] = 'awc_ucp';

You didn't say what you meant by "didn't work", so it could also be something to do with the plugin you're using.

ForumsMods
03-04-2010, 06:27 PM
Use this:
Hook Location: cache_templates
Plugin PHP Code:

if (THIS_SCRIPT == 'profile')
{
$cache[] = 'awc_ucp';
}