Advertisement:

Author Topic: Top Stats Forum Index  (Read 1062 times)

Offline Doug Heffernan

  • Full Member
  • ***
  • Posts: 643
    • An Unofficial King of Queens Forum
Top Stats Forum Index
« on: June 10, 2020, 01:08:57 AM »
Link to Mod

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).

Offline gorbi

  • Jr. Member
  • **
  • Posts: 169
    • https://www.facebook.com/s.gorbachevsky on Facebook
    • @gorbachevsky on Twitter
Re: Top Stats Forum Index
« Reply #1 on: June 10, 2020, 03:31:49 AM »
Top for what period of time? Can you make a selection choice - day, week, month?

Offline Doug Heffernan

  • Full Member
  • ***
  • Posts: 643
    • An Unofficial King of Queens Forum
Re: Top Stats Forum Index
« Reply #2 on: June 10, 2020, 04:28:45 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.

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,614
  • Gender: Male
    • dragomano on GitHub
    • Support me on Ko-fi
Re: Top Stats Forum Index
« Reply #3 on: June 10, 2020, 06:41:49 AM »
Hi, Doug.

Please, use shorten_subject function instead of substr(). It will help to resolve possible problems with Cyrillic.

Quick example. In Subs-TopStats.php you are using now:
Code: [Select]
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:
Code: [Select]
$row['real_name'] = shorten_subject($row['real_name'], 20);

Offline Doug Heffernan

  • Full Member
  • ***
  • Posts: 643
    • An Unofficial King of Queens Forum
Re: Top Stats Forum Index
« Reply #4 on: June 10, 2020, 08:35:27 AM »
Hi, Doug.

Please, use shorten_subject function instead of substr(). It will help to resolve possible problems with Cyrillic.

Quick example. In Subs-TopStats.php you are using now:
Code: [Select]
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:
Code: [Select]
$row['real_name'] = shorten_subject($row['real_name'], 20);

Done Bugo. Thanks for the suggestion.

Offline shadav

  • Full Member
  • ***
  • Posts: 682
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: Top Stats Forum Index
« Reply #5 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

Offline MF30

  • Jr. Member
  • **
  • Posts: 121
Re: Top Stats Forum Index
« Reply #6 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?