New OOP permissions system
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
-
- Registered User
- Posts: 10
- Joined: Sat Jan 15, 2005 2:33 pm
- Location: Birmingham, AL
- Contact:
New OOP permissions system
Can someone explain the advantages of using a class for the new user permissions system rather than just using the permissions system that was in phpBB2?
-
- Registered User
- Posts: 687
- Joined: Sun May 11, 2003 11:17 am
Re: New OOP permissions system
Permissions are much more fine-grained, and there need not be the hard classifications of users, moderators, and admins that there was before. Now, instead of adding in code for junior admins that have specific, largely unchangeable permissions, for example, you can create a class of users that have moderator capabilities but can also handle bans. You can create a class of users that are allowed to edit their own posts while others (troublemakers, perhaps) cannot.
I seem to recall that Paul has suggested that a simplified template system may be available by final release. This may help somewhat.
I seem to recall that Paul has suggested that a simplified template system may be available by final release. This may help somewhat.
You can never go home again... but I guess you can shop there.
-
- Registered User
- Posts: 10
- Joined: Sat Jan 15, 2005 2:33 pm
- Location: Birmingham, AL
- Contact:
Re: New OOP permissions system
I didn't mean the way that the permissions are set, I mean the coding behind them, why was a class used rather than just using functions?
-
- Registered User
- Posts: 687
- Joined: Sun May 11, 2003 11:17 am
Re: New OOP permissions system
More flexibility in what you can do with the classes than with straight functions. You can declare classes that inherit the permissions classes, IIRC, for easier inclusion down the line. I've not worked with classes much in PHP, so I'm not completely up on them, but much of the code is being moved to a class-based system because of these reasons.
You can never go home again... but I guess you can shop there.
-
- Registered User
- Posts: 10
- Joined: Sat Jan 15, 2005 2:33 pm
- Location: Birmingham, AL
- Contact:
Re: New OOP permissions system
I also understand how classes work, but the initial decision to use an auth class had to have an advantage over functions. Could one of the developers possibly explain?
- A_Jelly_Doughnut
- Registered User
- Posts: 1780
- Joined: Wed Jun 04, 2003 4:23 pm
Re: New OOP permissions system
They are a series of related functions, which typically create a class 
A_Jelly_Doughnut
-
- Registered User
- Posts: 10
- Joined: Sat Jan 15, 2005 2:33 pm
- Location: Birmingham, AL
- Contact:
Re: New OOP permissions system
I know what a class is. I want to know the ADVANTAGE of it.
- A_Jelly_Doughnut
- Registered User
- Posts: 1780
- Joined: Wed Jun 04, 2003 4:23 pm
Re: New OOP permissions system
OOP is primarily an organizational system...there is nothing stopping them from using non-classed functions, but when they're classed, you know they go together...
A_Jelly_Doughnut
-
- Registered User
- Posts: 10
- Joined: Sat Jan 15, 2005 2:33 pm
- Location: Birmingham, AL
- Contact:
Re: New OOP permissions system
So it has nothing to do with functionality, just organization.
Re: New OOP permissions system
well i was told (it could be wrong though) that when programming with classes you use less of memory.. (I meen php memory
)
Luc
Luc