TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,965
  • Latest: boruko
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 431
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 145
  • Total: 146
  • @rjen

[solved] How can the name-list of "Who's online" hide for hidden user & guests?

Started by DeVIL-I386, November 16, 2013, 06:39:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DeVIL-I386

Link to my forum: http://www.linuxmintusers.de/index.php
SMF version: 2.0.6
TP version: 1.107
Default Forum Language: German

First of all, thank you for this great mod (TinyPortal). :)

I want the user to hide their online status, do not see the name-list of "Who's online".
What a change you have to make it?

./Themes/default/TPsubs.template.php
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt['online_users'].'</a></h5>
<div style="line-height: 1.3em;">';

$online = ssi_whosOnline('array');
echo  $bullet. $txt['tp-users'].': '.$online['num_users']. '<br />
'. $bullet. $txt['tp-guests'].': '.$online['guests'].'<br />
'. $bullet. $txt['tp-total'].': '.$online['total_users'].'<br />
<div style="max-height: 23em; overflow: auto;">';

foreach($online['users'] as $user)
{
echo  $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '
</div></div>';
}

ZarPrime

Hello DeVIL-I386,

Welcome to the TinyPortal Support Site.

Are you referring to the "Users Online" area of the TinyPortal Stats Block?  If a member is hidden, their online status should indeed be hidden for other members.  However, they will not be hidden to themselves and to Admins.  Instead, hidden members online status will be in italics when viewed by Admins.

For instance, I have temporarily just set my online status here to not show.  You shouldn't see me online in the stats block, even though I am online.

Oh, and BTW, I looked at your site and it appears that you are not using the latest version of TinyPortal on that site.  Instead, it appears that you are using "TinyPortal 1.0 RC2".  There have been many changes and fixes between that version and the most recent version.  For that reason, you should consider upgrading to the latest version.

ZarPrime

DeVIL-I386

#2
Hello ZarPrime. Thanks for the welcome.

Sounds crazy: Users who feel the need to hide their online status, should not also see the name-list of who's online. Guests as well.

Quote from: ZarPrime on November 16, 2013, 07:23:27 PM
Oh, and BTW, I looked at your site and it appears that you are not using the latest version of TinyPortal on that site.  Instead, it appears that you are using "TinyPortal 1.0 RC2".  There have been many changes and fixes between that version and the most recent version.  For that reason, you should consider upgrading to the latest version.
Since the wrong backup was restored by another admin. Outdated backup recorded by the hoster (after hardware damage). >:(




Is this the latest version?
The version of GitHub (https://github.com/IchBin/TinyPortal) gives me problems.
This prevents access to our wiki. (index.php?action=wiki).

ZarPrime

Oh, I see what you are saying.  You mean that if someone hides their online status, you think they should not be able to see anyone else's online status, to punish them or something? ^-^

That would definitely take a change to the TP code.  Maybe Ichbin has an idea on that.

ZarPrime


DeVIL-I386

Quote from: ZarPrime on November 16, 2013, 08:01:52 PM
You mean that if someone hides their online status, you think they should not be able to see anyone else's online status, to punish them or something? ^-^
Exactly what I mean.  :)

Quote from: ZarPrime on November 16, 2013, 08:05:38 PM
The latest version of TP is at http://custom.simplemachines.org/mods/index.php?mod=97
Thanks for the confirmation. I was afraid they might be a little outdated.




I revised the first post again. It's all about the name-list of "Who's Online".

ZarPrime

Well, as far as Guest go, you can just choose to hide the "Stats" block to Guests and they won't see it.  Hiding the list of members online from hidden members is a little more problematic.  Ichbin, our developer, wold have a better idea about that than I would.  Wait until he comes back online and hopefully he will see this topic.

ZarPrime


IchBin

In Themes/default/TPsubs.template.php find this code:

foreach($online['users'] as $user)
{
echo  $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}


Replace with this code:
foreach($online['users'] as $user)
{
if ($context['user']['id'] == $user['id'] && !empty($user['hidden']))
continue;
echo  $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}



Just remember, that this only hides them in the TP stats block. Users can still see who's online at the bottom of the board index in the info center.

DeVIL-I386

Great. I thank you both for your help!

Too early happy. Unfortunately it does not work. :(

I tested it with 2 forums.

This website is proudly hosted on Crocweb Cloud Website Hosting.