Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/205897-how-can-i-create-user-points/
Share on other sites

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.

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.