fjtbeers wrote:Both, thanx for you replies and for the warm welcome. My apologies for posting in the wrong forum.

Hey, no problem...
I?m still not sure where it should be posted.

-- MOD Request? MOD in Development? Support Request? General Discussion?
All the above?
fjtbeers wrote:Well, i WILL try to help wehere-ever i can, but that will be phpbb2 in the first place.....;-)
That?s quite alright, I think you?ll pick up the new system fairly easily -- that?s subjective, but the truth is if you are experienced in PHP, you?ll pick it up no problem.

--
fjtbeers wrote:It aren't "officer ranks" as in sargeant or korporal or captain. Every police office has the "rank" of police officer, no matter what his real live rank is. But then we have judge, police student, police school teacher, district attorney etc.etc. In our current setting we have 8 "normal" ranks (ranging from "newbee" to "experienced member") and 31 special ranks (which are used as the rank2 button) Every user can have the standard rank (newbee, but also moderator or admin) en can have a special second rank (police officer, customs officer etc.)
Okay, that?s exactly the question I was getting at.

In the city we are working with, they have the ranks: Patrol Officer, Officer in Charge, Police Lieutenant, Police Sergeant, Police Captain, and Police Chief.
For the police department, so I was wondering if you would split it up that way.
BTW, You speak really good English, grammar is very good as well, just want to point out a few things.
In English, you would say ?It
isn?t ?officer ranks?...?
?korporal? is ?Corporal?.
fjtbeers wrote:At first i did set it on a per-user base (i still do) but because real police officers are automatically getting extra closed police-forums i added a radiobutton too so after changing the second rank into police officer (or any other rank coming from the standard ranks table), i can automatically add the member to this uniform members group (giving them entry to the forums) and give them the police button as rank 2. I added a screendump to this posting (hoping it goes right this time;-))
Okay, if it were me, this is how I would do it with the current system (i.e. no MODs).
Create 31 groups, give each of those groups their own special rank. -- No need to give any of these groups special permissions.
Then create a separate group for ?police officer? as you have done to give that group special forums/permissions. -- This group would NOT have a special rank.
Then you would add, for example, a Captain would be in the Registered Users group, Captain group, and Police officers group.
They would be default set to the Captain group, so they would maintain the rank of the Captain (you only get one rank option right now in phpBB3) but they would carry the permissions of the Police officers group since it overrides the default values.
fjtbeers wrote:I saw the possibility to add a group_rank but this wil change the standard rank... I guess the rank2-per-user possibility is good enough (as students will regularly become real police officers....for instance)
When a student becomes an actual officer, you would move them to an officer?s group, and delete them from the students group -- of course setting the default group to that of the officer group to give the user that rank.
Sure, this will override the experience users, newbie ranks etc, but as I mentioned before, phpBB3 only has one rank option per user.
fjtbeers wrote:Well, my thoughts...
Let's assume we use the standard ranks table (phpbb_ranks) and add a mediumint(8) unsigned standard 0 field to the phpbb_users_table named user_rank2 right after the user_rank field (i like it nice and clean

) After that i create a second entry field in the ACP->Users and Groups->Manage User->Select user->Manage Form->Ranks which can be an exact copy of the first fieldset with the exception of names. In includes->acp->acp_users.php (?????) i add the variable, and change the update query to include this variable.
Now that the second rank field is set to a rank from the standard ranktable i only have to change the get_user_rank function to include this second rank (or maybe a second function ?????) and work from there on in showing this second rank everywhere i want (e.g. viewtopic, memberlist, user_profile...)
hmm... I had not thought of doing it that way, but that could certainly work, it would be dependent of all other elements (viewtopic, profile, memberlist etc) using that function.
But that does sound like the easiest thing to do.
Just remember, create your code in a separate file (if you can) and include it as a function instead of modifying core files.
The reasoning is because the more core you modify, the more difficult it becomes to upgrade your board, so just keep that in mind.
fjtbeers wrote:As a matter of fact, one could see it as a mod request (i'm not al lazy person and really really want to do my part, but there is just so much one can do...) but i started this thread as a "learning curve" for a better understanding of the new phpbb3 way of doing things, having just plain and simple fun in the process of learning it and let's be very clear about this, sometimes police officers are just plain and simple....errrmmm.....stupid as in the "programming way"

Alright, MOD Request it is.

We only move it to MOD?s in development if you someone is actively working on the MOD.
Please feel free to browse around, ask questions, and post if you need any kind of help.
That is STG?s primary purpose: To help users get acquainted with phpBB3, and to help MOD Authors code better, and learn proper coding techniques for Olympus.
