WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Problem with logged out users trying to vote

[Resolved] Problem with logged out users trying to vote

  • When users who are not logged in try to vote on a YOP Poll on my site, there is no message saying the vote was unsuccessful. Instead, a pop-up window opens up for logging in.

    The problem with this pop-up window is that it gets blocked for many users, and others say that even though they’re not blocking pop-ups, it just doesn’t come up.

    I would much prefer to have a message showing under the poll if the login attempt was unsuccessful, asking the user to “Please login to cast your vote.” Then I can redirect them to a page on my site dedicated for logging in.

    Is this possible to change in the code?

    Thanks!

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

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

    @yourownprogrammer

    Hi Bloopie,

    Please send us a link to the page where you have the poll so we may assist.

    Best wishes,

    YOP Team

    Plugin Author YOP

    @yourownprogrammer

    Hi Bloopie,

    Please send us a link to the page where you have the poll so we may assist.

    Regards,

    YOP Team

    Thanks for your reply YourOwnProgrammer,

    I emailed you the link to my poll.

    Plugin Author YOP

    @yourownprogrammer

    Hey Bloopie,

    We ran some tests and it looks like the problem is caused by the pop up blocker. Even if the user deactvates or doesn’t use this function, for security reasons the browser automatically blocks untrusted pop ups.

    To notify users that they have to login please make the changes below

    edit js/yop-poll-public.js and in function, replace

    jQuery(‘#yop_poll_vote-button-‘ + yop_poll_various_config.poll_id + yop_poll_various_config.unique_id ).popupWindow({
    windowURL: yop_poll_public_config_general.vote_with_wordpress_login_url + yop_poll_urlencode( yop_poll_various_config_to_get_params( yop_poll_various_config ) ),
    windowName:’yop_poll_popup_window’,
    height:500,
    left:0,
    location:0,
    menubar:0,
    resizable:0,
    scrollbars:1,
    status:0,
    width:450,
    top:0,
    toolbar:0,
    centerScreen:1
    });

    with

    jQuery( ‘#yop-poll-container-error-‘ + yop_poll_various_config.poll_id + yop_poll_various_config.unique_id ).html( “The-message-you-want” );

    Best wishes,

    YOp Team

    Hey again,

    Thanks for taking the time to check for a solution to the problem.

    EDIT:
    I said it didn’t work but stupidly I just replaced the wrong line.

    Your solution is spot on. It works great now.

    Thanks again for your fantastic support!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Problem with logged out users trying to vote’ is closed to new replies.