1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 hide poll results unless voted

Discussion in 'XenForo Questions and Support' started by Live Free, May 17, 2014.

  1. Live Free

    Live Free Active Member

    I'm trying to find this, have done a lot of research, and no luck. The "View Results" for polls might bias the results, so I'd like to not allow them to view the results unless they've voted.

    Can't seem to find a mod that does this, and I'm struggling with conditionals. Suggestions?
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Live Free

    Live Free Active Member

    Not quite. Checked it out but it won't let anyone view the results until the thread starter allows it or if it expires. I just want users to be able to view results after voting, but no before.

    Editing the bottom of thread_poll_results seemed to work:

    <xen:include template="poll_block">
        <xen:set var="$options">
        <xen:if is="{$response.hasVoted}">
            <xen:include template="poll_block_result" />
            <xen:else />
            You must vote before you may view the results.
    See anything wrong with that set up?

Share This Page