Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Akismet plugin username link problem [C-StefanT]
#1
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.

#2
The proposed fix won't work if the forum is in a folder above the main domain. It should be "../" instead of "/"
#3
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


Forum Jump:


Users browsing this thread: 1 Guest(s)