WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Voting
[resolved] top vote sort option not working (19 posts)

  1. montesdesigns
    Member
    Posted 1 year ago #

    hey shauno,

    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.

    thanks,

    http://wordpress.org/extend/plugins/nextgen-gallery-voting/

  2. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  3. montesdesigns
    Member
    Posted 1 year ago #

    it doesn't sort at all

  4. montesdesigns
    Member
    Posted 1 year ago #

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

  5. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  6. montesdesigns
    Member
    Posted 1 year ago #

    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?

    thanks,

  7. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. montesdesigns
    Member
    Posted 1 year ago #

    in the gallery.php file right? dude i am lost on this one sorry ill reread it tomorrow lol

  9. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  10. montesdesigns
    Member
    Posted 1 year ago #

    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.

  11. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  12. montesdesigns
    Member
    Posted 1 year ago #

    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.

  13. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  14. tekgirl02
    Member
    Posted 1 year ago #

    I am using the stars for rating and cannot get the sorting for votes to work...can someone help?

    Thanks

  15. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Hi tekgirl02

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

  16. tekgirl02
    Member
    Posted 1 year ago #

    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!

  17. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Looks like it's working fine on my test installs. Can you post a screenshot?

    For your contest, you can put all the images in a single gallery, and then select the "Only allow 1 vote per person for this image" option. That will allow them to vote once on each image (checking the IP for duplicate votes). If I understand you correctly, that seems like it's what you want.

  18. tekgirl02
    Member
    Posted 1 year ago #

    Have attached a screenshot and as you can see the voting aspect is not correct...

    Also...I did put all the photos in one gallery, selected only allow one vote per person and people were able to vote multiple times for the same image...so something is not right ...

  19. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    You can't attach images to posts here. You need to upload it to a public hosting somewhere and link it. Or you can email it to me at shaunalberts AT gmail DOT com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.