Support » Plugin: NextGEN Gallery Voting » top vote sort option not working

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author shauno


    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?

    it doesn’t sort at all

    I’m using the like button, could it be trying to sort by rating

    Plugin Author shauno


    Hi montesdesigns

    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?

    Hey Shauno,

    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?


    Plugin Author shauno


    Hi montesdesigns

    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

    Plugin Author shauno


    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.

    Plugin Author shauno


    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 ngg-voting.php from this:
    $qry .= ' ORDER BY avg '.$_GET['nggv']['order'];

    to this:

    $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.

    fixed! thanks! kool! i seen you added “Use Cookies to enforce single vote” does this also use ip or just one or the other i found from a mobile phone with wifi a user can vote and without wifi a user can vote again. Also is it possible to export the log for the image votes casted into a excel file? where it shows the date, time, and ip address.

    Plugin Author shauno


    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?


    Plugin Author shauno


    Hi tekgirl02

    Are you trying to order the images in the frontend, or are you using the ‘top voted’ filter in the admin dashboard?

    Hi Shauno,

    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!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘top vote sort option not working’ is closed to new replies.