Mini Stats for mybb

1
Quote:
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]

how to do it
1-) Go to Admin Cp
2-) Go to Templates & Style section
3-) Go to the theme templates
4-) Go to Your Theme >> Index Templates >> Index_boardstats
5-) Select to Edit in Advanced Mode
6-) Find-

[size=1]<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
{$forumstats}
<tr>
<td class="tfoot" style="text-align: right">
<span class="smalltext">
{$logoutlink}
<a href="misc.php?action=markread{$post_code_string}">{$lang->markread}</a> |
<a href="showteam.php">{$lang->forumteam}</a> |
<a href="stats.php">{$lang->forumstats}</a>
</span>
</td>
</tr>
</tbody>
</table>



7-) Replace it with -

{$forumstats}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
<tr>
<td style="text-align: right">
<span>
{$logoutlink}
<a href="misc.php?action=markread{$post_code_string}">{$lang->markread}</a> |
<a href="showteam.php">{$lang->forumteam}</a> |
<a href="stats.php">{$lang->forumstats}</a>
</span>
</td>
</tr>
</tbody>
</table>


[Image: icon_cool.gif] Again go to Index Templates >> index_stats



9-) Find




<tr><td class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}
{$lang->stats_numusers}
{$lang->stats_newestuser}
{$lang->stats_mostonline}
</span>
</td>
</tr>



10-) Replace it With

<div style="text-align: center;"> <span class="statround">{$stats['numposts']}</span> Total Posts <span class="statround">{$stats['numusers']}</span> Total Members <span class="statround">$newestmember</span> Newest Member <span title="{$recorddate}, {$recordtime}"><span class="statround">{$mostonline['numusers']}</span> Most Online</span><span class="statround">{$stats['numthreads']}</span> Total Threads
</div>


11-) Next Go to Your Theme>> global.css and Edit it Advanced Mode ,

Add the Following Code:



[/size]
.statround {
background: #98c22a;
color: #ffffff;
padding: 4px 10px;
margin-left: 20px;
border-radius: 4px;
}

.statround a:link,
.statround a:visited {
color: #ffffff;
}

.statround a:hover,
.statround a:active {
color: #444444;
}


[size=1][/size][size=1][/size]
[Image: An9XX.gif]
Edit the post using quick edit...

    Mini Stats for mybb
İlginizi çekebilir:
  • Mybb: what to do if got hacked!