Page 2 of 2

Re: poll

Posted: Sat Feb 27, 2010 7:02 am
by Gregor
It's getting more colourful :)

Talking about improvements...... Another thought on picking colours.
Based on the poll I use right now (www.wsv-herkingen.nl), each vote colour has its own .gif, so the assign might look like:

Code: Select all

{assign var='bar_colors' value=','|explode:"orange,green,brown,red,yellow,gold,pink,purple"}
To use the attachment, rename it to Colors.zip

Gregor

Re: poll

Posted: Wed Jul 13, 2011 3:20 pm
by weird0
I found this topic to be very usefull in creating a new template for my polls. There is only one comment I would like to add. To make it work properly the height of the percentage bar should be defined in the styling. otherwhise no bar will show.

search for

Code: Select all

<div style="background-color:#ffffff;width:{"`$multiplier*$entry->votes`"|round}px;float:left">
</div>
and replace with something like

Code: Select all

<div style="background-color:#ffffff;height:5px;width:{"`$multiplier*$entry->votes`"|round}px;float:left">
</div>
hope this comment will benefit someone else :)