Ticket #6572: 6572.01.patch
File 6572.01.patch, 6.2 KB (added by , 8 years ago) |
---|
-
src/bp-templates/bp-legacy/buddypress-functions.php
1540 1540 1541 1541 // manually call oEmbed 1542 1542 // this is needed because we're not at the beginning of the loop 1543 bp_messages_embed() 1544 ?> 1545 1546 <div class="message-box new-message <?php bp_the_thread_message_css_class(); ?>"> 1547 <div class="message-metadata"> 1548 <?php 1549 1550 /** 1551 * Fires before the single message header is displayed. 1552 * 1553 * @since BuddyPress (1.1.0) 1554 */ 1555 do_action( 'bp_before_message_meta' ); ?> 1556 <?php echo bp_loggedin_user_avatar( 'type=thumb&width=30&height=30' ); ?> 1557 1558 <strong><a href="<?php echo bp_loggedin_user_domain(); ?>"><?php bp_loggedin_user_fullname(); ?></a> <span class="activity"><?php printf( __( 'Sent %s', 'buddypress' ), bp_core_time_since( bp_core_current_time() ) ); ?></span></strong> 1559 1560 <?php 1561 1562 /** 1563 * Fires after the single message header is displayed. 1564 * 1565 * @since BuddyPress (1.1.0) 1566 */ 1567 do_action( 'bp_after_message_meta' ); ?> 1568 </div> 1569 1570 <?php 1571 1572 /** 1573 * Fires before the message content for a private message. 1574 * 1575 * @since BuddyPress (1.1.0) 1576 */ 1577 do_action( 'bp_before_message_content' ); ?> 1578 1579 <div class="message-content"> 1580 <?php bp_the_thread_message_content(); ?> 1581 </div> 1543 bp_messages_embed(); 1582 1544 1583 <?php 1545 // add new-message css class 1546 add_filter( 'bp_get_the_thread_message_css_class', create_function( '$retval', ' 1547 $retval[] = "new-message"; 1548 return $retval; 1549 ' ) ); 1584 1550 1585 /** 1586 * Fires after the message content for a private message. 1587 * 1588 * @since BuddyPress (1.1.0) 1589 */ 1590 do_action( 'bp_after_message_content' ); ?> 1551 // output single message template part 1552 bp_get_template_part( 'members/single/messages/content-single' ); 1591 1553 1592 <div class="clear"></div>1593 </div>1594 <?php1595 1554 // clean up the loop 1596 1555 bp_thread_messages(); 1597 1556 -
new file src/bp-templates/bp-legacy/buddypress/members/single/messages/content-single.php
new file mode 100644
- + 1 <div class="message-box <?php bp_the_thread_message_css_class(); ?>"> 2 3 <div class="message-metadata"> 4 5 <?php 6 7 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 8 do_action( 'bp_before_message_meta' ); ?> 9 10 <?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ); ?> 11 12 <?php if ( bp_get_the_thread_message_sender_link() ) : ?> 13 14 <strong><a href="<?php bp_the_thread_message_sender_link(); ?>" title="<?php bp_the_thread_message_sender_name(); ?>"><?php bp_the_thread_message_sender_name(); ?></a></strong> 15 16 <?php else : ?> 17 18 <strong><?php bp_the_thread_message_sender_name(); ?></strong> 19 20 <?php endif; ?> 21 22 <span class="activity"><?php bp_the_thread_message_time_since(); ?></span> 23 24 <?php if ( bp_is_active( 'messages', 'star' ) ) : ?> 25 <div class="message-star-actions"> 26 <?php bp_the_message_star_action_link(); ?> 27 </div> 28 <?php endif; ?> 29 30 <?php 31 32 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 33 do_action( 'bp_after_message_meta' ); ?> 34 35 </div><!-- .message-metadata --> 36 37 <?php 38 39 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 40 do_action( 'bp_before_message_content' ); ?> 41 42 <div class="message-content"> 43 44 <?php bp_the_thread_message_content(); ?> 45 46 </div><!-- .message-content --> 47 48 <?php 49 50 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 51 do_action( 'bp_after_message_content' ); ?> 52 53 <div class="clear"></div> 54 55 </div><!-- .message-box --> 56 No newline at end of file -
src/bp-templates/bp-legacy/buddypress/members/single/messages/single.php
45 45 do_action( 'bp_before_message_thread_list' ); ?> 46 46 47 47 <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?> 48 49 <div class="message-box <?php bp_the_thread_message_css_class(); ?>"> 50 51 <div class="message-metadata"> 52 53 <?php 54 55 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 56 do_action( 'bp_before_message_meta' ); ?> 57 58 <?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ); ?> 59 60 <?php if ( bp_get_the_thread_message_sender_link() ) : ?> 61 62 <strong><a href="<?php bp_the_thread_message_sender_link(); ?>" title="<?php bp_the_thread_message_sender_name(); ?>"><?php bp_the_thread_message_sender_name(); ?></a></strong> 63 64 <?php else : ?> 65 66 <strong><?php bp_the_thread_message_sender_name(); ?></strong> 67 68 <?php endif; ?> 69 70 <span class="activity"><?php bp_the_thread_message_time_since(); ?></span> 71 72 <?php if ( bp_is_active( 'messages', 'star' ) ) : ?> 73 <div class="message-star-actions"> 74 <?php bp_the_message_star_action_link(); ?> 75 </div> 76 <?php endif; ?> 77 78 <?php 79 80 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 81 do_action( 'bp_after_message_meta' ); ?> 82 83 </div><!-- .message-metadata --> 84 85 <?php 86 87 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 88 do_action( 'bp_before_message_content' ); ?> 89 90 <div class="message-content"> 91 92 <?php bp_the_thread_message_content(); ?> 93 94 </div><!-- .message-content --> 95 96 <?php 97 98 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 99 do_action( 'bp_after_message_content' ); ?> 100 101 <div class="clear"></div> 102 103 </div><!-- .message-box --> 104 48 <?php bp_get_template_part( 'members/single/messages/content-single' ); ?> 105 49 <?php endwhile; ?> 106 50 107 51 <?php