php - how to use vbulletin variables globally? -
i want use {vb:raw human_verify} on page inside vbulletin ?
when use variable in template , not work.
it works on templates (register, search, ..) never work in template..
i have tried add new plugin make vars global :
vb_template::preregister('activity_home',array('includedphp ' => $includedphp));
but works on new (custom) vbulletin vb:raw variables.
how overcome this?
thanks in advance
i assume using vb4 , variable set in includedphp. need change :
activity_home
with name of template need use variable (do multiple times if want add in several templates). basicaly : use "forumhome" put forum home or "header" put on header...
this link helpful (see "save array , preregister use in existing/stock template" section ). hope helps.
edit :
$templater = vb_template::create('mytemplate'); // define template $templater->register('my_var', $my_var); // define variables $templater->register('my_array', $my_array); $templatevalues['my_insertvar'] = $templater->render(); // save template variable, "note data needs saved array simple variable throw error" vb_template::preregister('forumhome', $templatevalues); // "insert" variable forumhome template
then can add new template in forumhome template line :
{vb:raw my_insertvar}
Comments
Post a Comment