Using images as poll options

Joshua

Active member
I run a photo contest on my site as I'm sure many other Xenforo users do. I'd like to be able to add the submitted photos into the actual poll so users can see the images next to the radio button when voting. I tried using html img tags and mycode img tags. Neither worked.

As a bonus, how can I allow users to vote for up to but no more than 3 images?

Thanks!
 
FWIW, I dug a little deeper after my initial reply. There is actually a template helper you can use to render bbcode, but I have been unable to find an available parser object to pass to the helper.

This is as far as I got:

Admin CP -> Appearance -> Templates -> poll_block_vote

In this code:

Code:
	<ol class="pollOptions">
		<xen:foreach loop="$poll.responses" key="$pollResponseId" value="$response">
			<li class="pollOption"><label><xen:if is="{$poll.multiple}">
				<input type="checkbox" name="response_multiple[]" value="{$pollResponseId}" /><xen:else />
				<input type="radio" name="response" value="{$pollResponseId}" /></xen:if>
				{$response.response}</label></li>				
		</xen:foreach>
	</ol>

Replace this:

Code:
{$response.response}

with this:

Code:
{xen:helper bbcode, $parser, $response.response}

The problem is that $parser doesn't exist. If some one can find a parser that is available to this template then this method should work. Or if there is a way to instantiate an object via template syntax that would be cool. O_o
 
The problem is that $parser doesn't exist. If some one can find a parser that is available to this template then this method should work. Or if there is a way to instantiate an object via template syntax that would be cool. o_O

Jake,

sorry to dig up an old thread, but did you get a final solution with this or does 1.1. make the process easier?
 
Top Bottom