PDA

View Full Version : if condition="THIS_SCRIPT


topvip
2009-07-14, 08:03 PM
Hello,

I use vBulletin 3.8.x and vBadvanced, so I have this little problem.
I have insert some banner Adsense in the template "navbar" only for guest, and I see it also in my Portal.
I am finding a variable to show it only in my forum, forumhome and showthread and not in Portal/Home also if they are include in navbar.

What variable can I use?
I am trying this variabile but perhaps is is wrong: <if condition="THIS_SCRIPT != 'showthread"> ?

Thank you

yahoo
2009-07-14, 08:04 PM
<if condition="THIS_SCRIPT != 'showthread">

That one would be the condition to show if NOT in showthread. If you want it to only show in index.php, forumdisplay.php and showthread.php, you would do this:
<if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread'">
show your ad
</if>

yahoo
2009-07-14, 08:06 PM
To trim Lynne's 2nd example a bit...<if condition="in_array(THIS_SCRIPT, array('index', 'forumdisplay', 'showthread'))">
ad code
</if>