Skip to:
Content
Pages
Categories
Search
Top
Bottom

Integrating BP search into custom components


  • Jan M.
    Participant

    @jotem

    Hi,

    I’m currently working on a custom component that stores some data in custom tables in the BuddyPress database.

    Is there a way to extend the BP search-function, so users can search for the data in my custom component?

    I know this will involve core-hacking (almost certainly…), but for my purpose this is ok. Also this question isn’t about SQL, I should get that, it’s about adding the search functionality, output etc. to BP.

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • No. Better search is something planned for the future. This would be a really useful contribution or perhaps addon if you had the time and skill to come up with something generic and awesome.


    Sarah Gooding
    Member

    @pollyplummer

    What else would it take beyond adding it in here at the core?

    function bp_core_action_search_site( $slug = false ) {
    global $bp;

    if ( $bp->current_component == BP_SEARCH_SLUG ) {
    $search_terms = $_POST;
    $search_which = $_POST;

    if ( !$slug || empty( $slug ) ) {
    switch ( $search_which ) {
    case ‘classifieds’ : default:
    $slug = ”;
    $var = ‘/?s=’;
    break;
    case ‘members’:
    $slug = BP_MEMBERS_SLUG;
    $var = ‘/?s=’;
    break;

    I’m trying to do this too but not having any luck…


    @mercime
    Keymaster

    @mercime

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Integrating BP search into custom components’ is closed to new replies.
Skip to toolbar