Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Block Google Adsense Ads on Error Pages & More by BOP5 Details »»
Block Google Adsense Ads on Error Pages & More by BOP5
Version: 2.0.0, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 01-30-2018 Last Update: 03-28-2018 Installs: 12
Supported Uses Plugins
Re-useable 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. :up:

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

File Type: xml product-bop5blockadserrorpages.xml (1.4 KB, 20 views)
File Type: xml product-bop5blockadserrorpages_v2.xml (2.9 KB, 36 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Alan_SP, In Omnibus

Comments
  #12  
Old 06-22-2018, 09:10 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #13  
Old 04-05-2020, 03:59 PM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Is is possible to remove adsense "No Thread specified. If you followed a valid link, please notify the administrator" page ? Because deleted thread generate this error but adsense still show on that page.

Regards
Reply With Quote
  #14  
Old 04-27-2020, 03:51 PM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nobody ???
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 03:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04031 seconds
  • Memory Usage 2,261KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (2)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete