最近对主题的改动相当多,想总结一下,但涉及的内容比较多,恐怕一次性写完的长篇大论怕难看完额,所以分段分享,这样标题也明确。呵呵,
我对PHP技术不懂写不出什么代码出来,基本我使用的方法都来自于网络及各大博客里技术文章阿,无奈的我只会copy。发此贴第一为了分享,二为了收藏以作备用- -。
直接上代码了。
首先把下面的代码复制到single.php文件自已主题的相应文置,我放在标签下面。(我的标签已经放在标题上面去了)。
<p class="follow">
原文链接 :<a href="<?php the_permalink() ?>">< ?php the_permalink() ?></a><br />
转载原创文章请注明来源:<a href="<?php bloginfo('url');?>" target="_blank"> < ?php bloginfo('name');?></a><br />
订阅本博:<a href="http://www.licream.net/feed">RSS订阅</a> ( <a href="http://fusion.google.com/add?feedurl=http://www.licream.net/feed/">Google Reader</a>
/ <a href="http://reader.youdao.com/#url=http://www.licream.net/feed/">有道</a>
/ <a href="http://mail.qq.com/cgi-bin/feed?u=http://www.licream.net/feed/">QQ邮箱</a>
/ <a href="http://www.xianguo.com/subscribe.php?url=http://www.licream.net/feed/">鲜果</a>
/ <a href="http://9.douban.com/reader/subscribe?url=http://www.licream.net/feed/">豆瓣</a>
/ <a href="http://www.zhuaxia.com/add_channel.php?url=http://www.licream.net/feed/">抓虾</a>)<br />
收藏分享本文:<a title="转贴到校内人人网" href="javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var%20f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/renren.gif" alt="分享到校内人人网" border="0" height="16" width="16"/></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://www.kaixin001.com/~repaste/repaste.php?&rurl='+escape(d.location.href)+'&rtitle='+escape(d.title)+'&rcontent='+escape(d.title),'kaixin'));kaixin.focus();" title="转贴到开心网"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/kaixin.gif" alt="转贴到开心网" border="0"/></a>
<a title="添加到QQ书签" href="javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/qq.png" alt="QQ书签" border="0" height="16" width="16"/></a>
<a href="http://app.foxling.cn/dilink/share.asp?u=<?php the_permalink(); ?>&t=< ?php the_title(); ?>" title="嘀咕一下" target="_blank"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/digu.png"/></a>
<a href="javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);location=%22http://zuosa.com/collect/Collect.aspx?t=%22+encodeURIComponent(t)+%22&u=%22+encodeURIComponent(u);void%200" title="你在做啥"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/zuosa.gif"/></a>
<a title="添加到百度搜藏" href="javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);var url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=ien#nw=1%22;window.open(url,'_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');void 0"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/baidu.gif" alt="百度搜藏" border="0" height="16" width="16"/></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();" title="收藏到新浪ViVi"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/vivi.gif" alt="Sina ViVi" border="0"/></a>
<a title="收藏到Google书签" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/googlebookmark.png" alt="Google书签" border="0" height="16" width="16"/></a>
<a title="添加到雅虎收藏" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=440,height=440,left=80,top=80,status=yes,resizable=yes');" href="javascript:;" rel="nofollow"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/yahoo.gif" alt="yahoo收藏" border="0" height="16" width="16"/></a>
<a title="保存到del.icio.us美味书签" href="javascript:(function(){f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'&v=5&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/delicious.gif" alt="Del.icio.us" border="0" height="16" width="16"/></a>
<a title="推荐到digg.com" href="javascript:location.href='http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/digg.gif" alt="digg" border="0"/></a>
<a href="javascript:void(location.href='https://twitter.com/home?status=Now%20reading%20<<'+encodeURIComponent(document.title)+'>>%20'+encodeURIComponent(location.href))" title="分享到 Twitter"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/twitter.png" alt="分享到twitter"/></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/365key.gif" title="收藏到365Key" /></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','yesky','scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/yesky.gif" title="收藏到天极" /></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&img=http://www.h-strong.com/blog/logo.gif','keyit','scrollbars=no,width=475,height=575,status=no,resizable=yes'));keyit.focus();"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/poco.gif" title="收藏到POCO"/></a>
<a href="javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/hexun.gif" title="收藏到和迅" /></a>
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(blog=window.open('http://www.bolaa.com/CommendBlog/SmallLogin.aspx?title='+escape(d.title)+'&newspath='+escape(d.location.href)+'&subtitle='+escape(t),'bolaa','width=400px,height=400px'));blog.focus();"><img src="http://www.licream.net/wp-content/themes/istudio-theme/resources/bolaa.gif" title="收藏到博拉" /></a> </p>
再到style.css添加一段样式代码:
.follow{background:#dbf3fd;border:1px #dcddd6;font-size:11px;width:600px;margin:10px 15px;padding:10px;}
可以说也省了一个插件哈,样式代码我copy “zww”的,HOHO。添加这个是不是觉得增加互动性呢,如果你也是爱折腾的,想减少插件想法,这个非常适合你啊。哈哈


If you are willing to buy a car, you will have to get the loan. Moreover, my brother always utilizes a auto loan, which supposes to be the most rapid.
很好,正要用呢
我博客也都弄上了。谢谢分享
我昨天一直在修改风格,可给我累毁了。我也准备加个这个,不过最好能实现js调用。
是指代码是JS吗.好像已经都是JS了吧
这个不错,支持!我研究研究
代码高亮暂时还用不到,我很少写技术文章…
- -,HOHO
这个高亮插件怎么没有滚动条,这样会影响布局
我看看能不能调下
不错,估计比addthis那个快一点?
我觉得会快一点点- -
哈哈~~你的代码太长了~~右边错位了~
~~WP好像有个这样的插件~
不明白为什么会溢出。。。哎。
不错,支持一下.
谢谢支持
- -呵呵
好久都没有用过这个代码了
为何不用用
呵呵
后面的代码看不见啊,高亮插件还没搞定么
还没搞定。郁闷中
恩,是个很好的用户体验,不错的
谢谢支持哈
博主用的是什么模板啊?真好看,支持你
- -,apple风格的,谢谢
那如果改成自己的代码 应该怎么写呢?突出以下 我们应该修改那里
http://www.licream.net/feed RSS的路径需要修改成你的。
收藏分享本文里的网址,www.licream.net也要改成你的。图片的地址可改可不改- -。最好是改下。换成自已的图片
这个东东貌似不错,很多博客文章都有,我去弄弄看
呵呵,确实很多人写过。
有时间我也添加一下看看
嗯嗯
…郁闷,不知道为什么高亮插件失效了。
什么高亮插件?有冲突?
SyntaxHighlighter 。不知道和哪个冲突了
用WP-Syntax试试,我一直用这个,效果也很不错,还能显示行号
这二天忙- -,没有怎么来,过会试试