MyBB Codes

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>
Hi Babjusi... I had downloaded and installed the plugin http://community.mybboard.net/thread-31860.html and it installed properly. Then followed word by word your directions here. Don't know why but it will not work for me. I came back to make sure I did it correctly and I have, yet my stats show for guests. I am using 1.4.11 of mybb. Any ideas?
(01-09-2010 08:21 PM)Starnova Wrote: [ -> ]Hi Babjusi... I had downloaded and installed the plugin http://community.mybboard.net/thread-31860.html and it installed properly. Then followed word by word your directions here. Don't know why but it will not work for me. I came back to make sure I did it correctly and I have, yet my stats show for guests. I am using 1.4.11 of mybb. Any ideas?

Can you post here the url to your forum please?
(01-10-2010 02:06 PM)Starnova Wrote: [ -> ]http://www.webxforum.com

Thank you...Tongue

You must place it at the index_boardstats template of the custom theme that you are using cos I checked the source at your forum and it wasn''t there. But try to adjust the code above to that of your custom theme though.
ohhh I guess that is the problem I was using the default one. Geeze now that I re-read that again, but I remember it saying the default and DUH.. that meant the template you set at default. Thank you for another great tut.
(01-11-2010 01:04 AM)Starnova Wrote: [ -> ]ohhh I guess that is the problem I was using the default one. Geeze now that I re-read that again, but I remember it saying the default and DUH.. that meant the template you set at default. Thank you for another great tut.

Didi you manage to get it to work now? If you still need help with it, post here the contents of the index_boardstats template of your custom theme and I will put the whole code together for you to use.
Yes it does work and I thank you so much!Smile
Glad to have been of help Smile
problem here .
I followed all the steps . downloaded phptpl.php
go to the Acp of your forum-Templates & Style-Templates-Default Templates-Index Page Templates-index_boardstats.
deleted the old code and added th new one

After loging out as a guest i still can see board statics , why ?
Pages: 1 2
Reference URL's