Originally Posted by
ekoliniol
I have implemented the rating tag on my site [url]www.ekoliniol.com[/url]
If you like it do this :
Add the following to the HEAD section :
<script type="text/javascript">
var Star0 = "Star0.gif";
var Star0_5 = "Star0_5.gif";
var Star1 = "Star1.gif";
function RatingStars(myrating) {
if (parseInt(myrating,10) > 0) {
for (i=0; i<5; i++) {
if (i < (myrating / 100) * 5) {
if ((i+0.5) < (myrating / 100) * 5) {
document.write("<img src='.//images//" + Star1 + "' width=$A_P_STARSIZE valign='top' border='0' />");
}
else {
document.write("<img src='.//images//" + Star0_5 + "' width=$A_P_STARSIZE valign='top' border='0' />");
}
}
else {
document.write("<img src='.//images//" + Star0 + "' width=$A_P_STARSIZE valign='top' border='0' />");
}
}
}
else {
document.write('Not Rated Yet');
}
}
</script>
and use the function like this
<tr>
<td width="30%" align="right" nowrap><b>Personal Star Rating [1-5] </b></td>
<td width="70%" bg_color="$shade_color2" class="valshade">
<script type="text/javascript">RatingStars(<!--[Rating]--><!--[/Rating]-->)
</script>
</td>
</tr>
You will have to build 3 gif images: 1 for no star , 1 for half a star and one for full star, and place them in an sub-folder called images .'
I'm posting mine in case you're interested