PDA

View Full Version : Show Only To Specified Group


MajorFm.com
11-01-2005, 09:25 PM
What is the <if> statments if i want to edit content in a template that shows conent 1 to group 1 and content 2 to group 2...

So basically depending on their usergroup, they see diffrent content...

Please advise...

peterska2
11-01-2005, 09:37 PM
<if condition="$bbuserinfo[usergroupid]==x">Stuff to show to this group</if>

Replace x with the usergroup id number of the usergroup that you want to show the content to.

Repeat as many times as desired using different group numbers.

MajorFm.com
11-01-2005, 09:47 PM
Your a diamond, thank you.

peterska2
11-01-2005, 09:49 PM
You're welcome :)

Always happy to help.

MajorFm.com
08-15-2006, 02:41 PM
How do i use more then one usergroup? ...as in:

<if condition="$bbuserinfo[usergroupid]==1,2,3,4">Stuff to show to this group</if>

...or even the opposite will be nice, if your usergroup x, you wont see the item, as appose to show item to usergroup x, i wanted do not show item to usergroup x, how do i do that?

peterska2
08-15-2006, 04:37 PM
ok,

show to multiple groups - X,Y,Z are the groups it is being shown to.

<if condition="in_array($bbuserinfo[usergroupid], array(X,Y,Z))">Stuff</if>

Do not show to single group - A is the group it is hidden from.

<if condition="$bbuserinfo[usergroupid]!=A">Stuff</if>

Do not show to multiple groups - J,K,L are the groups it is hidden from.

<if condition="!in_array($bbuserinfo[usergroupid], array(J,K,L))">Stuff</if>

MajorFm.com
08-15-2006, 06:30 PM
Thank you so much... i have now been able to take off all adverts for vip members :)