View Full Version : How can I hide the ads banners from this page in forum?
sadiq6210
02-15-2012, 02:38 PM
I have a forum with some products such as (DownloadII, Gallery, classifieds, cms, ...)
I want to display the ads banners only in forum pages, I mean I want to hide the banners from some pages which is:
forum/downloads.php
forum/classifieds.php
gallery/index.php
/index.php
What is the (if statement) can I use?
__________________________
I have this code to hide the banners from the users profiles and it is working fine
<vb:if condition="THIS_SCRIPT!='member'">
I tried for example
<vb:if condition="THIS_SCRIPT!='downloads.php'">
but it is not working with me
Any hint?
Simon Lloyd
02-15-2012, 07:29 PM
Have you tried dropping the ".php" ?
Kraxell
02-15-2012, 09:50 PM
The best way i think is, you put your adsense-code in the template of your choise.
sadiq6210
02-16-2012, 10:57 AM
Have you tried dropping the ".php" ?
Yes, It is not working
The best way i think is, you put your adsense-code in the template of your choise.
I have a statistics box in navbar, I want to show the ads banners above that box
so I should add the ads banners code either in header or navbar
Iain M
02-16-2012, 02:18 PM
Check what THIS_SCRIPT is defined as on each of the pages you don't want your ads to show on.
define('THIS_SCRIPT', 'XXX');
Should be near the top of the file.
Then
<vb:if condition="THIS_SCRIPT != 'XXX'">Ad</vb:if>
should work.
sadiq6210
02-16-2012, 04:01 PM
Check what THIS_SCRIPT is defined as on each of the pages you don't want your ads to show on.
define('THIS_SCRIPT', 'XXX');
Should be near the top of the file.
Then
<vb:if condition="THIS_SCRIPT != 'XXX'">Ad</vb:if>
should work.
This is very helpful post
Now it is working
Thank you very much Iain, you are the best ^_^
This is the result:
<vb:if condition="THIS_SCRIPT!='member'">
<vb:if condition="THIS_SCRIPT!='downloads2'">
<vb:if condition="THIS_SCRIPT!='gallery_index'">
<vb:if condition="THIS_SCRIPT!='mc_classifieds'">
ADS
</vb:if></vb:if></vb:if></vb:if>
Last question, How can I make it in one <if condition> using '&&' or '||' ?
Thanks dear
Iain M
02-17-2012, 10:07 AM
No worries =]
Yeah, you should be able to combine them into one by doing
<vb:if condition="THIS_SCRIPT != 'member' OR THIS_SCRIPT != 'downloads2' OR THIS_SCRIPT != 'gallery_index' OR THIS_SCRIPT != 'mc_classifieds'">
ADS
</vb:if>
sadiq6210
02-20-2012, 06:22 AM
No worries =]
Yeah, you should be able to combine them into one by doing
<vb:if condition="THIS_SCRIPT != 'member' OR THIS_SCRIPT != 'downloads2' OR THIS_SCRIPT != 'gallery_index' OR THIS_SCRIPT != 'mc_classifieds'">
ADS
</vb:if>
Unfortunately, this is not working Iain
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.