poll

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: poll

Post 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
Attachments
Colors.gif
Colors.gif (9.25 KiB) Viewed 1452 times
weird0

Re: poll

Post 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 :)
Post Reply

Return to “Tips and Tricks”