L1teHawk
12-23-2011, 01:16 AM
Hi everyone,
I'm trying to pass a variable to the template "memberaction_dropdown". I created a new plugin with a hook to postbit_display_start (isn't that where the template is rendered?) with the following code:
global $vbulletin;
$memname = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "mainapptable WHERE userid = '" . $vbulletin->userinfo['userid'] . "'");
vB_Template::preRegister('memberaction_dropdown',a rray('memname' => $memname));
Then in my template, I did this:
{vb:raw memname.appname}
It does not work. Then I checked to see if $memname was set using a vb "if" conditional statement and it's not set. Can someone help me by pointing me in the right direction? Thank you very much!
I'm trying to pass a variable to the template "memberaction_dropdown". I created a new plugin with a hook to postbit_display_start (isn't that where the template is rendered?) with the following code:
global $vbulletin;
$memname = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "mainapptable WHERE userid = '" . $vbulletin->userinfo['userid'] . "'");
vB_Template::preRegister('memberaction_dropdown',a rray('memname' => $memname));
Then in my template, I did this:
{vb:raw memname.appname}
It does not work. Then I checked to see if $memname was set using a vb "if" conditional statement and it's not set. Can someone help me by pointing me in the right direction? Thank you very much!