TShopping

 找回密碼
 註冊
搜索
查看: 9224|回復: 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.填資料

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 -->
複製代碼

 

臉書網友討論

本帖子中包含更多資源

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x
22#
 樓主| 發表於 2014-2-16 23:59:49 | 只看該作者
去看28樓說明是否有修改到

版主招募中

21#
發表於 2014-2-16 12:00:26 | 只看該作者
大大我安裝好了這個插件,可是要留言時,出現了下列
(  這個回應尚未發佈到 Facebook 上。 Publish Comment  )
請問大大要如何修改謝謝


20#
發表於 2013-12-18 15:32:00 | 只看該作者
哇。這個也可以學起來~~


19#
 樓主| 發表於 2013-7-4 11:08:46 | 只看該作者
  1. href="$_G['setting']['siteurl']/forum.php?mod=viewthread&tid=$_G[tid]"
複製代碼
改這段  去檢查你 $_G['setting']['siteurl'] 版本對應變數


18#
發表於 2013-7-4 02:11:15 | 只看該作者
本帖最後由 no334180 於 2013-7-4 02:18 編輯
woff 發表於 2013-7-3 19:51
現在那檔案隨便找個位置貼上去  慢慢調校就好了

不好意思,我發現貼好了每一篇的文章FB留言都是相同的?
為什麼會這樣呢?

---------------------------------------------------
另外是教學的這段代碼你說直接貼上也是可以使用是嗎?
這樣還要像你回我說的改網址部份嗎?



  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 -->
複製代碼



17#
 樓主| 發表於 2013-7-3 19:51:32 | 只看該作者
現在那檔案隨便找個位置貼上去  慢慢調校就好了


16#
發表於 2013-7-3 17:19:34 | 只看該作者
woff 發表於 2013-7-3 16:53
當然是不能從廣告進去

會撈步到快取的變數值

我在DZ7.2
找不到這段
<!--{if $_G['setting']['magicstatus']}-->
                                        <ul id="mgc_post_$post[pid]_menu" class="p_pop mgcmn" style="display: none;">


是有不一樣嗎?



本帖子中包含更多資源

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x
15#
 樓主| 發表於 2013-7-3 16:53:31 | 只看該作者
當然是不能從廣告進去

會撈步到快取的變數值

檢視一下你那CACHE的變數網址敘述 套進去就好了


14#
發表於 2013-7-3 16:11:49 | 只看該作者
woff 發表於 2013-7-3 15:12
可以 但網址部份要修改一下~

網址部份要修改成怎樣?
因為我貼上去好像怪怪的。
直接貼在廣告播放的地方可以吧?(後臺→廣告)


13#
 樓主| 發表於 2013-7-3 15:12:08 | 只看該作者
no334180 發表於 2013-7-3 14:39
請問DZ7.2版本可以用嗎?

可以 但網址部份要修改一下~


*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-5-10 22:17 , Processed in 0.193175 second(s), 24 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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