Activity Stream
48,167 MEMBERS
6487 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 2 of 2
  1.     
    #1
    Member

    Default Detecting AdBlock Script?

    Does any one has a good way to detect adblock and deny access the visitors?

    This site >> http://adblockdetector.com/ is abit stupid, because they can't detect me using it.

    Someone over at DP has a good idea about chekcing the height within a DIV(where ads are), if the DIV height is 0 or etc. An error will show. This is the code, but i tried it and is not working. Can someone fix it?

    Code: 
    <div id="ads_left">
    <--ad code goes here-->
    </div>
    
    
    Now at the bottom of my site I put this script :
    
    <script type="text/javascript">
    var ads = new Array('ads_left');
    var msg = 'message goes here';
    
    onload=function() {
        for(i in ads){
            el = document.getElementById(ads[i]);
            if(el){
                if (el.offsetHeight == 0){
                    el.innerHTML = msg;
                }
            }
        }
    } 
    </script>
    kohkindachi Reviewed by kohkindachi on . Detecting AdBlock Script? Does any one has a good way to detect adblock and deny access the visitors? This site >> http://adblockdetector.com/ is abit stupid, because they can't detect me using it. Someone over at DP has a good idea about chekcing the height within a DIV(where ads are), if the DIV height is 0 or etc. An error will show. This is the code, but i tried it and is not working. Can someone fix it? <div id="ads_left"> <--ad code goes here--> </div> Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    You could check the DOM to see if the ad was added when the page has loaded. But if you're gonna block users who block adds the only thing you're gonna be doing is piss them off and they wont come back.

    Edit: this site has a neat little background when a user blocks adds http://cubeupload.com/ , I'd suggest doing something similar if you care about traffic at all.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with block - Adblock
    By kaylog in forum Wordpress
    Replies: 4
    Last Post: 8th Jun 2012, 02:10 PM
  2. Replies: 12
    Last Post: 13th Mar 2012, 02:23 PM
  3. How to block users with Adblock Plus?
    By Xali in forum Technical Help Desk Support
    Replies: 6
    Last Post: 7th Nov 2011, 06:19 AM
  4. Add-on for detecting CMS/Forums engine
    By Rapidshare in forum Tutorials and Guides
    Replies: 2
    Last Post: 18th Sep 2011, 02:06 PM
  5. Detecting and removing cashwhore spammers from your forum
    By NewEraCracker in forum Tutorials and Guides
    Replies: 21
    Last Post: 8th Apr 2011, 03:08 PM

Tags for this Thread

BE SOCIAL