Hi,
Just wondering if there is any add-ons that we help me achieve the following:
1) each registered user is given 5 "points" on signup
2) every-time a download link is click 1 point is removed
3) when a user gets to 0 points, they can no longer download
2) every 30 days a user points are reset back to 5
I am not looking for a complete solution, just hoping to be pointed in the right direction.
cheers,
G
-
☆ A M B ☆
- 24,524 Posts
Use a postHook to establish the initial setting in a custom field
postHooks A comma-separated list of 'hooks', or Snippets, that will be executed after the user is registered.
http://rtfm.modx.com/display/ADDON/Login.Register
You'll need a custom download snippet to check the user's extended field before downloading and again to decrement the field value after downloading. I think static resources might be useful here. They have the advantage of being MODx resources, thus being controlled by the security configuration (resource groups) and having a standard MODx page URL rather than a link to the file itself. They work just fine with files outside of the web root, providing a level of security for the files.
thanks! just what i needed