Support » Plugin: YOP Poll » Limit the votes in all polls on the website

Viewing 3 replies - 1 through 3 (of 3 total)
  • This could be useful: if all the polls are limited by username, in is_voted_username method (line 4291) change this:

    "
    SELECT id
    FROM ".$wpdb->yop_poll_logs."
    WHERE poll_id = %d AND
    user_id = %d AND
    vote_date >= DATE_ADD( %s, INTERVAL -%d ".$unit.")
    ",
    $this->poll['id'],
    $user_id,
    current_time( 'mysql' ),
    $value

    to this:

    "
    SELECT id
    FROM ".$wpdb->yop_poll_logs."
    WHERE
    user_id = %d AND
    vote_date >= DATE_ADD( %s, INTERVAL -%d ".$unit.")
    ",
    $user_id,
    current_time( 'mysql' ),
    $value

    Could be a hardcoded solution??

    Plugin Author YOP

    (@yourownprogrammer)

    Hi Looup,

    Yes, your solution is good but please note that it will work only for logged users.

    Regards,

    YOP Team

    Yes, it works fine.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit the votes in all polls on the website’ is closed to new replies.