Plugin Author
shauno
(@shauno)
This is sort-of possible. We can get the voting results, and show them, but in a text based style. So if you are using star rating for example, it won’t show the stars highlighted to the current results like if you have voting enabled.
What rating type are you using?
Just “Likes”, I guess it has to be kind of easy to implement since what I want to show is the same that is showed when someone votes: “XX likes”… It’s just that after I disable the voting for the images in that gallery, the results are not shown, so yeah, that’s it.
No stars and nothing else, just the same counter shown when it’s enabled.
Plugin Author
shauno
(@shauno)
I will hack something up a bit later today, and post it here
Plugin Author
shauno
(@shauno)
Ok, so I altered the code from the previous thread highlighting the top image.
Change the section at the top to this:
<?php
global $officalNggVoting;
$topVotedScore = 0; $votingResults = array();
foreach ((array)$images as $image) {
$votingResults[$image->pid] = $officalNggVoting->getImageVotingResults($image->pid, array('avg'=>true, 'likes'=>true));
if($votingResults[$image->pid]['avg'] > $topVotedScore) {
$topVotedScore = $votingResults[$image->pid]['avg'];
}
}
?>
Then, where you would have the voting tag when voting is enabled, put this instead:
<?php echo $votingResults[$image->pid]['likes'].' '.($votingResults[$image->pid]['likes'] == 1 ? 'Like' : 'Likes') ?>
That should do it.