AdBlock Tracker & Usergroup Swap

AdBlock Tracker & Usergroup Swap [Paid] v2.4.2

No permission to buy ($45.00)
Suggestion for future update: If it's possible to remove the detected users swap group, and reset the detection count to 0 when they upgrade to a specific premium membership, I think that would help a lot.
 
Suggestion for future update: If it's possible to remove the detected users swap group, and reset the detection count to 0 when they upgrade to a specific premium membership, I think that would help a lot.
You should be able to do this as-is now with permissions and usergroups.

For instance, you can "ignore" paying memberships from detection. These ignored "paying" memberships will not be moved between usergroups and will not be "detected".

The option has the following notes to keep in mind:

Choose usergroups you want to ignore, such as administrators and moderators
You might want to ignore any "paid user" usergroups
Ignored users will not be tracked or moved between usergroups
If you make changes to ignored roles please rebuild cache: (has link to rebuild)
 
You should be able to do this as-is now with permissions and usergroups.

For instance, you can "ignore" paying memberships from detection. These ignored "paying" memberships will not be moved between usergroups and will not be "detected".

The option has the following notes to keep in mind:

We had an incident where someone saw they were adblock detected, so they had been moved into the group, then paid for premium, but they weren't moved back out.

That's where the suggestion came from.
 
We had an incident where someone saw they were adblock detected, so they had been moved into the group, then paid for premium, but they weren't moved back out.

That's where the suggestion came from.
This was a few weeks ago on a previous version right? This was resolved in a recent update unless you tell me otherwise. Please let me know.
 
Yep exact same scenario
Two things just to confirm:

1) You had the paid membership IGNORED
2) If you change the "ignored roles" at any time, you need to rebuild the cache to ensure newly added ignored roles are removed
 
This was a few weeks ago on a previous version right? This was resolved in a recent update unless you tell me otherwise. Please let me know.

Oh you're right, just noticed we're 2.3.2, I thought we were latest. I'll run the update to 2.3.4.
 
Wutime updated AdBlock Tracker & Usergroup Swap with a new update entry:

v2.3.5

  • NEW: Tested with xenForo v2.3.4
  • NEW: Added dynamic remote loading javascript to detection #3
  • NEW: Updated detection to version 3 (#1, #2, #3 Detection)
  • NEW: Added XHR timeout to remote loading to prevent hanging requests (#3 Detection)
  • NEW: Improved detection for primary detection method (#1 Detection)
  • NEW: Added additional surface level check to primary detection method (#1 Detection)
  • FIX: Added two tested alternatives to the "Remote AdNetwork JavaScript URL"...

Read the rest of this update entry...
 
@Wutime I've been using 2.3.4 and I need to manually rebuild caches every time a user in my adblocking user group upgrades to a supporting member user group. Otherwise they're stuck in the adblocking user group along with their new supporting member user group. This is supposed to happen automatically but it's not doing so for me. Is there some setting that I've missed that can be causing this?
 
@Wutime I've been using 2.3.4 and I need to manually rebuild caches every time a user in my adblocking user group upgrades to a supporting member user group. Otherwise they're stuck in the adblocking user group along with their new supporting member user group. This is supposed to happen automatically but it's not doing so for me. Is there some setting that I've missed that can be causing this?
That's not good. Are you using anything special for upgrades (add-ons), or just the built-in system that ships with xenforo?
 
I've been using 2.3.4 and I need to manually rebuild caches every time a user in my adblocking user group upgrades to a supporting member user group.
So I've reviewed the code that fires on a user group change and realize that, while it deletes the "detected" data and all entries, it doesn't actually remove the detected role.

Does this sound exactly like what you're experiencing?

Said another way, can you confirm that the data for AdBlock Detected is deleted for the user that upgraded, but the AdBlock Detected role isn't removed for the given user on upgrade?
 
@Sal Collaziano the latest update should resolve the bug you were encountering. Please ensure you have your paid user groups added to the "ignore roles" in the add-on's options (just a reminder).
Thank you. I have updated to the latest version and will let you know how it goes the next time I get an account upgrade in this situation. I appreciate the quick response. :)
 
@Wutime, quick question... If a user is in the ad block usergroup and upgrades to a usergroup that the add-on should ignore - is the swap back out of the ad block usergroup instantaneous? Or does it happen based on a cronjob or community activity - something like that...?
 
@Wutime, quick question... If a user is in the ad block usergroup and upgrades to a usergroup that the add-on should ignore - is the swap back out of the ad block usergroup instantaneous? Or does it happen based on a cronjob or community activity - something like that...?
Based on the last update, it should happen once the useruprage is approved.
 
@Sal Collaziano what's your experience been? It's r ally difficult to test locally for me because it's hard to simulate paid upgrades from localhost, but I tried to be meticulous with the code.
 
@Sal Collaziano what's your experience been? It's r ally difficult to test locally for me because it's hard to simulate paid upgrades from localhost, but I tried to be meticulous with the code.
For me, I need to manually rebuild the cache each time a user purchases an upgrade. Would it make sense to have the option to do this automatically when an upgrade is purchased? Is that even possible? And if so, would that cause any issues?
 
I think you might have solved it. I didn't realize but:

The removeUserGroupChange method in XenForo does not rebuild the user's cache automatically. While it removes the specific user group change record from the xf_user_group_change table, it does not trigger a rebuild of the user's group cache.

So yes, I'll do as you suggested and run it with:

PHP:
$user = \XF::app()->find('XF:User', $userId);
if ($user) {
    $user->rebuildUserGroupCache();
}

And hopefully that does the trick.
 
Actually, after a deep dive, addUserGroupChange() automatically rebuilds the user cache, but removeUserGroupChange() does not. I mistakenly assumed both worked identically. I'll make an update and release as soon as possible.
 
Back
Top Bottom