开发者

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

开发者 https://www.devze.com 2023-04-07 12:10 出处:网络
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.

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

精彩评论

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