TShopping

標題: 怎麼加入分享 臉書fb, 推特twitter, line.的網頁語法(2019年四月) [打印本頁]

作者: woff    時間: 2011-3-21 18:43
標題: 怎麼加入分享 臉書fb, 推特twitter, line.的網頁語法(2019年四月)
推特語法在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>
複製代碼
這樣就可以了


作者: sporting    時間: 2011-7-30 21:37
老大 x2 版適用嗎 ?




歡迎光臨 TShopping (http://www.tshopping.com.tw/) Powered by Discuz! X3.2