开发者

Drupal 7 & Rules - How to update a node field every time a comment is edited/posted

I would like update a field in one of my nodes to reflect the average of all the fivestar ratings I have. However, I want it to be indexed and searcable by开发者_开发技巧 search api/solr.

So I thought I could use a Rule to average all of the rating fields after a new comment is added (nodes are rated by the Fivestar field in a comment) and then update an integer field of the node with this new average.

Of course i would need to also re-index this node using search api - so if you tips for that as well, that would be great!


What you want is already implemented in the FiveStarVoting Module.

Have a look here: http://drupal.org/node/1308114

Unfortunately there's a bug which you can follow here: http://drupal.org/node/1245700

I hope that helped you out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜