<?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; 网站 博客</title>
	<atom:link href="http://fis.io/category/site/feed" rel="self" type="application/rss+xml" />
	<link>http://fis.io</link>
	<description>IT 相关的博客，分享关于Google, Firefox, 黑莓, 手机, 软件, WordPress, ...</description>
	<lastBuildDate>Fri, 08 Jul 2011 08:43:26 +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>打造完美的 ajax 版 Google 自定义搜索</title>
		<link>http://fis.io/ajax-google-custom-search-engine.html</link>
		<comments>http://fis.io/ajax-google-custom-search-engine.html#comments</comments>
		<pubDate>Thu, 11 Mar 2010 08:08:42 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[网络 服务]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1708</guid>
		<description><![CDATA[通常我们选用 Google CSE 自定义搜索引擎代替网站自身的搜索服务，可以减轻服务器的负载，但更重要的原因是 Google 搜索有强大的词语分割、智能匹配... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2007/10/search.gif" alt="" width="113" height="125" style="float: left; margin: 0 10px; " />通常我们选用 <a href="http://www.google.com/cse/" class="external" target="_blank" title="Google Custom Search Engine - Site search and more">Google CSE</a> 自定义搜索引擎代替网站自身的搜索服务，可以减轻服务器的负载，但更重要的原因是 Google 搜索有强大的词语分割、智能匹配、拼写纠正功能，甚至能将 "bb" 与 "BlackBerry", "DM" 与 "桌面管理器" 进行通配，这些算法是我们自己做不到的。我以前在博客中采用 iframe 版的 CSE, 最近把它换成了定制性更强，基于 <a href="http://code.google.com/intl/zh-CN/apis/ajaxsearch/documentation/" class="external" target="_blank" title="开发人员指南 - Google AJAX 搜索 API - Google 代码">Google ajax API</a> 的新版，将经验分享一下。本方案优点：<span id="more-1708"></span></p>
<ul>
<li>不搜索时完全不加载任何相关资源，如 ajax API 库等</li>
<li>搜索 url 非常干净，没有多余的参数：<a href="http://fis.io/search?q=cse">fis.io/search?q=cse</a></li>
<li>方便使用 javascript 对结果样式进一步调整</li>
</ul>
<h4>获取代码</h4>
<p>首先需要在 控制面板 - 外观<sup style="color: red; ">新功能！</sup>中选择“搜索元素”模式 (Search element), 再选择一种布局和一种样式。实际上 ajax API 能做的事情非常多，比如就在搜索框下方即时展开结果列表。如果把结果列表悬浮绝对定位，再加上 <a href="http://code.google.com/apis/ajax/playground/#search_as_user_types" class="external" target="_blank" title="Google Code Playground - Search as user Types">Search as user Types</a>, 就可以做 apple.com 右上角那种搜索样式了，一边输入一边匹配。</p>
<p>但是考虑到小博客的站内搜索被使用得并不多，我还是选择了两栏布局，将结果列表放在一个专门的页面 /search 中，这样的好处是不搜索的时候可以不加载多余的内容：API 库，JS, CSS 等等。</p>
<h4>改造搜索框</h4>
<p>先不急着把获取的那一大堆代码往搜索框上放，上面说了，我们要的效果是不搜索的时候不加载。就改造一下模板原生的搜索框就可以了，让它提交用户输入的内容到 /search 这个页面，就这样。我的 header.php 中的搜索框是这样的：</p>
<p><code class="html">&lt;form <span style="color: #4b0; ">action="/search"</span> id="searchbox"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="text" <span style="color: #4b0; ">name="q"</span> id="input_search" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="submit" value="搜索" /&gt;<br />
&lt;/form&gt;</code></p>
<p>一个 form 中装一个输入框和一个按钮，关键内容是 action="/search" 和 name="q", 表示将会跳转到 <a href="http://fis.io/search?q=cse">/search?q=搜索的内容</a>.</p>
<h4>结果页面</h4>
<p>建立一个页面 /search 来放入所有 CSE 代码。页面正文中放入 id="cse" 的 div, 搜索执行的时候脚本将会改写其中的内容。</p>
<p><code class="html">&lt;div <span style="color: #4b0; ">id="cse"</span>&gt;正在搜索...&lt;/div&gt;</code></p>
<p>然后在页面任意位置，比如末尾，写入前面获得的两个 javascript 代码，一个是 ajax API 库 google.com/jsapi, 另一个是以 google.load 开头的一大串。还有些 CSS, 是前面获取代码的时候选择的一种样式。</p>
<p>但这时候还不会自动执行用户之前输入的搜索，要从 url 请求中把搜索词剥离出来，并执行。这里我用了 <a href="http://www.imkevinyang.com/2009/12/在wordpress中轻松集成google自定义搜索引擎.html" class="external" target="_blank" title="在Wordpress中轻松集成Google自定义搜索引擎 | 简单生活 —— Kevin Yang的博客">Kevin Yang</a> 提供的方法，在 draw('cse') 一行后加入：</p>
<p><code class="js">var match = location.search.match(/q=([^&#038;]*)(&#038;|$)/);<br />
if(match &#038;& match[1]){<br />
&nbsp;&nbsp;&nbsp;&nbsp;var search = decodeURIComponent(match[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.execute(search);<br />
}</code></p>
<p>现在这个搜索系统就可以正常工作了。下面是对脚本的进一步自定义，只逐条说明，不每次都写完整的代码，我会把完整的修改后的脚本放在本文末尾。如果今后代码发生变动，请自行查看我的 <a href="http://fis.io/search?q=cse">搜索结果页</a> 源代码。</p>
<h4>不加载 Google 的 CSS</h4>
<p>如果要用自己网站的样式，最好是完全不加载 Google 的 CSS, 不然覆盖样式就有得写了。在 google.load 中加入 "nocss" : true 即可。</p>
<p><code class="js">google.load('search', '1', {language : 'zh-CN' , <span style="color: #4b0; ">"nocss" : true</span> });</code></p>
<h4>无结果时显示的文字</h4>
<p>由 setNoResultsString 控制，在无结果时将字串写入到 "正在搜索" 处。中文语言下缺省值为“无结果”</p>
<p><code class="js">customSearchControl.<span style="color: #4b0; ">setNoResultsString</span>('什么也没找到，请重试');</code></p>
<h4>结果每页条数</h4>
<p>由 setResultSetSize 控制，可选参数为 FILTERED_CSE_RESULTSET 10条；LARGE_RESULTSET 8条；SMALL_RESULTSET 4条。</p>
<p><code class="js">customSearchControl.<span style="color: #4b0; ">setResultSetSize</span>( google.search.Search.SMALL_RESULTSET);</code></p>
<h4>是否在新标签中打开链接</h4>
<p>由 setLinkTarget 控制，一般用到的就是 LINK_TARGET_BLANK 和 LINK_TARGET_SELF 两种。</p>
<p><code class="js">customSearchControl.<span style="color: #4b0; ">setLinkTarget</span>( google.search.Search.LINK_TARGET_SELF);</code></p>
<h4>搜索执行完毕后调用其它脚本</h4>
<p>由 setSearchCompleteCallback 控制，这是一个相当灵活的命令，我这里用它来将搜索结果标题中的“老肥博客 » 非唠不可”去掉，不然每条标题后面都有这样一句，比较难看。这里我另外加载了 jQuery 来用，当然这不是必需的，如果没有需要就不用了。</p>
<p><code class="js nowrap">customSearchControl.<span style="color: #4b0; ">setSearchCompleteCallback</span>(null, function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$('input.gsc-input').select();<br />
&nbsp;&nbsp;&nbsp;&nbsp;$('a.gs-title').unwrap().wrap('&lt;h3&gt;&lt;/h3&gt;').each(function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var title = $(this).html().replace(/\|.*/g, '');<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(this).html(title);<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;$('b:contains("...")').contents().unwrap();<br />
});</code></p>
<p class="clear">以上在 setSearchCompleteCallback 中执行了三个步骤：</p>
<ul>
<li>将焦点放到搜索框 input.gsc-input 中并全选文字；</li>
<li>将搜索结果标题链接 a.gs-title 先去掉外面的一层 div, 再套在 &lt;h3&gt; 内（这样方便沿用全局 CSS 里面的标题样式），然后对每个标题链接读取内容，替换，写回去；</li>
<li>将包含 "..." 的关键字高亮去掉 &lt;b&gt;;（Google 用 &lt;b&gt; 标示关键字，但不知为何 "..." 也都这样标记）</li>
</ul>
<h4>其它</h4>
<p>我的搜索页面中还有一些脚本和样式，比如将 CSE 的搜索框伪装成模板原生的输入框，这样可以避免多次搜索的时候重复加载页面；从搜索框中取得当前关键字，写入到右侧提示区；等等，比较特殊，这里就不细写了，反正 Firebug 什么的都一眼看穿。</p>
<p>另外，前面提到 Kevin 的文章中有个技巧很不错，只让单篇文章出现在搜索结果中，排除掉翻页、标签等页面，像我用 .html 作为单篇文章的链接结构就很好办，直接在 CSE 控制面板中设置“包含的网站”为 fis.io/*.html, 就排除了其它形式的链接结构。</p>
<p>微博也是博客，我在 fis.io/*.html 之外还将 twitter.com/fisio/* 编入了索引，在搜索某些内容的时候会看到我的推也在搜索结果中。</p>
<p>最后是我的 /search 页面中相关脚本完整版：</p>
<p><code class="js nowrap">&lt;script src="http://www.google.com/jsapi" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;script type="text/javascript"&gt;<br />
google.load('search', '1', {language : 'zh-CN' , "nocss" : true });<br />
google.setOnLoadCallback(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;var customSearchControl = new google.search.CustomSearchControl('015811090669888844099:szzhafqj8_4');<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.setNoResultsString('&lt;img src="/b.gif" class="wp-smiley sm-sad"&gt;&nbsp;&nbsp;什么也没找到，请重试');<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.setSearchCompleteCallback(null,function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('input.gsc-input').select();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var searchwords = $('input.gsc-input').val();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('.p &gt; b').text(searchwords);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('a.gs-title').addClass('new').unwrap().wrap('&lt;h3&gt;&lt;/h3&gt;').each(function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var title = $(this).html().replace(/\|.*/g, '');<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(this).html(title);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('b:contains("...")').contents().unwrap();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('.gsc-cursor-current-page').removeClass('gsc-cursor-page');<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.draw('cse');<br />
&nbsp;&nbsp;&nbsp;&nbsp;var match = location.search.match(/q=([^&#038;]*)(&#038;|$)/);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if(match &#038;& match[1]){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var search = decodeURIComponent(match[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSearchControl.execute(search);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
});<br />
&lt;/script&gt;</code></p>
<h4 class="clear">参考文献</h4>
<ul>
<li><a href="http://code.google.com/intl/zh-CN/apis/ajaxsearch/documentation/" class="external" target="_blank" title="开发人员指南 - Google AJAX 搜索 API - Google 代码">开发人员指南 - Google AJAX 搜索 API - Google 代码</a></li>
<li><a href="http://code.google.com/intl/zh-CN/apis/ajaxsearch/documentation/reference.html" class="external" target="_blank" title="类参考 - Google AJAX 搜索 API - Google 代码">类参考 - Google AJAX 搜索 API - Google 代码</a></li>
<li><a href="http://www.imkevinyang.com/2009/12/在wordpress中轻松集成google自定义搜索引擎.html" class="external" target="_blank" title="在Wordpress中轻松集成Google自定义搜索引擎 | 简单生活 —— Kevin Yang的博客">在Wordpress中轻松集成Google自定义搜索引擎 | 简单生活 —— Kevin Yang的博客</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/ajax-google-custom-search-engine.html/feed</wfw:commentRss>
		<slash:comments>166</slash:comments>
		</item>
		<item>
		<title>全新的评论区体验</title>
		<link>http://fis.io/comment-new-experience.html</link>
		<comments>http://fis.io/comment-new-experience.html#comments</comments>
		<pubDate>Sat, 27 Feb 2010 11:44:25 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[创意 设计]]></category>
		<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1673</guid>
		<description><![CDATA[最近又折腾上了 WordPress 模板，把很久没有动过的评论输入框做了些修葺，看上去有些不一样了 对以前评论过的人隐藏资料输入部分 这个功能在很多博... ]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin: 5px 15px 5px 0;" src="http://fis.io/wp-content/uploads/2008/06/painting.png" alt="" />最近又折腾上了 WordPress 模板，把很久没有动过的评论输入框做了些修葺，看上去有些不一样了 <img src='/b.gif' alt=':eek:' class='wp-smiley sm-eek' /> </p>
<h4>对以前评论过的人隐藏资料输入部分</h4>
<p>这个功能在很多博客都可以看到，让常客不再重复看到资料输入框，需要的时候点击就可以展开修改。另外预先显示评论者自己的全球阿凡达，用回形针别在右上角。下面欢迎来自天鹅海的组合大城小爱里的，<a href="http://ell.im/" target="_blank" title="这正在夭折的" class="external">小爱同学</a> 做群众演员：<span id="more-1673"></span></p>
<p align="center"><img src="http://fis.io/wp-content/uploads/2010/02/comment-form.png" alt="新的评论输入框设计" /></p>
<p>js 隐藏代码参考了 <a href="http://www.neoease.com/wordpress-guest-post/" target="_blank" title="提高 WordPress 访客评论时的用户体验" class="external">享总的文章</a>，另外多了个享总没有提到的细节，展开和收起按钮按下之后会把焦点放到相应的输入框内，也就是多执行一个 .focus(); 以下是“更改”按钮 onclick 时执行的 jQuery 脚本：</p>
<p><code class="js">$('#author_info').slideDown('fast');<br />
<strong>$('#author').focus();</strong><br />
$('#show_author_info').hide();<br />
$('#hide_author_info').show();</code></p>
<p>如果访客 cookies 中有曾经评论过的 email 信息，则预先显示头像。在 comments.php 中合适的地方先判断是否存在 email, 如果有则输出一个头像。</p>
<p><code class="php">&lt;?php if ( $comment_author_email ) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '&lt;a href="..."&gt;' . get_avatar(<br />
&nbsp;&nbsp;&nbsp;&nbsp;$comment_author_email, 40 ) . '&lt;/a&gt;';<br />
} ?&gt;</code></p>
<p>为了看上去生动些，头像被旋转了 10 度，这是用 CSS 实现的，参考我那篇关于 <a href="http://fis.io/css-3-hover-animations.html" title="学习笔记: CSS3 鼠标悬停动画">CSS3 动画的文章</a>。这有一些浏览器的局限性，比如 Chrome Windows 一直有个 bug, 在图像被旋转后，边缘不能反锯齿；Firefox 则一直不能对无 padding 的图像进行圆角，除非图像处在背景中。于是我把 Firefox 下链接的 border 圆角也一并拿掉了。</p>
<h4 style="margin-top: 40px; ">动态的输入框浮动</h4>
<p><a href="http://gluedideas.com/" target="_blank" title="Subtle for WordPress" class="external">GluedIdeas Subtle</a> 主题原来是有输入框浮动的，但使用的是 position: fixed; 现在改成 jQuery 来做，在页面滚动的时候浮动是动态的了，顺便还兼容了 IE. 代码来自 <a href="http://css-tricks.com/scrollfollow-sidebar/" target="_blank" title="Scroll/Follow Sidebar, Multiple Techniques | CSS-Tricks" class="external">CSS-Tricks</a>.</p>
<h4 style="margin-top: 40px; ">可展开的表情按钮栏</h4>
<p align="center" style="margin: 20px 0; "><img src="http://fis.io/wp-content/uploads/2010/02/smilies-toolbar.png" alt="表情按钮栏" /></p>
<p>表情按钮收起来了，放在大输入框内，点击则展开。同样是由 jQuery 来执行的，按钮按下的时候做三件事情：焦点放到大输入框里去；用 jQuery .toggle() 脚本来展开或收起表情按钮；按钮本身切换一个 class, 在笑脸和关闭叉叉之间切换。</p>
<p><code class="js">$('#comment').focus();<br />
$('#smilies_toolbar').toggle('fast');<br />
$('#toggle-smilies').toggleClass('close');</code></p>
<h4 style="margin-top: 40px; ">新的评论回复样式</h4>
<p align="center"><img src="http://fis.io/wp-content/uploads/2010/02/comment-reply.png" alt="回复评论" /></p>
<p>回复别人的评论时出现一个黄色的提示条，类似于博客界出名的 <a href="http://www.kenengba.com/" target="_blank" title="可能吧" class="external">绿条禅</a>，同时有个小箭头指向被回复的评论。</p>
<p>评论回复是基于枫叶的插件 <a href="http://blog.2i2j.com/plugins/wordpress-thread-comment" target="_blank" title="Wordpress Thread Comment / 偶爱偶家" class="external">WordPress Thread Comment</a>, 经过了枫叶和我的一些修改，目前这样已经完全符合我的需要了。喜欢这个插件的朋友不妨去插件页进行捐助，支持开发。</p>
<h4 style="margin-top: 40px; ">评论列表</h4>
<p>左侧评论列表也有一些小的变化，比如回复会比较小一些，编号字体换成了 <span style="font-family: Georgia, serif; font-style: italic; ">Georgia</span>, 以前我没有放上每条评论的链接，现在也放在了编号上，只不过颜色还是灰色的。</p>
<h4 style="margin-top: 40px; ">最后</h4>
<p>如果出现显示问题可能需要刷新一下，避免使用浏览器缓存，最近的改动挺多的。另外如果您发现滚动很卡，可以回复我说一下浏览器和电脑配置 <img src='/b.gif' alt=':P' class='wp-smiley sm-tongue' /> </p>
<h4 class="round5px" style="margin-top: 40px; padding: 5px; background-color: #fea; text-align: center; ">更新</h4>
<p>本文发布 3 小时，评论数达到 98 条，当然主要是几个朋友在疯狂灌水啦，除了我自己之外差不多就是：<a target='_blank' class='external' href='http://ELl.im'>ELL</a> <a target='_blank' class='external' href='https://jimmyxu.com/'>Jimmy Xu</a> <a target='_blank' class='external' href='http://terryxxy.com'>Sunny</a> <a class='external' target='_blank' href='http://lisker.im'>lisker</a>, 大家都在盖楼──往地下室盖。</p>
<p>WordPress Thread Comment 这个插件是限制回复层数的，但仅仅是在超过层数的时候不输出回复按钮，而数据发往服务器并不验证。之前在 @terryxxy （上面的 Sunny）博客上我就在说，改动很简单，只需要 Firebug, 或者 Safari, Chrome 上类似的自带调试工具。找到评论输入框下面用来发送相关数据的两个 &lt;input type="hidden"&gt;:</p>
<p><code>&lt;p&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="hidden" id="comment_reply_ID"<br />
&nbsp;&nbsp;&nbsp;&nbsp;name="comment_reply_ID" value="0" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="hidden" id="comment_reply_dp"<br />
&nbsp;&nbsp;&nbsp;&nbsp;name="comment_reply_dp" value="0" /&gt;<br />
&lt;/p&gt;</code></p>
<p>在 value 里填入想要回复的评论 ID 和深度 dp 就可以了。这也是按了回复按钮之后会通过 javascript 修改的两个数值。这样就可以无限回复下去了。你猜最后回复到了地下多少层？B31! 以前我只在回复前标一个 "Re", 今天为了大家盖楼方便，把地下楼层编号 B2 B3 也输出了 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> </p>
<p>然后新的问题出现了，每层回复都会在左边缩进，比如 margin-left: 20px; 算算地下 31 层得多少，早就撑破了。锲而不舍的 <a target='_blank' class='external' href='https://jimmyxu.com/'>Jimmy Xu</a> 同学不光一直往下破，而且还在截图 <img src='/b.gif' alt=':o' class='wp-smiley sm-surprised' /> </p>
<p>于是呢，我在插件设置页加入了一点判断，当楼层数 $deep > 14 的时候多输出一个 class="min-width", 然后让它 margin-left: 0; 效果是在地下 14 层之后不再缩进。但 Jimmy 同学 <a href="#comment-10653">觉得不满意</a>，最后我的方案：</p>
<p><code class="php">&lt;?php echo ' style="margin-left: ' . ceil(30/sqrt($deep)) . 'px; "'; ?&gt;</code></p>
<p>进行了 margin-left = 30除以(楼层数开平方)再取整，第一层回复 30px, 第四层 15px, 到第 25 层，margin-left 就只有 6px 了。于是呢，从线性变为弧线，看看最后的效果：</p>
<p align="center"><img src="http://fis.io/wp-content/uploads/2010/02/deep.png" alt="" /></p>
<p>另外下面是 @terryxxy 在 70 条评论的时候的截图，点击查看完整全图 <a href="http://img.ly/z8O" target="_blank" class="external">http://img.ly/z8O</a></p>
<p align="center"><a href="http://img.ly/z8O" target="blank"><img src="http://img.ly/show/medium/z8O" class="piclink" width="320" height="240" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/comment-new-experience.html/feed</wfw:commentRss>
		<slash:comments>217</slash:comments>
		</item>
		<item>
		<title>WordPress 插件 img.ly gallery</title>
		<link>http://fis.io/imgly-gallery.html</link>
		<comments>http://fis.io/imgly-gallery.html#comments</comments>
		<pubDate>Mon, 15 Feb 2010 11:47:16 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1632</guid>
		<description><![CDATA[plugin page hosted on wordpress.org 这是我的第一个发布到官网的插件，用来显示最新上传到 img.ly 的图片。可以简单地在 widgets 里面添加启用它，或者自行插... ]]></description>
			<content:encoded><![CDATA[<ul>
<li class="cat-item-165"><a href="http://wordpress.org/extend/plugins/imgly-gallery/" title="WordPress › img.ly gallery « WordPress Plugins" class="external" target="_blank">plugin page hosted on wordpress.org</a></li>
</ul>
<p>这是我的第一个发布到官网的插件，用来显示最新上传到 img.ly 的图片。可以简单地在 widgets 里面添加启用它，或者自行插入 php 代码。基于 pepijnkoning 的插件 <a href="http://wordpress.org/extend/plugins/my-twitpics/" title="WordPress › My Twitpics « WordPress Plugins" class="external" target="_blank">My Twitpics</a>.</p>
<p>widget 可选择的参数包括 widget 标题、Twitter ID（必须）、图片尺寸等，注意输出的预览图原始尺寸为 75x75, 所以最好不要将 "Picture Size" 设置超过 75. "Border color" 则可以填入 html 允许的颜色名称或者 #D3D3D3.<span id="more-1632"></span></p>
<p align="center"><img src="http://s.wordpress.org/extend/plugins/imgly-gallery/screenshot-1.png" alt="img.ly gallery widget" width="387" height="463" /></p>
<p>如果需要进一步样式化，可以使用已置入的 class:</p>
<p><code class="css">p.widget_imgly_p {...}<br />
img.imgly {...}</code></p>
<p>不使用 widget 的时候，需要插入的代码是：</p>
<p><code class="php">&lt;?php imgly_pics($username = fisio, $num = 5); ?&gt;</code></p>
<p>输出的内容仅为图片，不包含标题和 p, 样式化同样可以针对 img.imgly</p>
<p>效果可参照我的 <a href="http://fis.io/photos" title="照片">照片页面</a> 右侧。</p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/imgly-gallery.html/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>CSS 文字阴影在网页设计中的应用</title>
		<link>http://fis.io/text-shadow.html</link>
		<comments>http://fis.io/text-shadow.html#comments</comments>
		<pubDate>Sun, 17 Jan 2010 04:37:42 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[创意 设计]]></category>
		<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1426</guid>
		<description><![CDATA[C S S不久以前我有一篇文章介绍了 CSS3 鼠标悬停动画，里面简单提过关于 text-shadow, 本文则是详细写 text-shadow. 很遗憾 IE 仍然无缘，IE8 都不行，在这个 I... ]]></description>
			<content:encoded><![CDATA[<style type="text/css">a.button, a.button:visited, a.button:hover { font-size: 16px; font-weight: bold; color: #fff; background-color: #d80; border-bottom: 1px solid #960; border-right: 1px solid #b70; -moz-border-radius: 5px; -webkit-border-radius: 5px; text-decoration: none; padding: 0.3em 0.8em; text-shadow: 0 1px 0 rgba(0,0,0,0.4); -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.3); -webkit-box-shadow: 0 1px 4px rgba(0,0,0,0.3); -webkit-transition: none; } a.button:hover {border: none; border-top: 1px solid #960; border-left: 1px solid #b70;  background-color: #e90; text-shadow: 0 -1px 0 rgba(0,0,0,0.4); -moz-transform: translate(0,1px); -webkit-transform: translate(0,1px); }</style>
<p><a class="button" href="http://fis.io/text-shadow.html" style="float: left; margin: 5px 15px 5px 5px; font-family: Georgia; padding: 0.3em 0.6em; ">C S S</a>不久以前我有一篇文章介绍了 <a href="http://fis.io/css-3-hover-animations.html" title="学习笔记: CSS3 鼠标悬停动画">CSS3 鼠标悬停动画</a>，里面简单提过关于 text-shadow, 本文则是详细写 text-shadow. 很遗憾 IE 仍然无缘，IE8 都不行，在这个 IE 特别是 IE6 居高不下的国度怎么办，由它去吧。</p>
<h4>兼容性</h4>
<p>据 <a href="https://developer.mozilla.org/En/CSS/Text-shadow" target="_blank" class="external" title="text-shadow - MDC">MDC 的文档</a>，支持 text-shadow 的浏览器有 Firefox 3.5, Chrome 2.0, Opera 9.5, Safari 4.0, 其中 Safari 是老早就可以的，但直到 4.0 才支持多重阴影。另外 Opera mini 也能显示，但比较弱，阴影不能模糊。<span id="more-1426"></span></p>
<h4>阴影文字和发光文字</h4>
<p>一个最简单的阴影文字是如下这样写的，其中 1px 2px 代表阴影相对于文字向右下方向偏移了 1px 2px, 可以为负值；5px 代表阴影的模糊半径，取值越大，阴影越扩散看不见。最后是阴影颜色。这样的阴影适合字号比较大的文字。</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; background-color: #eee; text-shadow: 1px 2px 5px #888; ">text-shadow: 1px 2px 5px #888;</p>
<p style="margin-bottom: 50px; padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #000; background-color: #000; text-shadow: 0 0 10px #fd8; ">text-shadow: 0 0 10px #fd8;</p>
<h4>浮雕文字</h4>
<p align="center"><img src="http://fis.io/wp-content/uploads/2010/01/mac-text-shadow.png" alt="Text shadows on a Mac" title="Text shadows on a Mac" /></p>
<p>浮雕文字效果在 Mac OS X 和 iPhone 中随处可见，由于阴影半径很小，一般是 0 或 1px, 所以也适合小号的文本。在使用上一般遵循这个原则：深色文字浅色背景，用白阴影，浅色文字深色背景，用黑阴影。</p>
<p style="padding: 0.2em 1em; font-family: Monaco, 'Courier New', monospace; color: #000; background-color: #aaa; text-shadow: 0 1px 0 #eee; ">text-shadow: 0 1px 0 #eee; 凹进效果</p>
<p style="padding: 0.2em 1em; font-family: Monaco, 'Courier New', monospace; color: #fff; background-color: #789; text-shadow: 0 -1px 0 #123; ">text-shadow: 0 -1px 0 #123; 凹进效果</p>
<p style="padding: 0.2em 1em; font-family: Monaco, 'Courier New', monospace; color: #000; background-color: #aaa; text-shadow: 0 -1px 1px #eee; ">text-shadow: 0 -1px 1px #eee; 凸出效果</p>
<p style="margin-bottom: 50px; padding: 0.2em 1em; font-family: Monaco, 'Courier New', monospace; color: #fff; background-color: #789; text-shadow: 0 1px 1px #123; ">text-shadow: 0 1px 1px #123; 凸出效果 - http://fis.io/</p>
<h4>多重阴影</h4>
<p>在上面所列的新版浏览器中都已经支持多重阴影，可以达到一些特殊的效果，不过注意，如果文字和背景颜色接近，IE 下就杯具了。</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #fff; background-color: #eee; text-shadow: 0 -1px 0 #000, 1px 0 0 #000, 0 1px 0 #000, -1px 0 0 #000; ">text-shadow: 0 -1px 0 #000, 1px 0 0 #000, 0 1px 0 #000, -1px 0 0 #000;</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #fff; background-color: #bcf; text-shadow: 1px 1px 5px #08c, 1px 1px 0 #68a; ">text-shadow: 1px 1px 5px #08c, 1px 1px 0 #68a;</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #014; background-color: #eee; text-shadow: -2px 0 1px #db6, 2px 0 1px #6bd; ">text-shadow: -2px 0 1px #db6, 2px 0 1px #6bd;</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #888; background-color: #888; text-shadow: -1px -1px 0 #ccc, -1px -1px 3px #ccc, 1px 1px 0 #444, 1px 1px 3px #444; ">text-shadow: -1px -1px 0 #ccc, -1px -1px 3px #ccc, 1px 1px 0 #444, 1px 1px 3px #444;</p>
<p style="line-height: 200%; margin-bottom: 50px; padding: 1.5em 1em 0.5em; font-family: Monaco, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #000; background-color: #000; text-shadow: 0 0 4px #ccc, 0 -5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -18px 18px #f20; ">text-shadow: 0 0 4px #ccc, 0 -5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -18px 18px #f20;</p>
<h4>鼠标悬停切换</h4>
<p>让鼠标悬停的时候改变状态是个不错的主意，有很强的互动的感觉。阅读器中可能看不到效果。另外，在 Firefox, Chrome, Safari 中能看到整个按钮也有阴影，这是另一个应用于块模型的阴影属性，写法和 text-shadow 一样，但需要写两条：-moz-box-shadow 和 -webkit-box-shadow.</p>
<p align="center" style="margin-bottom: 50px; "><a class="button" href="http://fis.io/text-shadow.html">把鼠标放到按钮上切换阴影</a></p>
<h4>半透明阴影颜色</h4>
<p>有时候需要做的阴影不想它模糊半径太大，又不能太黑，于是从黑色改为灰色──问题来了，灰色的阴影在深色背景上很难看。</p>
<p style="padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 14px; font-weight: bold; color: #000; background: #357 url(http://fis.io/wp-content/uploads/2010/01/bg.png) repeat-y 0 0; text-shadow: 1px 2px 3px #888; ">text-shadow: 1px 2px 3px #888; 杯具了</p>
<p>这时候要用到 rgba 颜色，在红绿蓝之外还有第四个值 alpha 通道，取值在 0~1 之间。下面的阴影是黑色，但是半透明了。半透明阴影的适应性明显更强，在模糊半径很小的时候，也能透出底下的背景色来。</p>
<p style="margin-bottom: 50px; padding: 0.5em 1em; font-family: Monaco, 'Courier New', monospace; font-size: 14px; font-weight: bold; color: #000; background: #357 url(http://fis.io/wp-content/uploads/2010/01/bg.png) repeat-y 0 0; text-shadow: 1px 2px 3px rgba(0,0,0,0.5); ">text-shadow: 1px 2px 3px rgba(0,0,0,0.5);</p>
<h4>动态阴影</h4>
<p>搭配上 <a href="http://fis.io/css-3-hover-animations.html" title="学习笔记: CSS3 鼠标悬停动画">前文</a> 介绍过的 -webkit-transition, 可以让阴影在鼠标经过时有个变化过程，仅 Chrome, Safari 等 WebKit 浏览器有效。</p>
<style type="text/css">a.motion, a.motion:visited { -webkit-transition: all 0.5s ease-in-out; color: #0c0; text-shadow: 0 0 100px #0f0; text-decoration: none; } a.motion:hover {color: #0f0; text-shadow: 0 0 4px #0f0; text-decoration: none; }</style>
<p align="center" style="padding: 1em; font-size: 18px; font-weight: bold; background-color: #000; "><a class="motion" href="http://fis.io/text-shadow.html">把鼠标放到文字上，阴影在 0.5 秒内聚拢</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/text-shadow.html/feed</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>改域名，像大爷们一样去建国</title>
		<link>http://fis.io/new-domain.html</link>
		<comments>http://fis.io/new-domain.html#comments</comments>
		<pubDate>Wed, 09 Sep 2009 14:34:47 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[域名]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1092</guid>
		<description><![CDATA[标题是瞎写的，跟内容啥关系也没有，这篇文章主要是想告诉大家，我内心十分渴望向狂欢派对献礼，但是初这初那的早都献没了，就剩域名里还有“... ]]></description>
			<content:encoded><![CDATA[<p align="center" style="margin-top: -15px; "><img src="http://fis.io/wp-content/uploads/2009/09/new-domain.png" alt="fisio.cn → fis.io" title="fisio.cn → fis.io" /></p>
<p>标题是瞎写的，跟内容啥关系也没有，这篇文章主要是想告诉大家，我内心十分渴望向狂欢派对献礼，但是初这初那的早都献没了，就剩域名里还有“处男”二字，于是毅然决定剪下来献给派对。什么，你说我献错人了？不会错啦，派对到谁家都是主角啦。当然标题可以作另一种理解，就是我终于领悟到了“最后的疼爱是手放开”，爱她，就要离开，于是我把域名搬到印度洋小岛去了。<span id="more-1092"></span></p>
<p>就是这么个事儿，老肥博客的域名变短了，由于更改了 feedsky 的源，所以今天在阅读器中骚扰到了大家，在此道歉 <img src='/b.gif' alt=':eek:' class='wp-smiley sm-eek' />  另外，如果您订阅我的地址是 feeds.fisio.cn 或者 feeds.fisio.cn/fisio, 几个月之后老域名过期，它们会失效，我将只保留这个：</p>
<h4 style="margin: 0 0 25px 20px; "><a href="http://feed.feedsky.com/fisio" title="订阅老肥博客" style="letter-spacing: 0.1em;" class="icon-left">http://feed.feedsky.com/fisio</a></h4>
<p>烦请较早订阅的朋友动手改一下。有链接我的博客有空也请更新一下链接吧。我的 Gtalk 等帐号更改到了 i@新域名，<a href="http://dabr.co.uk/user/fisio" target="_blank" class="external" title="Follow me on Twitter!">Twitter</a> 当然就不变啦。</p>
<p>最后，感谢 <a href="http://showfom.com/" target="_blank" class="external" title="Showfom's Blog - Google + FireFox + WordPress = G.F.W.">Showfom</a> 提供的优惠购买信息，感谢 <a href="http://hugege.com/" target="_blank" class="external" title="胡戈戈">胡戈戈</a> 在迁移中的强大支持，祖国满赛！</p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/new-domain.html/feed</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
		<item>
		<title>晒一晒我用过的博客页眉</title>
		<link>http://fis.io/my-blog-headers.html</link>
		<comments>http://fis.io/my-blog-headers.html#comments</comments>
		<pubDate>Sat, 27 Jun 2009 13:26:54 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[创意 设计]]></category>
		<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1048</guid>
		<description><![CDATA[我们这一代人不少都迷过 Michael Jackson, 我虽然谈不上迷，但也非常喜欢他的 MV, 像 Black or White, Remember the Time, Ghosts, ... 能让我回想起中学的时候同学找... ]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://fis.io/wp-content/uploads/2009/06/7-michael.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-7-michael.jpg" class="piclink" border="0" /></a></p>
<p>我们这一代人不少都迷过 Michael Jackson, 我虽然谈不上迷，但也非常喜欢他的 MV, 像 Black or White, Remember the Time, Ghosts, ... 能让我回想起中学的时候同学找我借他的 VCD 的那些时光，当然还有同桌女生，不知道她结婚了没。两年来我换过八个博客页眉 banner, 今天一起晒晒罢。<span id="more-1048"></span></p>
<ul>
<li>这是 <a href="http://gluedideas.com/" target="_blank" class="external" title="Subtle for WordPress">Subtle theme</a> 的默认页眉，属于挺耐看的那种，温暖，清新。
<p><a href="http://fis.io/wp-content/uploads/2009/06/0-subtle-theme.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-0-subtle-theme.jpg" class="piclink" border="0" /></a></li>
<li><a href="http://fis.io/wordcamp-china-2008.html" title="WordCamp China 2008 摘趣">去年 WordCamp</a> 之前我第一次尝试通过页眉图案和链接来向访客宣传，图案来自 WordCamp China 官方网站的设计。
<p><a href="http://fis.io/wp-content/uploads/2009/06/1-wordcamp-2008.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-1-wordcamp-2008.jpg" class="piclink" border="0" /></a></li>
<li>T-Mobile G1 发布之后，我发表了些 <a href="http://fis.io/t-mobile-g1-unboxing.html" title="T-Mobile G1 上手试玩报告">照片</a> 和 <a href="http://fis.io/totally-shocked-by-android.html" title="完全被 Android 所震撼">试用报告</a>，被 Android 所深深吸引，于是有了这个页眉。
<p><a href="http://fis.io/wp-content/uploads/2009/06/2-android.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-2-android.jpg" class="piclink" border="0" /></a></li>
<li>年初我 <a href="http://fis.io/macbook-panda.html" title="Mac 我来鸟">入了水果教</a>，琢磨着也弄了一个，但嫌颜色太艳丽，于是这是唯一一个没有挂出来过的图。
<p><a href="http://fis.io/wp-content/uploads/2009/06/3-apple.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-3-apple.jpg" class="piclink" border="0" /></a></li>
<li>后来我用一张 Mac 自带墙纸 Evening Reflections 加工了它，并使用至今，没有纪念页眉的时候就是它了。
<p><a href="http://fis.io/wp-content/uploads/2009/06/4-reflections.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-4-reflections.jpg" class="piclink" border="0" /></a></li>
<li>WordCamp Shanghai 2009 非常非常的成功，对每个 WordPress fans 来说，错过了都是一种遗憾。而且内容已经从 WordPress 拓展到许多网络热门话题、风云人物，比如 <a href="https://twitter.com/isaac" target="_blank" class="external" title="Isaac Mao (isaac) on Twitter">Isaac</a> 与草泥马的精彩故事。
<p><a href="http://fis.io/wp-content/uploads/2009/06/5-wordcamp-2009.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-5-wordcamp-2009.jpg" class="piclink" border="0" /></a></li>
<li>下面这是我现在看来都还激情澎湃无法平静的一个页眉，是我花了一个多小时把它从 <a href="http://commons.wikimedia.org/wiki/数字手势" target="_blank" class="external" title="数字手势 - Wikimedia Commons">素材</a> 中仔细抠出来的，还一度被推友认为是我实拍的呢 <img src='/b.gif' alt=':D' class='wp-smiley sm-grin' />  挂出来的时间仅仅两天，不需要这样压抑无声的愤怒的那一天，却还很遥远。
<p><a href="http://fis.io/wp-content/uploads/2009/06/6-535.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-6-535.jpg" class="piclink" border="0" /></a></li>
<li>最后这个，献给所有喜欢他的人们，祝愿他在天堂永生！
<p><a href="http://fis.io/wp-content/uploads/2009/06/7-michael.jpg" title="查看大图"><img src="http://fis.io/wp-content/uploads/2009/06/0-7-michael.jpg" class="piclink" border="0" /></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/my-blog-headers.html/feed</wfw:commentRss>
		<slash:comments>113</slash:comments>
		</item>
		<item>
		<title>学习笔记: CSS3 鼠标悬停动画</title>
		<link>http://fis.io/css-3-hover-animations.html</link>
		<comments>http://fis.io/css-3-hover-animations.html#comments</comments>
		<pubDate>Sat, 30 May 2009 01:25:48 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[创意 设计]]></category>
		<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://fis.io/?p=1038</guid>
		<description><![CDATA[受 pbtweet 里面那个漂亮的贴图徽章启发，我搜索了一些相关资料，将如何用 CSS 实现鼠标悬停动画效果的方法整理成本文。目前，能正确显示这些非正... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://fis.io/css-3-hover-animations.html" title="原文载于 fis.io"><img src="http://fis.io/wp-content/uploads/2009/05/css.png" style="float: left; margin: 5px 15px 0 0" border="0" /></a>受 <a href="http://fis.io/pbtweet-enhance-twitter-web.html" title="pbtweet: 增强 Twitter web 体验">pbtweet</a> 里面那个漂亮的贴图徽章启发，我搜索了一些相关资料，将如何用 CSS 实现鼠标悬停动画效果的方法整理成本文。目前，能正确显示这些非正式 CSS 属性的浏览器还非常有限，不过可以确信的是，不能显示动画的浏览器不会受到不良影响，那么就让优秀的浏览器物尽其用吧。查看示例请用 Chrome, Safari 访问 <a href="http://fis.io/css-3-hover-animations.html" title="学习笔记：CSS3 鼠标悬停动画 | 老肥博客 » 非唠不可">本文</a>，其它浏览器可能不能正常显示。<span id="more-1038"></span></p>
<p>上图是一个鼠标悬停动画的例子，如果将以下代码应用到全局 CSS 中，则所有带链接的图片都会有如上图动画：</p>
<p><code class="css">a img {<br />
&nbsp;&nbsp;&nbsp;&nbsp;opacity: 0.8;<br />
&nbsp;&nbsp;&nbsp;&nbsp;-webkit-transition: all 0.2s ease-out;<br />
}<br />
&nbsp;<br />
a:hover img {<br />
&nbsp;&nbsp;&nbsp;&nbsp;opacity: 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;-moz-transform: scale(1.05) rotate(2deg);<br />
&nbsp;&nbsp;&nbsp;&nbsp;-webkit-transform: scale(1.05) rotate(2deg);<br />
}</code></p>
<p>如果要求仅应用于 class="logo" 的图片，则将选择器改为：</p>
<p><code class="css">a img.logo {...}<br />
a:hover img.logo {...}</code></p>
<p>如果要求应用于 id="footer" 的 div 下所有图片，则将选择器改为：</p>
<p><code class="css">#footer a img {...}<br />
#footer a:hover img {...}</code></p>
<p style="margin-bottom: 50px">到这里，所有的工作都完成了，挺简单吧？下面进入详细分析说明。</p>
<style type="text/css" media="screen">
a img.sample1 {
	opacity: 1;
	-webkit-transition: none;
}
a:hover img.sample1 {
	-moz-transform: rotate(-30deg);
	-webkit-transform: rotate(-30deg);
}
a img.sample2, a img.sample3 {
	opacity: 1;
}
a:hover img.sample2, a:hover img.sample3 {
	-moz-transform: scale(1.5);
	-webkit-transform: scale(1.5);
	-moz-transform-origin: 100% 100%;
	-webkit-transform-origin: 100% 100%;
}
a:hover img.sample3 {
	-moz-transform-origin: 0% 100%;
	-webkit-transform-origin: 0% 100%;
}
#stable .showbox {
	margin: 1em;
	width: 100px;
	height: 40px;
	border: 2px solid;
	border-color: green;
	background-color: #cfc;
	line-height: 40px;
	text-align: center;
	-webkit-transition-duration: 2s;
}
#stable:hover .showbox {
	border-color: #006;
	background-color: #ccf;
	-webkit-border-radius: 1.5em;
	-webkit-transform: translate(300px,0) rotate(5deg) skew(-15deg,0);
}
a img.sample4 {
	opacity: 1;
	-webkit-transition: all 1s cubic-bezier(0,1,1,0);
}
a:hover img.sample4 {
	opacity: 0;
	-moz-transform: translate(-128px,-50px) scale(3) rotate(360deg);
	-webkit-transform: translate(-128px,-50px) scale(3) rotate(360deg);
}
</style>
<h4>transform: 形变目标值设定</h4>
<p><a href="http://fis.io/css-3-hover-animations.html" title="原文载于 fis.io"><img src="http://fis.io/wp-content/uploads/2009/05/css.png" style="float: right;" class="sample1" border="0" /></a>兼容浏览器: Firefox 3.5, Chrome 2.0, Safari 3.1</p>
<p><code class="css">-moz-transform: rotate(-30deg);<br />
-webkit-transform: rotate(-30deg);</code></p>
<p><br class="clear" /><br />
上面的例子仅仅应用了 transform: rotate, 在鼠标悬停的时候逆时针旋转。除了 rotate, 还有 scale, translate, skew, matrix 等用法，想要深入把玩可参考 <a href="http://www.the-art-of-web.com/css/css-animation/" class="external" target="_blank" title="The Art of Web ~ CSS/ Animation Using CSS Transforms">Animation Using CSS Transforms</a>.</p>
<h4>transform-origin: 形变中心点设定</h4>
<p>兼容浏览器: Firefox 3.5, Chrome 2.0, Safari 3.1</p>
<p><code class="css">-moz-transform-origin: 50% 50%;<br />
-webkit-transform-origin: 50% 50%;</code></p>
<p>默认值在对象的正中，X Y 值均为 50%. 更改数值可移动形变中心。下面两个例子，左边是 100% 100%(右下角), 右边是 0%, 100%(左下角):</p>
<p align="center"><a href="http://fis.io/css-3-hover-animations.html" title="原文载于 fis.io"><img src="http://fis.io/wp-content/uploads/2009/05/css.png" class="sample2" border="0" /></a> <a href="http://fis.io/css-3-hover-animations.html" title="原文载于 fis.io"><img src="http://fis.io/wp-content/uploads/2009/05/css.png" class="sample3" border="0" /></a></p>
<h4>transition: 过程动画设定</h4>
<p>兼容浏览器: Chrome 2.0, Safari 3.1</p>
<p><code class="css">-webkit-transition: all 0.2s ease-out;</code></p>
<p>-webkit-transition 是一个神奇的属性，它定义了动画过程的类型、时间、时间轴曲线。all 表示对所有变化应用动画，包括 transform, opacity; 后面两项是时间和时间轴曲线，可以有如下赋值：</p>
<div id="stable">
<div class="showbox">default &raquo;</div>
<div class="showbox" style="-webkit-transition-timing-function: linear;">linear &raquo;</div>
<div class="showbox" style="-webkit-transition-timing-function: ease-in;">ease-in &raquo;</div>
<div class="showbox" style="-webkit-transition-timing-function: ease-out;">ease-out &raquo;</div>
<div class="showbox" style="-webkit-transition-timing-function: ease-in-out;">ease-in-out &raquo;</div>
<div class="showbox" style="-webkit-transition-timing-function: cubic-bezier(0,1,1,0);">cubic-bezier &raquo;</div>
</div>
<p>以上 demo 来自 <a href="http://www.the-art-of-web.com/css/timing-function/" class="external" target="_blank" title="The Art of Web ~ CSS/ Transition Timing Functions">Transition Timing Functions</a>, 展示了 transition 时间控制的强大，而且上面的 transform 是可以多重叠加的，配合 transition, 能做些什么大家想象一下吧！</p>
<h4>opacity: 不透明度</h4>
<p><a href="http://fis.io/css-3-hover-animations.html" title="原文载于 fis.io"><img src="http://fis.io/wp-content/uploads/2009/05/css.png" style="float: right; margin-left: 10px" class="sample4" border="0" /></a>兼容浏览器: 除了 IE</p>
<p>这是一个较为广泛支持的属性，前面早已没有了私有前缀(-moz, -webkit). 使用也很简单，让正常状态的图片稍微透明显示，鼠标悬停的时候恢复不透明，更加醒目。它同样可以在时间轴上受 transition 控制，试试看这个示例。</p>
<h4>text-shadow: 文字阴影</h4>
<p>兼容浏览器: Firefox 3.5, Chrome 2.0, Opera 9.5, Safari 3.1</p>
<p><code class="css">text-shadow: 0px 1px 3px black;</code></p>
<p>以上赋值分别代表 X轴偏移，Y轴偏移，阴影扩散尺寸，颜色。应用到按钮、标题等处有很好的浮雕效果，同样的风格在 Mac OS X, iPhone 系统界面中有大量应用。</p>
<h3>结语</h3>
<ul>
<li>限于篇幅，本文示例所用的 CSS 不明文列出，有兴趣可以查看页面源代码，就嵌在正文中。</li>
<li>目前 CSS3 还在草案阶段，很多属性还有私有属性前缀，能兼容新属性的浏览器在用户比例上也还是少数。话说回来，谁指望 IE Trident? 屁股都要笑掉。</li>
<li>Gecko 真的已经落后 WebKit 好多了，CSS, JS, 而且还没算上 WebKit 在 <a href="http://fis.io/tag/iphone" title="标签: iPhone">iPhone</a>, <a href="http://fis.io/tag/android" title="标签: Android">Android</a> 等移动平台的成就。Gecko 在这方面基本还是零吧。</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/css-3-hover-animations.html/feed</wfw:commentRss>
		<slash:comments>96</slash:comments>
		</item>
		<item>
		<title>Thread Twitter: 在 WordPress 里展示 Twitter 会话</title>
		<link>http://fis.io/thread-twitter-plugin.html</link>
		<comments>http://fis.io/thread-twitter-plugin.html#comments</comments>
		<pubDate>Sun, 01 Mar 2009 08:17:05 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://fis.io/?p=961</guid>
		<description><![CDATA[请原谅我又火星了，Denis 介绍这个插件 的时候，我还以为这是个 Greasemonkey 脚本之类的，没有领会到它的实际作用：那就是将自己在 Twitter 上的所有会... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/fisio" target="_blank"><img src="http://fis.io/wp-content/uploads/2009/03/follow-me.png" style="float: left; margin: 7px 10px 0 0" title="Follow me on Twitter" alt="Follow me on Twitter" class="piclink" border="0" /></a>请原谅我又火星了，<a href="http://fairyfish.net/2009/01/16/thread-twitter/" target="_blank" class="external" title="Thread Twitter: 会话方式显示你的 Twitter | 我爱水煮鱼">Denis 介绍这个插件</a> 的时候，我还以为这是个 Greasemonkey 脚本之类的，没有领会到它的实际作用：那就是将自己在 Twitter 上的所有会话输出到 WordPress 博客中，是回复的话会追溯父条目，而且会通过 Twitter Search 查找含有 @自己 的条目，即使它不是一个明确的回复。访问者在查看输出页面的时候，可以直接点击右侧的回复链接转到 Twitter 加入讨论。更多细节请查阅上面的链接。</p>
<p>这样我也有了一个 <a href="http://fis.io/twitter" title="Twitter">Twitter 页面</a>，怎么样，是不是也给自己的 blog 整一个？另，感谢 <a href="http://www.happinesz.cn/" target="_blank" class="external" title="幸福收藏夹 - 在这里,存IT的理性,掺夹文学的浪漫…">sofish</a> 提供 CSS 帮助！</p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/thread-twitter-plugin.html/feed</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>本站最近的一些界面改进</title>
		<link>http://fis.io/blog-ui-improvement.html</link>
		<comments>http://fis.io/blog-ui-improvement.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 08:20:39 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[创意 设计]]></category>
		<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[图标]]></category>
		<category><![CDATA[美化]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://fis.io/?p=908</guid>
		<description><![CDATA[分类图标 整理文章分类，基于 Silk Icons 为每个分类加上图标： 并且在 Denis 的帮助下实现了侧栏“最新文章”“随机文章”前显示文章所属分类图标。... ]]></description>
			<content:encoded><![CDATA[<h4><img src="http://fis.io/wp-content/uploads/2009/01/painter.png" style="float: right; margin-left: 5px" border="0" />分类图标</h4>
<p>整理文章分类，基于 <a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank" class="external" title="famfamfam.com: Silk Icons">Silk Icons</a> 为每个分类加上图标：<br />
<a href="http://fis.io/category/web" title="网络 应用"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -32px" alt="网络 应用" class="piclink" /></a><a href="http://fis.io/category/site" title="博客 本站"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -182px" alt="博客 本站" class="piclink" /></a><a href="http://fis.io/category/fun" title="娱乐 影音"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -62px" alt="娱乐 影音" class="piclink" /></a><a href="http://fis.io/category/pc" title="电脑 软件"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -152px" alt="电脑 软件" class="piclink" /></a><a href="http://fis.io/category/phone" title="手机 移动"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -122px" alt="手机 移动" class="piclink" /></a><a href="http://fis.io/category/billiards" title="台球 撞球"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/footer.png) -840px -125px" alt="台球 撞球" class="piclink" /></a><a href="http://fis.io/category/design" title="设计 创意"><img border="0" src="http://fis.io/wp-includes/images/blank.gif" style="margin: 5px; width: 16px; height: 16px; background: url(http://fis.io/wp-content/themes/gluedideas_subtle/images/icons.png) no-repeat 0 -92px" alt="设计 创意" class="piclink" /></a><br />
并且在 <a href="http://fairyfish.net/" target="_blank" class="external" title="我爱水煮鱼">Denis</a> 的帮助下实现了侧栏“最新文章”“随机文章”前显示文章所属分类图标。加上之前的 <a href="http://fis.io/easier-google-favicon-query.html" title="更简单的 Google favicon 查询">评论者 favicon</a>, 已经有点小华丽喽 <img src='/b.gif' alt=':lol:' class='wp-smiley sm-happy' /> </p>
<h4>翻页按钮的样式</h4>
<p>赶潮流学习了下 CSS 圆角，于是将 Pagebar 翻页按钮样式化成这个样子：<span id="more-908"></span><br />
<a href="http://fis.io/blog-ui-improvement.html"><img src="http://fis.io/wp-content/uploads/2009/01/pagebar.png" title="CSS 圆角" alt="CSS 圆角" border="0" class="piclink" style="margin: 5px" /></a><br />
圆角样式仅支持 <a href="http://fis.io/tag/firefox" title="标签: Firefox">Firefox</a>, <a href="http://fis.io/tag/chrome" title="标签: Chrome">Chrome</a>, <a href="http://fis.io/tag/safari" title="标签: Safari">Safari</a>, 其它浏览器下仍是方角。有兴趣可以查看我的 <a href="http://fis.io/wp-content/themes/gluedideas_subtle/style.css" class="download" title="Pagebar CSS style">style.css</a> <img src='/b.gif' alt=':)' class='wp-smiley sm-smile' />  另外 CSS 圆角也运用到了评论输入框、<a href="http://fis.io/better-post-styles.html" title="老肥谈如何在博客正文中运用样式">鼠标放到图片链接上的样式</a> 等地方，就不细说了，推荐阅读 <a href="http://www.happinesz.cn/archives/914/" target="_blank" class="external" title="5个使你熟知CSS 3.0的技术 - 幸福收藏夹">sofish 的教程</a>。</p>
<h4>左上角的加载标签</h4>
<p>在页面加载的时候显示一个友好的提示，尽量挽留一下急性子的访问者吧。实现方法请参阅 <a href="http://www.awflasher.com/blog/archives/1589" target="_blank" class="external" title="给页面加上Loading效果最简单实用的办法 | aw&#8217;s blog - 分享互联网，分享人生">aw</a> 和 <a href="http://ishawn.net/tips/loading-status-bar.html" target="_blank" class="external" title="jQuery 页面载入进度条 | Shawn Blog">Shawn</a> 的文章。</p>
<h4>标签云链接的鼠标悬停颜色</h4>
<p><a href="http://wordpress.org/extend/plugins/simple-tags/" target="_blank" class="external" title="WordPress › Simple Tags « WordPress Plugins">Simple Tags</a> 生成的标签云可以按文章多少自动分配链接的颜色，但是鼠标放到链接上就不再改变颜色了。试试看本文右边的“热门标签”，像普通链接一样有 hover 样式，代码如下：</p>
<p><code class="css">.st-tag-cloud a:hover {<br />
	color: #E58802 !important;<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/blog-ui-improvement.html/feed</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>WordPress 后台添加 Technorati widget</title>
		<link>http://fis.io/wordpress-admin-technorati-widget.html</link>
		<comments>http://fis.io/wordpress-admin-technorati-widget.html#comments</comments>
		<pubDate>Sat, 20 Dec 2008 15:20:49 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=750</guid>
		<description><![CDATA[Technorati 这个著名的 blog 搜索引擎现在又出墙去了。主机在国外的 WordPress, 用下面的办法，在后台控制面板添加一个 Technorati 反向链接 widget: 将 WordPress ... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://zh.wikipedia.org/wiki/Technorati" target="_blank" class="external" title="Technorati - 维基百科，自由的百科全书">Technorati</a> 这个著名的 blog 搜索引擎现在又出墙去了。主机在国外的 WordPress, 用下面的办法，在后台控制面板添加一个 Technorati 反向链接 widget: 将 WordPress Development Blog 或 Other WordPress News 修改为：</p>
<p><code>http://feeds.technorati.com/search/fisio.cn</code></p>
<p>下图中上方是默认的 Google Blog Search, 下方是刚添加的 Technorati widget. 当然，改成别的 feeds 也可以。但是好像不能新建更多，需要更多的话可以修改 /wp-admin/index.php, 或者捣鼓个 <a href="http://fis.io/tag/greasemonkey" title="标签: Greasemonkey">Greasemonkey</a> 脚本 <img src='/b.gif' alt=':eek:' class='wp-smiley sm-eek' />  <span id="more-750"></span></p>
<p><img src="http://fis.io/wp-content/uploads/2008/12/technorati-widget.png" alt="Technorati widget" title="Technorati widget" border="0" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/wordpress-admin-technorati-widget.html/feed</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>GSeeker 现在的主人，请让贤吧</title>
		<link>http://fis.io/gseeker-hongxiaowan.html</link>
		<comments>http://fis.io/gseeker-hongxiaowan.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 17:47:24 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=735</guid>
		<description><![CDATA[Hong Xiaowan 接手 GSeeker 已经快半年了，我相信 GSeeker 的读者刚听说有人要接手写下去的时候，应该是感激居多的，半年过去，GSeeker 的现状却不像当初想... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/12/gseeker.jpg" title="GSeeker" alt="GSeeker" border="0" /></p>
<p>Hong Xiaowan 接手 <a href="http://www.gseeker.com/" target="_blank" class="external" title="G速客">GSeeker</a> 已经快半年了，我相信 GSeeker 的读者刚听说有人要接手写下去的时候，应该是感激居多的，半年过去，GSeeker 的现状却不像当初想象那么简单了。<span id="more-735"></span></p>
<h4>话题的改变</h4>
<p>大概被老读者骂得最多的一点就是，GSeeker 竟然不再专注于 Google 了。这点我不发表意见，人都变了，话题难免和原来不一样，每个人都是不同的。往大了说，Google 的使命是索引整个互联网，谈互联网即是谈 Google. 只是，别再聊 <a href="http://www.gseeker.com/50226711/ccee_156770.php" target="_blank" class="external" title="歌唱祖国和刘翔退赛">假唱</a> 了。</p>
<h4>Hong Xiaowan 为什么会接手 GSeeker</h4>
<p><a href="http://www.gseeker.com/50226711/aegseekeriegeiec_150562.php" target="_blank" class="external" title="关于GSeeker（G速客）的去向">幻灭的离开</a> 除去个人原因之外，主要是因为中文商业博客整个圈子的惨淡，而谁要是在这个时候跳出来说要独力回天，把 GSeeker 打造成另一个 TechCrunch, 那一定是疯了。中文广告的贱价也注定了 CW 不可能开太高薪水，那么作为 GSeeker 的老读者和忠实拥趸，我想跳出来的人一定是出于对 GSeeker 和 Google 的爱。但是我们很快发现这也不成立，Hong Xiaowan 不要说像幻灭一般 geek, 连称之为 Gfans 都勉强，这从文字中都看得出来。</p>
<p>几个月过去了，我只能得出一个结论，Hong Xiaowan 是看上了 GSeeker 的订户和流量。话题往往说着说着就说到了做啥，连贴个图片都不忘要链一下做啥，我还奇怪，<a href="http://www.gseeker.com/50226711/iecaeaeeccaeee_164209.php" target="_blank" class="external" title="周曙光：第一位获得普利策奖的中国记者">左拉的 PS 照</a> 跟做啥有嘛关系？看了看发现原来这是用做啥的客户端上传的，我晕，那我发一篇文章，是不是也要链一下罗技，感谢它生产了块好键盘？</p>
<p>但愿这样的猜测只是我太阴暗了。</p>
<h4>业务水平</h4>
<p><img src="http://fis.io/wp-content/uploads/2008/12/score.png" style="float: right; margin: 5px" border="0" />Hong Xiaowan <a href="http://www.gseeker.com/50226711/eee_157928.php" target="_blank" class="external" title="漫谈谷歌浏览器">漫</a> <a href="http://www.gseeker.com/50226711/eeeiee_158103.php" target="_blank" class="external" title="再谈谷歌浏览器：再次脑残">谈</a> 了几次浏览器，谈得让人惊讶：这真的是一个有多年互联网从业经验的资深人士么？我无意标榜自己对浏览器的理解有多正确，但以您对浏览器的了解，摆到台面上来漫谈实在是有点掉价。</p>
<blockquote><p>滥用内存就算了，买几根内存条可以解决问题，毕竟FireFox的亮点是插件。但是当它从2.0变成3.0之后，因为很多插件不支持3.0，我基本上就放弃了FireFox。保持兼容，保护开放商的投资是软件行业的公德。但是FireFox不管，反正它没有必要替开放商发工资！用户呢，反正已经够多了，牺牲掉一些也无所谓。</p></blockquote>
<p>我觉得这跟那些一提索爱手机就说短信慢的人差不多，还是多了解再漫谈吧，漫谈可不是信口开河。另：上图不是这篇文章的读者评分，只是首页上一个系统错误，那篇漫谈我评的还是个正数。</p>
<h4>不相干的软文、广告</h4>
<p>这样说也许不合适，我相信 Hong Xiaowan 根本就没有收钱，但所谓瓜田李下，难保每个人都不联想。代友收购公司，给做啥招开发，给订阅网做广告，代友找工作，托管服务器价格好商量…… 有一篇 <a href="http://www.gseeker.com/50226711/caeae_163233.php" target="_blank" class="external" title="后竞价排名时代">后竞价排名时代</a> 的结尾能雷死一船人：</p>
<blockquote><p>好了，就说这么多了，最后，加个广告，后竞价排名时代，需要自动审核虚假广告的技术，zuosa inc，就是我打工的公司，可以开发这种技术，有兴趣购买的公司，不妨和我联系。</p></blockquote>
<p>感情您在这儿等着我哪。这难道是江湖失传已久的…… AdSense 人肉版？</p>
<h4>和读者的交流</h4>
<p>Hong Xiaowan 和幻灭不同，会花很多时间回复评论，特别是骂人的评论。面对成山的谩骂，换谁心情都不会好，可是删除评论然后留下“<a href="http://www.gseeker.com/50226711/eaeieeecc_163813.php#Comments" target="_blank" class="external" title="谷歌图书，订阅网及相关...">@XXX 狗屁不通的是你，……</a>”就有点不明智了，他骂人是他不对，要对骂，我担心您没这精力啊。而且这也不是个交流的态度。</p>
<h4>问题所在</h4>
<p>所以我觉得，并不是读者怀旧，不能接受换人的改变，而是不能接受这样一个作者，来继续写一个曾经不错的博客。<strong>和现状相比，我宁愿眼睁睁看着 GSeeker 半年前死掉</strong>。我恳请 Hong Xiaowan 考虑我的建议：让贤。</p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/gseeker-hongxiaowan.html/feed</wfw:commentRss>
		<slash:comments>117</slash:comments>
		</item>
		<item>
		<title>老肥谈如何在博客正文中运用样式</title>
		<link>http://fis.io/better-post-styles.html</link>
		<comments>http://fis.io/better-post-styles.html#comments</comments>
		<pubDate>Tue, 02 Dec 2008 14:51:55 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[美化]]></category>

		<guid isPermaLink="false">http://fis.io/?p=725</guid>
		<description><![CDATA[一篇吸引眼球的文章一定要有漂亮的样式，除非它是 keso 或者韩寒写的。如果没有他们那样强大的品牌保证，那么一定要把内容和外观都做好，不然读... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/12/appearance.png" style="float: left; margin-right: 5px" title="appearance" alt="appearance" border="0" />一篇吸引眼球的文章一定要有漂亮的样式，除非它是 keso 或者韩寒写的。如果没有他们那样强大的品牌保证，那么一定要把内容和外观都做好，不然读者很难坚持阅读完大篇幅密密麻麻的文字，至少我阅读时是这样的。我以前也谈过博文 <a href="http://fis.io/better-links-usage.html" title="老肥谈如何运用好链接">链接</a> 和 <a href="http://fis.io/build-efficiency-tags-system-for-blog.html" title="如何为 blog 建立一个高效的标签系统">标签</a> 的运用，希望它们能对您有所帮助。</p>
<h4>题图和插图</h4>
<p>图片的重要性是显见的，题图则可以一开始就吸引读者浓厚的兴趣。<a href="http://ooxx.me/" target="_blank" class="external" title="OOXX.ME PLZ - 大猫の意淫网志">大猫</a> 的题图一向很大很咸湿，我习惯用 128x128 的兔子图标。<span id="more-725"></span>用 logo 做题图也不错，比如 cnBeta 的文章会自动套用话题 logo, 详细到有关鲍尔默的文章都有一个他的猴子头像。也许这样一个图片没有太多实际意义，但心理上的效果明显。不然门户网站的编辑为什么总要凑两张图片然后标题里称“组图”呢，就是要你点。</p>
<p>题图适合用浮动一侧的样式，按 ctrl+u 查看本文代码，就会发现我把题图所在的 &lt;img&gt; 标签放在了最前面，并加上了 style="float: left; margin-right: 5px" 让它浮动在左边。这个样式不适合用全局 CSS 来做，因为每个题图需要的边距都不同，而且自己定义的 CSS 样式不会传递到阅读器中。</p>
<p><a href="http://fis.io/better-post-styles.html"><img src="http://fis.io/wp-content/uploads/2008/12/link-sample.png" style="float: right; margin: 5px" class="piclink" title="测试样式" /></a>插图不宜太大，如需大图，用缩略图做个链接。最近我给图片上的链接加了个样式，让读者更容易察觉链接，如右所示。（自定义 CSS 只在原文生效，阅读器里没有）如果觉得不错，可以在 <a href="http://fis.io/wp-content/themes/gluedideas_subtle/style.css" title="CSS styles">代码</a> 中搜索 piclink 查看。</p>
<h4>如何强调和高亮</h4>
<p>通常我们用 <strong>粗体</strong> 或者 <span style="background-color: yellow">高亮</span> 来强调重点，但不可多用，不然就没有重点了。将文字弄成红色不是很好的办法，我的英文老师曾告诉我们 ALL CAPS is shouting, 所以我觉得红色的文字也显得不够礼貌。</p>
<h4>html 格式标注的使用</h4>
<p>行文中常用的 html 格式标注包括 h3, h4, ul, ol, li, blockquote 等，一般来说正文中的子标题不应该太大号，h3, h4 就可以了。ul 叫做无序列表，ol 叫做有序列表，li 用来标注列表中每一条项目，blockquote 是区块引用。写列表时，手动写入 1...2... 是很不规范也没有效率的做法，应该使用 html 标注，多用用编辑器的预览模式和代码模式，很容易学会：</p>
<div style="float: left; width: 180px; background-color: #F3F3EC; padding-left: 15px">
<ol>
<li>这是一个有序列表</li>
<li>这是第二条</li>
</ol>
</div>
<div style="float: left; width: 180px; background-color: #F3F3EC; margin-left: 20px; padding-left: 15px">
<ul>
<li>这是一个无序列表</li>
<li>这是第二条</li>
</ul>
</div>
<p><br style="clear: both"></p>
<blockquote style="background-color: #F3F3EC"><p>这是一个区块引用，可看作一个有缩进的段落。引号图片是在 CSS 中定义的，在阅读器中不会有。</p></blockquote>
<p><br style="clear: both"></p>
<p>上面的例子中我将 ul 每条项目前做成了绿色圆点图标，这是在本站 CSS 中定义的，到阅读器中不会有这样的效果，但 ul, li 作为标准 html 标注，一般会被显示成黑色圆点的样子，标题字号、行距什么的都不会错，只是会换成缺省样式，或者阅读器里定义的样式。</p>
<p>合适的子标题、列表可以让文章层次分明，井井有条。如果对它们应用样式，推荐在全局 CSS 中进行，不宜过多地将格式写到 style="" 中，麻烦不说，到阅读器中就会花花绿绿的了。一个典型的错误就是指定整段文字的颜色，要是博客是深色底浅色字，到阅读器里就成浅色底浅色字了。使用 CSS 可以让样式具有更大的适应性。</p>
<h4>写完了</h4>
<p>OK, 如果您读到这里，就说明我这篇文章还不算失败 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/better-post-styles.html/feed</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>老肥博客的前世今生</title>
		<link>http://fis.io/fisio-blog-story.html</link>
		<comments>http://fis.io/fisio-blog-story.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 20:50:39 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=704</guid>
		<description><![CDATA[本文是一篇以这个博客为描述对象的征文，由于我平时写东西很少涉及自身，所以本文意义重大，堪比讴歌我☭之《走进新时代》。下面细说这个叫老... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/11/soup.png" style="float: right; margin-left: 10px" border="0" />本文是一篇以这个博客为描述对象的征文，由于我平时写东西很少涉及自身，所以本文意义重大，堪比讴歌我☭之《走进新时代》。下面细说这个叫老肥的家伙是如何唱着东方红，当家做主博起来，肥起来的。</p>
<h4>解放前</h4>
<p>最早的博客行为出现在04年歪酷，大四，最初是因为喜欢的女生在那里-_- 前后大概贴了十来篇乱七八糟的东西，收获是发现 html 挺好玩的，竟然可以在网页上嵌入 flash, 二是发现了 <a href="http://fis.io/tag/firefox" title="标签: Firefox">Firefox</a>, 第一次装了嫌难用又卸了，一个月后重新装上，研究扩展，深陷至今。<span id="more-704"></span></p>
<p><img src="http://fis.io/wp-content/uploads/2008/11/soup-2.png" style="float: right; margin-left: 10px" border="0" />远离博客两年之后06年开始用 Live Spaces, 转为研究介绍日历、文档等 <a href="http://fis.io/tag/google" title="标签: Google">Google</a> 服务，视 <a href="http://www.kenwong.cn/" target="_blank" class="external" title="幻灭的个人站 UnIndexed">幻灭</a> 为偶像，但对 GSeeker 的博客系统非常不满，侧栏满是没人会点的广告，评论体验也非常差。其实 Live Spaces 也是个差劲的系统，浏览器资源占用大，文章链接死长，编辑文章的时候丢失格式，连 ed2k 链接都不认识。想换到 Blogger 绑定域名，但发现接入 IP 也在墙外。于是在 Blogger 发了一篇文章之后就放弃了，独立呼声渐强，人民需要自由 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> </p>
<h4>独立日</h4>
<p><img src="http://fis.io/wp-content/uploads/2008/11/soup-4.png" style="float: right; margin-left: 10px" border="0" />07年整个劳动节宅在家，完成了独立壮举。通过搜索“独立域名”相关信息找到了 <a href="http://yo2.cn/" target="_blank" class="external" title="优博网">yo2</a>, 这是我第一次知道 <a href="http://fis.io/tag/wordpress" title="标签: WordPress">WordPress</a>, 一用它就知道这正是我一直在寻找的东西。我肯定需要一个独立域名，于是迅速以一块钱的价格买到了 fisio.cn, 在尝试搬家工具失败之后，我竟然凭着极大的热情和对新系统的憧憬，手动将几十篇老文章搬了过来-_- 再研究系统、模板、<a href="http://fis.io/tag/plugins" title="标签: 插件">插件</a>，七天假期就过了，留下一堆便当饭盒。虽然 yo2 没有开放插件上传，但是已有插件已经足够我用了，什么都新奇，这些是以前的 BSP 完全没法提供的。<strong>WordPress 很像 Firefox, 开放，可扩充，一切都在我掌握中，只有想不到，没有做不到。</strong></p>
<p><img src="http://fis.io/wp-content/uploads/2008/11/soup-5.png" style="float: right; margin-left: 10px" border="0" />那时候我还贴一些 <a href="http://fis.io/category/billiards" title="分类: 台球 撞球">台球视频</a>，一些 <a href="http://fis.io/category/design" title="分类: 手机 创意">平面设计</a>，但很快就把重心转到了 Google, Firefox, Mobile. 这些话题是我最感兴趣，乐意分享给所有人的，当然也会聊 WordPress, PHP, CSS, 这些构成了我现在的主要内容。</p>
<p>yo2 的服务虽好，但人是永不满足的，随着更多的个性化需要，我开始考虑彻底独立了，不过一直没有实施，直到 yo2 开始过滤关键字。天朝生存手册第一条，要活命先自宫。虽然我没啥敏感内容，但有首歌叫把根留住来着，爷受不了文章里出现航空文明用语舰。</p>
<h4>新时代</h4>
<p><img src="http://fis.io/wp-content/uploads/2008/11/soup-6.png" style="float: right; margin-left: 10px" border="0" />今年五月搬到 hostmonster, 对访问者而言并没有什么变化，虽然 .cn 不怎么样，目前也没有计划像 <a href="http://ooxx.me/blog.orz" target="_blank" class="external" title="OOXX.ME PLZ">大猫</a> 一样换个风骚的域名。也没有计划放广告，写博客只为兴趣，交朋友，难得自己有一直更新下去的动力，就好好写吧（其实是对广告收入没信心……）</p>
<p>WordPress 对我来讲已经非常完美了，和 Firefox 一样，长期的使用和拓展已经让我离不开它。去 <a href="http://fis.io/wordcamp-china-2008.html" title="WordCamp China 2008 摘趣">WordCamp</a> 让我对它更了解，着迷。同时，做一个互联网内容创造者，坚持原创，也是一件很自豪的事情。</p>
<p>本文应 <a href="http://fairyfish.net/" target="_blank" class="external" title="我爱水煮鱼">水煮鱼</a> 邀请而写，会收入 <a href="http://fairyfish.net/tag/talk/" target="_blank" class="external" title="博客对话 - 我爱水煮鱼">博客对话</a> 专题 <img src='/b.gif' alt=':eek:' class='wp-smiley sm-eek' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/fisio-blog-story.html/feed</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>更简单的 Google favicon 查询</title>
		<link>http://fis.io/easier-google-favicon-query.html</link>
		<comments>http://fis.io/easier-google-favicon-query.html#comments</comments>
		<pubDate>Thu, 13 Nov 2008 12:32:27 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=699</guid>
		<description><![CDATA[老话题 新情况。使用 Google 提供的 favicon 缓存，在网页上自动显示链接、评论者的图标，现在有了更简单的办法，建议对代码望而却步的朋友尝试。 www... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://fis.io/google-favicon-query-updated.html" title="调用 Google favicon 缓存的朋友请更新">老话题</a> 新情况。使用 Google 提供的 favicon 缓存，在网页上自动显示链接、评论者的图标，现在有了更简单的办法，建议对代码望而却步的朋友尝试。</p>
<p><code style="margin-right: 0"><a href="http://www.google.com/s2/favicons?domain_url=http://fis.io/">www.google.com/s2/favicons?domain_url=http://fis.io/</a></code></p>
<p>再也不需要用 php 语句加工网址，http(任意协议名都可以) 开头的一样用，任意尾巴一样用，只需要把评论者网址（比如 $comment_url）代入 domain_url= 之后，然后把这个链接放在一个 &lt;img&gt; 标签内，就可以在网页上输出一个 <img src="http://www.google.com/s2/favicons?domain_url=http://g.cn/" class="wp-smiley" /> 这样的图标了，实用效果见本博侧栏。</p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/easier-google-favicon-query.html/feed</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Matt 拍下的我的 T-shirt</title>
		<link>http://fis.io/wordpress-tshirt-photoed-by-matt.html</link>
		<comments>http://fis.io/wordpress-tshirt-photoed-by-matt.html#comments</comments>
		<pubDate>Sat, 25 Oct 2008 17:46:52 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fis.io/?p=653</guid>
		<description><![CDATA[WordCamp 上海会场 Matt Mullenweg 拍的我的 T-shirt, 原文相册，大图... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://fis.io/wordcamp-china-2008.html" title="WordCamp China 2008 摘趣">WordCamp</a> 上海会场 Matt Mullenweg 拍的我的 T-shirt, <a href="http://ma.tt/2008/09/shanghai-wordcamp/" target="_blank" class="external" title="Shanghai WordCamp - Matt Mullenweg">原文相册</a>，<a href="http://s.ma.tt/files/2008/10/mcm_0443.jpg" title="Nikon D3, 4256x2832 像素">大图</a>。</p>
<p><a href="http://ma.tt/2008/09/shanghai-wordcamp/" target="_blank" title="Shanghai WordCamp - Matt Mullenweg"><img src="http://fis.io/wp-content/uploads/2008/10/wordpress-tshirt.jpg" alt="WordPress T-shirt" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/wordpress-tshirt-photoed-by-matt.html/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>调用 Google favicon 缓存的朋友请更新</title>
		<link>http://fis.io/google-favicon-query-updated.html</link>
		<comments>http://fis.io/google-favicon-query-updated.html#comments</comments>
		<pubDate>Sat, 18 Oct 2008 11:10:34 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=645</guid>
		<description><![CDATA[上次说到 Google 有一个 favicon 调用地址，用来显示用户个人资料（如 Google 阅读器，网上论坛）里链接的 favicon, 我们可以用这个服务，在博客最新评论... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/10/favicons.png" style="float: right; margin: 5px 0 0 10px; border: 5px solid rgb(243, 243, 236)" title="favicon 调用示例" alt="favicons"><a href="http://fis.io/show-favicons-of-commentators-and-links.html" title="显示评论者、友情链接 favicon 的新方法">上次说到</a> Google 有一个 favicon 调用地址，用来显示用户个人资料（如 Google 阅读器，网上论坛）里链接的 <a href="http://fis.io/tag/favicon" title="标签: favicon">favicon</a>, 我们可以用这个服务，在博客最新评论、友情链接之类的条目前面加上此人的 favicon, 丰富一下页面内容。</p>
<p>不过前些天这个调用发生了一些变化。以前只需要将链接抹去 "http://", 域名后面即使还跟有东西，都可以返回正确的 favicon, 现在不能跟了，只能是域名部分，连跟个斜杠都不可以。使用方法当然也得更新，以下是新的用法语句，感谢 <a href="http://ishawn.net/" target="_blank" class="external" title="Shawn Blog">Shawn</a> 提供：<span id="more-645"></span></p>
<p>假设评论者留下的网址在数据库中是 <font color="green">$url</font>, 我们另外定义一个 <font color="blue">$domain</font>, 用作输出。先将 $url 转换成 $domain. 其中 $link 是一次代换，如果和原有变量名冲突，可以换个名字：</p>
<p><code class="php">$link = clean_url(strip_tags(<font color="green">$url</font>));<br />
$autArray = explode("/",$link);<br />
<font color="blue">$domain</font> = "" . $autArray[2];</code></p>
<p>现在可以将 $domain 用到 favicon 调用地址里面去了，调用地址示例：</p>
<p><code><a href="http://www.google.com/s2/favicons?domain=fis.io">http://www.google.com/s2/favicons?domain=fis.io</a></code></p>
<p>输出为 <img src="http://www.google.com/s2/favicons?domain=fis.io" alt="fis.io" class="wp-smiley"> 这样的 16x16 png 图像。接下来……想怎么用就怎么用吧 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/google-favicon-query-updated.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordCamp China 2008 摘趣</title>
		<link>http://fis.io/wordcamp-china-2008.html</link>
		<comments>http://fis.io/wordcamp-china-2008.html#comments</comments>
		<pubDate>Sun, 21 Sep 2008 16:38:20 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://fis.io/?p=619</guid>
		<description><![CDATA[朋友们，我就是那个猜中爱枣报，穿 WordPress 登录框 T恤 的家伙，我上台的时候竟然忘了给自己做广告，现在补上！正文开始：从 WordCamp 回来了。不如... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://fis.io/wordcamp-china-2008.html"><img src="http://fis.io/wp-content/uploads/2008/09/wordcamp.jpg" style="float: right; margin-left: 10px;" title="WordCamp China 2008 摘趣"  alt="WordCamp China 2008 摘趣" border="0"></a>朋友们，我就是那个猜中爱枣报，穿 <a href="http://fis.io/ubuntu-wordpress-t-shirts.html" title="Ubuntu, WordPress T恤到手">WordPress 登录框 T恤</a> 的家伙，我上台的时候竟然忘了给自己做广告，现在补上！正文开始：从 <a href="http://china.wordcamp.org/" target="_blank" class="external" title="WordCamp China 2008">WordCamp</a> 回来了。不如想象中热闹，但总的来说还不错，第一次在上海举办就有相当的规模，期待 2009, 2010, ...</p>
<ul>
<li>Matt 讲到 WordPress 的成长、规模、社会化，还有 <a href="http://wordpress.org/" target="_blank" class="external" title="WordPress &#8250; Blog Tool and Publishing Platform">WordPress</a> 2.7 的 demo 演示：后台模块拖动，评论 API, 快捷键，插件一键安装，主题升级，OAuth, 原生 <a href="http://fis.io/wordpress-thread-comment-plugin.html" title="新增评论回复模式">评论回复</a>，后台回复，批量操作…… 还有，我们十一月就可以用到它！</li>
<li>Matt 很欣赏我的 T恤，还给拍了特写，希望他给我大大地贴出来… <img src='/b.gif' alt=':D' class='wp-smiley sm-grin' /> </li>
<li>海林履历很牛很硅谷，中英夹杂有点 funny: "下面我们 take 五分钟的 break..."<span id="more-619"></span></li>
<li>白鸦很逗，“在我的描述中抢答这是哪个博客” 这个游戏很好玩：<br />
白鸦：“第一句描述：这是一位<del datetime="2008-09-21T16:55:22+00:00">老牌</del>资深美女…”<br />
<a href="http://www.hi-mark.cn/" target="_blank" class="external" title="Hi Mark">Mark</a>: “徐静蕾！！！”<br />
全场大汗……白鸦呱呱呱……</li>
<li>hongxiaowan 介绍了他的 Zuosa, 但我还是追问了关于 GSeeker 未来走向的问题，哈哈</li>
<li><a href="http://www.charlestang.cn/" target="_blank" class="external" title="Becomin' Charles">查尔斯·唐</a> 和 hongxiaowan 都觉得，老肥这个名字太混淆视听，然后我和查尔斯一致认为论肥 hongxiaowan 技压全场，鉴定完毕</li>
<li>更多细节请看 <a href="https://picasaweb.google.com/sun.fisio/WordCampChina2008" target="_blank" class="external" title="Picasa 网络相册 - WordCamp China 2008">相册</a>，配有文字说明 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> </li>
</ul>
<p><embed type="application/x-shockwave-flash" src="https://picasaweb.google.com/s/c/bin/slideshow.swf" width="440" height="360" flashvars="host=picasaweb.google.com&amp;captions=1&amp;RGB=0xf3f3eb&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fsun.fisio%2Falbumid%2F5248490918893556289%3Fkind%3Dphoto%26alt%3Drss" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/wordcamp-china-2008.html/feed</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>和博客有关的几件事</title>
		<link>http://fis.io/things-about-blogging.html</link>
		<comments>http://fis.io/things-about-blogging.html#comments</comments>
		<pubDate>Wed, 10 Sep 2008 16:56:01 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[浏览器]]></category>

		<guid isPermaLink="false">http://fis.io/?p=583</guid>
		<description><![CDATA[WordPress 爱好者论坛 隆重推荐 WordPress 爱好者论坛，此论坛由中文博客界多位知名大牛建立，如果需要寻求 WordPress 方面的帮助指导，那么这是一个非常... ]]></description>
			<content:encoded><![CDATA[<ul>
<li>
<h4><a href="http://wfans.org/" target="_blank" title="WordPress 爱好者论坛"><img src="http://fis.io/wp-content/uploads/2008/09/wfans-logo.png" style="float: right; margin: 5px 0 0 5px" border="0" title="WordPress 爱好者论坛" alt="WordPress 爱好者论坛" /></a>WordPress 爱好者论坛</h4>
<p>隆重推荐 <a href="http://wfans.org/" target="_blank" class="external" title="WordPress 爱好者论坛">WordPress 爱好者论坛</a>，此论坛由中文博客界多位知名大牛建立，如果需要寻求 WordPress 方面的帮助指导，那么这是一个非常合适的去处，我们不光需要博客和阅读器，有时候我们还需要论坛这种更轻松、更多交流、更加形象化的环境 <img src='/b.gif' alt=':)' class='wp-smiley sm-smile' /> </li>
<li>
<h4><a href="http://china.wordcamp.org/" target="_blank" title="WordCamp China 2008"><img src="http://fis.io/wp-content/uploads/2008/09/wordcamp.jpg" style="float: right; margin-left: 10px" border="0" title="WordCamp China 2008" alt="WordCamp China 2008" /></a>WordCamp China 2008</h4>
<p>WordCamp 是 WordPress 爱好者及开发人员的大会，去年在北京成功举办过一届，今年将于本月 20 日在北京，21 日在上海举行，届时将有 WordPress 创始人之一 <a href="http://ma.tt/" target="_blank" class="external" title="Matt Mullenweg &#8212; aka Photo Matt &#8212; on WordPress, Web, Jazz, Life, and Photography">Matt Mullenweg</a> 以及更多圈内著名人士的演讲、交流互动，详情和报名方式请查阅 <a href="http://china.wordcamp.org/schedule/" target="_blank" class="external" title="WordCamp China  &raquo; 日程安排">官方网站</a>。我会穿着我的 <a href="http://fis.io/ubuntu-wordpress-t-shirts.html" title="Ubuntu, WordPress T恤到手">WordPress T-shirt</a> 参加上海会场 <img src='/b.gif' alt=':evil:' class='wp-smiley sm-evil' /> <span id="more-583"></span></li>
<li>
<h4>本站浏览器访问比例统计持续更新</h4>
<p>前几天分析了一下 <a href="http://fis.io/tag/chrome" title="标签: Chrome">Chrome</a> 发布前后我统计到的 <a href="http://fis.io/web-browsers-market-share.html" title="关于浏览器份额这件事">访问比例情况</a>，当时 Chrome 是一个峰值之后迅速下跌，而最近几天它稳定在了 7%. 未来一段时间内我会持续更新 <a href="http://spreadsheets.google.com/pub?key=pIaEWlVA6sDye6-KcLHB7UQ" target="_blank" class="external" title="查看 Google 文档">这个表格</a>，下图也会自动重新生成：</p>
<p><a href="http://spreadsheets.google.com/pub?key=pIaEWlVA6sDye6-KcLHB7UQ" target="_blank" title="查看 Google 文档"><img src="http://spreadsheets.google.com/pub?key=pIaEWlVA6sDye6-KcLHB7UQ&#038;oid=4&#038;output=image" title="查看 Google 文档" alt="查看 Google 文档" border="0"></a></p>
<p>我还翻阅了一下数据库里面记录的评论者的浏览器使用情况，发现除开我自己，评论者超过 2/3 使用 <a href="http://fis.io/tag/firefox" title="标签: Firefox">Firefox</a>, 这和访问者的比例形成了很大的差别，毕竟评论者大多来自 <a href="http://fis.io/tag/reader" title="标签: 阅读器">RSS 阅读器</a>，而访问者大多来自搜索引擎。评论者里面，博友、熟人也比较多，哈哈 <img src='/b.gif' alt=':P' class='wp-smiley sm-tongue' /> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/things-about-blogging.html/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>显示评论者、友情链接 favicon 的新方法</title>
		<link>http://fis.io/show-favicons-of-commentators-and-links.html</link>
		<comments>http://fis.io/show-favicons-of-commentators-and-links.html#comments</comments>
		<pubDate>Mon, 08 Sep 2008 16:13:41 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://fis.io/?p=577</guid>
		<description><![CDATA[显示评论者 Gravatar 头像、网站 favicon 是老肥博客一贯的做法，得到过不少朋友的称赞。favicon 的显示调用是我 自己摸索 的，实际运用起来问题比较多... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/09/magic.png" style="float: right; margin-left: 10px" title="Wizard" alt="Wizard" border="0" />显示评论者 <a href="http://fis.io/wp-snapavatar-plugin.html" title="增强 Gravatar 的 WorPress 插件: WP-SnapAvatar">Gravatar</a> 头像、网站 <a href="http://fis.io/favicon-design-episode-1.html" title="如何为博客设计一个出色的 favicon （一）">favicon</a> 是老肥博客一贯的做法，得到过不少朋友的称赞。favicon 的显示调用是我 <a href="http://fis.io/show-top-commentators-plugin-modify.html" title="小改 Show Top Commentators, 及求助">自己摸索</a> 的，实际运用起来问题比较多，比如：没有 favicon, favicon.ico 不在根目录，尺寸太大，或者评论者留下的是 www.awflasher.com/blog 这样的带有小尾巴的地址，都会导致显示错误。</p>
<p>前两天 <a href="http://ishawn.net/my-blog-related/show-commentors-favicon-of-wordpress.html" target="_blank" class="external" title="Wordpress 显示评论者的 Favicon | Shawn's Blog">Shawn</a> 提示我 Google 有一个隐藏的 favicon 缓存服务可以完美解决这个问题，果然非常棒，现在分享给大家。这个缓存调用的地址是：</p>
<p><code><a href="http://www.google.com/s2/favicons?domain=fis.io">http://www.google.com/s2/favicons?domain=fis.io</a></code></p>
<p>简单吧？这个查询得到的是一个 png 图像，如果没有对应的 favicon, 则缺省是一个地球图标。WordPress 插件 <a href="http://wordpress.org/extend/plugins/favicon-images-for-comments/" target="_blank" class="external" title="下载插件">Favicon Images for Comments</a> 是最简单的用法，不过样式反正要自己改，喜欢动手的朋友、非 WordPress 的朋友请看下面的教程。<span id="more-577"></span></p>
<p>这个查询要求不能带有 http, 而域名后面无论跟什么都无所谓。所以首先要把评论者网址前的 http 过滤掉，例如 <a href="http://yanfeng.org/blog/wordpress/kit" target="_blank" class="external" title="桑林志  &raquo; 中文 WordPress 工具箱">中文 WordPress 工具箱</a>，在显示最新评论的循环语句 foreach ($comments as $comment) 下面添加一个 $domain 定义：</p>
<p><code class="php">$domain = preg_replace('/^http:///', '', $comment->comment_author_url);</code></p>
<p>得到的 $domain 就没有前面的 http 了。然后把它用到输出去：</p>
<p><code class="php">$output .= $before . <font color="gray">'&lt;img src="http://www.google.com/s2/favicons?domain='</font> . $domain . <font color="gray">'" class="favicon" /&gt;&lt;a href="'</font> . $permalink . <font color="gray">'" title="'</font> . $comment_excerpt . <font color="gray">'"&gt;'</font> . $comment_author . <font color="gray">'&lt;/a&gt; '</font> . $comment_excerpt . $after;</code></p>
<p>这是我的例子，提供一个参考。我发现这样写还是很难看懂……呵呵，就当个参考吧。我把我的侧栏最新评论、本周嘉宾、友情链接都改成了这个显示方式，欢迎参观 <img src='/b.gif' alt=':D' class='wp-smiley sm-grin' /> </p>
<p>最后，希望有博客的朋友都检查一下自己的根目录下是否有 favicon.ico 这个文件，<a href="http://yo2.cn/" target="_blank" class="external" title="优博网">yo2</a> 用户好像也可以通过一个专用插件来上传它。这样您的博客可以在这里得到丰富的展示，happy blogging!</p>
<blockquote><p>据博友 <a href="http://bingu.net/" target="_blank" class="external" title="冰古blog">冰古</a> 的测试，Google 的 favicon 缓存服务并不是直接获取根目录下的 favicon.ico, 而是需要 html header 里面含有：</p>
<p>&lt;link rel="shortcut icon" type="image/x-icon" href="http://fis.io/favicon.ico" /&gt;</p>
<p>如果图标不对，一定要检查一下这里。谢谢冰古！</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/show-favicons-of-commentators-and-links.html/feed</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
		<item>
		<title>新增评论回复模式</title>
		<link>http://fis.io/wordpress-thread-comment-plugin.html</link>
		<comments>http://fis.io/wordpress-thread-comment-plugin.html#comments</comments>
		<pubDate>Wed, 16 Jul 2008 18:34:15 +0000</pubDate>
		<dc:creator>fisio</dc:creator>
				<category><![CDATA[网站 博客]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[扩展]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://fis.io/?p=510</guid>
		<description><![CDATA[一周没更新了，因为宽带出了点问题，电信的效率真是低啊。这一周发生了很多事情，GSeeker 回来了, iPhone 3G 被抢着肢解，中国水果摊完工了，还有大... ]]></description>
			<content:encoded><![CDATA[<p><img src="http://fis.io/wp-content/uploads/2008/07/cinema4d.png" style="float: right; margin-left: 5px" title="">一周没更新了，因为宽带出了点问题，电信的效率真是低啊。这一周发生了很多事情，<a href="http://www.gseeker.com/50226711/hey_gseekerae_153434.php" target="_blank" class="external" title="Hey! GSeeker恢复更新了">GSeeker 回来了</a>, <a href="http://jandan.net/2008/07/14/will-it-blend-iphone3g.html" target="_blank" class="external" title="搅拌iPhone 3G">iPhone 3G 被抢着肢解</a>，<a href="http://apple4.us/2008/07/post-120.html" target="_blank" class="external" title="三里屯苹果专卖店已完工">中国水果摊完工了</a>，还有大家都在说的 <a href="http://www.awflasher.com/blog/archives/1381" target="_blank" class="external" title="警惕GMail钓鱼邮件！">钓鱼事件</a>。老肥博客也有新鲜事发生呢：</p>
<ul>
<li>增加插件 <a href="http://blog.2i2j.com/plugins/wordpress-thread-comment" target="_blank" class="external" title="让 WordPress 拥有回复评论功能的强大插件">WordPress Thread Comment</a>, 这样您可以针对某个评论进行回复，相信大家已经比较熟悉它了。期间荣幸地得到了插件作者 <a href="http://blog.2i2j.com/" target="_blank" class="external" title="偶爱偶家">枫叶</a> 的大力帮助，不然我还真不知道怎么在使用它的同时仍保持输入框浮动在右侧的特色，呵呵。有请各位多帮我测试一下，有问题麻烦反馈给我，好继续修改，先谢了。</li>
<li>升级到 WordPress 2.6, 发现评论者头像 Gravatar 可以在后台直接指定缺省头像了，<span id="more-510"></span>可以省事地选择空白头像，后面三组可以对没有 <a href="http://www.gravatar.com/" target="_blank" class="external" title="现在就注册一个可以在很多博客上自动显示的头像！">注册头像</a> 的用户赋予随机头像，都挺有意思的，我选了最后一组，并且停用了 <a href="http://fis.io/wp-snapavatar-plugin.html" title="增强 Gravatar 的 WorPress 插件: WP-SnapAvatar">WP-SnapAvatar</a>.
<p><img src="http://fis.io/wp-content/uploads/2008/07/gravatar.png" style="margin:10px"></p>
</li>
<li>升级 Firefox 到 <a href="http://www.mozillaonline.com/" target="_blank" class="external" title="下载 Firefox 3">3.0.1</a>, 我重度依赖的标签扩展 Tab Mix Plus 修改版也罢工了，好在可以修改它里面的 install.rdf 解决问题。如果您嫌麻烦，我已经把它改好了放在 <a href="http://5rphea.bay.livefilestore.com/y1pyW1HoO8oWxAot0SrwGXYgX7bkdjdEe6zc_sUWyxwyH2UIRUfkdfP_rAIXU1ay-xuPp85GZQqehwnjNtOJBCWdw/tab_mix_plus-dev-build.xpi" class="download" title="下载到本地安装">这里</a>。</li>
<li>怪不得有调查报告称 Firefox 用户是最能保持更新的浏览器用户，3.0 刚发布一个月，老肥博客的访问统计显示 Firefox 3 用户已经占到了 Firefox 用户总数的 3/4:
<p><img src="http://fis.io/wp-content/uploads/2008/07/firefox-visitors.png" title="最近一个月 Firefox 访问构成"></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fis.io/wordpress-thread-comment-plugin.html/feed</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>

