Translate This Blog
Remember To Always Back Up Your Template Before Attempting Any Of The Tweaks On This Site

Star Ratings For Post Feeds (Blogger)

You can add star rating system below your post in Blogger so you can give visitors more control on rating your post. Blogger in draft release a Star Rating of their own and it is recommended that you try to use their method over this one. However for some people who have heavily modified or 3rd party templates this method may not work properly.

If your one of the those who can not get this to work for you then you can always add it in manually.

To do this you will first need to make sure you have the Ratings option turned of in the Page Elements.

How To Turn Ratings Off:

Design--> Page Elements--> Blog Post "Edit"--> Uncheck the option just below "Show quick edit"

How To Add Star Ratings:

1.  Design--> Edit HTML-->Back up your template--> Expand Widgets--> Click Ctrl+F

2.  In the find bar that comes up input this code below.
<div class='post-footer-line post-footer-line-1'>
If you can not find that, look for this code instead.
<data:post.body />
OR
<p><data:post.body /></p> 
3.  Directly after whichever code you find paste this code below.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<span class='star-ratings'>
<b:if cond='data:top.showStars'>
<div expr:g:background-color='data:backgroundColor' expr:g:text-color='data:textColor' expr:g:url='data:post.absoluteUrl' g:height='42' g:type='RatingPanel' g:width='180'/>
</b:if>
</span>
</b:if>
4. Search for this code below.
<b:include name='nextprev'/>
OR
<b:include name='nextprev'/>
  <!-- feed links -->
 5.  Place this code directly after either one of these above.
<b:if cond='data:top.showStars'>
<script src='http://www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>
google.load("annotations", "1");
function initialize() {
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>
6. Save and provided you did it correctly it should save and your star ratings will display under your post.

Note: Star Ratings sometimes will take a minute to load.

0 comments:

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs PageRank