[buddypress-trac] [BuddyPress Trac] #4096: bp_ajax_querystring bug with include, exclude

buddypress-trac noreply at wordpress.org
Tue Apr 5 18:46:38 UTC 2016


#4096: bp_ajax_querystring bug with include, exclude
----------------------------------+----------------------
 Reporter:  chochal               |       Owner:
     Type:  defect (bug)          |      Status:  closed
 Priority:  normal                |   Milestone:
Component:  Component - Activity  |     Version:  1.5.4
 Severity:  major                 |  Resolution:  invalid
 Keywords:  needs-patch           |
----------------------------------+----------------------
Changes (by boonebgorges):

 * status:  reopened => closed
 * resolution:   => invalid
 * milestone:  2.6 =>


Comment:

 @navichawla92 - What was originally reported here was a (purported) bug
 related to pagination. What you're requesting is not really related to the
 current ticket: a way to order results based on the order of the `include`
 IDs passed.

 This sounds to me like it's too specialized a sort-order to include in
 BuddyPress itself, but you should be able to modify the sort order in any
 way you'd like using the `bp_activity_paged_activity_sql` filter. I'm not
 100% sure I understand what you're trying to accomplish - it sounds to me
 like you are confusing `include` (which refers to activity IDs) with
 `user_id` (which refers to user IDs). But, as an example, you can sort
 according to the `include` param by modifying the MySQL query so that it
 looks like this:

 {{{
 SELECT ... WHERE ... ORDER BY FIELD(id, 23, 24, 136, 2, 27 ...)
 }}}

 You can change `id` to `user_id` if you want to sort by user ID instead.

 Good luck!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4096#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list