Re: Detect Adblock Plus?

Now, I get that users should have the ability to block annoying ads, but that's not me.

If I decide to include a few ads and IF they are of the type that gets blocked by Adblock, then I want to display some other appropriate content.

It's definitely detectable (although I don't know how it's technically done), because there are some scripts that do it. There is one Joomla plugin for it, but it doesn't do what I really want, which is the more granular control that MetaMod provides. http://extensions.joomla.org/extensions … ards/12598

Re: Detect Adblock Plus?

Hi,

I've had a look at some code suggested on the net for detecting adblock plus. It's along the lines of creating a javascript file that Adblock Plus would block. In that file there is a snippet of JS that hides the alternative content on screen.

I have deliberately avoided putting code into MetaMod that displays things to the end user apart from modules themselves, e.g. by adding JS code etc. I'm still not very keen to do it at this stage for architectural reasons, though I can see why you would want the ability to do this.

Anyway, the Joomla extension you linked to almost certainly does this.

What I'd suggest trying is this. You'll need to do some work with it, but I think you could get it to work:

1 - create a new module position perhaps just above or below the position that has your ad in it. This will contain your alternative content modules.
2- around the module position place a div with class="ffix"
3 - assign your "alternative content" module(s) to the new module position
4 - use a MetaMod to control whether/when the new modules appear or not
5 - create a file and save it in the root web folder of your joomla install. It should be accessible at the URL "http://www.mydomain.com/advertisement.js". Give it the following content: