I'd like to use Userpoints and Userpoints_role to promote users to a priviliged role by letting them enter a code/password (say, in the user profile page, or somewhere else).
These codes/passwords should be easily changed, and each should be associated to a number of points.

If possible, I'd like the passwords/codes to be active only during a selected time. (But we only want to change codes every month, so doing it manually won't be a problem, at least for us.)

I'm working for a non-profit popular science magazine, but we're willing to pay for the development of the function if that helps a quick development.

Thanks for a really neat module.

//Johan Falk, Sweden

Comments

gateone’s picture

Yeah, I'd be interested too. I tried to fork up E-Commerce Coupon module to bend it over into a userpoints submodule doing just that, but due to lack of time and a too high complexity in the actual E-Commerce Coupon module, I stopped quite early again...

Basically this should be rather easy by design:

Offer a form on a page or in a block.
Have the form data evaluate against a database-table with coupon codes.
Check a) if code is valid and b) if code has already been taken.
If code is valid and was not yet taken, have usepoint-API assign points to that user and set a bit in the coupon code table that this coupon code was just taken (maybe add by whom and when for logging purposes)

On the admin-side, offer a form on the admin/settings/userpoints page on a) how much points to grant upon code entry and maybe on a admin/settings/userpoints/coupons page, set up some way to enter codes, verify or delete codes.

If only I had more time... this is really so damn simple...

jredding’s picture

Component: Code: userpoints_role » Other

Modifying the component because this is a module request and doesn't affect userpoints or userpoints_role

To accomplish this a module would only need to validate a coupon and then call userpointsapi(). It would be rather simple.

Once this has been developed please post the code here so it can be rolled into the contributed modules.

jredding’s picture

Status: Active » Closed (won't fix)

This should be in a contrib module not in core

darklight’s picture

BUMP - Any advances on this?