How to link the participants name and their avatar to their profile?


Home Forums Front End PM PRO How to link the participants name and their avatar to their profile?

This topic is: Not Resolved
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #39203
    iou.wedding
    Participant

    Hi,our user’s profile link= https://oursite.com/usrname/
    can you help me ?
    Thank you!!

    #39224
    Shamim Hasan
    Keymaster
    #39226
    iou.wedding
    Participant

    Hi,Thank you for your quick reply,but on oursite,the fep name is nickname,our user profile link is http://mysite.com/username.
    So I don’t know how to Modify the code.
    Can you help me? Thank you!

    #39228
    Shamim Hasan
    Keymaster

    add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_user_name', function( $name, $id ){
    	if ( $name && fep_get_the_id() ) {
    		$name = '<a href="https://yoursite.com/'. fep_get_userdata( $id, 'user_nicename', 'id' ) . '/">' . $name . '</a>';
    	}
    	return $name;
    }, 10, 2);
    
    #39230
    iou.wedding
    Participant

    It works perfect!
    Thank you!
    But another question, Can the name of this place not be displayed?
    Please refer to the attachment.

    Attachments:
    You must be logged in to view attached files.
    #39233
    Shamim Hasan
    Keymaster

    So you want to show link to profile only in this attachment marked names, right?

    Attachments:
    You must be logged in to view attached files.
    #39236
    iou.wedding
    Participant

    Yes! Thank you!!

    #39241
    Shamim Hasan
    Keymaster

    add following code in your theme’s (child theme’s if you are using) functions.php

    add_action( 'fep_message_table_column_content_author', function(){
        if( 'threaded' === fep_get_message_view() ){
    		?><span class="fep-message-author"><a href="https://yoursite.com/<?php echo fep_get_userdata( fep_get_message_field( 'mgs_last_reply_by' ), 'user_nicename', 'id' );?>/"><?php echo fep_user_name( fep_get_message_field( 'mgs_last_reply_by' ) ); ?></a></span><span class="fep-message-date"><?php echo fep_get_the_date( 'mgs_last_reply_time' ); ?></span><?php
    	} else {
    		?><span class="fep-message-author"><a href="https://yoursite.com/<?php echo fep_get_userdata( fep_get_message_field( 'mgs_author' ), 'user_nicename', 'id' );?>/"><?php echo fep_user_name( fep_get_message_field( 'mgs_author' ) ); ?></a></span><span class="fep-message-date"><?php echo fep_get_the_date( 'created' ); ?></span><?php
    	}
    });
    
    #39262
    iou.wedding
    Participant

    HI,Thank for your work,but it looks nothtin happened.
    Sorry, maybe I can’t express well.
    I hope the list only shows the avatar, don’t have any text.
    Please refer to the attachment.
    Thank you!

    Attachments:
    You must be logged in to view attached files.
    #39266
    Shamim Hasan
    Keymaster

    Did you removed previous code then added latest code? You should remove previous code.
    Let me know.

    #39268
    iou.wedding
    Participant

    Yes,I had remove previous code.
    Please refer to the attachment.
    Thank you!

    Attachments:
    You must be logged in to view attached files.
    #39271
    iou.wedding
    Participant

    And When I remove 43-48,the link of the participants name is disappeared.
    But the text of list is also not display.

    #39274
    Shamim Hasan
    Keymaster

    Please remove 43-38 code, I have already given you latest code.
    It should link all names (marked in this screenshot only https://www.shamimsplugins.com/support/topic/how-to-link-the-participants-name-and-their-avatar-to-their-profile/#post-39233) to their profile.
    Let me know if those names are linked. If not i will need your website access to set it for you.

    #39276
    iou.wedding
    Participant

    Hi,When I remove those code, in IN BOX,the participants name have links,but in Single mail, the participants don’t have links.
    Please refer to tha attachment.Thank you!

    Attachments:
    You must be logged in to view attached files.
    #39282
    iou.wedding
    Participant

    and functions.php

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 17 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.