2014-03-29, 05:44 PM
The point with this tutorial is that if a user marks the option in his control panel to hide from Who is online, in my opinion, it's fair that he can't see what other users are doing.
To achieve this, a few edits:
NOTE: required template conditionals
http://community.mybb.com/thread-31860.html
NOTE2: phrases are in Spanish, but I think that not explanation is needed.
1) Disallow for visitors the option to see Who is online!
2) in online.php, after first if add another if, like so:
3) In template index_whosonline
replace with:
4) in template member_profile , replace strong>{$lang->postbit_status}</strong> {$online_status} with:
To achieve this, a few edits:
NOTE: required template conditionals
http://community.mybb.com/thread-31860.html
NOTE2: phrases are in Spanish, but I think that not explanation is needed.
1) Disallow for visitors the option to see Who is online!
2) in online.php, after first if add another if, like so:
if($mybb->usergroup['canviewonline'] == 0)
{
error_no_permission();
}
if ($mybb->user['invisible'] ==1 )
{
error("Si quieres ver los usuarios online, debes permitir que también te puedan ver a ti. Desmarca la opción en el panel de control","No puedes ver usuarios online");
}
3) In template index_whosonline
replace with:
<if ($GLOBALS['mybb']->user['invisible'] == 1 ) then>
<tr>
<td class="tcat"><span class="smalltext"><strong>No puedes ver usuarios online</strong></span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">Si quieres ver los usuarios online, debes permitir que también te puedan ver a ti. Desmarca
la opción en el panel de control</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>
4) in template member_profile , replace strong>{$lang->postbit_status}</strong> {$online_status} with:
<if ($GLOBALS['mybb']->user['invisible'] == 1 ) then>
<strong>{$lang->postbit_status}</strong> Si quieres ver los estados de los demás, debes permitir que también te puedan ver a ti. Desmarca
la opción en el panel de control
<else>
<strong>{$lang->postbit_status}</strong> {$online_status}
</if>