TShopping

 找回密碼
 註冊
搜索
查看: 2669|回復: 1
打印 上一主題 下一主題

[教學] 怎麼加入分享 臉書fb, 推特twitter, line.的網頁語法(2019年四月)

[複製鏈接]
跳轉到指定樓層
1#
發表於 2011-3-21 18:43:43 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
推特語法在2019年四月改版了


先把DZ7.1爬文閱讀

把CODE建成檔案viewthread_fb.htm
  1. <a href="javascript:desc='';via='';if(document.referrer)via=document.referrer;if(typeof(_ref)!='undefined')via=_ref;if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.facebook.com/share.php?u='+encodeURIComponent(location.href)));"><img src="static/image/common/facebook.png" alt="Push to Facebook" border="0" /></a>
  2. <a href="javascript:void(window.open('http://www.plurk.com/?qualifier=shares&status='.concat(encodeURIComponent(location.href)).concat(' ').concat('(').concat(encodeURIComponent(document.title)).concat(')')));"><img src="static/image/common/plurk.png" alt="Push to Plurk" border="0" /></a>
  3. <a href="http://www.tshopping.com.tw/forum.php?mod=viewthread&tid=$thread[tid]" class=
  4. "twitter-share-button"><img src="static/image/common/twitter.png" alt="Push to Twitter" border="0" /></a>  <script>!function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + '://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js, fjs); } }(document, 'script', 'twitter-wjs');</script>

  5. <div class="line-it-button" data-lang="zh_Hant" data-type="share-b" data-ver="2" data-url="http://www.tshopping.com.tw/forum.php?mod=viewthread&tid=$thread[tid]" style="display: none;"></div>
  6. <script src="https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js" async="async" defer="defer"></script>
複製代碼



然後找到檔案
viewthread_node_body.htm

找到
  1. <table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post[pid]">$post[message]</td></tr></table>
複製代碼
改成
  1. <table cellspacing="0" cellpadding="0"><tr><td>{subtemplate forum/viewthread_fb}</td></tr><tr><td class="t_f" id="postmessage_$post[pid]">$post[message]</td></tr></table>
複製代碼
這樣就可以了


 

臉書網友討論
2#
發表於 2011-7-30 21:37:04 | 只看該作者
老大 x2 版適用嗎 ?

版主招募中

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

本版積分規則



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

GMT+8, 2024-4-28 01:03 , Processed in 0.144954 second(s), 22 queries .

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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