Advanced search in other screens
-
I would like to use advanced search on other screens, especially for searching for users to invite to groups etc.
Do you have a GitHub for submitting proposals?
I found these changes were needed to allow search to filter group member query
in bp-profile-search:
bps-templates47.php actions ll17-18:`
$dirs = bps_directories ();
$F->action = $dirs[$meta[‘action’]]->link;
`
change to:`
if (bp_is_group_members()){
$F->action = “?”;
}else{
$F->action = $dirs[$meta[‘action’]]->link;
}
`
bps-search.php l.50 change from:
`
if ($object != ‘members’ && $object != ”) return $qs;
if (bps_active_form () === false) return $qs;
`
to:
`
//allow the filter to apply to certain forms..
switch ($object) {
case ‘members’ :
case ‘group_members’ :
case ‘my-invite-form’ : //etc
if (bps_active_form () === false) return $qs;
break;
default:
return $qs;
}
`
and add to top of bps-form.php:
`
/* add also to group member directory */
add_action (‘bp_before_group_members_content’, ‘bps_add_form’);
add_action (‘bp_before_group_members_content’, ‘bps_display_filters’);
`
Also BuddyPress bp-groups-functions.php l.658 change to:
`
$members = new BP_Group_Member_Query( $r);
`
otherwise ‘include’ filter is lost.
Yes that would need proposing back to BuddyPress unless there is another way to do it..
- The topic ‘Advanced search in other screens’ is closed to new replies.