Bravo List
Go Back   > Bravo List > Source Code > Trackers > TBDev
Old 04-07-08, 03:00
3v0's Avatar
3v0 3v0 is offline
Senior Member
Join Date: Feb 2008
Posts: 88
Default Adding new user class on tbdev

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
Reply With Quote
Old 04-07-08, 20:29
Explorer's Avatar
Explorer Explorer is offline
Senior Member
Join Date: Jan 2008
Posts: 23
Default Re: Adding new user class on tbdev
Nice tutorial for newbie's ;)

Reply With Quote
Old 05-07-08, 03:21
djlee's Avatar
djlee djlee is offline
Senior Member
Join Date: Mar 2008
Posts: 183
Default 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

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
Reply With Quote
Old 10-01-12, 17:16
xDev's Avatar
xDev xDev is offline
Join Date: Feb 2008
Posts: 158
Thumbs up
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_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_STAFFLEADER'7);
define ('UC_SYSOP'8);
define ('UC_OWNER'9); 

give this ago ediit lines
Reply With Quote

adding , class , tbdev , user

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DATABASE: mysql_connect: Access denied for user 'user'@'localhost' ciolpalas Torrent Trader 2 30-06-10 08:31
[TBDev] User Promotions Log KustomizeR TBDev 5 21-03-09 20:52
adding in staff tunad Torrent Strike 5 22-11-08 08:57
how change the normal user to power or admin user in ts TS Special Edition v.5.1 theway Template Shares 2 27-09-08 14:44
user title under class ? jora33 YSE 1 12-06-08 10:37

All times are GMT +2. The time now is 14:43. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2019, vBulletin Solutions Inc.