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 ]

You are here: Big Brother Bot ForumSupport ForumsInstallation Support (Moderator: MordyT)[Tutorial] How To make new groups
Pages: [1]   Go Down
  Print  
Author Topic: [Tutorial] How To make new groups  (Read 2088 times) Bookmark and Share
Beta Testers
*
OS: Windows
Type: Home user
Gameservers: Urt
Posts: 125
Offline Offline
heyy
« on: November 08, 2010, 06:16:34 AM »

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:
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:
<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:
<option value="1"<?=($row_rs_clientinfo['group_bits']=='1')?' selected':'';?>>User</option>

then you copy it and you will have that :
          
Code:
  <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:
<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:
$hide_admin_level = "128"; // 1, 2, 8, 16, 32, 64, 128 -> Hides clientdetails
edit the numbers 128 with 2097153
Code:
$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, 07:34:12 AM by grosbedo » Logged

Beta Testers
*
OS: Windows
Type: Home user
Gameservers: UrT
Posts: 117
Offline Offline
WWW
« Reply #1 on: November 08, 2010, 06:21:43 AM »

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:
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:
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. Wink


Logged

Former Dev. (senate)
*****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: OpenArena
Posts: 258
Offline Offline
« Reply #2 on: November 08, 2010, 07:29:30 AM »

Good job ! I sticky it Wink

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.
Logged
Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 55
Offline Offline
WWW
« Reply #3 on: November 08, 2010, 10:34:39 AM »

Perhaps it could be better to write
Code:
INSERT INTO groups VALUES(256, 'Admin', 'Admin', 40, unix_timestamp(), unix_timestamp());
instead of
Code:
INSERT INTO `groups` VALUES(256, 'Admin', 'Admin', 40, 1185973704, 1185973704);
because otherwise both fields, time_edit and time_add, are getting filled with senseless data. And ` is unnecessary and confusing, since you have to type the correct character (` and not ´ or ').
Logged

Beta Testers
*
OS: Windows
Type: Home user
Gameservers: Urt
Posts: 125
Offline Offline
heyy
« Reply #4 on: November 08, 2010, 10:37:57 AM »

Perhaps it could be better to write
Code:
INSERT INTO groups VALUES(256, 'Admin', 'Admin', 40, unix_timestamp(), unix_timestamp());
instead of
Code:
INSERT INTO `groups` VALUES(256, 'Admin', 'Admin', 40, 1185973704, 1185973704);
because otherwise both fields, time_edit and time_add, are getting filled with senseless data. And ` is unnecessary and confusing, since you have to type the correct character (` and not ´ or ').
it doesnt change anything =)
i did everything yesterday all worked for me .
A friend did everything too , and all work for him .. So do as you want i think your thing confuse people more than mine xD
Logged
Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 55
Offline Offline
WWW
« Reply #5 on: November 08, 2010, 10:43:39 AM »

(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');".)
Logged

Beta Testers
*
OS: Windows
Type: Home user
Gameservers: Urt
Posts: 125
Offline Offline
heyy
« Reply #6 on: November 08, 2010, 10:45:36 AM »

(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
Logged
Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 55
Offline Offline
WWW
« Reply #7 on: November 08, 2010, 10:52:05 AM »

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.
Logged

Beta Testers
*
OS: Windows
Type: Home user
Gameservers: UrT
Posts: 117
Offline Offline
WWW
« Reply #8 on: November 08, 2010, 10:54:36 AM »

Ye well that can be usefull, but I think its not a big deal at all. Wink
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 21
Offline Offline
« Reply #9 on: November 20, 2011, 10:40:18 AM »

if you add extra levels .. seems to break the !admins command .. the new levels dont get picked up

Any one else spotted this ?
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 21
Offline Offline
« Reply #10 on: November 23, 2011, 11:35:45 AM »

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
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 21
Offline Offline
« Reply #11 on: November 24, 2011, 11:51:11 AM »

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
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal