<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>A.shun&#039;s Blog &#187; 博客手记</title> <atom:link href="http://www.a-shun.com/archives/category/blog/feed" rel="self" type="application/rss+xml" /><link>http://www.a-shun.com</link> <description></description> <lastBuildDate>Mon, 26 Jul 2010 16:19:55 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>博客主题评论部分修改</title><link>http://www.a-shun.com/archives/21375.html</link> <comments>http://www.a-shun.com/archives/21375.html#comments</comments> <pubDate>Wed, 21 Jul 2010 12:44:41 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[主题]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21375</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>又开始折腾 Wordpress 了～</p><p>本来在上次折腾之后，打算等上 3.0 之后再弄的。不过这段时期朋友们共享了一些不错的技巧，我也心动了。</p><p>这回拿<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>评论模板开刀，优化了样式，解决了存在已久的嵌套问题，并添加了一些小功能。<br /> 评论功能是 Blogger 之间、以及访问者互动的重要手段，是必须重视的。</p><p>和往常一样，做个总结手记，也分析那些让大家受益的技巧。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21375.html">博客主题评论部分修改</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>又开始折腾 Wordpress 了～</p><p>本来在上次折腾之后，打算等上 3.0 之后再弄的。不过这段时期朋友们共享了一些不错的技巧，我也心动了。</p><p>这回拿<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>评论模板开刀，优化了样式，解决了存在已久的嵌套问题，并添加了一些小功能。<br /> 评论功能是 Blogger 之间、以及访问者互动的重要手段，是必须重视的。</p><p>和往常一样，做个总结手记，也分析那些让大家受益的技巧。<br /> <span id="more-21375"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">评论样式优化</h2><p>新的样式如图:</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_comment_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_comment_03.jpg" alt="Wordpress 主题评论模板" width="461" height="388" /></a></p><p>所做的主要修改：</p><ol><blockquote><li>添加了大量的 box-shadow 和 text-shadow 阴影效果，并去掉了一些边框。现在自我感觉良好。<br /> 这些属性不支持 IE 浏览器。</li><li>调整布局：一些位置调整，并把回复按钮和 UA 信息弄到了评论内容的下方，避免评论者名字过长造成的重叠。</li><li>给<a href="http://www.a-shun.com/archives/21329.html">评论者 UA 信息</a>的图片添加 opacity 属性，看起来淡一些，毕竟是点缀作用别太吸引注意嘛。鼠标放上去才恢复不透明。<br /> 当然，这个也不支持 IE 。</li></blockquote></ol><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">实现完美的 WordPress 无限嵌套回复</h2><p>我比较喜欢嵌套方式的评论模板，这样回复评论更有对话的感觉。<br /> 之前的<strong>无限嵌套</strong>有一个问题：回复非主评论时，评论框错位了（跑到了主评论下面），回复并刷新后正常。<br /> 虽然基本不影响使用，不过追求完美是好事。<br /> QiQiBoY 已经把方法折腾出来了，高手哇。效果：</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_comment_04.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_comment_04.jpg" alt="Wordpress 评论无限嵌套" width="456" height="386" /></a></p><p>解决方法见：<a href="http://www.qiqiboy.com/2010/07/07/perfect-solution-wordpress-nested-layers-deep-back-problems.html">完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;</a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">为 WordPress 主评论加上楼层号</h2><p>有个楼层号看起来像模像样，只给主评论加上也不会显得杂乱，还支持评论分页。</p><p style="text-align: center;"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_comment_02.jpg" alt="Wordpress 评论楼层号" width="202" height="248" /></p><p>来自 OM：<a href="http://zww.me/archives/25161">只在WP主评论加上楼层号的方法（支持评论分页）</a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">添加评论引用功能</h2><p>使用评论嵌套方式的话引用就少了，不过在说明某些问题的时候还是需要的。<br /> <strong>在评论模板加上引用按钮</strong>，免去了不少麻烦。</p><p>同样来自 QiQiBoY 的：<a href="http://www.qiqiboy.com/2010/07/15/easily-create-your-own-wordpress-quote-reply-function.html">添加引用按钮——轻松打造属于你的WordPress引用回复功能</a><br /> 文章的步骤写得很详细了，不过由于那段 JavaScript 和<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>的回复功能有些冲突，拜托了 om 才改好的 <img src='http://www.a-shun.com/wp-includes/images/smilies/icon_exclaim.gif' alt=':!:' class='wp-smiley' /> 。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">在评论框添加简单计数器</h2><p>折腾一回肯定要把好东西都搜刮来。<br /> 这个评论文字计数器虽然没啥用，只是考虑到一小段  js 即可实现，无需改动主题其他部分，就用上了。可以增加点动感。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_comment_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_comment_01.jpg" alt="博客评论计数器" width="372" height="152" /></a></p><p>等看腻了就去掉吧。<br /> 方法见：<a href="http://www.qiqiboy.com/2010/07/14/a-simple-comment-box-counter.html">评论框的简单计数器</a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">P.S.</h2><p>感谢上面提到的<span style="text-decoration: line-through;">两位同学</span>一位同学和一位老同学。</p><p>现在的评论风格看起来有点华丽了，和其他部分不怎么协调，留着下次折腾吧。<br /> 这个 zsofa-ova 越来越不朴素了，罪过吖。 <img src='http://www.a-shun.com/wp-includes/images/smilies/icon_neutral.gif' alt=':neutral:' class='wp-smiley' /></p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="博客主题评论部分修改" href="http://www.a-shun.com/archives/21375.html"> 《博客主题评论部分修改》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="博客主题评论部分修改" href="http://www.a-shun.com/archives/21375.html">http://www.a-shun.com/archives/21375.html</a></p><p style='border-top:3px solid #CCC;'>© <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span> for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21375.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21375.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/theme" rel="tag">主题</a> 的文章</h3><ul><li>2010年07月8日  -- <a href="http://www.a-shun.com/archives/21372.html" title="Wordpress折腾手记 6">Wordpress折腾手记 6</a> (101)</li><li>2010年04月27日  -- <a href="http://www.a-shun.com/archives/21356.html" title="WP 文章定时发布 &#038; 继续优化当前主题">WP 文章定时发布 &#038; 继续优化当前主题</a> (147)</li><li>2010年03月22日  -- <a href="http://www.a-shun.com/archives/21342.html" title="Wordpress折腾手记4  ">Wordpress折腾手记4 </a> (119)</li><li>2010年02月22日  -- <a href="http://www.a-shun.com/archives/21340.html" title="启用新主题zsofa-ova，欢迎围观">启用新主题zsofa-ova，欢迎围观</a> (197)</li><li>2010年02月19日  -- <a href="http://www.a-shun.com/archives/21339.html" title="新年新气象：归来&#038;准备更换主题">新年新气象：归来&#038;准备更换主题</a> (99)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2010年06月9日  -- <a href="http://www.a-shun.com/archives/21363.html" title="启用 Lazy Load jQuery 插件 ">启用 Lazy Load jQuery 插件 </a> (103)</li><li>2010年06月4日  -- <a href="http://www.a-shun.com/archives/21365.html" title="为博客图片添加 Shadowbox 效果">为博客图片添加 Shadowbox 效果</a> (99)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21375.html/feed</wfw:commentRss> <slash:comments>125</slash:comments> </item> <item><title>Wordpress折腾手记 6</title><link>http://www.a-shun.com/archives/21372.html</link> <comments>http://www.a-shun.com/archives/21372.html#comments</comments> <pubDate>Thu, 08 Jul 2010 14:26:04 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[主题]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21372</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>这篇距离<a href="http://www.a-shun.com/archives/21356.html">上次优化 Wordpress 主题</a>的间隔比较长。<br /> <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>看起来还是老样子，我喜欢一个<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>用很久的，当前主题保守估计一年以上。</p><p>但和以往不同，这回都是偶尔添加一些东西（绝大多数来自朋友们的博客），现在只是汇总一下。也把一些资源、教材的链接和朋友们分享。</p><p>这次弄好，先休息下。 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span> 3.0 还在观望中。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21372.html">Wordpress折腾手记 6</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>这篇距离<a href="http://www.a-shun.com/archives/21356.html">上次优化 Wordpress 主题</a>的间隔比较长。<br /> <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>看起来还是老样子，我喜欢一个主题用很久的，当前主题保守估计一年以上。</p><p>但和以往不同，这回都是偶尔添加一些东西（绝大多数来自朋友们的博客），现在只是汇总一下。也把一些资源、教材的链接和朋友们分享。</p><p>这次弄好，先休息下。 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span> 3.0 还在观望中。<br /> <span id="more-21372"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">主题兼容性提升</h2><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">1.修复 IE 6下文字过大的问题和一些错位问题</h3><p>考虑到 IE 用户的访客比例还是很高，虽然不鼓励 IE，但总是要留点可看性。</p><p>13px 的字号在IE 6下总是很大= =，导致本来就不整齐的页面进一步错位。<br /> 折腾了半天原来是字体问题，把 Tahoma 改成 Verdana 解决了。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">2. 搜索框样式改进</h3><p>搜索框样式改进，主要用 <strong>CSS3 圆角</strong>和 <strong>box-shadow 效果</strong>。Opera 10.5～10.7 以及 FF3.64～4.0 下表现基本一致。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt6_02.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt6_02.jpg" alt="搜索框样式" width="353" height="136" /></a></p><p>IE 6下，搜索框不再完全变形了- -，凑合吧。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt6_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt6_01.jpg" alt="IE6样式" width="449" height="130" /></a></p><p>Chrome 环境下，搜索提交按钮的图标终于能显示了。但 box-shadow 的样式很奇怪。<br /> 请对 CSS 比较了解的朋友们指教下。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt6_04.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt6_04.jpg" alt="box-shadow问题" width="352" height="134" /></a></p><p>导致出现问题的该部分代码为：</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">box-shadow:inset 1px 1px 1px #ddd;
-moz-box-shadow:inset 1px 1px 1px #ddd;
-webkit-box-shadow:inset 1px 1px 1px #ddd;</pre><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">页面滚动</h3><p>Opera 环境下  jQuery 滚动到顶部的画面闪烁 bug 已经修复。在用于滚动的 js 代码前添加一段 Opera 补丁即可。</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">jQuery(document).ready(function($) {
$body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body'); // opera fix
});</pre><p>详见：<a href="http://kan.willin.org/?p=1311">Page Scroll 的幾種方法</a>。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">主题的功能改进</h2><p><a href="http://www.a-shun.com/archives/21365.html">为博客图片添加 Shadowbox 效果</a>，加强看图体验。</p><p><a href="http://www.a-shun.com/archives/21363.html">启用 Lazy Load jQuery 插件</a>，延迟加载图片，让网页元素加载顺序更加合理。</p><p>更新 <a href="http://kan.willin.org/?p=1320">Gravatar 头像緩存</a> 和 <a href="http://kan.willin.org/?p=1278">Recent Comments 代码</a>，执行效率更高，加上缓存插件，现在的查询时间几乎都在 0.5s 以下。感谢低调的高手 Willin Kan 和 <a href="http://zww.me/">zww</a> 。</p><p>将分页代码替换为 <a href="http://kan.willin.org/?p=1323">Mini Pagenavi</a>，代同样出自 Willin Kan，比起我以前从 wp-pagenavi 直接挖出来的精简很多。感谢 om <a href="http://zww.me/archives/25180">为 Mini Pagenavi 添加“上一页”、“下一页”链接</a>。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt6_06.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt6_06.jpg" alt="Mini Pagenavi" width="413" height="58" /></a></p><p>仿照 Rss <span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>按钮，为 Follow me 添加了一个菜单，效果见导航栏右侧，方法见：<a href="http://www.neoease.com/jquery-slideup-and-slidedown/">jQuery 的 slideUp 和 slideDown 动画</a>。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">主题的其他修改</h2><p><strong>为链接添加 transition （CSS 渐变效果）</strong>，由于我的颜色搭配，这并不明显。方法详见：<a href="http://axiu.me/learning_notes/transition_effect/">利用CSS添加渐变（Transition）效果</a>。</p><p><strong>为获取焦点后的文本框添加 box-shadow 效果</strong>。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt6_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt6_03.jpg" alt="box-shadow效果" width="437" height="219" /></a></p><p>使用 IE 条件注释，为 IE 浏览器访客添加提示，效果见图2。</p><p>侧栏模块顺序调整，分类和日志下拉框样式调整。</p><p>其他一些细节调整。</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="Wordpress折腾手记 6" href="http://www.a-shun.com/archives/21372.html"> 《Wordpress折腾手记 6》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="Wordpress折腾手记 6" href="http://www.a-shun.com/archives/21372.html">http://www.a-shun.com/archives/21372.html</a></p><p style='border-top:3px solid #CCC;'>© <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span> for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21372.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21372.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请订阅备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/theme" rel="tag">主题</a> 的文章</h3><ul><li>2010年07月21日  -- <a href="http://www.a-shun.com/archives/21375.html" title="博客主题评论部分修改">博客主题评论部分修改</a> (125)</li><li>2010年04月27日  -- <a href="http://www.a-shun.com/archives/21356.html" title="WP 文章定时发布 &#038; 继续优化当前主题">WP 文章定时发布 &#038; 继续优化当前主题</a> (147)</li><li>2010年03月22日  -- <a href="http://www.a-shun.com/archives/21342.html" title="Wordpress折腾手记4  ">Wordpress折腾手记4 </a> (119)</li><li>2010年02月22日  -- <a href="http://www.a-shun.com/archives/21340.html" title="启用新主题zsofa-ova，欢迎围观">启用新主题zsofa-ova，欢迎围观</a> (197)</li><li>2010年02月19日  -- <a href="http://www.a-shun.com/archives/21339.html" title="新年新气象：归来&#038;准备更换主题">新年新气象：归来&#038;准备更换主题</a> (99)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2010年06月9日  -- <a href="http://www.a-shun.com/archives/21363.html" title="启用 Lazy Load jQuery 插件 ">启用 Lazy Load jQuery 插件 </a> (103)</li><li>2010年06月4日  -- <a href="http://www.a-shun.com/archives/21365.html" title="为博客图片添加 Shadowbox 效果">为博客图片添加 Shadowbox 效果</a> (99)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21372.html/feed</wfw:commentRss> <slash:comments>101</slash:comments> </item> <item><title>启用 Lazy Load jQuery 插件</title><link>http://www.a-shun.com/archives/21363.html</link> <comments>http://www.a-shun.com/archives/21363.html#comments</comments> <pubDate>Wed, 09 Jun 2010 14:31:16 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Wordpress]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21363</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>先吐槽一下，这几天主机的速度真不是一般的慢，打击更新欲望啊。<br /> 搬家的欲望再次萌生，可惜手头窘迫，再观望一下。</p><p>话说，最近抱着“<span style="color: #008000;">既然加载了 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/jquery" title="查看 jQuery 的全部文章" target="_blank">jQuery</a></span>，不多弄点功能，挺亏的</span>”这种想法，折腾了些东西。比如之前的 <a href="http://www.a-shun.com/archives/21365.html">Shadowbox</a>。<br /> 现在又发现了这个叫做 <strong>Lazy Load 的 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/jquery" title="查看 jQuery 的全部文章" target="_blank">jQuery</a></span> 插件</strong>，它的作用是延迟加载页面中的图片，还能为添加渐显特效。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21363.html">启用 Lazy Load jQuery 插件</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>先吐槽一下，这几天主机的速度真不是一般的慢，打击更新欲望啊。<br /> 搬家的欲望再次萌生，可惜手头窘迫，再观望一下。</p><p>话说，最近抱着“<span style="color: #008000;">既然加载了 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/jquery" title="查看 jQuery 的全部文章" target="_blank">jQuery</a></span>，不多弄点功能，挺亏的</span>”这种想法，折腾了些东西。比如之前的 <a href="http://www.a-shun.com/archives/21365.html">Shadowbox</a>。<br /> 现在又发现了这个叫做 <strong>Lazy Load 的 jQuery 插件</strong>，它的作用是延迟加载页面中的图片，还能为添加渐显特效。<br /> <span id="more-21363"></span><br /> 详细介绍和使用方法见 <span class='wp_keywordlink'><a href="http://www.neoease.com/" title="mg12" rel="nofollow" target="_blank">mg12</a></span> 的这篇：<a href="http://www.neoease.com/lazy-load-jquery-plugin-delay-load-image/" target="_blank">《Lazy Load, 延迟加载图片的 jQuery 插件》</a>。<br /> 下面简单说下我的体验。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">Lazy Load 的作用</h2><p><strong>Lazy Load 的作用</strong>简单来说就是：<span style="color: #ff0000;">让网页元素加载顺序更加合理</span>。<br /> 网页代码的载入顺序是从上到下，如果评论区域有大量小图片（头像、表情、以及其他评论者信息），会导致侧栏的显示较慢，体验不好。<br /> 有了 Lazy Load ，在不可见区域的图片会被延迟加载，可以说在相当程度上提升了速度，在长页面尤为明显。<br /> 正好我比较喜欢 <a href="http://www.a-shun.com/archives/21329.html" target="_blank">WP-UserAgent</a> 这类型的插件，那就更需要这个了。</p><p>而且 Lazy Load  的 FadeIn 效果，让我们向评论区滚动的时候，下面的头像和表情等图片会以渐显的方式刷出来，感觉相当棒（自我感觉...）。<br /> Lazy Load 的<span style="color: #ff0000;">打包版体积还不足 2K</span>，相当的小巧。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">如何使用 Lazy Load</h2><p>到作者页面去下载该 js，<a href="http://www.appelsiini.net/projects/lazyload" target="_blank">http://www.appelsiini.net/projects/lazyload</a></p><p>将 js 上传到服务器。<br /> 加载 jQuery，如果你博客已经使用了 jQuery，请跳过这一步。<br /> 在 wp 主题模板加入以下代码：</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">&lt;script type="text/javascript" src="jquery.lazyload.js"&gt;&lt;/scrip&gt;
&lt;script type="text/javascript"&gt;jQuery(document).ready(
 function($){
          $("img").lazyload({
             placeholder : "images/grey.gif",
             effect      : "fadeIn"
          });
      });
  &lt;/script&gt;</pre><p>要注意 js 和图片文件的路径。<br /> "img"是指对页面上所有图片都应用这个效果。你也可以用 CSS 选择器来制定，比如 #content img。<br /> grey.gif 是指占位图片，可以到<a rel="external nofollow" href="http://github.com/ayn/wp-jquery-lazy-load/tree/master/images">点此</a>下载一个 1x1 象素的图片。</p><p>不想折腾的话可以使用个 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span> 插件：<a href="http://wordpress.org/extend/plugins/jquery-image-lazy-loading/" target="_blank"> jQuery Image Lazy Load WP</a> ，我没有测试过。</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="启用 Lazy Load jQuery 插件" href="http://www.a-shun.com/archives/21363.html"> 《启用 Lazy Load jQuery 插件》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="启用 Lazy Load jQuery 插件" href="http://www.a-shun.com/archives/21363.html">http://www.a-shun.com/archives/21363.html</a></p><p style='border-top:3px solid #CCC;'>© <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span> for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21363.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21363.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/jquery" rel="tag">jQuery</a>, <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a> 的文章</h3><ul><li>2010年06月4日  -- <a href="http://www.a-shun.com/archives/21365.html" title="为博客图片添加 Shadowbox 效果">为博客图片添加 Shadowbox 效果</a> (99)</li><li>2010年07月21日  -- <a href="http://www.a-shun.com/archives/21375.html" title="博客主题评论部分修改">博客主题评论部分修改</a> (125)</li><li>2010年07月8日  -- <a href="http://www.a-shun.com/archives/21372.html" title="Wordpress折腾手记 6">Wordpress折腾手记 6</a> (101)</li><li>2010年04月27日  -- <a href="http://www.a-shun.com/archives/21356.html" title="WP 文章定时发布 &#038; 继续优化当前主题">WP 文章定时发布 &#038; 继续优化当前主题</a> (147)</li><li>2010年04月15日  -- <a href="http://www.a-shun.com/archives/21353.html" title="博客一周年：平淡中的乐趣">博客一周年：平淡中的乐趣</a> (149)</li><li>2010年03月30日  -- <a href="http://www.a-shun.com/archives/21346.html" title="博客数据备份方案">博客数据备份方案</a> (127)</li><li>2010年03月22日  -- <a href="http://www.a-shun.com/archives/21342.html" title="Wordpress折腾手记4  ">Wordpress折腾手记4 </a> (119)</li><li>2010年03月7日  -- <a href="http://www.a-shun.com/archives/21347.html" title="更换图床：批量替换图片地址">更换图床：批量替换图片地址</a> (145)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21363.html/feed</wfw:commentRss> <slash:comments>103</slash:comments> </item> <item><title>为博客图片添加 Shadowbox 效果</title><link>http://www.a-shun.com/archives/21365.html</link> <comments>http://www.a-shun.com/archives/21365.html#comments</comments> <pubDate>Fri, 04 Jun 2010 01:03:54 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[Wordpress]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21365</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>很多朋友都给博客添加了图片缩放效果（幻灯片效果），感觉很酷。</p><p>这不仅仅是为了好看，很多上了尺寸的图片如果不是用缩放，会打乱排版，缩放后只是留下图片链接那会带来不方便。</p><p>虽然<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>只是偶尔插点截图，但依然有必要加上这类效果（Lightbox、highslide等）来提高体验。</p><p>昨天又对博客进行了一次折腾，把原先的 highslide 效果替换为 <strong>Shadowbox</strong> 。</p><p>[......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21365.html">为博客图片添加 Shadowbox 效果</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>很多朋友都给博客添加了图片缩放效果（幻灯片效果），感觉很酷。</p><p>这不仅仅是为了好看，很多上了尺寸的图片如果不是用缩放，会打乱排版，缩放后只是留下图片链接那会带来不方便。</p><p>虽然<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>只是偶尔插点截图，但依然有必要加上这类效果（Lightbox、highslide等）来提高体验。</p><p>昨天又对博客进行了一次折腾，把原先的 highslide 效果替换为 <strong>Shadowbox</strong> 。</p><p><span id="more-21365"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">选用 Shadowbox  替代 highslide</h2><p>我原来使用的是 highslide 效果，也很不错。不过偶尔换换口味嘛。而且之前那个 js 还会导致 Opera 左键拖拽不正常，会给分享按钮带来不方便。</p><p>Lightbox 和 Shadowbox 有基于 Jquery 的插件，既然我已经加载 Jquery，那不妨一试。</p><p>Lightbox 和 Shadowbox 都是灯箱效果，可以平滑展开链接的图片，而同时页面的其余部分都变成透明的黑色背景。对比之后 发现 Lightbox 稍微小巧些，但 Shadowbox 的默认效果比较符合我的审美，对各种浏览器的兼容性也较好，支持图片、视频、网页、flash、FLV等媒体。于是先用着这个 。</p><p>暂时先用着默认样式，有空再给图片加上 Css。</p><p>点击以下图片查看 Shadowbox 效果，单击图片以外的区域可以返回。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_Shadowbox3.jpg"  rel="shadowbox"><img src="http://img.a-shun.com/wp/wp_Shadowbox3.jpg" alt="shadowbox js" title="这是一张演示图片，单击图片以外的区域可以返回" width="518" height="288" /></a></p><p>虽然很简单，但我还是折腾了不少时间，惭愧啊。现将方法贴出来和大家分享。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;"><span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span> 插件 Shadowbox JS</h2><p>如果不喜欢折腾的朋友推荐直接使用这个 Shadowbox  的 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span> 插件。</p><p>这个插件异常强大，除了一般的图片、多媒体播放等效果，选项极多，也很容易看懂。</p><p>到 Wp 官方下载 Shadowbox JS 插件：<a href="http://wordpress.org/extend/plugins/shadowbox-js/">Shadowbox JS For Wordpress Plugins</a>。</p><p>上传到plugin目录，在线解压，并在 Wordpress 控制面板激活该插件。激活后根据需要进行设置。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_Shadowbox.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_Shadowbox.jpg" alt="shadowbox js wordpress插件" width="513" height="386" /></a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">免插件实现 Shadowbox 效果</h2><p>到<a href="http://www.shadowbox-js.com/download.html">shadowbox-js网站</a>上，根据自己使用的 js 库，并选择用于何种对象、语言，下载相应文件。</p><p>先上传并解压到当前主题目录。</p><p>加载 Jquery，如果你博客已经使用了 Jquery，请跳过这一步。</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js">&lt;/script></pre><p>然后在主题中加载 Shadowbox：在你的文章页模板 single.php（或者底部模板 footer.php 加判断语句）中插入以下代码：</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">&lt;link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/shadowbox.css">
&lt;script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/shadowbox.js">&lt;/script>
&lt;script type="text/javascript">
Shadowbox.init();
&lt;/script></pre><p>给需要使用该效果的图片设置好大小，链接到原图，并给链接加上 rel="shadowbox" 的属性即可。还有其他多种用法，详见：<a href="http://www.shadowbox-js.com/usage.html">http://www.shadowbox-js.com/usage.html</a></p><p>A.shun 这里用的是最基本的 rel="shadowbox" 。</p><p>但是先前的图片链接没有带上这个属性。没关系，有很多简单的方法来给所有图片链接自动加上属性。</p><p>常用的有 <span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/jquery" title="查看 jQuery 的全部文章" target="_blank">jQuery</a></span>选择器，但是我不会- -！这里用简单的 php 和 wp 函数来实现。</p><p>在 主题支持函数 functions.php 中插入以下代码</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">function shadowbox($content)
{
	return preg_replace('/&lt;a(.*?)href=(.*?).(jpg)"(.*?)>/i', '&lt;a$1href=$2.$3" $4 rel="shadowbox">', $content);
}
add_filter('the_content', 'shadowbox', 2);</pre><p>这是针对jpg图片的，其他格式自己动脑筋。该脚本还支持很多设置，网站上有详细说明。</p><p>不罗嗦了，NBA2009～2010赛季总决赛即将开始～</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="为博客图片添加 Shadowbox 效果" href="http://www.a-shun.com/archives/21365.html"> 《为博客图片添加 Shadowbox 效果》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="为博客图片添加 Shadowbox 效果" href="http://www.a-shun.com/archives/21365.html">http://www.a-shun.com/archives/21365.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21365.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21365.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/jquery" rel="tag">jQuery</a>, <a href="http://www.a-shun.com/archives/tag/plugins" rel="tag">plugins</a>, <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a> 的文章</h3><ul><li>2010年06月9日  -- <a href="http://www.a-shun.com/archives/21363.html" title="启用 Lazy Load jQuery 插件 ">启用 Lazy Load jQuery 插件 </a> (103)</li><li>2010年03月22日  -- <a href="http://www.a-shun.com/archives/21342.html" title="Wordpress折腾手记4  ">Wordpress折腾手记4 </a> (119)</li><li>2010年01月10日  -- <a href="http://www.a-shun.com/archives/21329.html" title="WP-UserAgent：评论者信息显示插件">WP-UserAgent：评论者信息显示插件</a> (224)</li><li>2009年11月22日  -- <a href="http://www.a-shun.com/archives/21311.html" title="我使用的Wordpress插件">我使用的Wordpress插件</a> (172)</li><li>2010年07月21日  -- <a href="http://www.a-shun.com/archives/21375.html" title="博客主题评论部分修改">博客主题评论部分修改</a> (125)</li><li>2010年07月8日  -- <a href="http://www.a-shun.com/archives/21372.html" title="Wordpress折腾手记 6">Wordpress折腾手记 6</a> (101)</li><li>2010年04月27日  -- <a href="http://www.a-shun.com/archives/21356.html" title="WP 文章定时发布 &#038; 继续优化当前主题">WP 文章定时发布 &#038; 继续优化当前主题</a> (147)</li><li>2010年04月15日  -- <a href="http://www.a-shun.com/archives/21353.html" title="博客一周年：平淡中的乐趣">博客一周年：平淡中的乐趣</a> (149)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21365.html/feed</wfw:commentRss> <slash:comments>99</slash:comments> </item> <item><title>WP 文章定时发布 &amp; 继续优化当前主题</title><link>http://www.a-shun.com/archives/21356.html</link> <comments>http://www.a-shun.com/archives/21356.html#comments</comments> <pubDate>Tue, 27 Apr 2010 00:30:25 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[主题]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21356</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>又花了不少时间在这个主题上，罪过啊，不过折腾下来还是挺满意的。<br /> 这次zsofa-ova在总体上变化不大，都是细节上的优化。像<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>这样一个<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>用很长时间的，当然是不断的追求精致。</p><p>现在继续来总结一下这次的折腾，顺便分享一些相关的教程。<br /> 其实这个应该叫做wp折腾手记 5的，不过偶尔换下名字也不错。</p><p>昨天就弄好了，这回顺便尝试下<strong>WordPress定时发布</strong><strong></strong><strong>文章</strong>。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21356.html">WP 文章定时发布 &#038; 继续优化当前主题</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>又花了不少时间在这个主题上，罪过啊，不过折腾下来还是挺满意的。<br /> 这次zsofa-ova在总体上变化不大，都是细节上的优化。像<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>这样一个<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>用很长时间的，当然是不断的追求精致。</p><p>现在继续来总结一下这次的折腾，顺便分享一些相关的教程。<br /> 其实这个应该叫做wp折腾手记 5的，不过偶尔换下名字也不错。</p><p>昨天就弄好了，这回顺便尝试下<strong>WordPress定时发布<strong><strong>文章</strong></strong></strong>。<br /> <span id="more-21356"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">WordPress文章定时发布功能</h2><p>这是wp自带的功能，无需任何插件。<br /> 如下图所示，编辑好日志之后在“发布”那里点击编辑，把发布时间设定为当前时间之后，发布的按钮就会自动变成定时，点击即可。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/theme_zosfa_zt_04.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/theme_zosfa_zt_04.jpg" alt="wordpress定时发布文章设置" /></a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;"><span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>header部分</h2><p>最开始，<a href="http://www.a-shun.com/archives/21340.html">zsofa-ova</a>的搜索框设计在了header的中间，比较方便和醒目。<br /> 不过有的访客朋友看法不同：“搜索框放中间了感觉怪怪的”、“搜索框放的位置有些不太美观”。。。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/theme_zosfa_zt_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/theme_zosfa_zt_01.jpg" alt="wp主题header修改" /></a></p><p>之前因为右侧有twitter输出和<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>按钮，把这些放中间也不合适。现在重新调整了布局。<br /> 去掉了feedsky的按钮，和feedburner.com放在了导航栏，twitter按钮的旁边。搜索框回到了靠右地方，嗯，感觉良好。</p><p>当然，也顺手减少了header的高度。这样可以在不滚动页面的时候显示更多内容。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">评论部分</h2><p>把comments-ajax更新到v1.29，点击主评论回复按钮有了平滑滚动效果。<br /> 具体看这篇：《<a href="http://willin.atbhost.net/?p=1271" target="_blank">WordPress 內置嵌套評論專用 Ajax comments</a>》，Willin Kan真是低调的大师。</p><p>评论样式也重新设计，评论者名字、发表时间、和ua信息弄成一排了。这个其实个人不是特别满意，只是换换布局。<br /> 看上去很紧凑，这也可以在一定程度上缩短了页面高度。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/theme_zosfa_zt_02.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/theme_zosfa_zt_02.jpg" alt="wp主题评论样式修改" width="509" height="280" /></a></p><p>主评论隔行使用不同的背景色，比较一目了然。简单的两行代码即可实现，这是特地请教om的。</p><pre>ol.commentlist li.thread-even{background:#F2F2F2;}
ol.commentlist li.thread-odd{background:#eee;}</pre><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">其他细节</h2><p style="text-align: center;"><a href="http://img.a-shun.com/wp/theme_zosfa_zt_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/theme_zosfa_zt_03.jpg" alt="文章分类和月份存档下拉选择框" width="298" height="97" /></a></p><ol><blockquote><li>侧栏加入了文章分类、月份存档下拉选择框。比较实用，不占地方。<br /> 相关的代码可以看这篇：《<a href="http://zww.me/archives/25116" target="_blank">WordPress 月度存档、文章分类下拉框代码</a>》。</li><li>由于分类下拉框取代了分类列表，所以把友情链接也改成双排的，各种徽标弄到下面去。</li><li>content的背景色和整个页面的色调统一起来。</li><li>去掉了日志信息、评论数和转到评论区等之前的小图标，页面更加简洁，也调整了其他背景图标的间距。</li><li>其他若干细节：简化日志底部的收藏和订阅链接、更多的运用了css3圆角。。。</li></blockquote></ol><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">已知问题</h2><ol><blockquote><li>评论者名子过长的话（比如Lazyyyyyyyyyyyyyy），时间和ua信息就要挤到一起了。</li><li>两层以上的嵌套问题非常大。。暂时改回两层，不过以前就弄得很乱，无所谓了。</li><li>IE6的显示继续杯具，特别是文字大小。</li><li>Chrome环境下的搜索按钮不显示。</li><li>Opera下底部的top按钮的问题不打算修复了，反正有手势。</li></blockquote></ol><p>累了，以后再折腾吧。</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="WP 文章定时发布 &#038; 继续优化当前主题" href="http://www.a-shun.com/archives/21356.html"> 《WP 文章定时发布 &#038; 继续优化当前主题》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="WP 文章定时发布 &#038; 继续优化当前主题" href="http://www.a-shun.com/archives/21356.html">http://www.a-shun.com/archives/21356.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21356.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21356.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请订阅备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/theme" rel="tag">主题</a> 的文章</h3><ul><li>2010年07月21日  -- <a href="http://www.a-shun.com/archives/21375.html" title="博客主题评论部分修改">博客主题评论部分修改</a> (125)</li><li>2010年07月8日  -- <a href="http://www.a-shun.com/archives/21372.html" title="Wordpress折腾手记 6">Wordpress折腾手记 6</a> (101)</li><li>2010年03月22日  -- <a href="http://www.a-shun.com/archives/21342.html" title="Wordpress折腾手记4  ">Wordpress折腾手记4 </a> (119)</li><li>2010年02月22日  -- <a href="http://www.a-shun.com/archives/21340.html" title="启用新主题zsofa-ova，欢迎围观">启用新主题zsofa-ova，欢迎围观</a> (197)</li><li>2010年02月19日  -- <a href="http://www.a-shun.com/archives/21339.html" title="新年新气象：归来&#038;准备更换主题">新年新气象：归来&#038;准备更换主题</a> (99)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2010年06月9日  -- <a href="http://www.a-shun.com/archives/21363.html" title="启用 Lazy Load jQuery 插件 ">启用 Lazy Load jQuery 插件 </a> (103)</li><li>2010年06月4日  -- <a href="http://www.a-shun.com/archives/21365.html" title="为博客图片添加 Shadowbox 效果">为博客图片添加 Shadowbox 效果</a> (99)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21356.html/feed</wfw:commentRss> <slash:comments>147</slash:comments> </item> <item><title>博客一周年：平淡中的乐趣</title><link>http://www.a-shun.com/archives/21353.html</link> <comments>http://www.a-shun.com/archives/21353.html#comments</comments> <pubDate>Thu, 15 Apr 2010 15:59:41 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[Wordpress]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21353</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a>恍惚之间，A.shun's Blog已经走过了一周年。</p><p>这个始终没有定位的博客也能走过这么长时间。</p><p>这是个很多人已经跨过，也有很多人都达不到的分界线。<br /> 的确有必要稍微说点什么。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21353.html">博客一周年：平淡中的乐趣</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a>恍惚之间，A.shun's Blog已经走过了一周年。</p><p>这个始终没有定位的博客也能走过这么长时间。</p><p>这是个很多人已经跨过，也有很多人都达不到的分界线。<br /> 的确有必要稍微说点什么。<br /> <span id="more-21353"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">持之以恒</h2><p>有人说，拥有一年以上的持续更新才能以Blogger自居。<br /> 因为博客的门槛很低，玩的人很多，但大多数的两三个月就没兴趣或热情了，也就不了了之。</p><p>这一年来，我经历了域名备案、<a href="http://www.a-shun.com/archives/21351.html">域名转移</a>和几次搬家，大大小小的文囧和疲惫，以及周围的一些麻烦事。<br /> 其实这也都是小波澜。主要还是热情的问题。当然，因为生活工作上的各种原因而暂时告别的不算。</p><p><strong>持之以恒，也不是那么困难嘛</strong>。<br /> 尽管我现在写的内容有点偏离初衷，也算一种迷失。当然，这是后话。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">平淡中的乐趣</h2><p>博客可以作为一个知识收集、经验总结的地方，也可以书写心情和各种吐槽。这过程并不无聊，再说了，还可以去其他博客朋友那长见识和围观。</p><p><span style="color: #ff0000;">尽管在赢利方面没有丝毫进展，但无论是自娱自乐还是同好勾搭都能博得精彩。</span><br /> 这，就是价值的体现。</p><p><span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>是不会放弃更新的，热情和寂寞犹在 <img src='http://www.a-shun.com/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> 。<br /> 当然，生活和工作比起博客更加重要，但时间总会有。可以玩消失，但一定会回归。</p><p>继续学习。继续在这个圈子里打扰大家^ ^</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">博客数据</h2><p style="text-align: center;"><a href="http://img.a-shun.com/wp/1year_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/1year_01.jpg" alt="博客评论" width="404" height="263" /></a></p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">日志</h3><p>一年下来也才113篇日志（其中被隐藏5篇），平均3天以上才一篇。这个更新比较低。<br /> 好在也还算是细水长流，没有出现持续的中断。<br /> 往后要尽可能勤快点才行。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">评论</h3><p>这个评论数，乍一看挺壮观。其实并没有那么厉害。</p><ol><blockquote><li>这很大程度上得益于我较低的更新频率，评论也就相对集中。</li><li>经常和朋友们相互到访，偶尔沙发党。较有意义的互动，给予评论是一种鼓励。</li><li>我回复得比较多，较熟的朋友留言或者有些意义的基本都回了，这里面有接近4成是我自己的。</li></blockquote></ol><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">其他</h3><p><span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>数：<a href="http://feeds.feedburner.com/ashun">feedburner</a>和<a href="http://feed.a-shun.com/" target="_blank">Feedsky</a>加起来勉强也到了1000，虽然这个数字不完全可信，不过挺满意。<br /> 访问量不大，其他浮云不提也罢。</p><p>感谢所有订阅者和评论者的支持。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">本博客由<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/wordpress" title="查看 Wordpress 的全部文章" target="_blank">Wordpress</a></span>强力驱动</h2><p>很庆幸，选择了Wordprss作为博客程序。它无所不能，上手简单，又有非常大的折腾空间。<br /> 尽管我还不能说玩转了，但也能体验到折腾带来的个性和成就感。<br /> 当然，最主要的还是众多玩wp的朋友。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">主题 Theme</h3><p style="text-align: center;"><a href="http://img.a-shun.com/wp/1year_02.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/1year_02.jpg" alt="zsofa" width="533" height="320" /></a></p><p>之前一直用着<a href="http://www.neoease.com/inove/" target="_blank">inove</a>，这是一款极其优秀的主题，大家都认识的，就不多做介绍。<br /> 用了10个多月，这也算感情深厚了，不过在新年过后为了打算整个新面貌，也满足一下个性化。</p><p>在<a href="http://zww.me/archives/25056" target="_blank">zSofa</a>的基础上重新折腾，花费了几天时间，总算大功告成。期间zww给予了不少的援助，当然，主题外观上也存在着些许Paled的影子。</p><p>感谢<span class='wp_keywordlink'><a href="http://www.neoease.com/" title="mg12" rel="nofollow" target="_blank">mg12</a></span>和<span class='wp_keywordlink'><a href="http://zww.me/" title="老男人" rel="nofollow" target="_blank">old man</a></span>。感谢<a href="http://wordpress.org/" target="_blank">Wordprss</a>的强力驱动。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">插件 Plugins</h3><p style="text-align: center;"><a href="http://img.a-shun.com/wp/1year_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/1year_03.jpg" alt="wordpress插件" width="328" height="86" /></a></p><p>一开始在yo2没有太多的插件可以选择。刚刚独立的那几天可以说很兴奋的装上各种各样的插件。</p><p>各种各样的功能，基本上使用起来都挺简单，这也算是wp比较容易上手的地方。</p><p>之前也曾晒过<a href="http://www.a-shun.com/archives/21311.html" target="_blank">我使用的wordpress插件</a>。<br /> 不过之后不断调整，很多功能都写到主题里面或者被取代了。现在启用的有13个，还在调整中。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">PS</h2><p>严格上讲，从第一篇日志算起的一周年应该昨天。<br /> 不过那是个沉重的日子，唉，在此默默为青海玉树的灾民祈福。</p><p>欢迎大家在<a href="https://twitter.com/ashunyi" target="_blank">Twitter</a>和<a href="http://t.qq.com/ashunyi" target="_blank">腾讯微薄</a>上Follow我。</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="博客一周年：平淡中的乐趣" href="http://www.a-shun.com/archives/21353.html"> 《博客一周年：平淡中的乐趣》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="博客一周年：平淡中的乐趣" href="http://www.a-shun.com/archives/21353.html">http://www.a-shun.com/archives/21353.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21353.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21353.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请订阅备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/blog" rel="tag">博客手记</a> 的文章</h3><ul><li>2010年03月30日  -- <a href="http://www.a-shun.com/archives/21346.html" title="博客数据备份方案">博客数据备份方案</a> (127)</li><li>2010年03月7日  -- <a href="http://www.a-shun.com/archives/21347.html" title="更换图床：批量替换图片地址">更换图床：批量替换图片地址</a> (145)</li><li>2010年01月8日  -- <a href="http://www.a-shun.com/archives/21328.html" title="追求安稳：博客再一次搬家">追求安稳：博客再一次搬家</a> (170)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2009年10月14日  -- <a href="http://www.a-shun.com/archives/21292.html" title="博客半周年  ">博客半周年 </a> (173)</li><li>2009年08月30日  -- <a href="http://www.a-shun.com/archives/21257.html" title="Wordpress折腾手记2">Wordpress折腾手记2</a> (143)</li><li>2009年08月9日  -- <a href="http://www.a-shun.com/archives/21246.html" title="Wordpress折腾手记1">Wordpress折腾手记1</a> (129)</li><li>2009年08月2日  -- <a href="http://www.a-shun.com/archives/21229.html" title="拥抱Wordpress：搬家完成">拥抱Wordpress：搬家完成</a> (151)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21353.html/feed</wfw:commentRss> <slash:comments>149</slash:comments> </item> <item><title>我的域名转移经验</title><link>http://www.a-shun.com/archives/21351.html</link> <comments>http://www.a-shun.com/archives/21351.html#comments</comments> <pubDate>Sat, 03 Apr 2010 12:29:20 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category><guid isPermaLink="false">http://www.a-shun.com/archives/21351.html</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a></p><p>再一次收到域名代理商的续费通知邮件。</p><p>其实<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>已经将域名转出了有段时间了。所以无需理会这个。</p><p>但也趁此机会分享一下<strong>域名转移到国外</strong>的经验。 回忆一下这并不算是太复杂的转移过程。</p><p>尽管我没这么折腾域名，但每个Blogger关于域名的理解和故事都可以写一大堆了。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21351.html">我的域名转移经验</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a></p><p>再一次收到域名代理商的续费通知邮件。</p><p>其实<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>已经将域名转出了有段时间了。所以无需理会这个。</p><p>但也趁此机会分享一下<strong>域名转移到国外</strong>的经验。 回忆一下这并不算是太复杂的转移过程。</p><p>尽管我没这么折腾域名，但每个Blogger关于域名的理解和故事都可以写一大堆了。<br /> <span id="more-21351"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">域名注册经历</h2><p>最开始对这些都不了解。稀里糊涂的选择了国内注册。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/transfer_domain_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/transfer_domain_01.jpg" alt="域名续费" width="377" height="105" /></a></p><p>其实这是我的第二个域名。<br /> 最开始注册了一块钱的.cn拿来玩的。开始写博客还是要靠谱的。</p><p>当时选择的是新网的代理商美橙互联，原因是比直接在域名注册商那里要便宜，而且续费和注册是一样的价钱，不像.cn的陷阱。管理后台也算是整洁。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">国内不是域名的久留之地</h2><p>尽管使用新网解析的接近9个月时间里，总的来说算稳定。<br /> 但国内不是域名的久留之地。</p><p>首先，域名的管理功能比较弱，一些功能甚至不让你随便使用，包括url转发。<br /> 还有，国内的注册商不会让你轻易转移域名。注册密码不像国外的注册商那样随便可以拿到，而是要邮寄申请表和身份证复印件，然后是漫长的等待。据说以前在万网能转出域名就堪称传奇了。</p><p>最重要的当然还是安全问题。<br /> 要知道，在去年的一次<a href="http://www.a-shun.com/archives/21317.html">反低俗行动</a>中。无数域名都被停止解析、无数idc被关停。<br /> 在那之后，使用国内主机不备案已经是不可能了。备案相当麻烦。关键是我们不知道这个“低俗”的标准是什么？也就是说随时能拿你开刀。</p><p>还是那句话：如果你的博客在国内，手续不全或者不够禾口言皆的话。那么，<span style="color: #ff0000;">要有把每天都当成博客（或网站）最后一天的觉悟</span>。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">域名转移到国外</h2><p>既然国内的不考虑。那么国外也要选择一家好的域名注册商。当然推荐Godaddy和Name.com。</p><ol><blockquote><li>Godaddy是世界上最大的域名注册商， 价格便宜，还有<span style="color: #008000;">大量的优惠码</span>，还<span style="color: #008000;">支持支付宝</span>，也可以使用gift card。要说有什么缺点呢，那就是后台比较混乱。</li><li>Name.com界面清爽，价格相比Godaddy稍贵。但<span style="color: #008000;">可免费隐藏whois信息</span>，你不知道我是谁，嘿嘿。</li></blockquote></ol><p>不懂英文不要紧，网上教程多得是，我们还有翻译工具，还可以请朋友帮忙。这里要感谢<a href="http://vicia.me/" target="_blank">小屏幕星人</a>。<br /> 以后就算被墙了，还可以翻过去做解析，比起直接被莫名其妙的停止安全多了。</p><p>我选的是Name.com。当然把域名转移到Godaddy也是不错的选择。这个看个人喜好吧。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">域名转移的一些说明</h3><ol><blockquote><li><span style="color: #ff0000;">域名转出不会影响到当前的解析</span>。这点可以放心。</li><li><span style="color: #ff0000;">域名转出和转入并不需要付出额外的费用</span>（除了快递），转入费用会自动给你续费一年，有效期还是根据原注册时间再继续顺延的，这个价钱甚至比直接续费还要便宜。</li></blockquote></ol><p>so，有想要转移的同学就赶快动手吧</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">域名转移流程</h2><p>如果你是国际域名，那么转移其实没有那么复杂。我没有.cn的转移经验。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">一.确认转移条件</h3><ol><blockquote><li>域名注册或续费时间超过60天</li><li> 域名到期前15天（有的地方是30天）</li></blockquote></ol><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">二.索取域名转移密码</h3><p>建议先与客服联系，询问具体的步骤。</p><p>通常情况下是这样的。<br /> 2.根据域名注册商的不同，下载对应的转出申请表，填写详细信息（公司加盖公章、个人手写签名）。<br /> 3.提供域名所有人证明资料，个人仅需身份证复印件（正反两面）加手写签字。<br /> 4.邮寄申请表和个人证明到注册商或者代理商，尽可能选择快递（可以问客服是否接受传真）。</p><p>然后就是等待了。<br /> 通常他们收到后5个工作日内会给你的域名解锁，并把转移密码发送到你的邮箱，要注意查看。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">三.转入Name.com</h3><p>这里以name.con为例.</p><ol><blockquote><li> 填写：登陆后，在下方的Domain Names，进入<span style="color: #ff0000;">Transfer Domain Names</span>。填写域名和转移密码。</li><li>付费：使用信用卡或者paypal，支付费用。</li><li>认领：随后新的注册商会给你的域名注册邮箱发送确认邮件。里面包含有个url带了转移ID和安全码，直接点击即可。</li></blockquote><p style="text-align: center;"><a href="http://img.a-shun.com/wp/transfer_domain_02.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/transfer_domain_02.jpg" alt="域名转移" width="356" height="129" /></a></p></ol><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">四.等待</h3><p>完成上面三部之后就没什么事情了，需要的还是等待。<br /> 可以进入<a href="https://www.name.com/transfers_in/view.php" target="_blank">https://www.name.com/transfers_in/view.php</a>查看进度。现在一般是4/6。<br /> 接下来这一步其实是转入商就要联系你的原域名注册商，如果同意，才开始转移。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/transfer_domain_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/transfer_domain_03.jpg" alt="域名转移进度" width="367" height="34" /></a></p><p>但国内的注册商素质大多就那个样子，他们通常会觉得没必要回复。<span style="color: #ff0000;">如果规定时间内（通常是五天)不拒绝的话就意味着默认批准转移。</span></p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">五.完成</h3><p>通常要等5天就算默认批准。再查看进度。已经转移好了。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/transfer_domain_04.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/transfer_domain_04.jpg" alt="域名转移流程" width="365" height="34" /></a></p><p>进入域名设置，按照提示修改Name Servers，然后重新解析即可。</p><p><span style="color: #008000;">整个域名转移时间不到2周</span>。</p><p>最后，即使你将域名转出了，国内的注册商依然会按照时间通知你进行续费。无视之～</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="我的域名转移经验" href="http://www.a-shun.com/archives/21351.html"> 《我的域名转移经验》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="我的域名转移经验" href="http://www.a-shun.com/archives/21351.html">http://www.a-shun.com/archives/21351.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21351.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21351.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/blog" rel="tag">博客手记</a> 的文章</h3><ul><li>2010年04月15日  -- <a href="http://www.a-shun.com/archives/21353.html" title="博客一周年：平淡中的乐趣">博客一周年：平淡中的乐趣</a> (149)</li><li>2010年03月30日  -- <a href="http://www.a-shun.com/archives/21346.html" title="博客数据备份方案">博客数据备份方案</a> (127)</li><li>2010年03月7日  -- <a href="http://www.a-shun.com/archives/21347.html" title="更换图床：批量替换图片地址">更换图床：批量替换图片地址</a> (145)</li><li>2010年01月8日  -- <a href="http://www.a-shun.com/archives/21328.html" title="追求安稳：博客再一次搬家">追求安稳：博客再一次搬家</a> (170)</li><li>2009年12月31日  -- <a href="http://www.a-shun.com/archives/21325.html" title="即将远去的2009">即将远去的2009</a> (102)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2009年10月15日  -- <a href="http://www.a-shun.com/archives/21294.html" title="写酷评，赢酷礼活动！">写酷评，赢酷礼活动！</a> (109)</li><li>2009年10月14日  -- <a href="http://www.a-shun.com/archives/21292.html" title="博客半周年  ">博客半周年 </a> (173)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21351.html/feed</wfw:commentRss> <slash:comments>152</slash:comments> </item> <item><title>博客数据备份方案</title><link>http://www.a-shun.com/archives/21346.html</link> <comments>http://www.a-shun.com/archives/21346.html#comments</comments> <pubDate>Mon, 29 Mar 2010 17:45:30 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[同步]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21346</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a>数据的备份是非常重要的，无论是本地的资料还是服务器上的数据，这无需在再强调。</p><p>对于Blogger来说，基本都很重视这个。我们没有必要去相信那些通用的博客备份软件，只需要简单的备份数据库和一些目录即可。</p><p>每个人都有不同的考虑和不同的方法。可以拿出来探讨下。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21346.html">博客数据备份方案</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/blog"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/blog.gif" alt="Blog" /></a>数据的备份是非常重要的，无论是本地的资料还是服务器上的数据，这无需在再强调。</p><p>对于Blogger来说，基本都很重视这个。我们没有必要去相信那些通用的博客备份软件，只需要简单的备份数据库和一些目录即可。</p><p>每个人都有不同的考虑和不同的方法。可以拿出来探讨下。<br /> <span id="more-21346"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">数据库备份</h2><p>对于博客来说，数据库无疑最重要的，日志和评论丢了是很难找回来的。</p><p>相信大家都安装了wp数据库备份插件吧。<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>推荐<span style="color: #008000;">使用的是WordPress Database Backup插件来进行数据库备份</span>，操作简单，功能强大。<br /> 支持备份到服务器、本地、邮箱，支持自动备份和自定义备份频率。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/blog_backup_01.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/blog_backup_01.jpg" alt="wordpress数据库备份插件" width="448" height="281" /></a></p><p>建议设置定时备份到email。我们可以<a href="http://www.a-shun.com/archives/21327.html">在Gmail建立一个过滤器</a>和标签来接收此类邮件，自动存档。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/blog_backup_02.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/blog_backup_02.jpg" alt="Gmail过滤器标签" width="390" height="190" /></a></p><p>总之，保障安全又省去了操作phpmyadmin的体力活。当然，搬家或者有重大调整的时候要检查插件是否正常工作。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">博客程序文件夹和图片的备份</h2><p>这部分相对来说没那么重要。毕竟：程序、插件可以重新安装和设置、主题可以重新修改，图片也可以补充。<br /> 但是为了避免不必要的麻烦，我还是选择不定期对进行备份。</p><p>以前我是这么做的是，进入控制面板的文件管理器，打包整个文件夹（有SSH的话也很方便），然后整个文件夹下载到本地。<br /> 但要注意到是把备份放在服务器根目录或常用可访问目录是危险的事情，不信你看看站点的请求日志。所以下载完要尽快删除。</p><p>由于我们没有自己的vps，不能通过脚本什么来自动备份，能备份文件夹的插件效果又不理想。<br /> so，现在我比较习惯使用<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/syn" title="查看 同步 的全部文章" target="_blank">同步</a></span>软件类进行备份。</p><p>虽然还称不上太好的方案。但只需稍微折腾，然后设定一个<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/syn" title="查看 同步 的全部文章" target="_blank">同步</a></span>周期即可。而且可以<span style="color: #008000;">减少传输量，这就意味着节省时间和流量</span>。</p><p>通常，备份wp-content和图片目录即可。之前<a href="http://www.a-shun.com/archives/21347.html">更换图床</a>，把图片搬到自己的空间，就是除了便于管理和稳定之外，也是为这方面做准备。</p><p>A.shun选择的是Allway Sync，以前介绍<a href="http://www.a-shun.com/archives/21347.html">同步软件</a>时说过。支持FTP同步、多向多任务、支持过滤器以及多种规则设置。（免费版本每月可进行40000个文件的同步）<br /> 其实GoodSync也不错，还支持sftp协议，但是试用期过后支持的数量较少。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/blog_backup_03.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/blog_backup_03.jpg" alt="博客数据同步备份工具" width="603" height="417" /></a></p><p>步骤:</p><ol><blockquote><li> 先下载了需要备份的文件夹压缩包，解压到本地目录。</li><li>在同步工具中新建任务，设置好本地的文件夹和配置ftp，设好同步方向。</li><li>修改过滤器，<span style="color: #008000;">将不必要的文件排除出去</span>，比如说一些缓存文件或者缩略图之类的。</li><li>修改同步规则，遇到什么情况是忽略还是询问。</li><li>新建同步计划，可设定间隔或者新建“任务计划”等。</li></blockquote></ol><p>当然，<span style="color: #ff0000;">肯定有比这更好地选择</span>，只是反正我干别的也需要同步软件，懒得去多开一个程序，就暂且用着。</p><p>往后继续发掘更好地方法。</p><p>我这几天就要搬家了，如果现实中也有同步工具该多好哇。o(╯□╰)o</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="博客数据备份方案" href="http://www.a-shun.com/archives/21346.html"> 《博客数据备份方案》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="博客数据备份方案" href="http://www.a-shun.com/archives/21346.html">http://www.a-shun.com/archives/21346.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21346.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21346.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/blog" rel="tag">博客手记</a>, <a href="http://www.a-shun.com/archives/tag/syn" rel="tag">同步</a> 的文章</h3><ul><li>2010年04月15日  -- <a href="http://www.a-shun.com/archives/21353.html" title="博客一周年：平淡中的乐趣">博客一周年：平淡中的乐趣</a> (149)</li><li>2010年03月7日  -- <a href="http://www.a-shun.com/archives/21347.html" title="更换图床：批量替换图片地址">更换图床：批量替换图片地址</a> (145)</li><li>2010年01月8日  -- <a href="http://www.a-shun.com/archives/21328.html" title="追求安稳：博客再一次搬家">追求安稳：博客再一次搬家</a> (170)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2009年10月14日  -- <a href="http://www.a-shun.com/archives/21292.html" title="博客半周年  ">博客半周年 </a> (173)</li><li>2009年08月30日  -- <a href="http://www.a-shun.com/archives/21257.html" title="Wordpress折腾手记2">Wordpress折腾手记2</a> (143)</li><li>2009年08月9日  -- <a href="http://www.a-shun.com/archives/21246.html" title="Wordpress折腾手记1">Wordpress折腾手记1</a> (129)</li><li>2009年08月2日  -- <a href="http://www.a-shun.com/archives/21229.html" title="拥抱Wordpress：搬家完成">拥抱Wordpress：搬家完成</a> (151)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21346.html/feed</wfw:commentRss> <slash:comments>127</slash:comments> </item> <item><title>Wordpress折腾手记4</title><link>http://www.a-shun.com/archives/21342.html</link> <comments>http://www.a-shun.com/archives/21342.html#comments</comments> <pubDate>Sun, 21 Mar 2010 18:38:17 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[主题]]></category><guid isPermaLink="false">http://www.a-shun.com/?p=21342</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>自从更换了新主题<a href="http://www.a-shun.com/archives/21340.html">zsofa-ova</a>以来，就没再怎么折腾了。然而存在的问题依然很多。</p><p>趁这几天比较有空，对其进行一些细节的修改。</p><p>这次算是小折腾，以后要继续完善才行。</p><p>继续发扬<span style="color: #ff0000;">折腾永无止境</span>的精神。。。<br /> [......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21342.html">Wordpress折腾手记4</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>自从更换了新主题<a href="http://www.a-shun.com/archives/21340.html">zsofa-ova</a>以来，就没再怎么折腾了。然而存在的问题依然很多。</p><p>趁这几天比较有空，对其进行一些细节的修改。</p><p>这次算是小折腾，以后要继续完善才行。</p><p>继续发扬<span style="color: #ff0000;">折腾永无止境</span>的精神。。。<br /> <span id="more-21342"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">样式调整</h2><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt4_1.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt4_1.jpg" alt="Rss下拉菜单" width="202" height="139" /></a></p><ol><blockquote><li><span style="color: #008000;">添加了Rss<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>下滑菜单</span>，提供几个常见阅读器的一键订阅。<br /> 渐变下拉菜单的实现方法见<a href="http://zww.me/archives/25105" target="_blank">old man</a>的这篇文章，需要jQuery支持，图片是从以前inove弄出来的。</li><li>去掉了twitter的输出。之前那链接格式不规范，再说我推得也不多。换成一小个按钮了。并加上去了“随便看看”和“wap”两个按钮。</li><li>稍微调整了导航栏，调整侧栏标题样式，特别是那个tab</li><li>替换了部分小图标，修改了前后文章的链接样式，以及其他若干细节</li><li>原来的-moz-border-radius和-webkit-border-radius替换为更加标准的border-radius，能通过Css3验证。</li></blockquote></ol><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">添加了博客的wap版本</h2><p>个人觉得wap版本是有存在意义的。</p><p>还是用少量朋友使用手机访问的。而且碰到我自己网速杯具的时候还可以凑合下。</p><p><span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>使用的是<span style="color: #008000;">WP-T-WAP</span>。<br /> 国人原创插件，设置方便。除了正常的浏览，还支持评论，文章、评论编辑，还有相关日志等。。功能很强大的说。</p><p>大家可以点导航栏靠右侧的按钮浏览。或者直接访问<a href="http://wap.a-shun.com/">wap.a-shun.com</a></p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_zt4_wap.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_zt4_wap.jpg" alt="博客wap站点" width="218" height="644" /></a></p><p>下载地址：<a href="http://wordpress.org/extend/plugins/wp-t-wap/" target="_blank">http://wordpress.org/extend/plugins/wp-t-wap/</a></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;"><span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/theme" title="查看 主题 的全部文章" target="_blank">主题</a></span>存在的问题</h2><ol><blockquote><li>缓存插件的存在导致了“随便逛逛”在缓存过期之前（5分钟）会跳转到同一篇日志。</li><li>FF3.5.x和IE，搜索框依然有些许错位。但在3.6和3.7中表现完好，看来新版更为规范，也就不折腾了。</li><li>Opera环境下底部的top按钮依然有问题，不过非IE用户基本上不需要那个功能，暂且搁置。</li><li>换回border-radius后，FF和Safari下无法显示圆角，杯具的标准。更杯具的是FF3.7a也是一样，唉，还是把-moz-border-radius暂时加回去。</li><li>IE6环境下比以前更乱了。。。不管</li></blockquote></ol><p>看来折腾之路任重道远～</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="Wordpress折腾手记4" href="http://www.a-shun.com/archives/21342.html"> 《Wordpress折腾手记4》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="Wordpress折腾手记4" href="http://www.a-shun.com/archives/21342.html">http://www.a-shun.com/archives/21342.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21342.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21342.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请订阅备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/plugins" rel="tag">plugins</a>, <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/theme" rel="tag">主题</a> 的文章</h3><ul><li>2010年07月21日  -- <a href="http://www.a-shun.com/archives/21375.html" title="博客主题评论部分修改">博客主题评论部分修改</a> (125)</li><li>2010年07月8日  -- <a href="http://www.a-shun.com/archives/21372.html" title="Wordpress折腾手记 6">Wordpress折腾手记 6</a> (101)</li><li>2010年06月4日  -- <a href="http://www.a-shun.com/archives/21365.html" title="为博客图片添加 Shadowbox 效果">为博客图片添加 Shadowbox 效果</a> (99)</li><li>2010年04月27日  -- <a href="http://www.a-shun.com/archives/21356.html" title="WP 文章定时发布 &#038; 继续优化当前主题">WP 文章定时发布 &#038; 继续优化当前主题</a> (147)</li><li>2010年02月22日  -- <a href="http://www.a-shun.com/archives/21340.html" title="启用新主题zsofa-ova，欢迎围观">启用新主题zsofa-ova，欢迎围观</a> (197)</li><li>2010年02月19日  -- <a href="http://www.a-shun.com/archives/21339.html" title="新年新气象：归来&#038;准备更换主题">新年新气象：归来&#038;准备更换主题</a> (99)</li><li>2010年01月10日  -- <a href="http://www.a-shun.com/archives/21329.html" title="WP-UserAgent：评论者信息显示插件">WP-UserAgent：评论者信息显示插件</a> (224)</li><li>2009年11月22日  -- <a href="http://www.a-shun.com/archives/21311.html" title="我使用的Wordpress插件">我使用的Wordpress插件</a> (172)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21342.html/feed</wfw:commentRss> <slash:comments>119</slash:comments> </item> <item><title>更换图床：批量替换图片地址</title><link>http://www.a-shun.com/archives/21347.html</link> <comments>http://www.a-shun.com/archives/21347.html#comments</comments> <pubDate>Sat, 06 Mar 2010 17:36:51 +0000</pubDate> <dc:creator>A.shun</dc:creator> <category><![CDATA[博客手记]]></category> <category><![CDATA[效率提升]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[效率]]></category> <category><![CDATA[相册]]></category><guid isPermaLink="false">http://www.a-shun.com/archives/21347.html</guid> <description><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>最近很忙，通常晚上才很上线。<br /> 却感觉网络质量很糟糕了，特别是高峰期访问国外的服务器，那真是让人受不了。</p><p>趁着这会空闲，把图片转移到国内的服务器。</p><p>正好文囧，就扯谈下<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>的图片迁徙之路和批量替换图片地址的简单方法，还有博客图床选择的注意事项。</p><p>[......]</p><p class="read-more">继续阅读：<a href="http://www.a-shun.com/archives/21347.html">更换图床：批量替换图片地址</a></p>]]></description> <content:encoded><![CDATA[<p><a href="http://www.a-shun.com/archives/tag/wordpress"><img style="float: right;" src="http://www.a-shun.com/wp-content/uploads/wp.gif" alt="Wordpress" /></a>最近很忙，通常晚上才很上线。<br /> 却感觉网络质量很糟糕了，特别是高峰期访问国外的服务器，那真是让人受不了。</p><p>趁着这会空闲，把图片转移到国内的服务器。</p><p>正好文囧，就扯谈下<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/" title="A.shun" rel="nofollow" target="_blank">A.shun</a></span>的图片迁徙之路和批量替换图片地址的简单方法，还有博客图床选择的注意事项。</p><p><span id="more-21347"></span></p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">图片迁徙之路</h2><p>临时性的不谈，就说作为博客的外链图床。</p><p>之前在<a href="http://www.a-shun.com/archives/21207.html" target="_blank">yo2</a>，它提供xml的导出服务。（虽然oneoo可以帮我们把图片弄出来）<br /> 想到总有一天要搬出，自然用图床是最好的选择。</p><p>Picasa被墙了，Flickr那段时间有被墙的风险，访问速度也不佳。Yupoo又是带广告又是限制多，<br /> 所以最开始用的来吧<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/album" title="查看 相册 的全部文章" target="_blank">相册</a></span>和几个不知名的<span class='wp_keywordlink_affiliate'><a href="http://www.a-shun.com/archives/tag/album" title="查看 相册 的全部文章" target="_blank">相册</a></span>，用没多久都相继砍了外链或者干脆关闭了。<br /> 这也就下决心不用国内的同类服务了。</p><p>等到<a href="http://www.a-shun.com/archives/21229.html" target="_blank">博客独立</a>之后就把图片转移到自己的服务器上。那个时候还是用人肉的方法，还好数量不多- -。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">外链相册的选择</h2><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">图片和博客共存亡</h3><p>我还是<span style="color: #008000;">建议大家把图片放在自己空间里</span>。</p><p>原因有三：</p><ol><blockquote><li> 稳定，<span style="color: #008000;">和博客共存亡</span>。</li><li> <span style="color: #008000;">便于管理和更新</span>。</li><li> 可以适当的设置防盗链。</li></blockquote></ol><p>当然，这些都<span style="color: #ff0000;">建立在流量够用的情况下</span>。<br /> 事实上这种情况大概持续了2个多月，流量开始吃紧。（之前的主机流量太小了- -）</p><p>于是新日志开始启用<a href="http://photobucket.com/" target="_blank">Photobucket</a>作为图床。</p><h3 style="font-size: 13px; border-left: 5px solid #CCC; margin-bottom: 8px;">photobucket的优点</h3><ol><blockquote><li>免费、稳定、空间大、流量足。</li><li> 直接获取固定地址，而不是像一些服务之提供带链接或广告的代码</li><li> <span style="color: #008000;">支持批量上传</span>，可以通过Ctrl和Shift来批量选择</li><li> <span style="color: #008000;">不改变文件名</span>，这点非常重要</li></blockquote></ol><p>1和2自然不必说。后面两点就是我选择图片服务器的主要原则。</p><h2 style="background: #E3E4E6; font-size: 14px; border-bottom: 1px solid #CCC; border-left: 5px solid #CCC; padding-top: 3px; padding-bottom: 2px;">批量替换图片地址</h2><p>now，因为文章前面说的原因。<br /> 我把图片放回来之前的国内空间，并启用了img.a-shun.com的二级域名。</p><p>之前无论是自己的空间还是photobucket，它们都不会改变我的图片文件名。so，这回就方便了，用数据库批量替换技巧即可。</p><p>我的图片本地都有备份，photobucket上的则放在一个子文件夹中。直接带着目录结构打包上传，解压，绑定域名。</p><p>然后在使用phpmyadmin，进入博客的数据库，运行以下代码：</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">UPDATE wp_posts SET post_content = REPLACE( post_content, 'http://s916.photobucket.com/albums/ad1/ashunyi/', 'http://www.a-shun.com/img/photobucket/') ;
UPDATE wp_posts SET post_content = REPLACE( post_content, 'http://www.a-shun.com/img/', 'http://img.a-shun.com/') ;</pre><p>这样就大功告成了。</p><p style="text-align: center;"><a href="http://img.a-shun.com/wp/wp_album.jpg"  rel="shadowbox"><img class="aligncenter" src="http://img.a-shun.com/wp/wp_album.jpg" alt="批量替换图片地址" width="554" height="97" /></a></p><p>语法很简单：</p><pre style="width: 90%; color: #777; background-color: #f8f8f8; overflow: auto; padding: 10px; margin: 10px 10px 10px; border: 1px solid #e7e5dc; border-left: 3px solid #6ce26c;">UPDATE 表名 SET 字段名 = REPLACE( 字段名, '要替换的内容', '替换后的内容')</pre><p>这种方法同样也适合用来替换其他链接和文字。我们还可以用<a href="http://www.a-shun.com/archives/19661.html">同步软件</a>来让本地和服务器保持同步。</p><p>如果你的本地文件名和上传后的不同，那么就要逐个从相册下载再上传，还要去寻找url的规律，那会很头痛的。</p><p style='background-color:#f4f5f7;'>&raquo; 转载请注明来源：<a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> &raquo; <a rel="bookmark" title="更换图床：批量替换图片地址" href="http://www.a-shun.com/archives/21347.html"> 《更换图床：批量替换图片地址》</a><br />&raquo; 本文链接地址：<a rel="bookmark" title="更换图床：批量替换图片地址" href="http://www.a-shun.com/archives/21347.html">http://www.a-shun.com/archives/21347.html</a></p><p style='border-top:3px solid #CCC;'>© A.shun for <a title="A.shun&#039;s Blog" href="http://www.a-shun.com">A.shun&#039;s Blog</a> 2009-2010 | <a rel="bookmark" href="http://www.a-shun.com/archives/21347.html#respond">发表评论 </a> | <a rel="bookmark" href="http://www.a-shun.com/archives/21347.html#comments">阅读评论 </a> | <a href="https://twitter.com/ashunyi"> Twitter</a><br />该Feed只供个人阅读，转载请保留链接，不得用于商业目的。 | 0b509d655a529f3b7820d7fb7e63fb0e<br />由于 Feedburner 已经被屏蔽，国内阅读器请<span class='wp_keywordlink_affiliate'><a href="http://feeds2.feedburner.com/ashun" title="订阅" rel="nofollow" target="_blank">订阅</a></span>备用的RSS <a href="http://feed.a-shun.com/">feed.a-shun.com</a><br /><span style="color: #ff0000;">小站广告位出售中，欢迎咨询，<a href="http://www.a-shun.com/sponsor">查看详情</a></span>。</p><div id='related_posts'><h3>还有更多关于 <a href="http://www.a-shun.com/archives/tag/wordpress" rel="tag">Wordpress</a>, <a href="http://www.a-shun.com/archives/tag/blog" rel="tag">博客手记</a>, <a href="http://www.a-shun.com/archives/tag/xl" rel="tag">效率</a>, <a href="http://www.a-shun.com/archives/tag/album" rel="tag">相册</a> 的文章</h3><ul><li>2010年04月15日  -- <a href="http://www.a-shun.com/archives/21353.html" title="博客一周年：平淡中的乐趣">博客一周年：平淡中的乐趣</a> (149)</li><li>2010年03月30日  -- <a href="http://www.a-shun.com/archives/21346.html" title="博客数据备份方案">博客数据备份方案</a> (127)</li><li>2010年01月8日  -- <a href="http://www.a-shun.com/archives/21328.html" title="追求安稳：博客再一次搬家">追求安稳：博客再一次搬家</a> (170)</li><li>2009年11月1日  -- <a href="http://www.a-shun.com/archives/21300.html" title="Wordpress折腾手记3">Wordpress折腾手记3</a> (185)</li><li>2009年10月14日  -- <a href="http://www.a-shun.com/archives/21292.html" title="博客半周年  ">博客半周年 </a> (173)</li><li>2009年08月30日  -- <a href="http://www.a-shun.com/archives/21257.html" title="Wordpress折腾手记2">Wordpress折腾手记2</a> (143)</li><li>2009年08月9日  -- <a href="http://www.a-shun.com/archives/21246.html" title="Wordpress折腾手记1">Wordpress折腾手记1</a> (129)</li><li>2009年08月2日  -- <a href="http://www.a-shun.com/archives/21229.html" title="拥抱Wordpress：搬家完成">拥抱Wordpress：搬家完成</a> (151)</li></ul></div>]]></content:encoded> <wfw:commentRss>http://www.a-shun.com/archives/21347.html/feed</wfw:commentRss> <slash:comments>145</slash:comments> </item> </channel> </rss>