<?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>扫地老僧的Blog &#187; blog</title>
	<atom:link href="http://www.doyj.com/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doyj.com</link>
	<description>Laputa - 远方地平线，闪耀着光芒</description>
	<lastBuildDate>Thu, 10 Nov 2011 17:24:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>又到中秋</title>
		<link>http://www.doyj.com/2006/10/06/115/</link>
		<comments>http://www.doyj.com/2006/10/06/115/#comments</comments>
		<pubDate>Thu, 05 Oct 2006 20:55:57 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/10/06/115/</guid>
		<description><![CDATA[现在是凌晨4点45， 坐在窗口旁， 俯瞰着整个小区。路灯静静得亮着，远方的工地偶尔传来一些机械的声音，旁边闷闷的电脑风扇声。又一个中秋开始了。 测试用Writely 来写blog ，感觉不错。在... ]]></description>
			<content:encoded><![CDATA[<p>现在是凌晨4点45， 坐在窗口旁， 俯瞰着整个小区。路灯静静得亮着，远方的工地偶尔传来一些机械的声音，旁边闷闷的电脑风扇声。又一个中秋开始了。</p>
<p>测试用<a target="blank_" title="Writely" href="http://www.writely.com/">Writely</a> 来写blog  ，感觉不错。在线Office 2007的测试帐号没申请到，只好先用用google。已经越来越喜欢上google的线上软件，微软做的能有这么好么？</p>
<p>update： Writely写的blog还是有些问题， 标题是空的，更新后又生成一个新的post. 看来还是要先用微软的Live writer</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/10/06/115/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>唯色的博客被封了</title>
		<link>http://www.doyj.com/2006/10/05/%e5%94%af%e8%89%b2%e7%9a%84%e5%8d%9a%e5%ae%a2%e8%a2%ab%e5%b0%81%e4%ba%86/</link>
		<comments>http://www.doyj.com/2006/10/05/%e5%94%af%e8%89%b2%e7%9a%84%e5%8d%9a%e5%ae%a2%e8%a2%ab%e5%b0%81%e4%ba%86/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 21:01:20 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[西藏]]></category>
		<category><![CDATA[GFW]]></category>
		<category><![CDATA[民主]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/10/05/%e5%94%af%e8%89%b2%e7%9a%84%e5%8d%9a%e5%ae%a2%e8%a2%ab%e5%b0%81%e4%ba%86/</guid>
		<description><![CDATA[一个了解西藏历史及现状的窗口被关闭了，一个思想的火焰被隔绝了。 X TMD gong fei！！！下面是唯色对此事的访谈（要有代理才能看）： 藏族女作家唯色谈其博克被封 下面是她的作品《西藏记... ]]></description>
			<content:encoded><![CDATA[<p>一个了解西藏历史及现状的窗口被关闭了，一个思想的火焰被隔绝了。 X TMD gong fei！！！下面是唯色对此事的访谈（要有代理才能看）：</p>
<p><a href="http://davidpeng.wordpress.com/2006/07/31/%E8%97%8F%E6%97%8F%E5%A5%B3%E4%BD%9C%E5%AE%B6%E5%94%AF%E8%89%B2%E8%B0%88%E5%85%B6%E5%8D%9A%E5%85%8B%E8%A2%AB%E5%B0%81/">藏族女作家唯色谈其博克被封</a></p>
<p>下面是她的作品《西藏记忆》 的节选</p>
<p><a href="https://www.recordhistory.org/mediawiki/index.php/%E8%A5%BF%E8%97%8F%E8%AE%B0%E5%BF%86">《西藏记忆》</a></p>
<p>补充： <a href="http://www.doyj.com/2008/04/19/%e5%9c%a8%e5%94%af%e8%89%b2%e5%8d%9a%e5%ae%a2%e7%9a%84%e5%9b%9e%e5%b8%96/" title="唯色博客">在唯色博客的回帖</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/10/05/%e5%94%af%e8%89%b2%e7%9a%84%e5%8d%9a%e5%ae%a2%e8%a2%ab%e5%b0%81%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>老婆的中文blog正式开张了</title>
		<link>http://www.doyj.com/2006/09/30/%e8%80%81%e5%a9%86%e7%9a%84%e4%b8%ad%e6%96%87blog%e6%ad%a3%e5%bc%8f%e5%bc%80%e5%bc%a0%e4%ba%86/</link>
		<comments>http://www.doyj.com/2006/09/30/%e8%80%81%e5%a9%86%e7%9a%84%e4%b8%ad%e6%96%87blog%e6%ad%a3%e5%bc%8f%e5%bc%80%e5%bc%a0%e4%ba%86/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 16:58:38 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[推荐]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[韩国]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/09/30/%e8%80%81%e5%a9%86%e7%9a%84%e4%b8%ad%e6%96%87blog%e6%ad%a3%e5%bc%8f%e5%bc%80%e5%bc%a0%e4%ba%86/</guid>
		<description><![CDATA[就是韩国阿姨（http://www.hanguoayi.com/），其实已经开张很多天了，只是开始时内容很少，等到现在有点内容了再做推介。 老婆想在这个网站上介绍韩国料理， 韩国历史，韩国文化，也顺便练练... ]]></description>
			<content:encoded><![CDATA[<p>就是<a title="韩国阿姨" href="http://www.hanguoayi.com/">韩国阿姨</a>（<a title="http://www.hanguoayi.com/" href="http://www.hanguoayi.com/">http://www.hanguoayi.com/</a>），其实已经开张很多天了，只是开始时内容很少，等到现在有点内容了再做推介<img alt="smile_tongue" src="http://spaces.live.com/rte/emoticons/smile_tongue.gif" />。</p>
<p>老婆想在这个网站上介绍韩国料理， 韩国历史，韩国文化，也顺便练练自己的中文。欢迎大家捧场。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/09/30/%e8%80%81%e5%a9%86%e7%9a%84%e4%b8%ad%e6%96%87blog%e6%ad%a3%e5%bc%8f%e5%bc%80%e5%bc%a0%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>一个太不成熟的WP插件</title>
		<link>http://www.doyj.com/2006/09/29/%e4%b8%80%e4%b8%aa%e5%a4%aa%e4%b8%8d%e6%88%90%e7%86%9f%e7%9a%84wp%e6%8f%92%e4%bb%b6/</link>
		<comments>http://www.doyj.com/2006/09/29/%e4%b8%80%e4%b8%aa%e5%a4%aa%e4%b8%8d%e6%88%90%e7%86%9f%e7%9a%84wp%e6%8f%92%e4%bb%b6/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 15:32:58 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/09/29/%e4%b8%80%e4%b8%aa%e5%a4%aa%e4%b8%8d%e6%88%90%e7%86%9f%e7%9a%84wp%e6%8f%92%e4%bb%b6/</guid>
		<description><![CDATA[今天在Google Reader上看到有人推荐 Google Sitemaps &#8211; UTW Tag Addon for WordPress 2.0, 感觉想法不错， 应该对SEO有帮助， 按照那个网站上说的步骤装了一个。 结果看输出的sitemap.xml 居然里面的tag 链接... ]]></description>
			<content:encoded><![CDATA[<p>今天在Google Reader上看到有人推荐</p>
<p><a rel="nofollow" target="_blank" href="http://www.dicontas.co.uk/blog/google-sitemap-utw-tag-wordpress-plugin/">Google Sitemaps &#8211; UTW Tag Addon for WordPress 2.0</a>, 感觉想法不错， 应该对SEO有帮助， 按照那个网站上说的步骤装了一个。 结果看输出的sitemap.xml 居然里面的tag 链接都是指向这个插件作者的站点。 看了他的php源码， 居然把自己站点的链接写死在了代码里。 改成自己的试了试， 发现还是不行， 才注意到他在URL中没有考虑到亚洲字符。 自己也能改， 但不想浪费时间直接给卸载了。</p>
<p>大家有看到这个插件的就不要浪费时间了，这么不成熟的插件头一次见到， 白白浪费了10分钟。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/09/29/%e4%b8%80%e4%b8%aa%e5%a4%aa%e4%b8%8d%e6%88%90%e7%86%9f%e7%9a%84wp%e6%8f%92%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>推荐Google Reader</title>
		<link>http://www.doyj.com/2006/09/29/%e6%8e%a8%e8%8d%90google-reader/</link>
		<comments>http://www.doyj.com/2006/09/29/%e6%8e%a8%e8%8d%90google-reader/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 15:09:31 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[推荐]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/09/29/%e6%8e%a8%e8%8d%90google-reader/</guid>
		<description><![CDATA[今天Google Reader升级了， 界面改成下面的样子。比原先又方便了很多。 前一阵在朋友圈里做了个调查，居然很多人都不用RSS Reader，更少人用在线的Reader。其实用Google Reader来看朋友们的blog会方... ]]></description>
			<content:encoded><![CDATA[<p>今天<a href="https://www.google.com/reader">Google Reader</a>升级了， 界面改成下面的样子。比原先又方便了很多。</p>
<p><a href="http://www.doyj.com/wp-content/uploads/2006/09/WindowsLiveWriter/GoogleReader_145AA/image%7B0%7D%5B2%5D.png"><img width="477" height="363" border="0" style="border: 0px none " src="http://www.doyj.com/wp-content/uploads/2006/09/WindowsLiveWriter/GoogleReader_145AA/image%7B0%7D_thumb.png" /></a></p>
<p>前一阵在朋友圈里做了个调查，居然很多人都不用RSS Reader，更少人用在线的Reader。其实用Google Reader来看朋友们的blog会方便很多，再也不用隔几天挨个去朋友们的blog查看更新了， 也不用担心会漏过blog上的精彩文章。 大家只要去 <a title="http://www.google.com/reader/" href="http://www.google.com/reader/">http://www.google.com/reader/</a> 用自己的gmail登陆即可， 然后找到别人的RSS Feed，在Google Reader里选择Add subscription即可。 以后只要每天看一眼Google Reader就能知道所有自己关注的blog有没有新的文章。</p>
<p>我的blog的RSS Feed是 <a title="http://www.doyj.com/feed/" href="http://www.doyj.com/feed/">http://www.doyj.com/feed/</a>，欢迎大家订阅<img alt="smile_nerd" src="http://spaces.live.com/rte/emoticons/smile_nerd.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/09/29/%e6%8e%a8%e8%8d%90google-reader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>优化WordPress的载入速度</title>
		<link>http://www.doyj.com/2006/08/28/%e4%bc%98%e5%8c%96wordpress%e7%9a%84%e8%bd%bd%e5%85%a5%e9%80%9f%e5%ba%a6/</link>
		<comments>http://www.doyj.com/2006/08/28/%e4%bc%98%e5%8c%96wordpress%e7%9a%84%e8%bd%bd%e5%85%a5%e9%80%9f%e5%ba%a6/#comments</comments>
		<pubDate>Sun, 27 Aug 2006 22:38:55 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/08/28/%e4%bc%98%e5%8c%96wordpress%e7%9a%84%e8%bd%bd%e5%85%a5%e9%80%9f%e5%ba%a6/</guid>
		<description><![CDATA[按照 Zhang-Zi 的思路优化了一下， 确实速度有明显提升。可惜没什么量化指标，不知道哪里有量化网站访问速度的工具。 依主观感觉，合并js和css对载入速度提升的帮助最大... ]]></description>
			<content:encoded><![CDATA[<p>按照 <a href="http://zhiqiang.org/blog/420.html">Zhang-Zi</a> 的思路优化了一下， 确实速度有明显提升。可惜没什么量化指标，不知道哪里有量化网站访问速度的工具。 依主观感觉，合并js和css对载入速度提升的帮助最大。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/28/%e4%bc%98%e5%8c%96wordpress%e7%9a%84%e8%bd%bd%e5%85%a5%e9%80%9f%e5%ba%a6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>我的blog也开始挣钱了:)</title>
		<link>http://www.doyj.com/2006/08/26/%e6%88%91%e7%9a%84blog%e4%b9%9f%e5%bc%80%e5%a7%8b%e6%8c%a3%e9%92%b1%e4%ba%86/</link>
		<comments>http://www.doyj.com/2006/08/26/%e6%88%91%e7%9a%84blog%e4%b9%9f%e5%bc%80%e5%a7%8b%e6%8c%a3%e9%92%b1%e4%ba%86/#comments</comments>
		<pubDate>Fri, 25 Aug 2006 17:34:56 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/08/26/%e6%88%91%e7%9a%84blog%e4%b9%9f%e5%bc%80%e5%a7%8b%e6%8c%a3%e9%92%b1%e4%ba%86/</guid>
		<description><![CDATA[作了近1个月的google adsense, 终于挣到了1.20美刀. Adsense的大牛们别笑，自己很知足了:D。 大家谁要感兴趣也去 google adsense 申请个帐号吧。 不过中文的 adsense 市场比英文要差很多（从我的站点看，... ]]></description>
			<content:encoded><![CDATA[<p>作了近1个月的<a target="_blank" href="https://www.google.com/adsense/">google adsense</a>, 终于挣到了1.20美刀. Adsense的大牛们别笑，自己很知足了:D。</p>
<p><a href="http://www.doyj.com/wp-content/uploads/2006/08/WindowsLiveWriter/blog_1648/image04.png"><img width="580" height="51" border="0" style="border-width: 0px" src="http://www.doyj.com/wp-content/uploads/2006/08/WindowsLiveWriter/blog_1648/image0_thumb.png" /></a></p>
<p>大家谁要感兴趣也去 <a target="_blank" href="https://www.google.com/adsense/">google adsense</a> 申请个帐号吧。 不过中文的 adsense 市场比英文要差很多（从我的站点看，中英文adsense要差10倍以上），大家要有心理准备。 要么就是写给老外看的英文blog， <a href="http://home.wangjianshuo.com">王健硕</a>的blog主要就是英文内容， 据说收入一个月在5000人民币左右。</p>
<p>下面是一些真正挣钱的blog</p>
<p><a href="http://www.boingboing.net/">http://www.boingboing.net/</a> 年收入100万美元的blog</p>
<p><a href="http://www.techcrunch.com/">http://www.techcrunch.com/</a> 月收入6万美元的blog</p>
<p><a href="http://www.huffingtonpost.com/">http://www.huffingtonpost.com/</a> 获VC 500万美元的blog</p>
<p><a rel="tag" href="http://technorati.com/tag/adsense"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/26/%e6%88%91%e7%9a%84blog%e4%b9%9f%e5%bc%80%e5%a7%8b%e6%8c%a3%e9%92%b1%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Smart Archives 增强</title>
		<link>http://www.doyj.com/2006/08/19/smart-archives-%e5%a2%9e%e5%bc%ba/</link>
		<comments>http://www.doyj.com/2006/08/19/smart-archives-%e5%a2%9e%e5%bc%ba/#comments</comments>
		<pubDate>Fri, 18 Aug 2006 19:06:44 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.doyj.com/2006/08/19/smart-archives-%e5%a2%9e%e5%bc%ba/</guid>
		<description><![CDATA[安装了 Justin Blanton 开发的 smart archives 插件， 发现这个插件对中文和韩文支持不佳。我给做了点小修改，并且对他的一些小缺陷也进行了补正。最后的效果请看 http://www.doyj.com/archives/。 安装方... ]]></description>
			<content:encoded><![CDATA[
<p><font color="#000000">安装了 <a href="http://justinblanton.com/">Justin Blanton</a> 开发的 <a href="http://justinblanton.com/projects/smartarchives/">smart archives</a> 插件， 发现这个插件对中文和韩文支持不佳。我给做了点小修改，并且对他的一些小缺陷也进行了补正。最后的效果请看 <a href="http://www.doyj.com/archives/">http://www.doyj.com/archives/</a>。</font></p>
<pre><span style="color: #0000ff"><font color="#000000">安装方法如下：</font></span></pre>
<ol>
<li><span style="color: #0000ff"><font face="Courier New" color="#000000">将下面的代码拷贝并存成文件smartarchives.php</font></span></li>
<li><span style="color: #0000ff"><font face="Courier New" color="#000000">将smartarchives.php 上载到你的plugin目录</font></span></li>
<li><span style="color: #0000ff"><font face="Courier New" color="#000000">到控制面板激活Smart Archives 插件</font></span></li>
<li><span style="color: #0000ff"><font face="Courier New" color="#000000">在适当的地方插入smartArchives()函数调用。<br />
这个函数有两个参数，第一个在”both”, “block”,”list”中选择,默认为both 第二个是要排除的分类id. </font></span></li>
</ol>
<pre><span style="color: #0000ff"><font color="#000000">下面就是修改后的代码：</font></span></pre>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">&lt;?php</span></li>
<li><span style="color: #ffa500;">/*</span></li>
<li><span style="color: #ffa500;">Plugin Name: Smart Archives</span></li>
<li><span style="color: #ffa500;">Version: 1.5</span></li>
<li><span style="color: #ffa500;">Plugin URI: </span><span style="color: Blue;">http://justinblanton.com/projects/smartarchives/</span></li>
<li><span style="color: #ffa500;">Description: A simple, clean, and future-proof way to present your archives.</span></li>
<li><span style="color: #ffa500;">Author: Justin Blanton</span></li>
<li><span style="color: #ffa500;">Author URI: </span><span style="color: Blue;">http://justinblanton.com</span></li>
<li><span style="color: #ffa500;">*/</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">smartArchives</span><span style="color: Olive;">(</span><span style="color: #00008b;">$format</span><span style="color: Gray;">=</span><span style="color: #8b0000;">'</span><span style="color: Red;">both</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #00008b;">$catID</span><span style="color: Gray;">=</span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">global</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$tableposts</span><span style="color: Gray;">, </span><span style="color: #00008b;">$wpdb</span><span style="color: Gray;">, </span><span style="color: #00008b;">$PHP_SELF</span><span style="color: Gray;"> , </span><span style="color: #00008b;">$month</span><span style="color: Gray;"> ;</span></li>
<li><span style="color: Blue;">setlocale</span><span style="color: Olive;">(</span><span style="color: Blue;">LC_ALL</span><span style="color: Gray;">,</span><span style="color: Blue;">WPLANG</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// set localization language</span></li>
<li><span style="color: #ffa500;">// set the URI of your archives; this might not need to be changed (currently, it's </span><span style="color: Blue;">http://yoursite.com/archives/</span><span style="color: #ffa500;">)</span></li>
<li><span style="color: #00008b;">$now</span><span style="color: Gray;"> = </span><span style="color: Blue;">gmdate</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Y-m-d H:i:s</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// get the current GMT date</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">((</span><span style="color: #00008b;">$format</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">'</span><span style="color: Red;">both</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> || </span><span style="color: Olive;">(</span><span style="color: #00008b;">$format</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">'</span><span style="color: Red;">block</span><span style="color: #8b0000;">'</span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: #ffa500;">// check to see if we are supposed to display the block</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$qy</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT distinct year(post_date) as year, post_status </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;">&nbsp;</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; WHERE post_status='publish' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; AND post_date &lt;= NOW() </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; ORDER BY year desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">// loop to create the small archive block with year/month links</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">while</span><span style="color: Olive;">(</span><span style="color: #00008b;">$years</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_fetch_array</span><span style="color: Olive;">(</span><span style="color: #00008b;">$qy</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;strong&gt;&lt;a href=&quot;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">get_year_link</span><span style="color: Olive;">(</span><span style="color: #00008b;">$years</span><span style="color: Olive;">[</span><span style="color: Blue;">year</span><span style="color: Olive;">])</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$years</span><span style="color: Olive;">[</span><span style="color: Blue;">year</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/a&gt;:&lt;/strong&gt; </span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$qm</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT distinct month(post_date) as monthv </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;">&nbsp;</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY monthv&nbsp; asc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">or</span><span style="color: Gray;"> </span><span style="color: Green;">die</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_error</span><span style="color: Olive;">())</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$i</span><span style="color: Gray;">=</span><span style="color: Maroon;">1</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;">&lt;=</span><span style="color: Maroon;">12</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;">++</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$q</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT *, year(post_date) as year </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;">&nbsp;</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE year(post_date)='</span><span style="color: #00008b;">$years</span><span style="color: Red;">[year]' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month(post_date)='</span><span style="color: #00008b;">$i</span><span style="color: Red;">' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND post_status='publish' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND post_date &lt;= NOW() </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY id desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">or</span><span style="color: Gray;"> </span><span style="color: Green;">die</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_error</span><span style="color: Olive;">())</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$sm</span><span style="color: Gray;"> =&nbsp; &nbsp; </span><span style="color: #00008b;">$month</span><span style="color: Olive;">[</span><span style="color: Blue;">zeroise</span><span style="color: Olive;">(</span><span style="color: #00008b;">$i</span><span style="color: Gray;">,</span><span style="color: Maroon;">2</span><span style="color: Olive;">)]</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// get the shortened month name; strtotime() localizes</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_num_rows</span><span style="color: Olive;">(</span><span style="color: #00008b;">$q</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;a href=&quot;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">get_month_link</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: #00008b;">$years</span><span style="color: Olive;">[</span><span style="color: Blue;">year</span><span style="color: Olive;">]</span><span style="color: Gray;">, </span><span style="color: #00008b;">$i</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$sm</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/a&gt; </span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;emptymonth&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$sm</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt; </span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;br /&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;br /&gt;&lt;br /&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">((</span><span style="color: #00008b;">$format</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">'</span><span style="color: Red;">both</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> || </span><span style="color: Olive;">(</span><span style="color: #00008b;">$format</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">'</span><span style="color: Red;">list</span><span style="color: #8b0000;">'</span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: #ffa500;">//check to see if we are supposed to display the list</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$qy</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT distinct year(post_date) as year, post_status </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;">&nbsp;</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; WHERE post_status='publish' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; AND post_date &lt;= NOW() </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; ORDER BY year desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">// loop to display links to all posts, sorted by descending month and day</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">while</span><span style="color: Olive;">(</span><span style="color: #00008b;">$years</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_fetch_array</span><span style="color: Olive;">(</span><span style="color: #00008b;">$qy</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$qm</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT distinct month(post_date) as monthv FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;"> ORDER BY monthv desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">or</span><span style="color: Gray;"> </span><span style="color: Green;">die</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_error</span><span style="color: Olive;">())</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">while</span><span style="color: Olive;">(</span><span style="color: #00008b;">$date</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_fetch_array</span><span style="color: Olive;">(</span><span style="color: #00008b;">$qm</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$q</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT *, year(post_date) as year, month(post_date) as monthv </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;"> WHERE year(post_date)='</span><span style="color: #00008b;">$years</span><span style="color: Red;">[year]'</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month(post_date)='</span><span style="color: #00008b;">$date</span><span style="color: Red;">[monthv]' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND post_status='publish' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND post_date &lt;= NOW() </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY id desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">or</span><span style="color: Gray;"> </span><span style="color: Green;">die</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_error</span><span style="color: Olive;">())</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_num_rows</span><span style="color: Olive;">(</span><span style="color: #00008b;">$q</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$lm</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$month</span><span style="color: Olive;">[</span><span style="color: Blue;">zeroise</span><span style="color: Olive;">(</span><span style="color: #00008b;">$date</span><span style="color: Olive;">[</span><span style="color: Blue;">monthv</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span><span style="color: Maroon;">2</span><span style="color: Olive;">)]</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// get the full month name; strtotime() localizes</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;h2&gt;&lt;a href=&quot;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">get_month_link</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$years</span><span style="color: Olive;">[</span><span style="color: Blue;">year</span><span style="color: Olive;">]</span><span style="color: Gray;">, </span><span style="color: #00008b;">$date</span><span style="color: Olive;">[</span><span style="color: Blue;">monthv</span><span style="color: Olive;">]</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$lm</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;"> </span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$years</span><span style="color: Olive;">[</span><span style="color: Blue;">year</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/a&gt;&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;ul&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$q</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_query</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT *, year(post_date) as year, month(post_date) as monthv </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM </span><span style="color: #00008b;">$tableposts</span><span style="color: Red;"> WHERE year(post_date)='</span><span style="color: #00008b;">$years</span><span style="color: Red;">[year]' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month(post_date)='</span><span style="color: #00008b;">$date</span><span style="color: Red;">[monthv]' </span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND post_status='publish'</span></li>
<li><span style="color: Red;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY post_date desc</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">or</span><span style="color: Gray;"> </span><span style="color: Green;">die</span><span style="color: Olive;">(</span><span style="color: Blue;">mysql_error</span><span style="color: Olive;">())</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">while</span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Gray;"> = </span><span style="color: Blue;">mysql_fetch_array</span><span style="color: Olive;">(</span><span style="color: #00008b;">$q</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Olive;">[</span><span style="color: Blue;">post_date_gmt</span><span style="color: Olive;">]</span><span style="color: Gray;"> &lt;= </span><span style="color: #00008b;">$now</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$catID</span><span style="color: Gray;"> != </span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: #ffa500;">// check to see if a category id was specified in the arguments</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">// get the categories that are attached to the current post</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$cats</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$wpdb</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">get_col</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">SELECT category_id FROM </span><span style="color: #00008b;">$wpdb</span><span style="color: Red;">-&gt;post2cat WHERE post_id = </span><span style="color: #00008b;">$post</span><span style="color: Red;">[ID]</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$found</span><span style="color: Gray;">=</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">foreach</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$cats</span><span style="color: Gray;"> </span><span style="color: Green;">as</span><span style="color: Gray;"> </span><span style="color: #00008b;">$cat</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: #ffa500;">// look to see if the specified category is attached to the current post</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$cat</span><span style="color: Gray;"> == </span><span style="color: #00008b;">$catID</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: #00008b;">$found</span><span style="color: Gray;">=</span><span style="color: Green;">true</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: Gray;">!</span><span style="color: #00008b;">$found</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;li&gt;&lt;a href=&quot;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">get_permalink</span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Olive;">[</span><span style="color: Blue;">ID</span><span style="color: Olive;">])</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Olive;">[</span><span style="color: Blue;">post_title</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/a&gt;&lt;/li&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">echo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;li&gt;&lt;a href=&quot;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">get_permalink</span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Olive;">[</span><span style="color: Blue;">ID</span><span style="color: Olive;">])</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Olive;">[</span><span style="color: Blue;">post_title</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/a&gt;&lt;/li&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/ul&gt;&lt;br /&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Blue;">?&gt;</span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/19/smart-archives-%e5%a2%9e%e5%bc%ba/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Windows Live Writer 测试贴</title>
		<link>http://www.doyj.com/2006/08/14/windows-live-writer-%e6%b5%8b%e8%af%95%e8%b4%b4/</link>
		<comments>http://www.doyj.com/2006/08/14/windows-live-writer-%e6%b5%8b%e8%af%95%e8%b4%b4/#comments</comments>
		<pubDate>Mon, 14 Aug 2006 04:00:34 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.doyj.com/archives/88</guid>
		<description><![CDATA[微软发布了Windows Live Writer 1.0 beta, 一个blog的离线书写工具．　不只是支持Live Space, 还支持其他blog系统，比如我现在用的Wordpress. 　感兴趣的朋友可以从　cnbeta 下载。... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doyj.com/wp-content/uploads/2006/08/WindowsLiveWriter/WindowsLiveWriter_A860/1%5B1%5D.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" src="http://www.doyj.com/wp-content/uploads/2006/08/WindowsLiveWriter/WindowsLiveWriter_A860/1.jpg" width="240" border="0"></a> </p>
<p>微软发布了Windows Live Writer 1.0 beta, 一个blog的离线书写工具．　不只是支持Live Space, 还支持其他blog系统，比如我现在用的Wordpress. 　感兴趣的朋友可以从　<a href="http://www.cnbeta.com//modules.php?name=News&#038;file=article&#038;sid=14026" target="_blank" rel="nofollow">cnbeta</a> 下载。　</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/14/windows-live-writer-%e6%b5%8b%e8%af%95%e8%b4%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSS Reader</title>
		<link>http://www.doyj.com/2006/08/01/rss-reader/</link>
		<comments>http://www.doyj.com/2006/08/01/rss-reader/#comments</comments>
		<pubDate>Tue, 01 Aug 2006 15:34:05 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.doyj.com/archives/22</guid>
		<description><![CDATA[在一个程序员论坛做了一次有关RSS Reader的投票调查，投票的一共有13人。投票结果是，有三人使用离线RSS Reader, 一人使用在线的Reader, 其他9人不使用。有点让自己震惊。身边非技术圈的人没看... ]]></description>
			<content:encoded><![CDATA[<p>在一个程序员论坛做了一次有关RSS Reader的投票调查，投票的一共有13人。投票结果是，有三人使用离线RSS Reader, 一人使用在线的Reader, 其他9人不使用。有点让自己震惊。身边非技术圈的人没看到一个在用，没想到技术圈里使用的比率也是这么低。</p>
<p>自己原先一直用Firefox的一个RSS Reader插件，前几天转到了<a href="https://www.google.com/reader/">Google Reader</a>上，这样到了外地网吧也能看了。我订的RSS不多， 请看<a href="http://www.doyj.com/%E6%88%91%E8%AE%A2%E7%9A%84rss/">http://www.doyj.com/%E6%88%91%E8%AE%A2%E7%9A%84rss/</a>。<br />
从今天起，在我的blog里也搞“您使用的RSS Reader”调查，欢迎大家在左边投票区投票。</p>
<p>8月3日编辑：投票放了2两天没人投，撤下 <img src='http://www.doyj.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/01/rss-reader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>给历史我记录首页加上了最新文章的RSS Feed</title>
		<link>http://www.doyj.com/2006/08/01/%e7%bb%99%e5%8e%86%e5%8f%b2%e6%88%91%e8%ae%b0%e5%bd%95%e9%a6%96%e9%a1%b5%e5%8a%a0%e4%b8%8a%e4%ba%86%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e7%9a%84rss-feed/</link>
		<comments>http://www.doyj.com/2006/08/01/%e7%bb%99%e5%8e%86%e5%8f%b2%e6%88%91%e8%ae%b0%e5%bd%95%e9%a6%96%e9%a1%b5%e5%8a%a0%e4%b8%8a%e4%ba%86%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e7%9a%84rss-feed/#comments</comments>
		<pubDate>Tue, 01 Aug 2006 08:07:20 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[历史]]></category>

		<guid isPermaLink="false">http://www.doyj.com/archives/21</guid>
		<description><![CDATA[原来在特殊页面的最新页面才能找到，这次给提到了首页菜单栏里，欢迎大家订阅 RSS: http://www.recordhistory.org/mediawiki/index.php?title=Special:Newpages&#038;feed=rs... ]]></description>
			<content:encoded><![CDATA[<p>原来在特殊页面的最新页面才能找到，这次给提到了首页菜单栏里，欢迎大家订阅</p>
<p>RSS: <a href="http://www.recordhistory.org/mediawiki/index.php?title=Special:Newpages&#038;feed=rss">http://www.recordhistory.org/mediawiki/index.php?title=Special:Newpages&#038;feed=rss</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/08/01/%e7%bb%99%e5%8e%86%e5%8f%b2%e6%88%91%e8%ae%b0%e5%bd%95%e9%a6%96%e9%a1%b5%e5%8a%a0%e4%b8%8a%e4%ba%86%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e7%9a%84rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BLOG终于架设完了</title>
		<link>http://www.doyj.com/2006/07/29/blog%e7%bb%88%e4%ba%8e%e6%9e%b6%e8%ae%be%e5%ae%8c%e4%ba%86/</link>
		<comments>http://www.doyj.com/2006/07/29/blog%e7%bb%88%e4%ba%8e%e6%9e%b6%e8%ae%be%e5%ae%8c%e4%ba%86/#comments</comments>
		<pubDate>Sat, 29 Jul 2006 15:34:12 +0000</pubDate>
		<dc:creator>oldmonk</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.doyj.com/archives/14</guid>
		<description><![CDATA[当初要为老婆架设blog(http://www.filmkiller.net), 因为很多东西要先试，干脆把自己的blog也搬了过来，当成了试验品。本以为就半天事，没想到费了很多功夫。选择blog系统很快，根据自己以前的经验... ]]></description>
			<content:encoded><![CDATA[<p>当初要为老婆架设blog(<a href="http://www.filmkiller.net/">http://www.filmkiller.net</a>), 因为很多东西要先试，干脆把自己的blog也搬了过来，当成了试验品。本以为就半天事，没想到费了很多功夫。选择blog系统很快，根据自己以前的经验选择了<a href="http://www.wordpress.com/">WordPress</a>。 但开头走了些弯路，为了把一些系统和Wordpress集成到一起，选了XOOPS。结果遇到很多问题，第一个就是找不到很理想的XOOPS的Theme, 还有Gallery和XOOPS的集成不是很理想（也可能我没用对）。最后只好换成以Wordpress2.0为主系统。装起来后其他都很顺利，但在选择 Theme上用了好多时间，尝试来尝试去最后选择了现在用的<a href="http://www.monetizingtheweb.com/wordpress-theme-mw/">MW</a>。选择好了Theme还没完，调整一些细节也花了不少时间。</p>
<p>安装的插件有：</p>
<p><strong><a title="访问插件主页" href="http://maisonbisson.com/blog/search/bsuite">bsuite</a> </strong>统计站点访问</p>
<p><strong><a title="访问插件主页" href="http://www.coolcode.cn/?p=153">Cool Weather</a> </strong>显示天气</p>
<p><strong><a title="访问插件主页" href="http://www.coolcode.cn/?p=74">Emotions</a> </strong>显示表情符号</p>
<p><strong><a title="访问插件主页" href="http://soderlind.no/ImageManager">ImageManager</a> </strong>管理上载图片的插件，很不错，就是有些缩微图有问题</p>
<p><strong><a title="访问插件主页" href="http://yanfeng.org/blog/wordpress/kit">中文 WordPress 工具箱</a> </strong>左边的随机文章，最新留言就是靠它显示的</p>
<p><strong><a title="访问插件主页" href="http://www.damagedgoods.it/wp-plugins/quoter/">Quoter</a> </strong>为了引用留言</p>
<p><strong><a title="访问插件主页" href="http://www.arnebrachhold.de/redir/sitemap-home/">Google Sitemaps</a> </strong>让Google能搜索到blog内每篇文章的插件</p>
<p><strong><a title="访问插件主页" href="http://frenchfragfactory.net/ozh/my-projects/wordpress-admin-menu-drop-down-css/">Admin Drop Down Menu</a> </strong>能减少管理网站时的点击次数</p>
<p><strong><a title="访问插件主页" href="http://wpg2.galleryembedded.com/">WPG2</a> </strong>Gallery2的集成插件，左边的照片就是它显示的</p>
<p><strong><a title="访问插件主页" href="http://www.skarcha.com/wp-plugins/wpvideo/">WPvideo</a> </strong>播放在Youtube和Google video等地方的在线视频</p>
<p><strong><a title="访问插件主页" href="http://mnm.uib.es/gallir/wp-cache-2/">wp-cache</a> </strong>加快访问速度</p>
<p>第一次搭Wordpress，有很多不足，请大家多批评指教</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyj.com/2006/07/29/blog%e7%bb%88%e4%ba%8e%e6%9e%b6%e8%ae%be%e5%ae%8c%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

