Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

#5953 closed enhancement (fixed)

Make behavior of members widget mirror groups widget

Reported by: dcavins Owned by:
Milestone: 2.2 Priority: low
Severity: minor Version:
Component: Members Keywords: has-patch dev-feedback
Cc:

Description

The members widget specifically passes search terms => false to bp_has_members(), which seems odd because the groups widget ignores search terms, so bp_has_groups() can use them if they exist (which is handy for uses on search results pages and such).

I'm attaching two patches. The first just moves the existing members widget code around to what I think is a more logical place: bp-members/bp-members-widgets.php

The second allows search terms to act on the members widget. (And assumes that the first has been applied.)

Attachments (2)

5953a.2.patch (32.0 KB) - added by dcavins 6 years ago.
Moves members widgets code to bp-members-widgets.php
5953b.patch (1.5 KB) - added by dcavins 6 years ago.
Allow search terms to be used in member widgets

Download all attachments as: .zip

Change History (8)

@dcavins
6 years ago

Moves members widgets code to bp-members-widgets.php

@dcavins
6 years ago

Allow search terms to be used in member widgets

#1 @dcavins
6 years ago

If possible, please remove the first patch file 5953a.patch. I had a problem with git diff.

Thanks!

#2 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to 2.2

Thanks for the patch, dcavins. We'll take a look as we dive into 2.2 dev :)

#3 @r-a-y
6 years ago

In 9323:

Members: Move member-related widgets over from Core.

Also adds PHPDoc @since tag to related classes and functions.

Props dcavins.

See #5953.

#4 follow-up: @r-a-y
6 years ago

  • Keywords dev-feedback added
  • Milestone changed from 2.2 to Future Release

Thanks for the patches, dcavins.

I've committed the move of the member widgets from bp-core to bp-members.

About allowing search terms in member widgets, see #5318. This would basically revert changes to that ticket, but I agree that we should have some uniformity. Either allow search terms across all widgets or none at all.

Going to move this to Future Release for now.

#5 in reply to: ↑ 4 @dcavins
6 years ago

Replying to r-a-y:

About allowing search terms in member widgets, see #5318. This would basically revert changes to that ticket, but I agree that we should have some uniformity. Either allow search terms across all widgets or none at all.

Thanks, r-a-y. I agree about uniformity, and am not hung up about the widgets respecting search terms. It's handy in some cases, but I can imagine that it would conflict in others. And, as boone said in #5318, it's easy to copy the code to build your own, if you want them to use the search terms.

#6 @boonebgorges
6 years ago

  • Milestone changed from Future Release to 2.2
  • Resolution set to fixed
  • Status changed from new to closed

It's not so much that we don't want to respect search terms, it's that we don't want the widgets to obey $_GET['s'] (or whatever the param is). If someone wanted a custom widget for group search, that would of course be fine. But that would be a custom widget. Let's mark this as fixed.

Note: See TracTickets for help on using tickets.