vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Display Enhancements - Block AdBlock Plus (Kaos) (https://vborg.vbsupport.ru/showthread.php?t=254736)

Kaosvf 12-04-2010 10:00 PM

Block AdBlock Plus (Kaos)
 
1 Attachment(s)
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:
HTML Code:

<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:
HTML Code:

<script type="text/javascript">
        function DisableAdBlock() {
                if ($('.AdSense').height() == 0)
                        alert("Please Disable AdBlock Plus");
        }
        $(DisableAdBlock);
</script>

Before this:
HTML Code:

<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)
HTML Code:

<div class="AdSense">
<!-- Advert code goes here -->
</div>




Tips:
-------------------------------------------------------------------
You can change this part of code as you prefer, it is javascript:
HTML Code:

alert("Please Disable AdBlock Plus");
I suggest to redirect the user with AdBlock activated to another page immediately with this code:
HTML 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

Quote:

Originally Posted by rajubd (Post 2129782)
can it full block member viewing if they use adblocker?

You can change this part of code as you prefer, it is javascript:
HTML Code:

alert("Please Disable AdBlock Plus");
I suggest to redirect the user with AdBlock activated to another page immediately with this code:
HTML 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/fo...ilies/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

Quote:

Originally Posted by scottct1 (Post 2130148)
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.

Quote:

Originally Posted by Kaosvf (Post 2130064)
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

Quote:

Originally Posted by scottct1 (Post 2134915)
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.

Quote:

Originally Posted by Razz (Post 2138702)
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 ?


All times are GMT. The time now is 03:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01221 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete