空の領域

又一个坑爹的神站 大人說:要清爽 要低調

0%

Wordpress百度分享工具栏(仿异次元)

嘛效果图什么的看下面啦,或者直接传送至异次元看看就行了吧╮<(=╯-╰=)>╭虽然大家都叫我不需要加不过觉得挺好看没忍住就……(嘛实在没这个需求的话删除也是很快的吧)

送个原教程传送门(传送门人家看不到什么的最讨厌了):http://www.wpdaxue.com/wordpress-add-baidu-share-tool.html

好吧少年们,跟着你们的天大人一起来DIY吧!

请将这个pack(让我试试download短代码吧)解压之后改代码然后上传到主题根目录吧少年!

\[Downlink href="https://img.codesky.me/download/share.zip"\]share.zip\[/Downlink\]

修改的时候都是有注释的,修改到后一行去uid什么的改掉就行了,然后,关于如何获取UID:

在百度分享log一下以后代码获取可以看到2013-01-31_220237

就是这个数字。

支付宝收款页面当然也可以改乘其他的这种都随意吧。

postview如果无法正常显示的话修改代码就可以了,当然或者懒人安装一下插件吧(没那么懒吧)


0、修改文件(学热力学第零定律的)

1、上传到主题根目录(连同文件夹)

2、在single.php里加入代码

原文是加了判断加上全局我觉得没有这个必要(啊喂不是一样么)

3、single.php需要调用的位置加上:

以上路径都可以根据你的需求更改。


It’s the show time!!

single.php:

.

share.css:

/*分享工具条*/
#share_toolbar{background:none repeat scroll 0 0 #FCFCFC;border:1px solid #DDDDDD;border-radius:5px 5px 5px 5px;height:33px;line-height:33px;width:auto;_display:none;}
#share_toolbar_wrapper{background:none repeat scroll 0 0 #FFFFFF;padding-top:8px;}
#stb_article_view{width:auto;+max-width:35px;}
#stb_article_view #stb_article_view_icon{background:url(share.png) no-repeat scroll 0 0 transparent;display:block;height:14px;margin:3px auto 1px;width:18px;}
#stb_article_view span{color:#AAAAAA;display:block;font-family:”Helvetica Neue”,Helvetica,Arial,sans-serif;font-size:11px;text-align: center;line-height:12px;margin:0 5px;}
.stb_group,.stb_divide{display:block;float:left;}
.stb_divide{background:url(share.png) no-repeat scroll 1px -19px transparent;height:33px;width:9px;}
.stb_submenu_link{position:relative;}
.stb_submenu_box{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none repeat scroll 0 0 #FCFCFC;border-color:-moz-use-text-color #DDDDDD #DDDDDD;border-image:none;border-right:1px solid #DDDDDD;border-style:none solid solid;border-width:0 1px 1px;display:none;padding:10px;position:absolute;top:34px;}
.stb_share_buttons a{background:url(share.png) repeat scroll 0 0 transparent !important;display:block;float:left;height:25px !important;margin:4px 0 0 5px;text-indent:-99999px;width:81px;}
#share_toolbar .stb_share_buttons a:hover{margin-top:3px !important;}
#stb_btn_weibo{background-position:0 -57px !important;padding:0;}
#stb_btn_weibo_small{background-position:-83px -57px !important;padding:0;width:27px;}
#stb_btn_tqq{background-position:0 -83px !important;padding:0;}
#stb_btn_tqq_small{background-position:-83px -83px !important;padding:0;width:27px;}
#stb_btn_qzone{background-position:0 -135px !important;padding:0;}
#stb_btn_qzone_small{background-position:-83px -135px !important;padding:0;width:27px;}
#stb_btn_renren{background-position:0 -109px !important;padding:0;}
#stb_btn_renren_small{background-position:-83px -109px !important;padding:0;width:27px;}
.stb_share_buttons_small{left:-30px;width:150px;}
.stb_share_buttons_small a,#stb_sbtn_more_icon{background:url(share.png) repeat scroll 0 0 transparent;display:block;float:left;height:16px;margin:1px 0 0 3px;text-indent:-99999px;width:16px;}
.stb_share_buttons_small a:hover{margin-top:0;}
#stb_btn_more{background:none repeat scroll 0 0 transparent !important;display:block;float:left;height:33px;margin:0 0 0 3px;padding:0;width:25px;}
#stb_sbtn_more_icon{background-position:-20px 0 !important;margin-top:9px;}
#stb_btn_prev,#stb_btn_next{background-position:-9px -24px !important;width:33px;}
#stb_btn_next{background-position:-42px -24px !important;margin-left:0;width:32px !important;}
.stb_group_right{float:right;height:33px;width:205px;overflow:hidden;}
.stb_like_btn{float:left;margin:4px 5px 0 0;}
#stb_like_gplus{margin-right:-20px;margin-top:7px;}
#alipay_btn a{float:left;padding:0;width:107px;background:url(share.png) 0 -165px no-repeat;color:#CBCBCD}
#alipay_btn a:hover{margin-top:-1px;}
.bdlikebutton{float:right;margin:4px 5px 0 0;}
.stb_share_buttons .shareCount{width:1px;}
#bdshare .shareCount{background:none repeat scroll 0 center transparent;color:#5895BE;margin-top:8px;text-indent:0;}
#share_toolbar #bdshare .shareCount:hover{margin-top:8px !important;}
#bdshare{margin-right:5px;}

share_roll.js(我并没有调用这个文件<(=→_→=)>)

/*

author    :    eliteYang
website    :    http://www.cppfans.org
desc    :    baidu share tool bar
date    :    2012/10/20
Desc    :    百度分享工具条滚动后修改CSS style
license    :    请尊重原创者,允许转载和修改,但需要保留链接,谢谢合作,祝大家使用愉快,如有疑问,请至 C++爱好者博客(www.cppfans.org) 交流讨论

*/
var IO=document.getElementById(‘share_toolbar_wrapper’),Y=IO,H=0,IE6;
IE6=window.ActiveXObject&&!window.XMLHttpRequest;
while(Y){H+=Y.offsetTop;Y=Y.offsetParent};
if(IE6)
IO.style.cssText=”position:absolute;top:expression(this.fix?(document”+
“.documentElement.scrollTop-(this.javascript||”+H+”)):0)”;

window.onscroll=function (){
var d=document,s=Math.max(d.documentElement.scrollTop,document.body.scrollTop);
if(s>H&&IO.fix||s<=H&&!IO.fix)return;
if(!IE6){IO.style.position=IO.fix?””:”fixed”;IO.style.top=”0px”;}
IO.fix=!IO.fix;
};

try{document.execCommand(“BackgroundImageCache”,false,true)}catch(e){};
//]]>


[warning]最后:如果有人能把百度分享的喜欢按钮改成灰色就好了QAQ[/warning]

欢迎关注我的其它发布渠道