[Tip&Trick]Hide Board Statisctic from guests!
#1
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>


Attached Files Thumbnail(s)
   
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#2
Thats really nice tutorial, New and unique
Good work !
Reply
#3
Thanks for the feedback ghazal.
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#4
Cool tut babjusi
Reply
#5
(2009-06-06, 08:59 PM)that_guy Wrote: Cool tut babjusi

Thanks.
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#6
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.


Reply
#7
(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
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#8
Thanks for this Smile
Reply
#9
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
Reply
#10
This is like 2 years old, it's probably for an older MyBB version.
No PM support
My YouTube
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)