Firefox PHP

Phorum minor patch: View user profile in Admin

Posted by sheik 
Phorum minor patch: View user profile in Admin
October 14, 2012 10:56PM
Apologies but I don't know how to submit official patches, and this is very minor:

Phorum version:v5.2.19
Overview: when searching for a user in admin, it would be nice to have a way to easily view their public profile (for example, to spot spammers or view all their posts).
File: /include/admin/users.php
Look for Line 833:
$edit_url = phorum_admin_build_url($user_input_args);
and add this line directly underneath it:
$profile_url = phorum_get_url(PHORUM_PROFILE_URL, $user['user_id']);

Then replace:
<td class=\"".$ta_class."\"><a href=\"$edit_url\">".(empty($PHORUM['custom_display_name']) ? htmlspecialchars($user['display_name']) : $user['display_name'])."</a></td>\n";

with:
echo "    <td class=\"".$ta_class."\">" . (empty($PHORUM['custom_display_name']) ? htmlspecialchars($user['display_name']) : $user['display_name'])." &nbsp; [<a href=\"$edit_url\">edit</a> | <a href=\"$profile_url\" target=\"_blank\">view profile</a>]</td>\n";

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Sorry, only registered users may post in this forum.

Click here to login