找到 /views/default/question/index.tpl.htm
<a class="text-color-999 dropdown-toggle" data-toggle="dropdown">
<i class="icon icon-share"></i><?php _e('分享'); ?>
</a>
<div aria-labelledby="dropdownMenu" role="menu" class="aw-dropdown shareout pull-right">
<ul class="aw-dropdown-list">
<li><a onclick="AWS.User.share_out('tsina');"><i class="icon icon-weibo"></i> <?php _e('新浪微博'); ?></a></li>
<li><a onclick="AWS.User.share_out('qzone');"><i class="icon icon-qzone"></i> <?php _e('QZONE'); ?></a></li>
<li><a onclick="AWS.User.share_out('weixin');"><i class="icon icon-wechat"></i> <?php _e('微信'); ?></a></li>
</ul>
</div>
然后将其替换成,下面获取的百度分享按钮,即可:
<div class="bdsharebuttonbox">
<a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a>
<a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin"></a>
<a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a>
<a title="分享到腾讯微博" href="#" class="bds_tqq" data-cmd="tqq"></a>
<a href="#" class="bds_more" data-cmd="more"></a>
</div>
<script>
window._bd_share_config={
"common":{"bdSnsKey":{"tsina":"445725852","tqq":"101164190"},
"bdText":"我正在 @<?php echo get_setting('site_name'); ?>看【<?php echo $this->question_info['question_content']; ?>】 分享给你,一起看吧!",
"bdMini":"1",
"bdMiniList":["renren","kaixin001","tqf","tieba","douban","bdhome","sqq","diandian","duitang","copy"],
"bdPic":"","bdStyle":"1","bdSize":"16"},
"share":{},
"image":{"viewList":["qzone","weixin","tsina","tqq"],
"viewText":"分享到:","viewSize":"16"},
"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","weixin","tsina","tqq"]}};
with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
其中的:bdSnsKey":{"tsina":"445725852","tqq":"101164190"
tsina:这个是我的 新浪微博来源APPID ,换成你们的即可
tqq:这个是我腾讯QQ的 APPID,缓存大家的即可
希望对大家有帮助,同理 也可以替换掉 文章页面的分享。
同时百度分享 对百度抓去自己的网站也有更便捷的途径效果!
阅读全文
收起全文