登入您的Pixnet的管理後台→側邊欄位設定→公告版位→設定 (如下圖)

2012-3-25 21-11-07  

貼上以下程式碼:

<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'))+
    '&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;colorscheme=light&amp;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>

 

在首頁的呈現方式如下圖紅框位置:

2012-3-25 21-24-42

 

在此篇文章內頁的呈現方式如下圖紅框位置:

2012-3-25 21-25-16   

恭喜您完成!!

 

arrow
arrow
    全站熱搜

    minisix 發表在 痞客邦 留言(0) 人氣()