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

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Babjusi's Previous Forum General Stuff (/forumdisplay.php?fid=42)
+--- Forum: General Support (/forumdisplay.php?fid=46)
+---- Forum: Tutorials (/forumdisplay.php?fid=50)
+---- Thread: [Tip&Trick]Hide Board Statisctic from guests! (/showthread.php?tid=1099)


[Tip&Trick]Hide Board Statisctic from guests! - babjusi - 11-29-2009 05:39 PM

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! - Starnova - 01-09-2010 08:21 PM

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?


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-10-2010 08:43 AM

(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?


RE: [Tip&Trick]Hide Board Statisctic from guests! - Starnova - 01-10-2010 02:06 PM

http://www.webxforum.com

Thank you...Tongue


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-10-2010 02:33 PM

(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.


RE: [Tip&Trick]Hide Board Statisctic from guests! - Starnova - 01-11-2010 01:04 AM

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.


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-11-2010 11:10 AM

(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.


RE: [Tip&Trick]Hide Board Statisctic from guests! - Starnova - 01-15-2010 05:02 AM

Yes it does work and I thank you so much!Smile


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-15-2010 02:19 PM

Glad to have been of help Smile


RE: [Tip&Trick]Hide Board Statisctic from guests! - X-n3t - 01-23-2010 08:52 PM

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 ?


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-24-2010 12:51 PM

(01-23-2010 08:52 PM)X-n3t Wrote:  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 ?

In what template did you add the code? You should add it at the template of your custom theme.


RE: [Tip&Trick]Hide Board Statisctic from guests! - X-n3t - 01-25-2010 11:22 AM

i added that in default template cause u said that . i will try at my coustom theme


RE: [Tip&Trick]Hide Board Statisctic from guests! - babjusi - 01-25-2010 12:05 PM

(01-25-2010 11:22 AM)X-n3t Wrote:  i added that in default template cause u said that . i will try at my coustom theme

I said for the default template cos that is where I used it. But for it to work on a custom theme you must add it at that theme''s template.


RE: [Tip&Trick]Hide Board Statisctic from guests! - Gpizzle - 05-23-2011 09:00 PM

great simple thanks for this Big Grin