News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Top Posters, Top Topic Starters & Top Topics On a Board per Board Basis

Started by Doug Heffernan, April 10, 2019, 06:51:07 AM

Previous topic - Next topic

Doug Heffernan

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'], 06) . "..."


 

All you need to edit here is the number 6.

Arantor

Suggest you use $smcFunc['strlen'] there so that non-English/UTF-8 names are handled correctly.

Doug Heffernan

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.

Shades.

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

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

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.

Varlov

Any way to get this and the forum index version working on 1.2.4??

Doug Heffernan

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.

Varlov

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!


Advertisement: