Support Forum
Hi Ike,
Thank you for answering, but it seems that the files, that are mentioned, do not exist anymore?
I changed the file "sp-db-statistics" like that:
function sp_get_top_poster_stats($count) {
$spdb = new spdbComplex;
$spdb->table = SFMEMBERS;
$spdb->found_rows = true;
$spdb->fields = 'user_id, display_name, posts, admin, moderator';
$spdb->where = 'posts > -1';
$spdb->orderby = 'posts DESC';
$spdb->limits = "0, $count";
$spdb = apply_filters('sph_stats_top_posters_query', $spdb);
$topPosters = $spdb->select();
return $topPosters;
....but now, no one appears anymore in the top posters list....
It is said, that this should be integrated in "spFunctions.php"...but I can`t find that file?
Furthermore, it is said one can run the sph_stats_cron hook, but how can I do that?
And I wonder: In with table are the users saved? I can`t find the columns "admin" and "moderator"?
Thank you again, Kalle
Well the code changes that Mr Papa posted in post number 4 were added to the SP theme's spFunctions.php file - which is located in the SP Themes directory. This can be found in (using default theme for an example) wp-content > sp-resources > forum-themes > default > templates > spFunctions.php.
Shouldn't really need to do any more than that, and certainly I wouldn't have recommended changing the db statistics file.
As always we recommend making a custom or child theme to preserve the changes made, once you are happy with them!
1 Guest(s)