AdBlock Plus Detector phpbb3

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
coolsitebro
Registered User
Posts: 11
Joined: Wed Jan 27, 2010 6:59 am

AdBlock Plus Detector phpbb3

Post by coolsitebro »

Nothing is more annoying than people blocking ads.
I found this code that detects adblock plus but where do i put it?

http://adblockdetector.com/ this is where i want the code to go www.1thread1day.com

the code is

Code: Select all

<script type="text/javascript">
function _enabled() {
    alert('detected');
}
function _disabled() {
    alert('not detected');
}
var _abdDetectedFnc = '_enabled';
var _abdNotDetectedFnc = '_disabled';
</script>
 
<script type="text/javascript" src="http://adblockdetector.com/script.php"></script>
does it go on index_body.html? if so where?

and is there a way to block people off the site if they enable adblock plus?

thanks yo
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: AdBlock Plus Detector phpbb3

Post by ric323 »

coolsitebro wrote:Nothing is more annoying than people blocking ads.
Really? I can think of lots of things that are more annoying than that... ;)
I found this code that detects adblock plus but where do i put it?
Probably in your overall_header.html file if you want it active on every page.
and is there a way to block people off the site if they enable adblock plus?
if you are detecting it in Javascript, then I guess you could redirect them to another page explaining why they can't see your board.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Re: AdBlock Plus Detector phpbb3

Post by ToonArmy »

coolsitebro wrote:and is there a way to block people off the site if they enable adblock plus?
You could send a request back to the server marking the session as having adblock installed and thus hiding content, or something of the sorts.

On a side note thanks for showing me this, I've now blocked the script in adblock.
Chris SmithGitHub
Locked

Return to “[3.0.x] Support Forum”