Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#4347 closed enhancement (fixed)

Consider Adding Admin Option To Control How Long User is Considered Online

Reported by: frank13 Owned by: boonebgorges
Priority: normal Milestone: 1.8
Component: Members Version: 1.5.6
Severity: trivial Keywords: needs-patch
Cc:

Description

I made a hard coded change to/wp-content/plugins/buddypress/bp-core/bp-core-classes.php on line 246

Out-of-box:
$sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP()";

My Override:
$sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 15 MINUTE ) >= UTC_TIMESTAMP()"; // 2012-05-15 increased value to 15 minutes

Thank you for considering.

Change History (9)

#1 @frank13
14 years ago

  • Type defect (bug)enhancement
  • Version1.5.6

#2 follow-up: @boonebgorges
14 years ago

  • Component CoreMembers
  • Keywords 1.7-early added
  • Milestone Awaiting ReviewFuture Release
  • Severity normaltrivial

You may want to consider doing this with a filter on bp_core_get_paged_users_sql and bp_core_get_total_users_sql instead of modifying the core file.

I don't think it makes sense to have an admin option for this particular value (too few people really care about it), but I do think it's worth having a filter, so you don't have to resort to hacks.

#3 @frank13
14 years ago

Ok thanks @boonebgorges. I'll try to assemble a filter for it.

You don't think my hard coded override has anything to do with my "active sometime ago" issue do you?

#4 @boonebgorges
14 years ago

You don't think my hard coded override has anything to do with my "active sometime ago" issue do you?

I doubt it, but you should absolutely test on a totally clean, stock installation of BP.

#5 in reply to: ↑ 2 @frank13
14 years ago

Replying to boonebgorges:

You may want to consider doing this with a filter on bp_core_get_paged_users_sql and bp_core_get_total_users_sql instead of modifying the core file.

I can't seem to figure out how to override it short of my hard coded hack @boonebgorges

Version 0, edited 14 years ago by frank13 (next)

#6 @boonebgorges
14 years ago

  • Keywords needs-patch added; 1.7-early removed
  • Milestone Future Release1.7

#7 @johnjamesjacoby
14 years ago

  • Milestone 1.71.8

A setting for this makes sense, but not in 1.7. Moving to 1.8.

#8 @boonebgorges
13 years ago

  • Owner set to boonebgorges
  • Resolutionfixed
  • Status newclosed

In 7135:

Introduces bp_user_query_online_interval filter

This will allow site admins or plugins to adjust the number of minutes used as
an interval when querying for 'online' users using BP_User_Query.

Fixes #4347

#9 @boonebgorges
13 years ago

I'm going to introduce a filter for this purpose. No UI option for the moment. If it turns out that there's continued demand, let's handle it in a different release.

Note: See TracTickets for help on using tickets.