Prevent adblockers on your site

by Hug - 23-01-2015, 04:55 AM
Closed Account
Posts:
2,770
Joined:
Jan 2015
Likes:
140
Credits:
1,402
Reputation:
26
2 Years of Service
#1
OP
Posted: 23-01-2015, 04:55 AM
Hello webmasters,
many of you are having ads on their site and need them to get the money for domain, hosting and other stuff.

However, there are people who do ignore that and use adblockers - they use your content but you will get nothing from them.

Here is a way for you to give access to your site only, when your ads are displayed too. If somebody has an adblocker active, he will not be able to browse your site until he deactivated it.

Does work for the following advertisers:

  1. Google Adsense
  2. Adscale
  3. Bin-Layer
  4. Mirando
  5. Mirago
  6. BitVertiser
  7. AdTiger

How to do it:
Open your Admin CP, go to templates and style -> templates.

In each theme you do use, open the templates and in the "ungrouped templates"-group find the template "headerinclude".

At the end of the template put this code:

Code:
<script type="text/javascript"><!--// www.antiblock.org Anti-Adblock-Script Version 1.3001
var ab=false;var ss=document.getElementsByTagName('script');for(var i=ss.length-1;i>=0;--i){var s=ss[i].src.substr(0, 20);switch(s){
case'http://bdv.bidvertis':if(typeof(report_error)=='undefined'){ab='BidVertiser'}break;
case'http://pagead2.googl':if(typeof(gaGlobal)=='undefined'){ab='Google Adsense'}break;
case'http://js.adscale.de':if(typeof(adscale)=='undefined'){ab='Adscale'}break;
case'http://bin-layer.de/':if(typeof(blLayer)=='undefined'){ab='Bin-Layer'}break;
case'http://get.mirando.d':if(typeof(Mirando)=='undefined'){ab='Mirando'}break;
case'http://intext.mirago':if(typeof(HLSysBannerUrl)=='undefined'){ab='Mirago'}break;
}if(ab)break;}if(ab){var db=document.body;db.style.margin=0;db.style.padding=0;db.innerHTML+='<div id="ablc" style="position:absolute;top:0px;left:0px;z-index:9998;width:100%;height:1000%;background:url(\'data:image/gif;base64,R0lGODlhAQABAPcAAAAAADMzM2ZmZpmZmczMzP///5lmZmYzM8yZmZkzM8xmZswzMzMAAGYAAJkAAMwAAAAAAP8zM/9mZv+Zmf/MzP8zAMwzAP9mM8xmM5kzAP+ZZv9mAJlmM8yZZmYzAMx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JBishzFmez5sHLli07JkoWKgGjmxkBplyYaJklShG8uGLXwlEwaqE6YrX24uvPFoZyhQlSopugBMaMFbQIYRy0ROHqdDi+BocEpQhaZimZTJe0dOkKFBPEhx7TcGDk9Q2h4AmPULkCA8FKw5nebik6hG45oBAFACXiA/f6KYcCpDkihLveQ9G4xCHjI+ffBUgHWzFZVPnRihk0dtcAp58iixqdNFgjiWKiZ5QnQM9bXBo1CHWyOHDg8xI73o6VTpEjzU5QaXQi1vV5o5cSRI0xjMR6JLh7a9Q21usD3m5+7I/+FyBITGGXS0VIlkzh1qdwwAxEId750uGEOmWDgl0ZSWOFpYMU178cgTjwMAyPKeOeWcQUMRUEBgE0Mv5LGFELWUUw6B8rjiQDkGuqOhMzYMgcQNJzBEhBxqWGEGNdh0s6F78rgXjzsMYoNNKiyYKEFTBtkShB1bVJFLNdVgM6M7owDwSjwMdnNNNdQ0UcMQRUSgEAt4bGEFJFRSc0025bhTGgALaFgONlReYwsHHxhhwSgFlaHGG0VCkw2S2JBpjjmlNPCKiOVkc82h14ThwQdIQKCXQNPEcIcWW1yBBi2rZLoKK6zUUksqtXCqSiqmlErIEB98MMQNJAykxBxbaGtxBRZUBBHED7juoAMOOOTAwq/AZoBBBh900MEGRkgQSz8QOKGHG9C2IW0X1GZhrRTYPqHtE0d0W8S34BZxQwjXfEOGEUuku4QS7LKbxLvwjiDvvCOIYO+9IkxwyoSy9OvvvwAHLLC/5fQTEAA7" height="29" width="35" alt="" border="0" style="position:relative;top:6px" /> <span style="font:bold 110% Verdana, Tahoma, Helvetica, Arial">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 /><div align="right"><a href="http://www.antiblock.org/?ab=' + escape(document.location.href) + '&ab=' + escape(ab) + '" style="font-size:12px">www.antiblock.org</a></div></span></div>';c(80,'ablc')};function c(o,id){var s=document.getElementById(id).style;s.opacity=(o/100);s.MozOpacity=(o/100);s.KhtmlOpacity=(o/100);s.filter='alpha(opacity='+o+')'}
//--></script>

Now only users who actually see your ads and do not have an adblocker activated will be able to access your site.

The full script and further information can be found at http://www.antiblock.org/

Best regards
ᶠᵃᵈʸ'ˢ ʷᵃᶦᶠᵘ
Posts:
542
Joined:
Jan 2015
Likes:
65
Credits:
501
Reputation:
37
2 Years of Service
#2
Posted: 23-01-2015, 06:54 AM
This is a great way to stop people using your website.
Faded is cute Heart
Closed Account
Posts:
2,770
Joined:
Jan 2015
Likes:
140
Credits:
1,402
Reputation:
26
2 Years of Service
#3
OP
Posted: 23-01-2015, 06:57 AM
(23-01-2015, 06:54 AM)Unsuspicious Wrote: This is a great way to stop people using your website.

:rly: I know. I don't use it I just shared it.
Closed Account
Posts:
41
Joined:
May 2015
Likes:
2
Credits:
22
Reputation:
0
2 Years of Service
#4
Posted: 11-06-2015, 01:21 PM
I added on headerinclude but not working
Suh Dude
Posts:
153
Joined:
Jun 2015
Likes:
3
Credits:
19
Reputation:
13
2 Years of Service
#5
Posted: 13-06-2015, 02:27 PM
Thank you Hug, for sharing this will come in handy!
In Love With Aoki ❦
Posts:
624
Joined:
Jun 2015
Likes:
48
Credits:
766
Reputation:
19
2 Years of Service
#6
Posted: 26-06-2015, 07:59 AM
Good post I support advertising and disable it for donators. It's a fair way to make money when you provide a service
Korekara Min na de Mitchek Sel do Savago
Prime
Posts:
212
Joined:
May 2016
Likes:
10
Credits:
29
Reputation:
3
1 Year of Service
#7
Posted: 13-12-2016, 08:10 AM
OP is banned, not working for me on 1.8.8 anyone can second this to be working?
Banned
Posts:
10
Joined:
Dec 2016
Likes:
0
Credits:
20
Reputation:
0
1/2 Year of Service
#8
Posted: 21-12-2016, 06:09 PM
Well I will try this soon. Thanks
Lurker
Posts:
3
Joined:
Dec 2016
Likes:
0
Credits:
5
Reputation:
0
1/2 Year of Service
#9
Posted: 25-12-2016, 03:01 PM
Thank you sir, this is really useful information..
Does it work on last version 1.8.9? Anyone test it?
Newbie
Posts:
15
Joined:
Jun 2017
Likes:
0
Credits:
15
Reputation:
0
#10
Posted: 22-06-2017, 12:28 PM
(13-06-2015, 02:27 PM)JMPRockFm Wrote: Thank you Hug, for sharing this will come in handy!
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)