<?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>New Fish&#187; WordPress</title>
	<atom:link href="http://fairyfish.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://fairyfish.com</link>
	<description>I only sell WordPress Themes!</description>
	<lastBuildDate>Fri, 09 Oct 2009 08:56:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress&#8217;s perfect implementation in studio site: Ovisualize</title>
		<link>http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/</link>
		<comments>http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 02:58:31 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://fairyfish.com/?p=51</guid>
		<description><![CDATA[I always consider a good choice to use WordPress at the CMS or studio sites. Because WordPress is very simple, it can realize the effects we want. We have been so familiar with WordPress &#8211; very friendly to users and search engines. These characters are incarnated into my recent product &#8216;Ovisualize&#8216;. I would discuss some [...]]]></description>
			<content:encoded><![CDATA[<p>I always consider a good choice to use WordPress at the CMS or studio sites. Because WordPress is very simple, it can realize the effects we want. We have been so familiar with WordPress &#8211; very friendly to users and search engines. These characters are incarnated into my recent product &#8216;<a href="http://www.ovisualize.com/">Ovisualize</a>&#8216;. I would discuss some key points on implementing WordPress in this studio below. Wish to bring in some lights or suggestions when using WordPress to build the CMS sites.</p>
<div class="wp-caption aligncenter">
<img src="http://pic.fairyfish.com/2008/09/ovisualize-home.jpg" alt="Ovisualize index page" /></p>
<p class="wp-caption-text">Ovisualize index page</p>
</div>
<p>The index pages of ordinary blog list the latest logs, whenas on studio sites it comes the introduction. Therefore we make it happen by adopting WordPress Page. For &#8216;how to&#8217; details, please refer to this post: <a href="http://fairyfish.net/2007/04/29/wordpress-as-cms-in-five-steps/">5 simple steps to build CMS by using WordPress</a>.</p>
<div class="wp-caption aligncenter">
<img src="http://pic.fairyfish.com/2008/09/ovisualize-list.jpg" alt="Index page of Ovisualize case" /></p>
<p class="wp-caption-text">Index page of Ovisualize case</p>
</div>
<p>We generally use WordPress post to realize the pages with much renewal, such as studio cases or products. From above picture we know, the case requires a post thumbnail. We can make it by using custom fields. Read this document in details: <a href="http://fairyfish.net/2008/08/27/using-custom-fields-to-display-post-thumbnails/">Use custom fields to display post thumbnail.</a></p>
<div class="wp-caption aligncenter">
<img src="http://pic.fairyfish.com/2008/09/ovisualize-product.jpg" alt="Ovisualize case sample" /></p>
<p class="wp-caption-text">Ovisualize case sample</p>
</div>
<p>The Sample page in Ovisualize displays a brief introduction to this product, and then there are a large case screencut and the list of similar cases. The large case screencut also applies custom fields. For the list of similar cases, I realized it by making some small changes on my pervious plug-in &#8216;<a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/">WordPress Related Posts</a>&#8216;. I may add this function into future release.</p>
<p>Okay, that&#8217;s all for now. If anything unclear, please drop me message. If you have project related to this, also contact me(email/msn:denishua@hotmail.com). The quality is guaranteed, fair trade.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2009/04/22/wordpress-theme-coding-for-campjellystonecom/" title="WordPress Theme Coding for campjellystone.com">WordPress Theme Coding for campjellystone.com</a></li><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/10/27/nba-tube-wordpress-theme/" title="NBA Tube WordPress Theme">NBA Tube WordPress Theme</a></li><li><a href="http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/" title="One WordPress installation, multiple blogs 1">One WordPress installation, multiple blogs 1</a></li><li><a href="http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/" title="WordPress as a Group Twitter">WordPress as a Group Twitter</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/08/13/purecss-theme/" title="PureCSS Theme">PureCSS Theme</a></li><li><a href="http://fairyfish.com/2008/08/10/free-wordpress-theme-k-swiss/" title="Free WordPress Theme: K-Swiss">Free WordPress Theme: K-Swiss</a></li><li><a href="http://fairyfish.com/2008/08/06/diablo-3/" title="Premium Theme: Diablo 3">Premium Theme: Diablo 3</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One WordPress installation, multiple blogs 1</title>
		<link>http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/</link>
		<comments>http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 12:45:46 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-different-database/</guid>
		<description><![CDATA[For different database:
1. Point all domains to the same WordPress root directory.
2. Add the following code at beginning of wp-config.php:

$hostname = $_SERVER['HTTP_HOST'];
&#160;
switch ($hostname) {
case &#34;fairyfish.com&#34;:
&#160;&#160; &#160;$db = &#34;db1&#34;;
&#160;&#160; &#160;break;
case &#34;denis.fairyfish.com&#34;:
&#160;&#160; &#160;$db = &#34;db2&#34;;
&#160;&#160; &#160;break;
}
&#160;
// ** MySQL settings ** //
define('DB_NAME', $db);&#160; &#160; // The name of the database

Related PostsWordPress Theme Coding for campjellystone.comComment Reply NotificationNBA Tube [...]]]></description>
			<content:encoded><![CDATA[<p>For <strong>different database</strong>:</p>
<p><strong>1. Point all domains to the same WordPress root directory.</strong></p>
<p><strong>2. Add the following code at beginning of <code>wp-config.php</code>:</strong></p>
<pre>
<span style="color: #00008b;">$hostname</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$_SERVER</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">HTTP_HOST</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">;
&nbsp;
</span><span style="color: Green;">switch</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #00008b;">$hostname</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;">
</span><span style="color: Green;">case</span><span style="color: Gray;"> </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">fairyfish.com</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">:
&nbsp;&nbsp; &nbsp;</span><span style="color: #00008b;">$db</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">db1</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">break</span><span style="color: Gray;">;
</span><span style="color: Green;">case</span><span style="color: Gray;"> </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">denis.fairyfish.com</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">:
&nbsp;&nbsp; &nbsp;</span><span style="color: #00008b;">$db</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">db2</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">break</span><span style="color: Gray;">;
</span><span style="color: Olive;">}</span><span style="color: Gray;">
&nbsp;
</span><span style="color: #ffa500;">// ** MySQL settings ** //</span><span style="color: Gray;">
</span><span style="color: Green;">define</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">DB_NAME</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #00008b;">$db</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; </span><span style="color: #ffa500;">// The name of the database</span>
</pre>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2009/04/22/wordpress-theme-coding-for-campjellystonecom/" title="WordPress Theme Coding for campjellystone.com">WordPress Theme Coding for campjellystone.com</a></li><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/10/27/nba-tube-wordpress-theme/" title="NBA Tube WordPress Theme">NBA Tube WordPress Theme</a></li><li><a href="http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/" title="WordPress&#8217;s perfect implementation in studio site: Ovisualize">WordPress&#8217;s perfect implementation in studio site: Ovisualize</a></li><li><a href="http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/" title="WordPress as a Group Twitter">WordPress as a Group Twitter</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/08/13/purecss-theme/" title="PureCSS Theme">PureCSS Theme</a></li><li><a href="http://fairyfish.com/2008/08/10/free-wordpress-theme-k-swiss/" title="Free WordPress Theme: K-Swiss">Free WordPress Theme: K-Swiss</a></li><li><a href="http://fairyfish.com/2008/08/06/diablo-3/" title="Premium Theme: Diablo 3">Premium Theme: Diablo 3</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress as a Group Twitter</title>
		<link>http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/</link>
		<comments>http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 12:47:31 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Bot]]></category>
		<category><![CDATA[Gtalk]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://fairyfish.com/?p=47</guid>
		<description><![CDATA[XMPPHP is the successor to Class.Jabber.PHP. I use the class to setup a Gtalk bot and integrat it with WordPress, which turns  WordPress into a group twitter. 

Change your WordPress&#8217;s setting: Anyone can register and New User Default Role is Author. These settings can be tweaked in Setting => Genenal of WordPress admin panel.
Download [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/xmpphp/">XMPPHP</a> is the successor to Class.Jabber.PHP. I use the class to setup a Gtalk bot and integrat it with WordPress, which turns  WordPress into a group twitter. </p>
<ol>
<li>Change your WordPress&#8217;s setting: Anyone can register and New User Default Role is Author. These settings can be tweaked in Setting => Genenal of WordPress admin panel.</li>
<li>Download the <a href="http://en.blog.wordpress.com/2008/01/28/introducing-prologue">Prologue</a> WordPress theme and install it.</li>
<li>Download the Gtalk bot code file: <a href="http://fairyfish.com/wp-content/uploads/xmpphp.zip">xmpphp.zip</a></li>
<li>Modify the <code>wp-xmpphp.php</code> file. Change the <code>$gtalk_account</code> and<code> $gtalk_password</code> according to your Gtalk bot account and password.</li>
<li>Upload them to WordPress root directory. Make sure the <code>wp-xmpphp.php</code> and <code>wp-config.php</code> are placed in the same directory.</li>
<li>Visit <a href="http://your-blog/wp-xampphp.php">http://your-blog/wp-xampphp.php</a> in your browser once to start the bot</li>
<li>Use the cron job to run the following job: wget <a href="http://your-blog/wp-xampphp.php">http://your-blog/wp-xampphp.php</a> every 10 minutes.</li>
</ol>
<p>During the test, this php GTalk bot occupied a lot of server resource.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2008/07/14/wordpress-theme-fresh-tweet/" title="WordPress Theme: Fresh Tweet">WordPress Theme: Fresh Tweet</a></li><li><a href="http://fairyfish.com/2009/04/22/wordpress-theme-coding-for-campjellystonecom/" title="WordPress Theme Coding for campjellystone.com">WordPress Theme Coding for campjellystone.com</a></li><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/10/27/nba-tube-wordpress-theme/" title="NBA Tube WordPress Theme">NBA Tube WordPress Theme</a></li><li><a href="http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/" title="WordPress&#8217;s perfect implementation in studio site: Ovisualize">WordPress&#8217;s perfect implementation in studio site: Ovisualize</a></li><li><a href="http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/" title="One WordPress installation, multiple blogs 1">One WordPress installation, multiple blogs 1</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/08/13/purecss-theme/" title="PureCSS Theme">PureCSS Theme</a></li><li><a href="http://fairyfish.com/2008/08/10/free-wordpress-theme-k-swiss/" title="Free WordPress Theme: K-Swiss">Free WordPress Theme: K-Swiss</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Memcached for your WordPress</title>
		<link>http://fairyfish.com/2008/03/13/enable-memcached-for-your-wordpress/</link>
		<comments>http://fairyfish.com/2008/03/13/enable-memcached-for-your-wordpress/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 16:05:39 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Memcached]]></category>

		<guid isPermaLink="false">http://fairyfish.com/2008/03/13/enable-memcached-for-your-wordpress/</guid>
		<description><![CDATA[What is Memcached?
( via Memcahced ) memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for [...]]]></description>
			<content:encoded><![CDATA[<h3>What is Memcached?</h3>
<p>( via <a href="http://www.danga.com/memcached/">Memcahced</a> ) <strong>memcached</strong> is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.</p>
<p><a href="http://www.danga.com/">Danga Interactive</a> developed memcached to enhance the speed of <a href="http://www.livejournal.com/">LiveJournal.com</a>, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. memcached dropped the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.</p>
<h3>How to Enable Memcached for your WordPress</h3>
<p>1.    In order to use memcache, you must compile PHP with Memcache support   by using the <span class="option">&#8211;enable-memcache[=DIR]</span> option. You can check if your server has memcache enabled with the PHP function <code>phpinfo()</code>. For more infomation about memcache module in PHP, please refer: <a href="http://php.net/manual/en/ref.memcache.php">PHP: Memcached Manual</a></p>
<p>2. Download the <a href="http://dev.wp-plugins.org/browser/memcached/trunk">memcached WordPress plugin</a>, you can download the plugin via SVN tools, the SVN URL is <a href="http://svn.wp-plugins.org/memcached/trunk/">http://svn.wp-plugins.org/memcached/trunk/</a>。</p>
<p>3. Copy the two files <code>object-cache.php</code> and <code>memcached-client.php </code> to the directory <code>wp-content</code> ( not the <code>plugin</code> directory ) in your server.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2009/04/22/wordpress-theme-coding-for-campjellystonecom/" title="WordPress Theme Coding for campjellystone.com">WordPress Theme Coding for campjellystone.com</a></li><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/10/27/nba-tube-wordpress-theme/" title="NBA Tube WordPress Theme">NBA Tube WordPress Theme</a></li><li><a href="http://fairyfish.com/2008/10/06/wordpresss-perfect-implementation-in-studio-site-ovisualize/" title="WordPress&#8217;s perfect implementation in studio site: Ovisualize">WordPress&#8217;s perfect implementation in studio site: Ovisualize</a></li><li><a href="http://fairyfish.com/2008/09/19/one-wordpress-installation-multiple-blogs-1/" title="One WordPress installation, multiple blogs 1">One WordPress installation, multiple blogs 1</a></li><li><a href="http://fairyfish.com/2008/08/29/wordpress-as-a-group-twitter/" title="WordPress as a Group Twitter">WordPress as a Group Twitter</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/08/13/purecss-theme/" title="PureCSS Theme">PureCSS Theme</a></li><li><a href="http://fairyfish.com/2008/08/10/free-wordpress-theme-k-swiss/" title="Free WordPress Theme: K-Swiss">Free WordPress Theme: K-Swiss</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/03/13/enable-memcached-for-your-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Speed up WordPress plugin by using postmeta</title>
		<link>http://fairyfish.com/2008/06/05/speed-up-wordpress-plugin-by-using-postmeta/</link>
		<comments>http://fairyfish.com/2008/06/05/speed-up-wordpress-plugin-by-using-postmeta/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 16:00:48 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://fairyfish.com/?p=21</guid>
		<description><![CDATA[WordPress Related Posts, a plugin that I developed which has been downloaded more than 20,000 times, has an efficiency problem. I have got several times suspend in one of my blog which is hosted by bluehost because of exceeded cpu quota, and the root of the problem is SLOW SQL of the plugin.
It is true [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/">WordPress Related Posts</a>, a plugin that I developed which has been downloaded more than 20,000 times, has an efficiency problem. I have got several times suspend in one of my blog which is hosted by <a href="http://www.bluehost.com/track/deneb/CODE23">bluehost</a> because of exceeded cpu quota, and the root of the problem is SLOW SQL of the plugin.</p>
<p>It is true that the plugin uses a very inefficient SQL . Because the plugin finds related posts base on tag, so it needs to scan all post&#8217;s tags.By now I still haven&#8217;t got any good idea to imporve this SQL.The<br />
second method to speed up this plugin is using cache.My method is a little different.Instead of using cache plugin, I use postmeta to cache.</p>
<p>As we all know that postmeta table is used to store other custom fields of post. We can store the related posts list and the save time to postmeat. Next time we only fetch related posts list from postmeat, and compare the current time and the last saved time. If it is in the allow cache time, then display. Otherwise it will fetch the related post by the slow SQL, store it to postmeta and display it.</p>
<pre>
<span style="color: Gray;">&lt;?</span><span style="color: Blue;">php</span><span style="color: Gray;">
&nbsp; </span><span style="color: Blue;">global</span><span style="color: Gray;"> $</span><span style="color: Blue;">id</span><span style="color: Gray;">;
&nbsp;
&nbsp; $</span><span style="color: Blue;">output_old</span><span style="color: Gray;"> = </span><span style="color: Blue;">get_post_meta</span><span style="color: Olive;">(</span><span style="color: Gray;">$</span><span style="color: Blue;">id</span><span style="color: Gray;">, </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">related_posts</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">, $</span><span style="color: Blue;">single</span><span style="color: Gray;"> = </span><span style="color: Green;">true</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// fetch related post from postmeta </span><span style="color: Gray;">
&nbsp;
&nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">$</span><span style="color: Blue;">output_old</span><span style="color: Olive;">){</span><span style="color: Gray;">&nbsp; </span><span style="color: #ffa500;">//if not null</span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp;$</span><span style="color: Blue;">time</span><span style="color: Gray;"> = </span><span style="color: Blue;">time</span><span style="color: Olive;">()</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">if</span><span style="color: Olive;">((</span><span style="color: Gray;">$</span><span style="color: Blue;">time</span><span style="color: Gray;"> - $</span><span style="color: Blue;">output_old</span><span style="color: Olive;">[</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">time</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">])</span><span style="color: Gray;">&lt;</span><span style="color: Maroon;">600</span><span style="color: Olive;">){</span><span style="color: Gray;">&nbsp; </span><span style="color: #ffa500;">//and in allow time (600 seconds) </span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">echo</span><span style="color: Gray;"> $</span><span style="color: Blue;">output_old</span><span style="color: Olive;">[</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">related_posts</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">]</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;">
&nbsp; </span><span style="color: Olive;">}</span><span style="color: Green;">else</span><span style="color: Olive;">{</span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp;$</span><span style="color: Blue;">output</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_get_related_posts</span><span style="color: Olive;">()</span><span style="color: Gray;"> ; </span><span style="color: #ffa500;">//fetch related post from SLOW SQL</span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;$</span><span style="color: Blue;">output_new</span><span style="color: Gray;"> = </span><span style="color: Blue;">array</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">time</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">=&gt;</span><span style="color: Blue;">time</span><span style="color: Olive;">()</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">related_posts</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">=&gt;$</span><span style="color: Blue;">output</span><span style="color: Olive;">)</span><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: Gray;">$</span><span style="color: Blue;">output_old</span><span style="color: Olive;">){</span><span style="color: #ffa500;">//if postmeta have the record, update it </span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">update_post_meta</span><span style="color: Olive;">(</span><span style="color: Gray;">$</span><span style="color: Blue;">id</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">related_posts</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, $</span><span style="color: Blue;">output_new</span><span style="color: Olive;">)</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Green;">else</span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: #ffa500;">//no, insert it</span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">add_post_meta</span><span style="color: Olive;">(</span><span style="color: Gray;">$</span><span style="color: Blue;">id</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">related_posts</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, $</span><span style="color: Blue;">output_new</span><span style="color: Gray;">, </span><span style="color: Green;">true</span><span style="color: Olive;">)</span><span style="color: Gray;">;
&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;">
&nbsp;&nbsp; &nbsp;</span><span style="color: Blue;">echo</span><span style="color: Gray;"> $</span><span style="color: Blue;">output</span><span style="color: Gray;">;
&nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">
?&gt;</span>
</pre>
<p>Of course there will be a problem via this cache. The setting from configuration panel will take some time to act it. </p>
<p>The new version WordPress Related post: <a href="http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/">WordPress Related Posts 0.8</a>. <img src='http://fairyfish.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/07/27/simple-archive/" title="Simple Archive">Simple Archive</a></li><li><a href="http://fairyfish.com/2008/07/14/wordpress-plugin-wp-turbo/" title="WordPress Plugin: WP-Turbo">WordPress Plugin: WP-Turbo</a></li><li><a href="http://fairyfish.com/2008/06/02/top-friends/" title="Top Friends">Top Friends</a></li><li><a href="http://fairyfish.com/2008/06/01/custom-smilies-20/" title="Custom Smilies 2.0">Custom Smilies 2.0</a></li><li><a href="http://fairyfish.com/2008/05/29/regular-readers-plugin-for-wordpress/" title="Regular Readers Plugin for WordPress">Regular Readers Plugin for WordPress</a></li><li><a href="http://fairyfish.com/2008/05/28/30-plugins-in-100-days/" title="30 plugins in 100 days">30 plugins in 100 days</a></li><li><a href="http://fairyfish.com/2008/05/27/where-did-they-go-from-here-mod/" title="Where did they go from here? Mod">Where did they go from here? Mod</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/06/05/speed-up-wordpress-plugin-by-using-postmeta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30 plugins in 100 days</title>
		<link>http://fairyfish.com/2008/05/28/30-plugins-in-100-days/</link>
		<comments>http://fairyfish.com/2008/05/28/30-plugins-in-100-days/#comments</comments>
		<pubDate>Sat, 31 May 2008 11:05:03 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://fairyfish.com/2008/05/28/30-plugins-in-100-days/</guid>
		<description><![CDATA[Crazy Loong and I are implementing a crazy plan, write 30 plugins in 100 days. Please support us by giving your ideas of plugins.  
The first one we have written is AideRSS WordPress Plugin
Related PostsComment Reply NotificationTop Friends 0.3Google PageRank for WordPressSimple ArchiveWordPress Plugin: WP-TurboSpeed up WordPress plugin by using postmetaTop FriendsCustom Smilies 2.0Regular [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://goto8848.net/" target="_blank">Crazy Loong</a> and I are implementing a crazy plan, write 30 plugins in 100 days. Please support us by giving your ideas of plugins. <img src='http://fairyfish.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The first one we have written is <a title="AideRSS WordPress Plugin" href="http://fairyfish.com/2008/05/26/aiderss-wordpress-plugin/">AideRSS WordPress Plugin</a></p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://fairyfish.com/2008/11/04/comment-reply-notification/" title="Comment Reply Notification">Comment Reply Notification</a></li><li><a href="http://fairyfish.com/2008/08/26/top-friends-03/" title="Top Friends 0.3">Top Friends 0.3</a></li><li><a href="http://fairyfish.com/2008/08/20/google-pagerank-for-wordpress/" title="Google PageRank for WordPress">Google PageRank for WordPress</a></li><li><a href="http://fairyfish.com/2008/07/27/simple-archive/" title="Simple Archive">Simple Archive</a></li><li><a href="http://fairyfish.com/2008/07/14/wordpress-plugin-wp-turbo/" title="WordPress Plugin: WP-Turbo">WordPress Plugin: WP-Turbo</a></li><li><a href="http://fairyfish.com/2008/06/05/speed-up-wordpress-plugin-by-using-postmeta/" title="Speed up WordPress plugin by using postmeta">Speed up WordPress plugin by using postmeta</a></li><li><a href="http://fairyfish.com/2008/06/02/top-friends/" title="Top Friends">Top Friends</a></li><li><a href="http://fairyfish.com/2008/06/01/custom-smilies-20/" title="Custom Smilies 2.0">Custom Smilies 2.0</a></li><li><a href="http://fairyfish.com/2008/05/29/regular-readers-plugin-for-wordpress/" title="Regular Readers Plugin for WordPress">Regular Readers Plugin for WordPress</a></li><li><a href="http://fairyfish.com/2008/05/27/where-did-they-go-from-here-mod/" title="Where did they go from here? Mod">Where did they go from here? Mod</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://fairyfish.com/2008/05/28/30-plugins-in-100-days/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
