<?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>Photogabble &#187; wordpress</title>
	<atom:link href="http://photogabble.co.uk/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://photogabble.co.uk</link>
	<description>photoblog of simon dann</description>
	<lastBuildDate>Mon, 23 Apr 2012 18:35:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Weird Coding</title>
		<link>http://photogabble.co.uk/asides/weird-coding.html</link>
		<comments>http://photogabble.co.uk/asides/weird-coding.html#comments</comments>
		<pubDate>Wed, 23 Sep 2009 22:43:56 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/2009/09/23/weird-coding/</guid>
		<description><![CDATA[WordPress is displaying some very weird behaviours&#8230;]]></description>
			<content:encoded><![CDATA[<p>WordPress is displaying some very weird behaviours&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/asides/weird-coding.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Sitemaps Plugin</title>
		<link>http://photogabble.co.uk/asides/google-sitemaps-plugin.html</link>
		<comments>http://photogabble.co.uk/asides/google-sitemaps-plugin.html#comments</comments>
		<pubDate>Mon, 07 Sep 2009 10:03:55 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server crash]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=2624</guid>
		<description><![CDATA[I just updated to the latest version of google sitemaps [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated to the latest version of <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">google sitemaps generator</a> plugin for wordpress and it crashed my mysql server with 100 100 100 load!!</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/asides/google-sitemaps-plugin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to cut down wordpress memory usage.</title>
		<link>http://photogabble.co.uk/php/how-to-cut-down-wordpress-memory-usage.html</link>
		<comments>http://photogabble.co.uk/php/how-to-cut-down-wordpress-memory-usage.html#comments</comments>
		<pubDate>Tue, 11 Aug 2009 15:35:34 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[memory use]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=2336</guid>
		<description><![CDATA[Photogabble is similar to many other websites in that it [...]]]></description>
			<content:encoded><![CDATA[<p>Photogabble is similar to many other websites in that it is managed via an installation of word-press; word-press by and large is a very good blogging platform, indeed I would say it is one of &#8211; if not &#8211; <em>thee</em> best blogging platform available today quite simply for its simplicity, its script-ability and ease of designing for. However there is one draw back, as with everything around us, wordpress is not perfect; indeed the average install alongside its additional plug-ins and add-ons seems to consume copious amounts of system memory which is <strong>bad</strong>! While I am lucky to have built my server from scratch it still has limitations the most important of which being memory, a whole 2GB of it.</p>
<p>Up until I completed the following quick fix, wordpress was using almost 30MB per instance, this means that I could only at peak have 66 or so visitors at the same time before my server became overrun and hid under the bed. What I needed to do was supercharge php and the easiest way to do that is by caching. Thanks to <a href="http://itst.net/654-php-on-fire-three-opcode-caches-compared">this interesting article</a> on php caching by itst.net I chose <a href="http://pecl.php.net/package/APC">APC </a>(Alternative PHP Cache) which is supported by the php foundation and showed the most promising speed improvements.</p>
<p>Installing APC really couldn&#8217;t have been made any easier on debian; it does require some dependencies, obviously php 5.x plus the pear package installed but apart from that not much else is needed to be installed and it you use apt-get they are installed as part of the installation process. The instillation process is as simple as follows:<br />
<code>
<pre>apt-get install php-apc
<br/>
/etc/init.d/apache2 restart</pre>
<p></code><br />
Once APC has been installed and apache restarted you can issue the following command to ensure that it has installed correctly:</p>
<pre><code>php -r 'phpinfo();' | grep apc</code></pre>
<p>Once that has been done and you get a positive response to the above command you should see that wordpress is using considerably less memory. My install with its 16 or so plugins now uses 3.16MB rather than almost 30MB! That is what you call a good improvement.</p>
<p>One draw back with apc as with many caching processes is that it does cause an initial increased draw on the processor while it compiles the php into an performance enhanced executable file and stores it in a ram disk however once this intial process it done you can stand to see upto 200% increase in performance and a severely reduced memory footprint for each of your php apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/php/how-to-cut-down-wordpress-memory-usage.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Search Unleashed Drafts Bug.</title>
		<link>http://photogabble.co.uk/php/search-unleashed-drafts-bug.html</link>
		<comments>http://photogabble.co.uk/php/search-unleashed-drafts-bug.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:45:47 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=2118</guid>
		<description><![CDATA[I have recently installed a new search plugin for wordpress [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently installed a new search plugin for wordpress called <a href="http://urbangiraffe.com/plugins/search-unleashed/">Search Unleashed</a>, after experimenting with its use for a clients project I realised a very basic however extremely anoying <a href="http://urbangiraffe.com/tracker/issues/show/661">bug </a>where the search results include all your drafts as well as public posts. I spent a few hours searching through the plugins code before giving up due to its complexity and being away from my desk meant I had no debugging tools at hand to help.</p>
<p>As a quick fix to the problem I have included the following if clause in my search.php template file:</p>
<pre>if ( $post--&gt;post_status == 'publish' ){ ... }</pre>
<p>Its not the best way to fix things, but it works for now and until I get back home next week its the best I can do. I hope this helps other people with similar problem until the plugin developer fixes things.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/php/search-unleashed-drafts-bug.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: get_post_ancestors()</title>
		<link>http://photogabble.co.uk/php/wordpress-get_post_ancestors.html</link>
		<comments>http://photogabble.co.uk/php/wordpress-get_post_ancestors.html#comments</comments>
		<pubDate>Fri, 17 Apr 2009 13:15:43 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=1370</guid>
		<description><![CDATA[In adding a few slight modifications to the photogabble theme [...]]]></description>
			<content:encoded><![CDATA[<p>In adding a few slight modifications to the photogabble theme and because a design I&#8217;m working on for someone else required it; I managed to stumble upon a ridiculously simple solution to a over complected problem, how to find the post parent when the child post is more than one level deep.</p>
<p>I had been using the following code to do this:</p>
<pre>if($post-&gt;post_parent=="11"{ ... }</pre>
<p>While this simple switch works if you are one layer deep for example Fish (ID 11) &gt; Tropical Fish (ID 12) it wont work if your more than two layers deep such as Fish (ID 11) &gt; Tropical Fish (ID 12) &gt; Amazon Fish (ID 13) because $post_post_parent for Amazon Fish becomes 12 not 11. In terms of programming this is all very logical, however the solution to finding out the original post_parent otherwise known as the grandparent or great grandparent is not very well documented and it was only luck that helped me stumble upon it. The very simple function get_post_ancestors() solves this problem by effectively returning an array with every post id related to the one in which it was called as the following example shows:</p>
<pre>$ancestors = get_post_ancestors();</pre>
<p>$ancestors now becomes an array which we can search through the php <a href="http://php.net/in_array">in_array</a> command by the following code:</p>
<pre>in_array(11,$ancestors);</pre>
<p>In this example if one of the $post_id&#8217;s of the current posts ancestors is 11 then the in_array function will return with true, otherwise it will return false. This then makes showing information on all sub pages (child pages) of Fish(ID 11) a simple matter of using the following code:</p>
<pre>$ancestors = get_post_ancestors($post);
if(in_array(11,$ancestors)){
	...
}</pre>
<p>I use this on my <a href="http://photogabble.co.ukprojects/">projects page&#8217;s</a> to provide a link back to the projects page from the sidebar of all its children, it could also be used to show a custom header for that section of your blog or certain links from a link category relevant to that section. The usefulness of this function is never ending and should be one of many you use when writing your own templates.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/php/wordpress-get_post_ancestors.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Morning After Theme.</title>
		<link>http://photogabble.co.uk/asides/the-morning-after-theme.html</link>
		<comments>http://photogabble.co.uk/asides/the-morning-after-theme.html#comments</comments>
		<pubDate>Thu, 05 Mar 2009 23:38:16 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[customisation]]></category>
		<category><![CDATA[Nick Bohle]]></category>
		<category><![CDATA[The Morning After Theme]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=1217</guid>
		<description><![CDATA[I need to remember this link, Nick Bohle has produced [...]]]></description>
			<content:encoded><![CDATA[<p>I need to remember this <a href="http://www.nickbohle.de/tag/the-morning-after/">link</a>, Nick Bohle has produced a lot of helpful tutorials on the <span style="text-decoration: line-through;">theme I have started to use</span>. <strong>Edit: </strong><em>I chose not to use it in the end, I like my own themes better.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/asides/the-morning-after-theme.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A slight redesign.</title>
		<link>http://photogabble.co.uk/asides/a-slight-redesign.html</link>
		<comments>http://photogabble.co.uk/asides/a-slight-redesign.html#comments</comments>
		<pubDate>Thu, 05 Mar 2009 16:12:13 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[photogabble]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=1167</guid>
		<description><![CDATA[The slight in my original posting has turned into a [...]]]></description>
			<content:encoded><![CDATA[<p>The slight in my original posting has turned into a full website redesign, I haven&#8217;t had enough time as of late to produce a brand new website design for photogabble therefore I have chosen to go with one already built and edit it to my own ends.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/asides/a-slight-redesign.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brand New Theme.</title>
		<link>http://photogabble.co.uk/website-update/brand-new-theme.html</link>
		<comments>http://photogabble.co.uk/website-update/brand-new-theme.html#comments</comments>
		<pubDate>Mon, 14 Apr 2008 20:42:03 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Website Update]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=600</guid>
		<description><![CDATA[Right, so this is about a week early, the reason [...]]]></description>
			<content:encoded><![CDATA[<p>Right, so this is about a week early, the reason for which is because I accidentally erased the live copy of photogabble. Instead of keeping just a blank page up for the next seven days I have put off work I should be doing to fix things. I have been working on and off on this new theme for a few weeks now meaning that it has had a lot more work done on it than all my other themes previsouly and each section has had personal touches added. As it wasn&#8217;t supposed to be published until next week at the earliest it is a little rough around the edges, the photography gallery is missing and half the portfolio needs writing up as well as the contact form adding. Other than that it should be all there, I would like some feed back on the new design if you could add comments to this post I would appreciate it <img src='http://photogabble.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>[EDIT]</strong></p>
<p>Right, due to the nature of the backup I used a lot of the database was scrambled, I have just finished running custom scripts to de-scramble it and things should be running smoothly once again.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/website-update/brand-new-theme.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Poivre Piquant WordPress Theme.</title>
		<link>http://photogabble.co.uk/photography/poivre-piquant-wordpress-theme.html</link>
		<comments>http://photogabble.co.uk/photography/poivre-piquant-wordpress-theme.html#comments</comments>
		<pubDate>Fri, 11 Apr 2008 13:10:05 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=17</guid>
		<description><![CDATA[White Pepper, Milk, Licorice Root, White Sugar and Honey with [...]]]></description>
			<content:encoded><![CDATA[<p>White Pepper, Milk, Licorice Root, White Sugar and Honey with a touch of Go To Sleep and something that looks like chocolate. While this may sound like some bezar shopping list. It is, in fact the colour scheme for my new website theme here at photogabble.</p>
<p>I had begun to get bored with the last one a while ago, however I have been so busy that I haven&#8217;t had time to really work on this website. Those who visit here regularly may notice that I will do  redesign and publish it when it is only half baked. That is why a lot of static content is missing from the projects, photography, portfolio and colophon, I simply ran out of time and published it with the mindset of finishing it when I got round to it.</p>
<p>Well as I never really got round to fixing the old theme I have decided to make a new one, you may have already noticed that it is similar to a few well known websites and you would be right in thinking so. To quell any fears, I haven&#8217;t plagerised them byte by byte instead I have chosen my favourite elements from each design and put them here.</p>
<p>The basic requirements for the redesign where the following:</p>
<ul>
<li> Back to basics: meaning very simple mark-up. If it can be done without using excessive elements then it will be done with out them</li>
<li>Standardised: I tended to focus simply on the front page and work out every other page</li>
<li>from there. With this design and consequently future designs, I have worked on each page as their own creative domain. Thus the about page looks different from the gallery and the gallery looks different from the front page. I believe this helps give the different areas of this website their own look and feel.</li>
<li>Simple Theme: this is the same as back to basics, however not just with the code, I decided that this redesign is to use as few images within it as possible. Not only does this help with accessibility issues, but it also means quicker load times and less load on my poor aging server.</li>
</ul>
<p>With that all said and done, I shall be re-coding my old pinecone theme and publishing it here very soon as I have had quite a few people email me with interest in using it on their own blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/photography/poivre-piquant-wordpress-theme.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.5 and my Zenphotos Plugin.</title>
		<link>http://photogabble.co.uk/technical/wordpress-25-and-my-zenphotos-plugin.html</link>
		<comments>http://photogabble.co.uk/technical/wordpress-25-and-my-zenphotos-plugin.html#comments</comments>
		<pubDate>Mon, 07 Apr 2008 11:31:52 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[zenphotos]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/2008/04/07/wordpress-25-and-my-zenphotos-plugin/</guid>
		<description><![CDATA[I have had quite a few people asking me about [...]]]></description>
			<content:encoded><![CDATA[<p>I have had quite a few people asking me about the zenphotos plugin I developed a while back which is nice, as it appears mine is the only plugin to do the job that a great many people running both publishing platforms need I have taken on the responsibility of ensuring that it is up to date. I have yet to test it with the latest version of WordPress 2.5 but I see no reason why it wouldn&#8217;t work being that the wordpress dev team don&#8217;t appear to have moved about any of the things the plugin uses, it should also work with the latest zenphotos update but again I have been so busy of late that I haven&#8217;t had time to get it updated. There is going to be a new version coming out soon for wordpress 2.5 which will have a lot more functionality I have built in for use with a new template, more information on that will come later once I get things in order.</p>
<p>In the mean time if you need any help with my plugins feel free to fire me an <a href="http://photogabble.co.ukcontact/" title="Email Me">email</a>.</p>
<p><strong>[Update]</strong></p>
<p>The next update for zenphotos 2.2 will be released as soon as I am able to spend some time on it for the time being I am implementing the following new features as required by my new theme (to launch soon) and requested by you guys:</p>
<ul>
<li>Plug-in Panel so you can set the default settings within your dashboard rather than edit the plugin file yourself.</li>
<li>Adding the option to create custom output formatting, which will make it easier to design around.</li>
<li>Adding the option to select the latest pictures from just one album within your gallery rather that from the whole gallery.</li>
<li>Adding the option to show a user defined selection of random images from either one album or the whole gallery.</li>
</ul>
<p>This being my final degree year I have a lot of  work to get finished and not a lot of time to get it all done in, due to this I can&#8217;t say for sure when the new plugin will be released as I am having to work on it when I get literally a spare few minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/technical/wordpress-25-and-my-zenphotos-plugin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

