PDA

View Full Version : vb4 conditionals for certain usergroups


bongwater
12-20-2009, 06:53 PM
I would like content to be shown to specific usergroups. Is the following conditional code written correctly for vb4?

<vb:if condition="$is_member_of($bbuserinfo,1,2,3)" />
CODE
<vb:else />
</vb:if>

Lynne
12-20-2009, 06:58 PM
Looks fine except it's is_member_of, not $is_member_of.

ForumsMods
12-20-2009, 06:59 PM
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)" />
CODE
<vb:else />
</vb:if>

Lynne
12-20-2009, 07:03 PM
Whoops.... actually, you also don't want the / at the end of this line:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)" />

Should be:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">

bongwater
12-20-2009, 07:07 PM
thanks

Speysider
12-21-2009, 03:23 PM
what's with the little:
<vb:
at the start?

Just wondering, does it actually do anything?

Lynne
12-21-2009, 04:00 PM
Yes, it does something. Try doing it without and you will get errors. Try doing it with, and it will run your condition. It's the new vb4 syntax.

Speysider
12-21-2009, 06:42 PM
Oh.
If I run vb3.8, do I have to add the <vb: bit or not?

Paul M
12-21-2009, 07:01 PM
No, but this is the vb4 forum, not 3.8