Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Block Google Adsense Ads on Error Pages & More by BOP5 Details »
Block Google Adsense Ads on Error Pages & More by BOP5
Mod Version: 2.0.0, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Nov 2018 I like it Show Printable Version Email this Page

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

Brought to you by BirdOPrey5.com. (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 Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Private Messages Enhancements PM Block by BOP5 (Private Message Block Lists per User) BirdOPrey5 vBulletin 3.8 Add-ons 38 03 Nov 2014 22:55
Private Messages Enhancements PM Block by BOP5 (Private Message Block Lists per User) BirdOPrey5 vBulletin 4.x Add-ons 31 11 Oct 2013 00:20
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) The M.I.P. vBulletin 3.5 Add-ons 600 25 Apr 2012 09:45

Comments
  #2  
Old 31 Jan 2018, 17:56
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Reserved.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #3  
Old 31 Jan 2018, 19:07
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Quickly tested, everything works as it should, ads are blocked.
Reply With Quote
  #4  
Old 01 Feb 2018, 13:01
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Works just fine out of the box on error pages.

What about pages like Settings or Private Messages? Shouldn't those also be blocked, technically?
Reply With Quote
  #5  
Old 01 Feb 2018, 18:35
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Private Messages are content. It doesn't need to be public content to qualify to have ads. But the settings pages, registration pages, some others, probably could be added.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #6  
Old 10 Feb 2018, 06:01
unitedpunjab's Avatar
unitedpunjab unitedpunjab is offline
 
Join Date: Feb 2006
Real name: Dhillon
I have a feature request.

Starting February 15 " Chrome will remove all ads from sites that have a "failing" status in the Ad Experience Report"

https://developers.google.com/web/up.../12/better-ads

One of the violation is "30%" rule.

https://www.betterads.org/mobile-ad-...igher-than-30/

I am worried about threads with short single posts.

Could it be possible to remove ads on threads with thin content ?
less than x words ?
Reply With Quote
  #7  
Old 21 Mar 2018, 16:59
kai_sey kai_sey is offline
 
Join Date: Nov 2007
Thanks for this mod - nice to see some awesome coders here still supporting vb3.8x.

Any chance you can also incorporate the sendmessage.php page into your mod to disable Adsense there?

Since, I just got an email from Google telling me:

"This is a warning message to alert you that there is action required to bring your AdSense account into compliance with our AdSense program policies. We've provided additional details below, along with the actions to be taken on your part... Example page where violation occurred: https://www.domain.com/forums/sendmessage.php

Action required: Please make changes immediately to your site to follow AdSense program policies.
Would really appreciate it!
Reply With Quote
  #8  
Old 22 Mar 2018, 19:14
spipo spipo is offline
 
Join Date: Mar 2006
it doesnt works on vb 4 . i can still see adsense showing on deleted posts

edite : Sorry . it works fine . juts I had adsense integrated with DFP . so it doesnt included that code . so i changed it with another 'name'


BTW : anyway to integrate this plugin with other pages : like /sendmessage.php /private.php ..ect ?


Thanks
__________________
Akhbarona | arcade 7

Last edited by spipo; 22 Mar 2018 at 19:25.
Reply With Quote
  #9  
Old 29 Mar 2018, 20:37
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Version 2.0 released, allows blocking of specific pages using their THIS_SCRIPT constant. Setup to block by default on register and sendmessage pages. (sendmessage is the "contact us" page.)

If this mod is helping your site place consider making a donation using the "Support Developer" link below the Avatar in the first post.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #10  
Old 21 Jun 2018, 03:20
kingMOB kingMOB is offline
 
Join Date: Nov 2007
Thanks BirdOPrey5.

Any chance of expanding the plugin and include DFP and an option to block ads before some date based on the last post of a thread?
Reply With Quote
  #11  
Old 22 Jun 2018, 12:10
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
For DFP can you post the javascript you need to add to your template to make it work?

For disabling based on date of last post in a thread would be more difficult but probably possible. Just not sure I understand the logic why anyone would need/want that feature?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:01.

Layout Options | Width: Wide Color: