网站添加百度分享(浮动代码)
引入社会化流量用户将网站内容分享到第三方网站,第三方网站的用户点击专有的分享链接,从第三方网站带来社会化流量。
提升网页抓取速度使用了百度分享的网页可以更快地被百度爬虫发现,从而帮助网站的内容更快地被百度抓取。
展示网页分享量使用了百度分享的网页被用户分享后,可以使该网页被分享的次数展示在百度的搜索结果页中,辅助用户判断网页质量。
- <!-- 百度分享浮动代码-->
- <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"5","bdPos":"right","bdTop":"160"},"image":{"viewList":["qzone","tqq","weixin","tqf","tsina","sqq","copy"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tqq","weixin","tqf","tsina","sqq","copy"]}};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>
- <!-- 百度分享浮动代码-->
复制代码
将上面红字部分代码插入到/template/default/common/header.htm文件中,具体位置如下(在header.htm文件代码最底部)
- <!--{/if}-->
- </div>
- <!--{ad/subnavbanner/a_mu}-->
- <!--{subtemplate common/pubsearchform}-->
- </div>
- </div>
- <font color="#ff0000"><!-- 百度分享浮动代码-->
- <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"5","bdPos":"right","bdTop":"160"},"image":{"viewList":["qzone","tqq","weixin","tqf","tsina","sqq","copy"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tqq","weixin","tqf","tsina","sqq","copy"]}};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>
- <!-- 百度分享浮动代码--></font>
- <!--{hook/global_header}-->
- <!--{/if}-->
- <div id="wp" class="wp">
复制代码
保存后,刷新页面即可。
|