Skip to:
Content

bbPress.org

Ticket #1274: search-results-last-poster.diff

File search-results-last-poster.diff, 1.7 KB (added by mr_pelle, 16 years ago)

More details on search results

  • search.php

     
    1414<?php foreach ( $recent as $bb_post ) : ?>
    1515                <li<?php alt_class( 'recent' ); ?>>
    1616                        <a href="<?php post_link(); ?>"><?php topic_title($bb_post->topic_id); ?></a>
    17                         <span class="freshness"><?php printf( __('Posted %s'), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
     17                        <span class="freshness"><?php printf( __('&#8212; Posted by <a href="%s">%s</a> on %s'), get_user_profile_link( $bb_post->poster_id ), get_post_author(), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
    1818                        <p><?php echo bb_show_context($q, $bb_post->post_text); ?></p>
    1919                </li>
    2020<?php endforeach; ?>
     
    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( __('&#8212; Last post <a href="%s">%s ago</a> by <a href="%s">%s</a>'), get_topic_last_post_link(), get_topic_time(), get_user_profile_link($topic->topic_last_poster), get_topic_last_poster() ); ?></span>
    3433                </li>
    3534<?php endforeach; ?>
    3635        </ol>