Hi all! I got a node type Club. It has four fivestar fields (food, service, price, comfort). I would like to have a fifth fivestar field, lets call it average node rating which is auto-computed as the average of the other four ratings. How do you think I could reproduce it?

Comments

DigitalFix’s picture

Title: How to compute average node rating from differend fivestar fields » A computed aggregate node rating on multi-axis Fivestar fields
Version: 7.x-2.0-alpha1 » 7.x-2.x-dev
Category: support » feature

To be thorough (and pedantic and repetitive) I'm looking for a Fivestar field that displays a total or average (e.g. aggregate) of other Fivestar fields in that node. This field would be computed (so non-editable).

The purpose would be to allow easy way to create a simple yet flashy multi-axis Fivestar node rating system.

While this could probably be done through some clever use of the Computed Field module, we n00bs could really use a field widget native to the Fivestar module.

I don't have the skills to contribute, but to spec it out I would envisage the addition of widget type -- something like "Stars (computed)". The "Field Settings" should include an option for the aggregate (sum or average) and also might include its own "Voting Tag" and a multiple select or checkboxes for the other Fivestar fields (or voting tags ?) in that node which the computed field will aggregate.

For the display, I imagine the format options and star display options would remain unchanged while the "Value to display as stars" could be dropped and "Text to display under the stars" could be a switch.

Cool things could follow from this, such as weighted axes and minimum thresholds.

As I said, I really don't have the PHP- or Drupal-Fu to do this myself, but I'm working on it and I'd love to contribute in the future. You've made a very useful module and have my undying gratitude!

Louis Bob’s picture

I would need the exact same thing.
I have tried to do it myself with the computed field, but without success.

Is this something on the developers map?

vantuykom’s picture

I need the exact same thing

sbydrupal’s picture

Issue summary: View changes

Is multi-axis working for D7 ? When I add two fivestar fields to a node type, both fields get the same vote. I don't see any
multi axis option in field settings...

Thanks

whiteph’s picture

Status: Active » Closed (duplicate)