Show Boardstats only to registered members

by linkzy - 01-07-2015, 04:13 PM
لا إله إلا الله‎
Posts:
6,327
Joined:
Jan 2015
Likes:
305
Credits:
45
Reputation:
165
2 Years of Service
#1
OP
Posted: 01-07-2015, 04:13 PM
You need php template conditional plugin activated

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:

PHP Code:
<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> 

| A- Best forever .. | v4hl - ;) | Addicted | Senpai | sad | Sensei | H | fdigl |
[Image: gZD4Fba.png]

We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
108
Credits:
1,946
Reputation:
25
2 Years of Service
#2
Posted: 01-07-2015, 04:32 PM
Don't see why it's useful, but nice tutorial.
gucci gang gucci gang gucci gang
Posts:
5,676
Joined:
Jan 2015
Likes:
1,538
Credits:
21,529
Reputation:
233
2 Years of Service
#3
Posted: 01-07-2015, 06:34 PM
You can hide who's online, but not the boardstats - MyBB Logic.
Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
Offline
Posts:
933
Joined:
Jan 2015
Likes:
83
Credits:
703
Reputation:
61
2 Years of Service
#4
Posted: 01-07-2015, 06:40 PM
(01-07-2015, 06:34 PM)Aoki Wrote: You can hide who's online, but not the boardstats - MyBB Logic.

Make your own forum software; AokiBB :nerdy:
[Image: XhhKTdF.png]
gucci gang gucci gang gucci gang
Posts:
5,676
Joined:
Jan 2015
Likes:
1,538
Credits:
21,529
Reputation:
233
2 Years of Service
#5
Posted: 01-07-2015, 06:42 PM
(01-07-2015, 06:40 PM)PORNSTAR Wrote:
(01-07-2015, 06:34 PM)Aoki Wrote: You can hide who's online, but not the boardstats - MyBB Logic.

Make your own forum software; AokiBB  :nerdy:

I don't really have time for that. Neither Amn.
Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)