Want to show average rating of all submissions on EACH entry!
Posted: 30 June 2009 12:51 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  42
Joined  2009-02-11

I currently have the overall_avg, however the client wants each entry to be populated based on ALL entries submitted

currently it is only averaging the total of the last entry submitted where i need it to total all entries submitted. Is this possible?

File Attachments
ratings.doc  (File Size: 28KB - Downloads: 19)
Profile
 
 
Posted: 30 June 2009 10:41 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8264
Joined  2006-10-18

Well, it looks like the code you have in place should do it… wink

{exp:weblog:entries}
<h2>{title}</h2>
<
p>{body}</p>
 
<
h4>Rating Stats for this Entry:</h4>
{exp:rating:stats entry_id="{entry_id}"}
<p>Rated{stars_overall_avg} ({overall_avg}/5), based on {overall_count} review{if overall_count !="1"}s{/if}</p>
{/exp:rating:stats}
 
{
/exp:weblog:entries} 
 Signature 
Profile
 
 
Posted: 02 July 2009 07:48 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  42
Joined  2009-02-11

except I want it to be an overall rating of all submissions for not just the combined, but for each individual one as well. IE Food quality, Service, etc.

Profile
 
 
Posted: 02 July 2009 05:03 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8264
Joined  2006-10-18

Is this not what you want then? smile

{exp:weblog:entries}
<h2>{title}</h2>
<
p>{body}</p>
 
<
h4>Rating Stats for this Entry:</h4>
{exp:rating:stats entry_id="{entry_id}"}
<p>Based on {overall_count} review{if overall_count !="1"}s{/if}:</p>
<
p>Food Quality{stars_avg_food_quality} ({avg_food_quality}/5)</p>
<
p>Service{stars_avg_service} ({avg_service}/5)</p>
<
p>Something Else: {stars_avg_something_else} ({avg_something_else}/5)</p>
{/exp:rating:stats}
 
{
/exp:weblog:entries} 
 Signature 
Profile
 
 
Posted: 10 August 2009 02:56 PM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  42
Joined  2009-02-11

Is there a way to show the average rating by decimal rather than 4/5?

Profile
 
 
Posted: 11 August 2009 10:32 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8264
Joined  2006-10-18

Hi glogurl,

I’m not sure I understand what you mean… you want it to just display as a decimal value instead? smile

{exp:weblog:entries}
<h2>{title}</h2>
<
p>{body}</p>

<
h4>Rating Stats for this Entry:</h4>
{exp:rating:stats entry_id="{entry_id}"}
<p>Based on {overall_count} review{if overall_count !="1"}s{/if}:</p>
<
p>Food Quality{stars_avg_food_quality} ({avg_food_quality})</p>
<
p>Service{stars_avg_service} ({avg_service})</p>
<
p>Something Else: {stars_avg_something_else} ({avg_something_else})</p>
{/exp:rating:stats}

{
/exp:weblog:entries} 
 Signature 
Profile
 
 
Posted: 11 August 2009 11:43 AM   [ Ignore ]   [ # 6 ]
Jr. Member
RankRank
Total Posts:  42
Joined  2009-02-11

I think i actually got it. but yes I want to use a decimal where it says

4/5

I want it to say

4.2/5

Profile
 
 
Posted: 11 August 2009 11:54 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8264
Joined  2006-10-18

You’ll need to add the precision parameter to your Rating loops wink

precision="1" 
 Signature 
Profile