<?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/"
	>

<channel>
	<title>睡到25点</title>
	<atom:link href="http://www.voidman.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.voidman.com</link>
	<description>Living is easy with your eyes closed.</description>
	<pubDate>Tue, 18 Nov 2008 13:51:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-beta3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>让 Wordpress 自动删除 Post Revisions</title>
		<link>http://www.voidman.com/2008/11/automatically-delete-post-revisions.html</link>
		<comments>http://www.voidman.com/2008/11/automatically-delete-post-revisions.html#comments</comments>
		<pubDate>Tue, 18 Nov 2008 01:00:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Blog Related]]></category>

		<category><![CDATA[API]]></category>

		<category><![CDATA[revisions]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[WP_Cron]]></category>

		<category><![CDATA[计划任务]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=188</guid>
		<description><![CDATA[介绍如何利用 Wordpress 提供的计划任务(WP_Cron) API 来实现自动删除 Post Revisions 的方法。]]></description>
			<content:encoded><![CDATA[<p>貌似在 <code>wp-config.php</code> 中加入 <code>define(’WP_POST_REVISIONS’, false);</code> 来禁用 Wordpress 的日志修订功能，post revision 还是会产生。<a href="http://blog.gohsy.com/">gohsy</a> 同学写了个插件 <a href="http://blog.gohsy.com/topics/delete-revision-plugin.html">Revision Manager</a> 来清理 post revision，不过个人觉得手动清理还是不够方便，决定利用 Wordpress 的计划任务功能(WP_Cron)偷偷懒。</p>
<p>不想为了这小小的功能而多添加一个插件，所以在主题目录下的 <code>functions.php</code> 文件添加了以下代码：</p>

<div class="wp_syntax"><pre class="php"><span style="color: blue;">function</span> delete_post_revisions<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: blue;">global</span> <span style="color: #008080;">$wpdb</span>;
&nbsp;
  <span style="color: #008000; font-style: italic;">// Also need to delete the post meta and term relationships</span>
  <span style="color: #008080;">$wpdb</span>-&gt;<span style="color: #006600;">query</span><span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">&quot;DELETE FROM {$wpdb-&gt;postmeta} WHERE post_id IN (SELECT ID FROM {$wpdb-&gt;posts} WHERE post_type = 'revision')&quot;</span><span style="color: #800000;">&#41;</span>;
  <span style="color: #008080;">$wpdb</span>-&gt;<span style="color: #006600;">query</span><span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">&quot;DELETE FROM {$wpdb-&gt;term_relationships} WHERE object_id IN (SELECT ID FROM {$wpdb-&gt;posts} WHERE post_type = 'revision')&quot;</span><span style="color: #800000;">&#41;</span>;
&nbsp;
  <span style="color: #008000; font-style: italic;">// Delete the post revisions</span>
  <span style="color: #008080;">$wpdb</span>-&gt;<span style="color: #006600;">query</span><span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">&quot;DELETE FROM {$wpdb-&gt;posts} WHERE post_type = 'revision'&quot;</span><span style="color: #800000;">&#41;</span>;
<span style="color: #800000;">&#125;</span>
&nbsp;
<span style="color: #008000; font-style: italic;">// Register the event</span>
add_action<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'delete_post_revisions_event'</span>, <span style="color: #ff00ff;">'delete_post_revisions'</span><span style="color: #800000;">&#41;</span>;
<span style="color: blue;">if</span> <span style="color: #800000;">&#40;</span>!wp_next_scheduled<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'delete_post_revisions_event'</span><span style="color: #800000;">&#41;</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  wp_schedule_event<span style="color: #800000;">&#40;</span><span style="color: #ff0000;">time</span><span style="color: #800000;">&#40;</span><span style="color: #800000;">&#41;</span>, <span style="color: #ff00ff;">'daily'</span>, <span style="color: #ff00ff;">'delete_post_revisions_event'</span><span style="color: #800000;">&#41;</span>;
<span style="color: #800000;">&#125;</span></pre></div>

<p>这样 Wordpress 每天会自动删除 post revision (当然得在有人访问的前提下)。其实每天运行一次也有些过于频繁了，可以将时间间隔设置得更长一些，譬如一周或者二周甚至一个月。不过 Wordpress 的 Cron API 本身只提供了 hourly, daily 两个选项，所以需要自己手工添加一些运行时间间隔选项。在刚才添加的代码<strong>之前</strong>添加以下代码，</p>

<div class="wp_syntax"><pre class="php"><span style="color: blue;">function</span> add_schedule_options<span style="color: #800000;">&#40;</span><span style="color: #008080;">$schedules</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: #008080;">$custom_schedules</span> = <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span>
    <span style="color: #ff00ff;">'weekly'</span> =&gt; <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span> <span style="color: #ff00ff;">'interval'</span> =&gt; <span style="color: #800080;">604800</span>, <span style="color: #ff00ff;">'display'</span> =&gt; __<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'Once Weekly'</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#41;</span>, 
    <span style="color: #ff00ff;">'fortnightly'</span> =&gt; <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span> <span style="color: #ff00ff;">'interval'</span> =&gt; <span style="color: #800080;">1209600</span>, <span style="color: #ff00ff;">'display'</span> =&gt; __<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'Once Fortnightly'</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#41;</span>, 
    <span style="color: #ff00ff;">'monthly'</span> =&gt; <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span> <span style="color: #ff00ff;">'interval'</span> =&gt; <span style="color: #800080;">2592000</span>, <span style="color: #ff00ff;">'display'</span> =&gt; __<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'Once Monthly'</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#41;</span>, 
  <span style="color: #800000;">&#41;</span>;
&nbsp;
  <span style="color: blue;">return</span> <span style="color: #ff0000;">array_merge</span><span style="color: #800000;">&#40;</span><span style="color: #008080;">$custom_schedules</span>, <span style="color: #008080;">$schedules</span><span style="color: #800000;">&#41;</span>;
<span style="color: #800000;">&#125;</span>
add_filter<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'cron_schedules'</span>, <span style="color: #ff00ff;">'add_schedule_options'</span><span style="color: #800000;">&#41;</span>;</pre></div>

<p>然后把 <code>wp_schedule_event</code> 函数的第二个参数值 daily 改成 weekly 或  fortnightly 或 monthly 即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/automatically-delete-post-revisions.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>让 Google Sitemaps Generator 可以忽略指定的日志分类</title>
		<link>http://www.voidman.com/2008/11/let-google-xml-sitemaps-ignore-the-specified-categories.html</link>
		<comments>http://www.voidman.com/2008/11/let-google-xml-sitemaps-ignore-the-specified-categories.html#comments</comments>
		<pubDate>Sat, 15 Nov 2008 12:38:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Blog Related]]></category>

		<category><![CDATA[Google Sitemaps Generator]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=186</guid>
		<description><![CDATA[介绍如何使 Google Sitemaps Generator 插件生成 sitemap 的时候可以忽略指定分类的日志。通过 Wordpress 自身提供的 Hook API 来实现功能，可以避免过多地修改原插件的代码。]]></description>
			<content:encoded><![CDATA[<p>在之前使用 <a href="http://nalinmakar.com/hemingwayex">HemingwayEx</a> 主题的时候我把一些只有半句或几句话的日志移动到了 asides 分类，而现在我不想让 <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">Google Sitemaps Generator</a> 插件生成 sitemap 的时候包括这些日志，也许只有我才会有这样奇怪的需求 <img src='http://www.voidman.com/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' />  。</p>
<p>可 Google XML Sitemaps 只能忽略指定的日志或页面，而不能忽略整个分类，所以只能自己动手了。</p>
<p>1. 打开插件目录下的 <code>sitemap-core.php</code> 文件，找到：</p>

<div class="wp_syntax"><pre class="php"><span style="color: #008080;">$where</span>.=<span style="color: #ff00ff;">&quot; AND post_password='' ORDER BY post_modified DESC&quot;</span>;
&nbsp;
<span style="color: #008080;">$sql</span> .= <span style="color: #008080;">$where</span>;</pre></div>

<p>修改成：</p>

<div class="wp_syntax"><pre class="php"><span style="color: #008080;">$where</span>.=<span style="color: #ff00ff;">&quot; AND post_password='' ORDER BY post_modified DESC&quot;</span>;
<span style="color: #008080;">$where</span> = apply_filters<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'sitemap_exclude_categories'</span>, <span style="color: #008080;">$where</span><span style="color: #800000;">&#41;</span>;
<span style="color: #008080;">$sql</span> .= <span style="color: #008080;">$where</span>;</pre></div>

<p>2. 打开主题目录下的 <code>functions.php</code> 文件，添加一下代码：</p>

<div class="wp_syntax"><pre class="php"><span style="color: blue;">function</span> sitemap_exclude_categories<span style="color: #800000;">&#40;</span><span style="color: #008080;">$where</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: blue;">global</span> <span style="color: #008080;">$wpdb</span>;
  <span style="color: #008080;">$cates</span> = <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span><span style="color: #800080;">11</span><span style="color: #800000;">&#41;</span>; <span style="color: #008000; font-style: italic;">// 在这里指定要忽略的类别id，多个类别id用半角逗号分隔</span>
  <span style="color: blue;">if</span> <span style="color: #800000;">&#40;</span><span style="color: #ff0000;">count</span><span style="color: #800000;">&#40;</span><span style="color: #008080;">$cates</span><span style="color: #800000;">&#41;</span> &gt; <span style="color: #800080;">0</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
    <span style="color: #008080;">$table_posts</span> = <span style="color: #008080;">$wpdb</span>-&gt;<span style="color: #006600;">posts</span>;
    <span style="color: #008080;">$exclude</span> = <span style="color: #ff00ff;">&quot;(NOT EXISTS (
      SELECT r.object_id FROM {$wpdb-&gt;term_relationships} r 
      INNER JOIN {$wpdb-&gt;term_taxonomy} t ON r.term_taxonomy_id = t.term_taxonomy_id 
      WHERE t.taxonomy = 'category' AND t.term_id IN (&quot;</span>.<span style="color: #ff0000;">join</span><span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">','</span>, <span style="color: #008080;">$cates</span><span style="color: #800000;">&#41;</span>.<span style="color: #ff00ff;">&quot;) AND r.object_id = `&quot;</span>.<span style="color: #008080;">$table_posts</span>.<span style="color: #ff00ff;">&quot;`.ID
    ))&quot;</span>;
    <span style="color: #008080;">$where</span> = <span style="color: #008080;">$exclude</span>.<span style="color: #ff00ff;">'  AND '</span>.<span style="color: #008080;">$where</span>;
  <span style="color: #800000;">&#125;</span>
&nbsp;
  <span style="color: blue;">return</span> <span style="color: #008080;">$where</span>;
<span style="color: #800000;">&#125;</span>
add_filter<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'sitemap_exclude_categories'</span>, <span style="color: #ff00ff;">'sitemap_exclude_categories'</span><span style="color: #800000;">&#41;</span>;</pre></div>

<p>通过 Wordpress 自身提供的 Hook API 来实现功能主要是为了尽可能避免过多地修改原插件的代码，以免插件升级时带来麻烦。现在这样升级插件时只要重做第一步就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/let-google-xml-sitemaps-ignore-the-specified-categories.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>丫丫咯呸，DNS 被篡改了</title>
		<link>http://www.voidman.com/2008/11/dns-has-been-tampered-with.html</link>
		<comments>http://www.voidman.com/2008/11/dns-has-been-tampered-with.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 15:12:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=185</guid>
		<description><![CDATA[fuck popup.adv.net
]]></description>
			<content:encoded><![CDATA[<p>fuck popup.adv.net</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/dns-has-been-tampered-with.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress 分页文章静态化的更优解决方案</title>
		<link>http://www.voidman.com/2008/11/the-better-solution-for-static-paged-post.html</link>
		<comments>http://www.voidman.com/2008/11/the-better-solution-for-static-paged-post.html#comments</comments>
		<pubDate>Wed, 12 Nov 2008 13:19:46 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Blog Related]]></category>

		<category><![CDATA[URL Rewrite]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[分页文章]]></category>

		<category><![CDATA[分页日志]]></category>

		<category><![CDATA[静态化]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=179</guid>
		<description><![CDATA[介绍利用 Wordpress 本身提供的接口来更好地实现分页文章静态化的方法，避免每次升级修改源文件的麻烦，具有更好的灵活性和适应性。]]></description>
			<content:encoded><![CDATA[<p>之前用比较暴力的方式实现了<a href="http://www.voidman.com/2008/03/create-static-html-files-for-paged-post.html">分页文章的静态化</a>，不过这样一来升级 Wordpress 就不太方便了。厌烦了每次升级都要修改源文件，于是利用 Wordpress 本身提供的接口实现了更好的解决方案。</p>
<p>以<code>/%year%/%monthnum%/%postname%.html</code>这样的永久链接结构为例：</p>
<p>1. 打开主题目录下的<code>functions.php</code>文件，添加以下代码：</p>

<div class="wp_syntax"><pre class="php"><span style="color: #008000; font-style: italic;">// 添加分页处理规则</span>
<span style="color: blue;">function</span> add_custom_post_rewrite_rules<span style="color: #800000;">&#40;</span><span style="color: #008080;">$rules</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: #008080;">$custom_rules</span> = <span style="color: blue;">array</span><span style="color: #800000;">&#40;</span>
    <span style="color: #ff00ff;">'([0-9]{4})/([0-9]{1,2})/([^/]+)-([0-9]+).html$'</span> =&gt; <span style="color: #ff00ff;">'index.php?year=$matches[1]&amp;monthnum=$matches[2]&amp;name=$matches[3]&amp;page=$matches[4]'</span>,
  <span style="color: #800000;">&#41;</span>;
  <span style="color: #008080;">$rules</span> = <span style="color: #ff0000;">array_merge</span><span style="color: #800000;">&#40;</span><span style="color: #008080;">$custom_rules</span>, <span style="color: #008080;">$rules</span><span style="color: #800000;">&#41;</span>;
&nbsp;
  <span style="color: blue;">return</span> <span style="color: #008080;">$rules</span>;
<span style="color: #800000;">&#125;</span>
add_filter<span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'post_rewrite_rules'</span>, <span style="color: #ff00ff;">'add_custom_post_rewrite_rules'</span><span style="color: #800000;">&#41;</span>;
&nbsp;
<span style="color: #008000; font-style: italic;">// 修改分页链接</span>
<span style="color: blue;">function</span> my_wp_link_pages<span style="color: #800000;">&#40;</span><span style="color: #008080;">$args</span> = <span style="color: #ff00ff;">''</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: #008080;">$args</span> .= <span style="color: #800000;">&#40;</span><span style="color: #008080;">$args</span> ? <span style="color: #ff00ff;">'&amp;'</span> : <span style="color: #ff00ff;">''</span><span style="color: #800000;">&#41;</span> . <span style="color: #ff00ff;">'echo=0'</span>;
  <span style="color: #008080;">$links</span> = wp_link_pages<span style="color: #800000;">&#40;</span><span style="color: #008080;">$args</span><span style="color: #800000;">&#41;</span>;
  <span style="color: #008080;">$links</span> = <span style="color: #ff0000;">preg_replace_callback</span><span style="color: #800000;">&#40;</span><span style="color: #ff00ff;">'|([0-9]{4}/[0-9]{1,2}/)([^/]+)(.html)(/)([0-9]+)|'</span>, <span style="color: #ff00ff;">'custom_page_link'</span>, <span style="color: #008080;">$links</span><span style="color: #800000;">&#41;</span>;
&nbsp;
  <span style="color: blue;">echo</span> <span style="color: #008080;">$links</span>;
<span style="color: #800000;">&#125;</span>
&nbsp;
<span style="color: blue;">function</span> custom_page_link<span style="color: #800000;">&#40;</span><span style="color: #008080;">$matches</span><span style="color: #800000;">&#41;</span> <span style="color: #800000;">&#123;</span>
  <span style="color: blue;">return</span> <span style="color: #008080;">$matches</span><span style="color: #800000;">&#91;</span><span style="color: #800080;">1</span><span style="color: #800000;">&#93;</span>.<span style="color: #008080;">$matches</span><span style="color: #800000;">&#91;</span><span style="color: #800080;">2</span><span style="color: #800000;">&#93;</span>.<span style="color: #ff00ff;">'-'</span>.<span style="color: #008080;">$matches</span><span style="color: #800000;">&#91;</span><span style="color: #800080;">5</span><span style="color: #800000;">&#93;</span>.<span style="color: #008080;">$matches</span><span style="color: #800000;">&#91;</span><span style="color: #800080;">3</span><span style="color: #800000;">&#93;</span>;
<span style="color: #800000;">&#125;</span></pre></div>

<p>2. 打开主题目录下的<code>single.php</code>文件，查找<code>wp_link_pages</code>并替换为<code>my_wp_link_pages</code>。</p>
<p>3. 后台“设置-永久链接”点击一下“保存修改”按钮，大功告成。</p>
<p>至于 life97 同学说的 <a href="http://www.voidman.com/2008/03/create-static-html-files-for-paged-post.html#comment-3781">.html/xxx 形式的链接访问失效</a>，这个可能和服务器设置有关，具体原因我也不是很清楚，不过可以通过在 .htaccess 文件中添加规则来解决此问题，如：</p>

<div class="wp_syntax"><pre class="apache">&lt;IfModule mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /
<span style="color: #00007f;">RewriteRule</span> ^<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">4</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span>^/<span style="color: #800000;">&#93;</span>+<span style="color: #800000;">&#41;</span>.html/trackback/?$ index.php?year=$<span style="color: #ff0000;">1</span>&amp;monthnum=$<span style="color: #ff0000;">2</span>&amp;name=$<span style="color: #ff0000;">3</span>&amp;tb=<span style="color: #ff0000;">1</span> <span style="color: #800000;">&#91;</span>L<span style="color: #800000;">&#93;</span>
<span style="color: #00007f;">RewriteRule</span> ^<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">4</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span>^/<span style="color: #800000;">&#93;</span>+<span style="color: #800000;">&#41;</span>.html/feed/<span style="color: #800000;">&#40;</span>feed|rdf|rss|rss2|atom<span style="color: #800000;">&#41;</span>/?$ index.php?year=$<span style="color: #ff0000;">1</span>&amp;monthnum=$<span style="color: #ff0000;">2</span>&amp;name=$<span style="color: #ff0000;">3</span>&amp;feed=$<span style="color: #ff0000;">4</span> <span style="color: #800000;">&#91;</span>L<span style="color: #800000;">&#93;</span>
<span style="color: #00007f;">RewriteRule</span> ^<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">4</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span><span style="color: #ff0000;">0</span><span style="color: #ff0000;">-9</span><span style="color: #800000;">&#93;</span><span style="color: #800000;">&#123;</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">2</span><span style="color: #800000;">&#125;</span><span style="color: #800000;">&#41;</span>/<span style="color: #800000;">&#40;</span><span style="color: #800000;">&#91;</span>^/<span style="color: #800000;">&#93;</span>+<span style="color: #800000;">&#41;</span>.html/<span style="color: #800000;">&#40;</span>feed|rdf|rss|rss2|atom<span style="color: #800000;">&#41;</span>/?$ index.php?year=$<span style="color: #ff0000;">1</span>&amp;monthnum=$<span style="color: #ff0000;">2</span>&amp;name=$<span style="color: #ff0000;">3</span>&amp;feed=$<span style="color: #ff0000;">4</span> <span style="color: #800000;">&#91;</span>L<span style="color: #800000;">&#93;</span>
&lt;/IfModule&gt;</pre></div>

<p>注意添加顺序，不要置于 Wordpress 生成的规则之后。</p>
<p>下面是几种其它永久链接结构的具体修改代码：</p>
<ul>
<li><a href='http://www.voidman.com/wp-content/uploads/2008/11/year-monthnumday-postname.txt'>/%year%/%monthnum%%day%/%postname%.html</a></li>
<li><a href='http://www.voidman.com/wp-content/uploads/2008/11/html-year-monthnum-day-postname.txt'>/html/%year%/%monthnum%/%day%/%postname%.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/the-better-solution-for-static-paged-post.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>安装了 Ubuntu 8.10 导致网卡在 XP 下工作不正常</title>
		<link>http://www.voidman.com/2008/11/ubuntu-810-make-the-networking-controller-not-work-properly-under-windows-xp.html</link>
		<comments>http://www.voidman.com/2008/11/ubuntu-810-make-the-networking-controller-not-work-properly-under-windows-xp.html#comments</comments>
		<pubDate>Tue, 04 Nov 2008 14:37:12 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[ubuntu 8.10]]></category>

		<category><![CDATA[windows xp]]></category>

		<category><![CDATA[网卡]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=176</guid>
		<description><![CDATA[在中午休息的间隙，花了二十分钟的时间安装 Ubuntu 8.10，重新回到 XP 下后提示网络电缆没有插好。一开始还以为之前为了避免 Ubuntu 安装程序从网络源下载文件而拔网线的时候把网线插头弄坏了，还去找来网线测试器检查网线，经检查一切正常。猜想网卡是不是坏了，不过又一想没理由啊好端端的网卡怎会突然就坏了。
将网卡驱动卸载，重启后 XP 提示发现新硬件，但重新安装了网卡驱动后，一切照旧，依然提示网络电缆没有插好。在我几乎要判断网卡已经坏了的时候，老大凑了过来说拔掉机箱电源后再接上试试。依言照做，还真解决了问题，网卡恢复了正常，囧rz。
细细想来，除了安装 Ubuntu 没对系统做了什么改动，要出问题也只有在这里了。果然，在我试着进入 Ubuntu 系统后再回到 XP 下，系统又提示网络电缆没有插好，但在 Ubuntu 下网卡确工作正常。这个结果实在有些出乎我的意料。好在“断电恢复法”依然有效，不过我担心这样多折腾几次之后网卡是不是真的会挂了  。
]]></description>
			<content:encoded><![CDATA[<p>在中午休息的间隙，花了二十分钟的时间安装 Ubuntu 8.10，重新回到 XP 下后提示网络电缆没有插好。一开始还以为之前为了避免 Ubuntu 安装程序从网络源下载文件而拔网线的时候把网线插头弄坏了，还去找来网线测试器检查网线，经检查一切正常。猜想网卡是不是坏了，不过又一想没理由啊好端端的网卡怎会突然就坏了。</p>
<p>将网卡驱动卸载，重启后 XP 提示发现新硬件，但重新安装了网卡驱动后，一切照旧，依然提示网络电缆没有插好。在我几乎要判断网卡已经坏了的时候，老大凑了过来说拔掉机箱电源后再接上试试。依言照做，还真解决了问题，网卡恢复了正常，囧rz。</p>
<p>细细想来，除了安装 Ubuntu 没对系统做了什么改动，要出问题也只有在这里了。果然，在我试着进入 Ubuntu 系统后再回到 XP 下，系统又提示网络电缆没有插好，但在 Ubuntu 下网卡确工作正常。这个结果实在有些出乎我的意料。好在“断电恢复法”依然有效，不过我担心这样多折腾几次之后网卡是不是真的会挂了 <img src='http://www.voidman.com/wp-includes/images/smilies/icon_evil.gif' alt=':evil:' class='wp-smiley' /> 。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/ubuntu-810-make-the-networking-controller-not-work-properly-under-windows-xp.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>即使知道要见面</title>
		<link>http://www.voidman.com/2008/11/even-know-to-meet.html</link>
		<comments>http://www.voidman.com/2008/11/even-know-to-meet.html#comments</comments>
		<pubDate>Mon, 03 Nov 2008 11:43:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Favorites]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Lydia]]></category>

		<category><![CDATA[Sara]]></category>

		<category><![CDATA[泰文歌曲]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=175</guid>
		<description><![CDATA[不需要听懂在唱什么，旖旎的旋律便足以让人沉醉，音乐不分国度。

  
  
  

mong kon orn aen lae mong kon rong hai
看见脆弱的人看到哭泣的人
bung kon pwud jai gub ruk tee mi
某人为爱而心伤痛
bung kon toom tae toom jai hai daem tee
某人奉献付出全部的心
mai hen waa mi arai keun ma
没看到有任何回报
chun kae yark tum sing tee tum nun peur krai
我只是想要问 那样做是为了谁
tee tum long bpai naed neuy bung mai
一直做下去 疲惫吗 ?
peur [...]]]></description>
			<content:encoded><![CDATA[<p>不需要听懂在唱什么，旖旎的旋律便足以让人沉醉，音乐不分国度。<br />
<object type="application/x-shockwave-flash" style="width:425px; height:355px;" data="http://www.youtube.com/v/pnadGNgUC6s&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0">
  <param name="movie" value="http://www.youtube.com/v/pnadGNgUC6s&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0" />
  <param name="wmode" value="transparent"></param>
  </object></p>
<blockquote class="lrc"><p>
mong kon orn aen lae mong kon rong hai<br />
看见脆弱的人看到哭泣的人</p>
<p>bung kon pwud jai gub ruk tee mi<br />
某人为爱而心伤痛</p>
<p>bung kon toom tae toom jai hai daem tee<br />
某人奉献付出全部的心</p>
<p>mai hen waa mi arai keun ma<br />
没看到有任何回报</p>
<p>chun kae yark tum sing tee tum nun peur krai<br />
我只是想要问 那样做是为了谁</p>
<p>tee tum long bpai naed neuy bung mai<br />
一直做下去 疲惫吗 ?</p>
<p>peur kum waa ruk laew arai gor yom ton !<br />
为了爱 甚麽都愿意承受</p>
<p>peur bung kon arai gor yom tum<br />
为了某人 甚麽都愿意做</p>
<p>toom tae took yung tum peur kum waa ruk<br />
奉献付出一切 为了爱而做</p>
<p>dae hark waa ruk laew mai mi arai di<br />
但如果爱了之后 没有甚麽好</p>
<p>lae nun bpai mai dai arai keun<br />
而且久而久之 没有任何回报</p>
<p>ruk bpai tum mai ja ord ton bpai teung nai mi kao jai<br />
为何去爱 要忍受到何时 不明白</p>
<p>jon ma jer ter tee tum chun rong hai tum hai pwud jai gub ruk tee mi<br />
直到遇见你使我哭泣拥有的爱让我伤痛</p>
<p>chun dai toom tae toom jai hai tung tee<br />
我可以奉献付出全部的心</p>
<p>tee hen gor mi dae roy num da<br />
所看见的就只有泪痕</p>
<p>roo lery don ni sing tee tum hai soo ton<br />
现在知道 让我面对承受的事情</p>
<p>you ngub bung kon yung mi kwarm hwung<br />
和某人在一起 拥有希望</p>
<p>peur kum waa ruk laew arai gor yom tum<br />
为了爱甚麽都愿意承受</p>
<p>peur bung kon arai gor yom tum chun tum peur ter tum peur kum waa ruk<br />
即使爱了之后 没有甚麽好</p>
<p>nub pen pee mai mi arai keun chun yung ton bpai<br />
没有任何回报 我依然承受下去</p>
<p>jer gub dua eng teung roo teung kao jai<br />
自己遇到后才知道 才明白</p>
<p>peur kum waa ruk laew arai gor yom tum<br />
为了爱 甚麽都愿意承受</p>
<p>peur bung kon arai gor yom tum chun tum peur ter tum peur kum waa ruk<br />
为了某人 甚麽都愿意做我为你而做为爱而做</p>
<p>dor hai meur ruk laew mai mi arai di<br />
<a href="http://www.cxmgy.com/music/mp3/jszdyjm.mp3">即使</a>爱了以后 没有甚麽好</p>
<p>nub pen pee mai mi arai keun chun yung ton bpai<br />
没有任何回报 我依然承受下去</p>
<p>jer gub dua eng teung kao jai<br />
自己遇到才明白
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/11/even-know-to-meet.html/feed</wfw:commentRss>
<enclosure url="http://www.cxmgy.com/music/mp3/jszdyjm.mp3" length="3822191" type="audio/mid" />
		</item>
		<item>
		<title>周末登山记</title>
		<link>http://www.voidman.com/2008/10/wu-yun-shan.html</link>
		<comments>http://www.voidman.com/2008/10/wu-yun-shan.html#comments</comments>
		<pubDate>Mon, 27 Oct 2008 12:49:32 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Travel Notes]]></category>

		<category><![CDATA[五云山]]></category>

		<category><![CDATA[游记]]></category>

		<category><![CDATA[西湖]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=171</guid>
		<description><![CDATA[周末和几个老友去爬五云山，想来离上一次爬山已快一年了，看来要实现之前定下的目标还任务艰巨啊。
五云山是西湖群山中的第三座大山，相传山上常有五色祥云盘旋其上，故而名之。可惜天公不作美阴沉沉的还时不时下着毛毛小雨，天上的祥云是无法一睹为快了；不过雨中登山也应当别有一番滋味，不由得想起高中课文《雨中登泰山》来。
山路掩在丛林之中，夹着淅淅沥沥的雨声，却显得格外的幽静。有人提醒注意脚下的石阶，遇到祥云，以脚踩之可沾祥瑞之气——原来祥云还有另外一番说法。山路颇缓，让人没有兴奋感，所以我们偶尔也抄抄陡峭的小道。一路上碰到不少参加西湖跑山赛的选手，很是佩服他们参赛的勇气。
约莫一个时辰左右，我们便到山顶了。一踏上山顶，便被那桩银杏树所吸引，树干粗大，恐五人不能合围。走进一看，树干已中空，有被烧过的痕迹，再看石碑介绍得知这银杏树距今已有一千四百余年了依然巍然耸立，不由得顿生感慨。树后白墙黑瓦，是一座寺庙。寺内供奉着各路神仙，香火颇盛。找寻最后一朵祥云时，在左侧的庭院看见了伟人的题词，算是个意外的收获。
合影留念之后，我们决定往北取道十里锒铛然后入梅家坞FB，这时没停歇多久的雨又开始下了起来。十里锒铛的名头倒是听过，走在古道之上，想起古时的货郎挑货挑担翻山越岭，自是没有我们这么悠闲。
]]></description>
			<content:encoded><![CDATA[<p>周末和几个老友去爬五云山，想来离上一次爬山已快一年了，看来要实现之前定下的<a href="http://www.voidman.com/2007/11/map-for-westlake.html">目标</a>还任务艰巨啊。</p>
<p>五云山是西湖群山中的第三座大山，相传山上常有五色祥云盘旋其上，故而名之。可惜天公不作美阴沉沉的还时不时下着毛毛小雨，天上的祥云是无法一睹为快了；不过雨中登山也应当别有一番滋味，不由得想起高中课文《雨中登泰山》来。</p>
<p>山路掩在丛林之中，夹着淅淅沥沥的雨声，却显得格外的幽静。有人提醒注意脚下的石阶，遇到祥云，以脚踩之可沾祥瑞之气——原来祥云还有另外一番说法。山路颇缓，让人没有兴奋感，所以我们偶尔也抄抄陡峭的小道。一路上碰到不少参加西湖跑山赛的选手，很是佩服他们参赛的勇气。</p>
<p>约莫一个时辰左右，我们便到山顶了。一踏上山顶，便被那桩银杏树所吸引，树干粗大，恐五人不能合围。走进一看，树干已中空，有被烧过的痕迹，再看石碑介绍得知这银杏树距今已有一千四百余年了依然巍然耸立，不由得顿生感慨。树后白墙黑瓦，是一座寺庙。寺内供奉着各路神仙，香火颇盛。找寻最后一朵祥云时，在左侧的庭院看见了伟人的题词，算是个意外的收获。</p>
<p>合影留念之后，我们决定往北取道十里锒铛然后入梅家坞FB，这时没停歇多久的雨又开始下了起来。十里锒铛的名头倒是听过，走在古道之上，想起古时的货郎挑货挑担翻山越岭，自是没有我们这么悠闲。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/10/wu-yun-shan.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>被 Spammer 盯上了</title>
		<link>http://www.voidman.com/2008/10/spammer.html</link>
		<comments>http://www.voidman.com/2008/10/spammer.html#comments</comments>
		<pubDate>Wed, 22 Oct 2008 13:05:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Blog Related]]></category>

		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=170</guid>
		<description><![CDATA[突然发现后台显示拦截了几千条垃圾评论，没想到我的博客访问量这么低，居然也会被 Spammer 盯上。庆幸之前安装了 Akismet 插件，没有裸奔。
看了那些评论，都是冲着这篇文章去的，有些奇怪。继续观察中……
更新：
貌似 Spammer 只盯上了上文提到的那篇日志，在关闭评论和引用功能后，垃圾评论便不再出现了。
]]></description>
			<content:encoded><![CDATA[<p>突然发现后台显示拦截了几千条垃圾评论，没想到我的博客访问量这么低，居然也会被 Spammer 盯上。庆幸之前安装了 Akismet 插件，没有裸奔。</p>
<p>看了那些评论，都是冲着<a href="http://www.voidman.com/2008/03/talk-about-safari-for-windows.html">这篇文章</a>去的，有些奇怪。继续观察中……</p>
<p><strong>更新：</strong><br />
貌似 Spammer 只盯上了上文提到的那篇日志，在关闭评论和引用功能后，垃圾评论便不再出现了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/10/spammer.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Trouble is a friend</title>
		<link>http://www.voidman.com/2008/10/trouble-is-a-friend.html</link>
		<comments>http://www.voidman.com/2008/10/trouble-is-a-friend.html#comments</comments>
		<pubDate>Tue, 21 Oct 2008 14:15:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Favorites]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Lenka]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=169</guid>
		<description><![CDATA[最近很是喜爱 Lenka 的这首歌，轻快的节奏却又有几分慵懒，清新的嗓音略带些沙哑仿佛有磁性一般，让人无法拒绝。
很少去关心歌词的内容，因为我觉得音乐本身就足够了，但却认真读了这首歌的歌词。Trouble is a friend，很有意思的提法，也许这就是一种人生态度。
PS: 套用一下 wayne 的话，这里改叫做每月一歌好了。

  
  
  

Trouble will find you no matter where you go, oh oh
No matter if you're fast, no matter if you're slow, oh oh
The eye of the storm wanna cry in the morn, oh oh
You're fine for a while but you start to [...]]]></description>
			<content:encoded><![CDATA[<p>最近很是喜爱 Lenka 的这首歌，轻快的节奏却又有几分慵懒，清新的嗓音略带些沙哑仿佛有磁性一般，让人无法拒绝。</p>
<p>很少去关心歌词的内容，因为我觉得音乐本身就足够了，但却认真读了这首歌的歌词。Trouble is a friend，很有意思的提法，也许这就是一种人生态度。</p>
<p>PS: 套用一下 <a href="http://gopherwood.info/2008/10/15/2008-oct-ado">wayne</a> 的话，这里改叫做每月一歌好了。<br />
<object type="application/x-shockwave-flash" style="width:425px; height:355px;" data="http://www.youtube.com/v/lObGVx3YORw&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0">
  <param name="movie" value="http://www.youtube.com/v/lObGVx3YORw&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0" />
  <param name="wmode" value="transparent"></param>
  </object></p>
<blockquote class="lrc"><p>
Trouble will find you no matter where you go, oh oh<br />
No matter if you're fast, no matter if you're slow, oh oh<br />
The eye of the storm wanna cry in the morn, oh oh<br />
You're fine for a while but you start to lose control<br />
He's there in the dark, he's there in my heart<br />
He waits in the wings, he's gotta play a part<br />
<a href="http://www.olmas.org/bbs/attachments/forumid_15/20080928_9063e2ff4b9c8f15d142Eavagj7PeEbq.mp3">Trouble is a friend</a>, yeah trouble is a friend of mine<br />
Ahh..</p>
<p>And no matter what I feed him he always seems to grow, oh oh<br />
He sees what I see and he knows what I know, oh oh<br />
So don't forget as you ease on down my road<br />
He's there in the dark, he's there in my heart<br />
He waits in the wings, he's gotta play a part<br />
Trouble is a friend, yeah trouble is a friend of mine<br />
So don't be alarmed if he takes you by the arm<br />
I roll down the window, I'm a sucker for his charm<br />
Trouble is a friend, yeah trouble is a friend of mine<br />
Ahh..</p>
<p>How I hate the way he makes me feel<br />
And how I try to make him leave<br />
I try, oh oh I try<br />
But he's there in the dark, he's there in my heart<br />
He waits in the wings, he's gotta play a part<br />
Trouble is a friend, yeah trouble is a friend of mine<br />
So don't be alarmed if he takes you by the arm<br />
I roll down the window, I'm a sucker for his charm<br />
Trouble is a friend, yeah trouble is a friend of mine</p>
<p>Ahh..<br />
Ooh..<br />
Ahh..<br />
Ooh..
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/10/trouble-is-a-friend.html/feed</wfw:commentRss>
<enclosure url="http://www.olmas.org/bbs/attachments/forumid_15/20080928_9063e2ff4b9c8f15d142Eavagj7PeEbq.mp3" length="5861980" type="audio/mpeg" />
		</item>
		<item>
		<title>It's Not Goodbye</title>
		<link>http://www.voidman.com/2008/09/its-not-goodbye.html</link>
		<comments>http://www.voidman.com/2008/09/its-not-goodbye.html#comments</comments>
		<pubDate>Tue, 09 Sep 2008 15:22:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Favorites]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Laura Pausini]]></category>

		<category><![CDATA[欧美音乐]]></category>

		<guid isPermaLink="false">http://www.voidman.com/?p=167</guid>
		<description><![CDATA[
  
  
  

Now what if I never kiss your lips again
Or feel the touch of your sweet embrace
How would I ever go on?
Without you there's no place to belong
Well someday love is going to lead you back to me
But till it does I'll have an empty heart
So I'll just have to [...]]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" style="width:425px; height:355px;" data="http://www.youtube.com/v/pq6lsZoWcFE&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0">
  <param name="movie" value="http://www.youtube.com/v/pq6lsZoWcFE&amp;rel=0&amp;color1=0xd6d6d6&amp;color2=0xf0f0f0" />
  <param name="wmode" value="transparent"></param>
  </object></p>
<blockquote class="lrc"><p>
Now what if I never kiss your lips again<br />
Or feel the touch of your sweet embrace<br />
How would I ever go on?<br />
Without you there's no place to belong<br />
Well someday love is going to lead you back to me<br />
But till it does I'll have an empty heart<br />
So I'll just have to believe some where out there you're thinking of me </p>
<p>Till the day I let you go<br />
Until we say our next hello its not goodbye<br />
Till I see you again<br />
I'll be right here remembering when<br />
And if time is on our side<br />
There will be no tears to cry on down the road<br />
There is one thing I can't deny its not goodbye </p>
<p>You think I'd be strong enough to make it through<br />
And rise above when the rain falls down<br />
But it抯 so hard to be strong when you've been missing somebody so long<br />
It's just a matter of time I'm sure<br />
Well time takes time and I can't hold on<br />
So won't you try as hard as you can<br />
Put my broken heart together again? </p>
<p>Till the day I let you go<br />
Until we say our next hello its not goodbye<br />
Till I see you again<br />
I'll be right here remembering when<br />
And if time is on our side<br />
there will be no tears to cry on down the road<br />
there is one thing I can't deny its not goodbye </p>
<p>It's not goodbye<br />
Till the day I'll let you go<br />
until we say our next hello its not goodbye<br />
Till I see you again<br />
I'll be right here remembering when<br />
And if time is on our side<br />
there will be no tears to cry on down the road<br />
And I can't deny it's not goodbye<br />
Its not goodbye<br />
Till I see you<br />
I'll be right here remembering when<br />
Time is on our side<br />
No more tears to cry<br />
And I cant deny<br />
It's not goodbye<br />
Goodbye<br />
no more tears to cry<br />
It's it's not goodbye
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.voidman.com/2008/09/its-not-goodbye.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
