AdBlock Tracker & Usergroup Swap

AdBlock Tracker & Usergroup Swap [Paid] v2.4.0

No permission to buy ($45.00)
For both guests and users, how can I sort results by the Recent Status column? Or filter just to see the ones where “Adblocking” is listed?
I just hopped on my laptop and unfortunately, XF23 sorting seems to be broken since XF 2.3x, not sure if it's a recent thing or not. I tested with XF 2.3.5

I'm traveling for the next few days, just in a taxi on my way to the airport actually, but I'll try to come up with a fix at some point. Hard to say how much work it'll be.
 
For both guests and users, how can I sort results by the Recent Status column? Or filter just to see the ones where “Adblocking” is listed?
I was mistaken, as of the recent versions of this add-on sorting DOES work as expected.

Just use the filtering bottom-right of the form, as shown below:

Screenshot 2025-02-16 at 4.08.20 PM.webp
 
Also I just wonder if I’m not understanding the tool very well so I don’t want to miss out on any features.
 
Just use the filtering bottom-right of the form, as shown below:
This is not working for me.

If I set Global, Current Detects, Ascending ... then click Save (correct?) ... the results are still a random-looking list.

I am not putting anyone in a special user group yet. Maybe that’s it?

Right now I just want to look at the data and see how many users are using adblockers.
 
The power of the addon is creating a usergroup and having the addon switch users to that usergroup when they're caught using adblock extensions. Then, persuading them to disable their adblock extensions so they can have the "adblock usergroup" restrictions removed.

You can make the usergroup and attach no special permissions to it. Just so you can see the swaps happening.

The guest stuff is essentially useless other than the basic stats. So to prevent confusion you could disable guest tracking. But up to you.
 
@Wutime I have version 2.3.9 installed on AVForums running 2.2. I see in the wutime_adblocktracker_account template two instances of
Code:
<i class="fas fas-gear"></i>
For 2.3, should this not be
Code:
<xf:fa icon="fas fa-gear" />
?
Or is this template code not used when running XF 2.3?
 
Wutime updated AdBlock Tracker & Usergroup Swap with a new update entry:

v2.3.10

  • UPDATE: Crawler Detection updated from v1.3.0 to v1.3.2
  • FIX: Properly fix FA icon sprite rendering for XenForo v2.3.x (backwards compatible with XF 2.2.x)
  • FIX: Template modification adjustment for XenForo 2.3.6
  • FIX: Improper FA icon reference
Note, the next release will require PHP v8+, but will include composer instructions how to maintain v7.4 compatibility if required.

Read the rest of this update entry...
 
I've just upgraded this from an older version from a few years ago. In the version I had there was an issue that if a user was moved to the AdBlocking group but then paid for a subscription the move to the subscribed user group from the adblocking user group didn't happen automatically.

Just to save me going back through all of the updates can I ask if that was fixed?... Thanks
 
Yes, there were updates to address that issue.
Still doesn't work for me but I have other addons that are probably the culprit. We can address it later if/when other people have the same combination of addons that causes the issue. In the meantime, I need to do a manual refresh any time somebody upgrades.
 
Still doesn't work for me but I have other addons that are probably the culprit. We can address it later if/when other people have the same combination of addons that causes the issue. In the meantime, I need to do a manual refresh any time somebody upgrades.
You're right, this issue actually isn't fixed.

The User is added to the subscribed group but remains in the AdBlocking group and the status 'you need xx pageviews to move out of the group' is not updated :(
 
You're right, this issue actually isn't fixed.

The User is added to the subscribed group but remains in the AdBlocking group and the status 'you need xx pageviews to move out of the group' is not updated :(
He made an update and it appeared to be working for me - but it was short-lived. I think it would be great to have the addon automatically do a refresh after an account upgrade. Though that may not be possible. In fact, I think he may have addressed this somewhere in the discussion... But that would ultimately fix the issue for good.
 
Last edited:
Okay, I'll need to look into this. I'm hooked into the user_upgrade, upon which, the adblock usergroup is immediately removed. But clearly it's not working as intended which is just strange. It should be clear as day programmatically.

I might need to make a post to see if I'm missing something obvious.
 
've just upgraded this from an older version from a few years ago. In the version I had there was an issue that if a user was moved to the AdBlocking group but then paid for a subscription the move to the subscribed user group from the adblocking user group didn't happen automatically.

Just to save me going back through all of the updates can I ask if that was fixed?... Thanks

He made an update and it appeared to be working for me - but it was short-lived. I think it would be great to have the addon automatically do a refresh after an account upgrade. Though that may not be possible. In fact, I think he may have addressed this somewhere in the discussion... But that would ultimately fix the issue for good.

Just to confirm, you have ALL of your paid memberships in the "Ignore roles" of the add-on?

The system checks the "ignored roles" whenever a UserGroupChange is initiated. This is initiated after a user is upgraded, if the role change groupId is in the ignored roles then the "detected" entity is completely deleted for that user:

PHP:
<?php

namespace Wutime\AdBlockTracker\XF\Service\User;

class UserGroupChange extends XFCP_UserGroupChange
{
    public function addUserGroupChange($userId, $changeKey, $groupId, $endDate = null)
    {
        $options = \XF::options();

        $AdBlockUserGroupId = $options->wutime_tracker_detected_assign_role;
        $ignoreRoles = $options->wutime_tracker_detected_ignore_roles;

        if ($AdBlockUserGroupId) {
            // Check if the groupId is one of the roles you want to trigger this logic
            if (in_array($groupId, $ignoreRoles)) {
                $detected = \XF::repository('Wutime\AdBlockTracker:Detected')->findOneByUserId($userId);
                if ($detected) {
                    $detected->delete();
                }
            }
        }

        parent::addUserGroupChange($userId, $changeKey, $groupId, $endDate);
    }
}

The entity preDelete ensures that prior to deleting the entity, if the user is in the "AdBlock" role that role is removed just before the entity is deleted:


PHP:
     protected function _preDelete()
     {
          if ($this->status=='AdBlocking') {
               // remove adblocking role prior to delete
               $userGroupChange = \XF::service('XF:User\UserGroupChange');
               $userGroupChange->removeUserGroupChange($this->user_id, 'AdBlockDetected');
               $this->rebuildUserGroupCacheForUser($this->user_id);
          }
     }

So before I wade in much further I just wanted to ensure you hadn't possibly created new paid membership roles and forgotten to add those to the "ignore roles" in the AdBlock Tracker plugin.
 
So before I wade in much further I just wanted to ensure you hadn't possibly created new paid membership roles and forgotten to add those to the "ignore roles" in the AdBlock Tracker plugin.

All of my paid memberships go into the Subscribed User Group

1741857724114.webp
 
Thanks for your feedback.

After quite a bit of testing I found the issue and have run multiple upgrades with expected results.

Previously, the finalSetup in the upgrade was running in the middle, just prior to the completion of an upgrade. Thus, when checking for the "ignored roles", it didn't actually exist in the secondary_ids yet, and therefore the deletion/removal logic wouldn't fire.

I'm packaging an update now that should resolve this nagging issue.
 
Wutime updated AdBlock Tracker & Usergroup Swap with a new update entry:

v2.3.11

  • UPDATE: Detected entity to always remove the adblock group, regardless of status
    • This ensures the adblock group is fully removed (from both tracked changes and permanent groups) and the cache is rebuilt, covering all bases.
  • UPDATE: Extend the User Upgrade Service on upgrade()
    • Hooks into the upgrade process directly, ensuring adblock status is cleared when the user’s groups are updated. Also manually removes the adblock group from secondary_group_ids...

Read the rest of this update entry...
 
Back
Top Bottom