MyBB Community Forums

Full Version: [Tip&trick]Hide the members in the online list from guests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I had make such a mod for another forum software and recently adjusted it for a friend of mine who converted from that forum to mybb.

First of all you must have the PHP in Templates and Template Conditionals plug in installed: (Nice plug in btw, very usefeul too)

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

Replace the whole code in there with the following:

<if $GLOBALS['mybb']->user['usergroup'] == 1 then> 
<tr>
<td class="tcat"><span class="smalltext"><strong>Users on line disabled</strong></span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">Sorry guest but you are not authorised to view the online list.</span></td>
</tr>
<else>
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>
</if>

You can see the result in the screenshot attached below. Instead of the line list, it will show the guests the following message:

Users on line disabled
Sorry guest but you are not authorised to view the online list.

It is very handy for the privacy.

The message is hard coded, but you can add the language strings in the language files if you want.

If this is in the wrong place, then I apologize in advance to the mods/admins and feel free to delete it.
Nice tut babjusi. Any chance of making it in a plug in please?
(2009-06-05, 09:16 PM)that_guy Wrote: [ -> ]Nice tut babjusi. Any chance of making it in a plug in please?

Atm I don''t have so much time. But if anyone else wants to make a plug in out it, then they will be very much welcome to do so.

Later on when I will have some free time, I plan to start a new forum with mybb and deepen myself into it. It is a very nice forum, I like it quite a lot.
Good job Smile
Thanks Smile
Nice one.
(2009-06-06, 09:07 PM)labrocca Wrote: [ -> ]You're kidding me?

A better method...go into admincp edit the guest usergroup and untick the checkbox for "Can view who's online?" under the "Miscellaneous" tab.

Some trick ehh..

If you do that genius, then the online part will be totally hidden from view. Whereas like this, it adds a finer touch in my humble opinion. It leaves it in view for guests but instead of the active users at the online list, it shows the message that for privacy reasons they can''t see it Wink
thanks babjusi,

also we can add a register link to there..
you rock babjusi!
nice tut
(2009-06-13, 05:51 AM)Bilgecix Wrote: [ -> ]thanks babjusi,

also we can add a register link to there..

Yes, you can.

(2009-06-14, 05:31 PM)kaixer Wrote: [ -> ]you rock babjusi!
nice tut

Thanks.
Pages: 1 2