Profile link with this code
natchoice@natchoice
34 Posts
#1 · December 14, 2017, 4:38 pm
Quote from natchoice on December 14, 2017, 4:38 pmfunction my_filtered_post_username($username, $userID) { if(class_exists(‘PM_request’)) { $pmrequests = new PM_request; $profile_url = $pmrequests->pm_get_user_profile_url($userID); return ‘‘.$username.’‘; } } add_filter(‘asgarosforum_filter_post_username’, ‘my_filtered_post_username’, 10, 2);I got this code from the developers of a profile extension that I use is response to the code posted on the forum to create a link to profile. However there is no actual URL link created how do I do that?
function my_filtered_post_username($username, $userID) { if(class_exists(‘PM_request’)) { $pmrequests = new PM_request; $profile_url = $pmrequests->pm_get_user_profile_url($userID); return ‘‘.$username.’‘; } } add_filter(‘asgarosforum_filter_post_username’, ‘my_filtered_post_username’, 10, 2);
I got this code from the developers of a profile extension that I use is response to the code posted on the forum to create a link to profile. However there is no actual URL link created how do I do that?
Click for thumbs down.0Click for thumbs up.0
#2 · December 14, 2017, 9:05 pm
Quote from Asgaros on December 14, 2017, 9:05 pmHello natchoice,
you are using the wrong filter. Please try the following code with activated profile-functionality:
function my_link($link, $user) { if(class_exists(‘PM_request’)) { $pmrequests = new PM_request; $link = $pmrequests->pm_get_user_profile_url($user->ID); } return $link; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);
Hello natchoice,
you are using the wrong filter. Please try the following code with activated profile-functionality:
function my_link($link, $user) { if(class_exists(‘PM_request’)) { $pmrequests = new PM_request; $link = $pmrequests->pm_get_user_profile_url($user->ID); } return $link; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);
Click for thumbs down.0Click for thumbs up.0
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!