Welcome to Geeklog, Anonymous Tuesday, March 11 2025 @ 07:18 am EDT
Geeklog Forums
Poll bar colors
Status: offline
domokun
Forum User
Chatty
Registered: 06/12/05
Posts: 37
I have to be missing something here regarding the bars for the poll results. I read the theme instructions (8 times to be exact) and can't figure it out for the life of me how to get each answer to show a different bar color. I have a 10 answer poll so I made 10 different color bars: bar1.gif, bar2.gif...etc... and put them into the my templates pics directory. Then I modifed the pollvotes_bar.html theme to reflect this but it doesen't work.
Here's the code from that template..How would I modify this to do what I want to do??
<td align="right"><b>{answer_text}</b></td>
<td><img src="{layout_url}/images/bar.gif" width="{bar_width}" height="10" align="bottom" alt=""> {answer_num} ({answer_percent}%)</td>
</tr>
TIA
Here's the code from that template..How would I modify this to do what I want to do??
Text Formatted Code
<tr><td align="right"><b>{answer_text}</b></td>
<td><img src="{layout_url}/images/bar.gif" width="{bar_width}" height="10" align="bottom" alt=""> {answer_num} ({answer_percent}%)</td>
</tr>
TIA
8
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you want alternating colors, name the bars, say, bar0.gif and bar1.gif and use
in the template file. If you want different colors for every answer, call them bar1.gif, bar2.gif, etc. and use
in the template file. In that case, you have to make sure that you have one GIF for every answer provided.
bye, Dirk
bar{answer_odd}.gif
in the template file. If you want different colors for every answer, call them bar1.gif, bar2.gif, etc. and use
bar{answer_counter}.gif
in the template file. In that case, you have to make sure that you have one GIF for every answer provided.
bye, Dirk
9
8
Quote
Domokun
Anonymous
worked perfectly...thankyou vm
10
8
Quote
Paul Norton
Anonymous

Worked a treat . Thank you.

9
8
Quote
All times are EDT. The time is now 07:18 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content