Back to vBulletin 4.x Add-ons

Block Google Adsense Ads on Error Pages & More by BOP5
Mod Version: 2.0.0, by BirdOPrey5

vB Version: 4.x.x Rating: (3 votes - 5.00 average) Installs: 12
Released: 31 Jan 2018 Last Update: 29 Mar 2018 Downloads: 51
Supported Uses Plugins Re-usable Code  

Brought to you by http://www.birdoprey5.com/mods/showthread.php/12449-Block-Google-Adsense-Ads-on-Error-Pages-mod-for-vBulletin-by-BOP5. (Formerly Qapla.com)

I have been made aware that vBulletin 3 and 4 Administrators who use Google Adsense ads in positions like the header, navbar, and/or footer are getting warnings from Google that ads are appearing on error pages (such as "No Permission" pages) which lack any real content, in violation of Adsense Terms of Service. Google threatens to suspend your Adsense account if this is not fixed.

Put simply this mod attempts to kill Adsense ads from loading in the easiest possible way.

When an error page is detected the plugin will search for the code "adsbygoogle.js" which all current Adsense ads call on to load. If found it will delete the filename so the file is never called by the browser and never loaded on the page, thereby preventing the Adsense Ads from showing.

If you find it useful please consider making a donation using the Support Developer option to the right of this post, below my avatar.

There are no real instructions and no options. Install the mod from Product Manager in the Admin CP and it is active. Disable the mod from Product Manager to turn it off or uninstall it to remove it. No permanent changes are made to your site or files.

This only works for Google Adsense. If there is demand I may be able to block ads from additional sources if you can provide me with sample ad code for those ad providers.

Should work on just about all versions of VB 3.8.x and 4.x.x and PHP 5 and 7 currently available. Tested on VB 4.2.5 and PHP 7.0.x.

2.0.0 Update

As of version 2.0.0 released 29th March 2018 you can now also specify a list of pages on which to block ads by going to Admin CP -> Settings -> Options -> Block Adsense Ads on Error Pages & More by BOP5. By default register and sendmessage (the Contact Us page) are on the block ads list.

------------------------------------------------------

Please "Mark as Installed" if you use this.

Download

File Type: %1$s product-bop5blockadserrorpages.xml (1.4 KB, 23 downloads)
File Type: %1$s product-bop5blockadserrorpages_v2.xml (2.9 KB, 39 downloads)

Similar Mods

Private Messages Enhancements PM Block by BOP5 (Private Message Block Lists per User) vBulletin 3.8 Add-ons
Private Messages Enhancements PM Block by BOP5 (Private Message Block Lists per User) vBulletin 4.x Add-ons
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024