MyBB Community Forums

Full Version: [F] Akismet plugin username link problem [C-StefanT]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When viewing "Detected Spam Messages" in the admin with the Akismet plugin, the spammers username links to http://forumurl.com/admin/user-1.html instead of http://forumurl.com/user-1.html.

Reproduce Steps

1. When you have posts flagged as spam, go to index.php?module=forum/akismet in the admin cp.

2. Beside the title of the spam post, there will be "Username <namehere>" - <namehere> will linked, which is broken.

Proposed Fix

Open up inc/plugins/akismet.php

Find:
$username = "<a href=\"".str_replace("{uid}", $post['uid'], PROFILE_URL)."\" target=\"_blank\">".format_name($post['username'], $post['usergroup'], $post['displaygroup'])."</a>";

Replace with:
$username = "<a href=\"../".str_replace("{uid}", $post['uid'], PROFILE_URL)."\" target=\"_blank\">".format_name($post['username'], $post['usergroup'], $post['displaygroup'])."</a>";

Plugin Version: 1.2.1

Edit:

Updated the code with Ryan Gordon's fix in the event someone was to copy and paste it into there file.
The proposed fix won't work if the forum is in a folder above the main domain. It should be "../" instead of "/"
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group