SMF Ads Support Forum

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

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

QuoteOkay, 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, 11:17:31 PM
Answered on simple machines and quoted here:

QuoteIf 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, 11: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, 11: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, 09: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)

//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, 03:15:12 PM
yeah, but you can still see them on the registration page with me:
http://ztz.110mb.com/smf/index.php?action=register
Title: Re: Quite Important Adsense Feature for TOS
Post by: jerm on August 25, 2007, 11:22:06 AM
Adll you need to do is add this to the end
|| $_REQUEST['action'] == 'register'