| Subscribe Via RSS

Add Star Ratings to Blogger posts

| 25 comments |
ADVERTISEMENTS ▼
This was one of the mistakenly added feature around a month ago when the Blogger team did not intend to sneak it out. But now Blogger has added Star Ratings for each of your blog posts and you can use them at your blogs. The basic reason to add this feature beneath your blog posts is to show the popularity of the post.

This was one of the features added by Blogger in its 26 June updates, and is also available through blogger in draft. The rating system consists of two parts one part displays the average ratings of the post till now and the second one has the feature through which you can add your rating. Try it an the bottom of this post :)

How To Install Star Rating System For Blogger:

For Default Template Users:
The Installation is pretty simple for those who use the default templates of Blogger.Just follow these instructions to get it working.
> Log in to Blogger in Draft
> Go to Layouts > Page Elements (it is default when you open Layouts tab)
> Click on the 'Edit' Button for the 'blog post' page element
> Select the Show Star Rating box, and align it where you want to place it, using the arrange items preview.
> Save and You are done :)
That was a breeze, Isn't it?

But there can be a problem if you are using Custom templates, wherein the Star ratings won't show at all? But not to worry.

IF YOU ARE USING CUSTOM BLOGGER TEMPLATES:

> Perform the above steps.
> Go to Layouts > Edit HTML, and expand widget templates.
> Search for this code : <data:post.body/>
Below this search for <div class='postinfo'>
Paste this code just below the above found code :
<div class='star-ratings' style='float:right;'>
<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> </div>

> Now search for this code: <b:include name='feedLinks'/>
Place this Code just below the above found code:
<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.setApplicationId(<data:top.blogspotReviews/>);
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>

The code should look somewhat like this:
<b:include name='feedLinks'/>
<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.setApplicationId(<data:top.blogspotReviews/>);
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>
</b:includable>

> Save the template and you are done :)

You have the Star Ratings enabled for your blog now. You can Rate this post too below. If you have any queries feel free to ask.

You May also check out - How to add Inline Comment Form to Blogger

Do Comment and To keep yourself updated about Technology Subscribe to our feed
Did you like the Post? Subscribe to us or Get them Right into your Email Inbox :
Bookmark/Favorite this post : DiggIt! StumpleUpon Del.icio.us Google Yahoo MyWebs2.0 Yahoo Bookmarks Technorati Reddit Blinklist Furl Ma.gnolia Facebook

25 comments:

David Aragon said...

Tried your hack, but it didnt work!

Could you help me out?

My email:

ujsceara@gmail.com

My blog:

ujsceara.blogspot.com

Gaurav said...

David,
I checked your blog, and looked to me that you haven't placed the second code properly onto your blog. I have mailed you regarding how to correct this.

said...

help please?

it doesn't work for me, i'm confused..

blog: www.gotta-shine.blogspot.com

please get back to me on my blog, just leave a comment on any page. it would be appreciate alot.

thank you

said...

sorry, my mistake. it did work!! thank you!!

the star ratings don't show on the main page, but that's because i've enabled the expandable post hack so it's fine.

thank you!

Gaurav said...

Nevermind, Glad it worked for you :)

Ptiza said...

Hello
If I do not have ''div class='postinfo'''
in my template, what else should I look for
Thank You
:)

Gaurav said...

Hi Ptiza,
Welcome to CorpseofAttic.
Regarding your problem:
There is no hard and fast rule for the code to be placed. Just find data:post.body/. This depicts the Content of your Blog post. So if you place the code just after this line, Star Ratings would Appear just after the Blog Post.

So you can actually customize it according to your design theme, and place it anywhere it looks good :)
Happy Blogging

Ptiza said...

Cheers :))

Gaurav said...

Nevermind :) My pleasure Ptiza.

Lucy How said...

Well frankly I'm of the opinion to keep the blog as simple and plain as u can. Adding features although might look cool to you but to new visitors it looks a lot of clutter.

Just be with the KISS rule and go with bare necessities.

Best
Lucy How

Gaurav said...

I agree Lucy, but few people like the frills ;)

Anonymous said...

works, thanks,, note: "my template too complex"

Blogger Tutorial said...

Nice work and nice share, thanks

Alain-Christian said...

You can't search or arrange posts based on star rating so I don't the a point in installing this.

pleatherface said...

Hi, The star rating isn't showing up for me. Here is my test blog where I tried it out: http://cuntmagtesting.blogspot.com/

Ignore the appearance; it's just a test blog so I don't break my working blog. My actual blog is here, if you're curious: http://dailycuntpunch.blogspot.com/

Any advice would be appreciated. Thanks.

Online Forex Brokers said...

I think it kind of nice. It lets the reader give a way to leave a bad opinion without being 'sassy. It also should let you know what type of posts and comments are reaching your reader. Maybe they prefer long articles (not me) or just short usefull blurps. Anyway, if it used honestly, you can get a better idea of what 'works' or not.

gobinathan Subramani said...

i hve added the code... but i havn't get the star rating.. can u plz help in this issue.
my blog is http://chennaipoint.blogspot.com

Darshit said...

Me too. My template doesnt sport the postinfo line.

my_passion48@yahoo.com said...

it is showing nothing to me
http://templates-widgets-softwares.blogspot.com/

airport transport said...

Great by using this feature will make our blog more efficient and effective. I will try it.

Silk Flowers said...

Is rating is based on per ip - per posts?
What is the best placement for this widget, which could make the visitor to read the content with lots of interest.

Help will be appreciated.

ChiangMai guide And tour said...

Great, I will try in my blog.

Anonymous said...

thanks man its working in my blogger but one problem is there ,its see near the title post in right side i want to move it on bottom right side

whats the procedure

my blog is

http://dweaponsclub.blogspot.com/

oes tsetnoc said...

this is a nice add on by google.

MMA pound for pound said...

That's nice to read you blog as you continually provide great contents not seen on other site. Keep it up your site visitors will love your site a lot.

Post a Comment

No Spam or Anonymous Comments (Rules)