找回密碼
 註冊
搜索
查看: 9807|回復: 22

[教學] X1&X1.5&X2.0&X2.5&X3 FB 留言板使用方法

   火.. [複製鏈接]
發表於 2011-7-4 18:29:06 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
插件名稱:X1&X1.5&X2.0 FB 留言板使用方法
作者 : netyea
演示網址: http://www.tshopping.com.tw


使用方法:
(請先爬文FB登入有相關檔案必須設置,不然留言版無法啟動)
1.到 http://developers.facebook.com/docs/reference/plugins/comments/
2.填資料
1.jpg
3.按 Get Code
  1. <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="xxx.com" num_posts="2" width="500"></fb:comments>
複製代碼
上面

  1. fb:comments href="xxx.com"
複製代碼
修改成

  1. $_G['setting']['siteurl']/forum.php?mod=viewthread&tid=$_G[tid]
複製代碼
4.把下面CODE複製起來

貼到你想貼的位置去就可以了

這樣每一帖子留言就都不一樣了
  1. <!-- fb comment author netyea -->
  2.     <!--{if $post['first']}-->
  3.       <div id="fbcomments" style="margin:10px 0 0 10px;">
  4.           <div id="fbcomments_title" style="font-size:1.17em;color:#005599;clear:both;margin-top:10px;" >臉書網友討論</div>
  5.     <div id="fb-root"></div><script src="http://connect.facebook.net/zh_TW/all.js#xfbml=1"></script><fb:comments href="$_G['setting']['siteurl']/forum.php?mod=viewthread&tid=$_G[tid]" num_posts="5" width="760"></fb:comments>
  6.       </div>
  7.     <!--{/if}-->
  8. <!-- fb comment author netyea -->
複製代碼
或是找
viewthread_node.htm
  1. <!--{if $_G['setting']['magicstatus']}-->
  2. <ul id="mgc_post_$post[pid]_menu" class="p_pop mgcmn" style="display: none;">
複製代碼
上面貼上 CODE就好了

2013/7月有改版
上面的CODE改成
  1. <!-- fb comment author netyea -->
  2. <!--{if $post['first']}-->
  3. <div id="fbcomments" style="margin:10px 0 0 10px;">
  4. <div id="fbcomments_title" style="font-size:1.17em;color:#005599;clear:both;margin-top:10px;" >臉書網友討論</div>
  5. <div id="fb-root"></div>
  6. <script>(function(d, s, id) {
  7. var js, fjs = d.getElementsByTagName(s)[0];
  8. if (d.getElementById(id)) return;
  9. js = d.createElement(s); js.id = id;
  10. js.src = "//connect.facebook.net/zh_TW/all.js#xfbml=1&appId=293605570670582";
  11. fjs.parentNode.insertBefore(js, fjs);
  12. }(document, 'script', 'facebook-jssdk'));</script> <fb:comments href="$_G['setting']['siteurl']/forum.php?mod=viewthread&tid=$_G[tid]" num_posts="5" width="760"></fb:comments></div>
  13. <!--{/if}-->
  14. <!-- fb comment author netyea -->
複製代碼
 
 樓主| 發表於 2011-7-6 16:39:19 | 顯示全部樓層
不是的 他會自己擷取該頁網址 所以每一頁都有專屬留言
版主招募中
 樓主| 發表於 2011-7-6 17:35:58 | 顯示全部樓層
簡單點就是貼在帖內 下方廣告 這樣就可以了

如本站
找到
  1. <!--{if $_G['setting']['magicstatus']}-->
  2.                                         <ul id="mgc_post_$post[pid]_menu" class="p_pop mgcmn" style="display: none;">
複製代碼
上面加入代碼就可以了
 樓主| 發表於 2011-7-6 22:03:14 | 顯示全部樓層
是viewthread_node.htm 然後你去FB申請了嗎?
有錯誤代表沒去申請
 樓主| 發表於 2011-7-8 19:11:22 | 顯示全部樓層
我的正常阿,請把你的代碼貼來看看阿
 樓主| 發表於 2011-7-8 21:16:25 | 顯示全部樓層
問題是你為什麼要換成那段呢?
那可是必須的程式代碼,如果有人有卡片
你的網站就亂了

所以只能加不能刪或換代碼
發表於 2012-2-8 22:00:57 | 顯示全部樓層
{:5_7:}我喜歡!感謝大大的分享
發表於 2012-4-8 00:00:29 | 顯示全部樓層
有人知道為何裝上會出現上下都有留言板嗎?且每一帖內留言板留言內容都相同!!

發表於 2012-4-21 21:37:21 | 顯示全部樓層
謝謝大大你分享很好用訊息
發表於 2012-4-22 22:45:15 | 顯示全部樓層
{:5_2:}不回帖不行......
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-5-1 22:03 , Processed in 0.027184 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表