Adding new userclass

Started by Mindless, July 12, 2011, 05:16:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mindless

I can say for certain another member here is altering shit on code then neglecting to flush caches or understand what a memcached source code is all about, here you cannot just start altering shit without actually thinking about what your doing or what caches use classes in them, how else would it fail unless he's making an arse of adding the new classes or missing the cleanup promotion/demotion files.

rushed

#13
niko please post the files that you have edited for the new ranks, I only ever have to edit config and staffpanel.php (if they are new staff classes) and user_functions.php


My config



define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_HONOURED_USER',2);
define ('UC_VIP', 3);
define ('UC_MAMMON', 4);
define ('UC_ANGELS', 5);
define ('UC_DOMINIONS', 6);
define ('UC_OPHANIM', 7);
define ('UC_SERAPHIM', 8);
define ('UC_CODER',9);
define ('UC_ARCH_ANGELS', 10);
define ('UC_FOOL', 11);
define('UC_MIN', 0);   // minimum class
define('UC_MAX', 11);   // maximum class
define('UC_STAFF', 5); // start of staff classes


My user_functions.php

** class functions - pdq 2010 **/
/** START **/
   $class_names = array(
        UC_USER                 => 'User',
        UC_POWER_USER           => 'Power User',
        UC_HONOURED_USER        => 'Honoured User',
        UC_VIP                  => 'VIP',
        UC_MAMMON             => 'Mammon',
        UC_ANGELS            => 'Angel',
        UC_DOMINIONS        => 'Dominion',
        UC_OPHANIM => 'Ophanim',
        UC_SERAPHIM         => 'Seraphim',
        UC_CODER  =>'Coder',
        UC_ARCH_ANGELS              => 'Arch Angel',
        UC_FOOL                 => 'User');

   $class_colors = array(
        UC_USER                 => '33FFFF',
        UC_POWER_USER           => 'CC99CC',
        UC_HONOURED_USER        => 'FF0099',
        UC_VIP                  => '009F00',
        UC_MAMMON             => '0000FF',
        UC_ANGELS            => 'FE2E2E',
        UC_DOMINIONS        => 'B000B0',
        UC_OPHANIM  => '660000',
        UC_SERAPHIM                => '4080B0',
        UC_CODER => 'FF0000',
UC_ARCH_ANGELS              => '00FF00',
        UC_FOOL                 => '33FFFF');



nikole9love

Still not working,i make everything modification in config.php,user_functions.php,ann_config.php...I missed some file????please help

Mindless

Define them on config.php - add all new classes to all class arrays on user_functions.php - then add the same defines to ann_config.php.

nikole9love

I added a few classes, but VIP class  count download,no uploading.....my user clases are
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_EXTREME_USER', 2);
define ('UC_LOVER', 3);
define ('UC_VIP', 4);
define ('UC_UPLOADER', 5);
define ('UC_MODERATOR', 6);
define ('UC_ADMINISTRATOR', 7);
define ('UC_SYSOP', 8);
define ('UC_CODER', 9); 
define ('UC_OWNER', 10);


Please help me...I need for u-232 v3

DarkWarrior2


GingaNinja

Quote from: MrRep on January 16, 2012, 05:25:06 PM
check in the database on staffpanel, and set the av_class to the group id's.

Good to see you around mate :)

Nice one Rep m8 thats spot on all sorted now :) i knew there was something else just couldn't find it :( yeah its good to see you aswell m8 hopefully catch up for a chat at some point , maybe you could answer some of my noob questions save me cluttering up these forums :)

Thanks for your input aswell spongebob  ;D

DarkWarrior2

#7
like rep as said also check the database on id

these are examples of how to do it
Options
Add a new page

for every staff class you add you will have to add the tools in staff pan
like test test.php test what class you want to add it to submit it them add to the class tools from uploader class which you will see in the staff tools then delete the test so , till theres no tools in the upload class on staffpanel page
root  Dir --->announce


define('TIME_NOW', time());
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);
define('UC_MIN', 0);   // minimum class
define('UC_MAX', 9);   // maximum class
define('UC_STAFF', 5); // start of staff classes




root Dir--->staffpanel

    $staff_classes = array(
UC_MODERATOR => array('add' => false, 'edit' => false, 'delete' => false,    'log' => true),
UC_ADMINISTRATOR => array('add' => false, 'edit' => false, 'delete' => false,    'log' => true),
                        UC_SYSOP         => array('add' => false, 'edit' => false, 'delete' => false,    'log' => true),
                        UC_STAFFLEADER    => array('add' => false, 'edit' => false, 'delete' => false,    'log' => true),
UC_OWNER => array('add' => true, 'edit' => true, 'delete' => true, 'log' => true)
  );






include ----->config



//==User class defines
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);
define('UC_MIN', 0);   // minimum class
define('UC_MAX', 9);   // maximum class
define('UC_STAFF', 5); // start of staff classes






include----->user_functions

/** class functions - pdq 2010 **/
/** START **/
   $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');

MrRep

check in the database on staffpanel, and set the av_class to the group id's.

Good to see you around mate :)

GingaNinja

Quote from: MrRep on January 16, 2012, 04:06:46 PM
check out the arrray in the stafpanel.php mate, right at the top of the file ;)

nice one for your help rep m8 ;)

still dont think thats the issue i had looked there already heres the code just incase i assume this is what you mean

Quote$HTMLOUT ='';

    $staff_classes = array(
                  UC_MODERATOR       => array('add' => false,    'edit' => false,    'delete' => false,      'log' => true),
                  UC_ADMINISTRATOR    => array('add' => false,    'edit' => false,    'delete' => false,      'log' => true),
                  UC_SYSOP          => array('add' => true,    'edit' => true,    'delete' => true,      'log' => false)
                 );

    if (!isset($staff_classes[$CURUSER['class']]) || !$CURUSER)
    stderr('Error', 'Access Denied!');

so i'm thinking it must still be something else ! any other ideas would be great :)

MrRep

check out the arrray in the stafpanel.php mate, right at the top of the file ;)

GingaNinja

Ok i know this is probably a noob question but i've followed this and another post of mindless on here to add a couple of new user classes now on the site part of this it seemed to go alright but when i go into the staff panel i now have the user classes that are now in the mod admin and sysop's place instead of the mentioned classes , so what i mean is i've got Elite VIP , Uploader and moderator instead . i've searched through loads of files staffpanel the works looking for another setting but nojoy :(

my code

Config.php

//==User class defines
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_TLS_DJ', 2);
define ('UC_VIP', 3);
define ('UC_ELITE_VIP', 4);
define ('UC_UPLOADER', 5);
define ('UC_MODERATOR', 6);
define ('UC_SUPERMOD', 7);
define ('UC_ADMINISTRATOR', 8);
define ('UC_SYSOP', 9);
define('UC_MIN', 0);   // minimum class
define('UC_MAX', 9);   // maximum class
define('UC_STAFF', 6); // start of staff classes


user_function.php

/** class functions - pdq 2010 **/
/** START **/
   $class_names = array(
        UC_USER                 => 'User',
        UC_POWER_USER           => 'Power User',
UC_TLS_DJ               => 'TLS DJ',
        UC_VIP                  => 'VIP',
UC_ELITE_VIP            => 'Elite VIP',
        UC_UPLOADER             => 'Uploader',
        UC_MODERATOR            => 'Moderator',
UC_SUPERMOD             => 'Super Moderator',
        UC_ADMINISTRATOR        => 'Administrator',
        UC_SYSOP                => 'SysOp');
       
   $class_colors = array(
        UC_USER                 => '8E35EF',
        UC_POWER_USER           => 'f9a200',
UC_TLS_DJ               => 'fd01e8',
        UC_VIP                  => '009F00',
UC_ELITE_VIP            => 'fd9501',
        UC_UPLOADER             => '0000FF',
        UC_MODERATOR            => '01fdee',
UC_SUPERMOD             => 'fd5401',
        UC_ADMINISTRATOR        => 'B000B0',
        UC_SYSOP                => '4080B0');

   $class_images = array(
        UC_USER                 => $INSTALLER09['pic_base_url'].'class/user.gif',
        UC_POWER_USER           => $INSTALLER09['pic_base_url'].'class/power.gif',
        UC_TLS_DJ               => $INSTALLER09['pic_base_url'].'class/vip.gif',
UC_VIP                  => $INSTALLER09['pic_base_url'].'class/vip.gif',
UC_ELITE_VIP            => $INSTALLER09['pic_base_url'].'class/vip.gif',
        UC_UPLOADER             => $INSTALLER09['pic_base_url'].'class/uploader.gif',
        UC_MODERATOR            => $INSTALLER09['pic_base_url'].'class/moderator.gif',
UC_SUPERMOD             => $INSTALLER09['pic_base_url'].'class/moderator.gif',
        UC_ADMINISTRATOR        => $INSTALLER09['pic_base_url'].'class/administrator.gif',
        UC_SYSOP                => $INSTALLER09['pic_base_url'].'class/sysop.gif');


Announce.php

define('TIME_NOW', time());
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_TLS_DJ', 2);
define ('UC_VIP', 3);
define ('UC_ELITE_VIP', 4);
define ('UC_UPLOADER', 5);
define ('UC_MODERATOR', 6);
define ('UC_SUPERMOD', 7);
define ('UC_ADMINISTRATOR', 8);
define ('UC_SYSOP', 9);


any help anyone can give me on this would be greatly appreciated

Thanks In Advance

AMB

Don't forget about announce.php ;)

Mindless

#1
A simple guide for those that dont know

include/user_functions.php

$class_names = array(
        UC_USER                 => 'User',
        UC_POWER_USER           => 'Power User',
        UC_VIP                  => 'VIP',
        UC_UPLOADER             => 'Uploader',
        UC_MODERATOR            => 'Moderator',
        UC_ADMINISTRATOR        => 'Administrator',
        UC_SYSOP                => 'SysOp');
       
   $class_colors = array(
        UC_USER                 => '8E35EF',
        UC_POWER_USER           => 'f9a200',
        UC_VIP                  => '009F00',
        UC_UPLOADER             => '0000FF',
        UC_MODERATOR            => 'FE2E2E',
        UC_ADMINISTRATOR        => 'B000B0',
        UC_SYSOP                => '4080B0');

   $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_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_SYSOP                => $INSTALLER09['pic_base_url'].'class/sysop.gif');


Will become :

$class_names = array(
        UC_USER                 => 'User',
        UC_POWER_USER           => 'Power User',
        UC_VIP                  => 'VIP',
        UC_UPLOADER             => 'Uploader',
        UC_MODERATOR            => 'Moderator',
        UC_ADMINISTRATOR        => 'Administrator',
        UC_SYSOP                => 'SysOp',
        UC_OWNER                => 'Owner');
       
   $class_colors = array(
        UC_USER                 => '8E35EF',
        UC_POWER_USER           => 'f9a200',
        UC_VIP                  => '009F00',
        UC_UPLOADER             => '0000FF',
        UC_MODERATOR            => 'FE2E2E',
        UC_ADMINISTRATOR        => 'B000B0',
        UC_SYSOP                => '4080B0',
        UC_OWNER                => '4080B0');

   $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_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_SYSOP                => $INSTALLER09['pic_base_url'].'class/sysop.gif',
        UC_OWNER                => $INSTALLER09['pic_base_url'].'class/sysop.gif'
        );


In each array its simple find the last line :

UC_OWNER                => $INSTALLER09['pic_base_url'].'class/sysop.gif'

Add a , press return then copy next line and edit new class name, note last in array never has a comma at the end so beware.

UC_OWNER                => $INSTALLER09['pic_base_url'].'class/sysop.gif',
UC_MAJORTOM                => $INSTALLER09['pic_base_url'].'class/rocket.gif'


Ok thats that side - config.php :

define ('UC_SYSOP', 6);

Under it add new class

define ('UC_OWNER', 7);

Next part will vary according to your site :

define('UC_MIN', 0);   // minimum class
define('UC_MAX', 6);   // maximum class
define('UC_STAFF', 4); // start of staff classes


If you change class structure remember to sort that. we changed to max class 7 :

define('UC_MIN', 0);   // minimum class
define('UC_MAX', 7);   // maximum class
define('UC_STAFF', 4); // start of staff classes


Then sweep your files looking for pplaces where Sysop was allowed you want to change that.