2010年12月30日 星期四

分享xuite "讚" 按鈕語法

分享xuite "讚" 按鈕語法

單按鈕"讚"
<iframe src="http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fblog.xuite.net%252Fjeanson61%252Fxuite&amp%3Blayout=standard&amp%3Bshow_faces=true&amp%3Bwidth=200&amp%3Baction=like&amp%3Bfont=arial&amp%3Bcolorscheme=light&amp%3Bheight=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:80px;" allowTransparency="true"></iframe>

進階按鈕
<script language="javascript">
<!--
window.onload=function() {
var my_CurrUrl = top.location.toString() ;
if (my_CurrUrl.search(/^http:\/\/blog.xuite.net\/jeanson61\/xuite(\/?|\?.+)$/) != -1) {
document.getElementById('banner').innerHTML=document.getElementById('banner').innerHTML
+"<div id='myBlogFBlikeArea' style='clear: both; padding: 35px 0px 0px 230px;'>" + "<iframe src='http://www.facebook.com/plugins/like.php?href"
+ my_CurrUrl + "&layout=standard&show_faces=false&width=450&action=like&font=arial&colorscheme=light&height=30'"
+" scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:450px; height:30px;' allowTransparency='true'></iframe></div>";
} else {
document.getElementById('tabs11').innerHTML=
"<div id='myArticleFBlikeAreaTop' style='position:absolute; width:340px; display: block; margin-top: -30px; left: 20px;'>"
+ "<iframe src='http://www.facebook.com/plugins/like.php?href"
+ my_CurrUrl + "&layout=button_count&show_faces=false&width=340&action=like&font=arial&colorscheme=light&height=21'"
+" scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:450px; height:21px;' allowTransparency='true'></iframe></div>"
+document.getElementById('tabs11').innerHTML;
document.getElementById('content_all').innerHTML=document.getElementById('content_all').innerHTML
+"<div id='myArticleFBlikeAreaBottom' style='clear: both; padding-top: 0px; padding-bottom: 0px;'>" + "<iframe src='http://www.facebook.com/plugins/like.php?href"
+ my_CurrUrl + "&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=60'"
+" scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:450px; height:60px;' allowTransparency='true'></iframe></div>";
}
}
//-->
</script>

2010年12月23日 星期四

如何文章後面出現讚

<iframe allowtransparency="true" expr:src="&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;colorscheme=light&quot;" frameborder="0" scrolling="no" style="border: none; height: 120px; overflow: hidden; width: 500px;"></iframe>
<div style='clear: both;'/>
登入 Blogger 的控制台 後,進入「版面配置」的「修改HTML」,勾選「展開小裝置範本」,然後找到下面這一行:
<b:includable id="post" var="post">
在此行的下面,貼上下列語法:
然後儲存範本即可。
上述的作法是將「讚」的按鈕放在文章標題之前,如果你想將按鈕放在文章的後面,則請將上面的語法改放在 <data:post.body> 之後就可以了。