BP Profile Search › Special search case - help needed
-
AuthorPost
-
Alex
GuestI have the following search scenario. By the way, this is just an example!!
A dropdown field with different clothes, like jeans, trousers, skirts and so on. But I also have a field “all clothes” in this dropdown.
So when a user generates a search, he can chose between jeans, trousers… and the all clothes select field. BUT when he/she choses that, then it searches only other users who have also selected all clothes on registration.
But I want if a user selects that, all clothes PLUS jeans, trousers and so on is searched too?
How can I achieve that?
Alex
GuestJust a follow up on this. I have patched bps-xprofile.php file and it works like expected. But unfortunately on next update I will lose these mods.
Maybe you can offer such sort of search within the plugin or implement a filter/hook where I can make my mods without touching the plugin core? To make the function bps_xprofile_search() pluggable might help me as well.
Thanks, Alex
andrea
Plugin AuthorHi Alex,
Thanks for your suggestions!
Have you tried using the ‘bps_field_sql’ filter, called in bps-xprofile.php on line 162? Is it suitable for the customization you need?
Alex
GuestI am still testing but seems to work like a charm. Thanks so much for your hint!!!!
andrea
Plugin AuthorYou’re welcome, I’m glad it worked for you!
-
AuthorPost