Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Anti Adblock Message in Threads Details »»
Anti Adblock Message in Threads
Version: v2.0024, by vijayninel vijayninel is offline
Developer Last Online: Sep 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.7 Rating:
Released: 11-26-2011 Last Update: Never Installs: 8
Template Edits
 
No support by the author.

Ad blocking plugins like Adblock Plus are one of the most popular addon fors browsers today. However these addons deny publishers revenue to operate their sites.

One way to force users to disable Adblock is to deny them site content until they disable adblock. The following template modification is the vBulletin implementation for the antiblock script from http://antiblock.org/ . This script will prevent users from viewing thread content and ask them to disable Adblock.

Implementing this hack is very easy. In your style manager select the style that you are using and open

Show Thread Templates > SHOWTHREAD

In showthread go to the bottom of the page and just before

HTML Code:
</body>
</html>
Paste the following code.

HTML Code:
<style>#u539880{position:fixed!important;position:absolute;top:0;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0;width:100%;height:100%;background-color:#fff;-moz-opacity:0.9;-khtml-opacity:0.9;filter:alpha(opacity=90);opacity:0.9}#u539880 p{-moz-opacity:1;-khtml-opacity:1;filter:none;opacity:1;font:bold 16px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#u539880 p a,#u539880 p i{font-size:12px}</style><noscript><style>html,body{margin:0;padding:0;height:100%}</style><div id=u539880><p>Please enable JavaScript!<br>Bitte aktiviere JavaScript!<br>S'il vous pla&icirc;t activer JavaScript!<br>Por favor,activa el JavaScript!<br><a href="http://antiblock.org/">antiblock.org</a></p></div></noscript><script>(function(){function a(a){if(c){return}c=1;d.body.innerHTML+='<style>html,body{margin:0;padding:0;height:100%}</style><div id=u539880><p>Please disable your ad blocker!<br>Bitte deaktiviere Deinen Werbeblocker!<br>Veuillez d&eacute;sactiver votre bloqueur de publicit&eacute;!<br>Por favor, desactive el bloqueador de anuncios!<br><a href="http://antiblock.org/?d=2.0024'+')$('+escape(a)+')$('+t+'">antiblock.org</a> <i>v2.0024</i></p></div>'}function $(a){return d.getElementById(a)}function r(a){return Math.floor(Math.random()* a)}var w=window,d=document,u='undefined',s='',c,t=2000,U=['adireland.com','baronsoffers.com','boo-box.com','as.devbridge.com','break.com/ads/preroll/','images.mylot.com','themes420.com/bnrsbtns/','loveme.com','johnbridge.com/vbulletin/images/tyw/cdlogo-john-bridge.jpg','madskristensen.net/discount2.js'],l=U.length,I=['AdServer','HeaderAdsBlock','VM-footer-adspace','ads728bottom','adtxt','header-advertisement','spotlightad','textAd','video_overlay_ad','whoisRightAdContainer'],L=I.length,P=document.getElementsByTagName('img'),p=['ad&program=revshare&','.net/ads/','/adpeeps/ad','/adrotate/ad','/bigad.','/dcloadads/ad','/linkedads/ad','/premium_ad.','/top-ad-','/top728.html'],b,j='',S=d.getElementsByTagName('script'),i;for(i=0;i<L;i++){if(!$(I[i])){s+='<a id="'+I[i]+'"></a>'}}d.body.innerHTML+=s;setTimeout(function(){for(i=0;i<L;i++){s=$(I[i]);if(s.offsetParent==null||(w.getComputedStyle?d.defaultView.getComputedStyle(s,null).getPropertyValue('display'):s.currentStyle.display)=='none'){a('#'+I[i])}}b=r(P.length-1);if(typeof P[b].src!=u){s=new Image();s.onload=function(){s=new Image();s.onerror=function(){a(b)};b=P[b].src+(P[b].src.indexOf('?')==-1?'?':'&')+p[r(p.length-1)];s.src=b};s.src=P[b].src}for(i=S.length-1;i>=0;--i){if(S[i].src){j=S[i].src.substr(7,20);s={'js.adscale.de/getads':'adscale','view.binlayer.com/ad':'blLayer','www.sponsorads.de/sc':'preferrer','get.mirando.de/miran':'Mirando','bdv.bidvertiser.com/':'report_error','ads.adtiger.de/adscr':'adspirit_pid','www.contaxe.com/go/g':'HLSysBannerUrl','ads.w3hoster.de/adsi':'w3Fixv','exchangecash.de/laye':'excash_scriptloaded'};if(typeof s[j]!=u&&typeof w[s[j]]==u){a(j+':'+s[j])}}}try{s=new XMLHttpRequest()}catch(e){s=0}if(s){try{for(i=0;i<l;i++){s.open('GET','http://'+U[i],true)}}catch(e){if(typeof e=='object'&&e.message.substr(0,9)=='Component'){a(U[i]+e.message)}}}},t)})();</script>
That's it.

The code is for v2.0024 and may be updated as adblock develops countermeasures for it.

To further customise the script please see this link. http://antiblock.org/?p=script

Demo: http://antiblock.org/?p=script&demo

Please click install if you want info on updates.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
CarpCharacin

Comments
  #12  
Old 07-14-2012, 03:30 PM
vijayninel's Avatar
vijayninel vijayninel is offline
 
Join Date: Mar 2009
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
Thanks it's working pretty good. (using vb4).

Had a look at the code and it looks like he's putting his own ads there. A big hell no in my book. Disabled until I remove this crap out of it.
What utter nonsense. There are no ads of anyone there and anyone is welcome to verify it. Remove the crap from your head first.
Reply With Quote
  #13  
Old 09-18-2012, 01:42 AM
rockerzteam rockerzteam is offline
 
Join Date: Sep 2009
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
Thanks it's working pretty good. (using vb4).

Had a look at the code and it looks like he's putting his own ads there. A big hell no in my book. Disabled until I remove this crap out of it.

Code:
<style>#u539880{position:fixed!important;position:absolute;top:0;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0;width:100%;height:100%;background-color:#fff;-moz-opacity:0.9;-khtml-opacity:0.9;filter:alpha(opacity=90);opacity:0.9}#u539880 p{-moz-opacity:1;-khtml-opacity:1;filter:none;opacity:1;font:bold 16px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#u539880 p a,#u539880 p i{font-size:12px}</style><noscript><style>html,body{margin:0;padding:0;height:100%}</style><div id=u539880><p>Please enable JavaScript!<br>Bitte aktiviere JavaScript!<br>S'il vous pla&icirc;t activer JavaScript!<br>Por favor,activa el JavaScript!<br><a href="http://antiblock.org/">antiblock.org</a></p></div></noscript><script>(function(){function a(a){if(c){return}c=1;d.body.innerHTML+='<style>html,body{margin:0;padding:0;height:100%}</style><div id=u539880><p>Please disable your ad blocker!<br>Bitte deaktiviere Deinen Werbeblocker!<br>Veuillez d&eacute;sactiver votre bloqueur de publicit&eacute;!<br>Por favor, desactive el bloqueador de anuncios!<br><a href="http://antiblock.org/?d=2.0024'+')$('+escape(a)+')$('+t+'">antiblock.org</a> <i>v2.0024</i></p></div>'}function $(a){return d.getElementById(a)}function r(a){return Math.floor(Math.random()* a)}var w=window,d=document,u='undefined',s='',c,t=2000,U=['adireland.com','baronsoffers.com','boo-box.com','as.devbridge.com','break.com/ads/preroll/','images.mylot.com','themes420.com/bnrsbtns/','loveme.com','johnbridge.com/vbulletin/images/tyw/cdlogo-john-bridge.jpg','madskristensen.net/discount2.js'],l=U.length,I=['AdServer','HeaderAdsBlock','VM-footer-adspace','ads728bottom','adtxt','header-advertisement','spotlightad','textAd','video_overlay_ad','whoisRightAdContainer'],L=I.length,P=document.getElementsByTagName('img'),p=['ad&program=revshare&','.net/ads/','/adpeeps/ad','/adrotate/ad','/bigad.','/dcloadads/ad','/linkedads/ad','/premium_ad.','/top-ad-','/top728.html'],b,j='',S=d.getElementsByTagName('script'),i;for(i=0;i<L;i++){if(!$(I[i])){s+='<a id="'+I[i]+'"></a>'}}d.body.innerHTML+=s;setTimeout(function(){for(i=0;i<L;i++){s=$(I[i]);if(s.offsetParent==null||(w.getComputedStyle?d.defaultView.getComputedStyle(s,null).getPropertyValue('display'):s.currentStyle.display)=='none'){a('#'+I[i])}}b=r(P.length-1);if(typeof P[b].src!=u){s=new Image();s.onload=function(){s=new Image();s.onerror=function(){a(b)};b=P[b].src+(P[b].src.indexOf('?')==-1?'?':'&')+p[r(p.length-1)];s.src=b};s.src=P[b].src}for(i=S.length-1;i>=0;--i){if(S[i].src){j=S[i].src.substr(7,20);s={'js.adscale.de/getads':'adscale','view.binlayer.com/ad':'blLayer','www.sponsorads.de/sc':'preferrer','get.mirando.de/miran':'Mirando','bdv.bidvertiser.com/':'report_error','ads.adtiger.de/adscr':'adspirit_pid','www.contaxe.com/go/g':'HLSysBannerUrl','ads.w3hoster.de/adsi':'w3Fixv','exchangecash.de/laye':'excash_scriptloaded'};if(typeof s[j]!=u&&typeof w[s[j]]==u){a(j+':'+s[j])}}}try{s=new XMLHttpRequest()}catch(e){s=0}if(s){try{for(i=0;i<l;i++){s.open('GET','http://'+U[i],true)}}catch(e){if(typeof e=='object'&&e.message.substr(0,9)=='Component'){a(U[i]+e.message)}}}},t)})();</script>
Don't you just love snakes like that..... Trying to make a buck off your forum for free.
Reply With Quote
  #14  
Old 09-18-2012, 01:46 AM
rockerzteam rockerzteam is offline
 
Join Date: Sep 2009
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to add another thing. I have been using ABP for awhile now and have noticed it even blocks people images on there custom themes.

Nice going to forums and you cant even see there icons next to thread categories.
Reply With Quote
  #15  
Old 09-18-2012, 03:27 AM
vijayninel's Avatar
vijayninel vijayninel is offline
 
Join Date: Mar 2009
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rockerzteam View Post
Don't you just love snakes like that..... Trying to make a buck off your forum for free.
Surely a snake will be much more intelligent than you.
Reply With Quote
  #16  
Old 09-18-2012, 12:01 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rockerzteam View Post
Don't you just love snakes like that..... Trying to make a buck off your forum for free.
There are no hidden ads in this product.
Reply With Quote
  #17  
Old 10-05-2012, 12:17 AM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to change info to other language ?
Reply With Quote
  #18  
Old 11-06-2012, 06:13 PM
emp1re emp1re is offline
 
Join Date: Jan 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When we activate it in VB4.20 PL3 the quick reply doesnt work..
It says we did not typed enough characters (message needs more than 1 character) .

Complete message not enough characters.

How can we resolve this ?
Reply With Quote
  #19  
Old 11-06-2012, 07:56 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tested the demo site with noscript and adblock enabled, even after deactivating both, I could not get rid of the overlay. What may causing this and are you using the exact same code in your mod?
Reply With Quote
  #20  
Old 11-13-2012, 02:27 PM
Budget101 Budget101 is offline
 
Join Date: Jul 2008
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mod does not work with "Do Not Track Plus"
Reply With Quote
  #21  
Old 03-09-2013, 09:31 PM
Midohash's Avatar
Midohash Midohash is offline
 
Join Date: Aug 2010
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent and easy to install hack ... tested on chrome ... Installed ... Many thanks
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 08:46 AM.


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.05314 seconds
  • Memory Usage 2,342KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete