MyBB Community Forums

Full Version: Move Forum Statistic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone! How i can move the Forum stats? I want to move it to a new position.

Heres a picture to you understand!

http://prntscr.com/5t8imo
This is possible, but requires a lot af changes in the index templates:

Template index

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$forums}
{$boardstats}

<!--<dl class="forum_legend smalltext">
	<dt><span class="forum_status forum_on" title="{$lang->new_posts}"></span></dt>
	<dd>{$lang->new_posts}</dd>

	<dt><span class="forum_status forum_off" title="{$lang->no_new_posts}"></span></dt>
	<dd>{$lang->no_new_posts}</dd>

	<dt><span class="forum_status forum_offlock" title="{$lang->forum_locked}"></span></dt>
	<dd>{$lang->forum_locked}</dd>

	<dt><span class="forum_status forum_offlink" title="{$lang->forum_redirect}"></span></dt>
	<dd>{$lang->forum_redirect}</dd>
</dl>-->
<br class="clear" />
{$footer}
</body>
</html>

Template index_boardstats

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead{$collapsedthead['boardstats']}" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.png" 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" colspan=2>
		<span class="smalltext">
			{$logoutlink}
			<a href="misc.php?action=markread{$post_code_string}">{$lang->markread}</a> |
			<a href="showteam.php">{$lang->forumteam}</a>
			{$statspage}
		</span>
	</td>
</tr>
</tbody>
</table>
<br />

Template index_stats

<tr><td class="tcat" colspan = "2"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
<td class="trow1">
<span class="forum_legend smalltext">
  <span class="forum_status forum_on" title="{$lang->new_posts}"></span><span>{$lang->new_posts}</span><br />
  <span class="forum_status forum_off" title="{$lang->no_new_posts}"></span><span>{$lang->no_new_posts}</span><br />
	<span class="forum_status forum_offlock" title="{$lang->forum_locked}"></span><span>{$lang->forum_locked}</span><br />
	<span class="forum_status forum_offlink" title="{$lang->forum_redirect}"></span><span>{$lang->forum_redirect}</span><br />
</span>
</td
</tr>

Template index_whosonline

<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1" colspan="2"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

Template index_birthdays


<tr><td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->todays_birthdays}</strong></span></td></tr>
<tr>
<td class="trow1" colspan="2"><span class="smalltext">{$bdays}</span></td>
</tr>

Here the final results of my test forum:

[attachment=33529]
Thanks man! It worked!