Advertisement
Guest User

Forum Loop example

a guest
Apr 8th, 2013
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.49 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * Topics Loop - Single
  5.  *
  6.  * @package bbPress
  7.  * @subpackage Theme
  8.  */
  9.  
  10. ?>
  11.  
  12. <div id="topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
  13.  
  14.   <div class="">
  15.     <div class="bbp-topic-title lead">
  16.         <?php if ( bbp_is_user_home() ) : ?>
  17.  
  18.             <?php if ( bbp_is_favorites() ) : ?>
  19.  
  20.                 <span class="bbp-topic-action">
  21.  
  22.                     <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
  23.  
  24.                     <?php bbp_user_favorites_link( array( 'mid' => '+', 'post' => '' ), array( 'pre' => '', 'mid' => '&times;', 'post' => '' ) ); ?>
  25.  
  26.                     <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
  27.  
  28.                 </span>
  29.  
  30.             <?php elseif ( bbp_is_subscriptions() ) : ?>
  31.  
  32.                 <span class="bbp-topic-action">
  33.  
  34.                     <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
  35.  
  36.                     <?php bbp_user_subscribe_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
  37.  
  38.                     <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
  39.  
  40.                 </span>
  41.  
  42.             <?php endif; ?>
  43.  
  44.         <?php endif; ?>
  45.  
  46.         <?php do_action( 'bbp_theme_before_topic_title' ); ?>
  47.  
  48.         <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>" title="<?php bbp_topic_title(); ?>"><?php bbp_topic_title(); ?></a>
  49.  
  50.         <?php do_action( 'bbp_theme_after_topic_title' ); ?>
  51.     </div>
  52.         <?php //echo firmasite_social_bbp_get_topic_pagination(); ?>
  53.         <?php bbp_topic_row_actions(); ?>
  54.   </div>
  55.   <div class="muted">
  56.     <small>
  57.         <div class="clearfix">
  58.  
  59.         <?php do_action( 'bbp_theme_before_topic_meta' ); ?>
  60.  
  61.         <div class="bbp-topic-meta clearfix">
  62.  
  63.             <?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
  64.  
  65.             <div class="bbp-topic-started-by clearfix pull-right">&nbsp;<?php printf( __( 'Started by: %1$s', 'firmasite' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></div>
  66.  
  67.             <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
  68.  
  69.             <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() != bbp_get_forum_id() ) ) : ?>
  70.  
  71.                 <?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
  72.  
  73.                 <div class="bbp-topic-started-in pull-left"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'firmasite' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></div>
  74.  
  75.                 <?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
  76.  
  77.             <?php endif; ?>
  78.  
  79.         </div>
  80.  
  81.         <?php do_action( 'bbp_theme_after_topic_meta' ); ?>
  82.  
  83.             <div class="pull-left"><span class="bbp-topic-reply-count badge badge-info"><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?> <?php bbp_show_lead_topic() ? _e( 'Replies', 'firmasite' ) : _e( 'Posts', 'firmasite' ); ?></span> </div>
  84.  
  85.             <div class="bbp-topic-freshness clearfix">
  86.                
  87.                  
  88.                 <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
  89.    
  90.                 <span class="bbp-topic-freshness-author pull-right"> &nbsp;<?php _e( 'Freshness', 'firmasite' ); ?>: <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
  91.    
  92.                 <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
  93.  
  94.                 <?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
  95.        
  96.                 &nbsp; <?php echo bbp_get_topic_freshness_link(); ?>
  97.        
  98.                 <?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
  99.        
  100.             </div>
  101.  
  102.  
  103.  
  104. </div></small></div>
  105.  
  106. </div><!-- #topic-<?php bbp_topic_id(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement