Sprout Posted June 25, 2010 Share Posted June 25, 2010 I would like to implement a point system for my members, basically what I would like to do is make it so that on the sign up page a user can enter the username of the person who referred them to the site, upon signing up the referrer would then get x amount of points. Those points could then be used to perform specific actions that would otherwise be blocked, such as submitting a form. I would also like to be able to deduct user points when a form is submitted. (Sorta like answers.yahoo.com) Could anybody teach me how to do this or point me in the direction of a tutorial? Please keep in mind I'm a novice to PHP. Quote Link to comment https://forums.phpfreaks.com/topic/205897-how-can-i-create-user-points/ Share on other sites More sharing options...
brianlange Posted June 26, 2010 Share Posted June 26, 2010 Zend_Acl is a valuable tool for manage resources and roles. A resource is like your web user and the role is submitting the form. It might be a bit of a learning curve for a novice php programmer but you want to avoid writing a bunch of if statements for every permission on your website. Start by storing the points in the database. Quote Link to comment https://forums.phpfreaks.com/topic/205897-how-can-i-create-user-points/#findComment-1077453 Share on other sites More sharing options...
Sprout Posted June 26, 2010 Author Share Posted June 26, 2010 I looked over Zend_Acl and didn't see anything about how to implement a point system with it. I want the points to be visible to the users, basically create a virtual currency. Like gold on Gaiaonline or as I said the point system in yahoo answers. While I appreciate a recommendation I don't see how this would allow me to create that. Quote Link to comment https://forums.phpfreaks.com/topic/205897-how-can-i-create-user-points/#findComment-1077465 Share on other sites More sharing options...
Sprout Posted June 26, 2010 Author Share Posted June 26, 2010 Let me explain what I would like to do in a different way. I would like users to have a number counter displayed on their profile. Whenever a user enters a user's name into the sign up form as the person who recommended them to the site then that number would increase by X. Then have another form that if they submit it will decrease by X. I cannot seem to find any information for how to do this at all yet I can't imagine it would be too mind-boggling to accomplish. Just like how most forms have a "number of posts" counter, it would be essentially the same except the number would be changed based on a form submission including the user's name. Quote Link to comment https://forums.phpfreaks.com/topic/205897-how-can-i-create-user-points/#findComment-1077486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.