Theoretical maybe, not with the criteria provided through this add-on alone though.Can I check if a user has read or opened a post?
Here is another criteria which would be super usefull : User has visited for at least X days
• User is/is not using Adblock
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:"
$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;
}
...
}
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...
ThemeHouse updated [TH] User Criteria Extended with a new update entry:
Version 1.0.5 released!
Read the rest of this update entry...
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.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?
We use essential cookies to make this site work, and optional cookies to enhance your experience.