PDA

View Full Version : whats the conditional for this please


bashy
07-22-2007, 11:31 AM
Hi

I would like to remove the ads for VIP so what is the conditional i need to wrap around the ads please.
The ads are added manually (no addon script) so just the conditional would great please?

Dismounted
07-22-2007, 11:43 AM
<if condition="!is_member_of($vbulletin->userinfo, 10)">CODE</if>
Change 10 to whichever usergroup id it is.

bashy
07-22-2007, 01:44 PM
Thanks a lot Dismounted :)

Distance
07-22-2007, 01:59 PM
If he wants it so the ads don't show for Vips it would need to be something more along the lines of

<if condition="!is_member_of($vbulletin->userinfo, 10)"><else />Code</if>

10 being the vip usergroup Id
Code being the code for your ads.

Kirk Y
07-22-2007, 04:24 PM
No, because the condition states: "If this User is not a Member of the VIP Group, then display the Advert" -- there is no need for an ELSE statement, unless he specifically wanted to display a message to the VIP Users.

Distance
07-22-2007, 09:04 PM
I guess you could do it both ways

Kirk Y
07-22-2007, 09:30 PM
If you aren't showing something to the VIP Usergroup, then there is no point in adding an ELSE statement, you're just making it that much longer to process.

Distance
07-22-2007, 09:40 PM
I read dismounteds code wrong.

I thought he was meaning 10 was the vip usergroup which it wasn't actually filtering anything for them.

Kirk Y
07-22-2007, 09:45 PM
10 is the VIP Usergroup ID. But if you notice the exclamation point before "is_member_of", which negates the conditional.

bashy
07-23-2007, 04:46 AM
Thanks guys, been a great help, plus i learnt how to show something different if i wanted to...Been a great help, thanks again...Bookmarked :)