Skip to:

Opened 5 years ago

Last modified 5 years ago

#5007 new enhancement

Is @jjj online now?

Reported by: sooskriszta Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version: 1.2
Component: Members Keywords:
Cc: karmatosed@…


"Online now" would be a good feature to have.

There are 2 aspects to it:
1) @username is online now (on the username's profile page, card etc)
2) Who's online now filter for member directory.

There would ideally be 2 checks built into the function:
1) Has admin of community disabled this feature - not all communities may want or need it.
2) Has username turned this feature off in her profile? Some users may want to work stealthily even if admin has enabled this feature.

Change History (6)

#1 @sooskriszta
5 years ago

At least it is infinitely more useful than "online since" which we currently have.

#2 @sooskriszta
5 years ago

I take it that something small and simple like this should do the trick
(Thanks, naijaping)

global $bp;
function check_is_user_online($user_id){
if ( bp_has_members( 'type=online&include='.$user_id) ) return true;
else return false;
$this_id = bp_displayed_user_id();
$is_online = check_is_user_online($this_id);
if ($is_online) echo "Online Now";
else{ echo "Offline";}

Version 1, edited 5 years ago by sooskriszta (previous) (next) (diff)

#3 @karmatosed
5 years ago

I personally feel this is more a plugin as it requires a switch I'd love to see it as a plugin at least first.

#4 @karmatosed
5 years ago

  • Cc karmatosed@… added

#5 @modemlooper
5 years ago

Plugin territory for sure.

#6 @johnjamesjacoby
5 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 1.0 to 1.2

We already sort of do this with the last_activity usermeta. We could continue using this, and switch the last-active members query to use a more performant transient array of last active user ID's, which would allow us to dial down the last_activity interval to something less 5 minutes.

Either way, to do any of this will take a significant rethink, so moving to future release.

Note: See TracTickets for help on using tickets.