<?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>Alan&#039;s World &#187; Wordpress</title>
	<atom:link href="http://www.alanoy.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alanoy.com</link>
	<description></description>
	<lastBuildDate>Sun, 25 Dec 2011 09:55:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Theme: Optimus+</title>
		<link>http://www.alanoy.com/theme-optimus-plus/</link>
		<comments>http://www.alanoy.com/theme-optimus-plus/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 08:19:29 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Optimus+]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=396</guid>
		<description><![CDATA[上次更新 Blog 是 3/22，居然有 4 个月没新文章，有时要写点啥，但是想想又放下了。是现在 SNS 太流行？还是自己太懒？坚持写 Blog 太不容易了，有时也会想写 Blog 到底为了啥，甚至又动了想废掉的念头，但想回来，都存在几年了，就让他这么下去呗，偶尔还能冒下泡，也好吧。 前阵子已经把 aSide 换成 touch5 了，然后在 tumblr 使用 Jamie Bicknell 设计的 Optimus，感觉不错，于是抽空就弄到 WordPress 上来了。 Optimus+ 纯 CSS 简洁型主题，没有用到图片，在 tumblr Optimus 的基础上增加类 google bar；同时主题也没什么功能，仅仅是展示文章与评论，适用于轻博客类型的站点；或者用在 WordPress 上可能有点蛋疼，考虑是否弄个到 Typecho 上；也在考虑是否增加显示最新文章、最新评论等这几个 WordPress 博客常用的展示内容；Optimus+ 是不支持 IE6 的，呼吁使用 IE6 的童鞋升级一下你们的浏览器。Optimus+ 是在 wordpress 3.2 的基础上开发的，所以不知 3.2 以下版本能否使用。 最后，还是那句话，有问题或 Bug 欢迎反馈，Thx! 2011-7-26 [...]]]></description>
			<content:encoded><![CDATA[<p>上次更新 Blog 是 3/22，居然有 4 个月没新文章，有时要写点啥，但是想想又放下了。是现在 SNS 太流行？还是自己太懒？坚持写 Blog 太不容易了，有时也会想写 Blog 到底为了啥，甚至又动了想废掉的念头，但想回来，都存在几年了，就让他这么下去呗，偶尔还能冒下泡，也好吧。<span id="more-396"></span></p>
<p>前阵子已经把 aSide 换成 touch5 了，然后在 tumblr 使用 <a href="http://jamiebicknell.tumblr.com/" title="Jamie Bicknell" rel="external nofollow">Jamie Bicknell</a> 设计的 <a href="http://alanoy.tumblr.com/" title="Optimus" rel="external nofollow">Optimus</a>，感觉不错，于是抽空就弄到 WordPress 上来了。</p>
<p><img src="http://www.alanoy.com/wp-content/uploads/2011/07/optimusPlus.png" alt="Optimus+ Screenshot" title="Optimus+" width="500" height="180" class="alignnone size-full wp-image-397" /></p>
<p>Optimus+ 纯 CSS 简洁型主题，没有用到图片，在 tumblr Optimus 的基础上增加类 google bar；同时主题也没什么功能，仅仅是展示文章与评论，适用于轻博客类型的站点；或者用在 WordPress 上可能有点蛋疼，考虑是否弄个到 Typecho 上；也在考虑是否增加显示最新文章、最新评论等这几个 WordPress 博客常用的展示内容；Optimus+ 是不支持 IE6 的，呼吁使用 IE6 的童鞋升级一下你们的浏览器。Optimus+ 是在 wordpress 3.2 的基础上开发的，所以不知 3.2 以下版本能否使用。</p>
<p>最后，还是那句话，有问题或 Bug 欢迎反馈，Thx! <strong style="color:red">2011-7-26 更新</strong>：<a href="http://www.alanoy.com/changelog/optimusplus-changelog.html" title="Optimus+ changelog" rel="nofollow">Changelog</a></p>
<p>Optimus+ 演示：<a href="http://www.alanoy.com/?theme=optimus%2B&#038;passkey=8993360444c6f9714c842a" rel="nofollow" title="Demo">Live Demo</a></p>
<p class="download"><a href='http://www.alanoy.com/wp-content/uploads/2011/07/optimusPlus.zip' title="Download Optimus+">Download Optimus+</a></p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/jquery-hide-the-comment-author-info/" title="jQuery 隐藏老用户评论资料框">jQuery 隐藏老用户评论资料框</a> (20)</li><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li><li><a href="http://www.alanoy.com/about-new-darklight-theme/" title="关于 DarkLight 主题新版本的开发">关于 DarkLight 主题新版本的开发</a> (18)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2011. |
<a href="http://www.alanoy.com/theme-optimus-plus/">Permalink</a> |
<a href="http://www.alanoy.com/theme-optimus-plus/#comments">53 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/theme-optimus-plus/&title=WordPress Theme: Optimus+">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/theme-optimus-plus/&title=WordPress Theme: Optimus+" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/theme-optimus-plus/&title=WordPress Theme: Optimus+" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/theme-optimus-plus/&title=WordPress Theme: Optimus+" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/theme-optimus-plus/&title=WordPress Theme: Optimus+" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/optimus/" rel="tag">Optimus+</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/theme-optimus-plus/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>WordPress 主题 aSide 出售</title>
		<link>http://www.alanoy.com/aside-for-sale/</link>
		<comments>http://www.alanoy.com/aside-for-sale/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 10:53:34 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[aSide]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=374</guid>
		<description><![CDATA[本来 aSide 是私用的，一些朋友表示要购买，于是抽空整理了一下，现在放出来出售，第一次公开出售主题，希望大家多支持。 aSide 支持 WordPress 3.0+，在各大浏览器上均能正常显示，且外观基本一致。现出售，仅限 15 份，每份 RMB 88 元，点此淘宝购买，或联系我购买也行。 主题简述：aSide 本来是私用主题，有几位朋友很想要购买，故拿出来出售了。凡购买使用者，请保留页脚作者信息；请勿与他人共享使用，谢谢合作！ 主题说明 1. aSide 支持自定义菜单，只支持二级导航栏；支持 Widget，要注意的是，使用 Widget 后，显示效果不能达到某些效果，你可以自己体验下。 上图中就是 Logo 的样式以及二级菜单样式。 2. aSide 已经全面中文化，如不需中文化的，请把 language 文件夹删除即可。 3. 支持嵌套评论，建议最多选 5 层吧。 4. 内嵌回复邮件通知；内嵌文章分页；没有使用评论分页，而是使用 jQuery 判断，当评论超过 36 条时，自动隐藏旧评论，仅显示第 36 条以后的评论内容。 5. 内附 Links 模板，如需建立链接页面，则可使用此模板。 6. 自带“分享栏”。 7. jQuery 点击锚点滚动效果。 8. Lazyload 加载图片。 9. 自动隐藏留言访客资料框。 [...]]]></description>
			<content:encoded><![CDATA[<p>本来 aSide 是私用的，一些朋友表示要购买，于是抽空整理了一下，现在放出来出售，第一次公开出售主题，希望大家多支持。</p>
<p>aSide 支持 WordPress 3.0+，在各大浏览器上均能正常显示，且外观基本一致。现出售，<strong>仅限 15 份</strong>，每份 RMB 88 元，<del datetime="2011-07-14T14:49:21+00:00">点此淘宝购买，或联系我购买也行</del>。<span id="more-374"></span></p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/aside.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/aside.png" alt="Wordpress 主题 aSide" title="Wordpress 主题 aSide" width="580" height="474" class="alignnone size-full wp-image-375" /></a></p>
<p><strong>主题简述</strong>：aSide 本来是私用主题，有几位朋友很想要购买，故拿出来出售了。凡购买使用者，请保留页脚作者信息；请勿与他人共享使用，谢谢合作！</p>
<h3>主题说明</h3>
<p><span class="number">1.</span> aSide 支持自定义菜单，只支持二级导航栏；支持 Widget，要注意的是，使用 Widget 后，显示效果不能达到某些效果，你可以自己体验下。 </p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/aside-logo-and-menu.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/aside-logo-and-menu.png" alt="Logo and Menu" title="Logo and Menu" width="580" height="209" class="alignnone size-full wp-image-376" /></a></p>
<p>上图中就是 Logo 的样式以及二级菜单样式。</p>
<p><span class="number">2.</span> aSide 已经全面中文化，如不需中文化的，请把 language 文件夹删除即可。</p>
<p><span class="number">3.</span> 支持嵌套评论，建议最多选 5 层吧。</p>
<p><span class="number">4.</span> 内嵌回复邮件通知；内嵌文章分页；没有使用评论分页，而是使用 jQuery 判断，当评论超过 36 条时，自动隐藏旧评论，仅显示第 36 条以后的评论内容。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/comment-nav.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/comment-nav.png" alt="评论分页" title="评论分页" width="580" height="180" class="alignnone size-full wp-image-377" /></a></p>
<p><span class="number">5.</span> 内附 Links 模板，如需建立链接页面，则可使用此模板。</p>
<p><span class="number">6.</span> 自带“分享栏”。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/share.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/share.png" alt="分享" title="分享" width="580" height="180" class="alignnone size-full wp-image-378" /></a></p>
<p><span class="number">7.</span> jQuery 点击锚点滚动效果。</p>
<p><span class="number">8.</span> Lazyload 加载图片。</p>
<p><span class="number">9.</span> 自动隐藏留言访客资料框。</p>
<p><span class="number">10.</span> 点击回复自动添加 @someone。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/at-reply.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/at-reply.png" alt="添加被回复的评论作者" title="添加被回复的评论作者" width="580" height="180" class="alignnone size-full wp-image-380" /></a></p>
<p><span class="number">11.</span> 当鼠标指向被回复者 @someone 时，自动获取 someone 用户评论的内容。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/get-replied.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/get-replied.png" alt="获取评论者评论内容" title="获取评论者评论内容" width="580" height="180" class="alignnone size-full wp-image-379" /></a></p>
<p><span class="number">12.</span> 相关文章和面包屑导航。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/related-posts.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/related-posts.png" alt="相关文章" title="相关文章" width="580" height="160" class="alignnone size-full wp-image-381" /></a></p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/12/breadcrumb-nav.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/12/breadcrumb-nav.png" alt="面包屑导航" title="面包屑导航" width="580" height="160" class="alignnone size-full wp-image-382" /></a></p>
<p>更多细节请看 <a href="http://www.alanoy.com/?theme=aside&#038;passkey=8993360444c6f9714c842a" rel="nofollow" title="Live Demo">Live Demo</a>。<strong>再次提醒</strong>，<del datetime="2011-07-14T14:49:21+00:00"><a href="http://item.taobao.com/auction/item_detail.htm?item_num_id=8893133278" rel="nofollow">点此淘宝购买</a>，或联系我购买也行</del>。</p>
<p style="color:red;font-weight:bold;">更新：主题已经售完，谢谢！</p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/theme-optimus-plus/" title="Wordpress Theme: Optimus+">Wordpress Theme: Optimus+</a> (53)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/jquery-hide-the-comment-author-info/" title="jQuery 隐藏老用户评论资料框">jQuery 隐藏老用户评论资料框</a> (20)</li><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li><li><a href="http://www.alanoy.com/about-new-darklight-theme/" title="关于 DarkLight 主题新版本的开发">关于 DarkLight 主题新版本的开发</a> (18)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/aside-for-sale/">Permalink</a> |
<a href="http://www.alanoy.com/aside-for-sale/#comments">140 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/aside-for-sale/&title=WordPress 主题 aSide 出售">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/aside-for-sale/&title=WordPress 主题 aSide 出售" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/aside-for-sale/&title=WordPress 主题 aSide 出售" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/aside-for-sale/&title=WordPress 主题 aSide 出售" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/aside-for-sale/&title=WordPress 主题 aSide 出售" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/aside/" rel="tag">aSide</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/aside-for-sale/feed/</wfw:commentRss>
		<slash:comments>140</slash:comments>
		</item>
		<item>
		<title>给 WordPress 文章添加 odd/even 类</title>
		<link>http://www.alanoy.com/wordpress-append-odd-even-to-post-class/</link>
		<comments>http://www.alanoy.com/wordpress-append-odd-even-to-post-class/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 02:20:23 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=319</guid>
		<description><![CDATA[WordPress 文章的 class 调用一般是 &#60;?php post_class(); ?&#62;，其实里面已经有很多 class，给样式设计上带来很多方便；不过我们还可以通过添加函数，给文章再添加 odd 和 even 类，这样可以分别设计奇数和偶数文章的样式，丰富设计主题手段。 简单的在 function.php 文件中添加以下函数： function oddeven_post_class &#40; $classes &#41; &#123; &#160; &#160;global $current_class; &#160; &#160;$classes&#91;&#93; = $current_class; &#160; &#160;$current_class = &#40;$current_class == 'odd'&#41; ? 'even' : 'odd'; &#160; &#160;return $classes; &#125; add_filter &#40; 'post_class' , 'oddeven_post_class' &#41;; global $current_class; $current_class = 'odd'; 那么可以看到 wordpress [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 文章的 <code class="codecolorer text dawn"><span class="text">class</span></code> 调用一般是 <code class="codecolorer text dawn"><span class="text">&lt;?php post_class(); ?&gt;</span></code>，其实里面已经有很多 <code class="codecolorer text dawn"><span class="text">class</span></code>，给样式设计上带来很多方便；不过我们还可以通过添加函数，给文章再添加 <code class="codecolorer text dawn"><span class="text">odd</span></code> 和 <code class="codecolorer text dawn"><span class="text">even</span></code> 类，这样可以分别设计奇数和偶数文章的样式，丰富设计主题手段。<span id="more-319"></span></p>
<p>简单的在 <em>function.php</em> 文件中添加以下函数：</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> oddeven_post_class <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$classes</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_class</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_class</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$current_class</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_class</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'odd'</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'even'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'odd'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post_class'</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">'oddeven_post_class'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_class</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$current_class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'odd'</span><span style="color: #339933;">;</span></div></div>
<p>那么可以看到 wordpress 文章的类分别多了 <code class="codecolorer text dawn"><span class="text">odd</span></code> 和 <code class="codecolorer text dawn"><span class="text">even</span></code>，类似：</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-1&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 odd&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-2&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 even&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-3&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 odd&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-4&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 even&quot;</span>&gt;</span></div></div>
<p>我们可以在添加函数的时候，把 <code class="codecolorer text dawn"><span class="text">$current_class = 'odd';</span></code> 这一行去掉，那么第一篇文章不会被添加 <code class="codecolorer text dawn"><span class="text">odd</span></code> 或 <code class="codecolorer text dawn"><span class="text">even</span></code> 类，这样又可以设计区分第一篇文章与其他文章的样式，<abbr title="HyperText Markup Language">HTML</abbr> 类似：</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-1&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-2&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 odd&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-3&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 even&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post-4&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;省略其他 odd&quot;</span>&gt;</span></div></div>
<p>Enjoy!</p>
<h4  class="related_post_title">Most Commented</h4><ul class="related_post"><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/themes/" title="Themes">Themes</a> (145)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li><li><a href="http://www.alanoy.com/darklight-2/" title="DarkLight 2.0">DarkLight 2.0</a> (129)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-2/" title="WordPress Theme: G-White 2.0">WordPress Theme: G-White 2.0</a> (123)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/wordpress-append-odd-even-to-post-class/">Permalink</a> |
<a href="http://www.alanoy.com/wordpress-append-odd-even-to-post-class/#comments">16 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/wordpress-append-odd-even-to-post-class/&title=给 WordPress 文章添加 odd/even 类">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/wordpress-append-odd-even-to-post-class/&title=给 WordPress 文章添加 odd/even 类" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/wordpress-append-odd-even-to-post-class/&title=给 WordPress 文章添加 odd/even 类" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/wordpress-append-odd-even-to-post-class/&title=给 WordPress 文章添加 odd/even 类" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/wordpress-append-odd-even-to-post-class/&title=给 WordPress 文章添加 odd/even 类" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/function/" rel="tag">function</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/wordpress-append-odd-even-to-post-class/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordPress Theme G-White 3.0</title>
		<link>http://www.alanoy.com/wordpress-theme-gwhite-3/</link>
		<comments>http://www.alanoy.com/wordpress-theme-gwhite-3/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 18:10:57 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[G-White]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=293</guid>
		<description><![CDATA[G-White 3.0 相对于 DarkLight 3.0 迟了许多，不过也终于弄好了，有 DarkLight 3.0 做基础，修改起来就相对没那么累人了，不过怕会有些 DarkLight 的残留元素，偷懒没办法，目前测试没看到，希望没有，嘿。 其实我做的主题，功能上从来都是差不多，加上这次是基于 Twenty Ten 的，那就更是了，主要还是对于外观、细节上的处理，这次外观还是做了部分改动，细节更加完善些了，也有一些无视 IE 的部分，但不影响其基本使用。下面是对于这次主要更新的地方的详述： 首先是 Header 部分 博客标题保持不变，导航栏改变了样式，增加背景框，变更字体颜色、增加 jQuery 下拉菜单，基本上导航栏就是重新设计及了！ 其次是文章顶部样式及图标 文章发布时间的样式改为普通样式，并没有使用之前的独立出来的样式，之前有人反映说该样式看不出文章发布的年份，所以改掉，当偷懒也行吧。再者是图标更新了，不过依然是用 Gnome 的图标，对 Tango，Gnome 这类图片没有抵抗力。 第三是 Pagenavi 的样式 更改了内嵌的方式，跟 DarkLight 一样的，这里不重复。主要是样式重新设计了，之前是用了图片做背景的，这次直接 CSS 做了，更简洁！ 第四是侧边栏 Widget 部分 旧版使用的是图片背景，这次全部删除，只用 CSS 实现，也是重新设计的样式，使用了 CSS3 的圆角和阴影效果，所以 IE6、7、8 不会有，不过并不影响其使用，看上去同样简洁；搜索框也是重新设计，方法同前面。 第五相关文章 相关文章应该很多人都有使用，不过我没有内嵌到主题里去，我自己用的是 WordPress Related Posts 插件，如果你也用该插件，那显示的样式如图所示，同样用了 jQuery 添加斑马纹效果；如果你使用的不是上面提到的插件，那也没关系，在调用相关文章函数的时候把标题的类设置为 [...]]]></description>
			<content:encoded><![CDATA[<p>G-White 3.0 相对于 DarkLight 3.0 迟了许多，不过也终于弄好了，有 DarkLight 3.0 做基础，修改起来就相对没那么累人了，不过怕会有些 DarkLight 的残留元素，偷懒没办法，目前测试没看到，希望没有，嘿。</p>
<p>其实我做的主题，功能上从来都是差不多，加上这次是基于 Twenty Ten 的，那就更是了，主要还是对于外观、细节上的处理，这次外观还是做了部分改动，细节更加完善些了，也有一些无视 IE 的部分，但不影响其基本使用。下面是对于这次主要更新的地方的详述：<span id="more-293"></span></p>
<h3>首先是 Header 部分</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/nav.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/nav.png" alt="Navigation" title="导航栏" width="500" height="120" class="alignnone size-full wp-image-294" /></a></p>
<p>博客标题保持不变，导航栏改变了样式，增加背景框，变更字体颜色、增加 jQuery 下拉菜单，基本上导航栏就是重新设计及了！</p>
<h3>其次是文章顶部样式及图标</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/entry-title.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/entry-title.png" alt="文章标题" title="文章标题" width="500" height="120" class="alignnone size-full wp-image-295" /></a></p>
<p>文章发布时间的样式改为普通样式，并没有使用之前的独立出来的样式，之前有人反映说该样式看不出文章发布的年份，所以改掉，当偷懒也行吧。再者是图标更新了，不过依然是用 Gnome 的图标，对 Tango，Gnome 这类图片没有抵抗力。</p>
<h3>第三是 Pagenavi 的样式</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/pagenavi.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/pagenavi.png" alt="文章分页 Pagenavi" title="文章分页 Pagenavi" width="500" height="120" class="alignnone size-full wp-image-296" /></a></p>
<p>更改了内嵌的方式，跟 DarkLight 一样的，这里不重复。主要是样式重新设计了，之前是用了图片做背景的，这次直接 <abbr title="Cascading Style Sheets">CSS</abbr> 做了，更简洁！</p>
<h3>第四是侧边栏 Widget 部分</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/sidebar.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/sidebar.png" alt="侧边栏Widget" title="侧边栏Widget" width="280" height="300" class="alignnone size-full wp-image-297" /></a></p>
<p>旧版使用的是图片背景，这次全部删除，只用 CSS 实现，也是重新设计的样式，使用了 CSS3 的圆角和阴影效果，所以 IE6、7、8 不会有，不过并不影响其使用，看上去同样简洁；搜索框也是重新设计，方法同前面。</p>
<h3>第五相关文章</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/related-posts.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/related-posts.png" alt="相关文章" title="相关文章" width="500" height="168" class="alignnone size-full wp-image-298" /></a></p>
<p>相关文章应该很多人都有使用，不过我没有内嵌到主题里去，我自己用的是 <a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/" title="Wordpress Related Posts" rel="external nofollow">WordPress Related Posts</a> 插件，如果你也用该插件，那显示的样式如图所示，同样用了 jQuery 添加斑马纹效果；如果你使用的不是上面提到的插件，那也没关系，在调用相关文章函数的时候把标题的类设置为 <code class="codecolorer text dawn"><span class="text">class=&quot;related_post_title&quot;</span></code>，把列表 <code class="codecolorer text dawn"><span class="text">ul</span></code> 或者 <code class="codecolorer text dawn"><span class="text">ol</span></code> 的类设置为 <code class="codecolorer text dawn"><span class="text">class=&quot;related_post&quot;</span></code> 即可达到同样效果。</p>
<h3>最后是评论部分</h3>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/10/comment.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/10/comment.png" alt="评论样式" title="评论样式" width="550" height="564" class="alignnone size-full wp-image-299" /></a></p>
<p>评论的样式总是很受重视的！旧版的样式被我完全抛弃了，新版 G-White 3.0 的评论样式跟 DarkLight 3.0 的如出一辙，又偷懒了，哈哈。这个样式本人真的很喜欢，不过依然只支持三层嵌套，以前说过了，搞太多很累人，代码也会很累赘。相比 DarkLight 3.0，这里多了个隐藏和展开评论内容的锚点，如图所示！</p>
<h3>其他说明</h3>
<p>404 页面保持跟旧版的一直；一些没列出来的功能，都是跟 <a href="http://www.alanoy.com/wordpress-theme-darklight-3/" rel="nofollow">DarkLight 3.0</a> 一样的。主题支持 Opera 10，Firefox 3.0，Chrome，IE8，IE7，IE6，手头没 Safari，没测试；主题不能通过 CCS3 验证，因为圆角和阴影效果的缘故，也懒得用 js 输出了，不能通过 <abbr title="HyperText Markup Language">HTML</abbr> 验证，因为用了 HTML5 的 <code class="codecolorer text dawn"><span class="text">role</span></code> 属性，我也懒得去全部改掉，囧rz；测试时间并不长，所以可能还有一些细节上或者其他问题，请 G-white 3.0 使用者帮忙汇报 Bug，谢谢！</p>
<p>G-White 3.0 是在 WordPress 3.01 下开发的，所以只支持 WordPress 3.01+。</p>
<p>最后的最后，再次声明，G-White 3.0 主题是基于 Twenty Ten 主题，请遵循<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow">署名-非商业性使用-相同方式共享 3.0.0  共享协议</a>，去掉 footer 版权信息的朋友请自重<del datetime="2010-10-25T00:45:45+00:00">，不要连 WordPress 的也搞掉吧</del>。</p>
<p><strong>更新列表：</strong></p>
<ol class="update">
<li>2010-11-11: 更新至 Verson 3.1.2，修正 IE6 下侧边栏评论内表情显示异常问题。非常感谢 <a href="http://www.isouo.com/" rel="nofollow">Cmile</a> 的几个反馈！</li>
<li>2010-11-07：更新至 Verson 3.1.1，修正底部 Widget 搜索框的样式；修改底部 Widget 日历的样式；去掉插入表情的背景和边框。</li>
<li>2010-10-25：更新置顶文章样式。</li>
<li>2010-10-22：下午自己 Demo 的时候发现了一些问题，做了挺多更新，直接升级版本为 3.1；修正 Widget 项的样式，添加 padding 属性，让内容文字不至于顶到右边框上去；修改 footer 的信息，把 DarkLight 改成 G-White，囧了；修改 sprite 图片，删除内容顶部和 footer 部分的背景图片，让他们独立出来了，保证在 Chrome 下的显示完好；更新 Trackback 的样式。</li>
</ol>
<p>演示：<a href="http://www.alanoy.com/?theme=G-White+3.1&#038;passkey=8993360444c6f9714c842a" rel="nofollow" title="G-White Demo">Live Demo</a> // <a href="http://pic.yupoo.com/igunpla/Az2ugDTn/8wU6Z.png" rel="nofollow external" title="Preview of G-White">Image Preview</a></p>
<p class="download"><a href='http://www.alanoy.com/wp-content/uploads/2010/10/g-white.zip' title='Download G-White'>点击下载 G-White 3.1</a></p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li><li><a href="http://www.alanoy.com/show-excerpt-and-read-more/" title="G-White 主题显示文章摘要">G-White 主题显示文章摘要</a> (25)</li><li><a href="http://www.alanoy.com/updated-gwhtie-to-v24/" title="WordPress 主题 G-White 更新到 Ver 2.4">WordPress 主题 G-White 更新到 Ver 2.4</a> (105)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-2/" title="WordPress Theme: G-White 2.0">WordPress Theme: G-White 2.0</a> (123)</li><li><a href="http://www.alanoy.com/theme-optimus-plus/" title="Wordpress Theme: Optimus+">Wordpress Theme: Optimus+</a> (53)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/wordpress-theme-gwhite-3/">Permalink</a> |
<a href="http://www.alanoy.com/wordpress-theme-gwhite-3/#comments">156 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/wordpress-theme-gwhite-3/&title=WordPress Theme G-White 3.0">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/wordpress-theme-gwhite-3/&title=WordPress Theme G-White 3.0" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/wordpress-theme-gwhite-3/&title=WordPress Theme G-White 3.0" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/wordpress-theme-gwhite-3/&title=WordPress Theme G-White 3.0" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/wordpress-theme-gwhite-3/&title=WordPress Theme G-White 3.0" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/g-white/" rel="tag">G-White</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/wordpress-theme-gwhite-3/feed/</wfw:commentRss>
		<slash:comments>156</slash:comments>
		</item>
		<item>
		<title>Mail to Commenter 邮件通知和发件人问题</title>
		<link>http://www.alanoy.com/fix-mail-to-commenter/</link>
		<comments>http://www.alanoy.com/fix-mail-to-commenter/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 07:46:48 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=276</guid>
		<description><![CDATA[一直使用 WordPress 插件 Mail To Commenter，但是 WordPress 2.8 的时候用了 WP 自带的嵌套回复后，一直没注意这个插件的问题，我也以为大家都能在收到回复通知邮件，直到前天，自己在测试的时候发现怎么没有回复通知邮件？原来设置启用后，要有 @name 或者 @name: 才会有邮件通知，囧，一直没注意，以为是自动会发送通知的。 然后开始折腾，又发现在邮件通知的时候，发件人显示是未知发件人，邮件地址是服务器的地址，开始以为是我自己博客设置问题，或者服务器设置问题，结果折腾好久发现不是，囧死了；在 google 找了好阵子解决方法，实在很少关于这个的，但还是找到了。解决办法是在 mailtocommenter_functions.php 文件找到 function mailtocommenter_send_email&#40;$to,$subject,$message&#41; 把该函数的内容按如下修改： function mailtocommenter_send_email&#40;$to,$subject,$message&#41;&#123; &#160; &#160; $blogname = &#34;此处填你要显示的发件人名称&#34;; &#160; &#160; $blognameO = $blogname; &#160; &#160; $blogname .= &#34; &#60;no-reply@这里填你的域名，如alanoy.com&#34;; &#160; &#160; $blogname .= &#34;&#62;&#34;; &#160; &#160; $charset = get_option&#40;'blog_charset'&#41;; &#160; &#160; $headers &#160;= [...]]]></description>
			<content:encoded><![CDATA[<p>一直使用 WordPress 插件 <a href="http://www.thinkagain.cn/archives/989.html" title="Mail To Commenter" rel="external nofollow">Mail To Commenter</a>，但是 WordPress 2.8 的时候用了 WP 自带的嵌套回复后，一直没注意这个插件的问题，我也以为大家都能在收到回复通知邮件，直到前天，自己在测试的时候发现怎么没有回复通知邮件？原来设置启用后，要有 <em>@name </em> 或者 <em>@name:</em> 才会有邮件通知，囧，一直没注意，以为是自动会发送通知的。<span id="more-276"></span></p>
<p>然后开始折腾，又发现在邮件通知的时候，发件人显示是<em>未知发件人</em>，邮件地址是服务器的地址，开始以为是我自己博客设置问题，或者服务器设置问题，结果折腾好久发现不是，囧死了；在 google 找了好阵子解决方法，实在很少关于这个的，但还是找到了。解决办法是在  <em>mailtocommenter_functions.php</em> 文件找到</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> mailtocommenter_send_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span><span style="color: #000088;">$subject</span><span style="color: #339933;">,</span><span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span></div></div>
<p>把该函数的内容按如下修改：</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> mailtocommenter_send_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span><span style="color: #000088;">$subject</span><span style="color: #339933;">,</span><span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$blogname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;此处填你要显示的发件人名称&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$blognameO</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$blogname</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$blogname</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &lt;no-reply@这里填你的域名，如alanoy.com&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$blogname</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$charset</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$headers</span> &nbsp;<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;From: <span style="color: #006699; font-weight: bold;">$blognameO</span> &lt;no-reply@这里填你的域名，如alanoy.com&gt; <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: text/html;charset=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$charset</span><span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #339933;">@</span>wp_mail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$message</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>这样就可以正常显示了。Think Again 已经说了此插件不再更新了，希望有人能接着开发此插件。</p>
<h4  class="related_post_title">Most Commented</h4><ul class="related_post"><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/themes/" title="Themes">Themes</a> (145)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li><li><a href="http://www.alanoy.com/darklight-2/" title="DarkLight 2.0">DarkLight 2.0</a> (129)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-2/" title="WordPress Theme: G-White 2.0">WordPress Theme: G-White 2.0</a> (123)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/fix-mail-to-commenter/">Permalink</a> |
<a href="http://www.alanoy.com/fix-mail-to-commenter/#comments">50 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/fix-mail-to-commenter/&title=Mail to Commenter 邮件通知和发件人问题">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/fix-mail-to-commenter/&title=Mail to Commenter 邮件通知和发件人问题" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/fix-mail-to-commenter/&title=Mail to Commenter 邮件通知和发件人问题" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/fix-mail-to-commenter/&title=Mail to Commenter 邮件通知和发件人问题" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/fix-mail-to-commenter/&title=Mail to Commenter 邮件通知和发件人问题" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/plugin/" rel="tag">Plugin</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/fix-mail-to-commenter/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>WordPress 主题 DarkLight 3.0</title>
		<link>http://www.alanoy.com/wordpress-theme-darklight-3/</link>
		<comments>http://www.alanoy.com/wordpress-theme-darklight-3/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 11:04:12 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[DarkLight]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=230</guid>
		<description><![CDATA[当有了计划，马上就想去完成它，但我也没想到这么快，大概主题结构的折腾少了的缘故吧。Twenty Ten 真是一个强大的主题，DarkLight 3.0 主题的功能基本与其保持一致。外观上基本保持 DarkLight 原有风格，换了些小图标，用了 Sprites 集成图片，技术一般，有点乱，不过不影响主题使用就是了。下面来个图文并茂的介绍。 首先 Header 部分： 相对之前的主题，导航栏这次用 jQuery 实现多级菜单，样式相对改进了，增加 box-shadow 效果（IE 不会有这个效果），包括侧边栏，如果有多级菜单的话，也加了这个效果，当然，你不要的话可以自己去掉；主题支持 WordPress 3.0 的菜单功能，Twenty Ten 自带有了。 其次是内容部分： 把之前使用内嵌的 wp-pagenavi 插件函数换成 willin 的 Mini Pagenavi，更加小巧，样式有轻微改动。 单篇文章中显示上一篇文章和下一篇文章的链接，在顶部和底部都有，这是 Twenty Ten 原来有的，我也保留了，不需要删除掉也比较简单。 相关文章本来想内嵌使用 willin 的方法，但还是放弃，不过样式还是保留在 style.css 文件里面，而且用 jQuery 实现类斑马纹样式，同样保留 js 代码，无论你用什么方法实现相关文章，只要给标题添加类 class=&#34;related_post_title&#34;，给列表 ul 或者 ol 添加类 class=&#34;related_post&#34;，那效果就类似下图： 作者信息栏，这个也是 Twenty Ten 自带，只要文章发布者有关于自己的描述说明，那么就会在文章底部显示作者信息，并可以点击链接查看该作者的全部文章。对于单人博客来说没啥用，如果多人参与的话，那相当有必要： 第三是评论部分： [...]]]></description>
			<content:encoded><![CDATA[<p>当有了计划，马上就想去完成它，但我也没想到这么快，大概主题结构的折腾少了的缘故吧。Twenty Ten 真是一个强大的主题，DarkLight 3.0 主题的功能基本与其保持一致。外观上基本保持 DarkLight 原有风格，换了些小图标，用了 Sprites 集成图片，技术一般，有点乱，不过不影响主题使用就是了。下面来个图文并茂的介绍。<span id="more-230"></span></p>
<h3>首先 Header 部分：</h3>
<p>相对之前的主题，导航栏这次用 jQuery 实现多级菜单，样式相对改进了，增加 <code class="codecolorer text dawn"><span class="text">box-shadow</span></code> 效果（IE 不会有这个效果），包括侧边栏，如果有多级菜单的话，也加了这个效果，当然，你不要的话可以自己去掉；主题支持 WordPress 3.0 的菜单功能，Twenty Ten 自带有了。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/header.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/header.png" alt="Header Nav Menu" title="导航栏用jQuery实现多级下拉菜单" width="500" height="140" class="alignnone size-full wp-image-231" /></a></p>
<h3>其次是内容部分：</h3>
<p>把之前使用内嵌的 wp-pagenavi 插件函数换成 willin 的 <a href="http://kan.willin.org/?p=1323" rel="nofollow external">Mini Pagenavi</a>，更加小巧，样式有轻微改动。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/pagenavi.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/pagenavi.png" alt="Mini Pagenavi" title="Mini Pagenavi" width="300" height="86" class="alignnone size-full wp-image-232" /></a></p>
<p>单篇文章中显示上一篇文章和下一篇文章的链接，在顶部和底部都有，这是 Twenty Ten 原来有的，我也保留了，不需要删除掉也比较简单。</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/post-navigation.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/post-navigation.png" alt="Posts Navigation" title="Posts Navigation" width="500" height="99" class="alignnone size-full wp-image-233" /></a></p>
<p>相关文章本来想内嵌使用 willin 的方法，但还是放弃，不过样式还是保留在 <em>style.css</em> 文件里面，而且用 jQuery 实现类斑马纹样式，同样保留 js 代码，无论你用什么方法实现相关文章，只要给标题添加类 <code class="codecolorer text dawn"><span class="text">class=&quot;related_post_title&quot;</span></code>，给列表 <code class="codecolorer text dawn"><span class="text">ul</span></code> 或者 <code class="codecolorer text dawn"><span class="text">ol</span></code> 添加类 <code class="codecolorer text dawn"><span class="text">class=&quot;related_post&quot;</span></code>，那效果就类似下图：</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/related-posts.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/related-posts.png" alt="Related Posts" title="相关文章样式" width="500" height="145" class="alignnone size-full wp-image-234" /></a></p>
<p>作者信息栏，这个也是 Twenty Ten 自带，只要文章发布者有关于自己的描述说明，那么就会在文章底部显示作者信息，并可以点击链接查看该作者的全部文章。对于单人博客来说没啥用，如果多人参与的话，那相当有必要：</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/about-author.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/about-author.png" alt="About the Author" title="作者信息" width="500" height="105" class="alignnone size-full wp-image-235" /></a></p>
<h3>第三是评论部分：</h3>
<p>首先是评论样式，重新设计了评论样式，奇数评论层跟偶数层样式不同，然后内嵌回复部分使用左右对话框样式，依然只支持嵌套 3 层，复杂的样式设计多层，挺累人的，代码也会复杂；同时还有评论楼层，只显示主评论楼层，具体看图：</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/comments-style.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/comments-style.png" alt="评论样式" title="评论样式" width="500" height="446" class="alignnone size-full wp-image-236" /></a></p>
<p>然后是 Ajax comment，使用的是 willin 的版本，然后 jQuery 增加 @reply，即点击回复会自动添加 @somebody，还有 Ctrl+Enter 回复评论，隐藏回访用户资料框等常用功能。</p>
<h3>最后是 sidebar 和 footer 部分：</h3>
<p>这里似乎没什么好说的，因为用的 Twenty Ten 的结构，所以你完全可以使用主题的小工具来设置侧边栏，样式上不会存在问题，如果有那应该是我没有测试到吧。不仅侧边栏可以使用小工具，底部 footer 也可以：</p>
<p><a href="http://www.alanoy.com/wp-content/uploads/2010/08/footer.png"><img src="http://www.alanoy.com/wp-content/uploads/2010/08/footer.png" alt="页脚" title="页脚的 Widget 功能" width="500" height="163" class="alignnone size-full wp-image-237" /></a></p>
<p>至于返回顶部的 <em>Go Top</em>，像之前说的，我并没有打算给它加上 js 滚动效果，不过样式上做了下改动而已。</p>
<h3>其他：</h3>
<p>主题支持 Opera 10，Firefox 3.0，Chrome，IE8，IE7，IE6，手头没 Safari，没测试；Doctype 由 HTML5 改成 XHTML 1.0 Traditional；主题不能通过 CCS 3 验证，因为圆角和阴影效果的缘故，也不能通过 HTML 验证，因为 Twenty Ten 用了 HTML5 的 <code class="codecolorer text dawn"><span class="text">role</span></code> 属性，我也懒得去全部改掉了；关于 CSS Sprites，把很多图片弄成一张，省去加载多张图片的时间；然后我又去掉了 Twenty Ten 原有支持的单栏样式；测试时间并不长，所以可能还有一些细节上或者其他问题，请 DarkLight 3.0 使用者帮忙汇报 Bug，谢谢！</p>
<p>最后的最后，再次声明，DarkLight 3.0 主题是基于 Twenty Ten 主题，请遵循<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow">署名-非商业性使用-相同方式共享 3.0.0  共享协议</a>，去掉 footer 版权信息的朋友请自重<del datetime="2010-10-25T00:46:14+00:00">，不要连 WordPress 的也搞掉吧</del>。</p>
<p><strong>更新列表：</strong></p>
<ol class="update">
<li>2010-11-07：去掉表情图片的背景和边框。</li>
<li>2010-10-22：修正当 Widget 调用自定义菜单时样式问题。</li>
<li>2010-9-16：修复自定义导航栏下，多级菜单的样式。</li>
<li>2010-9-11：更新置顶文章的样式（注：只需更新 style.css 文件即可）。</li>
<li>2010-9-7：更新 attachment 图片的样式。</li>
<li>2010-9-4：增加回复邮件通知功能，使用 willin 的代码。</li>
<li>2010-9-3：修正在搜索不到内容时，正文中显示两个搜索框的问题。</li>
<li>2010-9-2：给正文增加 <em>overflow: hidden</em> 属性，避免溢出情况；修正“您的评论正在等待审核”评论的位置。</li>
<li>2010-08-29 早上更新：居然忘记测试 404 页面，稍微修改了下，并且增加一个说明文件。</li>
<li>2010-08-29 下午更新：修改 IE6、IE7 下鼠标滑过文章标题时，文章背景线显示不全的问题；修改 IE6 下，鼠标滑过文章内链接时，文章分割线下滑问题，IE 实在太囧了；修改在回复评论时，第二层回复者名字的显示位置；修改成功提交评论后，增加提示评论成功的句子的左边距，保持美感，汗。</li>
</ol>
<p>演示：<a href='http://www.alanoy.com/?theme=DarkLight+3.0&#038;passkey=8993360444c6f9714c842a' title="Live Demo">Live Demo</a></p>
<p class="download"><a href='http://www.alanoy.com/wp-content/uploads/2010/08/darklight.zip' title="Wordpress Theme DarkLight 3.0">下载 WordPress 主题：DarkLight 3.0</a></p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li><li><a href="http://www.alanoy.com/about-new-darklight-theme/" title="关于 DarkLight 主题新版本的开发">关于 DarkLight 主题新版本的开发</a> (18)</li><li><a href="http://www.alanoy.com/darklight-2-3/" title="DarkLight 2.3">DarkLight 2.3</a> (113)</li><li><a href="http://www.alanoy.com/darklight-2/" title="DarkLight 2.0">DarkLight 2.0</a> (129)</li><li><a href="http://www.alanoy.com/theme-optimus-plus/" title="Wordpress Theme: Optimus+">Wordpress Theme: Optimus+</a> (53)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/wordpress-theme-darklight-3/">Permalink</a> |
<a href="http://www.alanoy.com/wordpress-theme-darklight-3/#comments">144 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/wordpress-theme-darklight-3/&title=WordPress 主题 DarkLight 3.0">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/wordpress-theme-darklight-3/&title=WordPress 主题 DarkLight 3.0" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/wordpress-theme-darklight-3/&title=WordPress 主题 DarkLight 3.0" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/wordpress-theme-darklight-3/&title=WordPress 主题 DarkLight 3.0" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/wordpress-theme-darklight-3/&title=WordPress 主题 DarkLight 3.0" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/darklight/" rel="tag">DarkLight</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/wordpress-theme-darklight-3/feed/</wfw:commentRss>
		<slash:comments>144</slash:comments>
		</item>
		<item>
		<title>DarkLight 和 G-White 主题的图片透明效果和超链接背景</title>
		<link>http://www.alanoy.com/opacity-and-links-background-of-images/</link>
		<comments>http://www.alanoy.com/opacity-and-links-background-of-images/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 09:26:55 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[DarkLight]]></category>
		<category><![CDATA[G-White]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=199</guid>
		<description><![CDATA[DarkLight 和 G-White 主题中我都加了图片透明效果，现在看来有点蛋疼，许多童鞋问我如何去掉该效果，个人喜好不能加于公布的主题中，以后要注意，去掉的方法就是，在 style.css 中找到 .entrybody img，删除里面的 filter: alpha&#40;opacity=80&#41;; opacity: 0.8; -moz-opacity: 0.8; 这三行，顺便把 .entrybody img:hover 整个删掉。 还有个问题是，这俩主题中，超链接图片在鼠标滑过时，图片底部会留下的红色背景，是我给超链接在鼠标滑过 a:hover 时设置了 padding 和 background 属性导致的，要去掉的话修改超链接的样式，去掉其内边距和背景属性。如果想保留超链接原来的样式，我写了个 jQuery，去掉超链接图片的背景和样式： $&#40;document&#41;.ready&#40;function&#40;&#41; &#123; &#160; &#160; $&#40;&#34;.entrybody a img&#34;&#41;.parent&#40;&#34;a&#34;&#41;.css&#40;&#123;&#34;background&#34;: &#34;none&#34;, &#34;padding&#34;: &#34;0&#34;&#125;&#41;; &#125;&#41;; 代码放到 js 文件夹下的 all.js 里面。这两个主题已经调用了 jQuery 库，如果你已经删掉了，那不会有效果。 Related PostsWordpress Theme G-White 3.0 (156)WordPress 主题 DarkLight 3.0 (144)关于 DarkLight [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alanoy.com/tag/darklight/" title="DarkLight Theme">DarkLight</a> 和 <a href="http://www.alanoy.com/tag/g-white/" title="G-White Theme">G-White</a> 主题中我都加了图片透明效果，现在看来有点蛋疼，许多童鞋问我如何去掉该效果，个人喜好不能加于公布的主题中，以后要注意，去掉的方法就是，在 style.css 中找到 <code class="codecolorer text dawn"><span class="text">.entrybody img</span></code>，删除里面的<span id="more-199"></span></p>
<div class="codecolorer-container css dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">filter<span style="color: #00AA00;">:</span> alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">80</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.8</span><span style="color: #00AA00;">;</span><br />
-moz-opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.8</span><span style="color: #00AA00;">;</span></div></div>
<p>这三行，顺便把 <code class="codecolorer text dawn"><span class="text">.entrybody img:hover</span></code> 整个删掉。</p>
<p>还有个问题是，这俩主题中，超链接图片在鼠标滑过时，图片底部会留下的红色背景，是我给超链接在鼠标滑过 <code class="codecolorer text dawn"><span class="text">a:hover</span></code> 时设置了 <code class="codecolorer text dawn"><span class="text">padding</span></code> 和 <code class="codecolorer text dawn"><span class="text">background</span></code> 属性导致的，要去掉的话修改超链接的样式，去掉其内边距和背景属性。如果想保留超链接原来的样式，我写了个 jQuery，去掉超链接图片的背景和样式：</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.entrybody a img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;background&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;padding&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>代码放到 js 文件夹下的 all.js 里面。这两个主题已经调用了 jQuery 库，如果你已经删掉了，那不会有效果。</p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/about-new-darklight-theme/" title="关于 DarkLight 主题新版本的开发">关于 DarkLight 主题新版本的开发</a> (18)</li><li><a href="http://www.alanoy.com/show-excerpt-and-read-more/" title="G-White 主题显示文章摘要">G-White 主题显示文章摘要</a> (25)</li><li><a href="http://www.alanoy.com/updated-gwhtie-to-v24/" title="WordPress 主题 G-White 更新到 Ver 2.4">WordPress 主题 G-White 更新到 Ver 2.4</a> (105)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-2/" title="WordPress Theme: G-White 2.0">WordPress Theme: G-White 2.0</a> (123)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/opacity-and-links-background-of-images/">Permalink</a> |
<a href="http://www.alanoy.com/opacity-and-links-background-of-images/#comments">23 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/opacity-and-links-background-of-images/&title=DarkLight 和 G-White 主题的图片透明效果和超链接背景">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/opacity-and-links-background-of-images/&title=DarkLight 和 G-White 主题的图片透明效果和超链接背景" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/opacity-and-links-background-of-images/&title=DarkLight 和 G-White 主题的图片透明效果和超链接背景" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/opacity-and-links-background-of-images/&title=DarkLight 和 G-White 主题的图片透明效果和超链接背景" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/opacity-and-links-background-of-images/&title=DarkLight 和 G-White 主题的图片透明效果和超链接背景" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/darklight/" rel="tag">DarkLight</a>, <a href="http://www.alanoy.com/tag/g-white/" rel="tag">G-White</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/opacity-and-links-background-of-images/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>关于 DarkLight 主题新版本的开发</title>
		<link>http://www.alanoy.com/about-new-darklight-theme/</link>
		<comments>http://www.alanoy.com/about-new-darklight-theme/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 02:18:23 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[DarkLight]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/%e5%85%b3%e4%ba%8edarklight%e4%b8%bb%e9%a2%98%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84%e5%bc%80%e5%8f%91/</guid>
		<description><![CDATA[在 G-White 更新到 v2.4 后，其实前阵子还是在对 G-White 进行修改，因为主题的结构和 CSS 代码还有一些不合理和冗余的地方，结构方面已改好，正在重新写 CSS 代码。但受到 Jinwen 这篇文章的影响，我也有意尝试用 WordPress 官方主题进行开发，毕竟我的那些代码是从 WordPress 2.5 用到现在的，需要全面更新一下了，所以有了把 DarkLight 和 G-White 3.0 化的想法，即在 Twenty Ten 主题结构基础上的更新开发。 回到正题，首先是对 DarkLight 的更新，版本直接跳到 3.0 且不在对之前版本进行维护改进。说说几点特性，喜欢 DarkLight 主题的可以提提意见： Ajax Comment，这次会使用 Willin 最新的改进版。 嵌套评论，样式会有所改变，敬请关注 内嵌文章分页，这次不用 wp-pagenavi，而使用还是来自 Willin 的 Mini Pagenavi，很小巧。 一些 JavaScript 效果：如点击 Reply 自动添加 @somebody，下拉菜单，Ctrl+Enter 回复评论，在考虑要不要加页面滚动效果，个人觉得没什么必要。 进度不会很快，现在失业中，正在学习，杯具。 Related PostsWordPress 主题 [...]]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://www.alanoy.com/tag/g-white" rel="nofollow" title="G-White Theme">G-White</a> 更新到 v2.4 后，其实前阵子还是在对 <a href="http://www.alanoy.com/tag/g-white" rel="nofollow" title="G-White Theme">G-White</a> 进行修改，因为主题的结构和 <abbr title="Cascading Style Sheet">CSS</abbr> 代码还有一些不合理和冗余的地方，结构方面已改好，正在重新写 <abbr title="Cascading Style Sheet">CSS</abbr> 代码。但受到 <a href="http://www.saywp.com/wordpress/my-new-theme-and-twentyten.html" rel="nofollow external" title="Jinwen">Jinwen</a> 这篇文章的影响，我也有意尝试用 WordPress 官方主题进行开发，毕竟我的那些代码是从 WordPress 2.5 用到现在的，需要全面更新一下了，所以有了把 <a href="http://www.alanoy.com/tag/darklight" rel="nofollow" title="DarkLight Theme">DarkLight</a> 和 <a href="http://www.alanoy.com/tag/g-white" rel="nofollow" title="G-White Theme">G-White</a> 3.0 化的想法，即在 Twenty Ten 主题结构基础上的更新开发。<span id="more-183"></span></p>
<p>回到正题，首先是对 <a href="http://www.alanoy.com/tag/darklight" rel="nofollow" title="DarkLight Theme">DarkLight</a> 的更新，版本直接跳到 3.0 且不在对之前版本进行维护改进。说说几点特性，喜欢 DarkLight 主题的可以提提意见：</p>
<ol>
<li>Ajax Comment，这次会使用 <a href="http://kan.willin.org/?p=1271" rel="external nofollow" title="Ajax Comment">Willin</a> 最新的改进版。</li>
<li>嵌套评论，样式会有所改变，敬请关注</li>
<li>内嵌文章分页，这次不用 wp-pagenavi，而使用还是来自 Willin 的 <a href="http://kan.willin.org/?p=1323" rel="external nofollow" title="Mini Pagenavi">Mini Pagenavi</a>，很小巧。</li>
<li>一些 JavaScript 效果：如点击 Reply 自动添加 @somebody，下拉菜单，Ctrl+Enter 回复评论，在考虑要不要加页面滚动效果，个人觉得没什么必要。</li>
</ol>
<p>进度不会很快，现在失业中，正在学习，杯具。</p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li><li><a href="http://www.alanoy.com/darklight-2-3/" title="DarkLight 2.3">DarkLight 2.3</a> (113)</li><li><a href="http://www.alanoy.com/darklight-2/" title="DarkLight 2.0">DarkLight 2.0</a> (129)</li><li><a href="http://www.alanoy.com/theme-optimus-plus/" title="Wordpress Theme: Optimus+">Wordpress Theme: Optimus+</a> (53)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/about-new-darklight-theme/">Permalink</a> |
<a href="http://www.alanoy.com/about-new-darklight-theme/#comments">18 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/about-new-darklight-theme/&title=关于 DarkLight 主题新版本的开发">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/about-new-darklight-theme/&title=关于 DarkLight 主题新版本的开发" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/about-new-darklight-theme/&title=关于 DarkLight 主题新版本的开发" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/about-new-darklight-theme/&title=关于 DarkLight 主题新版本的开发" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/about-new-darklight-theme/&title=关于 DarkLight 主题新版本的开发" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/darklight/" rel="tag">DarkLight</a>, <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/about-new-darklight-theme/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>WordPress Gravatar 头像缓存</title>
		<link>http://www.alanoy.com/wordpress-gravatar-cache/</link>
		<comments>http://www.alanoy.com/wordpress-gravatar-cache/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 04:09:16 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Gravatar]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=131</guid>
		<description><![CDATA[最近 Gravatar 头像老是显示不能，google 之得一好方法。来自 Willin 方法，将 Gravatar 头像缓存到服务器，不错、够速度，故分享之。 首先在你的网站 wp-content 的同级目录建立：/avatar，权限设置:755，这是 Gravatar 的缓存路径。 准备一张适合你模板尺寸的默认头像，名为 default.jpg。 将下列代码复制到模板的 functions.php 下： /* Mini Gavatar Cache by Willin Kan. */ function my_avatar&#40; $email, $size = '42', $default = '', $alt = false &#41; &#123; &#160; $alt = &#40;false === $alt&#41; ? '' : esc_attr&#40; $alt &#41;; &#160; $f = [...]]]></description>
			<content:encoded><![CDATA[<p>最近 Gravatar 头像老是显示不能，google 之得一好方法。来自 <a href="http://kan.willin.org/?p=1320" rel="nofollow">Willin</a> 方法，将 Gravatar 头像缓存到服务器，不错、够速度，故分享之。<span id="more-131"></span></p>
<p>首先在你的网站 wp-content 的同级目录建立：/avatar，权限设置:755，这是 Gravatar 的缓存路径。<br />
准备一张适合你模板尺寸的默认头像，名为 default.jpg。<br />
将下列代码复制到模板的 functions.php 下：</p>
<div class="codecolorer-container javascript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">/* Mini Gavatar Cache by Willin Kan. */</span><br />
<span style="color: #003366; font-weight: bold;">function</span> my_avatar<span style="color: #009900;">&#40;</span> $email<span style="color: #339933;">,</span> $size <span style="color: #339933;">=</span> <span style="color: #3366CC;">'42'</span><span style="color: #339933;">,</span> $default <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> $alt <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; $alt <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span> <span style="color: #339933;">===</span> $alt<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">:</span> esc_attr<span style="color: #009900;">&#40;</span> $alt <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; $f <span style="color: #339933;">=</span> md5<span style="color: #009900;">&#40;</span> strtolower<span style="color: #009900;">&#40;</span> $email <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; $w <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'wpurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; $a <span style="color: #339933;">=</span> $w. <span style="color: #3366CC;">'/avatar/'</span>. $f. <span style="color: #3366CC;">'.jpg'</span><span style="color: #339933;">;</span><br />
&nbsp; $e <span style="color: #339933;">=</span> ABSPATH. <span style="color: #3366CC;">'avatar/'</span>. $f. <span style="color: #3366CC;">'.jpg'</span><span style="color: #339933;">;</span><br />
&nbsp; $t <span style="color: #339933;">=</span> <span style="color: #CC0000;">1209600</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//設定14天, 單位:秒</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> empty<span style="color: #009900;">&#40;</span>$default<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> $default <span style="color: #339933;">=</span> $w. <span style="color: #3366CC;">'/avatar/default.jpg'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_file<span style="color: #009900;">&#40;</span>$e<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> filemtime<span style="color: #009900;">&#40;</span>$e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> $t <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">//當頭像不存在或文件超過14天才更新</span><br />
&nbsp; &nbsp; $r <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'avatar_rating'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $g <span style="color: #339933;">=</span> sprintf<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;http://%d.gravatar.com&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span> hexdec<span style="color: #009900;">&#40;</span> $f<span style="color: #009900;">&#123;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">%</span> <span style="color: #CC0000;">2</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>. <span style="color: #3366CC;">'/avatar/'</span>. $f. <span style="color: #3366CC;">'?s='</span>. $size. <span style="color: #3366CC;">'&amp;d='</span>. $default. <span style="color: #3366CC;">'&amp;r='</span>. $r<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; copy<span style="color: #009900;">&#40;</span>$g<span style="color: #339933;">,</span> $e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> $a <span style="color: #339933;">=</span> esc_attr<span style="color: #009900;">&#40;</span>$g<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//新頭像 copy 時, 取 gravatar 顯示</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>filesize<span style="color: #009900;">&#40;</span>$e<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span> copy<span style="color: #009900;">&#40;</span>$default<span style="color: #339933;">,</span> $e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; $avatar <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;img title='{$alt}' alt='{$alt}' src='{$a}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' /&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">return</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'my_avatar'</span><span style="color: #339933;">,</span> $avatar<span style="color: #339933;">,</span> $email<span style="color: #339933;">,</span> $size<span style="color: #339933;">,</span> $default<span style="color: #339933;">,</span> $alt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #006600; font-style: italic;">// -- END ----------------------------------------</span></div></div>
<p>上面第一行的 <code class="codecolorer text dawn"><span class="text">$size</span></code> 可自定义头像大小，然后将所有 <code class="codecolorer text dawn"><span class="text">get_avatar()</span></code> 改 <code class="codecolorer text dawn"><span class="text">my_avatar()</span></code>，大概 functions.php，comments.php，sidebar.php，comments-ajax.php 会有头像的地方有 <code class="codecolorer text dawn"><span class="text">get_avatar()</span></code> 函数，因主题而已，自行修改。</p>
<p>注意 <code class="codecolorer text dawn"><span class="text">my_avatar()</span></code> 的方法和 <code class="codecolorer text dawn"><span class="text">get_avatar()</span></code> 有一点差别：<br />
<code class="codecolorer text dawn"><span class="text">get_avatar()</span></code> 可用 <code class="codecolorer text dawn"><span class="text">id</span></code> 或 <code class="codecolorer text dawn"><span class="text">email</span></code>，可写成 <code class="codecolorer text dawn"><span class="text">get_avatar($comment, $size= ...</span></code><br />
而 <code class="codecolorer text dawn"><span class="text">my_avatar()</span></code> 只能用 <code class="codecolorer text dawn"><span class="text">email</span></code>，要改成 <code class="codecolorer text dawn"><span class="text">my_avatar($comment-&gt;comment_author_email, $size= ...</span></code><br />
使用参数如下：<code class="codecolorer php dawn"><span class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> my_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$email</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default</span><span style="color: #339933;">,</span> <span style="color: #000088;">$alt</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span></code></p>
<p>以上转自 <a href="http://kan.willin.org/?p=1320" rel="nofollow" title="新版 Gravatar 缓存">Willin 的新版 Gravatar 缓存</a>，其实后面还有第二个方法，不用修改模板的，但有点小缺陷，详见该文的后续部分。</p>
<h4  class="related_post_title">Most Commented</h4><ul class="related_post"><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/themes/" title="Themes">Themes</a> (145)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li><li><a href="http://www.alanoy.com/darklight-2/" title="DarkLight 2.0">DarkLight 2.0</a> (129)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-2/" title="WordPress Theme: G-White 2.0">WordPress Theme: G-White 2.0</a> (123)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/wordpress-gravatar-cache/">Permalink</a> |
<a href="http://www.alanoy.com/wordpress-gravatar-cache/#comments">30 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/wordpress-gravatar-cache/&title=WordPress Gravatar 头像缓存">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/wordpress-gravatar-cache/&title=WordPress Gravatar 头像缓存" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/wordpress-gravatar-cache/&title=WordPress Gravatar 头像缓存" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/wordpress-gravatar-cache/&title=WordPress Gravatar 头像缓存" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/wordpress-gravatar-cache/&title=WordPress Gravatar 头像缓存" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/gravatar/" rel="tag">Gravatar</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/wordpress-gravatar-cache/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>用图片替换文字 Logo</title>
		<link>http://www.alanoy.com/use-photo-to-replace-the-text-logo/</link>
		<comments>http://www.alanoy.com/use-photo-to-replace-the-text-logo/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 03:32:13 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.alanoy.com/?p=122</guid>
		<description><![CDATA[用自制的图片来做博客的 Logo 相对文字 Logo 来说更美观、更多自定义性，鉴于 DarkLight 和 G-White 都没有这样设定，又有同学有需求，所以有此文。 通常主題的 Logo 在 header.php 里面的类似如下标签 h1 包含部分 &#60;div id=&#34;header&#34;&#62; &#160; &#160; &#60;h1&#62; &#160; &#160; &#160; &#160; &#60;a title=&#34;&#60;?php bloginfo('name'); ?&#62;&#34; href=&#34;&#60;?php bloginfo&#40;'siteurl'&#41;; ?&#62;&#34;&#62;&#60;?php &#160;bloginfo&#40;'name'&#41;; ?&#62;&#60;/a&#62; &#160; &#160; &#60;/h1&#62; &#60;/div&#62; 我们先设定 h1 标签选择器的内边距和外边距： #header h1 &#123; &#160; &#160; padding: 0; &#160; &#160; margin: 0; &#125; 然后设定 a [...]]]></description>
			<content:encoded><![CDATA[<p>用自制的图片来做博客的 Logo 相对文字 Logo 来说更美观、更多自定义性，鉴于 DarkLight 和 G-White 都没有这样设定，又有同学有需求，所以有此文。<span id="more-122"></span></p>
<p>通常主題的 Logo 在 header.php 里面的类似如下标签 <code class="codecolorer text dawn"><span class="text">h1</span></code> 包含部分</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php bloginfo('name'); ?&gt;</span></span>&quot; href=&quot;<span style="color: #009900;">&lt;?php bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'siteurl'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;?php &nbsp;bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></div>
<p>我们先设定 <code class="codecolorer text dawn"><span class="text">h1</span></code> 标签选择器的内边距和外边距：</p>
<div class="codecolorer-container css dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#header</span> h1 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
<p>然后设定 <code class="codecolorer text dawn"><span class="text">a</span></code> 标签选择器的样式：</p>
<div class="codecolorer-container css dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:98%;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#header</span> h1 a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999em</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*文字缩进，在屏幕里面看不到*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*设定 a 为块级元素，必须的*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'images/logo.gif'</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*你要作为 Logo 的图片，放在主题文件夹下的 images 文件夹里吧*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*图片高度，你的图片多高就写多少*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*图片宽度，你懂的*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*Logo 跟页面顶部的间距，看你自己需求而定，不用间开就直接删除吧*/</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
<p>这样就算替换完成，其他的文字替换成图片的方法其实都大同小异了。</p>
<h4  class="related_post_title">Related Posts</h4><ul class="related_post"><li><a href="http://www.alanoy.com/theme-optimus-plus/" title="Wordpress Theme: Optimus+">Wordpress Theme: Optimus+</a> (53)</li><li><a href="http://www.alanoy.com/aside-for-sale/" title="Wordpress 主题 aSide 出售">Wordpress 主题 aSide 出售</a> (140)</li><li><a href="http://www.alanoy.com/wordpress-theme-gwhite-3/" title="Wordpress Theme G-White 3.0">Wordpress Theme G-White 3.0</a> (156)</li><li><a href="http://www.alanoy.com/wordpress-theme-darklight-3/" title="WordPress 主题 DarkLight 3.0">WordPress 主题 DarkLight 3.0</a> (144)</li><li><a href="http://www.alanoy.com/jquery-hide-the-comment-author-info/" title="jQuery 隐藏老用户评论资料框">jQuery 隐藏老用户评论资料框</a> (20)</li><li><a href="http://www.alanoy.com/opacity-and-links-background-of-images/" title="DarkLight 和 G-White 主题的图片透明效果和超链接背景">DarkLight 和 G-White 主题的图片透明效果和超链接背景</a> (23)</li></ul><hr />
<p>© Alan for <a href="http://www.alanoy.com">Alan&#039;s World</a>, 2010. |
<a href="http://www.alanoy.com/use-photo-to-replace-the-text-logo/">Permalink</a> |
<a href="http://www.alanoy.com/use-photo-to-replace-the-text-logo/#comments">23 comments</a><br />
Add to <a href="http://del.icio.us/post?url=http://www.alanoy.com/use-photo-to-replace-the-text-logo/&title=用图片替换文字 Logo">del.icio.us</a> | <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.alanoy.com/use-photo-to-replace-the-text-logo/&title=用图片替换文字 Logo" alt="Google Bookmark" title="add to google bookmark">Google Bookmark</a> | <a href="http://digg.com/submit?phase=2&url=http://www.alanoy.com/use-photo-to-replace-the-text-logo/&title=用图片替换文字 Logo" alt="Digg" title="add to Digg">Digg</a> | <a href="https://favorites.live.com/quickadd.aspx?url=http://www.alanoy.com/use-photo-to-replace-the-text-logo/&title=用图片替换文字 Logo" alt="Live Bookmark" title="add to Live Bookmark">Live Bookmark</a> | <a href="http://www.facebook.com/share.php?u=http://www.alanoy.com/use-photo-to-replace-the-text-logo/&title=用图片替换文字 Logo" alt="Facebook" title="add to Facebook">Facebook</a>  
<br/>
Post tags: <a href="http://www.alanoy.com/tag/wordpress-theme/" rel="tag">Wordpress Theme</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.alanoy.com/use-photo-to-replace-the-text-logo/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

