Permanently Disable AdSense-Deluxe WordPress Plugin Reward Plugin Author Option

»»»Permanently Disable AdSense-Deluxe WordPress Plugin Reward Plugin Author Option
AdSense-Deluxe is a WordPress (works in WordPress 1.5 and 2.0 only, no longer updating) plug-in by Acme Technologies Zeitgeist which offers WordPress bloggers various advanced yet easy to use options for managing the automatic insertion of Google AdSense or Yahoo Publisher Network (YPN) ads code or any other JavaScript-based advertising networks’ ads code into your WordPress posts, and flexibly control when and where those ads are displayed inside the posts.

The AdSense-Deluxe plugin for WordPress has include a Reward Plugin Author option which if enabled and checked, will reward the AdSense-Deluxe plug-in author with approximately 5% of the AdSense and Yahoo! Publisher Network (YPN) ad impressions on your blog by replacing your AdSense client-ID or YPN ad partnet ID with author’s AdSense client-ID or author’s YPN publisher ID when the plugin process and insert your AdSense code or YPN ads code into the blog.

The option is disabled by default when you first activate the AdSense-Deluxe plugin. However, when the plugin insert the AdSense code or YPN code into the blog’s post or page, it doesn’t check for the Reward Author option setting to see if it’s enable or disable or whether it should replace the AdSense client-ID or YPN partner-ID beforehand. Thus, AdSense-Deluxe plugin will replace and change the AdSense client-ID or YPN ad partner-ID to author’s no matter what option the plugin users select for Reward Plugin Author setting.

The block of code that does the replacement of ads ID on the ads code and its conditions of checking that the plugin will check before it does the change is as following:

if( rand(0, 100) >= 95 && ! $EDITING_PAGE ){
if( is_single() || is_page() ){
$msg .= "\n"; //DEBUGGING
$subbed = preg_replace ( '/pub-[0-9]+/', $__ACMETECH_CLIENT_ID__, $subs );
$subs = preg_replace ( '/google_ad_channel *= *\"[^"]*\"/', 'google_ad_channel = "1478884331"', $subbed );
$subbed = preg_replace ( '/ctxt_ad_partner *= *\"[^"]*\"/', 'ctxt_ad_partner = "' . $__ACMETECH_AD_PARTNER__ . '"', $subs );
$subs = preg_replace ( '/ctxt_ad_section *= *\"[^"]*\"/', 'ctxt_ad_section = "20007"', $subbed );

}
}

The only conditions checked are if it’s actual posts or actual pages served to visitors and your ads will rotate with 6 out of 101 (5.94%) of the AdSense and YPN ads impressions will belong to author’s. Also change in the ads code are AdSense channel and Yahoo Publisher Network (YPN) ad section.

It’s a good idea to reward the plugin author for the hard-work and effort, but obviously the option the provided in the plugin itself is not functioning, and it may possibly cost the plug-in users some financial consequences. So to disable totally the reward author option, just comment out the four lines of code that do the replacement of IDs with //. You can edit the plugin by using Plug Editor in Plugins menu and then select Adsense-Deluxe. The new code should looks like this:

if( rand(0, 100) >= 95 && ! $EDITING_PAGE ){
if( is_single() || is_page() ){
$msg .= "\n"; //DEBUGGING
// $subbed = preg_replace ( '/pub-[0-9]+/', $__ACMETECH_CLIENT_ID__, $subs );
// $subs = preg_replace ( '/google_ad_channel *= *\"[^"]*\"/', 'google_ad_channel = "1478884331"', $subbed );
// $subbed = preg_replace ( '/ctxt_ad_partner *= *\"[^"]*\"/', 'ctxt_ad_partner = "' . $__ACMETECH_AD_PARTNER__ . '"', $subs );
// $subs = preg_replace ( '/ctxt_ad_section *= *\"[^"]*\"/', 'ctxt_ad_section = "20007"', $subbed );

}
}

Else, if you want to reduce the frequency and percentage of chance the Adsense-Deluxe plugin author’s impressions on your AdSense or YPN ads, just change the number 95 on the first line of code above to higher number between 96 and 100, where 100 will give the author’s IDs to appear 1 every 101 impressions in random, and 96 will be 5 out of 101, and so on.

By |2016-12-09T08:42:14+00:00December 9th, 2016|Categories: Advertising|Tags: , , |4 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.