Editing forum stats is probably a bad idea, I guess. I got the idea from THIS THREAD (https://www.simplemachines.org/community/index.php?topic=365513.msg2498405#msg2498405).
Regular members can't see the normal forum stats but I don't mind users seeing Who's Online. I just don't want them to view "Most Online Today, Most Online Ever..." Would that be the "more stats" part of that block of code in BoardIndex.template.php? If so, I don't seem to be able to comment that out cleanly, I get a syntax error.
That should be my new user name: Syntax Error. :(
I assume it can be done... just not by me, apparently.
find
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>
and either remove it or comment it out
IF YOU COMMENT IT OUT then you will need to move the '; to a new line
so then find
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
replace
// <p class="last smalltext">
// ', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
// ', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
// </p>
';
hm strange...
I tried commenting it out but it still shows up with the comments
I also tired
/** <p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p> */
';
same thing, it still showed up but with the comment...
I guess removing it is the only option
Hi, Shadav, and thanks so much! So.... just try deleting that very last block of code you showed?
EDIT: Deleted this
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
and left the closing </p>';
That seems to have sorted it! Thank you so much! :)
np :)
hehehe yes those pesky syntax errors and unable to load template above :laugh:
it's almost always a forgotten echo ' or the closing ';
That's why I never close a file I'm editing or quit my ftp... so I can hit "Undo" and get the "hell outta Dodge"! :D
the problem was that you were still making the edits within an echo....
you needed to move the '; to BEFORE the commented lines
Quote from: Kindred on January 21, 2021, 01:46:09 PM
the problem was that you were still making the edits within an echo....
you needed to move the ; to BEFORE the commented lines
ahhh, that makes sense
because the echo is basically telling it to display this information rendering the comments as text....
:laugh: dang echos anyways :P