Ticket #1274: last-post-ago-with-datetime-title.diff
| File last-post-ago-with-datetime-title.diff, 2.1 KB (added by , 16 years ago) |
|---|
-
bb-templates/kakumei/search.php
28 28 <ol> 29 29 <?php foreach ( $relevant as $topic ) : ?> 30 30 <li<?php alt_class( 'relevant' ); ?>> 31 <a class="result" href="<?php post_link( $topic->post_id); ?>"><?php echo bb_show_topic_context( $q, get_topic_title() ); ?></a>32 <span class="freshness"><?php printf( __( ' Posted by <a href="%1$s">%2$s</a> on %3$s' ), get_user_profile_link( $topic->topic_id ), get_topic_author(), bb_datetime_format_i18n( get_topic_start_time( array( 'format' => 'timestamp' ) )) ); ?></span>33 <p><?php echo bb_show_context( $q, $topic->post_text ); ?></p>31 <a class="result" href="<?php topic_last_post_link(); ?>"><?php echo bb_show_topic_context( $q, get_topic_title() ); ?></a> 32 <span class="freshness"><?php printf( __( 'Last post <a href="%1$s" title="%2$s">%3$s ago</a> by <a href="%4$s">%5$s</a>' ), get_topic_last_post_link(), bb_datetime_format_i18n( get_topic_time( array( 'format' => 'timestamp' ) ) ), get_topic_time(), get_user_profile_link( $topic->topic_last_poster ), get_topic_last_poster() ); ?></span> 33 <p><?php echo bb_show_context( $q, bb_get_post( $topic->topic_last_post_id )->post_text ); ?></p> 34 34 </li> 35 35 <?php endforeach; ?> 36 36 </ol> -
search.php
28 28 /* Relevant */ 29 29 $bb_query_form->BB_Query_Form( 'topic', array( 'search' => $q ), array( 'page' => 1, 'post_status' => 0, 'topic_status' => 0, 'search', 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_relevant_search' ); 30 30 $relevant = $bb_query_form->results; 31 if ( $re cent ) {31 if ( $relevant ) { 32 32 $relevant_count = isset( $bb_query_form->count ) ? $bb_query_form->count : count( $relevant ); 33 33 $relevant = array_slice( $relevant, $search_start, $search_stop ); 34 34 } else { … … 56 56 57 57 bb_load_template( 'search.php', array( 'q', 'recent', 'relevant', 'page', 'search_count' ), $q ); 58 58 59 ?> 59 ?> 60 No newline at end of file