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

Poll Results Conditional

Brogan

XenForo moderator
Staff member
#2
I don't think the poll id is exposed in the template so I don't believe it's possible to do so using a conditional.
 

Jake Bunce

XenForo moderator
Staff member
#3
A little hackish, but it works. You need to specify the thread_id in the code:

Admin CP -> Appearance -> Templates -> poll_block

Code:
						</div>
					</xen:if>
				</div>

			<xen:if is="{$poll.canVote} OR {$poll.content_id} != 23">
				{xen:raw $options}
			<xen:else />
				RESULTS HIDDEN FOR THIS POLL
			</xen:if>

			</div>
		</div>
	
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</div>
 

Michael

Active member
#4
A little hackish, but it works. You need to specify the thread_id in the code:

Admin CP -> Appearance -> Templates -> poll_block

Code:
</div>
</xen:if>
</div>

<xen:if is="{$poll.canVote} OR {$poll.content_id} != 23">
{xen:raw $options}
<xen:else />
 RESULTS HIDDEN FOR THIS POLL
 </xen:if>

</div>
</div>

<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</div>
Thanks Jake you really do live up to your usertitle :D