Log in

View Full Version : Forum Display Enhancements - Block AdBlock Plus (Kaos)


Kaosvf
12-04-2010, 10:00 PM
Block AdBlock Plus by Kaos

What is it?
This is a small mod that shows a MessageBox to all persons who use AdBlock Plus and block your advertising.

Install

1)
Upload the content (antiadblock.js) of compressed file (antiadblock.zip) in the main folder of your forum.

2)
Put this code at the bottom in Acp-> Styles & Templates-> Style Manager-> (your style)-> Common Templates-> headinclude:
<script type="text/javascript" src="antiadblock.js"></script>


3)
This is the code that you must put in Acp-> Styles & Templates-> Style Manager-> (your style)-> Common Templates-> footer:
<script type="text/javascript">
function DisableAdBlock() {
if ($('.AdSense').height() == 0)
alert("Please Disable AdBlock Plus");
}
$(DisableAdBlock);
</script>
Before this:
<div id="footer_copyright" class="shade footer_copyright">
You can modify to your liking the phrase "Please Disable AdBlock Plus".


4)
This is the code that you must put in Acp-> Advertising-> Manage Ads-> (for all your banners)
<div class="AdSense">
<!-- Advert code goes here -->
</div>




Tips:
-------------------------------------------------------------------
You can change this part of code as you prefer, it is javascript:
alert("Please Disable AdBlock Plus");
I suggest to redirect the user with AdBlock activated to another page immediately with this code:
location.href="usingadblock.html";
-------------------------------------------------------------------




Enjoy!

If you like it, please support me, click to mark as installed!

rajubd
12-05-2010, 09:26 PM
can it full block member viewing if they use adblocker?

lubbie
12-05-2010, 09:54 PM
Tagged. Will take a look 2morrow. Thanks was looking a long time for something like that

Kaosvf
12-05-2010, 09:56 PM
can it full block member viewing if they use adblocker?

You can change this part of code as you prefer, it is javascript:
alert("Please Disable AdBlock Plus");

I suggest to redirect the user with AdBlock activated to another page immediately with this code:
location.href="index.php";

OldSchoolDSL
12-05-2010, 09:57 PM
You currently have this modification tagged.

I will be watching this one very closely http://www.sociallyuncensored.com/forums/images/smilies/w00t.gif

FreshFroot
12-06-2010, 06:06 AM
Looks good, I know some sites that have this too.

Would you happen to make this mod for vB 3.8.x too?

Kaosvf
12-06-2010, 06:09 AM
This mod works for all sites, forums, blogs, etc.
Follow the steps and will work for vB 3.8.x too. :)

lubbie
12-06-2010, 02:15 PM
Works fine. the only Problem is, that u have to add this all the time u made an update/upgrade
And as we all know, this happens to often atm

Kaosvf
12-06-2010, 02:42 PM
Usually when I do an upgrade these templates are not restored, so the changes remain.

rajubd
12-06-2010, 02:49 PM
can you release it as product?

Kaosvf
12-06-2010, 03:15 PM
At the moment I can not do it as a product in the future but probably release it as such.

scottct1
12-06-2010, 07:34 PM
I would like to see this with an option added so that they only get nagged a few times a day instead of everytime a page loads.

I don't want to scare my users away but I would like to coax them into becoming a paying member to avoid all the ads. :)

Kaosvf
12-06-2010, 07:45 PM
that they only get nagged a few times a day instead of everytime a page loads.
o_o
I never thought a that thing

final kaoss
12-06-2010, 08:06 PM
You're not talking about a person, you are talking about at thing. Refer to it as such.

At the moment I can not do it as a product in the future but probably release it as such.

Kaosvf
12-06-2010, 08:15 PM
lol, thx for the correction, thread fixed.

final kaoss
12-09-2010, 11:56 PM
Think you can modify it a bit more? To where people using adblock plus can't see links and get informed that it's because they're using the adblock?

Kaosvf
12-10-2010, 11:06 AM
You can try to follow the Tip, however you can modify the code as you like because this is javascript

scottct1
12-16-2010, 05:04 PM
I would like to have this work so they only see the nag once per visit. (Or maybe have it only pop up on the main forums.php page...)

Any ideas on how to do that?

FreshFroot
12-24-2010, 07:13 AM
I would like to have this work so they only see the nag once per visit. (Or maybe have it only pop up on the main forums.php page...)

Any ideas on how to do that?
You can ONLY make that happen with two ways.

Either you need to track the user via cookie or user account.

The user account your guaranteed to be able to nag X times.

With cookies it's tough. Because if they clear them often then you have NO control over X nag times.

So you could run this based off adding a cookie

Razz
12-24-2010, 05:46 PM
Adblock users can block antiadblock.js to render this useless.

pmcnamara
01-06-2011, 06:25 PM
Is there a way that I can make it check the person's registration status before executing the script ?

We display ads to guests, not to members.

If a member has adblocker, I don't want to nag them.

scottct1
02-18-2011, 02:37 PM
How about making it so that it shows a bar on the top of the forum homepage only?

Anyway to do ths?

final kaoss
02-18-2011, 08:51 PM
Not if you embed it into the global template so that a .js file isn't called. That way, they would have to block global.php to prevent seeing it.

Adblock users can block antiadblock.js to render this useless.

lubbie
05-23-2011, 02:25 PM
Not working correctly if you edit a page

DNN
05-26-2011, 11:52 PM
Does this block your AdSense code from accidentally clicking on your own ads and generating impressions from you ?