<?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>空谷足音 &#187; Gravatar</title>
	<atom:link href="http://zu-yin.com/blog/tag/gravatar/feed" rel="self" type="application/rss+xml" />
	<link>http://zu-yin.com</link>
	<description>末月淡淡，那时的年少……</description>
	<lastBuildDate>Fri, 21 Oct 2011 04:57:33 +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>inove 实现异步 Gravatar 头像缓存</title>
		<link>http://zu-yin.com/blog/482.html</link>
		<comments>http://zu-yin.com/blog/482.html#comments</comments>
		<pubDate>Sat, 16 Oct 2010 13:27:21 +0000</pubDate>
		<dc:creator>无念</dc:creator>
				<category><![CDATA[生活琐事]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[inove]]></category>
		<category><![CDATA[头像]]></category>
		<category><![CDATA[异步]]></category>
		<category><![CDATA[缓存]]></category>

		<guid isPermaLink="false">http://zu-yin.com/blog/482.html</guid>
		<description><![CDATA[这个重阳真热闹，Gravatar 部分被墙了，0.gravatar.com 1.gravatar.com 等等统统撞墙，wordpress3.0 以上版本集体悲催。建议主机墙外的盆友直接用缓存，主机墙内的盆友要么降级 wp 要么修改头像获取地址为 www.gravatar.com 。 改获取地址很方便，但是要去动原程序，一升级就完蛋了。我承认我是一个懒人，能不动原程序坚决不动，所以我采用的是缓存法，只折腾主题一劳永逸。搜一下发现最流行的缓存法是 Willin Kan 的 缓存 Gravatar 头像方法，看着代码中的 copy($g, $e) 发呆不爽了半天，万一 gravatar 抽抽了怎么办？难道就一直和他扯皮么。又埋头继续努力发现了 光线志 的 异步执行的 Gravatar 缓存。 具体实现步骤光线志已经写的很详细了，我补充下 inove 调用 my_avatar 的方法，为 CP 做点贡献。 打开 functions.php 找到 &#60;?php if (function_exists(&#8216;get_avatar&#8217;) &#38;&#38; get_option(&#8216;show_avatars&#8217;)) { echo get_avatar($comment, $size =32); } ?&#62; 将 echo get_avatar($comment, $size =32); 修改为 echo [...]]]></description>
			<content:encoded><![CDATA[<p>这个重阳真热闹，Gravatar 部分被墙了，0.gravatar.com 1.gravatar.com 等等统统撞墙，wordpress3.0 以上版本集体悲催。建议主机墙外的盆友直接用缓存，主机墙内的盆友要么降级 wp 要么修改头像获取地址为 <a href="http://www.gravatar.com">www.gravatar.com</a> 。</p>
<p>改获取地址很方便，但是要去动原程序，一升级就完蛋了。我承认我是一个懒人，能不动原程序坚决不动，所以我采用的是缓存法，只折腾主题一劳永逸。搜一下发现最流行的缓存法是 Willin Kan 的 <a href="http://kan.willin.org/?p=1320">缓存 Gravatar 头像</a>方法，看着代码中的 copy($g, $e) 发呆不爽了半天，万一 gravatar 抽抽了怎么办？难道就一直和他扯皮么。又埋头继续努力发现了 光线志 的 <a href="http://beamnote.com/2010/asynchronous-implementation-of-the-gravatar-cache.html" target="_blank">异步执行的 Gravatar 缓存</a>。</p>
<p>具体实现步骤光线志已经写的很详细了，我补充下 inove 调用 my_avatar 的方法，为 CP 做点贡献。</p>
<p> <span id="more-482"></span>
<p>打开 functions.php 找到</p>
<blockquote><p>&lt;?php if (function_exists(&#8216;get_avatar&#8217;) &amp;&amp; get_option(&#8216;show_avatars&#8217;)) { echo get_avatar($comment, $size =32); } ?&gt;</p>
</blockquote>
<p>将 </p>
<p>echo get_avatar($comment, $size =32); </p>
<p>修改为</p>
<p>echo my_avatar( $comment->comment_author_email, $size =32);</p>
<p>即可，如果你使用了 ajax 评论请打开 comments-ajax.php 如法炮制。</p>
<p>ps：貌似png格式的头像依旧有问题</p>

				<br/>
		<p style="text-indent:2em">
			© <a target="_blank"  href="http://zu-yin.com">无念</a> for 
			<a target="_blank"  href="http://zu-yin.com"><strong>空谷足音</strong></a>：
		<a  target="_blank"  href="http://zu-yin.com/blog/482.html" title="Permanent Link to inove 实现异步 Gravatar 头像缓存">inove 实现异步 Gravatar 头像缓存</a>
		</p>
		<p style="text-indent:2em">※ <a target="_blank" href="http://zu-yin.com/blog/482.html#respond">去凑个热闹</a> | <a target="_blank" href="http://zu-yin.com/guestbook">留言</a> | <a target="_blank" href="http://zu-yin.com/viewer">相册</a> | 本文地址:<a target="_blank" href="http://zu-yin.com/blog/482.html">http://zu-yin.com/blog/482.html</a>
		</p>
				<p> <strong>声明:</strong> 本站遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh">署名-非商业性使用-相同方式共享</a> 协议. 转载请注明转自 <a href="http://zu-yin.com">zu-yin.com</a>
		</p><h3>相关日志</h3><ul><li><a href="http://zu-yin.com/blog/49.html" title="让我们拥有个性的头像 (2009年10月18日)">让我们拥有个性的头像</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://zu-yin.com/blog/482.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>让我们拥有个性的头像</title>
		<link>http://zu-yin.com/blog/49.html</link>
		<comments>http://zu-yin.com/blog/49.html#comments</comments>
		<pubDate>Sun, 18 Oct 2009 13:06:54 +0000</pubDate>
		<dc:creator>无念</dc:creator>
				<category><![CDATA[生活琐事]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[头像]]></category>

		<guid isPermaLink="false">http://www.zu-yin.com/?p=49</guid>
		<description><![CDATA[Gravatar  全球 头像]]></description>
			<content:encoded><![CDATA[<p><a href="http://gravatar.com/" target="_blank"><img class=" alignright" title="gravatar" src="http://i37.tinypic.com/3008w3d.jpg" alt="" width="320" height="93" /></a></p>
<p style="text-align: left;">
<p style="text-indent:2em">在留言区留言一般都使用的是默认头像，但是童鞋们是不甘平庸的，于是伟大的Gravatar诞生了，它的全称叫做“Globally Recognized Avatar”，翻译过来叫做全球通用头像。使用当你到任何一个支持Gravatar的网站留言时，这个网站都就会根据你所提供的Email地址为你显示出匹配的头像。当然，这个头像，是需要你事先到Gravatar的网站注册并上传的。<span id="more-49"></span>废话不说，下面就去打造自己的头像品牌……</p>
</p>
<ol>
<li>注册：进入Gravatar网站（网址<a href="http://gravatar.com/" target="_blank">http://gravatar.com/</a>），点击左上角菜单里的Sign Up。</li>
<li>验证：进入你的邮箱，验证地址。</li>
<li>设置昵称、密码。</li>
<li>选择上传图片：一般都是从电脑中上传（<span style="text-decoration: underline;">My computer’s hard drive</span>）。<img class="aligncenter" title="gravatar 文件 选择" src="http://i36.tinypic.com/vhclzs.jpg" alt="" width="483" height="250" /></li>
<li>自己对着图片使劲裁吧，裁到满意为止</li>
<li>评级：你的头像要被分级的，因为有的童鞋头像太个性，可能会影响小朋友身心健康的说。一般不直接选择G（通用型），这样基本任何网站都能显示这个等级的图片……<img class="aligncenter" style="margin-top: 10px; margin-bottom: 10px;" title="gravatar 分级" src="http://i35.tinypic.com/ofy3a0.jpg" alt="gravatar 分级" width="253" height="66" /></li>
<li>等待审核：可能需要站方短暂审核一下，一般选择了G，而你的图片没什么特别的，很快就通过。一般遇上慢的情况也就10分钟左右。</li>
</ol>
<p>完成了以上步骤，今后本博或其他支持Gravatar的网站留言都会显示你帅帅的头像了。</p>

				<br/>
		<p style="text-indent:2em">
			© <a target="_blank"  href="http://zu-yin.com">无念</a> for 
			<a target="_blank"  href="http://zu-yin.com"><strong>空谷足音</strong></a>：
		<a  target="_blank"  href="http://zu-yin.com/blog/49.html" title="Permanent Link to 让我们拥有个性的头像">让我们拥有个性的头像</a>
		</p>
		<p style="text-indent:2em">※ <a target="_blank" href="http://zu-yin.com/blog/49.html#respond">去凑个热闹</a> | <a target="_blank" href="http://zu-yin.com/guestbook">留言</a> | <a target="_blank" href="http://zu-yin.com/viewer">相册</a> | 本文地址:<a target="_blank" href="http://zu-yin.com/blog/49.html">http://zu-yin.com/blog/49.html</a>
		</p>
				<p> <strong>声明:</strong> 本站遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh">署名-非商业性使用-相同方式共享</a> 协议. 转载请注明转自 <a href="http://zu-yin.com">zu-yin.com</a>
		</p><h3>相关日志</h3><ul><li><a href="http://zu-yin.com/blog/482.html" title="inove 实现异步 Gravatar 头像缓存 (2010年10月16日)">inove 实现异步 Gravatar 头像缓存</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://zu-yin.com/blog/49.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

