Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Roll your own Community Server Rating Stars

I'm working with a Community Server site theme that has a blue background and concluded that the out-of-the-box rating stars, while looking fine on a white background, looked downright crappy over the blue.  So I rolled my own.  Here's what they look like.


 

Pretty!  If you look at the HTML generated by, in our case, the CSFile:EntryRating control you'll see

 

<span>
<img border="0" align="absmiddle" src="../images/common/star-left-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-right-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-left-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-right-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-left-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-right-on.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-left-off.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-right-off.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-left-off.gif"/>
<img border="0" align="absmiddle" src="../images/common/star-right-off.gif"/>
</span>

 

So we're working with half-stars that form a whole to support half-point ratings like 3.5.  The Photoshop workspace below gives you a better idea of the images that comprise a row of rating stars in Community Server.


 

This is great.  I can finally say I've written a 5-star blog post!

Comments (0) | Post RSS RSS comment feed

Posted on 2/20/2008 9:23:55 PM by Dave Burke
Categories: Community Server
Tags: no tags for this post

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke