MyBB Community Forums

Full Version: "WhatsApp" privacy mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

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>
¿Pero donde es definido $mybb->user['invisible'] ?
Omar, es la casilla que tiene cada usuario en su panel de control.

Privacidad: Esconderme de la lista de 'Quién está en línea'.


Pongo unas capturas por si no queda claro:

Sin marcar la casilla

[Image: fVlp03p.jpg]

Vemos de forma correcta la gente online:

[Image: PlPI5bu.jpg]

Marcando la opción.

[Image: 8CHnlpY.jpg]

No vemos a nadie.
[Image: 6jr0CxL.jpg]



Tampoco se podría "espiar" a través del memprofile

[Image: XiCHto3.jpg]
No sabia que esa opcion existia para ser honesto (o no la recordaba). Se aprende algo nuevo cada dia Toungue

Thanks for the tutorial.
Jejeje, es que los usuarios de mi foro se obsesionan mucho con la privacidad Smile
Un saludo.