Back to vBulletin 3.8 Template Modifications

Anti Adblock Message in Threads
Mod Version: v2.0024, by vijayninel

vB Version: 3.8.7 Rating: (2 votes - 5.00 average) Installs: 8
Released: 27 Nov 2011 Last Update: Never Downloads: 0
Not Supported Template Edits  

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.

Download

No files for download.

Similar Mods

Add-On Releases Vb Anti ADblock Alert Box vBulletin 4.x Add-ons
Add-On Releases Vbulletin Anti ADblock Alert Box Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024