Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Adding new user class on tbdev (http://www.bvlist.com/showthread.php?t=555)

3v0 4th July 2008 03:00

Adding new user class on tbdev
 
Hi

I would like to add a new user class called DJ to tbdev which files do I need to edit to do this?

At the moment I have

define ('UC_PEASANT', 0);
define ('UC_USER', 10);
define ('UC_VIP', 30);
define ('UC_UPLOADER', 40);
define ('UC_MODERATOR', 50);
define ('UC_ADMINISTRATOR', 60);
define ('UC_SYSOP', 100);

And would like the class for DJ to go between VIP and User

Explorer 4th July 2008 20:29

Re: Adding new user class on tbdev
 
Nice tutorial for newbie's ;)

TNX

djlee 5th July 2008 03:21

Re: Adding new user class on tbdev
 
just add it where you want it .. luckily u seem to have picked up a premodded source where the user classes have been spread out.

firstly add the new class to the constants list

Code:

define ('UC_PEASANT', 0);
define ('UC_USER', 10);
define ('UC_DJ', 20);
define ('UC_VIP', 30);
define ('UC_UPLOADER', 40);
define ('UC_MODERATOR', 50);
define ('UC_ADMINISTRATOR', 60);
define ('UC_SYSOP', 100);

and then look through the rest of global.php checking for anywhere else you need to define it .. one place you will definately need to define it is in the get_user_class_name function i think it is. Just look at the code thats already in those functions and copy it out for the new class obviously using UC_DJ and the level 20 where applicable

xDev 10th January 2012 17:16

PHP Code:

   $class_names = array(
        
UC_USER                 => 'User',
        
UC_POWER_USER           => 'Power User',
        
UC_VIP                  => 'VIP',
        
UC_COMVIP               => 'COMVIP',
        
UC_UPLOADER             => 'Uploader',
        
UC_MODERATOR            => 'Moderator',
        
UC_ADMINISTRATOR        => 'Administrator',
        
UC_STAFFLEADER           => 'Staffleader',
        
UC_SYSOP                => 'SysOp',
        
UC_OWNER                => 'Owner');

   
$class_colors = array(
        
UC_USER                 => '00FFFF',
        
UC_POWER_USER           => 'f9a200',
        
UC_VIP                  => '009F00',
        
UC_COMVIP               => '00FF33',
        
UC_UPLOADER             => '3579DC',
        
UC_MODERATOR            => 'FE2E2E',
        
UC_ADMINISTRATOR        => 'B000B0',
        
UC_STAFFLEADER          => 'ADEAEA',
        
UC_SYSOP                => '4080B0',
        
UC_OWNER                => 'FF0000');

   
$class_images = array(
        
UC_USER                 => $INSTALLER09['pic_base_url'].'class/user.gif',
        
UC_POWER_USER           => $INSTALLER09['pic_base_url'].'class/power.gif',
        
UC_VIP                  => $INSTALLER09['pic_base_url'].'class/vip.gif',
        
UC_COMVIP               => $INSTALLER09['pic_base_url'].'class/comVip.gif',
        
UC_UPLOADER             => $INSTALLER09['pic_base_url'].'class/uploader.gif',
        
UC_MODERATOR            => $INSTALLER09['pic_base_url'].'class/moderator.gif',
        
UC_ADMINISTRATOR        => $INSTALLER09['pic_base_url'].'class/administrator.gif',
        
UC_STAFFLEADER          => $INSTALLER09['pic_base_url'].'class/leader.gif',
        
UC_SYSOP                => $INSTALLER09['pic_base_url'].'class/sysop.gif',
        
UC_OWNER               => $INSTALLER09['pic_base_url'].'class/owner.gif'); 



PHP Code:

define ('UC_USER'0);
define ('UC_POWER_USER'1);
define ('UC_VIP'2);
define ('UC_COMVIP'3);
define ('UC_UPLOADER'4);
define ('UC_MODERATOR'5);
define ('UC_ADMINISTRATOR'6);
define ('UC_STAFFLEADER'7);
define ('UC_SYSOP'8);
define ('UC_OWNER'9); 


give this ago ediit lines


All times are GMT +2. The time now is 14:28.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.