PDA

View Full Version : Code snippet for: IF user is NOT member of groupid X THEN...


ataraxia
12-14-2007, 08:52 PM
I am trying to set a template to display a brief message requesting donations to All viewers (including unregistered) EXCEPT those I have flagged as members of a (secondary) group name "Donors" with groupid 47. (The idea is that once they have donated I do not want to keep bugging them.)

I am looking for a snippet of vB code with this logic:

IF viewer is NOT a member of (secondary) groupid47 THEN display "Please donate"

This code does NOT seem to work:
<IF condition="$bbuserinfo['usergroupid']!=47"> Please donate, blah, blah </IF>
Can you help? Thanks

SEOvB
12-14-2007, 11:59 PM
<if condition="is_member_of($bbuserinfo, 47)">
Thanks for donating
<else />
Please Donate
</if>

ataraxia
12-15-2007, 01:01 AM
Yes!! It works great!

Thank you!!!!!