-
Posts
326 -
Joined
-
Last visited
Reputation Activity
-
thompsone got a reaction from Maxxius in Exclude Ads from given forums/areas
Part of your solution is here: IPS Thread
I have personally battled with this and keeping Adsense happy is goal number one.
Now you'll have to combine that with a ELSE statement so if it doesn't show ads because it's excluded then show another ad. I'm not an expert but I imagine it would look something like this.
{{if ( \IPS\Request::i()->controller == 'forums' AND isset( \IPS\Request::i()->id ) AND ! in_array( \IPS\Request::i()->id, array( forum_id1, forum_id2, forum_id3, forum_id4 ) ) ) OR !( in_array( \IPS\Request::i()->controller, array( 'system_app1', 'system_app2', 'system_app3', 'forums' ) ) OR in_array( \IPS\Request::i()->app, array( 'external_app1', 'external_app2') ) )}} {advertisement="ad_tag_adsense"} {{else}} {advertisement="ad_tag_other"} {{endif}}
-
thompsone reacted to ipbfuck in Exclude Ads from given forums/areas
i've simply add an id to ads, and removed with something like this: $( "#adsid" ).remove(); added only in page where i want remove (eg in a sidebar block)
imho, more simple
u can test in my laltroweb.it/tools/bugtrack/ page.
(ads in sidebar is removed here)!
regards...
-
thompsone got a reaction from nealtz in Exclude Ads from given forums/areas
Part of your solution is here: IPS Thread
I have personally battled with this and keeping Adsense happy is goal number one.
Now you'll have to combine that with a ELSE statement so if it doesn't show ads because it's excluded then show another ad. I'm not an expert but I imagine it would look something like this.
{{if ( \IPS\Request::i()->controller == 'forums' AND isset( \IPS\Request::i()->id ) AND ! in_array( \IPS\Request::i()->id, array( forum_id1, forum_id2, forum_id3, forum_id4 ) ) ) OR !( in_array( \IPS\Request::i()->controller, array( 'system_app1', 'system_app2', 'system_app3', 'forums' ) ) OR in_array( \IPS\Request::i()->app, array( 'external_app1', 'external_app2') ) )}} {advertisement="ad_tag_adsense"} {{else}} {advertisement="ad_tag_other"} {{endif}}