MyBB Support

Adding Board Stats on Sidebar.

Submitted by Rape, , Thread ID: 25512

Thread Closed

RE: Adding Board Stats on Sidebar.

Deleted_44
Fhrer of Amestris
Divine
Level:
0
Reputation:
95
Posts:
754
Likes:
196
Credits:
7.85K
17-12-2016, 03:16 PM
#2
I remember what you're trying to do, this looks similar to that forum without the font awesome icons. This is my lazy way of doing things, pretty bad code but I can fix it up a bit if you want me to add anything extra.

Anyway add this code above {$sidebar} in your index template.

Code:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>Board Statistics</strong></td>
</tr>
<tr>
<td class="trow1" style="padding:10px;">
<div style="float: left;display: inline-block">
Total Threads:
</div>
<div style="float: right;display: inline-block">
{$stats['numusers']}
</div>
</td>
</tr>
<tr>
<td class="trow1" style="padding:10px;">
<div style="float: left;display: inline-block">
Total Posts:
</div>
<div style="float: right;display: inline-block">
{$stats['numposts']}
</div>
</td>
</tr>
<tr>
<td class="trow1" style="padding:10px;">
<div style="float: left;display: inline-block">
Total Members:
</div>
<div style="float: right;display: inline-block">
{$stats['numusers']}
</div>
</td>
</tr>
<tr>
<td class="trow1" style="padding:10px;">
<div style="float: left;display: inline-block">
Most Online:
</div>
<div style="float: right;display: inline-block">
{$mostonline['numusers']}
</div>
</td>
</tr>
</table>
<br />

And expecto patronum you have the stats in the sidebar Smile
[Image: MyxvDN6.png]

Users browsing this thread: 1 Guest(s)