Who among my friends is online?

Tamás Varga Posted in Technical Support 10 months ago

I disabled the OSSNchat 5.5 component. Now there is no indication which of my friends is online. I don't want to use the ossnchat5.5 component. I need to know who is online. Is this possible?

German Michael Zülsdorff Replied 10 months ago

You wanted to see who of your friends is online, right?
Thus, you would click the "Friends" tab, and as before - only friends will be displayed - not all members.
If you want to see all members, search for people.
This time you'll see all members - being marked the same way.

Hungarian Tamás Varga Replied 10 months ago

Can I see my friends online with this, or all users?

German Michael Zülsdorff Replied 10 months ago

So the result with both methods implemented looks like

So the result looks like

Still one thing you should be aware of is that the member-activity update intervals are longer when OssnChat is disabled. Thus, by chance you may pick a member who is still marked as being online but has logged off already.

German Michael Zülsdorff Replied 10 months ago

One way could be to add a 'online check' while running the foreach loop in
system/plugins/default/output/users.php like

    foreach ($users as $user) {
    $online_class = '';
    $online_icon = '';
    if ($user->isOnline()) {
        $online_class = ' user-icon-online';
        $online_icon = ' <i class="fa fa-wifi"></i>';

The method of marking depends on the theme in use. With GreenByGreen, member icons are available throughout all display sizes. That's why I can simply add a colorizing 'online-class' to them, defined in theme's CSS like

.user-icon-online {
border-color: #77d560;
border-width: 1.9px;
border-style: solid;


While on themes which are missing member icons in mobile view, my idea was adding a fontawesome 'wifi' icon next to the member name.

To get an idea, I implemented both methods like:

echo '<img class="user-icon-small' . $online_class . '" src="' . $user->iconURL()->small . '">'; // green border
echo ossn_plugin_view('output/url', array(
    'text' => ' ' . $user->fullname . $online_icon, // extra wifi icon 
    'href' =>  $user->profileURL(),
    'class' => 'userlink',
in Georgeann Flynn Replied 10 months ago

Only you can know.