MyBB Community Forums

Full Version: [Tip&Trick]Hide Board Statisctic from guests!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This will allow you to hide the Board Statistic from guests. To have an idea how the mod looks like in action, please check the screenshots attached at the end of this topic Smile

First of all you must have the PHP in Templates and Template Conditionals plug in installed:

http://community.mybboard.net/thread-31860.html

After you install that plug in, go to the Acp of your forum-Templates & Style-Templates-Default Templates-Index Page Templates-index_boardstats.

Replace the whole code in there with the following:

<if $GLOBALS['mybb']->user['usergroup'] == 1 then> 
<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 style="margin:0 auto;text-align:center"><strong>Board Statistics disabled</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
<tr>
		<td class="trow1"align="center">
<strong>Welcome Guest!<br /> The Board Statistics can be seen by registered members only!You are welcomed to join our community. <a href="member.php?action=register">Register</a><br />
Already a member? <a href="member.php?action=login">Login</a></strong></td>
</tr>
</tbody>
</table>
<br />
<else>
<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">{$lang->markread}</a> |
			<a href="showteam.php">{$lang->forumteam}</a> |
			<a href="stats.php">{$lang->forumstats}</a>
		</span>
	</td>
</tr>
</tbody>
</table>
<br />
</if>
Thats really nice tutorial, New and unique
Good work !
Thanks for the feedback ghazal.
Cool tut babjusi
(2009-06-06, 08:59 PM)that_guy Wrote: [ -> ]Cool tut babjusi

Thanks.
You are the best. I have used several of your plugins... your skin... and also I love this tut. Thank you for all the help.
(2009-11-14, 05:27 AM)Starnova Wrote: [ -> ]You are the best. I have used several of your plugins... your skin... and also I love this tut. Thank you for all the help.

Thank you for your feedback and kind words. They are higly appreciated Smile
Thanks for this Smile
would u explain more how to install i didht get itConfused i didht do the first part because i cant understand i did the second about to replace the code at the template it didht worked nothing showed up
This is like 2 years old, it's probably for an older MyBB version.
Pages: 1 2