Mr.N的回收站
blog模板暴力修改中...引起的任何不便请无视...- -#
Showing posts with label Blog相关. Show all posts
Showing posts with label Blog相关. Show all posts

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