thank you for your help, it works.
i’d like also to get for every image this value:
score=(avg*numer_votes)/100
i think this can be a good score method in a stars-based voting system. I’d like also to get top 10 images with that score.
How can i do?
i’d like also to display the score value. at the moment i’m using John’s code, wich diasplay likes.
foreach($images as $image) {
$results = nggv_getImageVotingResults($image->pid, array("likes"=>true));
unset($out);
$out .= $results['likes'].' ';
$out .= $results['likes'] == 1 ? 'Vote' : 'Votes';
how can i display my score system?
thank in advance guys!
edit: if we define avg=sum(votes)/numer_votes the score appears to be sum(votes)/100