vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - [tk] Unblock (https://vborg.vbsupport.ru/showthread.php?t=207466)

hambil 03-04-2009 10:00 PM

[tk] Unblock
 
http://img23.imageshack.us/img23/1514/tkunblocklogo.gif

This mod forces users to disable ad blocking software for your site in order to view it. It gives them a nice message, in the style of your board.

Features
  • Blocks several common ad blockers, including AdBlock and AdBlock Plus for Firefox.
  • Uses your forums style and colors.
  • All messages can be customized.
  • Supports both full and partial blocking.
  • Integrates with Cyb - PayPal Donate.
  • Customizable by usergroup.

Upgrade
Uninstall the product-antiadblock.xml file from your admincp product manager, then follow the install instructions bellow.

Install
Unzip [tk] Unblock_1.5.1.zip
Upload the files in the upload directory to your forum folder.
Import the product-antiadblock.xml file from your admincp product manager.
By default all usergroups are set to 'no blocking'. Edit your usergroups to set them to the desired type of blocking (full or partial).

Uninstall
Uninstall the product-antiadblock.xml file from your admincp product manager.

Dependencies
This mod makes use of the Template Modification System.

To use it, install the Template Modification System first, then this mod.

Just in case you don't do that, and decide you want to after the fact, I've included a seperate templateedits-antiadblock.xml file you can import using the Template Modification System.

However, you can also manually add the $blockit variable to the bottom of the navbar, just above $ad_location[ad_navbar_below] if you wish not to use the Template Modification System.

Integrating with Cyb - PayPal Donate
When activated, and if the Cyb - PayPal Donate mod is detected, a customizable donate message and donate link are added to the ad blocking message box. Cyb - PayPal Donate can be configured to move a user to a new usergroup when they make a donation. Enable this ability, and move them to a group that has blocking set to 'no blocking'.

Donations (Thank you!):
Vitaly $50
Niber $30

hambil 03-05-2009 08:38 PM

Reserved

maryx 03-05-2009 08:45 PM

Can this be used for the Firefox adblocker add-on?

hambil 03-05-2009 08:55 PM

Quote:

Originally Posted by maryx (Post 1761356)
Can this be used for the Firefox adblocker add-on?

Yes

Sugoi na 03-05-2009 09:08 PM

Neat modification. Great idea. This however may make some members not want to join & also, some members on a forum may not even know how to disable their ads.

You may want to think about including links to other sites that give guides to removing ads.

hambil 03-05-2009 09:14 PM

Quote:

Originally Posted by Sugoi na (Post 1761371)
some members on a forum may not even know how to disable their ads.

Good point. I'll add some text about how to disable the most common blockers for a single site only. BTW: It's a phrase, so you can change the phrase text on your own assuming you know how to do that.

Doug Nelson 03-06-2009 01:01 AM

I don't know if I'm prepared for the firestorm of complaints a plugin like this would generate for me, but I'd definitely find it helpful if it could display how many users it would block if turned on. That would give me a guestimate of the revenue I'm losing, and I could more easily calculate if it's worth the inevitable grief I'd get for turning it on.

hambil 03-06-2009 01:19 AM

Nice idea - collecting some stats. I'll add that. I'm also working on adding support to enable or disable by usergroup, and integration with Cyb - Paypal Donate (show a 'donate to re-enable adblock' link in the message).

petacat 03-06-2009 03:18 AM

Quote:

Originally Posted by hambil (Post 1761490)
Nice idea - collecting some stats. I'll add that. I'm also working on adding support to enable or disable by usergroup, and integration with Cyb - Paypal Donate (show a 'donate to re-enable adblock' link in the message).

I think that is a great idea. I will wait for that and then install, I think. Good work and thanks.
May I also suggest that you give some less "aggressive" options. There might be some good reasons to block popups but require display of inline ads.

Doug Nelson 03-06-2009 04:45 AM

The usergroup idea is great, having this only enabled for guests might actually drive up registration.

I also like the idea of a less aggressive option, perhaps not refusing entry to the site but just displaying a message only to adblock users.

bhanuprasad1981 03-06-2009 05:44 AM

maybe a simple message will be nice :D
" hello Guest many features has been disabled for you on this site since you are using ad blocking script/ plugin"

hambil 03-06-2009 05:52 AM

I think a less aggressive option is also a good idea, and have added it to the list. It would work (potentially well) with the paypal donation integration.

hambil 03-06-2009 06:00 AM

Quote:

Originally Posted by bhanuprasad1981 (Post 1761604)
maybe a simple message will be nice :D
" hello Guest many features has been disabled for you on this site since you are using ad blocking script/ plugin"

Something like that already exists Limited Guest Viewing -- Motivate Guests to Register. But I will look into integrating with it so this mod can enable or disable it based on ad blocking.

hscorp 03-06-2009 12:37 PM

nice code man

also i need it to site can u tell me a source to code it by my self to my site? or any lil tips?

tansu 03-06-2009 01:33 PM

It says "Please disable adblock " but I dont have an adblock..

Sugoi na 03-06-2009 02:10 PM

Quote:

Originally Posted by tansu (Post 1761774)
It says "Please disable adblock " but I dont have an adblock..

Your browser does if your computer doesn't.

hambil 03-06-2009 03:06 PM

Update with may new and requested features.

quasan 03-06-2009 04:26 PM

mmh doesn't work for me, because of a js-error

Code:

missing ; before statement
aab_div.innerHTML='<table class....


hambil 03-06-2009 06:14 PM

What browser?

hambil 03-06-2009 06:18 PM

And did you change the default messages? If there are errors in your html in the messages it could cause problems.

hambil 03-06-2009 06:29 PM

I think in the next version I'll install some validation and checks on the input HTML to make sure it won't cause problems.

Cybertims 03-06-2009 08:26 PM

it's calling adframe.js which doesnt exist.....

tansu 03-06-2009 08:29 PM

Quote:

Originally Posted by Sugoi na (Post 1761798)
Your browser does if your computer doesn't.

Nope, I am very against to adblockers...

hambil 03-06-2009 08:43 PM

Quote:

Originally Posted by Cybertims (Post 1762024)
it's calling adframe.js which doesnt exist.....

AH CRAP! How did I forget that!? :eek:

It's corrected now. Thank you!

quasan 03-07-2009 11:22 AM

Quote:

Originally Posted by hambil (Post 1761932)
And did you change the default messages? If there are errors in your html in the messages it could cause problems.

yep now it works, but your script is very picky;) about the html. I wanted to include an image in the "Partial Site Block Message"-Box, but everytime I tried, the js error occured. In the "Disable Instructions"-Box the html for the image worked

hambil 03-07-2009 11:33 AM

Quote:

Originally Posted by quasan (Post 1762408)
yep now it works, but your script is very picky;) about the html. I wanted to include an image in the "Partial Site Block Message"-Box, but everytime I tried, the js error occured. In the "Disable Instructions"-Box the html for the image worked

Yeah, I've been thinking on this. It's a rather tricky issue actually, but I have some ideas. :) Glad you got it working.

Doug Nelson 03-08-2009 10:43 PM

I installed this, enabled it for unregistered users, logged out, turned on adblock plus, and noticed no difference. It still blocked the ads, but I saw no sign this plugin was functioning.

I uploaded the .js file to the forum directory and manually added the variable to the navbar template. I'm using vb3.8.1 with vbseo (that's the only variable I can think of that might interfere).

hambil 03-09-2009 12:13 AM

Quote:

Originally Posted by Doug Nelson (Post 1763549)
I installed this, enabled it for unregistered users, logged out, turned on adblock plus, and noticed no difference. It still blocked the ads, but I saw no sign this plugin was functioning.

I uploaded the .js file to the forum directory and manually added the variable to the navbar template. I'm using vb3.8.1 with vbseo (that's the only variable I can think of that might interfere).

I use Zoints, so I don't think SEO is an issue.

Hmmm - tested it - It does not work guests/logged out users. I will get that fixed. Thanks.

Sp32 03-09-2009 12:35 AM

Is it okay to install now? I think this mod is a great idea and want to know if it will work fine at this present time?

hambil 03-09-2009 12:48 AM

It works fine, just not for guests/logged out users. It doesn't cause an error, it just does nothing for them. That will be fixed sometime soon probably, so you can wait if you want, or upgrade.

gmerin 03-09-2009 01:13 AM

I'd like my users to stay; this will cause them to leave.

Sp32 03-09-2009 02:38 AM

Quote:

Originally Posted by gmerin (Post 1763647)
I'd like my users to stay; this will cause them to leave.

stop hating he made this in his free time for other people to use so be grateful there are people like him



I just installed thanks for this hopefully people will start clicking :)

in the future is it possible you could do basically the exact same as this but still let guests browse? - just an idea

edit: its not working for some reason but I think it might be to do with ad block not working, I blocked the google adsense iframe but nothing changed, am I meant to do something with templateedits-antiadblock.xml?

also is the js file definately meant to be in the forums root.

hambil 03-09-2009 03:17 AM

Quote:

Originally Posted by Sp32 (Post 1763691)
stop hating he made this in his free time for other people to use so be grateful there are people like him



I just installed thanks for this hopefully people will start clicking :)

in the future is it possible you could do basically the exact same as this but still let guests browse? - just an idea

edit: its not working for some reason but I think it might be to do with ad block not working, I blocked the google adsense iframe but nothing changed, am I meant to do something with templateedits-antiadblock.xml?

also is the js file definately meant to be in the forums root.

The js file needs to be in forum root, yes. It's just a harmless empty file.

You need to have the variable $blockit at the bottom of your navbar template. If you have the Template Modification System mods installed before you install this product, it will be done automatically for you. Otherwise you can add it manually, or installed the Template Modification System and then use it to import the templateedits-antiadblock.xml file. I hope this helps.

Doug Nelson 03-09-2009 04:29 AM

Glad it's a bug (ie: fixable) and not something in my configuration.

Quick question: does this follow the conventions of vb's secondary usergroup handling? That is, if I have it enabled for one primary group, but a member also belongs to a secondary group with this disabled, will it then be disabled for that user? I hope so, as I currently block ads for paying users via a secondary usergroup, so I'd like those same paying members to have this plugin disabled for them.

hambil 03-10-2009 02:44 AM

Quote:

Originally Posted by Doug Nelson (Post 1763758)
Glad it's a bug (ie: fixable) and not something in my configuration.

Quick question: does this follow the conventions of vb's secondary usergroup handling? That is, if I have it enabled for one primary group, but a member also belongs to a secondary group with this disabled, will it then be disabled for that user? I hope so, as I currently block ads for paying users via a secondary usergroup, so I'd like those same paying members to have this plugin disabled for them.

It just checks the usergroup permissions as reported by vbulletin, so I would assume it should work just like anything else.

Doug Nelson 03-11-2009 07:04 PM

Quote:

Originally Posted by hambil (Post 1763601)
Hmmm - tested it - It does not work guests/logged out users. I will get that fixed. Thanks.

Any progress on this?

hambil 03-11-2009 07:42 PM

I'm juggling three mods all in need of an update release. But it will be done within the next 24 hours I'd guess.

Doug Nelson 03-12-2009 12:13 AM

Quote:

Originally Posted by hambil (Post 1765960)
I'm juggling three mods all in need of an update release. But it will be done within the next 24 hours I'd guess.

Cool. Thank you for the time and effort you're putting into this excellent mod.

joopster 03-13-2009 12:40 AM

Doesn't work for me 3.8

Have the .js in the right spot and usergroup permissions set.

hambil 03-13-2009 03:06 AM

What site?


All times are GMT. The time now is 04:58 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.01668 seconds
  • Memory Usage 1,829KB
  • 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
  • (1)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete