温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

discuz论坛安装异次元分享工具条的方法

发布时间:2020-08-02 05:55:47 来源:网络 阅读:939 作者:黑苹果博客 栏目:web开发

 在模板文件 header.htm 里面的<head></head>之间添加  share.css 样式链接(每个使用的模板不同,请自行注意!)

<link rel="stylesheet" type="text/css" href="{$_G[setting][jspath]}share/share.css" />

然后找到footer.htm 在</body> 里面添加

<script type="text/javascript" src="{$_G[setting][jspath]}share/share_roll.js"></script>

在  viewthread_node.htm里面添加下面代码,具体位置可参考下面这个文件:viewthread_node.rar

<div id="share_toolbar_wrapper" style="position: static; top: auto; z-index: 9999;width:660px ">

<div id="share_toolbar">

<div class="stb_group" id="stb_article_view" title="本文围观次数">

<span id="stb_article_view_icon"></span>

<span id="stb_view_count"> $_G[forum_thread][views] </span>

</div>

<div class="stb_divide"></div>

<div data="{'url':'http://www.ouukuu.com/forum.php?mod=viewthread&tid=$_G[tid]'}" class="bdshare_t bds_tools get-codes-bdshare stb_group stb_share_buttons" id="bdshare">

<a href="void(0);" id="stb_btn_weibo" class="bds_tsina" title="分享到新浪微博"></a>

<a href="void(0);" id="stb_btn_tqq" class="bds_tqq" title="分享到腾讯微博"></a>

<a href="void(0);" id="stb_btn_qzone_small" class="bds_qzone" title="分享到QQ空间"></a>

<a href="void(0);" id="stb_btn_renren_small" class="bds_renren" title="分享到人人网"></a>

<span id="stb_btn_more" class="bds_more"><span id="stb_sbtn_more_icon"></span></span>

<a href="void(0);" class="shareCount"></a>

</div>

<!--修改下一行的百度分享ID-->

<script type="text/javascript" id="bdshare_js" data="type=button&uid=12345" ></script>

<script type="text/javascript" id="bdshell_js"></script>

<script type="text/javascript">

document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);

</script>

<div class="stb_divide"></div>

<div class="stb_share_buttons stb_group">

<!-- 前一篇 -->

<a id="stb_btn_prev" href="forum.php?mod=redirect&goto=nextoldset&tid=$_G[tid]" title="/"></a>

<!-- 下一篇 -->

<a id="stb_btn_next" href="forum.php?mod=redirect&goto=nextnewset&tid=$_G[tid]" title="/"></a>

</div>

<div class="stb_group_right">

<div class="stb_like_btn" id="alipay_btn">

<!--修改下一行的链接地址为你的支付宝收款页面-->

<a href="http://me.alipay.com/mayun" target="_blank" title="捐助作者,与您共勉">.</a>

</div>

<div class="bdlikebutton stb_like_btn bdlikebutton-blue bdlikebutton-small bdlikebutton-small-blue">

<div class="bdlikebutton-inner">

<span class="bdlikebutton-add"></span>

<div class="bdlikebutton"></div>

<div class="bdlikebutton-count">

<!-- 处理百度like按钮点击和like数量 -->

<script id="bdlike_shell" type="text/javascript"></script>

<script type="text/javascript">

var bdShare_config = {

"type":"small",

"color":"blue",

"uid":"12345",//修改为你自己的百度分享id

"likeText":"喜欢",

"likedText":"已赞过"

};

document.getElementById("bdlike_shell").src="http://bdimg.share.baidu.com/static/js/like_shell.js?t=" + new Date().getHours();

</script>

</div>

</div>

</div>

</div>

</div>

</div>

解压share出来后 一致放到根目录的/static/js/ 。大功告成,赶紧测试你的简单美观又实用的集分享与捐赠的异次元工具条吧!

黑苹果博客原创,转载请注明本文地址:http://www.zhangchenghui.com/apple/1848.html

附件:http://down.51cto.com/data/2362778
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI