I am trying to use the sort option in the top voted section and it doesn’t seem to sort it correctly. Also I was wondering if its possible to download an excel file for the votes for each image that has the ip and time and date.
Hi again montesdesigns
When you say it doesn’t sort correctly, is it changing the order at all? If so, Is there something specific that you think is wrong?
What voting type are you using, so I can run some tests my side quickly?
I’m using the like button, could it be trying to sort by rating
It sorts by rating, and the number of votes. So as long as the images have only ever been set to the ‘like’ voting type it will work fine. I’ve just re-tested my side and it definitely is working.
What is the exact sorting tag you are using, and where exactly are you putting it in the template?
I have always set it to the like system from the beginning. I think I am missing the sorting tag lol sorry man I missed this one.. where can i go to check this?
You need to add a tag to the top of the template, so the plugin knows to change the order. The tag looks like
<?php nggv_orderImages($images); ?>
You can read more about it, and the settings you can use here.
in the gallery.php file right? dude i am lost on this one sorry ill reread it tomorrow lol
It the same file you had to put the voting tag in, simple as that 🙂
Put it in at the top, somewhere BEFORE the foreach loop starts, and that’s it.
ok wait. this is for the display of the order of the images on the gallery page? I am having issues in the admin section where you click top voted link and it shows you whats top voted. that’s where its not sorting it at all.
let me know ill let you into my site to see for yourself.
Ok, I see now. I thought you were talking about ordering the images in the display template for your users to see.
The backend ‘Top Voted’ does currently only order by rating, not number of votes. You can change line 1060 of
$qry .= ' ORDER BY avg '.$_GET['nggv']['order'];
$qry .= ' ORDER BY avg '.$_GET['nggv']['order'].', num '.$_GET['nggv']['order'];
That will change the ordering so that is firstly orders by rating, and then number of votes. That should do what you want.
I will add it into the next release, so you won’t lose your change when it comes out and you update.
I hope that helps.
If you select to use the cookies to enforce the single voting, multiple devices from a single IP can now each vote. It stops doing the IP check altogether, and only looks for a cookie on the device to see if its voted already. Obviously, this means the device needs to have accepted the cookie, or they can vote again. But there’s no way around that unfortunately.
You can export the overall results for each image, but currently you cannot export the individual votes. I will add this to a future release though, as it makes sense to want that data.
You can see individual votes per image by clicking ‘X votes cast’ info for each image in the ‘Manage Gallery’ section of NGG, if you want to manually collate that data for now.
I am using the stars for rating and cannot get the sorting for votes to work…can someone help?
Are you trying to order the images in the frontend, or are you using the ‘top voted’ filter in the admin dashboard?
The top voted filter…
Also…with my contest, we want people to choose 15 pics per IP…they get one vote per photo…the contest runs for one or two weeks…is there a way to do this?
We have to restart our contest because people cheated…what else is new…
Thank you for such a quick response!
- The topic ‘top vote sort option not working’ is closed to new replies.