Guest User

Untitled

a guest
Aug 4th, 2010
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.64 KB | None | 0 0
  1. <?php /* This template is used by activity-loop.php and AJAX functions to show each activity */ ?>
  2.  
  3. <?php do_action( 'bp_before_activity_entry' ) ?>
  4.  
  5. <?php switch_to_blog(???); ?> /* Am I on the right track, or completely grasping at straws here? (restore added toward end of code) */
  6.  
  7. <li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
  8.     <div class="activity-avatar">
  9.        
  10.         <?php $image=get_post_meta(bp_get_activity_secondary_item_id(), 'thumbnail', true); ?>
  11.         <a href="<?php bp_activity_user_link() ?>"><?php if ( $image ) : ?></a>
  12.         <img src="<?php echo $image; ?>" width="100px"</img></a>
  13.         <?php else : ?>
  14.         <a href="<?php bp_activity_user_link() ?>"><?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?></a>
  15.         <?php endif; ?>
  16.        
  17.     </div>
  18.  
  19.     <div class="activity-content">
  20.  
  21.         <div class="activity-header">
  22.             <?php bp_activity_action() ?>
  23.         </div>
  24.  
  25.         <?php if ( bp_activity_has_content() ) : ?>
  26.             <div class="activity-inner">
  27.                 <?php bp_activity_content_body() ?>
  28.             </div>
  29.         <?php endif; ?>
  30.  
  31.         <?php do_action( 'bp_activity_entry_content' ) ?>
  32.  
  33.         <div class="activity-meta">
  34.             <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>
  35.                 <a href="<?php bp_activity_comment_link() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Reply', 'buddypress' ) ?> (<span><?php bp_activity_comment_count() ?></span>)</a>
  36.             <?php endif; ?>
  37.  
  38.             <?php if ( is_user_logged_in() ) : ?>
  39.                 <?php if ( !bp_get_activity_is_favorite() ) : ?>
  40.                     <a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
  41.                 <?php else : ?>
  42.                     <a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
  43.                 <?php endif; ?>
  44.             <?php endif;?>
  45.  
  46.             <?php do_action( 'bp_activity_entry_meta' ) ?>
  47.         </div>
  48.     </div>
  49.  
  50.     <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>
  51.         <div class="activity-inreplyto">
  52.             <strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> &middot;
  53.             <a href="<?php bp_activity_thread_permalink() ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ) ?>"><?php _e( 'View', 'buddypress' ) ?></a>
  54.         </div>
  55.     <?php endif; ?>
  56.  
  57.     <?php do_action( 'bp_before_activity_entry_comments' ) ?>
  58.  
  59.     <?php if ( bp_activity_can_comment() ) : ?>
  60.         <div class="activity-comments">
  61.             <?php bp_activity_comments() ?>
  62.  
  63.             <?php if ( is_user_logged_in() ) : ?>
  64.             <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() ?>>
  65.                 <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div>
  66.                 <div class="ac-reply-content">
  67.                     <div class="ac-textarea">
  68.                         <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac_input_<?php bp_activity_id() ?>"></textarea>
  69.                     </div>
  70.                     <input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ) ?> &rarr;" /> &nbsp; <?php _e( 'or press esc to cancel.', 'buddypress' ) ?>
  71.                     <input type="hidden" name="comment_form_id" value="<?php bp_activity_id() ?>" />
  72.                 </div>
  73.                 <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?>
  74.             </form>
  75.             <?php endif; ?>
  76.         </div>
  77.     <?php endif; ?>
  78.  
  79. <?php restore_current_blog(); ?>
  80.  
  81.     <?php do_action( 'bp_after_activity_entry_comments' ) ?>
  82. </li>
  83.  
  84. <?php do_action( 'bp_after_activity_entry' ) ?>
Advertisement
Add Comment
Please, Sign In to add comment