MyBB Community Forums

Full Version: Moving 'most users online'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. I'm attempting to move my "most users online" stats to a slightly different location than the default. Instead of the board statistics, I'd like it on the who's online section. Here's a picture to make it clearer as to what I want to do:

[Image: stats_zpsc77d3f65.png]

Seems easy enough as moving a single line of code to the designated area. So I tried that. But instead of getting the stats to show up, it only shows up as "The most users online at one time was {1} on {2} at {3}."

So the actual stats aren't loading. After about 40 minutes of tinkering with this, I got a bit frustrated and decided to just ask to see if anyone has an idea as to why it loads fine under the "stats" column but not under the "online" column. Thanks in advance!
Go to your Index templates and find {$lang->stats_mostonline} inside of index_stats

Cut that piece out and paste it into your index_whosonline template.

Should be good to go from there.
Yeah, I already tried that. The actual stats don't show up. This is the result:

[Image: stats2_zps6b19e0f3.png]
Strange. Worked for me.

You can alternatively use {$mostonline['numusers']} and that will pull the most online number. You won't have the date or time though.
That also doesn't seem to work sadly. At least not under the "Who is online" section. Only in the statistics section. For some reason, statistical information will not load in the who's online template at all Sad
(2013-01-06, 03:42 PM)Kylin Wrote: [ -> ]That also doesn't seem to work sadly. At least not under the "Who is online" section. Only in the statistics section. For some reason, statistical information will not load in the who's online template at all Sad

Anyone got answer?????? please tell me because I'm in same situation.

please help me it's urgent.


Thanks in advance
The reason it doesn't work is because the template is already evaluated before the variable is available. You'd need a plugin if you wanted to move it.