SMF 2.1.1 Default Theme - No Mods
Where do I control the Info Center ? I don't want the following information visible to guest and would like to be selective as to which member groups can see it. If I can turn it off completely, that will also work.
In the Info Center:
Users Online
The line below is what I want to make unviewable by guests:
Online: 0 Guests, 1 User - Most Online Today: 0 - Most Online Ever: 0 (Apr 26, 2022, 03:36 PM)
In Configuration> General I unchecked the boxes below but that does not change what is displayed in the info center.
Track statistics - (Unchecked)
Track daily page views (statistics tracking must be enabled) - (Unchecked)
Unchecked view forum statistics permission for guests.
There is no setting for parts or for permissions. It's either on or off.
However, the section that you are referring to is not even part of the info center. That is always on, no setting.
You'd have to modify the template code. (I think it's in boardindex.template.php, or maybe index.template.php)
I guess the biggest question is, why? What, specifically, are you trying to accomplish by not letting guests see that info?
This will remove Users Online for guests -
BoardIndex.template.php
function template_ic_block_online()
{
global $context, $scripturl, $txt, $modSettings, $settings;
if (!$context['user']['is_guest']) {
// "Users online" - in order of activity.
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>';
}
echo '
</p>';
}
}
Don't forget to add the curly bracket at bottom.
Or you can try this mod https://custom.simplemachines.org/index.php?mod=3929 ;)
It works on 2.1.1 just have to click on "emulate for 2.0" in package manager after you upload it.
Or... instead of modifying the code in the function, modify the display/call for the function...
I modified the code exactly as shown but get an error: Parse error: syntax error, unexpected '}', expecting end of file
I modified the code exactly as shown but get an error: Parse error: syntax error, unexpected '}', expecting end of file
Looked at the mod, Looks like it will work for me. Will try it of I can't get the error fixed.
I installed the mod and does what I want to do.
Thanks to everyone who replied.