Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Doug Heffernan on April 10, 2019, 06:51:07 AM

Title: Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis
Post by: Doug Heffernan on April 10, 2019, 06:51:07 AM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4227)

This mod will display top posters, top topic starters and top topics for each individual board on the message index page.

You can enable/disable the mod at its settings page in the Admin Panel as well as exclude boards from showing their top stats,

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 post them in the mod 's support topic.

This mod is released under Mozilla Public License 2.0 (MPL-2.0).
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Biology Forums on April 10, 2019, 03:49:16 PM
I like how it shows it per board. I think you should extend this to topic view too
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: njtweb on April 11, 2019, 01:59:16 AM
Excellent mod. I would need it to be responsive for my site though.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: -Rock Lee- on April 12, 2019, 09:44:54 AM
I could not leave you before the translations into Latin Spanish, whatever you tell me!


Regards!
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: sam666 on April 13, 2019, 05:55:10 AM
Love this mod. Thanks for doing it  :)
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: VirusLucky on August 21, 2019, 05:11:25 AM
Hi, is it possible to show the plugin in the forum?
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 30, 2020, 12:41:06 PM
Quote from: stoneageman on April 13, 2019, 05:55:10 AM
Love this mod. Thanks for doing it  :)

You are welcome :)

Quote from: VirusLucky on August 21, 2019, 05:11:25 AM
Hi, is it possible to show the plugin in the forum?

It can be done with minimal changes. I will submit a separate mod for that.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 02:21:01 PM
The mod has been made compatible with the 2.1.x version. The BoardStats21 package is compatible with the 2.1.x version.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 03:28:31 PM
Attempting to install... I get this error:

   3.   Extract File   ./Themes/default/BoardStats.template.php   File not found

I have not tried to ignore the error thus far.

;)

Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 05:11:17 PM
Quote from: FrizzleFried on May 13, 2022, 03:28:31 PMAttempting to install... I get this error:

   3.   Extract File   ./Themes/default/BoardStats.template.php   File not found

I have not tried to ignore the error thus far.

;)



I can not reproduce this. What package did you try to install?
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Steve on May 13, 2022, 05:23:45 PM
Works fine for me too @FrizzleFried
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:31:56 PM
I just re-downloaded the package (vers. 2.1) and attempted to install (on my sandbox site)...

ScreenHunter 442.jpg
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:35:51 PM
If there is supposed to be a BoardStats.template.php in the package somewhere... (which I think there is),  it's no in there. I just opened the zip file and it's missing.

EDIT: I think it should be right there...

ScreenHunter 443.jpg
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:36:39 PM
I suspect Steve already had said file in said default template hence he didn't experience the same issue?
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 05:42:32 PM
Quote from: FrizzleFried on May 13, 2022, 05:35:51 PMIf there is supposed to be a BoardStats.template.php in the package somewhere... (which I think there is),  it's no in there. I just opened the zip file and it's missing.

I had uploaded the wrong package by mistake. I am sorry for any inconvenience. I reuploaded the correct one now. Can you please try to download the package again?

Quote from: FrizzleFried on May 13, 2022, 05:36:39 PMI suspect Steve already had said file in said default template hence he didn't experience the same issue?

Steve had the correct package.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:43:52 PM
Thanks for the confirmation I am not as crazy as I thought I was...
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 05:46:53 PM
Quote from: FrizzleFried on May 13, 2022, 05:43:52 PMThanks for the confirmation I am not as crazy as I thought I was...

It was my fault. In my haste I had uploaded the incorrect mod package. I had uploaded first the correct package and then somehow it got mixed up with the incorrect one. Thank you for bringing it to my attention.

Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:48:24 PM
Working... however it needs a little tweaking.  Usernames are being cut off... etc...

ScreenHunter 444.jpg
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: FrizzleFried on May 13, 2022, 05:49:24 PM
BTW... I don't much care for TOPICERS (doesn't read right).  Maybe Top Topic Creators?
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Steve on May 13, 2022, 05:50:53 PM
I agree that Topicers feels wrong when trying to read it.

Quote from: FrizzleFried on May 13, 2022, 05:43:52 PMI am not as crazy as I thought I was...
Don't be so sure. :P
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 05:52:24 PM
Quote from: FrizzleFried on May 13, 2022, 05:48:24 PMWorking... however it needs a little tweaking.  Usernames are being cut off... etc...

It is by design. Because long usernames will break into a new line. You can adjust the number of how many characters of usernames you want to display by editing the following code at the BoardStats.php file.


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

 

All you need to edit here is the number 6.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Arantor on May 13, 2022, 05:54:14 PM
Suggest you use $smcFunc['strlen'] there so that non-English/UTF-8 names are handled correctly.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 13, 2022, 05:55:18 PM
Quote from: FrizzleFried on May 13, 2022, 05:49:24 PMBTW... I don't much care for TOPICERS (doesn't read right).  Maybe Top Topic Creators?

You can edit the phrasing to whatever you want by editing the BoardStats.english.php file inside the languages folder of the mod.

In this case the code that you are looking for is this.

$txt['top_topic_starters'] = 'Top Topicers';
Change Top Topicers to whatever text you like.
Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Shades. on May 14, 2022, 01:06:07 PM
SMF 2.1.2

Getting this error when this is set to "0"...

Board Stats Limit
This field controls the number of stats that will be displayed. By default it is set to show 5.:

But if I set it to "5" the error goes away!

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: board_stats_limit
File
/home/*****/public_html/*****/*****/Themes/default/languages/BoardStats.english.php
Line
13
URL of page causing the error
https://*****.*****.com/index.php?action=admin;area=modsettings;sa=boardstats

Backtrace information
#0: smf_error_handler()
Called from /home/*****/public_html/*****/*****/Themes/default/languages/BoardStats.english.php on line 13
#1: require()
Called from /home/*****/public_html/*****/*****/Sources/Load.php on line 3457
#2: template_include()
Called from /home/*****/public_html/*****/*****/Sources/Load.php on line 3117
#3: loadLanguage()
Called from /home/*****/public_html/*****/*****/Sources/BoardStatsAdminHooks.php on line 10
#4: BoardStatsAdminArea()
Called from /home/*****/public_html/*****/*****/Sources/Subs.php on line 5759
#5: call_integration_hook()
Called from /home/*****/public_html/*****/*****/Sources/Subs-Menu.php on line 75
#6: createMenu()
Called from /home/*****/public_html/*****/*****/Sources/Admin.php on line 460
#7: AdminMain()
Called from /home/*****/public_html/*****/*****/index.php on line 191

Title: Re: Top Posters, Top Topic Starters& Top Topics On a Board per Board Basis
Post by: Doug Heffernan on May 14, 2022, 05:02:50 PM
Quote from: Shades. on May 14, 2022, 01:06:07 PMSMF 2.1.2

Getting this error when this is set to "0"...

Thank you for reporting this. It has been fixed and the new package containing the fix has been uploaded.
Title: Re: Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis
Post by: Varlov on October 07, 2023, 09:40:01 AM
Any way to get this and the forum index version working on 1.2.4??
Title: Re: Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis
Post by: Doug Heffernan on October 07, 2023, 10:08:18 AM
Quote from: Varlov on October 07, 2023, 09:40:01 AMAny way to get this and the forum index version working on 1.2.4??

Did you mean 2.1.4? If so, the mod is compatible with the 2.1.x series.
Title: Re: Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis
Post by: Varlov on October 07, 2023, 10:12:33 AM
Quote from: Doug Heffernan on October 07, 2023, 10:08:18 AM
Quote from: Varlov on October 07, 2023, 09:40:01 AMAny way to get this and the forum index version working on 1.2.4??

Did you mean 2.1.4? If so, the mod is compatible with the 2.1.x series.
Oops typo - yes that's what I meant. Thank you very much!
Title: Re: Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis
Post by: Doug Heffernan on October 07, 2023, 10:38:59 AM
Quote from: Varlov on October 07, 2023, 10:12:33 AMOops typo - yes that's what I meant. Thank you very much!

No problem.