登入您的Pixnet的管理後台→側邊欄位設定→公告版位→設定 (如下圖)
貼上以下程式碼:
<script type="text/javascript">
jQuery(document).ready(function(){
var item=new Array();
var item2=new Array();
var show=new Array();
jQuery("div.article-body").each(function(i)
{
item[i]='<iframe src="http://www.facebook.com/plugins/like.php?href='+
encodeURIComponent(jQuery(this).parent().find("ul").find('a').attr('href'))+
'&layout=standard&show_faces=true&width=500&action=like&colorscheme=light&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:20px;" allowTransparency="true" ></iframe>'
jQuery(this).before('<div style="margin-left:20px;margin-bottom:10px;">'+item[i]+'</div>');
});
jQuery("div.bookmark").each(function(i)
{
item2[i]=jQuery(this).clone('true');
});
jQuery("div.forward").each(function(i)
{
if(typeof item2[i]!="undefined"){
jQuery(this).before(item2[i]);
}
show[i]='true';
});
jQuery("p.author").each(function(i)
{
if(typeof show[i]!="undefined"){
jQuery(this).before("<div style='margin-top:5px;margin-bottom:15px;*width:400px'>"+item[i]+"</div>");
}
});
});</script>
在首頁的呈現方式如下圖紅框位置:
在此篇文章內頁的呈現方式如下圖紅框位置:
恭喜您完成!!
留言列表