SMF Ads Support Forum

Support => Feedback/Request => Topic started by: daisukey on July 06, 2007, 09:23:46 pm

Title: Quite Important Adsense Feature for TOS
Post by: daisukey on July 06, 2007, 09:23:46 pm
http://www.simplemachines.org/community/index.php?topic=180988.msg1152454#msg1152454

Quote
Okay, is there a mod which allows us to avoid ads to be shown in certain pages like register.php private.php? I believe showing google ads on these pages is against their TOS.

Or is there an alternative way to avoid this by simply modifying the template? I'm not a coder so any help is appreciated.

cheers.
Title: Re: Quite Important Adsense Feature for TOS
Post by: bigguy on July 06, 2007, 10:17:31 pm
Answered on simple machines and quoted here:

Quote
If you are worried about it and you are using the ad mod then just don't post google ads at the top, bottom, under the menu or in the welcome user area of the forum. There are still loads of other places to put your google ads. :)
Title: Re: Quite Important Adsense Feature for TOS
Post by: daisukey on July 06, 2007, 10:23:21 pm
hey thanks.

but is it possible not to display the ads in certain pages by using a conditional statement? like
Quote
if this is register.php page then do NOT display the following code.

Just an idea to make this mod better.  :)
Title: Re: Quite Important Adsense Feature for TOS
Post by: bigguy on July 06, 2007, 10:53:54 pm
I think it is possible and I will submit this thread to Jerm and see what he can come up with. :)
Title: Re: Quite Important Adsense Feature for TOS
Post by: jerm on July 08, 2007, 08:17:18 pm
Ya, its pretty easy actually. Do you know any basic coding?

Look into LoadAds.php in your sources directory(assuming you have already installed the mod)

Code: [Select]
//For security reasons, we don't want to display ads if the action is "admin" or "admod"
if(isset($_REQUEST['action']) && ($_REQUEST['action'] == 'admod' || $_REQUEST['action'] == 'admin'))
return ;

As you can see, ads can't be displayed if the action=admod . You can follow the same idea for any other action there is. Good?
Title: Re: Quite Important Adsense Feature for TOS
Post by: Cookiemonster on July 15, 2007, 02:15:12 pm
yeah, but you can still see them on the registration page with me:
http://ztz.110mb.com/smf/index.php?action=join
Title: Re: Quite Important Adsense Feature for TOS
Post by: jerm on August 25, 2007, 10:22:06 am
Adll you need to do is add this to the end
|| $_REQUEST['action'] == 'register'