Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

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
  #2  
Old 11-27-2011, 06:45 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
However these addons deny publishers revenue to operate their sites.
Actually they deny "publishers" using your system resources and feeding you potential adware, spyware, junkware and other crap. ABP is a blessing.
Reply With Quote
  #3  
Old 11-27-2011, 06:51 PM
vijayninel's Avatar
vijayninel vijayninel is offline
 
Join Date: Mar 2009
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Max Taxable View Post
Actually they deny "publishers" using your system resources and feeding you potential adware, spyware, junkware and other crap. ABP is a blessing.
You are free to block ads. Publishers are free to block content to you.

It takes money and effort for publishers to bring that content to you and ads pay for that. If it were not for the ads then you would be paying subscriptions for a lot of content.
Reply With Quote
  #4  
Old 11-27-2011, 07:04 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vijayninel View Post
You are free to block ads. Publishers are free to block content to you.

It takes money and effort for publishers to bring that content to you and ads pay for that. If it were not for the ads then you would be paying subscriptions for a lot of content.
"Publishers" do have the right to keep people off their site, that is for sure.
Reply With Quote
  #5  
Old 02-13-2012, 04:10 PM
rpgamersnet rpgamersnet is offline
 
Join Date: Jul 2004
Location: Canada
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Although I did run some google ads on my forum, I would never force my users to display them. ABP <3
Reply With Quote
Благодарность от:
Max Taxable
  #6  
Old 02-28-2012, 08:35 PM
owning_y0u owning_y0u is offline
 
Join Date: Dec 2008
Location: Netherlands
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rpgamersnet View Post
Although I did run some google ads on my forum, I would never force my users to display them. ABP <3

infact you cant force them :-P Google policy
Reply With Quote
  #7  
Old 02-29-2012, 10:34 AM
Zylantex Zylantex is offline
 
Join Date: Sep 2009
Location: France
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by owning_y0u View Post
infact you cant force them :-P Google policy
Google speak with forked tongue. They may say that out loud but inside they really want every ad to be seen by everybody.

Personally I think it's a great mod. I don't have any ads on my forum but if I did then I would use it.
Reply With Quote
  #8  
Old 04-11-2012, 08:32 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
Благодарность от:
Max Taxable
  #9  
Old 04-11-2012, 10:41 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by extreme-gaming 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.
Well whattya know.
Reply With Quote
  #10  
Old 04-12-2012, 01:30 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this on a test forum and I don't see any ads being displayed. Do you have screenshots of this mod displaying an actual ad?

That code might simply be sites that "Ad Block" is known to block and it may be testing if they are indeed blocked to determine of ad-block is running.

I didn't analyze the code but that is my theory since I'm not seeing any ads, just a message.
Reply With Quote
Reply

Thread Tools

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 02:21 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.06100 seconds
  • Memory Usage 2,335KB
  • Queries Executed 24 (?)
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
  • (6)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
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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