SharePoint 2010 - Stars not appearing

Jul 9, 2010 at 11:14 AM

I've just deployed the document ratings feature to a SharePoint 2010 installation...followed the instructions in the documentation but the "rate" and "view comments" links do not appear for the document in the document library.

The content type for the library is set correctly, and I am able to vote on a document by using the action menu and selecting vote.  After voting, the vote results column in the library displays "(4) - 1 rating(s)".  How do it get it to display the stars rather than the text and to display the links to vote and view comments?

Thanks

Coordinator
Jul 22, 2010 at 11:38 AM

Hi,

The solution hasn't been designed for SharePoint 2010. Since, 2010 includes an out-of-the-box rating system, I've not readapted mine.

Best Regards

Jul 27, 2010 at 8:05 AM

Hi,

I want to dispaly Vote Results and View Comments uaing Sharepoint API's but I can only display "(2) - 3 rating(s)". I wan to siaply in star Images. Please Help how to do it.

 

<font size="2">

strhtml.Append(

</font>"<tr style=' padding-top:10px; padding-left:3px;'>");<font size="2"> </font><font size="2">

strhtml.Append(

</font>"<td>&nbsp;</td>");
<font size="2"> </font>
<font size="2">

strhtml.Append(

</font>"<td><div align='left'></div></td>");

try 

{

<font size="2">

strhtml.Append(

</font>"<td class='loggedin'><strong><div align='left'>" + item["Vote Results"].ToString() + "</div></strong></td>");

} 

else

{

<font size="2">

strhtml.Append(

</font>"<td class='greaysmallfontnormal'><div align='left'></div></td>");

}

}

 

catch (Exception exc)

{

 

// this.Page.Response.Write(exc.Message.ToString());

}

{

if (item["Vote Results"] != null)

 

 

Thanks,

Akanksha

Aug 23, 2010 at 12:03 PM

The out the box rating in SP2010 didn't quite meet the requirements for the site i was building.

I did manage to adapt the SPToolbasket ratings to meet my needs though.  To get the stars appearing instead of "(4) - 1 rating(s)" you need to write a bit of custom xsl.

Create a new xsl file in ...14\Template\Layouts\XSL and ensure the filename starts with "fldtypes_".  In this file you can do something like this...

 

<xsl:template match="FieldRef[@Name='RateValue']" mode="Text_body">

<xsl:param name="thisNode" select="." />

<xsl:choose>

<xsl:when test="contains($thisNode/@RateValue,'(1)')">

<img src="/_layouts/images/sptoolbasket/rating_1.gif" alt="1 star" />

</xsl:when>

...

 

and repeat and customise for 2,3,4 and 5 stars

 

Hope that helps

 

Richard

Sep 22, 2010 at 5:09 PM

Can the out-of-box rating feature of Sharepoint 2010 be used to rate posts in discussion forum? 

Coordinator
Oct 8, 2010 at 9:14 AM

Hi,

I eventually decided to migrate my solution to SharePoint 2010 since SharePoint Foundation doesn't include natively the rating feature. You can download it on http://sptoolbasket2010.codeplex.com/ . It has been primarily designed for SharePoint Foundation but it's also compatible with SharePoint Server

Best Regards