Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

Author Topic: [Tutorial] How To make new groups  (Read 10321 times)

Offline Rei

  • Full Member
  • ***
  • Posts: 124
  • heyy
[Tutorial] How To make new groups
« on: November 08, 2010, 03:16:34 PM »
Hello , this is a tutorial for make more group on your b3 .
Step 1 :
Download this files

Step 2 :

As you can see you have 21 groups , You can remove some if need

Code: [Select]
INSERT INTO `groups` VALUES(256, 'Admin', 'Admin', 40, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(16, 'Moderator', 'mod', 20, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(4096, 'Full Admin', 'fulladmin', 60, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(65536, 'Senior Admin', 'senioradmin', 80, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(524288, 'Super Admin *', '95', 95, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(2097152, 'Super Admin ***', 'superadmin', 100, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(1048576, 'Super Admin **', '99', 99, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(2, 'Member', 'reg', 2, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(1, 'User', 'user', 1, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(8, 'Moderator *', '15', 15, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(32, 'Moderator+', '25', 25, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(512, 'Admin+', '45', 45, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(64, 'Moderator+1', '30', 30, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(128, 'Moderator+2', '35', 35, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(2048, 'Admin+2', '55', 55, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(1024, 'Admin+1', '50', 50, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(8192, 'Full Admin+', '65', 65, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(16384, 'Full Admin+1', '70', 70, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(32768, 'Full Admin+2', '75', 75, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(131072, 'Senior Admin+', '85', 85, 1185973704, 1185973704);
INSERT INTO `groups` VALUES(262144, 'Senior Admin+1', '90', 90, 1185973704, 1185973704);


So , you can rename all groups like you want but you have to have : SuperAdmin group or your B3 wont work .
Don't change the Values ( 256 / 16 / 4096 ... ) , you can change the name but you need to keep superadmin .. and you can change the level by editing the second numbers :  INSERT INTO `groups` VALUES(1024, 'Admin+1', '50', 50, 1185973704, 1185973704);
and dont change those numbers : INSERT INTO `groups` VALUES(1024, 'Admin+1', '50', 50, 1185973704, 1185973704);

Remove the line you don't need if you have enough groups .
When you are done with edit , save it and import your sql on your DB .


Step 3 :
Only if you are using echelon :
Go in your echelon folder , and select Clientdetails.PHP , edit it and find the lines :
<SELECT name="level">
Under it you should have something like that :
            
Code: [Select]
 <option value="0"<?=($row_rs_clientinfo['group_bits']=='0')?' selected':'';?>>Unregistered</option>
              <option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>
              <option value="8"<?=($row_rs_clientinfo['group_bits']=='8')?' selected':'';?>>Simple Moderator</option>
              <option value="16"<?=($row_rs_clientinfo['group_bits']=='16')?' selected':'';?>>Moderator</option>  
              <option value="256"<?=($row_rs_clientinfo['group_bits']=='256')?' selected':'';?>>Admin</option>
              <option value="4096"<?=($row_rs_clientinfo['group_bits']=='4096')?' selected':'';?>>Full admin</option>
              <option value="65536"<?=($row_rs_clientinfo['group_bits']=='65536')?' selected':'';?>>Senior Admin</option>
Just edit group_bits ( if you added level , you should have new group bits )  and edit the name if you want to rename groups.
Also you can make new lines if you haven't enough in your file clientdetails.php , you copy/paste one of the line , exemple :
Code: [Select]
 <option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>

then you copy it and you will have that :
          
Code: [Select]
   <option value="0"<?=($row_rs_clientinfo['group_bits']=='0')?' selected':'';?>>Unregistered</option>
              <option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>
              <option value="8"<?=($row_rs_clientinfo['group_bits']=='8')?' selected':'';?>>Simple Moderator</option>
              <option value="16"<?=($row_rs_clientinfo['group_bits']=='16')?' selected':'';?>>Moderator</option>  
              <option value="256"<?=($row_rs_clientinfo['group_bits']=='256')?' selected':'';?>>Admin</option>
              <option value="4096"<?=($row_rs_clientinfo['group_bits']=='4096')?' selected':'';?>>Full admin</option>
              <option value="65536"<?=($row_rs_clientinfo['group_bits']=='65536')?' selected':'';?>>Senior Admin</option>
               <option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>
So , check your group_bits from your sql files that you imported on your DB , and  change it :
            
Code: [Select]
<option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>
              <option value="8"<?=($row_rs_clientinfo['group_bits']=='8')?' selected':'';?>>Simple Moderator</option>
              <option value="16"<?=($row_rs_clientinfo['group_bits']=='16')?' selected':'';?>>Moderator</option>  
              <option value="256"<?=($row_rs_clientinfo['group_bits']=='256')?' selected':'';?>>Admin</option>
              <option value="4096"<?=($row_rs_clientinfo['group_bits']=='4096')?' selected':'';?>>Full admin</option>
              <option value="65536"<?=($row_rs_clientinfo['group_bits']=='65536')?' selected':'';?>>Senior Admin</option>
               <option value="524288"<?=($row_rs_clientinfo['group_bits']=='524288')?' selected':'';?>>Super Admin</option>
Do it for every line / level you added .. Be sure to have the same group_bit as your sql files!
Then close clientdetails.php & save it .

Step 4 :
Go in your folder echelon\Connections
open : inc_config
and at 4th line
Code: [Select]
$hide_admin_level = "128"; // 1, 2, 8, 16, 32, 64, 128 -> Hides clientdetails 
edit the numbers 128 with 2097153
Code: [Select]
$hide_admin_level = "2097153"; // 1, 2, 8, 16, 32, 64, 128 -> Hides clientdetails 
Then you will be able to change level on every user .


Guide made by *Evil* Community , for B3 Community .
« Last Edit: November 08, 2010, 04:34:12 PM by grosbedo »

Offline Witch

  • Full Member
  • ***
  • Posts: 116
Re: [Tutorial] How To make new groups .
« Reply #1 on: November 08, 2010, 03:21:43 PM »
Nice one.

Also note that u must have admin named "Superadmin" in your list or a b3 wont work.
If you want a superadmin with other name, you can copy/paste a line of superadmin and just rename it.

For example:

Code: [Select]
INSERT INTO `groups` VALUES(2097152, 'Super Admin', 'superadmin', 100, 1185973704, 1185973704)

That is superadmin.
For add a other name make a new line same but with other name and it will be like this:

Code: [Select]
INSERT INTO `groups` VALUES(2097152, 'Mega Admin', 'megaadmin', 100, 1185973704, 1185973704)

So you have 2 admins 100 with a two names.Can be usefull.

Also dont forget to do backup before you touch anything. ;)



Offline grosbedo

  • Former Dev. (senate)
  • Sr. Member
  • *****
  • Posts: 258
Re: [Tutorial] How To make new groups .
« Reply #2 on: November 08, 2010, 04:29:30 PM »
Good job ! I sticky it ;)

Another thing to note is that even if it's theoretically possible to set new groups over level 100, it is very NOT advised since this will cause instabilities, bugs and probably security flaws, since level 100 is hardcoded to be the maximum level in many plugins.

Offline BlackMamba

  • Full Member
  • ***
  • Posts: 55
    • BlackMamba's Blog
Re: [Tutorial] How To make new groups
« Reply #3 on: November 08, 2010, 07:34:39 PM »

Offline Rei

  • Full Member
  • ***
  • Posts: 124
  • heyy
Re: [Tutorial] How To make new groups
« Reply #4 on: November 08, 2010, 07:37:57 PM »

Offline BlackMamba

  • Full Member
  • ***
  • Posts: 55
    • BlackMamba's Blog
Re: [Tutorial] How To make new groups
« Reply #5 on: November 08, 2010, 07:43:39 PM »
(I didn't said that your sql statement doesn't work. But you write in the database, that you add the new group at 2007-08-01 15:08:24, because the number 1185973704 means exactly this. Try "select from_unixtime('1185973704');".)

Offline Rei

  • Full Member
  • ***
  • Posts: 124
  • heyy
Re: [Tutorial] How To make new groups
« Reply #6 on: November 08, 2010, 07:45:36 PM »
(I didn't said that your sql statement doesn't work. But you write in the database, that you add the new group at 2007-08-01 15:08:24, because the number 1185973704 means exactly this. Try "select from_unixtime('1185973704');".)
does it change something at end? lol

Offline BlackMamba

  • Full Member
  • ***
  • Posts: 55
    • BlackMamba's Blog
Re: [Tutorial] How To make new groups
« Reply #7 on: November 08, 2010, 07:52:05 PM »
Yes, you have clean informations. If you don't want it, don't do it. If you want to reconstruct when you added or changed a group, you need this informations. And it's an attitude to have correct informations in the database. But of course if you just want a running bot, you don't need this.

Offline Witch

  • Full Member
  • ***
  • Posts: 116
Re: [Tutorial] How To make new groups
« Reply #8 on: November 08, 2010, 07:54:36 PM »
Ye well that can be usefull, but I think its not a big deal at all. ;)

GrandPa

  • Guest
Re: [Tutorial] How To make new groups
« Reply #9 on: November 20, 2011, 07:40:18 PM »
if you add extra levels .. seems to break the !admins command .. the new levels dont get picked up

Any one else spotted this ?

GrandPa

  • Guest
Re: [Tutorial] How To make new groups
« Reply #10 on: November 23, 2011, 08:35:45 PM »
if you add extra levels .. seems to break the !admins command .. the new levels dont get picked up

Any one else spotted this ?

ignore this .. that will trust me to trust one of my "moderators" to get it right on what they tell me .. works fine   Good Tutorial

GrandPa

  • Guest
Re: [Tutorial] How To make new groups
« Reply #11 on: November 24, 2011, 08:51:11 PM »
If you use the AutoDocumentation function you have to edit documentationBuilder.py in tools to get the new levels right .. I changed to split Moderator into 2 levels

128    Super Admin    superadmin    100
64    Senior Admin    senioradmin    80
32    Full Admin    fulladmin            60
16    Admin        admin       40
8   Senior Mod   seniormod    20
4   Moderator    mod               10
2    Regular            reg               2   
1    User       user       1
0    Guest       guest       0

and had to change relevant section of documentationBuilder.py to be

 def friendlyLevel(level):
            try:
                intlevel = int(level)
                if intlevel <= 0:
                    return '<span title="%s - Everyone">All</span>' % level
                elif intlevel == 1:
                    return '<span title="%s - Registered players">user</span>' % level
                elif intlevel < 10:
                    return '<span title="%s - Regular players">reg</span>' % level
                elif intlevel < 20:
                    return '<span title="%s - Moderators">mod</span>' % level
                elif intlevel < 40:
                    return '<span title="%s - Senior Moderators">seniormod</span>' % level
                elif intlevel < 60:
                    return '<span title="%s - Admins">admin</span>' % level
                elif intlevel < 80:
                    return '<span title="%s - Full admins">fulladmin</span>' % level
                elif intlevel < 100:
                    return '<span title="%s - Senior admins">senioradmin</span>' % level
                elif intlevel >= 100:
                    return '<span title="%s - Super admins">superadmin</span>' % level
                else:
                    return level
            except:
                return level

Offline Skillz

  • Newbie
  • *
  • Posts: 1
Re: [Tutorial] How To make new groups
« Reply #12 on: July 07, 2015, 01:58:00 PM »
I have better way i think u can edit it by going to b3.sql and copy and paste what ranks u need but the problem how i know codes like 128 or 64 ...

 


Rate this page +1 at Google Search