Forums / Developer / problem with an extension / Comment51038
Bruce Morrison
Monday 27 April 2009 7:18:13 pm
Hi Eric
StarRating questions are better addressed to the extension forum http://projects.ez.no/index.php//starrating/forum
Once you have access to the content attribute you can access the average via $attribute.content.rounded_average or $attribute.content.average
Retrieving the average across all content classes is a little more difficult. Each rating is stored in the database http://svn.projects.ez.no/starrating/sql/starrating.sql Once you know the attribute id ( contentobject_attribute_id ) of the content object it shouldn't be hard to work out the average.
If I have time I'll look at adding this to the extension.
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish