MyBB Community Forums

Full Version: Basic Board Statistics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Basic Board Statistics
This is a simple tutorial to show you how to achieve a basic board statistics like the example below which is becoming more and more popular. The HTML can be re-ordered to suit your needs, and the CSS can be changed to match your forum.
For the example I use the default thead background image, if you change to your themes thead background image, it will match up with your theme.

[Image: 3a624798da5646a88d9c5b6.png]

HTML into the index template
<center>
<span class="smalltext">

<span class="stat">{$stats['numposts']}</span>
<strong>Total Posts</strong>

<span class="stat">{$stats['numthreads']}</span>
<strong>Total Threads</strong>

<span class="stat">{$stats['numusers']}</span>
<strong>Members</strong>

<span class="stat">{$stats['lastusername']}</span>
<strong>Newest Member</strong>

<span class="stat">{$mostonline['numusers']}</span>
<strong>Most Online</strong>

</span>
</center>

CSS into the global.css file of your theme
.stat {
    background: url(images/thead_bg.gif) repeat-x top left;
    border-radius: 5px 5px 5px 5px;
    color: #FFFFFF;
    margin-left: 15px;
    padding: 7px 14px;
}

Credits to: Me, Omar G. & Frank.Barry

Let me know if you have any questions.
Thank you very much brother!
Everyone seems to be getting these now -.-
^ Haha. Good ideas catch on.

I'm pretty sure I'm going to remove the statistics entirely soon, though -- I don't think it's interesting for most users, and half the registrations are spammers waiting to be pruned anyway ...
I do think the image of statistics is ugly currently with MyBB, that's why we changed them. But it's basically on every theme now and I wouldn't be surprised if it was requested to be changed in 1.8/2.0 to be honest lmao, even though it's a carbon copy of IPB.

As for users not finding them interesting, I guess it depends on the userbase. I know some users like to see if the site is big/small which can for some reason increase or decrease their desire of signing up. It's silly I know. I'm guilty myself of letting my curiosity get to me and finding it frustrating when statistics are hidden, especially section specific statistics. Would you want to remove those too or just the footer stats?
On the index I've removed them -- here's a mock-up: http://i.imgur.com/wf6fJ.jpg

It looked pretty bad leaving those numbers there after shrinking the table horizontally ... I think you can generally get a decent idea of activity just by looking at the date of the last post. That said, I'm trying to build gateways to interesting content into the homepage so users can learn about the site that way rather than through statistics.

I think that posts and topics are maybe the only stats that are even subjectively useful. Everything else can probably go.
(2012-06-15, 02:14 AM)brad-t Wrote: [ -> ]On the index I've removed them -- here's a mock-up: http://i.imgur.com/wf6fJ.jpg

It looked pretty bad leaving those numbers there after shrinking the table horizontally ... I think you can generally get a decent idea of activity just by looking at the date of the last post. That said, I'm trying to build gateways to interesting content into the homepage so users can learn about the site that way rather than through statistics.

I think that posts and topics are maybe the only stats that are even subjectively useful. Everything else can probably go.

Definitely. Looking at it again it does look pretty god damn beautiful on your site, but harajuju is so unique (loving the "latest looks" btw). On other sites when I see no section statistics I think it looks empty, but perhaps it's because I've become accustomed to that style.

But you've got it spot on, I feel if you're going to remove the statistics then replace it with something else, which you have done with those two sidebars and header bar. If you remove those and imagine you're using a typical MyBB free theme, having no statistics would look weird and empty imo.
Nice tutorial.. Thanks Big Grin

[Image: 8LhZX.png]
Thanks this worked Big Grin
Very nice, thank you.

Just noticed I'm on the credits haha, thanks (although no sure why I'm there.)
Pages: 1 2