MyBB Tutorials

Show Boardstats only to registered members

Submitted by linkzy, , Thread ID: 5418

Thread Closed
linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
01-07-2015, 04:13 PM
#1
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 | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Show Boardstats only to registered members

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
01-07-2015, 04:32 PM
#2
Don't see why it's useful, but nice tutorial.

RE: Show Boardstats only to registered members

Aoki
retired
Level:
83
Reputation:
348
Posts:
7.89K
Likes:
2.3K
Credits:
1.7K
01-07-2015, 06:34 PM
#3
You can hide who's online, but not the boardstats - MyBB Logic.

RE: Show Boardstats only to registered members

AAA
Offline
Level:
0
Reputation:
73
Posts:
834
Likes:
110
Credits:
582
01-07-2015, 06:40 PM
#4
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]

RE: Show Boardstats only to registered members

Aoki
retired
Level:
83
Reputation:
348
Posts:
7.89K
Likes:
2.3K
Credits:
1.7K
01-07-2015, 06:42 PM
#5
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.

Users browsing this thread: 1 Guest(s)