Changeset 2666
- Timestamp:
- 02/11/2010 12:50:00 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r2656 r2666 627 627 $parent_id = $activity_id; 628 628 629 /* Insert the "user posted a new activity comment header text" */ 630 $comment_header = '<div class="comment-header">' . sprintf( __( '%s posted a new activity comment:', 'buddypress' ), bp_core_get_userlink( $user_id ) ) . ' <span class="time-since">%s</span></div> '; 629 /* Check to see if the parent activity is hidden, and if so, hide this comment publically. */ 630 $activity = new BP_Activity_Activity( $activity_id ); 631 $is_hidden = ( (int)$activity->hide_sitewide ) ? 1 : 0; 631 632 632 633 /* Insert the activity comment */ 633 634 $comment_id = bp_activity_add( array( 634 ' content' => apply_filters( 'bp_activity_comment_content', $comment_header . '<div class="activity-inner">' . $content . '</div>'),635 ' primary_link' => '',635 'action' => apply_filters( 'bp_activity_comment_action', sprintf( __( '%s posted a new activity comment:', 'buddypress' ), bp_core_get_userlink( $user_id ) ) ), 636 'content' => apply_filters( 'bp_activity_comment_content', '<div class="activity-inner">' . $content . '</div>' ), 636 637 'component' => $bp->activity->id, 637 638 'type' => 'activity_comment', 638 639 'user_id' => $user_id, 639 640 'item_id' => $activity_id, 640 'secondary_item_id' => $parent_id 641 'secondary_item_id' => $parent_id, 642 'hide_sitewide' => $is_hidden 641 643 ) ); 642 644 -
trunk/bp-activity/bp-activity-templatetags.php
r2616 r2666 191 191 $display_comments = 'stream'; 192 192 193 $show_hidden = ( $user_id == $bp->loggedin_user->id ) ? 1 : 0; 194 193 195 if ( $user_id = ( !empty( $bp->displayed_user->id ) ) ? $bp->displayed_user->id : $bp->loggedin_user->id ) { 194 196 switch ( $scope ) { … … 209 211 $object = $bp->groups->id; 210 212 $primary_id = implode( ',', (array)$groups['groups'] ); 211 $show_hidden = ( $user_id == $bp->loggedin_user->id ) ? 1 : 0; 213 212 214 $user_id = false; 213 215 } … … 219 221 220 222 $include = implode( ',', (array)$favs ); 221 $show_hidden = ( $user_id == $bp->loggedin_user->id ) ? 1 : 0;222 223 break; 223 224 case 'mentions': … … 225 226 $user_login = ( !empty( $bp->displayed_user->id ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login; 226 227 $search_terms = '@' . bp_core_get_username( $user_id, $user_nicename, $user_login ); 227 $show_hidden = ( $user_id == $bp->loggedin_user->id ) ? 1 : 0;228 228 $display_comments = 'stream'; 229 229 $user_id = false; … … 570 570 if ( !$comment->user_fullname ) 571 571 $comment->user_fullname = $comment->display_name; 572 573 var_dump($comment->content); 572 574 573 575 $content .= '<li id="acomment-' . $comment->id . '">'; -
trunk/bp-themes/bp-default/_inc/ajax.php
r2644 r2666 194 194 195 195 <div class="acomment-content"> 196 <?php bp_activity_content () ?>196 <?php bp_activity_content_body() ?> 197 197 </div> 198 198 </li>
Note: See TracChangeset
for help on using the changeset viewer.