Home › Forums › Front End PM PRO › Preview or clickable profile / Avatar so you know who is messaging you.
- This topic has 11 replies, 2 voices, and was last updated 4 years, 10 months ago by Shamim Hasan.
-
AuthorPosts
-
February 5, 2020 at 6:30 pm #34127Neta LubikParticipant
Hi
I am building a dating site; and need the person who receives a message from someone, to be able to click on the username that is in the “participants” field, and or click on the Avatar, in order to be taken to that persons profile who is contacting them.1 how can we make the participants field “usernames” (clickable) in order to be taken to their profile. And or
2 Avatar clickable? if so how do we keep them in the cell phone view?
3 how could we have a preview of the other persons profile on the “chat page” so as people commune they see who they are talking to..?
the last solution would be idealAttachments:You must be logged in to view attached files.February 7, 2020 at 11:22 am #34226Shamim HasanKeymasterBy default wordpress does not have any nice user profile. So we cannot show user profile link.
But you can get an idea from https://www.shamimsplugins.com/support/topic/how-to-link-the-participants-name-to-their-profile/page/2/#post-26441February 7, 2020 at 10:47 pm #34256Neta LubikParticipantOk I see the code. Where would I place this code? and how would I out put “the link?” on the chat page.. I’m sorry I’m a bit new.. How would I output it..
Lastly what exactly will it do? I had the 3 items up there, what one would it work for?
February 8, 2020 at 7:34 pm #34278Shamim HasanKeymasterIt will do No.1.
This is a little advanced. You will have to have some knowledge in php.
What plugin you are using to create user profile?February 9, 2020 at 4:27 am #34316Neta LubikParticipant“What plugin you are using to create user profile?” Profile builder pro
https://www.cozmoslabs.com/search/?swpquery=notifications+to+admin&swp_category_limiter=140&submit=SearchI have some understanding of php but not much I can obesely past in the code given to the pages you direct me to..
February 9, 2020 at 5:47 pm #34322Shamim HasanKeymasterCan you ask that plugin developer how can we get user profile page url from user id or user nicename in php code?
February 9, 2020 at 10:40 pm #34326Neta LubikParticipantYes let me ask thanks for your help…
February 10, 2020 at 6:05 pm #34353Neta LubikParticipantThis was his reply
Hello Neta,
First visit your front-end all user listing, and then a click user listing.
You will see that the URL of a single user listing will have this form:
https://yoursite.com/your-all-userlisting-page/user/85/
Next, all you need to do is replace 85 with the wanted user ID.
With best of regards,
February 10, 2020 at 8:32 pm #34361Shamim HasanKeymasteradd 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/your-all-userlisting-page/user/'. $id . '/">' . $name . '</a>'; } return $name; }, 10, 2);
Change your website your user listing page actual url.
February 10, 2020 at 10:18 pm #34368Neta LubikParticipantomg thank you so much.. So on the other options can I pay to have code written for the preview?
February 11, 2020 at 12:25 am #34378Neta LubikParticipantOk great! this is the code & it works!! ty – but if there is no “Avatar” uploaded you get the <a href= tag showing .. now.. I attached the screen shot .. how dow we get ride of this? and or have the profile image of the profile in its / Avatar place? here is the meta – name top_profile_photo.
add_filter( ‘fep_filter_user_name’, function( $name, $id ){
if ( $name && fep_get_the_id() ) {
$name = ‘‘ . $name . ‘‘;
}
return $name;
}, 10, 2);Attachments:You must be logged in to view attached files.February 12, 2020 at 1:28 am #34403Shamim HasanKeymasterThis plugin uses wordpress gravatar. That means you can use any wordpress hook to change this avatar. If you use any plugin which allow upload profile image, that plugin also may have option to change gravatar image. You can ask that plugin developer.
Let me know if they do not assist you. -
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.