Support Forum
No - this is going to need more than this. Sorry. I was overlooking the fact that admins do not belong to user groups. I think I have an answer for you but I need to do a little more research and testing. Afraid it might be tomorrow morning now before I can confirm but if I can work it out tonight I will.
The stumbling block is that the forum admin (i.e., you) can set a user group to NOT be included in the stats. If you want to use that facility then I don't think we can do what you want with the top posters list. If you are NOT going to use that option then we can.
YELLOW
SWORDFISH
|
Right - this works as long as (see above) you are happy to sacrifice the 'hide stats' option for user groups. Below is the code you need to out into the user file to replace what we did before.
add_filter('sph_top_poster_stats_query', 'add_mods'); function add_mods($query) { $query->join = ''; $query->left_join = array( SFMEMBERSHIPS.' ON '.SFMEMBERS.'.user_id = '.SFMEMBERSHIPS.'.user_id', SFUSERGROUPS.' ON '.SFMEMBERSHIPS.'.usergroup_id = '.SFUSERGROUPS.'.usergroup_id'); $query->where = 'posts > -1'; $query->orderby = 'posts DESC'; return $query; }
Note - it is better copy from the 'raw Code' popup and then paste into the code text file. In particular note that this part - $query->join = ''; - is not a double quote but two single quotes with no space.
YELLOW
SWORDFISH
|
the query looks right and quick test does as well...
Are you stats updating currently? perhaps wp cron is having an issue and the stats are not even updating?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)