<?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>mitcho.com &#187; metablog</title>
	<atom:link href="http://mitcho.com/blog/category/metablog/feed/" rel="self" type="application/rss+xml" />
	<link>http://mitcho.com</link>
	<description></description>
	<lastBuildDate>Sat, 11 Feb 2012 12:23:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>This is what a release looks like</title>
		<link>http://mitcho.com/blog/projects/release-downloads/</link>
		<comments>http://mitcho.com/blog/projects/release-downloads/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 12:55:04 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[metablog]]></category>
		<category><![CDATA[observation]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[Mint]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Planet]]></category>
		<category><![CDATA[YARPP]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1157</guid>
		<description><![CDATA[This is what the latest release (2.1.6) of my Yet Another Related Posts Plugin looked like under Mint, using my WordPress plugin downloads pepper, which in turn gets its data from wordpress.org: It&#8217;s always interesting to see these release spikes in download traffic. Note that this release was on the Wednesday but that was during [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/yet-another-related-posts-plugin-20/' rel='bookmark' title='Yet Another Related Posts Plugin 2.0'>Yet Another Related Posts Plugin 2.0</a></li>
<li><a href='http://mitcho.com/blog/projects/keep-up-with-yet-another-related-posts-plugin-with-rss/' rel='bookmark' title='Keep up with Yet Another Related Posts Plugin with RSS!'>Keep up with Yet Another Related Posts Plugin with RSS!</a></li>
<li><a href='http://mitcho.com/blog/projects/modifiying-wordpress-plugin-activation-behavior/' rel='bookmark' title='Modifiying WordPress plugin activation behavior'>Modifiying WordPress plugin activation behavior</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is what the latest release (2.1.6) of my <a href="/code/yarpp">Yet Another Related Posts Plugin</a> looked like under <a href="http://www.haveamint.com/">Mint</a>, using my WordPress plugin downloads pepper, which in turn gets its data from <a href="http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/stats/">wordpress.org</a>:</p>

<p><img src="/blog/wp-content/uploads/2008/12/mint-wordpress-downloads.png" alt="" title="YARPP downloads 2.1.6" /></p>

<p>It&#8217;s always interesting to see these release spikes in download traffic. Note that this release was on the Wednesday but that was during the day, so Wednesday&#8217;s traffic is still higher than the normal ~300/day level, while the big peak (by day) is on Thursday. Too bad wordpress.org doesn&#8217;t give me hourly stats, though I guess that would be a little ridiculous.</p>

<p>YARPP is just about at that 35k download mark. I&#8217;m looking forward to the next release. ^^</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/yet-another-related-posts-plugin-20/' rel='bookmark' title='Yet Another Related Posts Plugin 2.0'>Yet Another Related Posts Plugin 2.0</a></li>
<li><a href='http://mitcho.com/blog/projects/keep-up-with-yet-another-related-posts-plugin-with-rss/' rel='bookmark' title='Keep up with Yet Another Related Posts Plugin with RSS!'>Keep up with Yet Another Related Posts Plugin with RSS!</a></li>
<li><a href='http://mitcho.com/blog/projects/modifiying-wordpress-plugin-activation-behavior/' rel='bookmark' title='Modifiying WordPress plugin activation behavior'>Modifiying WordPress plugin activation behavior</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/release-downloads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Display your Last.fm rankings using PHP 4&#8217;s XSLT support</title>
		<link>http://mitcho.com/blog/how-to/display-your-lastfm-rankings-using-php-4s-xslt-support/</link>
		<comments>http://mitcho.com/blog/how-to/display-your-lastfm-rankings-using-php-4s-xslt-support/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 11:23:27 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[how to]]></category>
		<category><![CDATA[metablog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/2008/02/01/display-your-lastfm-rankings-using-php-4s-xslt-support/</guid>
		<description><![CDATA[With all the exciting recent news about Last.fm, I thought I would document a simple bit of code I added to my site the other day. Last.fm offers a number of Flash-based widgets you can add to your website. Unfortunately, this doesn&#8217;t give you much flexibility and, of course, requires Flash. But you, dear friend, [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/how-to/updating-your-zenphoto-theme-for-zenphoto-11/' rel='bookmark' title='Updating your zenphoto theme for zenphoto 1.1'>Updating your zenphoto theme for zenphoto 1.1</a></li>
<li><a href='http://mitcho.com/blog/life/buklavu/' rel='bookmark' title='Buklavu'>Buklavu</a></li>
<li><a href='http://mitcho.com/blog/projects/yet-another-related-posts-plugin/' rel='bookmark' title='Yet Another Related Posts Plugin'>Yet Another Related Posts Plugin</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>With all the <a href="http://blog.last.fm/2008/01/23/free-the-music">exciting recent news</a> about <a href="http://www.last.fm">Last.fm</a>, I thought I would document a simple bit of code I added to my site the other day.</p>

<p>Last.fm offers a number of <a href="http://en.wikipedia.org/wiki/Flash">Flash</a>-based <a href="http://www.last.fm/widgets/">widgets</a> you can add to your website. Unfortunately, this doesn&#8217;t give you much flexibility and, of course, requires Flash. But you, dear friend, have a site written in <a href="http://en.wikipedia.org/wiki/PHP">PHP</a>, and the rankings are just XML files. There is a better way.</p>

<p>Looking around on the web, there are <a href="(http://labs.silverorange.com/archives/2007/february/workingwithxml)">some good instructions and recommendations</a> for using PHP 5&#8217;s object-oriented XML support. But, as we know, <a href="http://www.nexen.net/chiffres_cles/phpversion/17965-evolution_de_php_sur_internet_decembre_2007.php">not everyone is using PHP 5</a>. Here&#8217;s what I did on my PHP install, which includes the <a href="http://www.php.net/domxml">DOM/XML and DOM/XSLT extensions</a>.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<h3>Write your XSL Transformation</h3>

<p>The first step is to write your <a href="http://en.wikipedia.org/wiki/XSL Transformation">XSL Transformation</a>, or XSLT, a special XML &#8220;program&#8221; which takes an XML file and reformats it into another XML file. Remember when you learned in Algebra class what a function was? An XSLT defines a function from XML to XML. In our case, we need to take a special proprietary XML file like <a href="http://ws.audioscrobbler.com/1.0/user/mitchoyoshitaka/weeklyartistchart.xml">the this one for my weekly top artists</a> and return some solid XHTML.</p>

<p>Let&#8217;s take a look at the XSLT I used: (it helps to take a look at the <a href="http://ws.audioscrobbler.com/1.0/user/mitchoyoshitaka/weeklyartistchart.xml">original XML file</a> at the same time.)</p>

<blockquote>
  <p><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code><br /><code>&lt;xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;</code><br /><code>&lt;xsl:template match="weeklyartistchart"&gt;</code><br /><code>&lt;ol&gt;</code><br /><code>&lt;xsl:apply-templates select="artist[position() &amp;lt; 6]"/&gt;</code><br /><code>&lt;/ol&gt;</code><br /><code>&lt;/xsl:template&gt;</code><br /><code>&lt;xsl:template match="artist"&gt;</code><br /><code>&lt;li&gt;&lt;a&gt;&lt;xsl:attribute name="href"&gt;&lt;xsl:value-of select="./url"/&gt;&lt;/xsl:attribute&gt;&lt;xsl:value-of select="./name"/&gt;&lt;/a&gt;&lt;span&gt;&lt;xsl:value-of select="./artist"/&gt;&lt;/span&gt;: &lt;xsl:value-of select="./playcount"/&gt;&lt;/li&gt;</code><br /><code>&lt;/xsl:template&gt;</code><br /><code>&lt;/xsl:stylesheet&gt;</code></p>
</blockquote>

<p>The <a href="http://www.w3.org/TR/xslt">full spec description</a> will give you all the juicy details, but you really only need a few basic details (or you can just steal my code). First, we note the <code>&lt;xsl:template match="weeklyartistchart"&gt;</code> and <code>&lt;xsl:template match="artist"&gt;</code> items. Each of these code blocks describe what to do to each <code>&lt;weeklyartistchart&gt;</code> and <code>&lt;artist&gt;</code> nodes, respectively, in the input XML. In the code above, when a <code>&lt;weeklyartistchart&gt;</code> is found, an ordered list is opened and the artist template is applied to the first five (<code>position() &amp;lt; 6</code>) <code>&lt;artist&gt;</code> nodes. In the artist template (<code>&lt;xsl:template match="artist"&gt;</code>), the script takes each <code>&lt;artist&gt;</code> and prints a list item with the name of the artist, with a link to the url given in the original <code>&lt;artist&gt;</code>&#8217;s <code>&lt;url&gt;</code> subnode.</p>

<h3>Process the XML with your XSLT</h3>

<p>Once your XSLT is written, save it to a file, like <a href="/music/last.fm.xml"><code>last.fm.xml</code></a>. Now we&#8217;ll use the DOM/XSLT extension and apply this XSLT file to the live weekly artist chart XML file from last.fm. Here&#8217;s the code I used:</p>

<blockquote>
  <p><code>$chartxml = domxml_open_file("</code><a href="http://ws.audioscrobbler.com/1.0/user/mitchoyoshitaka/weeklyartistchart.xml">&#8230;<code>/weeklyartistchart.xml</code></a><code>");</code><br /><code>$xslt = domxml_xslt_stylesheet_file("last.fm.xsl");</code><br /><code>$charthtml = $xslt-&gt;process($chartxml);</code><br /><code>echo $charthtml-&gt;dump_mem();</code><br /></p>
</blockquote>

<p>The code is pretty self explanatory—just four lines: 1. open the remote XML file using <code>domxml_open_file</code>, 2. open the stylesheet (XSL transformation), 3. apply the stylesheet to the remote XML file, and 4. <code>echo</code> the output.</p>

<p>That&#8217;s it! You can see the results <a href="/music/">here on my music page</a>.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>To see if these instructions will work for you, check your <a href="http://www.php.net/phpinfo">phpinfo</a> for the lines &#8220;DOM/XML enabled&#8221; and &#8220;DOM/XSLT enabled&#8221;. If the items aren&#8217;t even showing up, you&#8217;re out of luck. <img src='http://mitcho.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  There are, however, other <a href="http://www.php.net/xslt">comparable methods</a> to process XML and XSLT in PHP 4.<br /><img class="limages" src='http://mitcho.com/blog/wp-content/uploads/2008/01/picture-8.png' alt='dom/xml check' />&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/how-to/updating-your-zenphoto-theme-for-zenphoto-11/' rel='bookmark' title='Updating your zenphoto theme for zenphoto 1.1'>Updating your zenphoto theme for zenphoto 1.1</a></li>
<li><a href='http://mitcho.com/blog/life/buklavu/' rel='bookmark' title='Buklavu'>Buklavu</a></li>
<li><a href='http://mitcho.com/blog/projects/yet-another-related-posts-plugin/' rel='bookmark' title='Yet Another Related Posts Plugin'>Yet Another Related Posts Plugin</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/how-to/display-your-lastfm-rankings-using-php-4s-xslt-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bailey&#8217;s in the Tribune!</title>
		<link>http://mitcho.com/blog/life/baileys-in-the-tribune/</link>
		<comments>http://mitcho.com/blog/life/baileys-in-the-tribune/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 17:30:05 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[metablog]]></category>
		<category><![CDATA[Bailey]]></category>
		<category><![CDATA[Daring Fireball]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[University of Chicago]]></category>
		<category><![CDATA[winter]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/2008/01/18/baileys-in-the-tribune/</guid>
		<description><![CDATA[Kuviasungnerk/Kangeiko just put Bailey on the front page of chicagotribune.com! ^^ You kind of have to see a different page to know who it is, though.1 Heh. I recently got Daring Fireball&#8216;ed too,2 so that almost makes us a celebrity couple. I personally like the caption right above. That&#8217;s the same story, right? &#8220;Good thing [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/observation/great-news-you-can-opt-out-from-omnitures-1921681122o7net/' rel='bookmark' title='Great news! You can opt-out from Omniture&#8217;s 192.168.112.2o7.net'>Great news! You can opt-out from Omniture&#8217;s 192.168.112.2o7.net</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Kuviasungnerk/Kangeiko just put <a href="http://baileyinchicago.livejournal.com">Bailey</a> on the front page of <a href="http://www.chicagotribune.com">chicagotribune.com</a>! ^^ You kind of have to see <a href="http://www.chicagotribune.com/news/weather/chi-mh18weatherbundled20080118065134,0,3528528.photo">a different page</a> to know who it is, though.<sup id="fnref:2"><a href="#fn:2" rel="footnote">1</a></sup> Heh.</p>

<p>I recently got <a href="http://www.daringfireball.net">Daring Fireball</a>&#8216;ed too,<sup id="fnref:1"><a href="#fn:1" rel="footnote">2</a></sup> so that almost makes us a celebrity couple.</p>

<p><img class="limages" src='http://mitcho.com/blog/wp-content/uploads/2008/01/picture-6.png' alt='Bailey on the Tribune' /></p>

<p>I personally like the caption right above. That&#8217;s the same story, right?</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:2">
<p>&#8220;Good thing I have nice eyebrows, &#8216;cause that&#8217;s all you can see.&#8221;&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:1">
<p>This article: <a href="http://mitcho.com/blog/2007/12/29/great-news-you-can-opt-out-from-omnitures-1921681122o7net/">Great News! You can opt-out from Omniture&#8217;s 192.168.112.2o7.net</a>: <a rel='lightbox' href='http://mitcho.com/blog/wp-content/uploads/2008/01/df.png' title='mitcho on DF'><img class="images" src='http://mitcho.com/blog/wp-content/uploads/2008/01/df.thumbnail.png' alt='mitcho on DF' /></a>&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/observation/great-news-you-can-opt-out-from-omnitures-1921681122o7net/' rel='bookmark' title='Great news! You can opt-out from Omniture&#8217;s 192.168.112.2o7.net'>Great news! You can opt-out from Omniture&#8217;s 192.168.112.2o7.net</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/life/baileys-in-the-tribune/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet Another Related Posts Plugin</title>
		<link>http://mitcho.com/blog/projects/yet-another-related-posts-plugin/</link>
		<comments>http://mitcho.com/blog/projects/yet-another-related-posts-plugin/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 13:49:20 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[metablog]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[threshold]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Planet]]></category>
		<category><![CDATA[YARPP]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/2007/12/29/yet-another-related-posts-plugin/</guid>
		<description><![CDATA[UPDATE: This posting is now outdated&#8230; for the latest information on YARPP, please visit YARPP&#8217;s very own page on my site, or its page on wordpress.org. If you have questions, please submit on the wordpress.org forum. Thanks! Description Today I&#8217;m releasing Yet Another Related Posts Plugin (YARPP1) 1.0 for WordPress. It&#8217;s the result of some [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/introducing-smartdate/' rel='bookmark' title='Introducing Smartdate'>Introducing Smartdate</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<h3>UPDATE:</h3>

<p>This posting is now outdated&#8230; for the latest information on YARPP, please visit <a href="/code/yarpp/">YARPP&#8217;s very own page</a> on my site, or <a href="http://wordpress.org/extend/plugins/yet-another-related-posts-plugin">its page on <code>wordpress.org</code></a>. If you have questions, please submit on <a href="http://wordpress.org/tags/yet-another-related-posts-plugin">the <code>wordpress.org</code> forum</a>. Thanks!</p>

<h3>Description</h3>

<p>Today I&#8217;m releasing Yet Another Related Posts Plugin (YARPP<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>) 1.0 for <a href="http://www.wordpress.org">WordPress</a>. It&#8217;s the result of some tinkering with <a href="http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin">Peter Bowyer&#8217;s version</a> of <a href="http://wasabi.pbwiki.com/Related%20Entries">Alexander Malov &amp; Mike Lu&#8217;s Related Entries plugin</a>. Modifications made include:</p>

<ol>
<li><em>Limiting by a threshold</em>: Peter Bowyer did the great work of making the algorithm use <a href="http://en.wikipedia.org/wiki/mysql">mysql</a>&#8217;s <a href="http://dev.mysql.com/doc/en/Fulltext_Search.html">fulltext search</a> score to identify related posts. But it currently just displayed, for example, the top 5 most &#8220;relevant&#8221; entries, even if some of them weren&#8217;t at all similar. Now you can set a threshold limit<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> for relevance, and you get more related posts if there are more related posts and less if there are less. Ha!</li>
<li><em>Being a better plugin citizen</em>: now it doesn&#8217;t require the user to click some sketchy button to <code>alter</code> the database and enable a <code>fulltext key</code>. Using <a href="http://codex.wordpress.org/Function_Reference/register_activation_hook"><code>register_activation_hook</code></a>, it does it automagically on plugin activation. Just install and go!</li>
<li><em>Miscellany</em>: a nicer options screen, displaying the fulltext match score on output for admins, an option to allow related posts from the future, a couple bug fixes, etc.</li>
</ol>

<h3>Installation</h3>

<p>Just put it in your <code>/wp-content/plugins/</code> directory, activate, and then drop the <code>related_posts</code> function in your <a href="http://codex.wordpress.org/The_Loop">WP loop</a>. Change any options in the Related Posts (YARPP) Options pane in Admin > Plugins.</p>

<p>You can override any options in an individual instance of <code>related_posts</code> using the following syntax:</p>

<blockquote>
  <p>`related_posts(limit, threshold, before title, after title, show excerpt, len, before excerpt, after excerpt, show pass posts, past only, show score);</p>
</blockquote>

<p>Most of these should be self-explanatory. They&#8217;re also in the same order as the options on the YARPP Options pane.</p>

<p>Example: <code>related_posts(10, null, 'title: ')</code> changes the maximum related posts number to 10, keeps the default threshold from the Options pane, and adds <code>title:</code> to the beginning of every title.</p>

<p>There&#8217;s also a <code>related_posts_exist)</code> function. It has three optional arguments to override the defaults: a threshold, the past only boolean, and the show password-protected posts boolean.</p>

<h3>Examples</h3>

<p>For a barebones setup, just drop <code>&lt;?php related_posts(); ?&gt;</code> right after <code>&lt;?php the_content() ?&gt;</code>.</p>

<p>On my own blog I use the following code with <code>&lt;li&gt;</code> and <code>&lt;/li&gt;</code> as the before/after entry options:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>related_posts_exist<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;p&gt;Related posts:
&lt;ol&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> related_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ol&gt;
&lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;p&gt;No related posts.&lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


<h3>Coming soon (probably)</h3>

<ol>
<li>Incorporation of tags and categories in the algorithm. I&#8217;ve gotten the code working, but I still need to think about what the most natural algorithm would be for weighing these factors against the mysql fulltext score currently used (and works pretty well, I must say).</li>
<li>Um, something else! Let me know if you have any suggestions for improvement. ^^</li>
</ol>

<h3>Version log</h3>

<p>1.0   Initial upload (20071229)</p>

<p>1.0.1 Bugfix: 1.0 assumed you had Markdown installed (20070105)</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Pronounced &#8220;yarp!&#8221;, kind of like this, but maybe with a little more joy:<br /><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/7cOuGJMRORw&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/7cOuGJMRORw&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>Did you know that threshold has only two h&#8217;s!? I&#8217;m incensed and just went through and replaced all the instances of <code>threshhold</code> in my code. It&#8217;s really not a thresh-hold!?&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/introducing-smartdate/' rel='bookmark' title='Introducing Smartdate'>Introducing Smartdate</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/yet-another-related-posts-plugin/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Introducing Smartdate</title>
		<link>http://mitcho.com/blog/projects/introducing-smartdate/</link>
		<comments>http://mitcho.com/blog/projects/introducing-smartdate/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 12:47:04 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[metablog]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[smartdate]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Planet]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/2007/11/27/introducing-smartdate/</guid>
		<description><![CDATA[I recently have been working on a WordPress plugin called WP-Smartdate and I&#8217;m happy to say that it is hosted at wordpress.org starting today. As some people have noticed, my blog recently has included little links on word like &#8220;yesterday,&#8221; with a machine readable version of the date reference (called a &#8220;microformat&#8221; in the biz). [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/metablog/yes-i-have-a-blog/' rel='bookmark' title='Yes, I have a blog'>Yes, I have a blog</a></li>
<li><a href='http://mitcho.com/blog/life/how-i-name-my-kids/' rel='bookmark' title='How I name my kids'>How I name my kids</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I recently have been working on a <a href="http://www.wordpress.org">WordPress</a> plugin called WP-Smartdate and I&#8217;m happy to say that it is <a href="http://wordpress.org/extend/plugins/wp-smartdate/">hosted at wordpress.org</a> starting today. As some people have noticed, my blog recently has included little links on word like &#8220;yesterday,&#8221; with a machine readable version of the date reference (called a &#8220;<a href="http://microformats.org/">microformat</a>&#8221; in the biz). Download the plugin and get started!</p>

<div class="files">
<div class="file zip">
<a href="http://downloads.wordpress.org/plugin/wp-smartdate.0.1.zip">WP-Smartdate 0.1</a><br />
<span class="specs">4&#160;kb - zip</span>
</div>
</div>

<p>This blog post describes release 0.1&#8230; For the latest description, check out the <a href="http://wordpress.org/extend/plugins/wp-smartdate/">WP-Smartdate plugin page</a> or <a href="http://mitcho.com/code">mitcho.com/code</a>.</p>

<p>Please comment! I would love to hear your feedback on the plugin.</p>

<h2>Description</h2>

<p>WP-Smartdate looks for <em>relative date expressions</em> in your blog posts, such as &#8220;tomorrow,&#8221; &#8220;this coming Monday,&#8221; &#8220;last Friday,&#8221; and adds the date reference (like &#8220;2007-11-26&#8221;) as a machine-readable <a href="http://microformats.org/wiki/datetime-design-pattern">microformat</a>.</p>

<h3>Why Smartdate?</h3>

<p>WP-Smartdate was created for three simple audiences:</p>

<ol>
<li><em>For the machine:</em> While many professional information retrieval algorithms go far beyond the scope of this program, smartdate helps the process along by adding machine-readable tags to relative date expressions.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> In addition, these machine tags, in turn, help the human: a search on Google for &#8220;November 7th, 2007,&#8221; for example, will not pull up a document talking about &#8220;yesterday,&#8221; written on the 8th, but it will pull up the smartdate output of <code>2007-11-07</code>.</li>
<li><em>For the human reader:</em> Blog posts are often written in the &#8220;now,&#8221; using relative time expressions without concern for how the text will be read in the future. WP-Smartdate makes such posts easier to read and comprehend temporally<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>.</li>
<li><em>For <a href="http://mitcho.com">me</a></em>: Because I think this sort of thing is fun!</li>
</ol>

<h3>A typology of smartdate date expressions</h3>

<p>The following types of expressions are resolved with respect to the speech time&#8212;in WP-Smartdate&#8217;s case, the blog post date.</p>

<ol>
<li><em>simple references</em>: &#8220;yesterday,&#8221; &#8220;today,&#8221; &#8220;tomorrow,&#8221;</li>
<li><em>next/last <abbr title="day of the week">DOTW</abbr> expressions</em>: &#8220;next Friday,&#8221; &#8220;this past Sunday,&#8221; &#8220;this Monday&#8221;</li>
</ol>

<h3>For the future</h3>

<ul>
<li><em>static dates</em>: &#8220;January 1st, 2007&#8221;</li>
<li><em>duration shift expressions</em>: &#8220;5 days ago,&#8221; &#8220;fourscore and seven years ago&#8221;</li>
<li><em>day of the week shifts</em>: &#8220;2 Fridays ago&#8221;</li>
<li>clean up the code!</li>
</ul>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>One could argue that relative dates are a perfect place to use the <code>abbr</code> tag, as they are a sort of natural-language shortcut for more static temporal expressions. In fact, WP-Smartdate&#8217;s output also follows the <a href="http://microformats.org/wiki/datetime-design-pattern">datetime microformat design pattern draft</a> with two caveats:
1. Unfortunately, the datetime <a href="http://microformats.org/wiki/semantic-class-names">semantic class</a> has not yet been set as the standard is a draft. WP-Smartdate uses <code>datetime</code>. See the <a href="http://microformats.org/wiki/rest/datatypes#Proposal">Date and Time datatype proposal</a> for more information.
2. The <a href="http://microformats.org/wiki/rest/datatypes#Proposal">current recommendation for datetime</a> pushes for following the <a href="http://www.w3.org/TR/NOTE-datetime">W3C datetime profile</a>, which does not support the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO-8601 time interval</a> specification, which <del>is</del> will be used by WP-Smartdate.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>Even though <a href="http://www.smackthemouse.com/20040108">the <code>abbr</code> tag should only be used for machine reading</a>.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/metablog/yes-i-have-a-blog/' rel='bookmark' title='Yes, I have a blog'>Yes, I have a blog</a></li>
<li><a href='http://mitcho.com/blog/life/how-i-name-my-kids/' rel='bookmark' title='How I name my kids'>How I name my kids</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/introducing-smartdate/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Yes, I have a blog</title>
		<link>http://mitcho.com/blog/metablog/yes-i-have-a-blog/</link>
		<comments>http://mitcho.com/blog/metablog/yes-i-have-a-blog/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 15:56:31 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[metablog]]></category>
		<category><![CDATA[Taiwan]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=3</guid>
		<description><![CDATA[Welcome to mitcho&#8217;s 部落格 (bùlùogé)! While some people may be surprised to hear that I am just starting to blog, this post is my first ever blog post. I hope to update any and all readers on life in Taiwan: teaching, learning, and doing. The goal is to document my experience and thoughts. I fully [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Welcome to mitcho&#8217;s 部落格 (bùlùogé)! While some people may be surprised to hear that I am just starting to blog, this post <em>is</em> my first ever blog post. I hope to update any and all readers on life in Taiwan: teaching, learning, and doing.</p>

<p>The goal is to document my experience and thoughts. I fully expect my biggest reader to be myself. ^^</p>

<p>&#8220;By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest.&#8221; -Confucius (citation needed)</p>

<p>mitcho</p>

<p>ps: I&#8217;m experimenting with WordPress and my custom theme&#8230; please be patient as I tweak this setup to match my needs. <img src='http://mitcho.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>pps: <del datetime="2007-09-04T10:09:53+00:00">Oh no! My Chinese is MIA! We</ins>have to fix that, won&#8217;t we?</del> UPDATE: Fixed.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/metablog/yes-i-have-a-blog/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

