To make your classes except members ( i wanted a else statement inside the code also ) now glow with some cool css and of course a fresh method so no turd eater from Mcdonalds could accuse me of copy & paste.
Function_config.php
PHP Code:
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define('UC_COM_VIP', 2);
define ('UC_VIP', 3);
define('UC_UPLOADER', -2);
define('UC_SITE_EDITOR', 4);
define('UC_FORUM_MODERATOR', 5);
define ('UC_MODERATOR', 6);
define ('UC_ADMINISTRATOR', 7);
define ('UC_SYSOP', 8);
define('UC_TEAM_LEADER', 9);
define ('UC_MANAGER', 10);
define ('UC_TRACKER_MANAGER', 1); ///---Set the ID# to match the member who will have access to the Tracker Manager---///
Function_users.php
Remove:
PHP Code:
function get_user_class_name ($class)
{
// code
}
function get_user_class_color ($class)
{
// code
}
Replace With:
PHP Code:
function get_user_class_name ($class)
{
switch ($class)
{
case UC_UPLOADER:
return "Member";
case UC_USER:
return "Member";
case UC_POWER_USER:
return "Scene Member";
case UC_COM_VIP:
return "Trustee";
case UC_VIP:
return "Site VIP";
case UC_SITE_EDITOR:
return "Prite Editor";
case UC_FORUM_MODERATOR:
return "Forum Moderator";
case UC_MODERATOR:
return "Global Moderator";
case UC_ADMINISTRATOR:
return "Administrator";
case UC_SYSOP:
return "Site Operator";
case UC_TEAM_LEADER:
return "Team Leader";
case UC_MANAGER:
return "Web Developer";
}
return "";
}
function get_user_class_color ($class)
{
switch ($class)
{
case UC_USER:
return "1E90FF";
case UC_POWER_USER:
return "20b2aa";
case UC_COM_VIP:
return "ff7c00";
case UC_VIP:
return "ffff00";
case UC_SITE_EDITOR:
return "B000B0";
case UC_FORUM_MODERATOR:
return "339933";
case UC_MODERATOR:
return "00FF00";
case UC_ADMINISTRATOR:
return "ff0f0f";
case UC_SYSOP:
return "e13535";
case UC_TEAM_LEADER:
return "4080B0";
case UC_MANAGER:
return "4EE2EC";
}
return "";
}
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'].']';
}
if ($user['class'] > UC_TEAM_LEADER) :
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #1d3fca, 0px 0px 6px #1d3fca;font-weight:bold; color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_TEAM_LEADER):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #1d3fca;font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_SYSOP):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_ADMINISTRATOR):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #F00, 0px 0px 6px #F00;font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_MODERATOR):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #008800, 0px 0px 6px #003e00;font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_FORUM_MODERATOR):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_SITE_EDITOR):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_VIP):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_COM_VIP):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_POWER_USER):
$username = '<span style="background: repeat-x scroll 0% 0% transparent;text-shadow: 0px 0px 5px #'.get_user_class_color($user['class']).', 0px 0px 6px #'.get_user_class_color($user['class']).';font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
elseif ($user['class'] == UC_USER):
$username = '<span style="font-weight:bold;color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
//else :
// $username = '<span style="font-weight:bold; color:#'.get_user_class_color($user['class']).';">'.htmlspecialchars($user['username']).' </span>';
endif;
//color: #4EE2EC;text-shadow: 0px 0px 5px #1d3fca, 0px 0px 6px #1d3fca;
//$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;
}
Now Freestyle or Cypher [=
It doesn't matter if you got an army or a wife I'll still fuck them with my eyes closed!