[rellect] AdBlock Detector [Deleted]

I have a feature request. If possible. Turn on the 'Discouraged' mode for people using ad-blockers. Optional visual warning. The thing with visual elements is that they can be blocked using the ad blockers themselves. They just need to hide a DIV to get around the message. If the extension can tap into the native Discouraged mode for guests and members using Adblockers, it could be a more potent message to them. Thanks!
 
I have a feature request. If possible. Turn on the 'Discouraged' mode for people using ad-blockers. Optional visual warning. The thing with visual elements is that they can be blocked using the ad blockers themselves. They just need to hide a DIV to get around the message. If the extension can tap into the native Discouraged mode for guests and members using Adblockers, it could be a more potent message to them. Thanks!
Hey,
In a future update this will be somehow possible as part of another feature.
But in my opinion, since most users are not aware of 'discouraged' mode, they probably will think that the site isn't working well and eventually will leave.
 
Yes sir. I know. But visual elements are super easy to block so the only way to make the experience painful for such users is to turn on the discouraged mode. The backlash is just beginning. Several sites have started detecting ad blockers and developers are responding by coming up with blockers of ad-blockers! We need to get creative.

https://github.com/reek/anti-adblock-killer/

The visual message indicator can be used to tell the visitor that if he continues to use an ad blocker on the forum, we reserve the right to make it annoying for him or whatever. But such a feature would seriously making plugin a lot more powerful. Thanks for considering it!
 
if you have set it to appear after fixed interval, a refresh would count as a new page load?

Thanks, it seems fixed now that I changed the usergroup permissions from Show alert every 168 hours to Unlimited. I thought that setting would only affect groups allowed to dismiss alerts, but that seems not to be the case.
 
Last edited:
Thanks, it seems fixed now that I changed the usergroup permissions from Show alert every 168 hours to Unlimited. I thought that setting would only affect groups allowed to dismiss alerts, but that seems not to be the case.

The inheritance of permissions of this add-on is broken. "Unlimited" means "unlimited notices" and not "unlimited silence". "0" means "zero notices" and not "zero silence" (as it should logically be, because the higher the number the longer the silence). This makes it impossible to give higher user groups (like admins or premium users) a larger interval between notices if you set your regular members to "Unlimited" (always show a notice).

You should never use "Unlimited" in any of your user groups because of this bug. I recommend to set your Registered group to "1".
 
The inheritance of permissions of this add-on is broken. "Unlimited" means "unlimited notices" and not "unlimited silence". "0" means "zero notices" and not "zero silence" (as it should logically be, because the higher the number the longer the silence). This makes it impossible to give higher user groups (like admins or premium users) a larger interval between notices if you set your regular members to "Unlimited" (always show a notice).

You should never use "Unlimited" in any of your user groups because of this bug. I recommend to set your Registered group to "1".
The permissions were added in a very early stage of the addon with the request to alert only guests. The scenario you're describing wasn't considered at the time, and unfortunately I can't simply change now the meaning of a permission as it will confuse all existing customers.
Soon I will publish v2 for alpha testing, which implements permissions a little bit differently and solves this situation.

Just to clarify what @HWS said, the issue is within inheritance of the "Show alert every X hours" permission. Once set to Unlimited in a usergroup, you can't overwrite it to a number for other sub-usergroups, since Unlimited has higher priority in the xenforo permissions system.
 
I have it setup like this:

Registered members (I want to see the notice once a week and be able to dismiss it):
Bypass: No
Dismiss: Yes
Show alert: 168

Subscribing members (subgroup of registered who I don't ever want to see this notice)
Bypass: Yes
Dismiss: Yes
Show alert: 0

Unregistered (I want notice always to show, not dismissible):
Bypass: No
Dismiss: No
Show alert: Unlimited

Did I configure that correctly?
 
I have it setup like this:

Registered members (I want to see the notice once a week and be able to dismiss it):
Bypass: No
Dismiss: Yes
Show alert: 168

Subscribing members (subgroup of registered who I don't ever want to see this notice)
Bypass: Yes
Dismiss: Yes
Show alert: 0

Unregistered (I want notice always to show, not dismissible):
Bypass: No
Dismiss: No
Show alert: Unlimited

Did I configure that correctly?
Yes you did it right.
 
unfortunately I can't simply change now the meaning of a permission as it will confuse all existing customers.

This can be changed with 2 simple database calls at the upgrade, so it wont break anything. ;)

Code:
UPDATE xf_permission_entry SET permission_value_int = "0" WHERE permission_entry_id = "PERMISSION_VALUE_ID"  AND permission_value_int = "-1"

Registered members (I want to see the notice once a week and be able to dismiss it):
Bypass: No
Dismiss: Yes
Show alert: 168

Subscribing members (subgroup of registered who I don't ever want to see this notice)
Bypass: Yes
Dismiss: Yes
Show alert: 0

This won't work!

You cannot set your subgroup of registered to "0", if you have set up your registered group to "168". The subgroup will also have "168" no matter if you set it to "0" (because the higher value trumps).

This bug is really a major problem with this add-on. I really would like to have this corrected. I think the little learning required by some of your customers would be well worth it.
 
This won't work!

You cannot set your subgroup of registered to "0", if you have set up your registered group to "168". The subgroup will also have "168" no matter if you set it to "0" (because the higher value trumps).

But that subgroup is set to "Bypass", so they should never see the notice at all, right?
 
But that subgroup is set to "Bypass", so they should never see the notice at all, right?

"ByPass" is not available in the user group permission settings.

In practice you simply can set all usergroups to never see the notice or to always see the notice or to have a single value for all groups.

If you wish any finer grained permissions you have to leave out "0" and "Unlimited" (do not use them in any user group) because of the bug. You always will get in trouble with them as it is coded now. You are limited to a very high value (instead of "0") or to "1" (instead of "Unlimited") which will not give you exactly what you want, but allows you to fine grain your permissions. I recommend to set your "Subscribing Members" to "1000000" instead of "0" which will work and show them a notice every year. Bad solution, I know. ;)
 
Last edited:
I see it in mine. These are my settings for subscribers (premium):

View attachment 118948


As far as I can tell, this is working on my sites.

Ah, you mean "Bypass Detection". Yes, this is also a solution. They won't get any notice no matter what you set in "Show alerts". You just have to be careful not to give this user group to anyone you want to see the notices.
 
This can be changed with 2 simple database calls at the upgrade, so it wont break anything. ;)
Changing the permission is simple, but this new logic may confuse many customers, which is my main concern.
I'll think what I can do here.
 
Hello.

Bug in 1.7.3 (xenforo 1.5.1) - bevor with 1.7.2 and xenforo 1.5.0 I dont have this error:

Code:
Fehlerinformation
XenForo_Exception: Invalid model 'rellect_AdblockDetector_Model_AdBlock' specified - library/XenForo/Model.php:192
Generiert durch: Unbekanntes Benutzerkonto, Vor 55 Minuten
Stapelverfolgung
#0 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/rellect/AdblockDetector/Listener/Hook.php(11): XenForo_Model::create('rellect_Adblock...')
#1 [internal function]: rellect_AdblockDetector_Listener_Hook::cacheTemplates('PAGE_CONTAINER', Array, Object(XenForo_Template_Public))
#2 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#3 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'PAGE_CONTAINER')
#4 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/Dependencies/Public.php(239): XenForo_Template_Abstract->__construct('PAGE_CONTAINER', Array)
#5 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Public->createTemplateObject('PAGE_CONTAINER', Array)
#6 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_ViewRenderer_Abstract->createTemplateObject('PAGE_CONTAINER', Array)
#7 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#8 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#9 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/index.php(13): XenForo_FrontController->run()
#10 {main}
Benötigter Status
array(3) {
["url"] => string(85) "http://www.hobby-gartenteich.de/xf/threads/suche-diese-sogenannte-wunder-segge.44631/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

upload_2015-10-11_14-15-4.webp

Any Idea? I only uploaded the upload folders and then update the add-on from 1.7.2 to 1.7.3 after update from xenforo 1.5.0 to 1.5.1
 
Hello.

Bug in 1.7.3 (xenforo 1.5.1) - bevor with 1.7.2 and xenforo 1.5.0 I dont have this error:

Code:
Fehlerinformation
XenForo_Exception: Invalid model 'rellect_AdblockDetector_Model_AdBlock' specified - library/XenForo/Model.php:192
Generiert durch: Unbekanntes Benutzerkonto, Vor 55 Minuten
Stapelverfolgung
#0 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/rellect/AdblockDetector/Listener/Hook.php(11): XenForo_Model::create('rellect_Adblock...')
#1 [internal function]: rellect_AdblockDetector_Listener_Hook::cacheTemplates('PAGE_CONTAINER', Array, Object(XenForo_Template_Public))
#2 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#3 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'PAGE_CONTAINER')
#4 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/Dependencies/Public.php(239): XenForo_Template_Abstract->__construct('PAGE_CONTAINER', Array)
#5 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Public->createTemplateObject('PAGE_CONTAINER', Array)
#6 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_ViewRenderer_Abstract->createTemplateObject('PAGE_CONTAINER', Array)
#7 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#8 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#9 /var/www/vhosts/hobby-gartenteich.de/httpdocs/xf/index.php(13): XenForo_FrontController->run()
#10 {main}
Benötigter Status
array(3) {
["url"] => string(85) "http://www.hobby-gartenteich.de/xf/threads/suche-diese-sogenannte-wunder-segge.44631/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

View attachment 119026

Any Idea? I only uploaded the upload folders and then update the add-on from 1.7.2 to 1.7.3 after update from xenforo 1.5.0 to 1.5.1
It looks like the file is missing. Go to /library/rellect/AdblockDetector/Model/ and make sure that there's a file named AdBlock.php
 
No - this file is already there:
upload_2015-10-11_14-27-35.webp
left = PC
right = Server

I have all files overwriten with the new one. But I have this error just one time... so, I think it would be a good idea to look at a later time for similar new errors. :)
 
Back
Top Bottom