Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Top authors: How to integrate the Admin/Moderators
Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Nov 9, 2014 - 4:28 am

Hello all,

Simple:press is really fantastic, but at the bottom of the forum I have a ranking list: "Top authors".

It seems, that the administrator of the forum is not listed there. Is there a possibility to integrate that?

 

Thank you and a nice Sunday, Kalle

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 9, 2014 - 5:35 am

Hey Kalle,

To save typing it out twice, do you mind if I refer you to a post which details how to do this?

See this post - specifically post #4

And of course, do ask if you need any further help!

Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Nov 10, 2014 - 2:05 am

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

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 10, 2014 - 3:42 am

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!

Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 2:46 am

Thank you very much, It works with that :-)

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 3:58 am

No problem :)

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626