News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF 2.0.14 - Showing statistics on Board Index

Started by GL700Wing, May 29, 2017, 07:51:29 PM

Previous topic - Next topic

GL700Wing

As per the attached images when the checkbox for Admin -> Current Theme -> Show statistics on board index is empty the statistics are shown on the board index and when it is selected they are not.

As far as I can tell the following code in ./Themes/default/BoardIndex.template.php controls this behaviour.
function template_main()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;

    // Show some statistics if stat info is off.
    if (!$settings['show_stats_index'])

The comment and code indicate that statistics should be shown when 'stat info/show_stats_index' are off.

However, given the description of the option is to 'Show statistics on board index' I thinks the comment and code in ./Themes/default/BoardIndex.template.php should be as follows:
function template_main()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;

    // Show some statistics if stat info is on.
    if ($settings['show_stats_index'])
Life doesn't have to be perfect to be wonderful ...

Arantor

There is some behaviour about this also affecting what is shown in the info centre lower down, and that the option has been misleading for so long that through simple inertia it won't be changed in 2.0 at least.

GL700Wing

Quote from: Arantor on May 30, 2017, 02:26:44 AM
There is some behaviour about this also affecting what is shown in the info centre lower down, and that the option has been misleading for so long that through simple inertia it won't be changed in 2.0 at least.
OK - thanks for letting me know.
Life doesn't have to be perfect to be wonderful ...

Deaks

in honesty its simple case of changing a text string.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Arantor

Quote from: BryanD on May 30, 2017, 08:22:04 AM
in honesty its simple case of changing a text string.

Not entirely. If you have it on, you get one set of statistics, if you have it off you get a different set of statistics. I never figured out how to appropriately word it.

Deaks

Quote from: Arantor on May 30, 2017, 12:48:34 PM
Not entirely. If you have it on, you get one set of statistics, if you have it off you get a different set of statistics. I never figured out how to appropriately word it.

Still a text string that needs updated and expanded ...
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: