WordPress.org

Support

Support » Plugins and Hacks » YOP Poll » [Resolved] messages at the end

[Resolved] messages at the end

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

    @yourownprogrammer

    Hi ceubri,

    Edit yop_poll_model.php and in return_poll_html() function cut these code lines

    $msgDivS = false;
                            $msgDivE = false;
    
                            if ( strpos( $template, "%POLL-SUCCESS-MSG%" ) != false ){
                                $msgDivS  = true;
                                $template = str_ireplace( '%POLL-SUCCESS-MSG%', '<div id="yop-poll-container-success-' . $poll_id . $unique_id . '" class="yop-poll-container-success"></div>', $template );
                            }
                            if ( strpos( $template, "%POLL-ERROR-MSG%" ) != false ){
                                $msgDivE  = true;
                                $template = str_ireplace( '%POLL-ERROR-MSG%', '<div id="yop-poll-container-error-' . $poll_id . $unique_id . '" class="yop-poll-container-error"></div>', $template );
                            }

    and paste them before

    $template = str_ireplace( '%POLL-VOTE-BUTTON%', '<button class="yop_poll_vote_button" id="yop_poll_vote-button-' . $poll_id . $unique_id . '" onclick="yop_poll_register_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\'); return false;">' . $poll_options['vote_button_label'] . '</button>', $template );

    Next, select

    if ( !$msgDivS ){
                                $template .= '<div id="yop-poll-container-success-' . $poll_id . $unique_id . '" class="yop-poll-container-success"></div>';
                            }
                            if ( !$msgDivE ){
                                $template .= '<div id="yop-poll-container-error-' . $poll_id . $unique_id . '" class="yop-poll-container-error"></div>';
                            }

    and move them after

    $template = str_ireplace( '%POLL-VOTE-BUTTON%', '<button class="yop_poll_vote_button" id="yop_poll_vote-button-' . $poll_id . $unique_id . '" onclick="yop_poll_register_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\'); return false;">' . $poll_options['vote_button_label'] . '</button>', $template );

    Let us know if you need more help.

    Best wishes,

    YOP Team

    Thanks,

    it’s works for no answer selected!
    But i have no more : thank you for voting…

    here is my modified code : http://tny.cz/33f14758

    Plugin Author YOP

    @yourownprogrammer

    Hi ceubri,

    To display the message edit yop_poll_model.php and after

    if ( 'after' == $poll_options['view_results'] || 'before' == $poll_options['view_results'] ){
           if ( $this->is_view_poll_results() ){
            $template = str_ireplace( '%POLL-ANSWER-RESULT-LABEL%', $poll_options['answer_result_label'], $template );
           }

    add


    $template .= ‘<div id=”yop-poll-container-success-‘ . $poll_id . $unique_id . ‘” class=”yop-poll-container-success”></div>’;

    Regards,

    YOP Team

    Great !!!
    Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] messages at the end’ is closed to new replies.
Skip to toolbar