Custom Post Rating Code

Mar 30, 2010 at 2:55 AM

I am using the theme paperclip-cactus theme.  In the PostView.ascx it uses the below for rating purposes but the script fails. 

Here is what I see in firefox:

Error: Rate is not defined
Source File: javascript:void(Rate('83448146-b997-4851-a522-a837f00df1f5',%204))
Line: 1

Once again, I am sure it is something simple but I am not sure what....


                    <li style="width:<%=Math.Round((float)(Post.Rating / 5 * 100), 0) %>%">Currently <%=Post.Rating %>/5 Stars.</li>  
                    <div style="width:<%=Math.Round((float)(Post.Rating / 5 * 100), 0) %>%">Currently <%=Post.Rating %>/5 Stars.</div>
                     <li><a href="javascript:void(Rate('<%=Post.Id.ToString() %>', 1))" rev="vote-against" title="Poor">1</a></li>
                    <li><a href="javascript:void(Rate('<%=Post.Id.ToString() %>', 2))" rev="vote-against" title="Fair">2</a></li>
                    <li><a href="javascript:void(Rate('<%=Post.Id.ToString() %>', 3))" rev="vote-abstain" title="Average">3</a></li>
                    <li><a href="javascript:void(Rate('<%=Post.Id.ToString() %>', 4))" rev="vote-for" title="Good">4</a></li>
                    <li><a href="javascript:void(Rate('<%=Post.Id.ToString() %>', 5))" rev="vote-for" title="Excellent">5</a></li>

Mar 30, 2010 at 3:59 AM

If you're using BE 1.5 or BE 1.6, I would try replace ALL of that with:

<%=Rating %>

Mar 30, 2010 at 5:09 AM

I some how new that would be the answer.  What I am not crazy about is how the stars are below the rating text.  I would like them to be next to the text.

.....but a VERY COOL feature