Support » Plugin: YOP Poll » Multiple votes per cookie

Viewing 1 replies (of 1 total)
  • Plugin Author YOP


    Hi fgrosjean,

    You can not allow multiple votes per cookie but we can provide a fix that will allow multiple votes per IP.

    Go to yop_poll_model.php and in this function, private function is_voted_ip() {, look for

    SELECT id
    FROM …

    replace this with

    SELECT count( *) as votes

    Also, before return $log_id; add

    if ($log_id <= 4 )
    return false;

    In the end you should have

    $log_id = $wpdb->get_var(

    SELECT count( *) as votes
    FROM “.$wpdb->yop_poll_logs.”
    WHERE poll_id = %d AND
    ip = %s AND
    vote_date >= DATE_ADD( NOW(), INTERVAL -%d “.$unit.”)

    if ($log_id <= 4 )
    return false;
    return $log_id;

    For all this to work, edit your poll and in “Other Options” choose “Blocking Voters: ” – “By Ip” and save.

    Best wishes,

    YOP team

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple votes per cookie’ is closed to new replies.