[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-forums/bbpress/bb-templates/kakumei/ -> search.php (source)

   1  <?php bb_get_header(); ?>
   2  
   3  <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Search')?></div>
   4  <?php bb_topic_search_form(); ?>
   5  
   6  <?php if ( !empty ( $q ) ) : ?>
   7  <h3 id="search-for"><?php printf( __( 'Search for %s' ), '&#8220;' . esc_html( $q ) . '&#8221;' ); ?></h3>
   8  <?php endif; ?>
   9  
  10  <?php if ( $recent ) : ?>
  11  <div id="results-recent" class="search-results">
  12      <h4><?php _e( 'Recent Posts' )?></h4>
  13      <ol>
  14  <?php foreach ( $recent as $bb_post ) : ?>
  15          <li<?php alt_class( 'recent' ); ?>>
  16              <a class="result" href="<?php post_link(); ?>"><?php echo bb_show_topic_context( $q, get_topic_title( $bb_post->topic_id ) ); ?></a>
  17              <span class="freshness"><?php printf( __( 'By <a href="%1$s">%2$s</a> on %3$s'), get_user_profile_link( $bb_post->poster_id ), get_post_author(), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
  18              <p><?php echo bb_show_context( $q, $bb_post->post_text ); ?></p>
  19          </li>
  20  <?php endforeach; ?>
  21      </ol>
  22  </div>
  23  <?php endif; ?>
  24  
  25  <?php if ( $relevant ) : ?>
  26  <div id="results-relevant" class="search-results">
  27      <h4><?php _e( 'Relevant Topics' )?></h4>
  28      <ol>
  29  <?php foreach ( $relevant as $topic ) : ?>
  30  <?php $bb_post = bb_get_first_post( $topic ); ?>
  31          <li<?php alt_class( 'relevant' ); ?>>
  32              <a class="result" href="<?php post_link(); ?>"><?php echo bb_show_topic_context( $q, get_topic_title() ); ?></a>
  33              <span class="freshness"><?php printf( __( 'By <a href="%1$s">%2$s</a> on %3$s' ), get_user_profile_link( $topic->topic_poster ), get_topic_author(), bb_datetime_format_i18n( get_topic_start_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
  34              <p><?php echo bb_show_context( $q, $bb_post->post_text ); ?></p>
  35          </li>
  36  <?php endforeach; ?>
  37      </ol>
  38  </div>
  39  <?php endif; ?>
  40  
  41  <?php bb_search_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?> 
  42  
  43  <?php if ( $q && !$recent && !$relevant ) : ?>
  44  <p><?php printf( __( 'Your search %s did not return any results. Here are some suggestions:' ), '&#8220;<em>' . esc_html( $q ) . '</em>&#8221;' ); ?></p>
  45  <ul id="search-suggestions">
  46      <li><?php _e( 'Make sure all words are spelled correctly' ); ?></li>
  47      <li><?php _e( 'Try different keywords' ); ?></li>
  48      <li><?php _e( 'Try more general keywords' ); ?></li>
  49  </ul>
  50  <?php endif; ?>
  51  
  52  <br />
  53  <p><?php printf( __( 'You may also try your <a href="%s">search at Google</a>.' ), 'http://google.com/search?q=site:' . bb_get_uri( null, null, BB_URI_CONTEXT_TEXT ) . urlencode( ' ' . $q ) ); ?></p>
  54  
  55  <?php bb_get_footer(); ?>


Generated: Thu Dec 7 01:01:35 2017 Cross-referenced by PHPXref 0.7.1