• Resolved ultrabiz

    (@ultrabiz)


    Hello, great plug in, best one for polls I ever seen.

    Can you help me with one little thing, I can not find the solution.

    The “Thank you for your vote!” which usually appears as green text after voting is located over vote title and vote question.

    What line of code should I move bellow and where exactly to move this message bellow poll after voting?

    Thanks a lot!

    http://wordpress.org/plugins/yop-poll/

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

    (@yourownprogrammer)

    Hi ultrabiz,

    Edit inc/yop_poll_model.php and replace the code on line 3412 with

    $template = '<div id="yop-poll-container-'.$poll_id.$unique_id.'" class="yop-poll-container"><form id="yop-poll-form-'.$poll_id.$unique_id.'" class="yop-poll-forms">'.$template.'<input type="hidden" id="yop-poll-tr-id-'.$poll_id.$unique_id.'" name="yop_poll_tr_id" value="'.$tr_id.'"/>'.wp_nonce_field( 'yop_poll-'.$poll_id.$unique_id.'-user-actions', 'yop-poll-nonce-'.$poll_id.$unique_id, false, false ).'</form><div id="yop-poll-container-error-'.$poll_id.$unique_id.'" class="yop-poll-container-error"></div><div id="yop-poll-container-success-'.$poll_id.$unique_id.'" class="yop-poll-container-success"></div></div>';

    Best wishes,

    YOP Team

    Thread Starter ultrabiz

    (@ultrabiz)

    It works perfectly, thanks a lot!!

    Hello,

    Thanks for the tip, I also needed this info.

    One question though: Will edits made to this file be overwritten every the plugin gets updated?

    Thanks,
    Shaun

    Plugin Author YOP

    (@yourownprogrammer)

    Hi Shaun,

    Yes, if you update the plugin you’ll have to modify the file again (and please note that the code may not be on the same line as before the update).

    Regards,

    YOP Team

    Hi,

    Ok thanks, not ideal then because the plugin could be updated at any time which could break the layout.

    For me it’s the error message elements which I need to control and not have them appear at the top of the poll.

    Is there any way of getting this element into the template in the same way as the question can be positioned with ‘%POLL-QUESTION%’?

    Thanks,
    Shaun

    I’m interest in move the success message and the error msg under and not above all, is your previous tip still valid for version 4.8? Does it include the move of the error message?
    Thank you!

    Plugin Author YOP

    (@yourownprogrammer)

    Hi Shaun, Hi giosquad,

    We just released a new version that includes this feature. You’ll be able to position the error/success messages anywhere you want (using %
    POLL-SUCCESS-MSG% and %POLL-ERROR-MSG%).

    Best wishes,

    YOP Team

    adoevo

    (@adoevo)

    Hi Yop Team,

    is there any to when a user click on vote button then popup will open that will show the thank you message

    Waiting for your Answer
    Thanks in advance

    Plugin Author YOP

    (@yourownprogrammer)

    Hi adoevo,

    Edit js/yop-poll-public.js and in the yop_poll_do_vote function, after

    yop_poll_runEval( poll_id, unique_id ); (approximately on line 351) add

    alert( “message” )

    and you can set the message you want displayed or you can add

    alert( response.success );

    Regards,

    YOP Team

    adoevo

    (@adoevo)

    Hi Again YOP Team,

    Please also give me answer of my following questions.

    /4/ If a user has not registered through the user
    panel and clicks ‘Vote’ button, the standard wordpress registration/login
    window will come out (when the poll option is set to ‘Registered Users Only’),
    it needs to be replaced with the same that comes out
    when you click ‘Login/Register’ button on the user panel.

    Ans.

    5/ Is it possible After clicking ‘Vote’, the poll layout changes and a ‘thank you for your vote’
    message comes out in the left corner.
    We need everything to stay as it is without any
    changes after voting and have this thank you message come out in a popup?

    Ans.

    /6/ Is it possible When a user has used his votes and clicks ‘Vote’ button, there should be another custom popup window with ‘no votes left’ message that we will customize some more later on,
    and the vote will not be registered ?

    Ans.

    \

    adoevo

    (@adoevo)

    and Thanks for your previous Fast Reply
    I shall be very thankful to you.

    Plugin Author YOP

    (@yourownprogrammer)

    Hi adoevo,

    4. The pop-up is the login window for the website and we can not change that.

    5. Please be more specific regarding this request and provide as many details as you can so we may assist.

    6. To do that you have to modify the vote processing function. Specifically, in js/yop-poll-public.js, the yop_poll_do_vote function.

    To process the vote an ajax request is made and the answer is processed in success: and error: functions (they are approximately located on lines 303 and 364), which you’ll have to modify (especially the success; function).

    Best wishes,

    YOP Team

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘"Thank you for your vote!" message to be moved bellow’ is closed to new replies.