• Resolved davidbick01

    (@davidbick01)


    We set up a page with a series of questions. The theme is twenty ten. During the trial phase we allowed an unrestricted number of votes, and up to two answers per question, and it all worked beautifully. You vote, you click for the results, then you click quit, and you get straight back to the voting panel and see the votes incremented.

    For the public run we want to limit voting (eg using cookies) to once every 7 days. We set this in the options. But when you vote and go to the results, it sticks on that panel. Is this normal? We would prefer users to be able to quit the results, get back to the voting panel, and see the incremented votes. Then, if they try to vote again, we’d like them to get an error message (eg try again in 7 days).

    One other thing – when we delete votes in the log the vote counter remains the same in the results panel.

    Any guidance much appreciated. We are new to this.

    https://www.ads-software.com/plugins/yop-poll/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hi davidbick01,

    Edit inc/yop_poll_model.php and on line 3025 (for version 4.9.1) replace

    if ( !$this->is_voted() ){
    $template = str_ireplace( '%POLL-BACK-TO-VOTE-LINK%', '<a href="javascript:void(0)" class="yop_poll_back_to_vote_link" id="yop_poll_back_to_vote_link' . $poll_id . $unique_id . '" onClick="yop_poll_back_to_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\')">' . $poll_options['view_back_to_vote_link_label'] . '</a>', $template );
    }
    $template = str_ireplace( '%POLL-BACK-TO-VOTE-LINK%', '<a href="javascript:void(0)" class="yop_poll_back_to_vote_link" id="yop_poll_back_to_vote_link' . $poll_id . $unique_id . '" onClick="yop_poll_back_to_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\')">' . $poll_options['view_back_to_vote_link_label'] . '</a>', $template );

    Regarding the error message, in the same file, on line 2781 in
    $this->error = __( ‘You Already voted!’, ‘yop_poll’ ); replace
    You Already voted! with the message you want.

    Please note that these changes will apply on all your polls.

    Regards,

    YOP Team

    Thread Starter davidbick01

    (@davidbick01)

    Very many thanks. We have gone “live” with unrestricted voting, but I will try this out when I manage to create a dummy site on my own server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘After restricted voting poll hangs on results’ is closed to new replies.