Гость
04 Окт 2013 09:49

I was wondering if the rating feature which I can enable in the contents it's reliable for using in contests.

Eg I want to run a "best recipe" contest,

if the user can rate the recipes using that inbuilt feature will be thena clear "total number of votes received" in addition to the average number of stars?

Последние изменения: 02 Март 2014


pepperstreet VIP
Total posts: 3,837
05 Окт 2013 14:37

Good point. Would be nice to get the plain "total stars" count as well.

i.e. 2 votes: 1 vote with 3 stars, 1 vote with 4 stars = 7 stars (total)

BTW, is it possible to have Voting data in Section Statistics module? Since there is a Voting manager in backend, the information is already there. But not a summary.


Sergey
Total posts: 13,748
07 Окт 2013 07:26

Yes. It saves as average as total number of votes in $item->votes


Sergey
Total posts: 13,748
08 Окт 2013 02:02

Is it possible to get the total number of the actual "stars", too? I think, that number is used for the different rating methods... but is it still available and accessible in template?

Yes. There is _js_res_votes table with keeps who rated and how many stars.


Sergey
Total posts: 13,748
09 Окт 2013 00:51

To path it to template I have to add SQL query. To add SQL query I have to add parameter if you need variable in template that have array of votes.

I think things like this should be custom.


Гость
09 Окт 2013 02:27

@sergey can you suggest (for non programmers) the code to use to call the total number of stars received by a record?


Sergey
Total posts: 13,748
09 Окт 2013 05:37

$item->votes - total number of votes

$item->votes_result - average vote in % based on 0%-100%

Работает на Cobalt