New OOP permissions system

Discussion of general topics related to the new version 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!
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!
phpBBInstaller
Registered User
Posts: 10
Joined: Sat Jan 15, 2005 2:33 pm
Location: Birmingham, AL
Contact:

New OOP permissions system

Post by phpBBInstaller »

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?

Martin Blank
Registered User
Posts: 687
Joined: Sun May 11, 2003 11:17 am

Re: New OOP permissions system

Post by Martin Blank »

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.
You can never go home again... but I guess you can shop there.

phpBBInstaller
Registered User
Posts: 10
Joined: Sat Jan 15, 2005 2:33 pm
Location: Birmingham, AL
Contact:

Re: New OOP permissions system

Post by phpBBInstaller »

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?

Martin Blank
Registered User
Posts: 687
Joined: Sun May 11, 2003 11:17 am

Re: New OOP permissions system

Post by Martin Blank »

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.

phpBBInstaller
Registered User
Posts: 10
Joined: Sat Jan 15, 2005 2:33 pm
Location: Birmingham, AL
Contact:

Re: New OOP permissions system

Post by phpBBInstaller »

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?

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: New OOP permissions system

Post by A_Jelly_Doughnut »

They are a series of related functions, which typically create a class :)
A_Jelly_Doughnut

phpBBInstaller
Registered User
Posts: 10
Joined: Sat Jan 15, 2005 2:33 pm
Location: Birmingham, AL
Contact:

Re: New OOP permissions system

Post by phpBBInstaller »

I know what a class is. I want to know the ADVANTAGE of it.

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: New OOP permissions system

Post by A_Jelly_Doughnut »

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

phpBBInstaller
Registered User
Posts: 10
Joined: Sat Jan 15, 2005 2:33 pm
Location: Birmingham, AL
Contact:

Re: New OOP permissions system

Post by phpBBInstaller »

So it has nothing to do with functionality, just organization.

Luciano
Registered User
Posts: 25
Joined: Wed Oct 17, 2001 6:33 am

Re: New OOP permissions system

Post by Luciano »

well i was told (it could be wrong though) that when programming with classes you use less of memory.. (I meen php memory :mrgreen: )

Luc

Post Reply