<?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>Andygirvan.com &#187; plugin</title>
	<atom:link href="http://andygirvan.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://andygirvan.com</link>
	<description>London based Freelance Web &#38; iPhone Developer</description>
	<lastBuildDate>Mon, 09 Jan 2012 17:08:48 +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>Blankit for jQuery &#8211; set your targets to blank.</title>
		<link>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/</link>
		<comments>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 13:27:16 +0000</pubDate>
		<dc:creator>Andy G</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript/jQuery]]></category>
		<category><![CDATA[blankit]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=638</guid>
		<description><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p>The latest addition to my ever growing list of projects on Github is Blankit - a jQuery plugin for adding target="_blank" to any matching elements.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p><p>The latest addition to my ever growing list of projects on Github is <a href="https://github.com/andygirvan/Blankit" target="_blank">Blankit</a> &#8211; a jQuery plugin for adding target=&#8221;_blank&#8221; to any matching elements. This was done to avoid the issue of creating a long, content heavy, page and having to go through and manually add target=&#8221;_blank&#8221; to each a element. This plugin was also contributed to by <a href="http://twitter.com/spol" target="_blank">Seb Pollard</a>, the technical ninja that he is.</p>
<p>Check it out: <a href="https://github.com/andygirvan/Blankit" target="_blank">on github</a> or <a href="http://andygirvan.com/blankit" target="_blank">try out the demo</a>.</p>
<div class="line"><div></div></div>
<p>The plugin takes 3 options allowing you to customize it to suit your needs; same domain links can be included as can list elements, and previously set target attributes can be overridden.</p>
<h2>How to use</h2>
<div class="box"><div class="icon icon-code left" style="background-image: url(http://andygirvan.com/wp-content/themes/fastblog/images/icons/code.png);"><p>$ ( &#8220;a&#8221; ).blankit( { option: value } );</p></div></div>
<h2>Options</h2>
<div class="box"><div class="icon icon-none left">// Any previously set targets will be overridden with the new _blank value.<br />
override:   (default: false)</p>
<p>// This will include any anchor tags that are in a list (usually menu element).<br />
listitems:  (default: false)</p>
<p>// This will include/exclude the internal links from having blank set as a target property.<br />
samedomain: (default: false)</div></div>
<p>Check it out &amp; tell me your thoughts. Don&#8217;t forget you can also <a href="https://github.com/andygirvan/Blankit" target="_blank">fork it</a> and use it however you want. There is also more information on the plugin at <a href="http://plugins.jquery.com/project/Blankit" target="_blank">plugins.jquery.com</a></p>
<div class="line"><div></div></div>
<p>If you enjoyed this post, why not subscribe to <a href="http://andygirvan.com/feed/">my feed</a> or check me out on <a href="http://twitter.com/andygirvan">Twitter</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Expression Engine: Add Global Variables to Channel Entries</title>
		<link>http://andygirvan.com/2011/05/expression-engine-add-global-variables-to-channel-entries/</link>
		<comments>http://andygirvan.com/2011/05/expression-engine-add-global-variables-to-channel-entries/#comments</comments>
		<pubDate>Tue, 10 May 2011 12:57:48 +0000</pubDate>
		<dc:creator>Andy G</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Expression Engine]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[eeallow]]></category>
		<category><![CDATA[expression engine]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=456</guid>
		<description><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p>In Expression Engine, global variables can be used at template level for many uses. In one of my latest projects, I needed to pass through a specific global variable, but instead of placing the tag in the template, I needed to put it directly into my channel entry. Here's how I achieved it...
]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p><p>In <a href="http://expressionengine.com/">Expression Engine</a>, global variables can be used at template level for many uses. In one of my latest projects, I needed to pass through a specific global variable, but instead of placing the tag in the template I needed to put it directly into my channel entry. Unfortunately, <a href="/category/development/expression-engine/">EE2.0</a> does not natively support this feature.</p>
<p>The first thing you&#8217;ll need to do is install the amazing <a href="http://expressionengine.com/downloads/details/allow_ee_code/" target="_blank">Allow EE Code</a> plugin. This plugin does 90% of the work required and allows you to put <a href="/category/development/expression-engine/">Expression Engine</a> tags within a Channel Entry. To make this work, activate the plugin and go to the location in your template where the entry will be output. Wrap whatever you want to be allowed to write EE tags in the following:</p>
<div class="box"><div class="icon icon-code left" style="background-image: url(http://andygirvan.com/wp-content/themes/fastblog/images/icons/code.png);">{exp:allow_eecode}<br />
{body}<br />
{/exp:allow_eecode}</div></div>
<p>This will allow you to then place, and successfully output, <a href="/category/development/expression-engine/">Expression Engine</a> tags within your entry. The problem is, if you want to be able to render your global variables in the entry it will not work.</p>
<div class="box"><div class="icon icon-none left">This in an entry <strong>will</strong> work:<br />
{exp:channel:entries}{title}{/exp:channel:entries}</p>
<p>This in an entry <strong>won&#8217;t</strong> work:<br />
{global_var}</div></div>
<p>To be able to pass through global variables, we need to tell the plugin to string replace the global vars with their correct contents. To do this, open up the <a href="http://expressionengine.com/downloads/details/allow_ee_code">EEAllow </a>plugin file:</p>
<div class="box"><div class="icon icon-none left">/system/expressionengine/third_party/allow_eecode/pi.allow_eecode.php</div></div>
<p>and just before the function &#8220;Allow_eecode&#8221; ends, put the following:</p>
<div class="box"><div class="icon icon-code left" style="background-image: url(http://andygirvan.com/wp-content/themes/fastblog/images/icons/code.png);">// Checks to see if there are any global variables set.<br />
if(count($GLOBALS['assign_to_config']['global_vars']) &gt; 0)<br />
{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Loops through each global variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;foreach($GLOBALS['assign_to_config']['global_vars'] as $gkey =&gt; $gvar)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Creates a variable with the name of the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// global variable wrapped in curly brackets}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$gtag = &#8220;{&#8221; . $gkey . &#8220;}&#8221;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// String replaces any found global variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// tags in the content with the value of the global variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$str = str_replace($gtag,$gvar,$str);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p>// Put the above code before this<br />
$this-&gt;return_data = $str;</div></div>
<p>Voilá! This will now correctly output the global variable wherever you want your content to be shown.</p>
<p>Thanks to <a href="http://twitter.com/spol">@spol</a> for helping me figure this one out, saving me endless hours of banging my head on the desk.</p>
<div class="line"><div></div></div>
<p>If you enjoyed this post, why not subscribe to <a href="http://andygirvan.com/feed/">my feed</a> or check me out on <a href="http://twitter.com/andygirvan">Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/05/expression-engine-add-global-variables-to-channel-entries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>6 jQuery plugins that are a little bit different</title>
		<link>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/</link>
		<comments>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 13:47:13 +0000</pubDate>
		<dc:creator>Andy G</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript/jQuery]]></category>
		<category><![CDATA[face detection]]></category>
		<category><![CDATA[google map]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jmapping]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=233</guid>
		<description><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p>To prove to myself that there was more to jQuery than content scrollers, I did some Google'ing and found 6 really unique jQuery plugins/extensions that are worth taking a look at.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://andygirvan.com/tumblog/articles/">Articles</a></p><p>When looking for a jQuery plugin, it can often get a bit tedious scrolling through page after page of scrollers, carousels and crop tools. At one point I ran into an article named &#8220;28 Useful JQuery Sliders You Need To Download&#8221;. Twenty-eight?! Blimey.</p>
<p>So, to prove to myself that there was more to jQuery than content scrollers, I did some Google&#8217;ing and found 6 really unique jQuery plugins/extensions that are worth taking a look at.</p>
<h3>6 &#8211; Face Detection (<a href="http://facedetection.jaysalvat.com/" target="_blank">http://facedetection.jaysalvat.com/</a>)</h3>
<p style="text-align: center;"><a href="http://facedetection.jaysalvat.com"><img class="aligncenter size-full wp-image-249" title="face-detection" src="http://andygirvan.com/wp-content/uploads/2011/01/face-detection1.jpg" alt="" width="490" height="134" /></a></p>
<p>Brilliant jQuery tool for scanning pictures for faces and returning the locations. Fantastic when applied with a user membership or avatar system, allowing you to extend or improve your cropping tool.</p>
<h3>5 &#8211; jMapping (<a href="http://vigetlabs.github.com/jmapping/" target="_blank">http://vigetlabs.github.com/jmapping/</a>)</h3>
<p style="text-align: center;"><a href="http://vigetlabs.github.com/jmapping/"><img class="aligncenter size-full wp-image-253" title="jmapping" src="http://andygirvan.com/wp-content/uploads/2011/01/jmapping.jpg" alt="" width="490" height="134" /></a></p>
<p>jQuery extension for easily adding Google Maps to any page with extensive customisation options. Also very good at degrading gracefully. If you&#8217;re rolling out a store locator this could be a better alternative than using any WordPress plugins which are somewhat limited without hacking.</p>
<h3>4 &#8211; JSZip (<a href="http://jszip.stuartk.co.uk/" target="_blank">http://jszip.stuartk.co.uk/</a>)</h3>
<p>Nothing ground breaking here, just a useful library allowing you to compress and zip up files for download using the jQuery framework.</p>
<h3>3 &#8211; Colortip (<a href="http://bit.ly/9o5QS5" target="_blank">http://bit.ly/9o5QS5</a>)</h3>
<p style="text-align: center;"><a href="http://bit.ly/9o5QS5"><img class="aligncenter size-full wp-image-254" title="color-tip" src="http://andygirvan.com/wp-content/uploads/2011/01/color-tip.jpg" alt="" width="420" height="113" /></a></p>
<p>Tool tips are a fantastic tool for adding usability to a site, which may perhaps be confusing without.</p>
<h3>2 &#8211; Fancy Sliding Form (<a href="http://bit.ly/bnkYUG" target="_blank">http://bit.ly/bnkYUG</a>)</h3>
<p style="text-align: center;"><a href="http://bit.ly/bnkYUG"><img class="aligncenter size-full wp-image-255" title="fancy-sliding" src="http://andygirvan.com/wp-content/uploads/2011/01/fancy-sliding.jpg" alt="" width="521" height="146" /></a></p>
<p>Any library that makes it easier to deal with complex forms is worth the time to look. This makes it a lot simpler to create a tidy, one page form.</p>
<h3>1 &#8211; Lettering (<a href="http://letteringjs.com/" target="_blank">http://letteringjs.com/</a>)</h3>
<p style="text-align: center;"><a href="http://letteringjs.com/"><img class="aligncenter size-full wp-image-256" title="letterings" src="http://andygirvan.com/wp-content/uploads/2011/01/letterings.jpg" alt="" width="514" height="156" /></a></p>
<p>If you&#8217;re sick of seeing the same old Tahoma &amp; Arial&#8217;s throughout the web, then this might be the plug-in for you. Taking the idea of custom fonts with CSS, this library offers down to the letter control over your typography and some of the examples on <a href="http://letteringjs.com/" target="_blank">their site</a> are breathtaking.</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding custom post types to WordPress 3</title>
		<link>http://andygirvan.com/2010/07/adding-custom-post-types-to-wordpress-3/</link>
		<comments>http://andygirvan.com/2010/07/adding-custom-post-types-to-wordpress-3/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 12:47:22 +0000</pubDate>
		<dc:creator>Andy G</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=69</guid>
		<description><![CDATA[<p>Posted in <a href="http://andygirvan.com/category/development/" title="Development">Development</a><a href="http://andygirvan.com/category/tips/" title="Tips">Tips</a><a href="http://andygirvan.com/category/development/wordpress-development/" title="Wordpress">Wordpress</a></p>Last night WordPress 3.0 was released to the general public. Having previewed it previously on this blog, nothing has really surprised me in terms of what has been updated – but it is still nice to go from release candidate to full version.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://andygirvan.com/category/development/" title="Development">Development</a><a href="http://andygirvan.com/category/tips/" title="Tips">Tips</a><a href="http://andygirvan.com/category/development/wordpress-development/" title="Wordpress">Wordpress</a></p><p>In the latest version of the WordPress blogging platform, the developers have (<em>finally</em>) introduced <strong>Custom Post Types</strong>, allowing it to become more of a CMS without extensive use of plugins. Unfortunately, after installing the latest version, you&#8217;ll probably have noticed that there doesn&#8217;t immediatly appear to be any way to create your own. That&#8217;s because there is no UI to do this with &#8211; <em>doh</em>. The way to do this is to use the recently introducded method <strong>register_post_type().</strong><br />
</p>
<h2>The Example</h2>
<p>Lets say you are running a blog that will have podcasts as a content type every so often, but you don&#8217;t require a heavyweight plugin like <a href="http://wordpress.org/extend/plugins/podpress/" target="_blank">PodPress</a> &#8211; <strong>Custom Post Types </strong>are the perfect solution.<br />
</p>
<h2>The Code</h2>
<p>Take a look at the following code:<br />
<div class="box"><div class="icon icon-code left" style="background-image: url(http://andygirvan.com/wp-content/themes/fastblog/images/icons/code.png);">register_post_type(&#8216;podcast&#8217;, array(<br />
        &#8216;label&#8217; =&gt; __(&#8216;Podcasts&#8217;),<br />
        &#8216;singular_label&#8217; =&gt; __(&#8216;Podcast&#8217;),<br />
        &#8216;public&#8217; =&gt; true,<br />
        &#8216;show_ui&#8217; =&gt; true,<br />
        &#8216;hierarchical&#8217; =&gt; false,<br />
        &#8216;query_var&#8217; =&gt; false,<br />
        &#8216;supports&#8217; =&gt; array(&#8216;title&#8217;, &#8216;editor&#8217;, &#8216;author&#8217;)<br />
));</div></div><br />
Whack that straight in your theme&#8217;s <strong>functions.php </strong>file and voila &#8211; you&#8217;ll see the new Podcast custom post type right there listed underneath the Comments button. So what did this code do exactly?<br />
</p>
<h2>The Parameters</h2>
<p>As you can see, all we&#8217;re really doing is calling the new <strong>register_post_type()</strong> method and sending through some parameters:</p>
<ul>
<li><strong>Label </strong>is pretty straight forward, what do you want the custom post type to be displayed.</li>
<li><strong>Singular label </strong>is also intuitive, what do you call ONE of your post types.</li>
<li><strong>Public </strong>is a meta argument to determine whether your post type will be accessible via search, menu&#8217;s etc&#8230; (more about this on <a href="http://codex.wordpress.org/Function_Reference/register_post_type" target="_blank">wordpress docs</a>)</li>
<li><strong>Show UI </strong>- set to true to show the custom post type on the back end. False can be set to allow extra content to determine how the custom post type is displayed in the back end.</li>
<li><strong>Hierarchical </strong>is a parameter to determine whether each custom post can have or be a parent of another.</li>
<li><strong>Supports </strong>allows you to determine what content creation fields are used when creating or editing a custom post:
<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  post-thumbnails)</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; (template and menu order) (hierarchical must  be true)</li>
</ul>
</li>
</ul>
<p></p>
<h2>The Results</h2>
<p>Shown below: the new &#8220;Podcasts&#8221; custom post type. Now start filling that bad boy with some content!</p>
<p><a href="http://andygirvan.com/wp-content/uploads/2010/07/result.jpg"><img class="alignnone size-full wp-image-70" title="result" src="http://andygirvan.com/wp-content/uploads/2010/07/result.jpg" alt="" width="250" height="145" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2010/07/adding-custom-post-types-to-wordpress-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

