Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Activity


  • Nahum
    Participant

    @nahummadrid

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

Viewing 25 replies - 1 through 25 (of 25 total)
  • 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.

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


    Nahum
    Participant

    @nahummadrid

    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) ) : ?>

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


    MJ Banco
    Participant

    @butterscotchproxy

    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.


    Nahum
    Participant

    @nahummadrid

    @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.


    Pisanojm
    Participant

    @pisanojm

    @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…


    r-a-y
    Keymaster

    @r-a-y

    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.


    Pisanojm
    Participant

    @pisanojm

    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.


    Anton
    Participant

    @antonrsa

    @pisanojm, did you get it to work?


    Pisanojm
    Participant

    @pisanojm

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


    Pisanojm
    Participant

    @pisanojm

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


    paulhastings0
    Participant

    @paulhastings0

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


    Anton
    Participant

    @antonrsa

    Much needed


    Builder
    Participant

    @bpuser44

    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.
    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/buddypress-orgs-unified-search-how-can-i-get-it/

    @nahummadrid @r-a-y

    Is anyone has done Search Activity on his website ? Would be great to have a tutorial.

    Thanks.
    Guillaume.


    Nahum
    Participant

    @nahummadrid

    *edit

    I wasn’t able to get a search-activity working using ajax so i just made a new page template to house the search form and the activity loop that returns the search results and works well. I’ll see if I can post something up on my blog to show how I did it.

    Would be great if a ninja could create a plugin or function to get the activity post form to switch between a poster and searcher. So we could do the search right from the activity page just by using a toggle. that would be neat.


    PJ
    Participant

    @pjnu

    Great thread. I’ll bookmark this. I hope someone can offer a solution / tutorial for this too. Thank you.

    Nobody ?


    thelandman
    Participant

    @thelandman

    Yeah, I’m also keen to get this going….


    Anton
    Participant

    @antonrsa

    @thelandman, I’m busy creating one. Will send you the link over the weekend to help test

    @antonrsa
    If you need more tester, let me know.


    thelandman
    Participant

    @thelandman

    @antonrsa, thanks mate. I’ve also been busy with an activity stream that is automatically updated with ajax and it neatly drops in with the jcarousel plugin with jquery.

    I got it work with the tutorial in buddydev: http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/
    I just made one function more:

    `function bpmag_show_activity_search(){
    ?>

      User’s activity:

    <?php
    }
    add_action(“advance-search”,”bpmag_show_activity_search”,10);`

    Bye.


    chrisjscott
    Participant

    @chrisjscott

    @juanpons14 Thanks for the code; just started using it on my site. One thing I’ve noticed is that the “Load More” link at the bottom of the results doesn’t work – any thoughts on how to resolve?

    This is awesome, all its working perfect, I just need to add the the “usernames” to be searched as well under members… it seems to look at the real names only… any idea how to accomplish this?

    Also Im having a little issue with the pagination, when I click on the second page of result, it brings all kinds of different stuff not related with the search…

    Thank you!

Viewing 25 replies - 1 through 25 (of 25 total)
  • The topic ‘Search Activity’ is closed to new replies.
Skip to toolbar