Ticket #1274: kakumei-search.diff
| File kakumei-search.diff, 1.9 KB (added by , 16 years ago) |
|---|
-
bb-templates/kakumei/search.php
24 24 25 25 <?php if ( $relevant ) : ?> 26 26 <div id="results-relevant" class="search-results"> 27 <h4><?php _e('Relevant posts')?></h4>27 <h4><?php _e('Relevant Topics')?></h4> 28 28 <ol> 29 <?php foreach ( $relevant as $ bb_post) : ?>29 <?php foreach ( $relevant as $topic ) : ?> 30 30 <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> 34 33 </li> 35 34 <?php endforeach; ?> 36 35 </ol> -
search.php
12 12 $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' ); 13 13 $recent = $bb_query_form->results; 14 14 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' ); 16 16 $relevant = $bb_query_form->results; 17 18 $bb_query_form->type = 'topic';19 17 20 18 $q = $bb_query_form->get( 'search' ); 21 19 }