Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: PeakFox on October 25, 2022, 12:55:23 AM

Title: Info Center Manager
Post by: PeakFox on October 25, 2022, 12:55:23 AM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4346)

Info Center Manager

This modification allows you to configure the following aspects of the "Info Center" display:

The mod has its own configuration page in the mod settings section of the admin panel.

Current localizations:

Version history:

Released under GPL-3.0-or-later.
Title: Re: Info Center Manager
Post by: -Rock Lee- on November 04, 2022, 09:39:56 PM
It took me some time but I was able to translate it completely :P I'll leave it attached.


Regards!
Title: Re: Info Center Manager
Post by: PeakFox on November 05, 2022, 09:38:23 AM
Quote from: -Rock Lee- on November 04, 2022, 09:39:56 PMIt took me some time but I was able to translate it completely :P I'll leave it attached.
Muchas gracias!  :)

Update 1.0b3 (https://custom.simplemachines.org/index.php?mod=4346) with Spanish translation now available.
Title: Re: Info Center Manager
Post by: Rick53 on February 28, 2023, 11:01:31 AM
Will there be an option in one of the next versions to also hide the forum statistics?
I couldn't find any modification that does this.
Title: Re: Info Center Manager
Post by: PeakFox on March 01, 2023, 02:08:49 PM
Quote from: Rick53 on February 28, 2023, 11:01:31 AMWill there be an option in one of the next versions to also hide the forum statistics?
I couldn't find any modification that does this.
Thanks for the suggestion. I'll see what I can do.
Title: Re: Info Center Manager
Post by: Rick53 on March 18, 2023, 04:48:32 AM
Quote from: PeakFox on March 01, 2023, 02:08:49 PM
Quote from: Rick53 on February 28, 2023, 11:01:31 AMWill there be an option in one of the next versions to also hide the forum statistics?
I couldn't find any modification that does this.
Thanks for the suggestion. I'll see what I can do.

Another suggestion:
Also hide the calendar in action center.

I don't want to deactivate the calendar completely, because I use TinyPortal to display appointments. It should only no longer be visible in the InfoCenter.
Title: Re: Info Center Manager
Post by: ThomasWi on February 06, 2024, 04:37:21 PM
I checked "Info Center Manager" in a fresh SMF docker setup.
In SMF 2.1.4 it does not work because the Settings are not available in "Modification Settings".
And in SMF 2.1.2 (last official supported version) my browser only shows an error message as soon as I tick "Show only latest reply per topic in "Recent Posts" section":
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/Sources/Class-InfoCenterMgr.php:107 Stack trace: #0 /var/www/html/Sources/Class-InfoCenterMgr.php(107): count(NULL) #1 /var/www/html/Sources/Subs.php(5759): PeakFox\InfoCenterMgr::markReadHook() #2 /var/www/html/Sources/BoardIndex.php(137): call_integration_hook('integrate_mark_...') #3 /var/www/html/index.php(191): BoardIndex() #4 {main} thrown in /var/www/html/Sources/Class-InfoCenterMgr.php on line 107

Hope that helps.
Title: Re: Info Center Manager
Post by: Diego Andrés on February 07, 2024, 01:11:31 PM
Installed on PHP 8.0+ and PHP 8.1+, it works fine.

Quote from: ThomasWi on February 06, 2024, 04:37:21 PMFatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/Sources/Class-InfoCenterMgr.php:107 Stack trace: #0 /var/www/html/Sources/Class-InfoCenterMgr.php(107): count(NULL) #1 /var/www/html/Sources/Subs.php(5759): PeakFox\InfoCenterMgr::markReadHook() #2 /var/www/html/Sources/BoardIndex.php(137): call_integration_hook('integrate_mark_...') #3 /var/www/html/index.php(191): BoardIndex() #4 {main} thrown in /var/www/html/Sources/Class-InfoCenterMgr.php on line 107

This is caused by the MOD not checking if the recent posts setting is set.
To fix, do the following in Sources/Class-InfoCenterMgr.php

Code (Search) Select
if (empty($modSettings['icm_limit_recent_posts']))
return;

Code (Replace) Select
if (empty($modSettings['icm_limit_recent_posts']) || empty($context['latest_posts']))
return;
Title: Re: Info Center Manager
Post by: jasland on March 26, 2024, 04:43:14 AM


In the "Recent Posts" section, the display can now be restricted to the latest post per topic only. This prevents posts in very active topics from "flooding" the "Recent Posts" section and permits recent posts from other topics to be shown as well.

The problem with this is that it slows down the forum every time you click on the forum tab, would anyone know how to solve it?

greetings