MyBB Community Forums

Full Version: Implementing Board Statistics Icons on Index Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: pabD5j6.jpg]

As you can see, we are going to implement three icons: Who's Online, Today's Birthday and Stastics at the Board Statistics area of Index page.

First go to:
ACP > Templates & Styles > Templates > {theme_name} Templates > Index Page Templates > index_birthdays

Replace with:
<tr><td colspan="2" class="tcat"><span class="smalltext"><strong>{$lang->todays_birthdays}</strong></span></td></tr>
<tr>
<td class="trow1" align="center" valign="center"><img src="{$theme['imgdir']}/bdayicon.png" /></td>
<td class="trow1"><span class="smalltext">{$bdays}</span></td>
</tr>

Next open:
ACP > Templates & Styles > Templates > {theme_name} Templates > Index Page Templates > index_boardstats

Replace with:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td  colspan="2" 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  colspan="2" 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>
<br />

Next open:
ACP > Templates & Styles > Templates > {theme_name} Templates > Index Page Templates > index_stats

Replace with:
<tr><td  colspan="2" class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1" align="center" valign="center"><img src="{$theme['imgdir']}/staticon.png" /></td>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>

If you want to convert your 4 line stats in a 2 line sleek compact look then replace with this code:
<tr><td  colspan="2" class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1" align="center" valign="center"><img src="{$theme['imgdir']}/staticon.png" /></td>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}
{$lang->stats_mostonline}<br />
{$lang->stats_numusers}
{$lang->stats_newestuser}
</span>
</td>
</tr>

Lastly open:
ACP > Templates & Styles > Templates > {theme_name} Templates > Index Page Templates > index_whosonline

Replace with:
<tr>
<td  colspan="2" class="tcat"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1" align="center" valign="center"><img src="{$theme['imgdir']}/usericon.png" /></td>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

Now place three image icons "bdayicon.png", "staticon.png" & "usericon.png" in your theme image folder.

I'm attaching three icons for your ready use matching with default theme:

[Image: S5MHo.png] [Image: 5grK8.png] [Image: E7SoY.png]
Screenshot of the result? Nevermind, please delete this post.
Screenshot updated at main post. Previous one was broken. Sorry.