Wow, thanks for the lightning fast response!
Ok, I did this:
PHP Code:
// global at the top
global $vbulletin;
// now I can use $vbulletin
$memname = $vbulletin->db->query_first("SELECT * FROM "
. TABLE_PREFIX . "mainapptable WHERE userid = '"
. $post['userinfo']['userid'] . "'");
// register the variable
vB_Template::preRegister('memberaction_dropdown',
array('memname' => $memname));
And in my template:
<vb:if condition="$memname['app']">Found app!</vb:if>
Which doesn't work. I also tried {vb:raw memname.app} which didn't work either. Why is it so hard to pass data to a template
Edit: postbit_display_start is the correct hook right?