<?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>Dave Blencowe</title>
	<atom:link href="http://www.daveblencowe.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daveblencowe.com</link>
	<description>Freelance Web Applications Developer</description>
	<lastBuildDate>Fri, 06 Jan 2012 13:58:03 +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>Social Media Icons from ElegantThemes</title>
		<link>http://www.daveblencowe.com/2012/01/03/social-media-icons-from-elegantthemes/</link>
		<comments>http://www.daveblencowe.com/2012/01/03/social-media-icons-from-elegantthemes/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 06:08:23 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=63</guid>
		<description><![CDATA[Recently I&#8217;ve completed several websites that have required different types of social networking icons for various locations in the site design. I&#8217;ve used this excellent set of icons from ElegantThemes for two main reasons; their top-notch quality and that they&#8217;re supplied with the original PSDs allowing you to resize them, recolour or rearrange them. Download [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve completed several websites that have required different types of social networking icons for various locations in the site design. I&#8217;ve used this excellent set of icons from ElegantThemes for two main reasons; their top-notch quality and that they&#8217;re supplied with the original PSDs allowing you to resize them, recolour or rearrange them. Download and preview after the break!</p>
<p><span id="more-63"></span><a href="http://www.elegantthemes.com/blog/resources/free-social-media-icon-set"><img class="size-full wp-image-64 aligncenter" title="full-set1" src="http://www.daveblencowe.com/wp-content/uploads/2012/01/full-set1.jpg" alt="" width="580" height="687" /></a></p>
<p style="text-align: center;"><a href="http://www.elegantthemes.com/icons/elegantmediaicons.zip">Download Here!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2012/01/03/social-media-icons-from-elegantthemes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codeigniter 2.0: Extending the Controller class</title>
		<link>http://www.daveblencowe.com/2011/11/25/codeigniter-2-0-extending-the-controller-class/</link>
		<comments>http://www.daveblencowe.com/2011/11/25/codeigniter-2-0-extending-the-controller-class/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 15:10:03 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=58</guid>
		<description><![CDATA[Extending Codeigniter core classes is often useful for adding functionality or changing an existing function without altering the frameworks core code. We&#8217;ve already done this once with the router class for search engine friendly URLs and this time we&#8217;ll be doing it with the CI_Controller class so that we can set the referring controller every request [...]]]></description>
			<content:encoded><![CDATA[<p>Extending Codeigniter core classes is often useful for adding functionality or changing an existing function without altering the frameworks core code. We&#8217;ve already done this once with the <a href="http://www.daveblencowe.com/2011/07/03/using-hyphens-instead-of-underscores-in-codeigniter/">router class</a> for search engine friendly URLs and this time we&#8217;ll be doing it with the CI_Controller class so that we can set the referring controller every request although you could do anything here. E.g setting a userdata variable.</p>
<p>The first step is to create a file called MY_Controller.php in the application/core/ folder. Remember that capitalization is important. The file should contain the following code:<span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px; white-space: pre;"> </span></p>
<pre>&lt;?php
class MY_Controller extends CI_Controller {

	function __construct ()
	{
		parent::__construct();
		$this-&gt;session-&gt;set_flashdata('referrer', uri_string());
	}

}</pre>
<p>The above code stores the method and class plus any other segments in a flashdata variable called referrer.</p>
<p>In order to use any code you put in your MY_Controller class you need to make sure your controllers extend MY_Controller instead of CI_Controller (See the example below). The code will be ran and you can access it in the normal way.</p>
<p>Example Controller &#8211; Default welcome.php:<span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px; white-space: pre;"> </span></p>
<pre>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends MY_Controller {

	public function index()
	{
		echo "Referrer: ".$this-&gt;session-&gt;flashdata('referrer');
		echo anchor(uri_string(), 'clicky');
		$this-&gt;load-&gt;view('welcome_message');
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2011/11/25/codeigniter-2-0-extending-the-controller-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freelance consulting position</title>
		<link>http://www.daveblencowe.com/2011/08/15/freelance-consulting-position/</link>
		<comments>http://www.daveblencowe.com/2011/08/15/freelance-consulting-position/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 13:48:00 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Clients]]></category>
		<category><![CDATA[Freelance]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=67</guid>
		<description><![CDATA[I&#8217;ve just spent the last 3 months working with well known Uk based digital media agency Cyber-duck (http://www.cyber-duck.co.uk). The team there were great to work with, I learnt a few new techniques and met some great people! Many thanks for the oppertunity and I look forward to working with you in the future!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent the last 3 months working with well known Uk based digital media agency Cyber-duck (http://www.cyber-duck.co.uk). The team there were great to work with, I learnt a few new techniques and met some great people!</p>
<p>Many thanks for the oppertunity and I look forward to working with you in the future!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2011/08/15/freelance-consulting-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get OS X Lion Free!</title>
		<link>http://www.daveblencowe.com/2011/07/15/get-os-x-lion-free/</link>
		<comments>http://www.daveblencowe.com/2011/07/15/get-os-x-lion-free/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:37:03 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Off-Topic]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=49</guid>
		<description><![CDATA[Did you buy your new Mac on or after the 6th June 2011? Well guess what, you can get Apples OSX Lion as a free upgrade for your machine. OS X Lion Up-to-Date Programme. OS X Lion is coming this month, but you don&#8217;t have to wait until then to get your new Mac. The [...]]]></description>
			<content:encoded><![CDATA[<p>Did you buy your new Mac on or after the 6th June 2011? Well guess what, you can get Apples OSX Lion as a free upgrade for your machine.</p>
<blockquote><p><strong>OS X Lion Up-to-Date Programme.</strong> OS X Lion is coming this month, but you don&#8217;t have to wait until then to get your new Mac. The OS X Lion Up-to-Date upgrade will be available at no additional charge via the Mac App Store to all customers who purchased a qualifying new Mac system from Apple or an Apple Authorised Reseller on or after 6 June 2011.</p></blockquote>
<p>You can read more about this promotion on the apple website <a href="http://www.apple.com/uk/macosx/uptodate/?cid=AOS-EMEA-BTS11-CRM2-Student-SubjectB&amp;cp=em-P0010594-174401&amp;sr=em&amp;Email_PageName=P0010594-174401&amp;Email_OID=61160bf8d4c3d446863d7dc5f0ede69a" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2011/07/15/get-os-x-lion-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using hyphens instead of underscores in CodeIgniter</title>
		<link>http://www.daveblencowe.com/2011/07/03/using-hyphens-instead-of-underscores-in-codeigniter/</link>
		<comments>http://www.daveblencowe.com/2011/07/03/using-hyphens-instead-of-underscores-in-codeigniter/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 21:27:44 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=43</guid>
		<description><![CDATA[When I’m building a CodeIgniter application there are several important things that I need to think about whilst putting the whole project together. Two of these things are Accessibility and Search Engine Optimisation (SEO) and in particular for this article the URLs I use to link it all together. First, let’s take a look at [...]]]></description>
			<content:encoded><![CDATA[<p>When I’m building a CodeIgniter application there are several important things that I need to think about whilst putting the whole project together. Two of these things are Accessibility and Search Engine Optimisation (SEO) and in particular for this article the URLs I use to link it all together.</p>
<p><span id="more-43"></span><br />
First, let’s take a look at a standard CodeIgniter URL.</p>
<blockquote><p>http://www.example.com/example/hello_world</p></blockquote>
<p>The first segment (example) normally refers to the controller that you are accessing. The second segment (hello_world) refers to the function in that controller that you want to execute in order to build the content that will be displayed. As you can see here our function is called hello_world() and uses an underscore to separate two words within the name. In terms of SEO and accessibility it is often better to use a hyphen (-) instead of an underscore (_) within an URL and one key reason for using the latter is that many applications and Search Engine Spiders such as Google interpret hyphens as spaces whilst underscores are often left as they are.</p>
<p>Using Codeigniter it is possible to convert the underscores in function names in to hyphens for URLs so that http://www.example.com/example/hello-world actually calls the function hello_world within our example controller. In order to do this you need to extend and alter the Codeigniter core Router class so that it’ll replace the hyphens within the URL with underscores during runtime. In order to achieve this you can use the code below.</p>
<p>Step 1. Create a custom Router file in ./application/core/ called MY_Router.php. If the core folder does not exist in your installation then create it.</p>
<p>Step 2. Insert the following code in to the file, save it and you’re done!</p>
<pre><code>&lt;?php
class MY_Router extends CI_Router {

	function _set_request ($seg = array())
	{
		// The str_replace() below goes through all our segments
		// and replaces the hyphens with underscores making it
		// possible to use hyphens in controllers, folder names and
		// function names
		parent::_set_request(str_replace(‘-‘, ‘_’, $seg));
	}

}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2011/07/03/using-hyphens-instead-of-underscores-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coda and SVN repositories: Invalid Server Certificate</title>
		<link>http://www.daveblencowe.com/2011/05/31/coda-and-svn-repositories-invalid-server-certificate/</link>
		<comments>http://www.daveblencowe.com/2011/05/31/coda-and-svn-repositories-invalid-server-certificate/#comments</comments>
		<pubDate>Tue, 31 May 2011 23:06:50 +0000</pubDate>
		<dc:creator>dblencowe</dc:creator>
				<category><![CDATA[Off-Topic]]></category>

		<guid isPermaLink="false">http://www.daveblencowe.com/?p=21</guid>
		<description><![CDATA[With Coda version 1.5.1 there is no way of managing svn certificates, and when you try to add a repository for a site that has a self signed SSL certificate you will just get an alert with the error “Server certificate verification failed: issuer is not trusted”. One solution is to accept the certificate using svn through [...]]]></description>
			<content:encoded><![CDATA[<p>With Coda version 1.5.1 there is no way of managing svn certificates, and when you try to add a repository for a site that has a self signed SSL certificate you will just get an alert with the error “Server certificate verification failed: issuer is not trusted”. One solution is to accept the certificate using svn through the command line, if you&#8217;re new to svn here’s how to do it:</p>
<p>1. If you haven’t already, <a href="http://homepage.mac.com/martinott/Subversion-1.4.4.pkg.zip">install svn for mac</a></p>
<p>2. In a Terminal type svn list and the url of your SVN repository as below</p>
<pre>svn list <a href="https://www.example.com/svn/">https://www.example.com/svn/</a></pre>
<p>Type p to confirm and the certification will be cached.</p>
<p>Voila! You should now be able to connect to your SVN repository. For some reason although I accepted the certificate &#8220;permanently&#8221; I had to redo this fix every so often.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daveblencowe.com/2011/05/31/coda-and-svn-repositories-invalid-server-certificate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

