Search code examples
drupal-7drupal-rulesuserpoints

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


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?


Solution

    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