Posted by jjma on June 19, 2014 at 12:32pm
I'm not sure about this but I am trying to set up a rule that resaves a node whenever a comment (on that node) is published.
Is this possible?
Jon
I'm not sure about this but I am trying to set up a rule that resaves a node whenever a comment (on that node) is published.
Is this possible?
Jon
Comments
Why would you want/need to do
Why would you want/need to do that?
Based on a complex calculation
We have a node based system using five star that creates a average calculation based on the submitted comments (using fivestar). Unfortunately the calculation needs the node to be saved once a user has submitted a five star entry to make the calculation.
Jon
So you are displaying the
So you are displaying the 5-star average ranking of a node's comments as a ranking of the node itself...
Simple. Using Rules, on each comment save (or perhaps publish) event, your rule loads the node; its id is readily available from the comment. Then using Rules' set a data value, you reset the node's 5-star ranking based on your function that recomputes it. Then save the node, which now reflects the updated ranking.
Bit Baffled.
Thanks for your response and sorry for my late reply.
I am a novice when it comes to rules so can I ask that I take it step by step. So a user posts a comment and a vote on the node.
What do you mean when you write "your rule loads the node"?
thanks,
Jo