Who's Online Plugin (discourse-whos-online)

(David Taylor) #82

Ah, I see what you’re trying to do now.

I have no plans to add that level of customisation I’m afraid, as I think it makes the configuration even more confusing than it already is. Admins can always use the “active users” page in the admin panel to see who’s online.

(David Taylor) #83

I’ve just updated the plugin with the ability to show online status on avatars.

This can be in the form of “glow” (default):


Or “flair”:

There is a new site setting whos_online_avatar_indicator which allows you to choose between these two options, or disable the feature entirely. The default is “glow”.

By default the indicator is visible in:

  • User card
  • User profile page
  • Post avatars
  • “Topic map” (the list of users involved in a topic, displayed under the OP)

Use the whos_online_avatar_indicator_topic_lists setting to also enable for:

  • Mobile topic lists
  • “Categories & Latest” topic list

The plugin description above has been updated with the changes.

(gauthier) #84

Works perfectly! Thanks a lot!

(gauthier) #85

Huuum, on mobile I had this:

The first one is still green but is still not online…

(David Taylor) #86

Oops, bit of a CSS hiccup there. Should be fixed now if you update the plugin. Thanks for reporting :slight_smile:


I just want to say that I love that plugin! :slight_smile: Thanks!

(DiscourseMetrics.com) #88

Just a suggestion @david, add “pointer-events: none” to the green flair circle so it is easier to click on the avatar :slight_smile: If you click on the green circle it won’t register as a click.

(David Taylor) #89

Thanks for the suggestion - this is now added.

I have also added a third indicator type: “ring”. I think it’s a little cleaner than the glow, but different styles may suit different forums.


There is now also a delay on the mouseover animation, as discussed earlier in this topic:

(DiscourseMetrics.com) #90

I believe there may be a performance issue with this plugin on the latest Discourse. After upgrading from beta7 to beta8 and pulling in the latest version of Who’s online, I started getting reports from users that the page was lagging and crashing, especially in Firefox but also in chrome on android. One user was notified that the browser tab had crashed and was asked if he wanted to debug the crash:

I’m not sure if I’m interpreting the screenshot correctly, but on the lower right, is that an array with over 62k objects in it? Is that correct?

I run a fairly active site (150 online at peak periods) so perhaps there are too many listeners or messages being sent? I’m not sure, but once I disabled the plugin the crashes have stopped :slight_smile:

Let me know if there is anything I can do to help.

A tour of how the Widget (Virtual DOM) code in Discourse works
(David Taylor) #91

Thanks for the report - the forum I run has nowhere near that number of users! I’ll have a look at what optimisations can be done.

If you disable the new “online indicators” setting then I’m fairly sure it will bring performance back to where it was before the recent update. Can you give that a try and let me know?

(Stephen Chung) #92

@DiscourseMetrics.com JavaScript arrays are hash dictionaries. Do not treat them as C/C++/C#/Java arrays. This merely means there is a property named 62680 in the object i, nothing else. The object may even contain only one property (which means that it is a sparse array).

(David Taylor) #93

Thanks to some help from @eviltrout, I think the performance issue you had should be fixed now. :smile:

Please can you try updating to the latest version of the plugin, re-enable ‘avatar-indicators’ and see how you get on?


@david I’ve got the same performance issue in my forum, but after last update it looks like is again OK!

(DiscourseMetrics.com) #95

I’ll give it a go tonight :slight_smile: Have to do upgrades at night when there are fewer members online :wink:

(Chris Beach) #96

Thanks for this plugin, I gave it a try and really like it.

After adding it to my (local community) forum, I ran a poll and got some user feedback:

In summary, some people were concerned that they couldn’t hide their online status, and several others preferred the simple forum UI without the online list.

(David Taylor) #97

Interesting feedback, thanks for sharing.

I’ve thought about adding an option for users to opt-out, but haven’t got around to it yet. My concern with adding it is something that a few of your users mentioned. Essentially:

I don’t mind knowing about other people, but I don’t want other people to know I’m online

I think that’s a pretty natural reaction for people to have, but as soon as lots of people opt-out, the feature becomes entirely useless.

If I do add the ability to opt-out, it will be behind a site setting so that forum admins can make the decision for themselves. I don’t think I’ll get around to it any time soon, but #pr-welcome if any developers want to implement it :slight_smile:

(Andrew Waugh) #98

Perhaps just show a grey circle to indicate “hide my status” users? This would still give a visual cue as to how many users are logged in. Unless the Discourse instance runs a chat plugin, it isn’t really of burning interest to know who, specifically, is online - it’s nice to know, but it hasn’t got much practical utility.

For our instance Who’s online gives me a quick visual cue about how much activity there is at this moment. We don’t run a chat.

(DiscourseMetrics.com) #99

@david: Everything seems to be working great now, thanks for the quick fix! :slight_smile:

(Jay Pfaffman) #100

Hey, @david. It seems that Who’s Online is somehow disabling the New Message button on the Messages page.

I thought it was a theme, but when I disable the plugin (with safe-mode or turning it off in settings) the New Message button comes back.

(David Taylor) #101

Thanks, should be fixed by Fix missing “New Message” button on user profile · davidtaylorhq/discourse-whos-online@b3bf2aa · GitHub