<?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>Patrick Jones, The Red Cyclone</title>
	<atom:link href="http://patrickmjones.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://patrickmjones.com/blog</link>
	<description>Yeah, whatever...</description>
	<lastBuildDate>Tue, 18 Jun 2013 06:50:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>So, Attack on Titan?</title>
		<link>http://patrickmjones.com/blog/2013/06/18/so-attack-on-titan/</link>
		<comments>http://patrickmjones.com/blog/2013/06/18/so-attack-on-titan/#comments</comments>
		<pubDate>Tue, 18 Jun 2013 06:19:44 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Anime/Manga/Comics]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=1052</guid>
		<description><![CDATA[I saw this pop up in my G+ feed a couple of times &#8211; even though I haven&#8217;t read the manga I gave it a try on CrunchyRoll. It seems pretty cool! It reminds me a bit of Claymore, maybe it was because of the strong female character (who reminds me a bit of Gally [...]]]></description>
				<content:encoded><![CDATA[<p>I saw this pop up in my G+ feed a couple of times &#8211; even though I haven&#8217;t read the manga I gave it a try on <a href="http://www.crunchyroll.com/affiliate_redirect/?widget=Tu017&#038;affiliate=af-75798-dyjo">CrunchyRoll</a>.  It seems pretty cool!  It reminds me a bit of Claymore, maybe it was because of the strong female character (who reminds me a bit of Gally from Gunnm with her hairdo), the giants, or all the blood.  Either way, it&#8217;s been pretty enjoyable!  Last thing I watched on there was Sword Art Online&#8230; anything else I&#8217;m missing that I should be watching?</p>
<p>Anyway, here&#8217;s the trailer, and below are a couple of images.</p>
<p><iframe width="600" height="338" src="http://www.youtube.com/embed/MGRm4IzK1SQ?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
		<!-- slider container -->
		<div class = 'iosSlider iosSlider-instance-1052'>


			<!-- slider -->
			<div class = 'slider'>				<div class = 'slide'>
				<a href="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_wallpaper.jpg" class="thickbox">
					<img src="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_wallpaper.jpg" alt="Attack on Titan Wallpaper" />
				</a>
			</div>				<div class = 'slide'>
				<a href="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_mikasa.jpg" class="thickbox">
					<img src="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_mikasa.jpg" alt="Attack on Titan Mikasa" />
				</a>
			</div>				<div class = 'slide'>
				<a href="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_armored_titan.jpg" class="thickbox">
					<img src="http://patrickmjones.com/blog/wp-content/uploads/2013/06/aot_armored_titan.jpg" alt="Attack on Titan - Armored Titan" />
				</a>
			</div>				</div>

			<div class='prevButton'></div>
			<div class='nextButton'></div>
		</div>		<script type="text/javascript">
			if(window.jQuery) {
				jQuery(document).ready(function() {
					/* basic - default settings */
					jQuery('.iosSlider-instance-1052').iosSlider({
						snapToChildren: true,
						desktopClickDrag: true,
						infiniteSlider: true,
						navPrevSelector: jQuery('.iosSlider-instance-1052 .prevButton'),
						navNextSelector: jQuery('.iosSlider-instance-1052 .nextButton')		
					});
				});
			}
		</script>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/06/18/so-attack-on-titan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LUA, Love2D and Pong</title>
		<link>http://patrickmjones.com/blog/2013/06/08/lua-love2d-and-pong/</link>
		<comments>http://patrickmjones.com/blog/2013/06/08/lua-love2d-and-pong/#comments</comments>
		<pubDate>Sat, 08 Jun 2013 07:10:55 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[game engines]]></category>
		<category><![CDATA[lua]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=1032</guid>
		<description><![CDATA[As a software developer who loves playing games, game development has always intrigued me. I have always thought that I could use some of what I already know to build the games that I imagine all the time. I would say that was maybe half true&#8230; A coworker of mine, Chris, told me he has [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://patrickmjones.com/blog/wp-content/uploads/2013/06/pong_screenshot_1.png" class="thickbox"><img src="http://patrickmjones.com/blog/wp-content/uploads/2013/06/pong_screenshot_1-150x150.png" alt="Pong in Love2D" width="150" height="150" class="alignleft size-thumbnail wp-image-1033" /></a> As a software developer who loves playing games, game development has always intrigued me.  I have always thought that I could use some of what I already know to build the games that I imagine all the time.  I would say that was maybe half true&#8230;</p>
<p>A coworker of mine, Chris, told me he has written Pong clones many times&#8230; so it seemed like a good starting point.  Thinking about it, I had dabbled in XNA when it came out but never tried making a complete game.  At that point I decided to write a Pong clone, and did some searching for an engine to get me started and I landed on <a href="http://love2d.org" rel="external">Love2D</a>. Love2D is a nice 2D game engine where games can be written in <a href="http://www.lua.org" rel="external">LUA</a>.  Personally I had never heard of or done anything in LUA, but I like learning new stuff so I gave it a try.</p>
<p>The language syntax is clean and simple, and the API is built around game development making the task a breeze.  Ultimately I learned about the main game loop, handling user input, collision detection, computer AI, etc.  To anyone interested in doing game development I think it&#8217;s an excellent starter project because it touches on a lot of basic ideas that are part of every game.  In total the project took me about 4 hours including time to document my code, add sound effects, and test it out.  The code is all in <a href="https://github.com/patrickmjones/PJones.Love.Pong" rel="external">Github</a> so I invite you to check it out if you&#8217;re interested or of course check out my <a href="/blog/development/love-pong/" title="Love.Pong">project page</a>.</p>
<p>What are your thoughts on Love2D or LUA development?  Do you have a story about your first game development attempt?  Let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/06/08/lua-love2d-and-pong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset That Sitecore Admin Password</title>
		<link>http://patrickmjones.com/blog/2013/06/05/reset-that-sitecore-admin-password/</link>
		<comments>http://patrickmjones.com/blog/2013/06/05/reset-that-sitecore-admin-password/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 05:22:59 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[sitecore]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=1010</guid>
		<description><![CDATA[Sometimes we don&#8217;t have the password to the sitecore\admin account and need to get in. You can reset the admin password to the default just don&#8217;t forget the change it afterwards to something secure. Since I had to do this again today and Emile had the excellent idea of putting it somewhere I wouldn&#8217;t forget [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes we don&#8217;t have the password to the sitecore\admin account and need to get in.  You can reset the admin password to the default just don&#8217;t forget the change it afterwards to something secure.  Since I had to do this again today and <a href="http://www.choppre.com/" rel="external">Emile</a> had the excellent idea of putting it somewhere I wouldn&#8217;t forget I decided to post it here.  Just change &#8220;Sitecore_core&#8221; to the name of your Core database.  Oh yeah, and don&#8217;t forget to back up the database first otherwise you will be thrown into the abyss.</p>
<p><script src="http://gist.github.com/patrickmjones/5708467.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/06/05/reset-that-sitecore-admin-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OEmbed in Sitecore</title>
		<link>http://patrickmjones.com/blog/2013/05/27/oembed-in-sitecore/</link>
		<comments>http://patrickmjones.com/blog/2013/05/27/oembed-in-sitecore/#comments</comments>
		<pubDate>Tue, 28 May 2013 03:29:46 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[OEmbed]]></category>
		<category><![CDATA[sitecore]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=996</guid>
		<description><![CDATA[Recently I&#8217;ve seen some interesting approaches to enabling rich content in a Sitecore CMS. Outdated embed codes, renderings, hardcoded gems for the wall-of-shame, javascript plugins of failure, you name it &#8211; I saw someone try it. I knew about OEmbed, and it makes sense&#8230; if anyone knows how to embed a Youtube video it&#8217;s Youtube. [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve seen some interesting approaches to enabling rich content in a Sitecore CMS. Outdated embed codes, renderings, hardcoded gems for the wall-of-shame, javascript plugins of failure, you name it &#8211; I saw someone try it. I knew about <a href="http://oembed.com/" rel="external">OEmbed</a>, and it makes sense&#8230; if anyone knows how to embed a Youtube video it&#8217;s Youtube. More importantly, not just Youtube, but a number of popular providers ranging from video and images to presentations and circuitry diagrams.</p>
<p>The idea is that this works on any .Net system, it just so happens that my immediate needs are in Sitecore. It&#8217;s all on <a href="https://github.com/patrickmjones/PJones.OEmbed" rel="external">Github</a>, and a bit young still so pardon any mess.</p>
<p>Check out the modified Launch Sitecore demo screenshot below showing the video.<br />
<a class="thickbox" href="http://patrickmjones.com/blog/wp-content/uploads/2013/05/launch_sitecore_oembed.png"><img class="alignnone size-full wp-image-992" alt="Launch Sitecore with Video" src="http://patrickmjones.com/blog/wp-content/uploads/2013/05/launch_sitecore_oembed.png" /></a></p>
<p>To see how easy it is for you and your team to integrate rich content on your Sitecore site, check out the <a title="Sitecore OEmbed" href="/blog/development/sitecore-oembed/">Sitecore OEmbed project</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/05/27/oembed-in-sitecore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitecore XSLT Optimization Considerations</title>
		<link>http://patrickmjones.com/blog/2013/05/27/sitecore-xslt-optimization-considerations/</link>
		<comments>http://patrickmjones.com/blog/2013/05/27/sitecore-xslt-optimization-considerations/#comments</comments>
		<pubDate>Mon, 27 May 2013 12:00:46 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Schlemiel the Painter]]></category>
		<category><![CDATA[sitecore]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=566</guid>
		<description><![CDATA[Sitecore&#8217;s XSLT renderings are an excellent way to quickly and easily render almost any part of your web app or site. In interacting with the developer community through blogs, StackOverflow, etc. I believe they are largely misunderstood. I have not found a way to go from HTML mockup to functioning website faster than using XSLT [...]]]></description>
				<content:encoded><![CDATA[<p>Sitecore&#8217;s XSLT renderings are an excellent way to quickly and easily render almost any part of your web app or site.  In interacting with the developer community through blogs, StackOverflow, etc. I believe they are largely misunderstood.  I have not found a way to go from HTML mockup to functioning website faster than using XSLT simply filling in the blanks.  So, to those of you brave enough to try it out, check this out.</p>
<p>That being said, there are a few gotchas to consider when putting your renderings together.</p>
<h3>Item or Node Comparison</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:for-each</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;./item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:if</span> <span style="color: #000066;">test</span>=<span style="color: #ff0000;">&quot;$some_item = .&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Incredible code happening here --&gt;</span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:if<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:for-each<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now consider the difference on line 2 in the following modified version of the code snippet.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:for-each</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;./item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:if</span> <span style="color: #000066;">test</span>=<span style="color: #ff0000;">&quot;$some_item/@id = ./@id&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Incredible code happening here --&gt;</span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:if<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:for-each<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>In the first example it was necessary to serialize the whole item and compare that, whereas the second example simply compares to id attribute.  Depending on your needs comparing item ids is enough &#8211; keep in mind how expensive the comparisons are.</p>
<h3>Descendant Queries</h3>
<p>Sometimes a descendant query is necessary but until now they haven&#8217;t been scalable.  Where I often see them is in navigation components to determine if a navigation element should have a &#8220;selected&#8221; state.  If you imagine the content tree with it&#8217;s children and their children&#8230; this query will potentially touch a lot of nodes!</p>
<p>Check out some code you might see in a navigation control below</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:foreach</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;$home/item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:when</span> <span style="color: #000066;">test</span>=<span style="color: #ff0000;">&quot;boolean(current()/descendant-or-self::item[@id=$sc_currentitem/@id])&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        ...</pre></td></tr></table></div>

<p>That might not make your head shake at first glance, but it should.  Now compare line 2 to the same line in the following snippet</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:foreach</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;$home/item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:when</span> <span style="color: #000066;">test</span>=<span style="color: #ff0000;">&quot;boolean($sc_currentitem/ancestor-or-self::item[@id = current()/@id])&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        ...</pre></td></tr></table></div>

<p>That particular blunder can be done in a user control too.  Be cognizant of the number of items your query is going to touch.  It might be fast in your development environment where there are only 3 news articles, but 6 months later in production they might have hundreds or thousands &#8211; that&#8217;s not scalable my friend.</p>
<h3>&#8220;Yeah, that&#8217;s why I don&#8217;t use XSLT&#8221;</h3>
<p>I&#8217;m going to nip that conversation in the bud.  No matter what technology you&#8217;re using, <a href="http://en.wikipedia.org/wiki/Schlemiel_the_Painter's_algorithm" rel="external">Schlemiel the Painter</a> has an algorithm.  Understanding the fundamentals about the system you&#8217;re developing for are key.  Any other ProTip&trade; share in the comments below &#8211; I continue to learn everyday. <img src='http://patrickmjones.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/05/27/sitecore-xslt-optimization-considerations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anatomy of a WordPress Custom Post Type</title>
		<link>http://patrickmjones.com/blog/2013/05/20/anatomy-of-a-wordpress-custom-post-type/</link>
		<comments>http://patrickmjones.com/blog/2013/05/20/anatomy-of-a-wordpress-custom-post-type/#comments</comments>
		<pubDate>Tue, 21 May 2013 01:22:01 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=910</guid>
		<description><![CDATA[I recently created a custom post type, and there was a lot of trial and error, a lot of searching and probably a lot of wasted time. Here is the code that gets things set up, don&#8217;t worry I&#8217;ll break it down below: 15 16 17 18 19 20 21 22 23 24 25 26 [...]]]></description>
				<content:encoded><![CDATA[<p>I recently created a <a href="http://codex.wordpress.org/Post_Types" rel="external">custom post type</a>, and there was a lot of trial and error, a lot of searching and probably a lot of wasted time.</p>
<p>Here is the code that gets things set up, don&#8217;t worry I&#8217;ll break it down below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$plugin_dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lang_dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">realpath</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin_dir</span> <span style="color: #339933;">.</span> <span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;lang&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
load_plugin_textdomain<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'pj-movies'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lang_dir</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Register Post Type        </span>
<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Movies&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;label&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'labels'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'add_new_item'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Add New Movie Review&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;add_new_item&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'edit_item'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Edit Movie Review&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;edit_item&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'new_item'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;New Movie Review&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;new_item&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'view_item'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;View Movie Review&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;view_item&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'search_items'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Search Movie Reviews&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;search_items&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'not_found'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;No Movie Reviews Found&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;not_found&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'not_found_in_trash'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;No Movie Reviews found in Trash&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;not_found_in_trash&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'singular_label'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Movie&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;singular_label&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'capability_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'has_archive'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;slug&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'excerpt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'editor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'revisions'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
register_post_type<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'movie'</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register_post_type_archives</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'movie'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
register_taxonomy<span style="color: #009900;">&#40;</span>  
    <span style="color: #0000ff;">'movie_categories'</span><span style="color: #339933;">,</span>  
    <span style="color: #0000ff;">'movie'</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>  
        <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Categories'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'taxonomy label'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'query_var'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'movie-categories'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>  
    <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><span id="more-910"></span></p>
<h3>Localizable Plugins</h3>
<p>If you plan to share your work then the benefits for ensuring it is localizable are obvious, even if you only speak one language.  Check out the following lines:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>15
16
17
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$plugin_dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lang_dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">realpath</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin_dir</span> <span style="color: #339933;">.</span> <span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;lang&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
load_plugin_textdomain<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'pj-movies'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lang_dir</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Movies&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;label&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>The <a href="http://codex.wordpress.org/Function_Reference/load_plugin_textdomain" rel="external">load_plugin_textdomain</a> loads all the strings that you&#8217;ll need, and the <a href="http://codex.wordpress.org/Function_Reference/_x" rel="external">_x</a> method retrieves the appropriate string.</p>
<p>There&#8217;s an excellent plugin called <a href="http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en" rel="external">Codestyling Localization</a> which helps set up the WordPress compatible files for l10n and does all the hard work for you.  If you plan on making your plugin localizable I can&#8217;t recommend this plugin enough.</p>
<h3>What the post type &#8220;supports&#8221;</h3>
<p>Does your post type either support or not support some base WordPress features unexpectedly?  Check out the supports line:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'excerpt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'editor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'revisions'</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>Here is WordPress&#8217; own description of each feature:</p>
<ul>
<li> &#8216;title&#8217;
</li>
<li> &#8216;editor&#8217; (content)
</li>
<li> &#8216;author&#8217;
</li>
<li> &#8216;thumbnail&#8217; (featured image, current theme must also support <a href="http://codex.wordpress.org/Post_Thumbnails" title="Post Thumbnails" rel="external">post-thumbnails</a>)
</li>
<li> &#8216;excerpt&#8217;
</li>
<li> &#8216;trackbacks&#8217;
</li>
<li> &#8216;custom-fields&#8217;
</li>
<li> &#8216;comments&#8217; (also will see comment count balloon on edit screen)
</li>
<li> &#8216;revisions&#8217; (will store revisions)
</li>
<li> &#8216;page-attributes&#8217; (menu order, hierarchical must be true to show Parent option)
</li>
<li> &#8216;post-formats&#8217; add post formats, see <a href="http://codex.wordpress.org/Post_Formats" title="Post Formats" rel="external">Post Formats</a>
</li>
</ul>
<h3>Custom taxonomy</h3>
<p>Depending on your custom post type you may want to register a new custom taxonomy for it.  Check out the lines I have set up here:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">register_taxonomy<span style="color: #009900;">&#40;</span>  
    <span style="color: #0000ff;">'movie_categories'</span><span style="color: #339933;">,</span>  
    <span style="color: #0000ff;">'movie'</span><span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>  
        <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> _x<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Categories'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'taxonomy label'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pj-movies&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'query_var'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        <span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'movie-categories'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>  
    <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In this case I had a totally different taxonomy in mind for my &#8220;Movies&#8221; compared to my normal posts.  As always, the important thing is to read the documentation on <a href="http://codex.wordpress.org/Function_Reference/register_taxonomy" rel="external">register_taxonomy</a>.</p>
<h3>Full Codebase at Github</h3>
<p>For the full codebase and working plugin head over to Github.</p>
<div class="github-embed github-embed-repository">
<p><a href="https://github.com/patrickmjones/pjones_wp_movies" target="_blank"><strong>WordPress Movie post type with RottenTomatoes API integration</strong></a><br/><a href="https://github.com/patrickmjones/pjones_wp_movies" target="_blank">https://github.com/patrickmjones/pjones_wp_movies</a><br/>0 forks.<br/>0 open issues.<br/>Recent commits:
<ul class="github_commits">
<li class="github_commit"><a href="https://github.com/patrickmjones/pjones_wp_movies/commit/ce15c493b16dd353e8cac0f585a4853a562c08e3" target="_blank">index view working with has_archive=&gt;true, and now pulling in the thumbnail.  thumbnail needs to be refactored to upload from rottentomatoes API.</a>, Patrick Jones</li>
<li class="github_commit"><a href="https://github.com/patrickmjones/pjones_wp_movies/commit/77ea195f8183175fb341f132807015d996157a19" target="_blank">Adding a baseline of what is used on patrickmjones.com</a>, Patrick Jones</li>
<li class="github_commit"><a href="https://github.com/patrickmjones/pjones_wp_movies/commit/bf6f868e187164ed3cbe4ec4ba90819498843fad" target="_blank">Initial commit</a>, Patrick Jones</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/05/20/anatomy-of-a-wordpress-custom-post-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rihanna Loves Young Coconuts</title>
		<link>http://patrickmjones.com/blog/2013/05/18/rihanna-young-coconuts/</link>
		<comments>http://patrickmjones.com/blog/2013/05/18/rihanna-young-coconuts/#comments</comments>
		<pubDate>Sun, 19 May 2013 02:39:17 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[coconut]]></category>
		<category><![CDATA[rihanna]]></category>
		<category><![CDATA[young coconuts]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=928</guid>
		<description><![CDATA[Rihanna loves those young coconuts Download Video]]></description>
				<content:encoded><![CDATA[<p>Rihanna loves those young coconuts</p>
<p>	<video id="wp_mep_1" src="/blog/wp-content/uploads/2013/05/rihanna-youngcoconuts.m4v"  width="540" height="360"  controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="540" height="360" type="application/x-shockwave-flash" data="http://patrickmjones.com/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://patrickmjones.com/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=/blog/wp-content/uploads/2013/05/rihanna-youngcoconuts.m4v" />			
		</object>		
	</video>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_1').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		
	});
});
</script>
<br />
<a href="/blog/wp-content/uploads/2013/05/rihanna-youngcoconuts.m4v">Download Video</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/05/18/rihanna-young-coconuts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Donkey Kong&#8217;s got nothing on The Red Cyclone</title>
		<link>http://patrickmjones.com/blog/2013/04/02/donkey-kongs-got-nothing-on-the-red-cyclone/</link>
		<comments>http://patrickmjones.com/blog/2013/04/02/donkey-kongs-got-nothing-on-the-red-cyclone/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 15:45:08 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Nonsense]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=838</guid>
		<description><![CDATA[Haha, thanks for linking me to this @switchblade. Shit cracked me up.]]></description>
				<content:encoded><![CDATA[<p><a href="http://patrickmjones.com/blog/wp-content/uploads/2013/04/zangief-spd-donkeykong.gif" class="thickbox"><img src="http://patrickmjones.com/blog/wp-content/uploads/2013/04/zangief-spd-donkeykong.gif" alt="zangief-spd-donkeykong" width="500" height="500" class="aligncenter size-full wp-image-839" /></a></p>
<p>Haha, thanks for linking me to this @switchblade.  Shit cracked me up.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/04/02/donkey-kongs-got-nothing-on-the-red-cyclone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calamari Wrestler</title>
		<link>http://patrickmjones.com/blog/2013/02/15/calamari-wrestler/</link>
		<comments>http://patrickmjones.com/blog/2013/02/15/calamari-wrestler/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 03:43:37 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Nonsense]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=896</guid>
		<description><![CDATA[I picked up Calamari Wrestler yesterday at Katsucon. Had I heard of it before? No. Did I buy it on the spot without looking into it? Yes. Do I expect it to be incredible? Yes!]]></description>
				<content:encoded><![CDATA[<p><a href="http://patrickmjones.com/blog/wp-content/uploads/2013/05/calamariwrestler6ac.gif" class="thickbox"><img src="http://patrickmjones.com/blog/wp-content/uploads/2013/05/calamariwrestler6ac.gif" alt="calamariwrestler6ac" width="182" height="125" class="alignleft size-full wp-image-897" /></a> I picked up Calamari Wrestler yesterday at <a href="http://www.katsucon.org" rel="external">Katsucon</a>.  Had I heard of it before? <strong>No.</strong> Did I buy it on the spot without looking into it? <strong>Yes.</strong> Do I expect it to be incredible? <strong>Yes!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2013/02/15/calamari-wrestler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimenting with Three.JS &#8211; Casketville</title>
		<link>http://patrickmjones.com/blog/2012/12/24/experimenting-with-three-js-casketville/</link>
		<comments>http://patrickmjones.com/blog/2012/12/24/experimenting-with-three-js-casketville/#comments</comments>
		<pubDate>Tue, 25 Dec 2012 03:00:20 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://patrickmjones.com/blog/?p=652</guid>
		<description><![CDATA[I have no idea what my plans are with this, but for some reason a while back I couldn&#8217;t sleep until I picked up casketville.com. I decided to play around with WebGL/Three.JS, and this is about how far I&#8217;ve gotten. http://www.casketville.com]]></description>
				<content:encoded><![CDATA[<p><a href="http://patrickmjones.com/blog/wp-content/uploads/2012/12/casketville.jpg" class="thickbox"><img src="http://patrickmjones.com/blog/wp-content/uploads/2012/12/casketville-150x150.jpg" alt="Casketville Screenshot" width="150" height="150" class="alignleft size-thumbnail wp-image-653" /></a>I have no idea what my plans are with this, but for some reason a while back I couldn&#8217;t sleep until I picked up casketville.com.  I decided to play around with WebGL/<a href="https://github.com/mrdoob/three.js/" rel="external">Three.JS</a>, and this is about how far I&#8217;ve gotten.</p>
<p><a href="http://www.casketville.com" rel="external">http://www.casketville.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickmjones.com/blog/2012/12/24/experimenting-with-three-js-casketville/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
