Seductor
09-07-2012, 08:41 PM
Hello:
I'm trying to register a variable. It will need to check whenever a visitor belong to the poster buddy list, so...
$new_buddylist = array();
$new_buddylist = explode(' ', $bbuserinfo['buddylist']);
$templater = vB_Template::create('postbit_legacy');
$templater->register('my_var', $new_buddylist);
$templatevalues['my_buddylist'] = $templater->render();
vB_Template::preRegister('postbit_legacy', $templatevalues);
I did a plugin hooked to postbit_display_complete.
Now, I think I will do something like this:
<vb:if condition="in_array($post[userid], $new_buddylist)">
$post[email]
</vb:if>
Am I doing it right? How could I call to my $new_buddylist? Should it be my_buddylist or my_var?
Thanks.
I'm trying to register a variable. It will need to check whenever a visitor belong to the poster buddy list, so...
$new_buddylist = array();
$new_buddylist = explode(' ', $bbuserinfo['buddylist']);
$templater = vB_Template::create('postbit_legacy');
$templater->register('my_var', $new_buddylist);
$templatevalues['my_buddylist'] = $templater->render();
vB_Template::preRegister('postbit_legacy', $templatevalues);
I did a plugin hooked to postbit_display_complete.
Now, I think I will do something like this:
<vb:if condition="in_array($post[userid], $new_buddylist)">
$post[email]
</vb:if>
Am I doing it right? How could I call to my $new_buddylist? Should it be my_buddylist or my_var?
Thanks.