13, May 2008

unique profiles based on user level? - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: unique profiles based on user level?
« previous next »
Pages: [1] Print

Author Topic: unique profiles based on user level?  (Read 1126 times)
Raped By Google
*
Gender: Male
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: Male
Posts: 6236
38242 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Nov 12, 2006, 03:36:27 PM »

Quote
What do you think?

sounds like a lot of work... Wink

why do you need this?


Last blog : Database Management with phpMyAdmin
Raped By Google
*
Gender: Male
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: Male
Posts: 6236
38242 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) Wink


Last blog : Database Management with phpMyAdmin
Raped By Google
*
Gender: Male
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: Male
Posts: 6236
38242 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)

and use AU as objects in this custom class.



Last blog : Database Management with phpMyAdmin
Raped By Google
*
Gender: Male
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  Roll Eyes . 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: Male
Posts: 7824
39879 credits
Members referred : 3



« Reply #7 on: Nov 13, 2006, 09:37:53 PM »

There's a slight problem though, I haven't broken into understanding classes yet. I've tried, but am just not there yet  Roll Eyes . 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.

Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 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.

I think that has to come first...


Last blog : Database Management with phpMyAdmin
Raped By Google
*
Gender: Male
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)  Wink
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 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 Wink (it's not really a beginners task)


Last blog : Database Management with phpMyAdmin
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4770
Tags : forums programming oop Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: unique profiles based on user level?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 13, 2008, 05:27:02 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 34.931
Total Topics: 7.262
Total Members: 3.482
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: ondho

24 Guests, 4 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.