News:

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

Main Menu

Info Center Manager

Started by PeakFox, October 25, 2022, 12:55:23 AM

Previous topic - Next topic

PeakFox

Link to the mod

Info Center Manager

This modification allows you to configure the following aspects of the "Info Center" display:
  • The "Users Online" section can now be hidden, while still showing the "Recent Posts" section
  • 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 mod has its own configuration page in the mod settings section of the admin panel.

Current localizations:
  • English
  • German
  • Spanish (thanks to -Rock Lee-)

Version history:
  • 2022-10-24: 1.0b3 (translation to Spanish)
  • 2022-10-24: 1.0b2 (for SMF 2.1.2)

Released under GPL-3.0-or-later.

-Rock Lee-

It took me some time but I was able to translate it completely :P I'll leave it attached.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

PeakFox

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 with Spanish translation now available.

Rick53

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.

PeakFox

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.

Rick53

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.

ThomasWi

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.

Diego Andrés

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;

SMF Tricks - Free & Premium Responsive Themes for SMF.

jasland



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

Advertisement: