woff 發表於 2011-3-21 18:43:43

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

推特語法在2019年四月改版了


先把DZ7.1爬文閱讀

把CODE建成檔案viewthread_fb.htm
<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>
<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>
<a href="http://www.tshopping.com.tw/forum.php?mod=viewthread&tid=$thread" class=
"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), 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>

<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" style="display: none;"></div>
<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

找到<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post">$post</td></tr></table>
改成<table cellspacing="0" cellpadding="0"><tr><td>{subtemplate forum/viewthread_fb}</td></tr><tr><td class="t_f" id="postmessage_$post">$post</td></tr></table>
這樣就可以了

sporting 發表於 2011-7-30 21:37:04

老大 x2 版適用嗎 ?
頁: [1]
查看完整版本: 怎麼加入分享 臉書fb, 推特twitter, line.的網頁語法(2019年四月)