I want to be able to write some reviews and graphically rate them with stars. I put together some transparent stars in Gimp and added a macro to dasBlog.
I'm going to rate this effort:
4.5 stars out of 5
To get this effect, I simply wrote $stars(4.5).
$
stars(4.5)
(And I had to carefully construct the previous sentence so that dasBlog wouldn't invoke the stars macro.)
stars
I'm hardnosed. I rarely give 5/5 to anything. I don't really expect to need the half stars, but I may want that fine control at some point.
To use this in your own blog, download the zipfile of star images.
Copy 5star*.gif to your blog's images directory. The *.xcf files are Gimp source files.
5star*.gif
images
*.xcf
Add the following line to the <ContentFilters> section of your blog's site.config:
<ContentFilters>
<ContentFilter find="\$stars\((?<expr>[\d.]+)\)" replace="<div><img src="images/5star${expr}.gif" /> ${expr} stars out of 5</div>" isregex="true" />
Enjoy!
Page rendered at Thursday, November 20, 2008 6:56:00 AM (Pacific Standard Time, UTC-08:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
E-mail