[3.3][RC] AdBlock Detector - phpBB Extension

Extensions for phpBB 3.3.X
Maintained and supported by Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][RC] AdBlock Detector - phpBB Extension

Post by Stoker »

Extension Name:
Author: Stoker, credits to Detect Adblock for the js
Extension Version: Image
Requirements: Image

Extension Description:
If your phpBB forum relies on advertising revenue, you're likely losing money to ad blockers. A significant portion of your audience never sees your ads, directly impacting your financial stability. This is why an AdBlock Detector for phpBB is not just beneficial, but crucial for forum administrators.

AdBlock Detector Configuration:
AdBlock Detector Page:
This setting enable/disable the AdBlock Detector custom page.
If enabled messages will be displayed.

AdBlock Detector Messages:
If this is disabled the extension will run in "Testmode". Messages will only display on the AdBlock Detector page.
If enabled messages will display on all pages.

Display inline:
Displays the AdBlock Detector message inline in the header.

Display fixed:
Displays the AdBlock Detector message fixed at the top.

Display modal:
Displays the AdBlock Detector message as a modal.
WARNING!!! This option is very intrusive. It will block the entire screen until they either close it or disable their AdBlocker.
I do not recommend this option UNLESS you know what you are doing AND have a very strong content. The risk is that your users leave your board!

Noscript message:
Displays a message in the header if JavaScript is disabled.

Topic noscript message:
Disable topic views and display a message if JavaScript is disabled.
WARNING!!! This option is very intrusive. It will block the entire screen until they either close it or disable their AdBlocker.
I do not recommend this option UNLESS you know what you are doing AND have a very strong content. The risk is that your users leave your board!

Topic AdBlock:
Disable topic viewsand display a message if an AdBlocker is detected.
WARNING!!! This option is very intrusive. Users can`t see the topics.
I do not recommend this option UNLESS you know what you are doing AND have a very strong content. The risk is that your users leave your board!

Dynamic generated ID's:
AdBlock messages appear on next pageload EVEN if attempted blocked with an AdBlocker.

Simple Messages:
Simple messages are more subtle styling. This goes for both AdBlock and NoScript messages.

Permissions:
Set groups permissions -> Misc in ACP. By default all is off!


All display types can be combined!
On this Adblock Detector Demo I have enabled all 3.


Release history:
Fixed:
Duplicate ID's and console errors
Bug that disabled topic view for everybody. Not just AdBlockers.

Improvements:
1.0.3 RC
- Duplicate ID's fixed
- JS console errors fixed
1.0.1 dev
- Simple messages, a more subtle way to display messages
- Permissions added. Set groups permissions -> Misc in ACP. By default all is off!
1.0.0 dev
- All CSS is moved from stylesheet to inline HTML. This means that AdBlockers doesnt have a class to block
- Dynamic ID's. New ID on every pageload. This means that when an AdBlocker block the current ID, the block will appear again on next pageload.
- Noscript added. Then users cant just disable javascript to avoid ads and AdBlock detector messages. They will get the same if javascript is disabled.
- Link to custom page added in the AdBlock detector messages. Then you can explain why they see the messages.
- Several minor tweaks


Demo:
phpBB AdBlock Detector

Download:
adblock_detector_1.0.3.zip
(37.77 KiB) Downloaded 29 times

Screenshots:
adblock_detector_inline.png
adblock_detector_fixed.png
adblock_detector_modal.png
adblock_topic.png
adblock_noscript_topic.png
adblock_noscript.png
adblock_acp_settings.png
adblock_acp_text.png

Older versions

adblock_detector_1.0.1-dev.zip
(36.66 KiB) Downloaded 64 times
adblock_detector_1.0.0-dev.zip
(35.56 KiB) Downloaded 29 times
adblock_detector_1.0.0.zip
(26.61 KiB) Downloaded 20 times
Last edited by Stoker on 29 Jul 2025, 07:48, edited 17 times in total.
Reason: - Updated to 1.0.3 RC
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

The extension itself is now fully functional.
But ATM the js detector is only testet working on chrome with adblock plus. UBlock on Chrome is undetected.
AdBlock on Firefox is undetected. At least here on this site.
I will see if I can get a better detection.
~ The greatest achievement in life is to inspire ~
Regards Stoker
No Avatar
deninho32 Offline
BBCoder II
BBCoder II
Posts: 18
Joined: 05 Feb 2025, 08:35
Local time: 07 Sep 2025 05:51
Last active: -
Location: The Netherlands
Contact:

[3.3][DEV] AdBlock Detector

Post by deninho32 »

https://forum.negentiendertien.nl - Voor supporters, door supporters.
User avatar
SpIdErPiGgY Offline
Donator
Donator
Posts: 53
Joined: 13 Dec 2024, 08:43
Local time: 07 Sep 2025 05:51
Last active: -
Location: Erpe-Mere, Belgium
Contact:

[3.3][DEV] AdBlock Detector

Post by SpIdErPiGgY »

I hate adds. I do anything possible to Block them 🤣
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

Me to. But the webmaster is Boss of his own home.
And AdBlockers are a problem for their revenue. In some cases no revenue, no site.
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

deninho32 wrote: 30 May 2025, 13:22 Try this:

https://www.detectadblock.com/
Seems to be working: demo1.html
I will see how to integrate it :thumb:
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

Yes, phpBB AdBlock Detector demo is now working!
Testet with: AdGuard Adblocker, AdBlock Plus, AdBlock and uBlock Origin.
Download next week :thumb:
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

Todo list:
Lets ad the <noscript> tag. So users wont getaway with disabling javascript in their browser to avoid ads and the adblock detected message.
We could also remove topics when using an adblocker or javascript is disabled.
This part is EXTREMELY intrusive. I wont recommend using it. But the option should be there.
Also I will fun figure out making it possible 😁
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
Stoker Offline
Site Admin
Site Admin
Posts: 4,561
Joined: 12 May 2008, 21:26
Local time: 07 Sep 2025 05:51
Last active: -
Favourite EXT: Forum Goal
Location: Denmark
Contact:

[3.3][DEV] AdBlock Detector

Post by Stoker »

Download added to first post
~ The greatest achievement in life is to inspire ~
Regards Stoker
No Avatar
deninho32 Offline
BBCoder II
BBCoder II
Posts: 18
Joined: 05 Feb 2025, 08:35
Local time: 07 Sep 2025 05:51
Last active: -
Location: The Netherlands
Contact:

[3.3][DEV] AdBlock Detector

Post by deninho32 »

Dutch translation.
nl.zip
(1.93 KiB) Downloaded 11 times
https://forum.negentiendertien.nl - Voor supporters, door supporters.
Post Reply