WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] how to limit the user vote only once? (12 posts)

  1. beezeeking
    Member
    Posted 11 months ago #

    i want to limit the logined user voting only once,but when i refresh the web page,hte user can vote again,how can i let it come true?

    http://wordpress.org/plugins/wp-postratings/

  2. jardokraka
    Member
    Posted 11 months ago #

    Having the same issue. I am trying to use the 'logged by username' logging method, and only registered users are allowed to vote.

    Issue: users are able to vote again when the page is refreshed.

    The solution posted here doesn't seem to work for me, the issue persists.

    If I switch to 'logged by cookie', things work as expected, but that's not a reliable method.

    Latest WP version, tested in the current versions of FF and Chrome.

  3. jardokraka
    Member
    Posted 11 months ago #

    Also, shouldn't users be allowed to change/update their vote?

    When this function performs correctly, if I cast a vote, I can't change my mind later on (can't vote more than once). Updating your vote shouldn't count as a separate vote, I would suppose.

  4. johnnybang
    Member
    Posted 11 months ago #

    i already complete it, contact me for me details

  5. jardokraka
    Member
    Posted 11 months ago #

    johnnybang, there is no way of contacting you through here on wordpress.org. Please do provide details, thanks in advance.

  6. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    @johnnybang - please keep help on these forums - http://codex.wordpress.org/Forum_Welcome#Helping_Out

  7. johnnybang
    Member
    Posted 11 months ago #

    i am busy today. i will post here the custom code i added tonight when i come back home

  8. Bhavnish
    Member
    Posted 11 months ago #

    can anybody tell me the solution for same issue.... pls help me....

  9. Bhavnish
    Member
    Posted 11 months ago #

    i got the solution ..

    Turns out, it's just a misplaced/mistyped variable in the check_rated_username function in wp-postratings.php file. Simply replace $rating_userid with $user_ID at the end of the line beginning with "$get_rated =...".

    on line 315...

    yipeeeeeee

  10. anchit000
    Member
    Posted 11 months ago #

    still not working for me ...

    $get_rated = $wpdb->get_var( $wpdb->prepare( "SELECT rating_userid FROM $wpdb->ratings WHERE rating_postid = %d AND rating_userid = %d", $post_id, $user_ID) );

  11. jardokraka
    Member
    Posted 11 months ago #

    Not working for me either.

  12. jardokraka
    Member
    Posted 10 months ago #

    v1.74 has fixed the issue for me. Thanks, developer.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags