Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress.org’s Unified Search – How can I get it?

  • I couldn’t help noticing BuddyPress.org’s unified search feature. Love the idea of having a search form with no select options. The search results are also nice in that they display results from each section of the site. Is this coming to BP or is this a plugin of some sort?

Viewing 15 replies - 26 through 40 (of 40 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    @agrundner @anointed @mercime @finni3
    Thank you all :)
    @stwc
    That’s a little more complex as I guess It involves two things(programmatically auto creation of groups(easy) and then Andy seems to be using Group Extension API,group meta for achieving the review functionality, and may be a modified plugin which already does the review and rating). I hope, Andy is going to make it available, if not, obviously we can achieve the same, perhaps I will do something similar for one of my site in near future and will let you know :)

    @apeatling, you solution is easy, but I was doing it for a theme, so I had to consider generalized case when we don’t know which components will be active and which won’t, That’s why I used the do_action/add action approach. Further If you want to change the order of display of search result for components, It will be just a matter of changing the priority in the add action.
    @r-a-y, haha you were perfectly right :)


    Pisanojm
    Participant

    @pisanojm

    Three issues right now with Unified Search as far as my test…

    1. Seems like it is based on MU so it shows a search for “blogs”…
    Looks like this can be pulled by commenting the // show blogs search result section in the functions.php mod…

    2. It does not actually search the BLOG of the site (or doesn’t report it)… it shows a column for “blog search results” but does not populate… at least on my site. In other words, when I search for something that is clearly in a site blogpost, it returns nothing in the search results under Blog or Blogs..

    3. The Sidebar doesn’t show… at first glance, i thought it might be because it was using the -?php get_sidebar (); ?- pull but I changed that to -?php locate_template( array( ‘sidebar.php’ ), true ) ?- and it still doesn’t show (substituting – for brackets) …

    The CSS is a little messy… you can easily change this by adding the following to default.css and populating however …

    .memberss-search-result {
    display: block;
    border-bottom:2px dashed #628FBD ;
    margin: 12px;
    padding: 5px;
    color: #1B2C9E;
    }

    .groups-search-result {
    display: block;
    border-bottom:2px dashed #628FBD ;
    margin: 12px;
    padding: 5px;
    color: #1B2C9E;
    }

    .blog-search-result {
    display: block;
    border-bottom:2px dashed #628FBD ;
    margin: 12px;
    padding: 5px;
    color: #1B2C9E;
    }

    .blogs-search-result (display: block;
    border-bottom:2px dashed #628FBD ;
    margin: 12px;
    padding: 5px;
    color: #1B2C9E;
    }

    .forums-search-result {
    display: block;
    border-bottom:2px dashed #628FBD ;
    margin: 12px;
    padding: 5px;
    color: #1B2C9E;
    }

    Any Idea on how to fix 2 and 3 above? I would appreaciate it!


    Pisanojm
    Participant

    @pisanojm

    Ok, so I went back to this because it’s need in our site… I got most of it to work:

    #1. is fixed by pulling this code in the add-on to the functions.php


    //show blogs search result
    function bpmag_show_blogs_search(){
    ?>

    <a href="" >

    <?php
    }
    //Hook Blogs results to search page if blogs comonent is active
    if(bp_is_active( 'blogs' ))
    add_action("advance-search","bpmag_show_blogs_search",10);

    #2 DOES work… something wrong with something I did when I tested it.

    #3 Does NOT work despite reading through and trying a number of things a the DEV site.
    http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/

    I posted on the site to get some help.. if/when I get an answer I repost here…

    Is there still no fix??


    Pisanojm
    Participant

    @pisanojm

    @brajesh has updated this on his site and now, I can say it is working 100% for me and is a MUST have for all BuddyPress sites, IMHO.
    Here is the link:

    Creating The sitewide global/unified search Page for your Buddypress Theme


    Pisanojm
    Participant

    @pisanojm

    @brajesh Is there anyway to get the unified search to also search the Activity Stream? Seems like a lot of people are asking and nobody has a clear cut way to do it yet. My site now has hundreds of updates with some pretty good threads that we can’t search via the site.

    Here is a thread with some code and thoughts about this here:
    https://buddypress.org/community/groups/requests-feedback/forum/topic/search-activity/


    Builder
    Participant

    @bpuser44

    Just wondering did he fix also the pagination for each search term? next -next-page as many following search results pages there are for a term.


    Beck B
    Participant

    @beckb

    Genius discussion.

    EDIT: I’m just not quite clever enough today. Can this be made to work with Relevanssi? My search results are horrible, and I’d like the nicer excerpts and such that Relevanssi provides, also.


    chouxpastry2002
    Participant

    @chouxpastry2002

    awesommeee just found it too cool and exactly what i wanted hats off to Brajesh ji….

    I found a solution that works on the theme and supports updates to the core. This solution will let you use the search bar with the drop down menu and search for articles, members and groups.

    First, add this javascript inside the head tags in the header.php file of the theme:
    `

    var check_url = function() {
    var value = document.getElementById(“search-which”).value;
    if (value==”article”) {
    document.getElementById(“search_form”).method=”get”;
    document.getElementById(“search_form”).action=””;
    document.getElementById(“search-terms”).name=”s”;
    }
    else {
    document.getElementById(“search_form”).method=”post”;
    document.getElementById(“search_form”).action=””;
    document.getElementById(“search-terms”).name=”search-terms”;
    }
    }

    `

    And then replace the search form that comes with buddypress (inside the same header.php file) with this one:
    (to avoid confusions just look at the php lines that wrap the form)

    ` `
    `

    `


    `Members`
    ` Groups`
    `Articles`
    `<input type="submit" name="search-submit" id="searchsubmit" value="” onclick=”check_url()” />`

    `

    `

    ` `


    Micheal Kennedy
    Participant

    @intermike

    Needs updating.


    wilsontuladhar
    Member

    @wilsontuladhar

    Hi,
    I was trying ur solution to the unified search but everytime i do a search it only searches through the members. i did everything as instructed but it doesn’t work. Any ides??


    ewebber
    Participant

    @ewebber

    @wilsontuladhar you need the latest updated from Brajesh’s GitHub account, look for the link on his tutorial


    ewebber
    Participant

    @ewebber

    I am using @brajesh ‘s code on 1.5, but it’s no longer looping in forums, does anyone have the same issues?

    im using the latest code from brajesh… (BP 1.5), and it was working well in my custom theme, but i am having a problem on users log in and log out.. it didn’t redirect at all. Also it didn’t make the users log in nor log out… any solutions about this?

Viewing 15 replies - 26 through 40 (of 40 total)
  • The topic ‘BuddyPress.org’s Unified Search – How can I get it?’ is closed to new replies.
Skip to toolbar