Quote
// Colorize the given username
function colorize_user($user_name)
{
$result = dbquery("SELECT user_color FROM ".DB_PREFIX."users WHERE user_name='$user_name'" );
if (dbrows($result) != 0)
{
$data = dbarray($result);
$color = ( $data['user_color'] != '' ) ? "<span style='color:".$data['user_color']."'>$user_name</span>" : $user_name;
return $color;
}
}
Quote
// User profile link
function profile_link($user_id, $user_name, $user_status, $class = "profile-link") {
global $locale, $settings;
$class = ($class ? " class='$class'" : "");
if ((in_array($user_status, [0, 3, 7]) || checkrights("M")) && (iMEMBER || $settings['hide_userprofiles'] == "0")) {
$link = "<a href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".$user_name."</a>";
} else if ($user_status == "5" || $user_status == "6") {
$link = $locale['user_anonymous'];
} else {
$link = $user_name;
}
return $link;
}
Quote
// User profile link
function profile_link($user_id, $user_name, $user_status, $class = "profile-link") {
global $locale, $settings;
$class = ($class ? " class='$class'" : "");
if ((in_array($user_status, [0, 3, 7]) || checkrights("M")) && (iMEMBER || $settings['hide_userprofiles'] == "0")) {
$link = "<a href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".colorize_user($user_name)."</a>";
} else if ($user_status == "5" || $user_status == "6") {
$link = $locale['user_anonymous'];
} else {
$link = $user_name;
}
return $link;
}
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions