Ideally I want users to earn "credits". These credits will allow them to redeem "content" (nodes). My goal is basically to allow users to only gain access to content they "redeem" using their credits, and they only gain credits by submitting content which I approve and assign value to. So if user X submits content, I think its great and rank it 8 out of 10 and decide that he gets 8 credits, he then gets 8 credits. He can then use those 8 credits to redeem content, and content can have different values.

What is the best way to go about getting this functionality in Drupal?

2 Answers 2


The Userpoint provides a mean to store a user credits and can be combined with the Userpoints Node Access to sell node (ie. content) access in exchange of userpoints (credits). The User points Nodes and Comments allow you to setup automatic rewards for content contribution (ie. nodes and comments creation). But it doesn't seems to provides the rating feature you ask for, nor does any of listed User Points Contributed modules.

What should be easily doable, is to use the Fivestar to rates node and then to grant, and revoke userpoint to the rated node author on voting (hook_votingapi_insert() and hook_votingapi_delete()). By restricting access to voting (ie. the 'rate content' permission or through an hook_fivestar_access() implementation), you can control who is allowed to grant credits to your users.


I would take a look at the User Points module and the User Points Contributed modules module.

If that does not satisfy you, it should be easy enough to write a custom module for that.

  • Create a table with primary key as nid and an credit value.
  • Create another table with primary key as uid and assigned credits.
  • Make a third table for access. uid as primary and nid. There you can store the nodes a certain user has access to.
  • Create the table trough the schema api.
  • Now with a menu hook, add a MENU_LOCAL_TASK item that assigns values for easy administration by adding a callback that gets a form API form.

With hook_access(), you can define when a user has access to a node trough tables mentioned above and the database layer API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.