Mr.N的回收站
blog模板暴力修改中...引起的任何不便请无视...- -#

For Jots

Category: By 小N
Hiya Jots, it seemed that you came to the right place, due to the Blogger doesnot allow me to paste the HTML codes in the comments area, so I just create a new post here to explain how to solve your problems. Well, let's do something now.

1. to add reaction buttons

Try to add the following code immediately after this line: <data:post.body/>

<span class='reaction-buttons'>
<b:if cond='data:top.showReactions'>
<table border='0' cellpadding='0' width='100%'><tr>
<td valign='center'><span class='reactions-label'>
<data:top.reactionsLabel/></span>
</td>
<td><iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' frameborder='0' name='reactions' scrolling='no'/></td>
</tr></table>
</b:if>
</span>


2. to add star ratings

After the line of code you added above, add the following code immediately.

<b:if cond='data:blog.pageType == "item"'>

<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>


then search the line of code: <b:include name='nextprev'/>

after this line, paste the following section of 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.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>


then save and preview your blog.

Hope this helps, enjoy! :-)

Kay

4 comments so far.

  1. "Jots" 1 June 2009 at 16:53
    Thank you so much Kay.
    I almost just deleted your comment without coming here, but, curiosity got the better of me this time around and I did. I had forgotten that I asked you to help solve this and thought it was spam on my blog mainly because it was entered on an unrelated post topic, but I'm glad I didn't. I have been looking for this reactions button solution like ...forever!

    I am off to try and install it now.

    Thank you again for helping and taking the time out to respond.

    "Jots" - aka Sela
  2. "Jots" 1 June 2009 at 20:13
    Hi Kay - Reaction button code worked but I can't get the Star ratings code to work.

    I'm stumped
  3. "Jots" 1 June 2009 at 20:48
    n/m you have to have Blogger in Draft
    http://bloggerindraft.blogspot.com/2008/06/new-feature-star-ratings.html
    as the default dashboard for it to be added 1st in Layout and Blog Edit, then your code worked.

    Thanks again.

    "Jots"
  4. 小N 2 June 2009 at 23:48
    That's the point.^_^
    You have to activate this feature through Blogger in Draft first.

I want to say something...

I want to say something...

请勿匿名留言,未注册的朋友请选择NAME/URL,URL可空白,谢谢~