Jaxel's Implementation of Ad Block Detection

Jaxel's Implementation of Ad Block Detection

Hi @Jaxel, the new Adsense code seems to have a problem with this setup. Both the ads and the adblock notice showed up simultaneously at times but not everytime. I was able to solve it by using their 'Advanced' code. All is working well now.
 
how would i implement this into the "Ad Sense" block that comes with your "xenporta" I am currently using xenporta 1.5.8
 
Hi @Jaxel, the new Adsense code seems to have a problem with this setup. Both the ads and the adblock notice showed up simultaneously at times but not everytime. I was able to solve it by using their 'Advanced' code. All is working well now.
I had the same problem and I already used 'Advanced' code. The solution that I found is change on javascript gived by Jaxel, $(document).ready to $(window).load .
 
This doesn't seem to work with FF26 and Ad Block Plus. It shows both the advert and the message. Trying to figure out the issue just now.

http://grab.by/u0AM

I had the same problem and I already used 'Advanced' code. The solution that I found is change on javascript gived by Jaxel, $(document).ready to $(window).load .


I'm having the same problem but with the latest version of internet explorer.
http://prntscr.com/3b9dlj

Works fine with both Chrome and Firefox.
Why can't people just stop using IE? Would make life so much better.

Anyone have a fix?
 
Last edited:
I know where to put the html(ad_) and the css(extra.css) but what about the javascript, I tested this on my local and the javascript text just shows as text if I put it in template.
 
I know where to put the html(ad_) and the css(extra.css) but what about the javascript, I tested this on my local and the javascript text just shows as text if I put it in template.
I struggled getting this to work, I put my javascript in a <script></script> inside the ad_ file at the top.

Would be better if there were clearer examples, I'm pretty confused.
 
I know where to put the html(ad_) and the css(extra.css) but what about the javascript, I tested this on my local and the javascript text just shows as text if I put it in template.

I struggled getting this to work, I put my javascript in a <script></script> inside the ad_ file at the top.

Would be better if there were clearer examples, I'm pretty confused.

the most people of xenforo don't know how to use this parts of scripts...
why there is no example how to use it ??? o_O

Anyone care to explain to us?
 
Anyone care to explain to us?

Code:
<div class="blockContainer">
    <div class="adContainer">
        <!-- ADSENSE CODE --> Replace with your adsense
    </div>

    <div class="noticeContainer hidden">
        <div class="head">Oh man! Ad-blocking software has been detected! :'(</div>
        <div class="foot">
            This website is run by the community, for the community... and it needs advertisements in order to keep running.<br />
            Please disable your ad-block, or <b><a href="http://www.8wayrun.com/threads/4587/">become a premium member</a></b> to hide all advertisements and this notice.
        </div>
    </div>
</div>

<xen:require css="name_you_want.css" />
<xen:require js="js/xenforo/name_you_want.js" />

If you have ftp access make a .js file in that path or a path that fits your needs. Or locally create a template named name_you_want.js

Depending on where you wish to show <xen:include template="name_you_want" />
example I used PAGE_CONTAINER may differ per each style.
 
Simplest way of using this is via widget_framework... Create a HTML widget & use all html, css & js in same widget. Place your widget at any location using template hooks. That's all.
 
Hey guys ! I do the tutorial but nothing appear on my website, not sure why :

18fb75ea7cafbf4798ab981283f96fa2.png

I'm not an expert in dev', so i hope one guy better than me could explain to me why it's not work ^^ Thank you guys ! Nice helping ! :D
 
Hi @Jaxel , looks a great modifcation, unfortunately I haven't been able to get it firing, think I've fallen down on the javascript.
Would you (or anyone else) be willing to install for me for a fee?

Thanks.
 
Top Bottom