Skip to:

Opened 3 years ago

Last modified 2 years ago

#5007 new enhancement

Is @jjj online now?

Reported by: sooskriszta Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 1.2
Component: 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
3 years ago

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

#2 @sooskriszta
3 years ago

I take it that something small and simple like this should do the trick (without the 2 checks mentioned above)
(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";}

Last edited 3 years ago by sooskriszta (previous) (diff)

#3 @karmatosed
2 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
2 years ago

  • Cc karmatosed@… added

#5 @modemlooper
2 years ago

Plugin territory for sure.

#6 @johnjamesjacoby
2 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.