Home › Forums › Front End PM PRO › How to link the participants name to their profile?
- This topic has 21 replies, 3 voices, and was last updated 6 years, 5 months ago by c-alle.
-
AuthorPosts
-
June 2, 2018 at 3:45 am #14629Utsav SarkarParticipant
When 2 participants are messaging one another, I want their usernames to link to their profile. Currently, if I click on the username, it toggles the messages on and off. I dont want the toggle feature at all.
June 2, 2018 at 11:39 am #14643Shamim HasanKeymasterBy default wordpress doesn’t have a user profile page. Which page you want to link? author posts page?
June 3, 2018 at 7:46 am #14658Utsav SarkarParticipantI am using Ultimate Member so the user profile link is /user/username/
For example: /user/eddie-ortisi/
June 3, 2018 at 9:50 pm #14663Shamim HasanKeymasteradd following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_filter_user_name', function( $name, $id ){ if( isset( $_GET['fepaction'] ) && 'viewmessage' == $_GET['fepaction'] && function_exists( 'um_fetch_user' ) ){ um_fetch_user( $id ); $name = '<a href="' . um_user_profile_url() . '">' . $name . '</a>'; } return $name; }, 10, 2);June 4, 2018 at 7:31 pm #14684Utsav SarkarParticipantThanks this works. However, is there a way to remove the toggle function completely? Currently, when you click on the participant’s name, it hides the message first and then takes you to the user’s profile.
June 4, 2018 at 11:48 pm #14713Shamim HasanKeymasteradd following code in your theme’s (child theme’s if any) functions.php
add_action( 'wp_enqueue_scripts', function(){ wp_deregister_script( 'fep-replies-show-hide' ); });Update:
add following code in your theme’s (child theme’s if any) functions.phpadd_filter( 'fep_filter_hide_message_initially_if_read', '__return_false' );June 6, 2018 at 7:38 am #14759Utsav SarkarParticipantawesome bro this worked. thank you!
June 10, 2018 at 8:26 pm #14945Utsav SarkarParticipantHey I just checked some email logs on my website realized that {{sender}} and {{receiver}} usernames inside the email notifications are being linked to their user profiles as well. This is good. However, the link appears in the subject as well. Please see screenshot.
How can I remove the link from the subject but still keep the links inside the email?
Attachments:You must be logged in to view attached files.June 11, 2018 at 9:33 am #14951Shamim HasanKeymasteradd following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_filter_before_email_send', function( $content ){ $content['subject'] = strip_tags( $content['subject'] ); return $content; }, 99);June 11, 2018 at 9:40 pm #14968Utsav SarkarParticipantfor some reason, the links don’t work in the “New Message” template. But they work in the “Reply Message” template. Is there a way to make them work on the “New Message” template as well?
June 12, 2018 at 5:11 pm #14977Shamim HasanKeymasterremove previous code and add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_filter_user_name', function( $name, $id ){ if( function_exists( 'um_fetch_user' ) ){ um_fetch_user( $id ); $name = '<a href="' . um_user_profile_url() . '">' . $name . '</a>'; } return $name; }, 10, 2);June 13, 2018 at 9:32 am #14988Utsav SarkarParticipanti removed the previous code and added the new one. however, the link appears in the subject again. so put both codes and its working as expected. thank you
June 14, 2018 at 10:30 am #15027Shamim HasanKeymasterTo remove code i meant remove same code which i gave you in https://www.shamimsplugins.com/support/topic/how-to-link-the-participants-name-to-their-profile/#post-14663
August 28, 2018 at 8:24 am #16907Utsav SarkarParticipantHey this thing is not working after the version 10 update.
1) link the participants name to their ultiamate member profile
2) remove the toggle function completelyAugust 28, 2018 at 8:54 am #16913Shamim HasanKeymasterThese are working, I have tested it now in my test website and it is working. Also nothing is changed in these hooks.
Please make sure your code is in right place ( in your theme’s (child theme’s if any and active) functions.php )
Let me know.
-
AuthorPosts
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.