[TH] User Criteria Extended [Deleted]

Hi dear @Lukas W. , what about the possibility to check how many posts a user makes in a given time frame (example, at least 5 posts in a day or at least 5 posts in the last 2 days)?

Thank you in advance
 
Thank you so much, I'll keep my fingers crossed then, as it was a heavily requested feature on a community with over 500,000 users to track active members :)
 
I suspected it, was just curious, thanks for answering :) I don't remember where I've seen it, but I think there might be an add-on using that criterion somehow.
 
These ones would be the ultimate criteria:

• "Has posted at least X posts in the last X day(s) in the following Nodes:"
• "Has posted at least X threads in the last X day(s) in the following Nodes:"
 
These ones would be the ultimate criteria:

• "Has posted at least X posts in the last X day(s) in the following Nodes:"
• "Has posted at least X threads in the last X day(s) in the following Nodes:"

Many members miss or wish for it. But for some reason this is probably not possible. Maybe @Lukas W. can say something about it.
 
From what I understand, if something isn't possible, @Lukas W. usually let us know about it, while if he doesn't it means it could be done and will be probably added in a future upgrade.

After all, post/thread timestamp is stored in the database, so I don't see why it shouldn't be possible, as xenforo by default provides all the elements:

• Post ID & Node ID
• Thread ID & Node ID
• Post Author
• Thread Author
• Post Timestamp (and Thread indirectly)
• Node ID

so the theory would be (just take it as an example, as it's not 100% correct, in order to simplify it for those who don't know php):

Code:
$postAuthor = #Grabbed from XF Database. It's the post author ID.
$postID = #Grabbed from the XF Database. It's the post ID, required to find the author.
$postNodeID = #Grabbed from the XF Database. Required to see which node the post is in.
$addOnNodeID = #Grabbed from the settings we define in User Criteria Extended Add-On. Required to see which node to compare that post with.
$xf.time = #Already defined global variable to return current timestamp.
$postTimestamp = #Grabbed from the XF Database. Required to see when the post was made.
$daysCount = #Grabbed from the settings we define in User Criteria Extended Add-On, to check how often the posts should be made to meet the criterion.
$postsRecentlyMade = 0; #Local variable to track how many times the condition is met, required to determine wether the criterion is met or not.
$postsRequired = #Grabbed from the settings we define in User Criteria Extended Add-On, to check how many posts the user should make to meet the criteria.
$criterionMet = false; #Local variable to finally check if the criterion is met or not.


public function CheckRecentPosts() {

    if ($postAuthor == $postID && $postNodeID == $addOnNodeID && ($xf.time - $postTimestamp) < $daysCount) {
        $postsRecentlyMade ++;
    }
    if ($postsRecentlyMade > $postsRequired) {
        $criterionMet = true;
    } else {
        $criterionMet = false;
    }
...
}
 
ThemeHouse updated [TH] User Criteria Extended with a new update entry:

Version 1.0.5 released!

Changes:
  • Fixed an issue that prevented float value custom field criteria number inputs from saving float values.
  • Added the following criteria:
    • User ID:
      • User ID is [no more than / at least] X
    • Social
      • User is [following / ignoring] [at least one / none / all] of the defined users
    • Content and achievements
      • User has registered [before / after] date
      • User has posted [no more than / at least] X posts in the last Y...

Read the rest of this update entry...
 
I have a small suggestion:

User has posted at least X messages in the last Y days in the following nodes:

as the subsequent blocks let you pick "posts" and "days", would it be possible to add "threads" between posts and days? So that we could select X posts or X threads in Y days?

Thank you again for hearing us! ♥
 
I'm afraid it's not working as it should.

I tried to set:

- Has posted at least 1 post in the last 999999999 days (tried to increment from 1 day to higher values)

But the promotion isn't triggered.

I also tried the other one where you define the nodes, but I had the same result unfortunately 😔
 
Don't test criteria with user group promotions. There's a number of additional filters that apply there, such as already being in that group, or not being online recently.
 
I was hoping this would've made it possible to dynamically update user groups depending on their daily activities, there's no way for it then?
 
I was hoping this would've made it possible to dynamically update user groups depending on their daily activities, there's no way for it then?
Never said there wasn't, merely to not test your criteria setup with promotions. Verify that your criteria are working as you'd expect them to with a notice for example, then, when you get the results you want, carry it over to user promotions. If you notice it doesn't work on notices even though it should, then we can effectively take action and look into it.
 
Back
Top Bottom