BuddyDev

Search

[Resolved] Code snippet which link both the avatar and the user name to the conversation

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #29806

    Hi there, I my search for what is causing issues to my messages module, I found this code snippet in my messages-loop.php, but I do not recall who shared this. Is this a code snippet you know about?

    What this code snippet does is to link both the avatar and the user name, in the message thread, to the conversation instead of the profile.

    <?php
    								$mssender = strip_tags(bp_get_message_thread_from(), '<br>');
    								?>
    								
    								<a href="<?php bp_message_thread_view_link( bp_get_message_thread_id(), bp_displayed_user_id() ); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( "View Message", 'buddypress' ); ?>" aria-label="<?php esc_attr_e( "View Message", 'buddypress' ); ?>"><?php echo $mssender; ?><span class="activity"><?php bp_message_thread_last_post_date(); ?></span></a>
    								
    								<?php bp_message_thread_total_and_unread_count(); ?>
    								
    							</td>
    						<?php else: ?>
    							<td class="thread-from">
    
    Regards
    Carsten
    							
  • Keymaster
    (BuddyDev Team)
    Posts: 24636

The topic ‘ [Resolved] Code snippet which link both the avatar and the user name to the conversation’ is closed to new replies.

This topic is: resolved