MyBB Community Forums

Full Version: Mini Stats
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

Instead of using:
{$lang->stats_posts_threads}

Which results in that long string, what code would just called the number of posts? E.g, instead of having "Our users have made a total number of blah blah blah" to just having "4,500" or whatever the post number is? Same for number of threads, who's online, total members and most online etc.

Help would be great, thanks Smile

EDIT:
Tried:
{$mybb->stats['numusers']}
But that didn't work either.
Not sure it will work in the template you will be trying to put this, but you could try:
{$stats['numthreads']}

Although, this is unformatted. You will need this plugin and use this code in the templates:
<func my_number_format>{$stats['numthreads']}</func>
{$stats['numthreads']}

^Works perfectly. Smile Obviously doesn't work with Who's Online or Most Online, so I don't suppose you have a solution to that? I can't really install a plugin because this is going in to a theme which I don't want to have to make the person using the theme install a plugin. Smile
For Most online you can use these variables:
{$recordcount}
{$recorddate}
{$recordtime}

And for Who's Online you will be able to use:
{$onlinecount}
{$membercount}
{$guestcount}
{$botcount}
{$onlinemembers}
Ah, Aries, thanks so much! That worked beautifully. Smile +rep
(2011-06-04, 02:49 PM)Jordan Lovelle Wrote: [ -> ]Ah, Aries, thanks so much! That worked beautifully. Smile +rep

No problem Wink