Messages panel


Home Forums Front End PM PRO Messages panel

This topic is: Not Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37691
    tomas hlatky
    Participant

    Hi
    It is quite confusing. Could i see the names of the users in involved in the message chat rather than the last response name?
    Looks like i am chatting with myself…
    Thank you

    Attachments:
    You must be logged in to view attached files.
    #37695
    shamim
    Keymaster

    As this plugin support multiple recipients, showing other users name is little confusing as there may have more than one receiver. If you support to send message to only one receiver then you can follow following approach.

    If you want to show other users avatar add following code in your theme’s (child theme you are using one) functions.php

    add_filter( 'fep_remove_own_avatar_from_messagebox', '__return_true' );
    

    If you want to show other user name add following code in your theme’s (child theme you are using one) functions.php

    add_action( 'fep_message_table_column_content_author', function(){
    	$participants = fep_get_participants( fep_get_the_id() );
    	foreach( $participants as $participant ) {
    		if ( get_current_user_id() != $participant ) {
    			?><span class="fep-message-author"><?php echo fep_user_name( $participant ); ?></span><span class="fep-message-date"><?php echo fep_get_the_date( 'mgs_last_reply_time' ); ?></span><?php
    			break;
    		}
    	}
    });
    
    #37737
    tomas hlatky
    Participant

    This works great.
    But when i open one mesage chain, the user name dissapears

    Attachments:
    You must be logged in to view attached files.
    #37768
    shamim
    Keymaster

    Recipients name never shows in that page as multiple recipients issue. If i get a better idea how to show the name including multiple recipients case, i will add that in future version.

    If you want now you can edit view-message-heads.php template following https://www.shamimsplugins.com/docs/front-end-pm-pro/customization-front-end-pm-pro/change-templates/

Viewing 4 posts - 1 through 4 (of 4 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.