solved Can the search box for group members do more than finding member usernames?

researchcooperative
@researchcooperative
6 years ago
694 posts
@strumelia, @michael

On group pages in JR, there is a very nice panel that lists the profiles of members of the group.

When we expand the member list view, we are also shown a search box. This could be a useful thing for groups with many members.

Unfortunately, that search box only looks at the usernames of the group members. Profile data are not searched.

This means the search box is only useful if you are looking for someone with a user name that you already know.

For most people, a blank search box is in invitation to search using any keyword of interest.

Unless the limitations of the search box in this specific location are explained ("usernames only"), visitors will find the search more frustrating than useful.

My suggestion is to give Admin a simple way to configure the search box for group members (or any search box for that matter).

Default:
- all searchable profile data fields
Options:
- selected profile data fields,
- usernames only

It is also useful to display options (for all visitors) to view the group member list according to:

first letter, newest, most viewed

This or something similar might also be good for the group member list (perhaps based on the status of the member in the full site member list, not just within the group).

For reference, I show the sort and search options now displayed on my main member index page (the result of a skin customization). This works very well.


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 08/24/18 03:02:04AM
gary.moncrieff
gary.moncrieff
@garymoncrieff
6 years ago
865 posts
If memory serves module searches are a simple code line, to which you can add additional parameters to search. Check the group index and group page detail pages code to see if the see the reference.
updated by @garymoncrieff: 05/12/18 05:01:42AM
michael
@michael
6 years ago
7,692 posts
Currently the only fields that are searched on are
* user_name
* profile_name

And the only way to customize that is to setup a listener on 'db_search_params' and add in the field you want to search for into the search event.

--
In your custom module something like this
function xxYourModule_db_search_params_listener($_data, $_user, $_conf, $_args, $event)
{ global $_post; if (isset($_post['module_url']) && isset($_post['ss']) && strlen($_post['ss']) > 0) { $_data['search'] .="|| profile_bio = %{$_post['ss'}%"; } return $_data; }

So you'd just append
||profile_bio = %whatever%
and any other fields you wanted to search.
researchcooperative
@researchcooperative
6 years ago
694 posts
Thanks, good to know.

This is something I might eventually request as a paid customization for my skin.


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)