<?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"
	>

<channel>
	<title>Andrew Goodricke</title>
	<atom:link href="http://www.andrewgoodricke.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andrewgoodricke.com</link>
	<description>More than meets the eye...</description>
	<pubDate>Sun, 07 Dec 2008 16:13:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>php date add alternative to date_add</title>
		<link>http://www.andrewgoodricke.com/2008/12/php-date-add-alternative-to-date_add/</link>
		<comments>http://www.andrewgoodricke.com/2008/12/php-date-add-alternative-to-date_add/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 16:13:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[php]]></category>

		<category><![CDATA[date_add]]></category>

		<category><![CDATA[strtotime]]></category>

		<guid isPermaLink="false">http://www.andrewgoodricke.com/?p=11</guid>
		<description><![CDATA[date_add is an experimental function, best to use strtotime:
$new_date = strtotime("+1 week", strtotime('05-Dec-2008'));
echo date('d M Y', $new_date)
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s one for you Sukie&#8230;</p>
<p>The php function <span class="methodname"><strong><strong>date_add</strong></strong></span> ( <span class="methodparam"><span class="type"><span class="type DateTime">DateTime</span></span> <tt class="parameter">$object</tt></span> , <span class="methodparam"><span class="type"><span class="type DateInterval">DateInterval</span></span> <tt class="parameter">$interval</tt></span> ) is an experimental function and shouldn&#8217;t really be used in a production site.  The way to get around this is to use <span class="methodname"><strong><strong>strtotime</strong></strong></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$time</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$now</tt></span> ] ).</p>
<p>If you&#8217;re trying to add a week to today&#8217;s date you can simply do the following:<br />
<code>$new_date = strtotime("+1 week");</code></p>
<p>but if need to add a week to a time stamp of your own you can do:<br />
<code>$my_date = strtotime('05-Dec-2008');<br />
$new_date = strtotime("+1 week", $my_date);</code></p>
<p>Note: The second parameter needs to be a valid date, when I&#8217;m getting data from a database I will usually get the date in to a dd-mmm-yyyy format as this explicitly defines the date.  If it were written &#8216;05-12-2008&#8242; it potentially could be interpreted as &#8216;12-May-2008&#8242; which could then cause other issues to your data further down the line.</p>
<p>You could condense the code to be one line:<br />
<code>$new_date = strtotime("+1 week", strtotime('05-Dec-2008'));</code></p>
<p>For outputting the $new_date I&#8217;d use php&#8217;s <span class="methodname"><strong><strong>date</strong></strong></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$format</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$timestamp</tt></span> ] ) function:<br />
<code>$new_date = strtotime("+1 week", strtotime('05-Dec-2008'));<br />
echo date('d M Y', $new_date)</code></p>
<p> </p>
<p>Have a look at <a href="http://uk.php.net/manual/en/function.strtotime.php" title="PHP strtodate function" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/uk.php.net');">php&#8217;s strtodate function</a> and <a href="http://uk2.php.net/date" title="PHP date function" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/uk2.php.net');">php&#8217;s date function</a> for information on how to use.</p>
<p>  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewgoodricke.com/2008/12/php-date-add-alternative-to-date_add/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Photography at Wembury</title>
		<link>http://www.andrewgoodricke.com/2008/09/photography-at-wembury/</link>
		<comments>http://www.andrewgoodricke.com/2008/09/photography-at-wembury/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 22:12:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Canon 400D]]></category>

		<guid isPermaLink="false">http://www.andrewgoodricke.com/?p=9</guid>
		<description><![CDATA[Over the weekend I took some friends to Wembury as they were down visiting, I&#8217;d not been before but I&#8217;d heard it was a nice spot so gave me a great oportunity to head over there to have a look around.  Here&#8217;s a selection of the pictures I took using a Canon 400D, Sigma 17-70mm [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend I took some friends to Wembury as they were down visiting, I&#8217;d not been before but I&#8217;d heard it was a nice spot so gave me a great oportunity to head over there to have a look around.  Here&#8217;s a selection of the pictures I took using a Canon 400D, Sigma 17-70mm and a Gorrila-pod (a great piece of kit) where required.</p><div class="ngg-galleryoverview" id="ngg-gallery-1"><div class="slideshowlink"><a class="slideshowlink" href="/feed/?show=slide">[Show as slideshow]</a></div><div id="ngg-image-1" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4363.jpg" title="" class="thickbox" rel="wembury" ><img title="Overlooking Wembury" alt="Overlooking Wembury" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4363.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-2" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4367.jpg" title="" class="thickbox" rel="wembury" ><img title="Surf" alt="Surf" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4367.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-3" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4368.jpg" title="" class="thickbox" rel="wembury" ><img title="Rock-pools" alt="Rock-pools" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4368.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-4" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4373.jpg" title="" class="thickbox" rel="wembury" ><img title="Rock-pools" alt="Rock-pools" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4373.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-5" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4386.jpg" title="" class="thickbox" rel="wembury" ><img title="In for the long ride" alt="In for the long ride" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4386.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-6" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4390.jpg" title="" class="thickbox" rel="wembury" ><img title="My wave" alt="My wave" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4390.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-7" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4406.jpg" title="" class="thickbox" rel="wembury" ><img title="Contrast" alt="Contrast" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4406.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
<div id="ngg-image-8" class="ngg-gallery-thumbnail-box ">
	<div class="ngg-gallery-thumbnail"  >
	<a href="http://www.andrewgoodricke.com/wp-content/gallery/wembury/IMG_4419.jpg" title="" class="thickbox" rel="wembury" ><img title="Draining rocks" alt="Draining rocks" src="http://www.andrewgoodricke.com/wp-content/gallery/wembury/thumbs/thumbs_IMG_4419.jpg" style="width:200px; height:100px;" /></a>
</div>
</div>
</div>
<div class='ngg-clear'></div>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewgoodricke.com/2008/09/photography-at-wembury/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ajax Loading Animated gif</title>
		<link>http://www.andrewgoodricke.com/2008/08/ajax-loading-animated-gif/</link>
		<comments>http://www.andrewgoodricke.com/2008/08/ajax-loading-animated-gif/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 21:01:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[generator]]></category>

		<category><![CDATA[gif]]></category>

		<category><![CDATA[references]]></category>

		<guid isPermaLink="false">http://www.andrewgoodricke.com/?p=7</guid>
		<description><![CDATA[A guide to starting to learn AJAX and tools to use.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with Ajax recently, I&#8217;ve been particularly impressed with how potentially powerful Ajax is.  Having a good knowledge of PHP and HTML myself has helped when it came to learning this amalgamation of technologies.  If you&#8217;re not aware what Ajax is, It stands for Asynchronous JavaScript And XML (eXtensible Markup Language).</p>
<p>A good introduction to it can be found on Harry Maugans in tutorial <a href="http://www.harrymaugans.com/2007/03/18/tutorial-ajax-made-easy/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.harrymaugans.com');">AJAX Made Easy</a>, in addition to that the SAMS Teach Yourself in 10 Minutes have got a great little book on Ajax which explains it all really well from beginner to intermediate.</p>
<p>Back to the point in hand, I wanted an animated gif to display while I was collecting data from the server.  That is precisely what I got when I came upon the <a href="http://www.ajaxload.info/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ajaxload.info');">Ajax Loading gif Generator</a>.  You can customise the gifs produced from the type of animation to the fore and background colours - A great little tool!</p>
<p><a href="http://www.andrewgoodricke.com/wp-content/uploads/2008/09/ajax-loader.gif"><img class="alignnone size-medium wp-image-8" title="ajax-loader" src="http://www.andrewgoodricke.com/wp-content/uploads/2008/09/ajax-loader.gif" alt="" width="16" height="16" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewgoodricke.com/2008/08/ajax-loading-animated-gif/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Code Igniter mod_rewrite on Heart Internet</title>
		<link>http://www.andrewgoodricke.com/2008/07/code-igniter-mod_rewrite-on-heart-internet/</link>
		<comments>http://www.andrewgoodricke.com/2008/07/code-igniter-mod_rewrite-on-heart-internet/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 20:07:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Code Igniter]]></category>

		<category><![CDATA[.htaccess]]></category>

		<category><![CDATA[Heart Internet]]></category>

		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.andrewgoodricke.com/?p=6</guid>
		<description><![CDATA[Mod_rewrite to remove index.php from the url, the issues and resolutions I've come accross.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used mod_rewrite quite a lot with Code Igniter and I&#8217;ve experienced issues getting it working to remove the index.php from the url on different servers before but this was another issue again.  Here&#8217;s my resolution and some of my previous resolutions:</p>
<p>Here&#8217;s the contents of the <em>.htaccess</em> for <strong>Heart Internet</strong> to <strong>remove index.php</strong>:<br />
<code><br />
RewriteEngine On<br />
RewriteCond $1 !^(index\.php|css|img|js|robots\.txt) [NC]<br />
RewriteRule ^(.+)$ index.php?/$1 [L]</code></p>
<p>SetEnv DEFAULT_PHP_VERSION 5</p>
<p>The <strong>SetEnv DEFAULT_PHP_VERSION 5</strong> tells Heart to use PHP 5.</p>
<p>If you have any directories or specific files (like robots.txt) you need to access for css, JavaScript etc, they will need to be put them in the RewriteCond separated by a pipe (|).</p>
<p>In addition, I prefer working with short open tags for writing PHP.  You need a file called <em>php5.ini</em> containing:<br />
<code><br />
short_open_tag = On<br />
</code></p>
<p>For my <strong>XAMPP</strong> development I use the following code in my <em>.htaccess</em>:<br />
<code><br />
RewriteEngine on<br />
RewriteCond $1 !^(index\.php|css|img|js) [NC]<br />
RewriteRule ^(.*)$ /index.php/$1 [L]<br />
</code></p>
<p>For other servers I&#8217;ve needed the following:<br />
<code><br />
Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond $1 !^(index\.php|css|img|js|robots\.txt) [NC]<br />
RewriteRule ^(.*)$ index.php/$1 [L]<br />
</code></p>
<p>The subtle differences (that make a huge difference between it working and not working) that may have not been noticed are all located around <strong>/index.php?/$1</strong>.</p>
<p>I hope this of some use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewgoodricke.com/2008/07/code-igniter-mod_rewrite-on-heart-internet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TinyMCE CMS WYSIWYG JavaScript Plugin</title>
		<link>http://www.andrewgoodricke.com/2008/07/tinymce-cms-wysiwyg-javascript-plugin/</link>
		<comments>http://www.andrewgoodricke.com/2008/07/tinymce-cms-wysiwyg-javascript-plugin/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 18:10:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[BBCode]]></category>

		<category><![CDATA[CMS]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Plugin]]></category>

		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://www.andrewgoodricke.com/?p=5</guid>
		<description><![CDATA[This is a great (and powerful) JavaScript that you can plug in to your site for CMS purposes to make HTML or BBCode easily edited - well that's what I use it for. TinyMCE is a super customisable WYSIWYG (What You See Is What You Get) that ranges from being very basic (for my purposes) to very advanced, you can even skin it if you so desire.]]></description>
			<content:encoded><![CDATA[<p>This is a great (and powerful) JavaScript that you can plug in to your site for CMS purposes to make HTML or BBCode easily edited - well that&#8217;s what I use it for.  <a href="http://tinymce.moxiecode.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/tinymce.moxiecode.com');">TinyMCE</a> is a super customisable WYSIWYG (What You See Is What You Get) that ranges from being very basic (for my purposes) to very advanced, you can even skin it if you so desire.</p>
<p>It&#8217;s extremly easy to integrate in to your site and is widely used in various applications such as: Wordpress, PHP-Nuke, Joomla and Expression Engine to name a few.  A full list can be found <a href="http://wiki.moxiecode.com/index.php/TinyMCE:CMS_systems" onclick="javascript:pageTracker._trackPageview ('/outbound/wiki.moxiecode.com');">here</a>.</p>
<p>Just download it from the <a href="http://tinymce.moxiecode.com/download.php" onclick="javascript:pageTracker._trackPageview ('/outbound/tinymce.moxiecode.com');">TinyMCE download</a> page.  Copy the <em>jscripts</em> folder to the root of your htdocs directory.</p>
<p>Then put the following code in between your page  tags:</p>
<p>Simple Editor:<br />
<code>&lt;script src="../jscripts/tiny_mce/tiny_mce.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;&lt;!--<br />
tinyMCE.init({<br />
mode : "textareas",<br />
theme : "simple"<br />
});<br />
// --&gt;&lt;/script&gt;<br />
</code></p>
<p>Now for any &lt;textarea&gt; it will be replaced with the TinyMCE editor functions, the code:</p>
<p><code><br />
&lt;textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"&gt;<br />
</code><code>&lt;p&gt;<br />
&lt;img src="media/logo.jpg" alt=" " hspace="5" vspace="5" width="250" height="48" align="right" /&gt; TinyMCE is a platform independent web based Javascript HTML &lt;strong&gt;WYSIWYG&lt;/strong&gt; editor control released as Open Source under LGPL by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other Content Management Systems.&lt;/p&gt;<br />
&lt;p&gt;We recommend &lt;a href="http://www.getfirefox.com" target="_blank"&gt;Firefox&lt;/a&gt; and &lt;a href="http://www.google.com" target="_blank"&gt;Google&lt;/a&gt;<br />
&lt;/p&gt;<br />
&lt;/textarea&gt;<br />
</code></p>
<p>Would be displayed like:<br />
<img class="alignnone" src="http://www.andrewgoodricke.com/wp-content/uploads/TinyMCE_simple.jpg" alt="TinyMCE Simple screen shot" /></p>
<p>The fully featured is extremely comprehensive and looks like:<br />
<img class="alignnone" src="http://www.andrewgoodricke.com/wp-content/uploads/TinyMCE_full.jpg" alt="TinyMCE Full Features Screen Shot" /></p>
<p>In my application I replaced the &#8220;../&#8221; for the JavaScript location to a global variable that returns the base path for my site rather than it being a relative path.</p>
<p>I also customised my copy to to only show the buttons I required and I had the button bar at the top, the great thing about this plugin is that you can get it to automatically produce BBCode which is useful if you&#8217;ve got a user facing platform.</p>
<p>To find out about how to customise TinyMCE check <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration" onclick="javascript:pageTracker._trackPageview ('/outbound/wiki.moxiecode.com');">this</a> out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewgoodricke.com/2008/07/tinymce-cms-wysiwyg-javascript-plugin/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
