![]() |
Need a <if> conditional
Hello I'm looking for a conditional where say I just want to show ads to registered users(doesn't make sense :)), and not anyone else, what would the <if> conditional be for this?
Also say I want to show ads to just admins, moderators, and registered users, what is the conditional for this? Thanks in advance :) |
The conditional to show it to your registered users is this:
HTML Code:
<if condition="$show['member']"> </if> |
Thanks, would this only show it to "registered users" and no one else?
As well how would I show it to both registered users and admins? Thanks so much :) |
Code:
<if condition="$bbuserinfo['usergroupid']==2"> Code:
<if condition="$bbuserinfo['usergroupid']==2"> |
Thanks Attilitus, so with the first code, say I want to display to both registered users and admins,
for the usergroupid, could i put ==2, 6"> ? to show to both admin/registered user? and does this only show the add to the admin/registered user and no one else? Thanks alot :) |
That would be correct.
|
actually thats completely wrong :-p
what you want is... HTML Code:
<if condition="is_member_of($vbulletin->userinfo, X)"> is_member_of($vbulletin->userinfo, X, Y, Z..) dont use the dots, but basically add more usergroup ids with commas |
You can actually use either one, just the one you posted Darkwaltz4, also checks the secondary usergroup of the users
|
no what i meant by what is wrong, is what you said was right, this:
==2, 6"> is bad php :-p, and doesnt check multiple usergroups. at the very least it would need PHP Code:
PHP Code:
|
Thanks guys, this is very useful!, now I have ads that I do not want to show to one usergroup, what would the conditional be to not show ads to this one usergroup?
Thanks so much :) |
All times are GMT. The time now is 04:04 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|