Skip to:
Content

bbPress.org

Ticket #1274: kakumei-search.diff

File kakumei-search.diff, 1.9 KB (added by mr_pelle, 16 years ago)

Correct patch: I forgot to revert search.php to [2377]

  • bb-templates/kakumei/search.php

     
    2424
    2525<?php if ( $relevant ) : ?>
    2626<div id="results-relevant" class="search-results">
    27         <h4><?php _e('Relevant posts')?></h4>
     27        <h4><?php _e('Relevant Topics')?></h4>
    2828        <ol>
    29 <?php foreach ( $relevant as $bb_post ) : ?>
     29<?php foreach ( $relevant as $topic ) : ?>
    3030                <li<?php alt_class( 'relevant' ); ?>>
    31                         <a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a>
    32                         <span class="freshness"><?php printf( __('Posted %s'), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
    33                         <p><?php post_text(); ?></p>
     31                        <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>
     32                        <span class="freshness"><?php printf( __('Freshness: %s'), get_topic_time() ); ?></span>
    3433                </li>
    3534<?php endforeach; ?>
    3635        </ol>
  • search.php

     
    1212        $bb_query_form->BB_Query_Form( 'post', array(), array( 'order_by' => 'p.post_time', 'per_page' => 5, 'post_status' => 0, 'topic_status' => 0, 'post_text' => $q, 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_recent_search' );
    1313        $recent = $bb_query_form->results;
    1414
    15         $bb_query_form->BB_Query_Form( 'post', array( 'search' => $q ), array( 'post_status' => 0, 'topic_status' => 0, 'search', 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_relevant_search' );
     15        $bb_query_form->BB_Query_Form( 'topic', array( 'search' => $q ), array( 'post_status' => 0, 'topic_status' => 0, 'search', 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_relevant_search' );
    1616        $relevant = $bb_query_form->results;
    17        
    18         $bb_query_form->type = 'topic';
    1917
    2018        $q = $bb_query_form->get( 'search' );
    2119}