![]() |
|
Mod Options |
![]() |
|||||||||||||||||||||||
Nag Users Using Ad Block - Popup Alert For Adblock Users
![]() Developer Last Online: Feb 2019 ![]() ![]() ![]()
First let me state that while I had used this for a while I have since turned it off. Personally I'd rather have the traffic then potentially lose someone who won't or can't figure out how to turn off Ad Block. That said, if you're interested, keep reading...
I've tested this on 3.8 but I'm very confident it will indeed work on 4.x as well, this is just javascript and doesn't tend to be affected by VB versions. I've also tested this on Firefox with Ad Block Plus and Chrome with it's Ad Block and both showed the alert. I've been told it also works with Safari ad-block but can't confirm since I can get ad-block for Safari to install... Download the .txt file for a backup of these instructions. This is a couple of fairly simple template edits. One thing you need to do before hand though is download the "jquery" library. jquery is set of advanced javascript functions freely available and distributed. It is use in many websites all over for advanced functionality. Download the latest copy HERE. Scroll down to "Current Release" (1.4.4 as of this writing) I suggest you download the "minified" version (smaller file size) Download it and then upload it to your forums /clientscript directory. Now go to your Admin CP -> Style Manager Go to "All Style Options" In the headinclude template scroll to the very bottom and add the following lines:
You must CUSTOMIZE the text in red. First set the path to the jquery file you uploaded, usually /forums/clientscript/ or simply /clientscript/ followed by the file name of the library you downloaded. The exact version may differ. Second customize your ALERT message. This text will appear in a standard javascript alert box with an [OK] button for the user to press to dismiss the box. THIS IS ANNOYING. Plus it will pop up again every time someone goes to a new page, so this is VERY ANNOYING. One more step... now you need to find an ad that is displayed on every page of your forum for every member... Personally for me it was the footer ad. You need to enclose this ad in a new <div> element. For me this was in my footer template.
It's very important you find an ad on every page for all members... if an ad doesn't appear due to the page it's on or due to the member/usergroup viewing it then the special <div> will have zero dimension and the alert will show for them. If you have pages or members ads are disabled for you should use the same <IF> conditionals around the headinclude code above to make sure this script doesn't run in those instances. The script at top is what matters here, the <div> can remain whether the top code is present or not, it won't hurt anything. Please Mark as Installed if you use this. ![]() There are some interesting things you can do by surrounding the <script> code in template conditions. For instance you can have the message show only when actually viewing a thread instead of on every single page by enclosing it in the following condition:
VB3 Users can find more Template Conditionals HERE. And VB4 User can look HERE. Download Now Only licensed members can download files, Click Here for more information. Screenshots Show Your Support
No members have liked this post.
|
![]() |
||||
Mod | Developer | Type | Replies | Last Post |
Board Optimization Adblock Alert | TheInsaneManiac | vBulletin 3.7 Add-ons | 3 | 17 Feb 2015 08:45 |
Comments |
#2
|
||||
|
||||
Reserved.
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#3
|
|||
|
|||
Do you have a sample forum where this is working? I visited your site, but it didn't display any messages in chrome or firefox?
--installed this on my test site... question: > any way to use ajax overlay instead of the popup, i'm wondering if this popup can be blocked as well as ads, leaving the user clueless to whats happened. ajax overlay might also look a little nicer, and allow for more customized messages. No members have liked this post.
Last edited by jayhawk785; 09 Dec 2010 at 16:05. |
#4
|
||||
|
||||
I don't have a demo because as I explained I found this too annoying to continue using, personally. I have it on my test board and I know it still works though. My live site doesn't have it installed so that's why you didn't get a message.
However... I think maybe I can work on a demo page to show it off without putting it into onto my other pages so I'll work on that and let you know if I get it up. As for an Ajax overlay I'm sure anything is possible but honestly I have no interest in going down that road at this point since I don't use it myself. This is marked as "re-usable code" so if someone else wants to develop it further they are welcome.
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#5
|
|||
|
|||
Thanks for the response. I was just thinking of a large corner diagonal banner in the upper right hand corner with an explanation for why it's there.. or just something that floats rather than pop up.
I installed this, so I know it works, just curious on other ways to be slightly less intrusive while still getting the point across ![]() No members have liked this post.
|
#6
|
||||
|
||||
I suppose with javascript there's a way to turn an existing <div> from invisible to visible and if that <div> has a message about ad blocking it would show instead of a popup... I really don't have time to play with it right now though.
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#7
|
|||
|
|||
The popup appears to me, even if the forum mentioned in the Whitelists.
No members have liked this post.
|
#8
|
||||
|
||||
Originally Posted by michael24179
It sounds like you don't have the <div> code around a valid ad...![]()
Is just an example if you used a footer banner in every page... you must put this code around an ad that will load every time.
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#9
|
|||
|
|||
In my footer that is the case inside
No members have liked this post.
|
#10
|
||||
|
||||
Please post the code in your Ad Location Templates -> ad_footer_start template. (all of it).
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#11
|
|||
|
|||
I have now inserted in ad_footer_start. I get the popup still does not matter whether adblocker off or on. The Microsoft Internet explorer I get the POPUP not!, only with Firefox
No members have liked this post.
|
#12
|
||||
|
||||
Again, please post the full contents of your ad_footer_start template- I can't help if I can't see the code.
![]() What advertising service do you use?
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
#13
|
|||
|
|||
No members have liked this post.
|
#14
|
|||
|
|||
HI I found the error
![]() No members have liked this post.
|
#15
|
||||
|
||||
Glad you got it working.
![]()
__________________
-Joe Former vBulletin.org Staff Member (@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org. BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic Note - I do not read my PMs often, do not expect quick replies. No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 01:19.