MyBB Community Forums
[Tip&Trick]Hide Board Statisctic from guests! - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: [Tip&Trick]Hide Board Statisctic from guests! (/thread-50892.html)

Pages: 1 2


[Tip&Trick]Hide Board Statisctic from guests! - babjusi - 2009-06-06

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>



RE: [Tip&Trick]Hide Board Statisctic from guests! - ghazal - 2009-06-06

Thats really nice tutorial, New and unique
Good work !


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 2009-06-06

Thanks for the feedback ghazal.


RE: [Tip&Trick]Hide Board Statisctic from guests! - that_guy - 2009-06-06

Cool tut babjusi


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 2009-06-06

(2009-06-06, 08:59 PM)that_guy Wrote: Cool tut babjusi

Thanks.


RE: [Tip&Trick]Hide Board Statisctic from guests! - Starnova - 2009-11-14

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.


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 2009-11-14

(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


RE: [Tip&Trick]Hide Board Statisctic from guests! - Chrissy - 2009-11-15

Thanks for this Smile


RE: [Tip&Trick]Hide Board Statisctic from guests! - TheUninvited - 2011-04-28

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


RE: [Tip&Trick]Hide Board Statisctic from guests! - Sajuuk - 2011-04-28

This is like 2 years old, it's probably for an older MyBB version.