Thursday, January 15, 2009

Adding star ratings to blogspot custom templates in new blogger beta

4 comments

Recently blogger have added star ratings feature to posts , to enable this go to Layout section and click on edit link on Blog post, than check the check box against Show Star Ratings, for this u might need to login in blogger draft

If u r using template provided with blogger , than doing this will work , but if u r using any custom or third party template than u need to add some code for this to work
Go to edit HTML and check the expend widget template
Search for this line of code:
<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>         
Now search for following code:
<b:include name='feedLinks'/> 
Copy the following code and paste after the line mentioned above:
<b:if cond='data:top.showStars'>     
<script src='http://www.google.com/jsapi'  
type='text/javascript'/> 
<script type='text/javascript'> 
google.load(&quot;annotations&quot;, 
&quot;1&quot;); 
function initialize() 
{google.annotations.setApplicationId
(<data:top.blogspotReviews/>);
google.annotations.createAll(); 
google.annotations.fetch(); 
} 
google.setOnLoadCallback(initialize);     
</script>  </b:if>

Now u'll be able to star ratings in ur posts Njoy

For more info read this blog

Comments

4 comments to "Adding star ratings to blogspot custom templates in new blogger beta"

amitjainonline said...
4:46 PM

good trick


Frequent Reader said...
12:11 PM

Hello all,
While I surf blog , i found a all new trick in http://pic-memory.blogspot.com/

Vistor can comment and EMBED VIDEO YOUTUBE , IMAGE. Showed Immediately!
EX : View Source.
http://pic-memory.blogspot.com/2009/02/photos-women-latin-asian-pictu...
(add photos and videos to Blogspot comments).
Written it very smart!
I wonder how they do it ? Anyone know about this , please tell me :D
(sr for my bad english ^_^)

email: ya76oo@ya76oo.com
thanks.


MightyBuying.com said...
10:33 PM

hey I posted this coad, and it works... however not every time. It's my only widget that is on again and off again. Is there any way to make sure it has a higher priority in loading, or is there possibly any statements I can remove to fix this problem? you can see the blog at http://www.mightybuying.com


Rajesh Lal said...
12:48 AM

Try http://www.addrating.com. They have a great FREE rating widget, I have tried it for http://innovatwwithgadgets.com


Post a Comment

 

Amit jain online by amiT jaiN -Internet tips and tricks Orkut tricks , blogger hacks n tricks , windows tricks, and lots of other tips and hacks