Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Replace vote text with image

Quote Reply
Replace vote text with image
Hi,

How can i do for replace vote text, with a image
Thanks


Quote Reply
Re: [michelb] Replace vote text with image In reply to
Hi,

You can do:

<%if Votes > 9%>
<img src="...">
<%elsif Votes > 8%>
<img src="...">
...
<%endif%>

if you want 10 images. You can change the numbers if you want fewer images.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Replace vote text with image In reply to
Thanks Alex,

When i place this code in templates/links.html
<%if Votes > 9%>
<img src="img/18.gif">
<%elsif Votes > 8%>
<img src="img/16.gif">
<%elsif Votes > 7%>
<img src="/img/14.gif">
<%elsif Votes > 6%>
<img src="/img/12.gif">
<%elsif Votes > 5%>
<img src="/img/10.gif">
<%elsif Votes > 4%>
<img src="/img/8.gif">
<%elsif Votes > 3%>
<img src="/img/6.gif">
<%elsif Votes > 2%>
<img src="/img/4.gif">
<%elsif Votes > 1%>
<img src="/img/2.gif">
<%elsif Votes > 0%>
<img src="/img/1.gif">
<%endif%>

and i open the page with page.cgi

for the rate=4 he place 2 image for the rating
4.gif and 2.gif
but he don't place the image 8.gif
Can you tell me whats the probleme
Thank's

Quote Reply
Re: [michelb] Replace vote text with image In reply to
Do you have a URL I can see? I'm not sure I understand.

Cheers,

Alex
--
Gossamer Threads Inc.