Topic: unique profiles based on user level? (Read 1273 times)
Raped By Google
Gender:
Posts: 27
206 credits Members referred : 0
PPC 4 Real Estate
« on: Nov 12, 2006, 03:55:05 AM »
Hello,
I'm a noob to your script. Great job! Thanks for making it available and for this great forum about it. Excellent!
I would like to have different profiles for different user levels. Now one really easy way to do this is to make another instance of the script with another totally new db for it which might be the best answer but I was also thinking maybe the script could be modified to do this also.
I saw the post about the custom user fields. I was thinking to define the new fields on db-config.php and then in the other pages that call them to use if and if else statements to select certain custom fields based on the user level. For example IF(USER_LEVEL >1 and <5){ ...sic insert custom fields 1 thru 5} else if{(USER_LEVEL >5 and <10){ ...sic insert custom fields 1 thru 9} etc
In practice, with the current ten levels in the script unique custom profiles could be made for each level.
It would probably be fairly easy to manage and more user friendly if all this was done in a separate page that was included with include ()
What do you think?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
Raped By Google
Gender:
Posts: 27
206 credits Members referred : 0
PPC 4 Real Estate
« Reply #2 on: Nov 13, 2006, 04:52:58 AM »
Hi Olaf,
My site has four groups of users, Buyers, Sellers, buyer agents, and seller agents (it's a real estate advertising site). I have already set up two instances of the script(one for buyers and the other for sellers) but each handles both the general public and the agents too. There are things such as company name, accreditations, etc that don't apply to the general public. It sounds like the best thing for me to do for now would be to make two more instances for a total of four. Perhaps after i get the concept developed that way a better method might make itself apparent. This won't be a high traffic app so four copies is probably the best solution. Great script though,, and thanks for the reply
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Nov 13, 2006, 09:36:49 AM »
Hello, I think what your are doing is not so simple than just using a login script. What you need is much more.
use AU for login and user registration functions and build behind this class a custom RE application, I did the same for a real estate website (don't ask me for the code I will never share custom work)
Raped By Google
Gender:
Posts: 27
206 credits Members referred : 0
PPC 4 Real Estate
« Reply #4 on: Nov 13, 2006, 06:16:48 PM »
I made two more instances of your script last night for a total of four now so that will get me by for the time being.
But the approach you have taken of having access levels keyed numerically seems quite innovative to me. Most of the scripts I've used use things like admin, conributor, user etc and have three or four levels. There is an education software called Moodle (moodle,org) that now has quite a few (admin, course creator, teacher, student, parents, etc).
I'm sure there must be other scripts out there that use your method, that's not the point. I just thought i saw a "next step" maybe. That if the script has 10 levels it would be quite powerful to have different profiles for each level.
Back to my site, I might just place all the profile into a custom table or something. Thanks for the help and your forum has been great.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Nov 13, 2006, 08:34:09 PM »
yes, think about one common application with several similar extended classes (Thats really OOP)
Raped By Google
Gender:
Posts: 27
206 credits Members referred : 0
PPC 4 Real Estate
« Reply #6 on: Nov 13, 2006, 09:30:04 PM »
There's a slight problem though, I haven't broken into understanding classes yet. I've tried, but am just not there yet . I haven't used functions that much either. Which means I sometimes end up doing things the hard way.
I guess by creating four instances of your script I have, in essence, created four classes of users, would that be a proper way of describing it?
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8272
42619 credits Members referred : 3
There's a slight problem though, I haven't broken into understanding classes yet. I've tried, but am just not there yet . I haven't used functions that much either. Which means I sometimes end up doing things the hard way.
I guess by creating four instances of your script I have, in essence, created four classes of users, would that be a proper way of describing it?
It seems that you are not familliar with programming and that's a problem.
A class has both functions(methods) and variables, and it is used to describe an instance of an object.
So there could be a class "person" with 100 instances of it for 100 persons that appear in the system.
There could be also a class "teacher" which is actually a "person" with more capabilities, so the class "teacher" would be an extension of the first class.
I just tried to give an example, but I should warn you that OOP is not something that you should start from if you are not good in procedural programming.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #8 on: Nov 13, 2006, 10:50:36 PM »
Quote
I just tried to give an example, but I should warn you that OOP is not something that you should start from if you are not good in procedural programming.
Raped By Google
Gender:
Posts: 27
206 credits Members referred : 0
PPC 4 Real Estate
« Reply #9 on: Nov 13, 2006, 11:21:32 PM »
Quote
"It seems that you are not familliar with programming and that's a problem."
Well, I can do variable variables; I can handle arrays quite well; I built dynamic headers for my site. So I guess I'm not totally in the dark.
But I just haven't had a need in the few sites I've built to delve into classes. Functions, yes, but not to any large degree. Since they are usually considered a programmers short cut anyway I never really got into it.
I sure wouldn't call my self a programmer though but I'm not sure if I want to be one either. Alot of people think their weird (just kidding)
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #10 on: Nov 13, 2006, 11:25:07 PM »
at the end, you need to learn a lot to let become your project a success (it's not really a beginners task)