MyBB Support

Adding Board Stats on Sidebar.

Submitted by Rape, , Thread ID: 25512

Thread Closed
17-12-2016, 01:59 PM
#1
Hello,

How do I add the BoardStats to sidebar as you can find it on various forums? I want to know how to do this without affecting my latest post on sidebar plugin.

RE: Adding Board Stats on Sidebar.

#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]

RE: Adding Board Stats on Sidebar.

OP
#3
17-12-2016, 03:16 PM
ExaWrath Wrote:
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]

Exactly where?

[Image: 1zx2tz8.jpg]

RE: Adding Board Stats on Sidebar.

#4
17-12-2016, 03:27 PM
Rape Wrote:
Exactly where?

[Image: 1zx2tz8.jpg]

Inbetween the ...19%;"> and {$sidebar}

RE: Adding Board Stats on Sidebar.

#5
Can you really never Google anything?
[Image: InZ3hGx.png]

RE: Adding Board Stats on Sidebar.

#6
17-12-2016, 03:29 PM
Faded Wrote:
Can you really never Google anything?

That's my thought for most of the people that post in this section

RE: Adding Board Stats on Sidebar.

#7
17-12-2016, 07:06 PM
Addicted Wrote:
That's my thought for most of the people that post in this section

He makes a thread needing help like every day..
[Image: InZ3hGx.png]

Users browsing this thread: 4 Guest(s)