[3.3][DEV] AdBlock Detector - phpBB Extension

Extensions for phpBB 3.3.X
Maintained and supported by Stoker

[3.3][DEV] 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:
Bug that disabled topic view for everybody. Not just AdBlockers.

Improvements:
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.1-dev.zip

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.0-dev.zip
adblock_detector_1.0.0.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Stoker on 16 Jun 2025, 05:52, edited 14 times in total.
Reason: Updated to 1.0.1 dev

[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.

[3.3][DEV] AdBlock Detector

Post by deninho32 »

[3.3][DEV] AdBlock Detector

Post by SpIdErPiGgY »

I hate adds. I do anything possible to Block them 🤣

[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.

[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:

[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:

[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 😁

[3.3][DEV] AdBlock Detector

Post by Stoker »

Download added to first post

[3.3][DEV] AdBlock Detector

Post by deninho32 »

Dutch translation.
nl.zip
You do not have the required permissions to view the files attached to this post.