Special search case – help needed

BP Profile Search Special search case - help needed

  • Author
    Post
  • #12549 Reply
    Alex
    Guest

    I 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?

    #12550 Reply
    Alex
    Guest

    Just 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

    #12551 Reply
    andrea
    Plugin Author

    Hi 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?

    #12554 Reply
    Alex
    Guest

    I am still testing but seems to work like a charm. Thanks so much for your hint!!!!

    #12557 Reply
    andrea
    Plugin Author

    You’re welcome, I’m glad it worked for you!

Reply to: Special search case - help needed
My Information