How to grant user User Points after publishing content, while content's default is unpublished?

StackOverflow https://stackoverflow.com/questions/18838028

سؤال

I'd like to grant users User Points when their added content of the content type 'Content', which is unpublished by default, is published. I tried this with the Rules module: - Event: After saving new content - Elements: * Content is of type: Content * Content is published - Actions: Grant points to a user

So, when a user adds 'Content' content, they don't get any User Points and their content is unpublished. My idea was that they'd be granted the points after I - as moderator - had published their content. But apparently, they don't get points after I've done that with the rule I set up. What did I do wrong and how can I solve this?

هل كانت مفيدة؟

المحلول 2

  1. You could create flag and give flag name as Publish node and grant points to user

  2. Then add new rule with event A node has been flagged, under "Publish node and grant points to user"

  3. For actions publish this node and grant points to user use this data selector: flagged-node:author

نصائح أخرى

Please check the flag module as my friend told to

STEP1- make a flag module named(Publish node and grant points to user) and after that make a event in

STEP2- Configuration--> workflow-->rules--> and make an event over there selecting the flag you just made i.e.,(A node has been flagged, under "add points on publish article flag") after that set action as ( Grant points to a user) Data Selector:flagged-node:author Points:5 Point Category value:(Select your category) operation value: flagged-node:author automatically approved and you are done now.. when the user post the article it will be unpublished and when admin make it published when the user will click on flag this iten the points will be granted to user.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top