BoonKiong.com2025™

人气 922

分享到新浪微博、微信和QQ空间的代码

文***已获得官方认证 2023-4-23 13:20

捕获.PNG

捕获1.PNG


1、打开 template\default\forum\viewthread_node.htm 模板,查找:

[CSS] 纯文本查看 复制代码
<!--{if !IS_ROBOT && $post['first'] && !$_G['forum_thread']['archiveid']}-->


在下边添加:

[CSS] 纯文本查看 复制代码
	<div class="viewthread_share">
		 <div class="bdsharebuttonbox">	 
			  <script>var TITLE_S='';TITLE_S=encodeURIComponent(document.title);</script><a href='javascript:void(0);' onclick="window.open('http://service.weibo.com/share/share.php?url='+encodeURIComponent(document.location.href)+'&title='+TITLE_S);return false;" 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);" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;"  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 ,在最下边添加:

[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(https://boonkiong.com/static/image/common/snsicon_n.png) no-repeat;
}



分享图标:
snsicon_n.png

<
您需要登录后才可以回帖 登录 | 立即注册

您还未登录

随手拍~~:

热门推荐~~:

论坛表情分享...

1、洋葱头 ...

Discuz! X3.5 解决小图标不显示的方法...

我发现大多数使用Discuz! X3.5 都有小图标不能显示的问题,提问的时候大家给的回答都是说跨域的问题, ...

如何在 discuz 帖子里添加 APlayer 音乐播...

1、首先将下边的 APlayer.css 和 APlayer.js 代码下载然后解压上传到服务器。 2、单曲音乐的代 ...

Discuz! 相关帖子功能修改随机显示不依赖标...

打开 source/module/forum/forum_viewthread.php 文件,查找: 换行添加: 再查找: 换行添 ...

Discuz! X3.5 手机版 logo 的路径...

打开以下的模板文件,搜索 logo_m.svg 1.template/default/touch/portal/index.htm 2.template/def ...

热度会员~~:

文強berrybkboonkiongadmin老谟深虑TaC9528huaekinfei220088ku510teresabitch

免责声明~~:


本站内容来源于合作伙伴及网络搜集,版权归原作者所有。如有侵犯版权,请立刻和本站联系,我们将在三个工作日内予以改正。
Email:hsbk@hotmail.com

手机App~~:

服务与条款|隐私政策|免责声明|手机版|网站地图|友链申请| 文强阁

Powered by Discuz! X3.5|© 2001-2025 Discuz! Team. |本站总访问量已经运行: