Thread: New class
View Single Post
  #1  
Old 22nd August 2010, 00:35
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
To add, edit & delete class go to include folder ,if you use the new tbdev look at user_functions.php for older tbdev , it is in global.php. Now look for this
Code:
function get_user_class_name($class)
{
  switch ($class)
  {
    case UC_USER: return "User";

    case UC_POWER_USER: return "Power User";

    case UC_VIP: return "VIP";

    case UC_UPLOADER: return "Uploader";

    case UC_MODERATOR: return "Moderator";

    case UC_ADMINISTRATOR: return "Administrator";

    case UC_SYSOP: return "SysOp";
  }
  return "";
}
If you what to add a new class just add
Code:
case UC_Multi_USER: return "Multi User";
To edit just edit the name , ex: case UC_MODERATOR: return "Moderator"; to case UC_MOD: return "Mod";
To delete simply delete case uc_xx the whole thinq

attention

Attention

Now to work the new class you have to edit almost every php file




Ex: in userdetalis.php it is the this
Code:
if ($user["id"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR)
{
if ($user['port'] != 0) { ?>
<tr><td class=rowhead>Port</font></td><td class=tablea align=left><?=($user['port'])?></td></tr>
replace the UC_MODERATOR with you new class ex: UC_MOD
Enjoy
Reply With Quote
The Following User Says Thank You to sagap For This Useful Post:
kapel12 (23rd July 2012)