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.


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.


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!

Type of error
Error message
8: Undefined index: board_stats_limit
URL of page causing the error

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 - Custom Logos - My Themes on SMF | My Themes on ShadesWeb - Sniffing out the road ahead

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.