网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   vBulletin技术交流 (https://www.0058.net/forumdisplay.php?f=6)
-   -   if condition="THIS_SCRIPT (https://www.0058.net/showthread.php?t=3930)

topvip 2009-07-14 08:03 PM

if condition="THIS_SCRIPT
 
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

Code:

<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:
Code:

<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...
Code:

<if condition="in_array(THIS_SCRIPT, array('index', 'forumdisplay', 'showthread'))">
ad code
</if>



All times are GMT +8. The time now is 10:37 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.