Dead Men Walking

Old Server Admin Section => Archived Topics => Head and Section Admins => Topic started by: smilodon on February 09, 2009, 05:19:26 PM

Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 09, 2009, 05:19:26 PM
The final plan? If it all blows up I will refer people back here with a "I told you what I was going to do, so it's your own fault for not saying anything" :norty:

Primary Groups (everyone is in one of these but no more)


------------------------------------------------------------------------------------------------------------------
Secondary Groups (members can be one or more of these)

Administrators

---------------------------------------------------------------------------------------------------------------
Game Specific


---------------------------------------------------------------------------------------------------------
Community Specific


Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 09, 2009, 05:41:04 PM
Oh you used pretty colours and everyfink :flirty:

Looks good to me but as I know zip that's not much help.

I'm gearing up for it tonight. Gandy should be backing up as we speak and I'm aiming to start a 7.32 pm

I shall be on IM if anyone needs me and my mobile number is 07905 984529 for when you realise I've totally buggered it up.

PEN
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 09, 2009, 06:06:03 PM
backup successful. worst case we lose a few hours posts. But I'm sure you'll be fine.
Title: Final Configuration for the Forum Permissions
Post by: OldBloke on February 09, 2009, 06:08:58 PM
Please make sure that all the existing private sections (which include areas where we have discussed matters of discipline and behaviour) remain private.

I don't think I could cope with the fallout should they become open to all :doh:
Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 09, 2009, 06:19:21 PM
Good call ...... I can just see it now ------ Holland declaring war on us (again).

I'm not touching the head and admin sections. The only admin sections I'm doing is to add L4d. AFAIAA nothing will change.

I'll change my own status to Alpha once it's done and double check :)  <------ EDIT: IN HINDSIGHT, THIS IS NOT THE MOST SENSIBLE THING TO DO :doh:

Thanks Gandy.
Title: Final Configuration for the Forum Permissions
Post by: OldBloke on February 09, 2009, 06:28:08 PM
Good Luck :thumb:
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 04:29:52 PM
Right the last main task is the scripts. So here goes.... a list of the user groups that need populating. I've marked the few that already have the members set up i.e. WOW, L4D Game Admins. However I'd like the script anyway as it will allow any new memebrs of these groups to benefit from the automated sign up.

Gandy, one worry is that I cannot find an ID for the badges only for user groups and forums. Am I missing something?

Scripted permissions

User group                                                                    Badge

Supporting Member ID 48                                   Supporting Member

Green Badge Holder ID 53                                  LAN attendee
Green Badge Holder ID 53                                  Awarded to active folders
Green Badge Holder ID 53                                  Awarded to 500,000+ folders
Green Badge Holder ID 53                                  Quality forum contributor

CS Green Badge Holder ID 43                            CS player
CS Green Badge Holder ID 43                            CS:S Trialist

CoD4 Green Badge Holder ID 50                        CoD4 player
CoD4 Green Badge Holder ID 50                        CoD4 Trialist

dMr Green Badge Holder ID 51                           Active dMr racers

WOW Guild Member ID 40                                 Active DMR player (already populated)

L4D Green Badge Holder ID 52                           L4D - player

CS Game Admin ID 23                                       CS - Admin

CoD4 Game Admin ID 38                                   CoD4 - Admin

dMr Game Admin ID 37                                      dMr - Admin

L4D Game Admin ID 46                                      L4D - Admin (already populated)

WOW Council Member ID 39                              DMR - Officer (already populated)

Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 10, 2009, 04:36:28 PM
nice one Smilo. I know you had a busy week anyway.....

Please let me know if there's anything I can do to help. I'm fielding the forum enquiries as they come in (38 pms so far since last night) so I'll try and keep 'em off your back.

:nevermind:
Title: Final Configuration for the Forum Permissions
Post by: Anonymous on February 10, 2009, 04:37:45 PM
Quote from: smilodon;262942Green Badge Holder ID 53                                  LAN attendee
Green Badge Holder ID 53                                  Awarded to active folders
Green Badge Holder ID 53                                  Awarded to 500,000+ folders
Green Badge Holder ID 53                                  Quality forum contributor


Maybe Im not understanding something (wouldnt be the first time) but how can all these badges have the same ID and the scripts still work?
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 10, 2009, 04:56:14 PM
To get the award ID the best way is to go into the award manager and hover over Edit and look at the URL. The award_id will be at the end.

EG: Name: Community Leader (id: 10)

So I don't mess up the script I require the following;

Award ID -> Group ID

The script will then do one of two things depending on what it finds.

It will firstly check an award ID and if that user does not have the assigned group ID as a secondary usergroup it will assign it to that user.

Secondly it will check the secondary usergroup users to ensure that they have the corresponding award ID. If they do not then that user will be removed from the secondary usergroup.

At the moment I have the following in the script that assign people to the relevant groups (of course with the recent changes this may well have broken things so they do need checking)

// CoD4 Group vars
$codsu = 2; // Section Head Badge
$codad = 5; // Admin Badge
$codgr = 38; // Usergroup to Assign

// CSS Group vars
$csssu = 11; // Section Head Badge
$cssad = 12; // Admin Badge
$cssgr = 23; // Usergroup to Assign

// dMr Group vars
$dmrsu = 16; // Section Head Badge
$dmrad = 18; // Admin Badge
$dmrgr = 37; // Usergroup to Assign

As you can see, section heads and admins get assigned to the same usergroup. This is NOT set in stone and can be changed as required. EG: Section Head assigned to one group, Admins to another. Just tell me what needs to happen!
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 05:05:58 PM
Quote from: BlueBall;262947Maybe Im not understanding something (wouldnt be the first time) but how can all these badges have the same ID and the scripts still work?

These Green Badge holders need access to the green badge holder forum but not to the game specific private forums. The user group 53 will have access to the Green Badge Holder forum only. The CS Green Badge holder user group, CoD4 Green Badge Holder user group etc will also have access to this forum but in addition they will have access to their own private game forums. In that way a LAN attendee green badge holder can see the Green Badge Holder forum but not the CS private forum where as a CS Green badge Holder can see both.

Not all Green Badge Holders were created equal :)

Gandy I'll get back to you in a bit
Title: Final Configuration for the Forum Permissions
Post by: Anonymous on February 10, 2009, 05:10:37 PM
Quote from: smilodon;262956These Green Badge holders need access to the green badge holder forum but not to the game specific private forums. The user group 53 will have access to the Green Badge Holder forum only. The CS Green Badge holder user group, CoD4 Green Badge Holder user group etc will also have access to this forum but in addition they will have access to their own private game forums. In that way a LAN attendee green badge holder can see the Green Badge Holder forum but not the CS private forum where as a CS Green badge Holder can see both.

Not all Green Badge Holders were created equal :)

Gandy I'll get back to you in a bit

Ah I see, its group IDs not badge IDs
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 05:39:04 PM
And so it came to pass. This is the script info for Gandy. I'm going to go take a break and then recheck everything is numbered right. So if we can wait till later before we actually run the scripts that would be good. I'm sure there is an error in there somewhere. If there is who knows where people will get assigned. I'll shout once I've checked it all out.

Badge ID -> user group ID


   
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 10, 2009, 05:57:21 PM
That's fine. I'm not going to make the changes tonight as I have too much on. Raid, then network fixing shortly after so it's gonna be a long night!
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 06:08:18 PM
Double checked. Seems Ok. I'm happy for some peer review but that's about it. We can all take the night off :D
Title: Final Configuration for the Forum Permissions
Post by: Whitey on February 10, 2009, 06:51:45 PM
Nice work gents! (and Pen) :D

I've started moving some of the posts I'd like to keep from the archived area into the new structure.
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 07:41:22 PM
Go for it. Frankly I'd like to get shot of Charlie and Bravo access completely. So if we can bring good stuff from their old forums back into the existing forum structure that would work best I think. That's true for any of the Bravo/Charlie stuff we want to keep.

Knock yourselves out.
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 10, 2009, 10:41:39 PM
Quote from: smilodon;262991Go for it. Frankly I'd like to get shot of Charlie and Bravo access completely. So if we can bring good stuff from their old forums back into the existing forum structure that would work best I think. That's true for any of the Bravo/Charlie stuff we want to keep.

Knock yourselves out.

I agree. drop em :D Archive threads and kill dead groups.
Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 10, 2009, 10:58:09 PM
Just to confirm.......... Yes definitely - let's kill the access.

The Bravo and Charlie forums can stay in the Archive section. You never know when we may want to check back on something or indeed revisit some classics from the past.

Whitey, I know you're pretty good at this but give me a shout if you want help with anything moved back from archive. I feel all empowered now I know how to do it:)

hehe
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 10, 2009, 11:46:08 PM
Quote from: Penfold;263032I feel all empowered now I know how to do it:)

hehe
The kiss of forum death :rolleyes:

I'll wait till the scripts are done and we can see everyone getting their new permissions. Then I'll revert everyone back to Registered Users as their primary user group. And then we can dump Charlie and Bravo.
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 11:07:45 AM
Quote from: Gandalf;262955]As you can see, section heads and admins get assigned to the same usergroup. This is NOT set in stone and can be changed as required. EG: Section Head assigned to one group, Admins to another. Just tell me what needs to happen!

OK here goes. I think we have decided that we want to keep the four games separate with separate user groups for green and red game badge holders. As an example there is a need for a CS admin to be able to see and post into the CS admin forum but not have him or her see into the L4D admin forum.


1. Section Heads do not need a script. They are already in the Section Head user group and have almost complete access to the forum already.

2. Game admins (red badge holders). There are four game admin user groups, one for each game. The four red game badges need to be assigned to each of these games i.e. the red CS badge needs to link to the CS Game Admin user group. The same for CoD4, L4D, dMr and DMR. So I assume four scripts. There are admin forums that are for specific games and we've decided that CS admisn do not get access to L4D admin forums and so on.

3. Public Admins (no badges) these user groups have no badge associated with them and so need no script. I'll do them manually as only CS uses public admins at the moment.

4. Supporting members. I need a script to assign the supporting member badge holders to the supporting member user group.

5. General green badge holders. I need a script to assign all non game green badge holders LAN, folding and forum contributor) to the green badge holder user group. This will give them access to the green badge chat forum only.

5. Game green badge holders. I have a green badge holder user group for each of the four games. I need four scripts to add each green badge holder type to the relevant Green badge holder user group. So one for CS, CoD4, L4D, dMr and DMR. For example this is to allow the CS green badge holders access to their private CS forum but not allow the L4D access and so on. The CS and CoD4 trialists should be treated as green badge holders for their respective games i.e. CS Trialist has the same user group and a CS Green badge holder and the CoD4 trialist has the same suer group as the CoD4 Green badge holder.

6. The correct permissions are already set up for the WOW players. They have been assigning a guild member group (green badge) and a council member group (red badge) since they began. It would be nice to have a script system for them too as it will automate any future promitions etc and make all four games work in the same way.

Hope this makes sense? After three days I nearly get it :blink:
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 11:28:17 AM
As long as there is an award and relevant group then the script will work. It's all one script too, I just tell it what award belongs to what group and loop until complete.

WoW badge holders can be assigned by script too. Just need to be set like the other games.

So, does that list of awards and groups still stand? (bar WoW which needs adding)
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 12:15:26 PM
WOW are in my list from before. marked in red. Although the groups are up to date I'd still like them in the script for future updates. I've added two more requirements in green at the bottom.The idea being that when LAN helpers and 500,000+ folders get their red badges they loose the green ones. If that is so they would loose their permissions to the green badge holder chat when the script was next run. This is  assuming they did not hold another green badge as well, unlikely but possible.


Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 12:18:46 PM
ok, I'm going to start on the script and test on the test forum. As there are multiple variants it is going to require re-writing in places so may take a little longer than anticipated. Shouldn't be too troublesome though.
Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 11, 2009, 12:21:01 PM
GL mate
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 12:21:39 PM
Just one though. The user groups are not mirrored on the test forum. I'm not a total wuss like Penfold so did the permissions on the live forum. Not sure if the fact that there are not all the same user groups will matter? I can make them on the test forum tonight if you want?
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 12:37:45 PM
ok, no probs, it should be ok. I'll just use some existing groups and awards. Shouldn't be a problem.
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 02:37:58 PM
Right, all done. I've copied the groups from the existing forum to the test via a good old fasioned SQL dump so that was easy (and before you ask, no, I would not have done this on the live as it could have screwed up bad!)

Script in place that will now loop through the array of awards and grab all users and assign them to the associated group if not already assigned.

It will also check for users that are currently assigned to a group and checks that they do have the award assigned and if they don't then it will remove that user from the relevant group.

Now, this was part of the subscription to awards task but as this now takes around 3-5 seconds to run I've created a separate script and will assign it to it's own time.

Just so you know how the tasks run, they are called scheduled tasks but they do not run 'on the dot' they require someone to click any link in the forum to run as the software will check to see if there is a task to run and if so will run it. The downside to this is if the task is rather data intensive as this new one is, then the person clicking the link will get a slight delay.

The tasks do run at the end of the page load so it 'should' not be noticeable but I thought I'd mention it incase people start to say that the forum freezes every hour then recovers. If this becomes the case then we can set the task to run during the night and chances are a spider will fire off the task for us.

So if you'd like to check out the test forum you'll see people assigned to the relevant groups. NOTE: Permissions ARE NOT DONE! I only mirrored the groups.

Without doing a full backup of live and restore onto test I cannot test any further. But I'm happy that it won't hose anything!

Let me know when you'd like this placed on the live forum.
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 03:00:39 PM
I'll have a rummage about this evening. many thanks :D
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 03:08:57 PM
And here is the array that assigns users to the relevant group. The first value is the award, the second is the corresponding group. Any additions can be tacked onto this array, no extra coding required :)

// Groups
$grouparr = array(
3 => 50,
5 => 38,
6 => 50,
9 => 53,
12 => 23,
13 => 43,
14 => 43,
17 => 51,
18 => 37,
20 => 53,
21 => 53,
24 => 53,
25 => 53,
29 => 48,
31 => 40,
32 => 39,
38 => 46,
39 => 52
);
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 03:25:05 PM
Pah that simple thing must only have taken 30 seconds to do. I thought it would be much harder than that :wink:
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 03:31:09 PM
Quote from: smilodon;263165Pah that simple thing must only have taken 30 seconds to do. I thought it would be much harder than that :wink:

hah, I wish. just spotted a minor glitch that is causing it to go loopy on the groups that are in the array more than once. Sorting that now.
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 04:19:47 PM
ok, this is really odd. It should be working fine. Everything is outputting correctly in the script. It's just not setting everyone to the groups they should be in!

I think it could be due to the differences between the two forums now. I'll have to do a backup and restore to fully test and bug check.

Or just give it a go on live.

It's not assigning anyone to the wrong groups, it's just not giving enough out.
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 05:02:41 PM
ok, worked out what it is. My array is messing up the vb datamanager for some reason as removing the array loop and hard coding in one of the awards and groups and it works perfectly.

I'm kinda running on fumes a bit here so will pick this up in the morning. At least the network issue is fixed!
Title: Final Configuration for the Forum Permissions
Post by: smilodon on February 11, 2009, 05:05:21 PM
No worries whenever it's done it's done. I'm sure people would rather have good access to teh game servers than access to a few as yet empty forums.
Title: Final Configuration for the Forum Permissions
Post by: Anonymous on February 11, 2009, 05:05:42 PM
Quote from: Gandalf;263187ok, worked out what it is. My array is messing up the vb datamanager for some reason as removing the array loop and hard coding in one of the awards and groups and it works perfectly.

I'm kinda running on fumes a bit here so will pick this up in the morning. At least the network issue is fixed!

Go have a beer and watch a film :)
Title: Final Configuration for the Forum Permissions
Post by: Gandalf on February 11, 2009, 05:07:50 PM
Quote from: BlueBall;263191Go have a beer and watch a film :)

I taped lethal weapon 2 the other night so I think I'll do that :D
Title: Final Configuration for the Forum Permissions
Post by: Penfold on February 11, 2009, 05:12:43 PM
oooo gotta love LW for a bit of down time.

I've still not gotten around to watching them all yet though