- 注册时间
- 2026-7-7
- 最后登录
- 2026-8-25
- 在线时间
- 198 小时
管理员
- 金钱
- 2366
|
1、打开 template\default\forum\viewthread_node.htm 模板,查找:
- <!--{if !IS_ROBOT && $post['first'] && !$_G['forum_thread']['archiveid']}-->
复制代码
在下边添加:
- <div class="viewthread_share">
- <div class="bdsharebuttonbox">
- <script>var TITLE_S='';TITLE_S=encodeURIComponent(document.title);</script><a href='javascript:void(0);' target="_blank" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
- <a href="https://api.qrserver.com/v1/create-qr-code/?size=154x154&data=$_G[siteurl]thread-{$_G[tid]}-1-1.html" target="_blank" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
- <a href="javascript:void(0);" target="_blank" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
- </div>
- </div>
- <script language='javascript'>
- lastScrollY=0; var InterTime = 1;var maxWidth=-1;var minWidth=-85;var numInter = 3;var BigInter ;var SmallInter ;var SHARE_O = document.getElementById('aaswc164bb');var SHARE_I = parseInt(SHARE_O.style.left);
- function SHARE_BIG(){if(parseInt(SHARE_O.style.left)<maxWidth){SHARE_I = parseInt(SHARE_O.style.left);SHARE_I += numInter; SHARE_O.style.left=SHARE_I+'px'; if(SHARE_I==maxWidth)clearInterval(BigInter);}}
- function SHARE_TOBIG(){clearInterval(SmallInter);clearInterval(BigInter);BigInter = setInterval('SHARE_BIG()',InterTime);}
- function SHARE_SMALL(){if(parseInt(SHARE_O.style.left)>minWidth){SHARE_I = parseInt(SHARE_O.style.left);SHARE_I -= numInter;SHARE_O.style.left=SHARE_I+'px';if(SHARE_I==minWidth)clearInterval(SmallInter);}}
- function SHARE_TOSMALL(){clearInterval(SmallInter);clearInterval(BigInter);SmallInter = setInterval('SHARE_SMALL()',InterTime);}
- function postToWb(){var _t = encodeURI(document.title);var _url = encodeURI(document.location);var _appkey = encodeURI('appkey');var _pic = encodeURI('');var _site = '';var _u = 'http://share.v.t.qq.com/index.php?c=share&a=index&title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;window.open( _u,'转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );}
- function SHARE_CLOSE(id){
- document.getElementById(id).style.display='none';
- SHARE_SET_COOKIE('SHARE_DISPLAY','no');
- }
- function SHARE_SET_COOKIE(name,value){document.cookie = name+'='+value;}
- function SHARE_GET_COOKIE(name){
- var arg = name + '=';
- var alen = arg.length;
- var clen = document.cookie.length;
- var ii = 0;
- while (ii < clen) {
- var jj = ii + alen;
- if(document.cookie.substring(ii, jj) == arg){return GetCookieVal(jj);}
- ii = document.cookie.indexOf(' ', ii) + 1;
- if (ii == 0) break;
- }
- return null;
- }
- function GetCookieVal(offset)
- {
- var endstr = document.cookie.indexOf(';', offset);
- if (endstr == -1){endstr = document.cookie.length;}
- return unescape(document.cookie.substring(offset, endstr));
- }
- share=function (id,_top,_left){var me=id.charAt?document.getElementById(id):id, d1=document.body, d2=document.documentElement;d1.style.height=d2.style.height='100%';me.style.top=_top?_top+'px':0;me.style.left=_left+'px';me.style.position='absolute';setInterval(function (){me.style.top=parseInt(me.style.top)+(Math.max(d1.scrollTop,d2.scrollTop)+_top-parseInt(me.style.top))*0.1+'px';},10+parseInt(Math.random()*20));return arguments.callee;};
- window.onload=function (){
- share('aaswc164bb',200,-85);
- if(SHARE_GET_COOKIE('SHARE_DISPLAY')=='no'){
- document.getElementById('aaswc164bb').style.display='none';
- }else{
- document.getElementById('aaswc164bb').style.display='block';
- }
- var UPL = SHARE_GET_COOKIE('USER_PREF_LANG');if(UPL.length>0){
- if(UPL=='zh_TW'){
- TSC('big5');
- }else if(UPL=='zh_CN'){
- TSC('gb');
- }else{
- TSC('big5');
- }
- }
- }
- </script>
复制代码
2、打开 template\default\common\common.css ,在最下边添加:
- /* 百度分享 */
- .viewthread_share {float: left;margin: 20px 0 10px;padding: 3em 0;}
- .viewthread_share .bdsharebuttonbox {line-height: 30px;font-size: 16px;color: #afafaf;vertical-align: middle;display: inline-block;}
- .viewthread_share .bdsharebuttonbox .bds_qzone {background-position: -1px -61px;border-color: #1499f7;}
- .viewthread_share .bdsharebuttonbox a {display: inline-block;border: 1px solid;border-radius: 3px;vertical-align: middle;text-indent: -999px;padding: 0;width: 28px;float: none;margin: -2px 7px 0 0;height: 28px;line-height: 28px;background: url({STYLEIMGDIR}/snsicon_n.png) no-repeat;}
- .viewthread_share .bdsharebuttonbox .bds_tsina {background-position: -1px -1px;border-color: #d2423c;border-radius: 5px;box-shadow: 0 0 5px 0px #d2423c;}
- .viewthread_share .bdsharebuttonbox .bds_weixin {background-position: -1px -31px;border-color: #39b41c;border-radius: 5px;box-shadow: 0 0 5px 0px #39b41c;}
- .viewthread_share .bdsharebuttonbox .bds_qzone {background-position: -1px -61px;border-color: #1499f7;border-radius: 5px;box-shadow: 0 0 5px 0px #1499f7;}
- .viewthread_share .bdsharebuttonbox .bds_more {background-position: -1px -91px;border-color: #aaa;}
- .viewthread_share .bdsharebuttonbox .bds_qzone:hover { background-position: -1px -181px;background-color: #1499f7;}
- .viewthread_share .bdsharebuttonbox .bds_tsina:hover {background-position: -1px -121px; background-color: #d2423c;}
- .viewthread_share .bdsharebuttonbox .bds_weixin:hover {background-position: -1px -151px;background-color: #39b41c;}
- .viewthread_share .bdsharebuttonbox .bds_more:hover {background-position: -1px -211px;background-color: #aaa;}
- .viewthread_share .cutlines { float: left;margin: 5px 11px 0px 0px; color: #ccc;display: inline-block;vertical-align: middle; }
- .viewthread_share .k_favorite {padding: 0 10px;height: 29px;line-height: 29px;border: 1px solid #4fc277;font-size: 14px;color: #4fc277;border-radius: 2px;display: inline-block;vertical-align: middle;zoom: 1;overflow: hidden;}
- .viewthread_share .bdsharebuttonbox a {
- display: inline-block;
- border: 1px solid;
- border-radius: 3px;
- vertical-align: middle;
- text-indent: -999px;
- padding: 0;
- width: 28px;
- float: none;
- margin: -2px 7px 0 0;
- height: 28px;
- line-height: 28px;
- background: url(这里输入图标地址) no-repeat;
- }
复制代码
分享图标:
|
|