View Full Version : Adding multiple condition for ads
kushal
04-09-2014, 02:14 PM
I want to introduce two condition to my ads appearing. To appear only to 'Guests', and to prevent it for appearing for 'Register' script.
Is this the way to put it?
<if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']">
<ads>
</vb:if></vb:if>
eXoOutsider
04-09-2014, 03:35 PM
I want to introduce two condition to my ads appearing. To appear only to 'Guests', and to prevent it for appearing for 'Register' script.
Is this the way to put it?
<if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']">
<ads>
</vb:if></vb:if>
Hello kushal, you're nearly there, something like this would be better:
<vb:if condition="THIS_SCRIPT != 'register' AND $show['guest']">
<!-- your ads :) -->
</vb:if>
Although I'm a little rusty so I hope I haven't made any mistakes :p.
bzcomputers
04-09-2014, 08:00 PM
IF you are using Google Adsense you should even be a little more strict and not post ads on a few other pages to save yourself from possible policy violations and potentially being dropped from their program. Google does not want ads displaying on any "non-content" pages.
<vb:if condition="!in_array(THIS_SCRIPT, array('error', 'misc', 'private', 'register')) AND $show['guest']">
YOUR AD HERE
</vb:if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.