I wrote a very brief module that triggers a per-user node limit based upon the user's number of points. This is the bare minimum the module needs to function (so far as my testing says). Is there more that could be added to make this more useful?

If a node type has negative points associated with it (in userpoints), my module will not allow the user to create any more of that node type when the user's positive points are lower in number than the node type's negative points.

In other words, user's points + node type points must >= 0 in order to create nodes.

It's elegant because if positive points (or zero points) are associated with a node type, my module is not triggered.

Thoughts? Worthy of inclusion with the User Points project?

CommentFileSizeAuthor
userpoints_nodelimit.module1.94 KBgreenmachine

Comments

kbahey’s picture

Thanks for this.

I will eventually include it, although it will take some time.

We are in the middle of a redesign of userpoints, and don't want to include this now then change it later.

greenmachine’s picture

Cool, glad you like it.

kbahey’s picture

Status: Needs review » Fixed

Committed to contrib directory on 4.7.

Anonymous’s picture

Status: Fixed » Closed (fixed)