PDA

View Full Version : How do I get a variable?


greytone
09-07-2011, 06:52 PM
I'm working in postbit_legacy.

I want to execute the following code, but I believe that the $memberinfo is failing to evaluate because the if-condition is always yielding false, even on posts by administrators.

<vb:if condition="is_member_of($memberinfo, 6)">
<span style="border:1px solid #fff; border-radius:4px; font-weight:bold; padding:3px; text-align:center;">{vb:raw post.usertitle}</span>
<vb:else />
{vb:raw post.usertitle}
</vb:if>

Does anyone know how I can get the this to work? Presumably by bringing the $memberinfo into scope of this template.

Thanks in advance!

kh99
09-07-2011, 07:06 PM
If you want to check if the post is by an administrator, then you want is_member_of($post, 6). If you're trying to check if an administrator is viewing the post, then it would be is_member_of($bbuserrinfo, 6).

greytone
09-07-2011, 07:39 PM
Worked great. Thank you :)