This is the format_username from the freetsp source
PHP Code:
function format_username ($user, $icons = true)
{
global $CURUSER, $image_dir, $site_url;
$user['id'] = (int) $user['id'];
$user['class'] = (int) $user['class'];
if ($user['id'] == 0)
{
return 'System';
}
elseif ($user['username'] == '')
{
return 'unknown['.$user['id'].']';
}
$username = '<span style="font-weight:bold; color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
$str = '<span style="white-space: nowrap;"><a href="'.$site_url.'/userdetails.php?id='.$user['id'].'"target="_blank">'.$username.'</a>';
if ($icons != false)
{
$str .= ($user['donor'] == 'yes' ? '<img src="'.$image_dir.'star.png" width="16" height="16" border="0" alt="Donor" title="Donor" />' : '');
$str .= ($user['warned'] == 'yes' ? '<img src="'.$image_dir.'warned.png" width="15" height="16" border="0" alt="Warned" title="Warned" />' : '');
$str .= ($user['enabled'] == 'no' ? '<img src="'.$image_dir.'disabled.png" width="16" height="15" border="0" alt="Disabled" title="Disabled" />' : '');
}
$str .= "</span>\n";
return $str;
}
Krypto added this to the source.
I never knew it came from U232.
So my apology's for that
Bigjoos
I will update the version with proper credits to U232.
Do you know the name of the coder so I can add their name to the credit as well.