/bp-themes/bp-default/activity/entry.php

  1. <?php 
  2.  
  3. /** 
  4. * BuddyPress - Activity Stream (Single Item) 
  5. * 
  6. * This template is used by activity-loop.php and AJAX functions to show 
  7. * each activity. 
  8. * 
  9. * @package BuddyPress 
  10. * @subpackage bp-default 
  11. */ 
  12.  
  13. ?> 
  14.  
  15. <?php do_action( 'bp_before_activity_entry' ); ?> 
  16.  
  17. <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>"> 
  18. <div class="activity-avatar"> 
  19. <a href="<?php bp_activity_user_link(); ?>"> 
  20.  
  21. <?php bp_activity_avatar(); ?> 
  22.  
  23. </a> 
  24. </div> 
  25.  
  26. <div class="activity-content"> 
  27.  
  28. <div class="activity-header"> 
  29.  
  30. <?php bp_activity_action(); ?> 
  31.  
  32. </div> 
  33.  
  34. <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?> 
  35.  
  36. <div class="activity-inreplyto"> 
  37. <strong><?php _e( 'In reply to: ', 'buddypress' ); ?></strong><?php bp_activity_parent_content(); ?> <a href="<?php bp_activity_thread_permalink(); ?>" class="view" title="<?php esc_attr_e( 'View Thread / Permalink', 'buddypress' ); ?>"><?php _e( 'View', 'buddypress' ); ?></a> 
  38. </div> 
  39.  
  40. <?php endif; ?> 
  41.  
  42. <?php if ( bp_activity_has_content() ) : ?> 
  43.  
  44. <div class="activity-inner"> 
  45.  
  46. <?php bp_activity_content_body(); ?> 
  47.  
  48. </div> 
  49.  
  50. <?php endif; ?> 
  51.  
  52. <?php do_action( 'bp_activity_entry_content' ); ?> 
  53.  
  54. <?php if ( is_user_logged_in() ) : ?> 
  55.  
  56. <div class="activity-meta"> 
  57.  
  58. <?php if ( bp_activity_can_comment() ) : ?> 
  59.  
  60. <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment <span>%s</span>', 'buddypress' ), bp_activity_get_comment_count() ); ?></a> 
  61.  
  62. <?php endif; ?> 
  63.  
  64. <?php if ( bp_activity_can_favorite() ) : ?> 
  65.  
  66. <?php if ( !bp_get_activity_is_favorite() ) : ?> 
  67.  
  68. <a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ); ?></a> 
  69.  
  70. <?php else : ?> 
  71.  
  72. <a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ); ?></a> 
  73.  
  74. <?php endif; ?> 
  75.  
  76. <?php endif; ?> 
  77.  
  78. <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?> 
  79.  
  80. <?php do_action( 'bp_activity_entry_meta' ); ?> 
  81.  
  82. </div> 
  83.  
  84. <?php endif; ?> 
  85.  
  86. </div> 
  87.  
  88. <?php do_action( 'bp_before_activity_entry_comments' ); ?> 
  89.  
  90. <?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_is_single_activity() ) : ?> 
  91.  
  92. <div class="activity-comments"> 
  93.  
  94. <?php bp_activity_comments(); ?> 
  95.  
  96. <?php if ( is_user_logged_in() ) : ?> 
  97.  
  98. <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>> 
  99. <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div> 
  100. <div class="ac-reply-content"> 
  101. <div class="ac-textarea"> 
  102. <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea> 
  103. </div> 
  104. <input type="submit" name="ac_form_submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" />   <?php _e( 'or press esc to cancel.', 'buddypress' ); ?> 
  105. <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> 
  106. </div> 
  107.  
  108. <?php do_action( 'bp_activity_entry_comments' ); ?> 
  109.  
  110. <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?> 
  111.  
  112. </form> 
  113.  
  114. <?php endif; ?> 
  115.  
  116. </div> 
  117.  
  118. <?php endif; ?> 
  119.  
  120. <?php do_action( 'bp_after_activity_entry_comments' ); ?> 
  121.  
  122. </li> 
  123.  
  124. <?php do_action( 'bp_after_activity_entry' ); ?> 
.