![]() |
Conditionals
Hi all. I'm new to this vB skinning thing and I have a question. Is it possible to limit if something (like ad sections) are shown based on a usergroup?
I.e.: If a user pays for a subscription to my forum, I'd like to remove the ads; however, they should be visible to everyone else that's not in the "subscriber" group. Is this possible? And if so, how? |
In the template, put this code around the ad:
HTML Code:
<if condition="!is_member_of($bbuserinfo, x)"> HTML Code:
<if condition="!is_member_of($bbuserinfo, x)"> |
Thanks for your help. I figured it would be something as easy as that.
Is the "X" the usergroup ID? |
Quote:
|
If this doesn't work, another way would be:
Code:
<if condition="$bbuserinfo[usergroup] = X"> |
What about multiple conditions? I.e. can I use the typical php operator "||" and "&&" to make:
<if condition="!is_member_of($bbuserinfo, 26) || !is_member_of($bbuserinfo, 6)"> <!-- Ad Code --> </if> I.e. If they're not a member of "subscriptions" or "admin" then show the ads. |
<if condition="!is_member_of($vbulletin->userinfo, 6,26)">
|
Well that was easy!
|
It usually is. ;)
|
All times are GMT. The time now is 05:20 AM. |
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:
|