Search forum posts as well as forum topics. Buddypress/BBpress

Inactive
  • 2 points
    Getting my WPMU DEV Wings
    I'm new here
    MaydayC1

    Member  —  15th February 2011 (1 year ago)         

    Hi,

    Ive implemented the following unified search, for searching members, blogs and forums.

    http://buddydev.com/buddypress/creating-the-sitewide-globalunified-search-page-for-your-buddypress-theme/

    However, in the forum search the search is only done against the forum topics.

    Does anyone know how I can extend/override the buddypress search to search the forum posts. Here is some SQL i had in mind.

    SELECT
      post.post_id,
      post.topic_id,
      topic.topic_title,
      post.post_text
    FROM bb_posts post
    LEFT JOIN bb_topics topic
      ON topic.topic_id = post.topic_id
    WHERE topic_title LIKE '%searchterms%' OR post_text LIKE '%searchterms%';

    If this is too difficult, my backup option is to create a 'ULTIMATE SEARCH PLUGIN' that builds the search page, but I would then need to keep filters intact for buddypress functions like members details and avatars.

    Im totally new to wordpress development, and having difficulty debugging it and working out the filters, actions and hooks, so a simple solution would be really welcome. I hope this all makes sense.