Hierarchical user classes

by admin in Blog

This feature has been in the SVN repository for a while now, but it's one of those things that only a site admin can love - users won't really know any difference.

This feature has been in the SVN repository for a while now, but it's one of those things that only a site admin can love - users won't really know any difference. Still, I think it's one of my favorite new features so far so I thought I'd give it a bit of publicity.

So, pre-v0.8 you could assign users to user classes to give them access to areas of your site. This was all well and good but it's tiresome when you have lots of areas that you want a slightly different group of people to access. You would need a user class for each area and then you'd need to assign the users to those classes - yawn!

v0.8 has improved on this 10? 20? 100? fold by introducing a hierarchy to the user class system. So, if you, as a site admin, take a bit of time up front and plan your user classes you can make your life a lot easier (and spend more time on adding that content you know you so need to add, if only you had the time smile ). Simply put, a user class can now have a parent and members of a user class with a parent inherit all the permissions and privileges that the parent has.

Now, I'm no gamer, but it's a common request that I see in the e107 forums that admins want to be able to assign clan roles as user classes and have clan members, clan leaders, clan bosses and clan wives (for all I know!) with similar but ever increasing in power (obviously the wives have the most power!). And this is what you will now be able to do from v0.8 onwards.

The screen shot shows an example user class list as you would see it in the admin pages and is taken from the list of new features in v0.8 in the e107 wiki.

As a consequence of this change, other parts of the core have changed where you get to select user classes. Not all are as nicely formatted in a tree structure like this, but that's because it's not always needed. We've tried to make sure that a representation of the hierarchy is shown where it makes sense, though - such as when you can select multiple user classes).

I'd also like to take credit for this change, but I think the only credit I might be able to squeeze out of this is having the idea in the first place (along with a multitude of other users) way back before 0.8 was even a SVN twig.

I hope you will get as much benefit from this feature as I'm expecting to.

P.S. Take a look at the user class names in the screen shot - now, if you know your e107 devs well enough you should be able to guess who created that particular example. No cheating by looking at the wiki page's history, though wink



Social Links