I'm looking for a setting to remove the Info Center for guests as I don't see the need to share that information for random lookie-loos. How can this be done?
Well, there isn't a setting for it you could always just force it for logged in users in BoardIndex.template.php
Like so:
if($context['user']['is_logged'])
{
template_info_center();
}
Quote from: Gary on October 16, 2021, 12:28:41 PMWell, there isn't a setting for it you could always just force it for logged in users in BoardIndex.template.php
Like so:
if($context['user']['is_logged'])
{
template_info_center();
}
Thanks. I like that idea but I couldn't find BoardIndex.template.php or template_info_center() anywhere. I expected to find template_info_center() someplace and then put the condition around it. I will admit that I'm sometimes dense about these things.
Should be in Themes/current_theme/BoardIndex.template.php
If your theme does not have a BoardIndex.template.php file, you can edit the one from the default theme in Themes/default
Quote from: Diego Andrés on October 16, 2021, 12:56:18 PMIf your theme does not have a BoardIndex.template.php file, you can edit the one from the default theme in Themes/default
And to follow on from that you then upload it into the folder of your
current theme and not the default if this ends up being the case.
Thanks to both of you. I'm just using the default theme and your tips helped me better understand that how themes work. (Found it strange that when I 'searched' all my files on my host that template_info_center(); never showed up but that's a different issue I'll figure out later.)
Quote from: wakewatcher on October 16, 2021, 01:29:28 PMThanks to both of you. I'm just using the default theme and your tips helped me better understand that how themes work. (Found it strange that when I 'searched' all my files on my host that template_info_center(); never showed up but that's a different issue I'll figure out later.)
I use notepad++ For editing my sites files just carried out the above update on my 2.0.18 forum Thanks For that lol, I found it without a problem.
smf 2.0.18 default theme BoardIndex.template.php
search for
template_info_center
you should have 2 instances
the one that you need to change
template_info_center();
and then directly below that
function template_info_center()
The way I did it was to add the last bit in red to the BoardIndex Template.php
Quote* Displays the info center
*/
function template_info_center()
{
global $context, $options, $txt;
if (empty($context['info_center']) || $context['user']['is_guest'])
return;
There's also these two mods:
https://custom.simplemachines.org/index.php?mod=2473
https://custom.simplemachines.org/index.php?mod=3929 (I'm using this one and it works great)