XF 2.2 Usergroup promotions based on posts only in specific forums. How?

Stuart Wright

Well-known member
Is it possible to create usergroup promotions based on the number of posts in specific forums only?
If so, how would you do it?
Thanks
 
  • Love
Reactions: eL_
It's not possible by default, and it's also not something that an add-on could do in a practical way for a site with more than a handful of users. The "message count" that is used for promotions is the value from the xf_user.message_count column. You have have certain forums not count posts towards that number, but for the most part, it's a "grand total" number of the posts the user has made everywhere and is updated whenever the user makes a post.

So the problem with having a user group promotion based on a value that doesn't already exist somewhere is you need to run some nasty queries to get the number (for all your users). The query to get the user's total posts in a certain forum (or forums) is going to be very resource intensive and running over and over (every hour by default for user group promotions). That's not to say it's impossible, but it's going to scale worse and worse (get slower and slower) the more users (and posts) you have.

I wouldn't expect to see something like that in XF core... maybe there's an add-on that does it, but I would keep a close eye on how it affects things like record locking for anything but the smallest sites.
 

User has [no more than / at least] X posts in [one / all combined / each] of the selected forums
 

User has [no more than / at least] X posts in [one / all combined / each] of the selected forums
@Stuart Wright look at this one :)
 
Top Bottom