Using Node Limit and have limited roles to be able to add 3, 8 or 20 nodes of one content type depending on what they register with.

I wondered if it's possible to show how many of their limit they have left and then show it on their user page.

So if they have created 3 nodes, they have 5 left (if they had the 8 role allowance).

  • by saying "Show Role" , you mean the limitation is for a group or a person? I mean if A who is listed in role X adds a node is it affecting person B who also is a member of role X? – Alireza Tabatabaeian Aug 7 '15 at 22:35

I checked the node_limit module and you need to create an api to be able to get the remaining limit for a particular role or user.

  1. The number of limit and limit id are stored on node_limit table.
  2. Your limit id and role id are stored on node_limit_role table.

What you need to do next is count the number of nodes the role or user has created.

Now you need to alter the user profile to print the remaining limit. See the api that you can use here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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