BP Profile Search › hide members
-
AuthorPost
-
dominik
GuestHi,
i’m searching for a way to solve the following problem. First of all, you filter plugIn works very good. But i’m missing a function to hide at start all members. I don’t want to show the full list from beginning. I want to show the members only after the search. Is there a way to do that? Best regards.andrea
Plugin AuthorHi Dominik,
Unfortunately that feature is not available, but I’m adding it to my to-do list. Thanks for your suggestion!
Trevor
GuestWanted to second this suggestion. I just came here researching the same question. Love your plugin and could use the functionality as well.
andrea
Plugin AuthorThank you Trevor!
dominik
Guestthanks Andreas. When do you think we can expect the feature?
andrea
Plugin AuthorHi Dominik,
It’s hard to say, I’ll have to find some free time to think about it.
The problem is that BuddyPress shows the full directory by default and I’ll have to find a way to reverse this behavior.
dominik
GuestHi Andrea,
i think i have found a solution. Maybe you can double-check this.
bps-search.php
I have changed in function function bps_filter_members ($querystring, $object)
$request = bps_get_request ('search'); if (empty ($request)) return $querystring;
with
$request = bps_get_request ('search'); // Hide all members, if no search is active if (empty($request)) { parse_str($querystring, $args); $args['include'] = '0'; // Dummy-value, to be sure, to show no user return http_build_query($args); }
That works for me. Can you please check, if this is a good solution? You know your code better than me.
andrea
Plugin AuthorHi Dominik,
That’s a good idea, I hadn’t thought of that. I’m going to release a new version of BP Profile Search in a few days, maybe this weekend.
Thank you!
andrea
Plugin AuthorHi all,
The new BP Profile Search version 5.8.1 contains the feature you requested, please see BP Profile Search 5.8.1 for details.
Thanks again to Dominik for the idea and the code!
-
AuthorPost