Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Requests & Feedback

Feature requests; criticism.

Search Activity (26 posts)

Started 2 years, 2 months ago by: Nahum

  • Profile picture of Nahum Nahum said 2 years, 2 months ago:

    Is search coming to the activity directory? that would be a very interesting, powerful component.

  • Profile picture of Andy Peatling Andy Peatling said 2 years, 2 months ago:

    Yes you can actually already do this if you add a text box to your theme. You need to pass the parameter ‘search_terms’ into the activity loop.

    http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

  • Profile picture of Nahum Nahum said 2 years, 2 months ago:

    Something like this? I got it to work this way in a custom page template but not in the activity index. any help…on getting it to work in the activity dir where its bp_ajax_querystring( ‘activity’ ) and some other differences like the filter select.

    <?php
    
    $searchterm = $_POST['searchterm'];
    
    ?>
    
    <form NAME ="form1" METHOD ="post" ACTION = "<?php bloginfo('url'); ?>/search">
    
    <input TYPE = "TEXT" id="whats-new"   Name="searchterm" value="" >
    
    <INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Search Activity">
    
    </form>
    
    <?php if ( bp_has_activities('search_terms=' . $searchterm) ) : ?>

  • Profile picture of Andy Peatling Andy Peatling said 2 years, 2 months ago:

    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘&search_terms=’ . $searchterm) ) : ?>

  • Profile picture of MJ Banco MJ Banco said 2 years ago:

    Hi, I’m new here. Any updates on this? How do I put this on the default template? I’ve tried using the codes above on the index but it won’t show up. Thanks

    I’m running WordPress 2.9.2 and BuddyPress 1.2.2.1 by the way.

  • Profile picture of Nahum Nahum said 1 year, 11 months ago:

    @butterscotchproxy i’ll revisit this…I had implemented it and didn’t like it, it was a bit junkie but it worked…maybe I’ll take it further this time around, i’ll get back with where to put it, i forgot and will have to look again.

  • Profile picture of Pisanojm Pisanojm said 1 year, 10 months ago:

    @r-a-y is there a piece of code somewhere that will allow us to add activity search from the drop down box on BP 1.2+ I was checking out the unified search topic here, but ran into a couple of issues with it…

  • Profile picture of r-a-y r-a-y said 1 year, 10 months ago:

    First you’ll need to add an additional option to the BP dropdown select menu for “activity”.
    Check out the “bp_search_form_type_select” filter in bp_search_form_type_select() (located in bp-core-templatetags.php) to add your own.

    Then you’ll need to modify the bp_ajax_querystring so it adds the search_terms parameter as Andy has stated above.
    Check out the “bp_dtheme_ajax_querystring” filter in the bp-default theme’s /_inc/ajax.php.

  • Profile picture of Pisanojm Pisanojm said 1 year, 10 months ago:

    Oh…. you guys have too much faith in my ability to comprehend all of this…. I’m a Symphony Conductor! Ok, I’ll give it whirl tonight. :) Thanks.

  • Profile picture of Anton Anton said 1 year, 9 months ago:

    @pisanojm, did you get it to work?

  • Profile picture of Pisanojm Pisanojm said 1 year, 9 months ago:

    No, I did not. But, I didn’t spend too much time on it… I was on to other things…

  • Profile picture of Pisanojm Pisanojm said 1 year, 9 months ago:

    I moved on to the unified search again.. and now am using that.

  • Profile picture of paulhastings0 paulhastings0 said 1 year, 9 months ago:

    @pisanojm Would you mind posting the guide/tutorial that you’re using for unified search? I’d be interested in that.

  • Profile picture of Anton Anton said 1 year, 9 months ago:

    Much needed

  • Profile picture of Builder Builder said 1 year, 9 months ago:

    Some things are here visit the link and read the posts. The other guy updated the tutorial on his site. I think it’s not so easy because also forum search on BP org here when you click on the topic second third and so forth search result pages it gets you error. Pity.
    http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/buddypress-orgs-unified-search-how-can-i-get-it/