From f4ac9b93b84222413801c32d699539c1f77cfef7 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 27 Nov 2022 02:49:40 -0500 Subject: [PATCH 1/2] Use complete URL for profile linking Fixes a bug that causes links to be incorrect when rendering a mention from a different directory than the MyBB instance (custom pages not within the MyBB folder on the server). --- Upload/inc/plugins/MentionMe/forum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upload/inc/plugins/MentionMe/forum.php b/Upload/inc/plugins/MentionMe/forum.php index 8600bf4..93e1672 100644 --- a/Upload/inc/plugins/MentionMe/forum.php +++ b/Upload/inc/plugins/MentionMe/forum.php @@ -128,7 +128,7 @@ function mentionBuild($user) // set up the user name link so that it displays correctly for the display group of the user $username = format_name($username, $user['usergroup'], $user['displaygroup']); } - $url = get_profile_link($user['uid']); + $url = $mybb->settings['bburl'] . '/' . get_profile_link($user['uid']) $target = ''; if ($mybb->settings['mention_open_link_in_new_window']) { From bfa14af0d46fb8b6c780576da224b88b751ba14f Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 27 Nov 2022 02:52:16 -0500 Subject: [PATCH 2/2] Add missing ; ; --- Upload/inc/plugins/MentionMe/forum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upload/inc/plugins/MentionMe/forum.php b/Upload/inc/plugins/MentionMe/forum.php index 93e1672..becbe82 100644 --- a/Upload/inc/plugins/MentionMe/forum.php +++ b/Upload/inc/plugins/MentionMe/forum.php @@ -128,7 +128,7 @@ function mentionBuild($user) // set up the user name link so that it displays correctly for the display group of the user $username = format_name($username, $user['usergroup'], $user['displaygroup']); } - $url = $mybb->settings['bburl'] . '/' . get_profile_link($user['uid']) + $url = $mybb->settings['bburl'] . '/' . get_profile_link($user['uid']); $target = ''; if ($mybb->settings['mention_open_link_in_new_window']) {