Log in

View Full Version : Newbie code mod question


webspider
08-03-2005, 11:25 PM
I'm building a template to hold my chat app and I want to restrict users to 2 groups (2) registered and (6) admin. I'm currenting using <if condition="$show['member']"> which does limit non members but it allows the waiting for email confoirmation group.

I have tried <if condition="(is_member_of($vbulletin->userinfo, 2))"> which limits to the registered group but disallows admin. I need something that works for both.

Sorry for the daft question but I just don't know php well enough to get this right. Any help would be appreciated.

vBintense
08-03-2005, 11:34 PM
<if condition="(is_member_of($vbulletin->userinfo, 2)) OR (is_member_of($vbulletin->userinfo, 5)) OR (is_member_of($vbulletin->userinfo, 6)) OR (is_member_of($vbulletin->userinfo, 7))">

webspider
08-03-2005, 11:36 PM
<if condition="(is_member_of($vbulletin->userinfo, 2)) OR (is_member_of($vbulletin->userinfo, 5)) OR (is_member_of($vbulletin->userinfo, 6)) OR (is_member_of($vbulletin->userinfo, 7))">

Wow that was easy. Many tkanks!!

vBintense
08-03-2005, 11:39 PM
No trouble at all, just add OR (yadda yadda) for each group (changing the number)