[TH] User Criteria Extended [Deleted]

Nope. I think i found it. It's when you're searching for users I believe.........that is the only thing I can guess.....if that's not it, then I have no idea and just seems pointless LOL.
No, it's not the search; go to create a new trophy for example and you'll see the extended user criteria there.

I'm pretty sure they're used for user upgrades too?
 
I thought it could also be used for registering. Like for instance if they don't fit the criteria they don't register.. Hmmmm..
 
Default XenForo uses user criteria for user upgrades, notices and trophies. A lot of add-ons use them in other places too.
What does the "Miscellaneous: This criterion is never met" option do?

I've got that option selected along with:
"User has at least X posts in all of the selected forums combined:"

I assume it means, that the trophy will be applied when a user posts X posts from the time of the trophy being created, right?
 
The "first post" is also a post.
Well, I thought technically that Messages were any post, including the first, but I won't quibble. LoL, I can see how a person might get confused. But in any case, probably not what he is looking for.
 
Can someone please tell me if this is possible with this add-on...

I want a trophy to be given when a member posts 200 times between 1 Nov to 30 Nov. Is this possible?
 
Can someone please tell me if this is possible with this add-on...

I want a trophy to be given when a member posts 200 times between 1 Nov to 30 Nov. Is this possible?
You could probably use this criteria:
User has posted at least X posts in the last X days

Create the trophy on 30th Nov, set the number of days to 30, run the trophy cron and then remove the criteria so that it doesn't continue to be awarded thereafter. The only drawback is if XF ever decides to implement revoking trophies if criteria is no longer met.
 
You could probably use this criteria:
User has posted at least X posts in the last X days

Create the trophy on 30th Nov, set the number of days to 30, run the trophy cron and then remove the criteria so that it doesn't continue to be awarded thereafter. The only drawback is if XF ever decides to implement revoking trophies if criteria is no longer met.
Thanks for replying Nerdface. I was hoping there’d be something more automated, like setting the dates so at least it would check throughout that month and people would get the trophy a bit sooner than having to wait till the end of the month to receive it.

I’m surprised there isn’t a specific criterion to set the month yet, or that anyone would even ask. This is great for seasonal trophies.
 
The latest version on XF2.2

Server error log
  • ErrorException: [E_WARNING] Invalid argument supplied for foreach()
  • src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php:1413
  • Generated by: Unknown account
  • Nov 28, 2020 at 10:20 PM

Stack trace​

Code:
#0 src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php(1413): XF::handlePhpError(2, '[E_WARNING] Inv...', '/home/abc...', 1413, Array)
#1 [internal function]: ThemeHouse\UserCriteria\Listener\CriteriaUser::criteriaUser('th_min_media_it...', Array, Object(XFMG\XF\Entity\User), false)
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2797): XF\Extension->fire('criteria_user', Array, NULL)
#4 src/XF/Criteria/User.php(64): XF\App->fire('criteria_user', Array)
#5 src/XF/Criteria/AbstractCriteria.php(63): XF\Criteria\User->isUnknownMatched('th_min_media_it...', Array, Object(XFMG\XF\Entity\User))
#6 src/XF/Repository/UserGroupPromotion.php(111): XF\Criteria\AbstractCriteria->isMatched(Object(XFMG\XF\Entity\User))
#7 src/XF/Cron/UserGroupPromotion.php(39): XF\Repository\UserGroupPromotion->updatePromotionsForUser(Object(XFMG\XF\Entity\User), Array, Array)
#8 [internal function]: XF\Cron\UserGroupPromotion::runPromotions(Object(XF\Entity\CronEntry))
#9 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#10 src/XF/Job/Manager.php(258): XF\Job\Cron->run(G)
#11 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, G)
#12 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, G)
#13 job.php(43): XF\Job\Manager->runQueue(false, 8)
#14 {main}

Request state​

Code:
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(58) "https://forum.abc.com/admin.php?user-groups/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Is the most current version of this add-on compatible with XF 2.1 still? Thanks!
Ofcourse although if you experience any issues then let us know :)

The latest version on XF2.2

Server error log
  • ErrorException: [E_WARNING] Invalid argument supplied for foreach()
  • src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php:1413
  • Generated by: Unknown account
  • Nov 28, 2020 at 10:20 PM

Stack trace​

Code:
#0 src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php(1413): XF::handlePhpError(2, '[E_WARNING] Inv...', '/home/abc...', 1413, Array)
#1 [internal function]: ThemeHouse\UserCriteria\Listener\CriteriaUser::criteriaUser('th_min_media_it...', Array, Object(XFMG\XF\Entity\User), false)
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2797): XF\Extension->fire('criteria_user', Array, NULL)
#4 src/XF/Criteria/User.php(64): XF\App->fire('criteria_user', Array)
#5 src/XF/Criteria/AbstractCriteria.php(63): XF\Criteria\User->isUnknownMatched('th_min_media_it...', Array, Object(XFMG\XF\Entity\User))
#6 src/XF/Repository/UserGroupPromotion.php(111): XF\Criteria\AbstractCriteria->isMatched(Object(XFMG\XF\Entity\User))
#7 src/XF/Cron/UserGroupPromotion.php(39): XF\Repository\UserGroupPromotion->updatePromotionsForUser(Object(XFMG\XF\Entity\User), Array, Array)
#8 [internal function]: XF\Cron\UserGroupPromotion::runPromotions(Object(XF\Entity\CronEntry))
#9 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#10 src/XF/Job/Manager.php(258): XF\Job\Cron->run(G)
#11 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, G)
#12 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, G)
#13 job.php(43): XF\Job\Manager->runQueue(false, 8)
#14 {main}

Request state​

Code:
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(58) "https://forum.abc.com/admin.php?user-groups/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
What type of user criteria do you currently have active that is from User Criteria Extended?
 
What type of user criteria do you currently have active that is from User Criteria Extended?

Here's the two UCE criteria active on my forum:
"User has at least X media items in all of the following categories combined"
"User has at least X posts in all of the selected forums combined"

XF 2.2, PHP version 7.2.34

Server error log
[E_WARNING] Invalid argument supplied for foreach()
Saturday at 10:20 PM src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php:1413

[E_NOTICE] Undefined index: categories
Saturday at 10:20 PM src/addons/ThemeHouse/UserCriteria/Listener/CriteriaUser.php:1413
 
Back
Top Bottom