MyBB Community Forums

Full Version: Adding a statistic to Board Statistics page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

On the index page, there is a statistic that states: "The most users online at one time was (#) on (date) at (time)". Interestingly, the actual Board Statistics page does not have this stat. How would I add the most online stat to the Board Statistics page?

I tried copying the {stat->mostonline} (something like that) from the index page to the Board Statistics page, but it did not work. 

Thanks!
index pages 

{$forums}
{$boardstats}   <------- this is statistic (most online etc)

in mybb forum
The most users online at one time was 3,055 on 06-25-2016 at 08:03 PM

index_stats (index stats templates)

{$lang->stats_mostonline}

edit lang

ACP >> configuration >> languages >> your languages forum >> option (edit language variable) >> index.lang >>

stats_mostonline
The most users online at one time was {1} on {2} at {3}
(08-05-2016, 03:57 AM)ziuma Wrote: [ -> ]index pages 

{$forums}
{$boardstats}   <------- this is statistic (most online etc)

in mybb forum
The most users online at one time was 3,055 on 06-25-2016 at 08:03 PM

index_stats (index stats templates)

{$lang->stats_mostonline}

edit lang

ACP >> configuration >> languages >> your languages forum >> option (edit language variable) >> index.lang >>

stats_mostonline
The most users online at one time was {1} on {2} at {3}

Hi, thanks for the reply but I don't think you are addressing what I'm asking. To clarify, I want to show the Most Online statistic on the stats.php page, which houses stats such as average posts and most popular threads, etc. I would prefer to put the Most Online stat under General tab in the stats.php page.

I tried copying the {$lang->stats_mostonline} into the stats.php page under the General tab, but it did not work.
You will need to create a plugin for it.
(08-05-2016, 06:57 AM)Omar G. Wrote: [ -> ]You will need to create a plugin for it.

Just curious, why would something this simple need a plugin? I was hoping I could copy the language code that references most online or something onto the stats.php page.
It needs a plugin because copying the language code that references "most online" data is not going to work just like that. Try copying and you will see.

You will see the language string lacks some information, that information needs to be assigned using a plugin or directly inserting new code into the stats.php file.