• slider image 51
  • slider image 52
  • slider image 53
:::

3. [HACK]在Tad News新聞模組加入分享文章到Facebook的功能

站長看了這篇文章後,有感於Facebook的流行,本身網站也有需要增加這個功能,但在Tad News這部份的說明比較簡單,自己測試後,將經驗分享給網友。

如果懶的更改的話,請下載news_tpl.rar,解壓縮後,將檔案覆蓋到【tadnews\templates\news_tpl.html】即可
1.請開啟【tadnews\templates\news_tpl.html】檔案,可找到以下程式碼。

2.請將以下程式碼

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php
?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436')
;return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url
(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?12:26981)
 no-repeat top left; }</style><a href="
http://www.facebook.com/share.php?u=<url>"
 onclick="return fbs_click()" target="_blank" class="fb_share_link">分享到我的Facebook</a>
貼到<div style="text-align: center; padding: 3px; margin: 3px;">下面去。 3.請清空【xoops_data\caches\smarty_compile】中所有的暫存檔案,網頁再重整即可。

:::

PCHappy相關服務

好站推薦

[ more... ]

線上用戶

32人線上 (15人在瀏覽電腦教學)

會員: 0

訪客: 32

更多…

本站統計資料

版權聲明
Creative Commons License
PageRank:
Check PageRank
資助本站:

本站信息

管理員