Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Doug Heffernan on June 10, 2020, 01:08:57 AM

Title: Top Stats Forum Index
Post by: Doug Heffernan on June 10, 2020, 01:08:57 AM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4263)

This mod will display top posters, top topic starters and top topics of your forum on the index page.

You can enable/disable the mod at its settings page in the Admin Panel as well as set the stats limit and decide how to order top topics display, which is based on their views or replies.

If you have any questions do not hesitate to post them in the mod 's support topic.

This mod is released under Mozilla Public License 2.0 (MPL-2.0).
Title: Re: Top Stats Forum Index
Post by: gorbi on June 10, 2020, 03:31:49 AM
Top for what period of time? Can you make a selection choice - day, week, month?
Title: Re: Top Stats Forum Index
Post by: Doug Heffernan on June 10, 2020, 04:28:45 AM
Quote from: gorbi on June 10, 2020, 03:31:49 AM
Top for what period of time? Can you make a selection choice - day, week, month?

There is no time period. And there are no plans to add one for the time being.
Title: Re: Top Stats Forum Index
Post by: Bugo on June 10, 2020, 06:41:49 AM
Hi, Doug.

Please, use shorten_subject (https://support.simplemachines.org/function_db/index.php?action=view_function;id=240) function instead of substr(). It will help to resolve possible problems with Cyrillic.

Quick example. In Subs-TopStats.php you are using now:

if (strlen($row['real_name']) > 10)
{
    $row['real_name'] = substr($row['real_name'], 0, 10) . "...";
}


I suggest replace it (and all other similar lines) with it:

$row['real_name'] = shorten_subject($row['real_name'], 20);
Title: Re: Top Stats Forum Index
Post by: Doug Heffernan on June 10, 2020, 08:35:27 AM
Quote from: Bugo on June 10, 2020, 06:41:49 AM
Hi, Doug.

Please, use shorten_subject (https://support.simplemachines.org/function_db/index.php?action=view_function;id=240) function instead of substr(). It will help to resolve possible problems with Cyrillic.

Quick example. In Subs-TopStats.php you are using now:

if (strlen($row['real_name']) > 10)
{
    $row['real_name'] = substr($row['real_name'], 0, 10) . "...";
}


I suggest replace it (and all other similar lines) with it:

$row['real_name'] = shorten_subject($row['real_name'], 20);


Done Bugo. Thanks for the suggestion.
Title: Re: Top Stats Forum Index
Post by: shadav on June 10, 2020, 11:13:20 AM
just a suggestion maybe....instead of showing on the top of the index, maybe have it's own separate page as to not gunk up the index

maybe throw it into the stats page/info center
Title: Re: Top Stats Forum Index
Post by: MF30 on June 26, 2020, 05:56:19 PM
Thanks for this! Can you include in a future update one box with the top users who stay longer online?
Title: Re: Top Stats Forum Index
Post by: Doug Heffernan on May 13, 2022, 08:58:38 AM
The mod has been made compatible with the 2.1.x version. The TopForumStats21 package is compatible with the 2.1.x version.