<?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>Laughing Means A Lot To Me &#187; WordPress</title>
	<atom:link href="http://tkjune.com/index.php/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://tkjune.com</link>
	<description>~~ That&#039;s what I&#039;m doing all the time ~~</description>
	<lastBuildDate>Wed, 21 Dec 2011 16:13:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Disable update checking of WordPress 3</title>
		<link>http://tkjune.com/2011/08/14/disable-update-checking-of-wordpress-3/</link>
		<comments>http://tkjune.com/2011/08/14/disable-update-checking-of-wordpress-3/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 02:24:20 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[Tips of]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=586</guid>
		<description><![CDATA[When you designing a website for client with WordPress, you may not want your client click the "Upgrade" button for any reasons (mostly, by curiosity). We all know that it may cause unusable of customized theme. Here's how to disable it. Open functions.php of your theme and add following lines. add_filter('pre_site_transient_update_core', create_function('$a', &#34;return null;&#34;)); // [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tkjune.com/uploads/2011/08/wordpress-update-check.png" rel="lightbox[inpost]"><img class="alignnone size-full wp-image-588 gallery" title="WordPress Update Check" src="http://tkjune.com/uploads/2011/08/wordpress-update-check.png" alt="WordPress Update Check" width="500" height="420" /></a><br />
When you designing a website for client with WordPress, you may not want your client click the "Upgrade" button for any reasons (mostly, by curiosity). We all know that it may cause unusable of customized theme. Here's how to disable it. Open <em>functions.php</em> of your theme and add following lines.</p>
<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;">add_filter</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">pre_site_transient_update_core</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: Blue;">create_function</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">$a</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">return null;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">))</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// screening core update</span></li>
<li><span style="color: Blue;">add_filter</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">pre_site_transient_update_plugins</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: Blue;">create_function</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">$a</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">return null;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">))</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// screening plugin update</span></li>
<li><span style="color: Blue;">add_filter</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">pre_site_transient_update_themes</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: Blue;">create_function</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">$a</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">return null;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">))</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// screening theme update</span></li>
</ol></div>
<p>Or</p>
<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;">remove_action</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">admin_init</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">_maybe_update_core</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// forbid wp_version_check();</span></li>
<li><span style="color: Blue;">remove_action</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">admin_init</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">_maybe_update_plugins</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// forbid wp_update_plugins();</span></li>
<li><span style="color: Blue;">remove_action</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">admin_init</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">_maybe_update_themes</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// forbid wp_update_themes();</span></li>
</ol></div>
<p>The second method is recommended that it removes the function in grain.</p>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2011/08/14/disable-update-checking-of-wordpress-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>URL Rewriting for WordPress in IIS with wp_url_rewriting and patch</title>
		<link>http://tkjune.com/2011/05/05/url-rewriting-for-wordpress-with-wp_url_rewriting-and-patch/</link>
		<comments>http://tkjune.com/2011/05/05/url-rewriting-for-wordpress-with-wp_url_rewriting-and-patch/#comments</comments>
		<pubDate>Wed, 04 May 2011 16:29:16 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=570</guid>
		<description><![CDATA[There are several ways to use URL rewriting for WordPress in IIS. I'm using wp_url_rewriting for my client. Recently, my client upgraded his WordPress to 3.1 which cause a problem that the page navigation does not work correctly. Symptom: The page link in a category page, does not contain the category slug. Ex. in http://sampledomain/samplecate/, [...]]]></description>
			<content:encoded><![CDATA[<p>There are <a title="Using Permalinks in WordPress" href="http://codex.wordpress.org/Using_Permalinks">several ways</a> to use URL rewriting for WordPress in IIS. I'm using <a title="wp_url_rewriting" href="http://www.deanlee.cn/wordpress/url-rewriting-for-wordpress-under-iis/">wp_url_rewriting</a> for my client. Recently, my client upgraded his WordPress to 3.1 which cause a problem that the page navigation does not work correctly.</p>
<p>Symptom: The page link in a category page, does not contain the category slug. Ex. in http://sampledomain/samplecate/, the page link should be http://sampledomain/samplecate/page/2, but it shows like http://sampledomain/page/2.</p>
<p>This does not happen on my Apache server. So I checked out wp_url_rewriting installation note and I found this:</p>
<blockquote><p>3). Do a little hack to WordPress file ‘link-template.php’ to make paging works well for categories:(<strong><span style="color: #ff0000;">NOTE: You don’t need to do this step if you are using WordPress 2.3.0 or newer</span></strong>)</p>
<p>open file /wp-includes/link-template.php and find the following code:....</p></blockquote>
<p>From 2.3.0 to 3.0.x, no need to do the hack. Since 3.1.0, it becomes a must again. The original hack does not working. It's been moved to another file. So do the hack as follows:</p>
<p>open file /wp-includes/functions.php and find following code:</p>
<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: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">add_query_arg</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: #00008b;">$ret</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;</span></li>
<li><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: Blue;">is_array</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Blue;">func_get_arg</span><span style="color: Olive;">(</span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><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: Blue;">func_num_args</span><span style="color: Olive;">()</span><span style="color: Gray;"> &amp;</span><span style="color: Blue;">lt</span><span style="color: Gray;">; </span><span style="color: Maroon;">2</span><span style="color: Gray;"> || </span><span style="color: Green;">false</span><span style="color: Gray;"> === @</span><span style="color: Blue;">func_get_arg</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Maroon;">1</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span></li>
<li><span style="color: #00008b;">$uri</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;">REQUEST_URI</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">;</span></li>
<li><span style="color: Green;">else</span></li>
<li><span style="color: #00008b;">$uri</span><span style="color: Gray;"> = @</span><span style="color: Blue;">func_get_arg</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">1</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">else</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><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: Blue;">func_num_args</span><span style="color: Olive;">()</span><span style="color: Gray;"> &amp;</span><span style="color: Blue;">lt</span><span style="color: Gray;">; </span><span style="color: Maroon;">3</span><span style="color: Gray;"> || </span><span style="color: Green;">false</span><span style="color: Gray;"> === @</span><span style="color: Blue;">func_get_arg</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Maroon;">2</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span></li>
<li><span style="color: #00008b;">$uri</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;">REQUEST_URI</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">;</span></li>
<li><span style="color: Green;">else</span></li>
<li><span style="color: #00008b;">$uri</span><span style="color: Gray;"> = @</span><span style="color: Blue;">func_get_arg</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">2</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
</ol></div>
<p>Replace the <strong>$_SERVER['REQUEST_URI']</strong> with <strong>$_SERVER['PATH_INFO']</strong></p>
<p>Then wp_url_rewriting will work again.</p>
<p>BTW, after fixing this, I found <a title="use ISAPI_Rewrite lite version" href="http://www.kylecaulfield.com/permalink-for-wordpress-iis-6-mod_rewrite-fixed-free">some updates of ISAPI_Rewrite</a>. The lite version could work well for WordPress. I used that before. I remember there were some limitations for the lite version. Since this article was written on Feb 17th, 2010. I guess it should work fine. If so, this could be a better solution for there's no hack needed.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2011/05/05/url-rewriting-for-wordpress-with-wp_url_rewriting-and-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress auto upgrade in Mac local environment</title>
		<link>http://tkjune.com/2010/04/17/wordpress-auto-upgrade-in-mac-local-environment/</link>
		<comments>http://tkjune.com/2010/04/17/wordpress-auto-upgrade-in-mac-local-environment/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 08:53:35 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[Tips of]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=447</guid>
		<description><![CDATA[When I test WordPress in local Mac OS X, the auto upgrade function is not available. It shows up like below: Here describes reasons and solution. But it doesn&#39;t work in my situation: Using XAMPP to set up the testing environment. Another solution were provided in comment 44 by Johan L. It works alright! Do [...]]]></description>
			<content:encoded><![CDATA[<p>When I test WordPress in local Mac OS X, the auto upgrade function is not available. It shows up like below:</p>
<p><img alt="Connection info needed" class="alignnone size-full wp-image-448" height="262" src="http://tkjune.com/uploads/2010/04/connection_info_needed.jpg" title="Connection info needed" width="470" /></p>
<p><a href="http://www.chrisabernethy.com/why-wordpress-asks-connection-info/">Here</a> describes reasons and solution. But it doesn&#39;t work in my situation: Using XAMPP to set up the testing environment. Another solution were provided in comment 44 by Johan L. It works alright!</p>
<p>Do as follows:</p>
<p>&nbsp;</p>
<blockquote>
<p>To set up file ownership correctly:<br />
		In WP root directory<br />
		chown -R yourusername:apachegroupname *<br />
		In my case...<br />
		chown -R johan:apache *</p>
<p>find . -type d -exec chmod 770 {} &#39;;&#39;<br />
		find . -type f -exec chmod 660 {} &#39;;&#39;</p>
<p>WP 2.8: add<br />
		define(&#39;FS_METHOD&#39;, &#39;direct&#39;);<br />
		define(&#39;WP_TEMP_DIR&#39;, ABSPATH.&#39;wp-content/tmp&#39;);<br />
		in wp-config.php<br />
		The function in file.php reads FS_METHOD and the tmp file creation test is never executed.<br />
		Make sure the wp-content/tmp directory exists and is writable by the apache user</p>
<p>Pre WP 2.8: well... you may need to patch the function in file.php by removing the if statement before $method=&#39;direct&#39;;<br />
		see comment #38 above<br />
		Only do this if you&#39;re sure you&#39;ve setup file ownership correctly.</p>
<p>BTW the three numbers in chmod describe rights for &quot;user&quot;, &quot;group&quot; and &quot;others&quot;. read==4, write==2, execute==1. Sum of rights make up the number. Hence 777 means read, write and execute for user, group and others. 660 means read and write for user and group, no rights for others.</p>
<p>NEVER do a chmod 777 on any file or directory. NEVER recommend anyone to do it either!</p>
</blockquote>
<p>Note that it&#39;s better to upgrade to 2.8 and above first.</p>
<p>The key is the two lines in wp-config.php.</p>
<p>Thanks Johan L.</p>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2010/04/17/wordpress-auto-upgrade-in-mac-local-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PuSHPress</title>
		<link>http://tkjune.com/2010/03/04/pushpress/</link>
		<comments>http://tkjune.com/2010/03/04/pushpress/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:41:37 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[I'm doing...]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=440</guid>
		<description><![CDATA[Just installed this new plugin. Try if it works well.]]></description>
			<content:encoded><![CDATA[<p>Just installed this new plugin. Try if it works well.</p>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2010/03/04/pushpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplified Chinese Language Pack for NextGEN Gallery</title>
		<link>http://tkjune.com/2009/04/13/simplified-chinese-language-pack-for-nextgen-gallery/</link>
		<comments>http://tkjune.com/2009/04/13/simplified-chinese-language-pack-for-nextgen-gallery/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 13:50:30 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[I'm doing...]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[NextGEN Gallery]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=385</guid>
		<description><![CDATA[NextGEN Gallery is a very powerful plugin for WordPress that can manage the photo easily. It has many features and provides multiple language support. I've just made the Simplified Chinese language pack for the current version. Download: Simplified Chinese Language Pack for NextGEN Gallery 1.21 1.33 1.43 1.52 1.55 1.60 1.72 1.73 1.81 1.83 1.91 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-387" title="NextGEN Gallery in Chinese" src="http://tkjune.com/uploads/2009/04/nextgen-gallery-in-chinese.png" alt="NextGEN Gallery in Chinese" width="460" height="285" /></p>
<p><a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/">NextGEN Gallery</a> is a very powerful plugin for WordPress that can manage the photo easily. It has many features and provides multiple language support. I've just made the Simplified Chinese language pack for the current version. <strong>Download:</strong> <a title="Simplified Chinese Language Pack for NextGEN Gallery" href="http://tkjune.com/uploads/2009/04/nggallery-zh_cn.zip">Simplified Chinese Language Pack for NextGEN Gallery <del datetime="2009-07-01T06:29:36+00:00">1.21</del> <del datetime="2010-01-09T09:10:26+00:00">1.33</del> <span style="text-decoration: line-through;">1.43</span> <span style="text-decoration: line-through;">1.52</span> <span style="text-decoration: line-through;">1.55</span> <span style="text-decoration: line-through;">1.60</span> <span style="text-decoration: line-through;">1.72</span> <span style="text-decoration: line-through;">1.73</span> <span style="text-decoration: line-through;">1.81</span> <del datetime="2011-12-21T16:12:06+00:00">1.83</del> 1.91</a></p>
<p>(Following bug has been fixed after 1.21)</p>
<p><span style="text-decoration: line-through;">There is a bug in this version when using other languages which will result in a notice's translation can not be shown. It a very small issue but if you are completist you can fix it in this way: Open this file<em> [NextGEN plugin folder]/lib/core.php</em> and find out line 419.  Replace it with following code:
<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: #00008b;">$result</span><span style="color: Gray;"> = </span><span style="color: Blue;">sprintf</span><span style="color: Olive;">(</span><span style="color: Gray;">  </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">Note : Based on your server memory limit you should not upload larger images then &amp;lt;strong&amp;gt;%d x %d&amp;lt;/strong&amp;gt; pixel</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">nggallery</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">, </span><span style="color: #00008b;">$size</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">width</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">, </span><span style="color: #00008b;">$size</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">height</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
</ol></div>
<p> This notice appears in [Add Gallery / Images] -&gt; [Upload a Zip-file] and similar pages. Well, in fact, there are two more bugs if you really want to fix... Open this file<em> [NextGEN plugin folder]/admin/tinymce/window.php</em> and find out line 29-30.  Replace them with following code:
<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: Gray;">&lt;/</span><span style="color: Blue;">span</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&amp;</span><span style="color: Blue;">nbsp</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&lt;</span><span style="color: Blue;">span</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">style</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text-decoration: line-through;</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;</span></li>
</ol></div>
<p></span> Checkout <a href="http://www.760s.com/?page_id=6">what I did (very simple)</a> with this wonderful plugin and know more about <a href="http://nextgen.boelinger.com/">how to use it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2009/04/13/simplified-chinese-language-pack-for-nextgen-gallery/feed/</wfw:commentRss>
		<slash:comments>86</slash:comments>
		</item>
		<item>
		<title>Coding standards</title>
		<link>http://tkjune.com/2009/04/13/coding-standards/</link>
		<comments>http://tkjune.com/2009/04/13/coding-standards/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 02:56:41 +0000</pubDate>
		<dc:creator>Tkjune</dc:creator>
				<category><![CDATA[I'm learning]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tkjune.com/?p=382</guid>
		<description><![CDATA[For a beginner of programing, it's a good habit of writing codes in standard format. There are different rules in different companies/teams. Better than form your own, follow a standard of a popular application could be easier and more acceptable by people. For example, the WordPress Coding Standards and Inline Documentation. Some good approach I [...]]]></description>
			<content:encoded><![CDATA[<p>For a beginner of programing, it's a good habit of writing codes in standard format. There are different rules in different companies/teams. Better than form your own, follow a standard of a popular application could be easier and more acceptable by people. For example, the <a title="WordPress Coding Standards" href="http://codex.wordpress.org/WordPress_Coding_Standards">WordPress Coding Standards</a> and <a title="WordPress Inline Documentation" href="http://codex.wordpress.org/Inline_Documentation">Inline Documentation</a>.<br />
Some good approach I just learned from it:</p>
<ul>
<li>When doing logical comparisons always put the variable on the right side.<br />
I saw this in some codes, now I know why: If you forget an equal sign it'll throw a parse error instead of just evaluating true and executing the statement. It really takes no extra time to do, so if this saves one bug it's worth it.</li>
<li>Use <strong>real tabs</strong> and <strong>not spaces</strong>, as this allows the most flexibility across clients.<br />
In some courses, it's suggested that using spaces instead of tabs. Either of they has their reasons. As mentioned above, using the standards of popular applications could be better. And I have already had the habit of using tabs, so I just follow WordPress here.</li>
<li>Tabs should be used at the beginning of the line and spaces should be used mid-line.<br />
Exception for previous point: if you have a block of code that would be more readable if things aligned, use spaces.</li>
<li><a class="extiw" title="wikipedia:Ternary operation" href="http://en.wikipedia.org/wiki/Ternary_operation">Ternary</a> operators are fine, but always have them test if the statement is true, not false. Otherwise it just gets confusing.
<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: #ffa500;">// GOOD example:</span></li>
<li><span style="color: #ffa500;">// (if statement is true) ? (do this) : (if false, do this);</span></li>
<li><span style="color: #00008b;">$musictype</span><span style="color: Gray;"> = </span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">jazz</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> == </span><span style="color: #00008b;">$music</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;">cool</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> : </span><span style="color: #8b0000;">'</span><span style="color: Red;">blah</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
</ol></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tkjune.com/2009/04/13/coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

