Additional Info
Type
Package ID
Ricky.:CensorAdsenseOnBadWords
First Created
August 06, 2011, 03:27:28 PM
Last Updated
September 04, 2011, 02:22:10 AM

Censor Adsense on Bad Words - Hide Advertisement on objectionable topics v1.0

Censor / Hide Adsense advertisements on topics with objectionable languge and bad words
Compatible With 2.0
Latest version v1.0
Downloads 1,330
Reviews 0
Rating 0/5
Subscribers 5
License (View License)
Author(s)
Censor Adsense on Bad Words
by Ricky.
For SMF 2.0, 2.0 RC5


Description


This mod allows you to check whether a topic is with objectionable words which may violate Google Adsense Policy. This mod gives ability to check using $context['ads_censor']. If condition is true, you should not show ad, if false, one can show ads.


Demo


Demo Coming soon

Installation


Simply install it via package manager and use it after modifying Administration settings. Give a comma separated list of words for which you do not want to display Ads.


Usage


This MOD will not do any visible change in your forum but actually provides $context['ads_cesnor'] variable, so on Thread Display or Topic View you can check whether $context['ads_censor'] is empty or not, you can add following in your Display.template.php 

Example

if(!empty($context['ads_censor']))
echo '<div> YOUR Advertisement / Adsense Code here</div>';

Practical Example


It can be useful in case where you have few topics those are against policy of your advertiser and instead of banning those words, topics, you want user to give full freedom of discussion yet don't want to violate Advertiser policy, then you can use this MOD to hide such ads only on those Topics automatically.

Screenshots




Version


1.1 beta


Changelog



1.1 beta : Improved search and also making it case-insensitive
1.0 beta : Initial release
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: