<?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>Jesus Blog</title>
	<atom:link href="http://jesus-blog.com/feed" rel="self" type="application/rss+xml" />
	<link>http://jesus-blog.com</link>
	<description>Jesus-blog.com</description>
	<lastBuildDate>Mon, 30 Apr 2012 08:40:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>This site is dead</title>
		<link>http://jesus-blog.com/opinions/this-site-is-dead.html</link>
		<comments>http://jesus-blog.com/opinions/this-site-is-dead.html#comments</comments>
		<pubDate>Thu, 13 Jan 2011 19:07:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://jesus-blog.com/?p=150</guid>
		<description><![CDATA[I don&#8217;t post to it any more, but I shall, at some point in future, consider resurrecting it.
]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t post to it any more, but I shall, at some point in future, consider resurrecting it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/opinions/this-site-is-dead.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buddypress: Preventing private message spam</title>
		<link>http://jesus-blog.com/coding-tips-and-tutorials/buddypress-preventing-private-message-spam.html</link>
		<comments>http://jesus-blog.com/coding-tips-and-tutorials/buddypress-preventing-private-message-spam.html#comments</comments>
		<pubDate>Tue, 16 Mar 2010 17:58:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips and Tutorials]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=122</guid>
		<description><![CDATA[A guide to preventing private message spam within BuddyPress]]></description>
			<content:encoded><![CDATA[<p>One of the sites I work on has recently been suffering private message spam, ranging from fake market research to child porn. Needless to say this needed solving, and since I couldn&#8217;t disable private messaging, there was only one option, and that was to only allow Buddypress friends to send private messages to each other.</p>
<p>The is a &#8220;bug&#8221; in Buddypress that allows any user to send a private message to any other user simply by entering the username in the &#8220;to&#8221; field of the compose message form. This isn&#8217;t an obvious flaw since the ajax function that shows the available users as you type in the box does indeed only show your friends.</p>
<p>I looked all over the web for a solution, but the only one I found, a hack at that, wasn&#8217;t compatible with the version of BuddyPress I&#8217;m using. There was only one thing for it, and that was to roll my sleeves up and sort it myself.</p>
<p>The solution I came up with, while not the most elegant, works.</p>
<p>This may vary slightly depending on your version of BuddyPress, so instead of offering line numbers, I&#8217;ll explain where in the code you need to look. Don&#8217;t worry, you only have to edit a single file with just a few lines.</p>
<p>The file you want is /wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php</p>
<p>Annoyingly, because I hate doing this, there are a few classes in the same file, so you need to find &#8220;class BP_Messages_Message&#8221;</p>
<p>In there is the method, &#8220;send&#8221;.</p>
<p>Quite near to the top of that method is the line &#8220;if ( $this-&gt;thread_id ) {&#8221;</p>
<p>That is instructing the code to take a different path is the &#8220;message&#8221; already exists, i.e., somebody is replying to an existing thread. We don&#8217;t want to change this, so look for the else component of that if statement; it should be marked with the comment &#8220;// Create a new thread.&#8221;</p>
<p>Directly under that, paste this code.<br />
<code><br />
foreach ($this->recipients as $recipientName)<br />
		{<br />
			$recipientId = get_user_id_from_string( $recipientName );<br />
			if (!friends_check_friendship($bp->loggedin_user->id,$recipientId))<br />
			{<br />
				return false;<br />
			}<br />
		}<br />
</code></p>
<p>Save the file, upload it to your site, and you&#8217;re done. Users can now only send a message to their friends.</p>
<p>The only downside to this is that the failure message isn&#8217;t ever so elegant. Rather than giving the reason for the failure, it simply says that sending the message failed. This shouldn&#8217;t be a problem for normal users though, if anything it just makes the spammers life a little more confusing, which I&#8217;m sure we can all agree is a good thing.</p>
<p>So there you go, that&#8217;s how to prevent spam private messaging within BuddyPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/coding-tips-and-tutorials/buddypress-preventing-private-message-spam.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Slow Query Log with WAMP</title>
		<link>http://jesus-blog.com/coding-tips-and-tutorials/mysql-slow-query-log-with-wamp.html</link>
		<comments>http://jesus-blog.com/coding-tips-and-tutorials/mysql-slow-query-log-with-wamp.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:03:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips and Tutorials]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=120</guid>
		<description><![CDATA[Although in hindsight this is DEAD easy, I&#8217;ve just had a bit of a hard time finding out how to do it, so I thought I&#8217;d make a quick post which will hopefully get indexed by Google and save some other folk the hard time I had. Thoughtful, eh.
So, to enable the slow query log [...]]]></description>
			<content:encoded><![CDATA[<p>Although in hindsight this is DEAD easy, I&#8217;ve just had a bit of a hard time finding out how to do it, so I thought I&#8217;d make a quick post which will hopefully get indexed by Google and save some other folk the hard time I had. Thoughtful, eh.</p>
<p>So, to enable the slow query log in WAMP is as simple as adding</p>
<p>log-slow-queries=PATH to your config file.</p>
<p>The config file is located in your wamp installation directory, under bin/mysql/mysql.version/my.ini</p>
<p>In there you will find an entry for standard logs, which will look something like <em>log-error=c:/wamp/logs/mysql.log</em></p>
<p>Add the slow query flag, and change the log file name to something like <em>log-slow-queries=c:/wamp/logs/mysqlslow.log</em></p>
<p>Restart wamp, and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/coding-tips-and-tutorials/mysql-slow-query-log-with-wamp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad Code</title>
		<link>http://jesus-blog.com/bad-code/bad-code.html</link>
		<comments>http://jesus-blog.com/bad-code/bad-code.html#comments</comments>
		<pubDate>Thu, 08 Oct 2009 11:19:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=112</guid>
		<description><![CDATA[Further to my last post about the quality of code in certain well known PHP projects, I just stumbled across this fantastically pointless finger spew.

function the_title($before = '', $after = '', $echo = true) {
$title = get_the_title();
if ( strlen($title) == 0 )
return;
$title = $before . $title . $after;
if ( $echo )
echo $title;
else
return $title;
}
How entirely pointless [...]]]></description>
			<content:encoded><![CDATA[<p>Further to my last post about the quality of code in certain well known PHP projects, I just stumbled across this fantastically pointless finger spew.</p>
<p><code><br />
function the_title($before = '', $after = '', $echo = true) {<br />
$title = get_the_title();</code></p>
<p>if ( strlen($title) == 0 )<br />
return;</p>
<p>$title = $before . $title . $after;</p>
<p>if ( $echo )<br />
echo $title;<br />
else<br />
return $title;<br />
}</p>
<p>How entirely pointless that is, indeed, it gets worse, the entire thing is bloody well restrictive.<br />
<code>$title = get_the_title();</code> goes off and gets the title, but it adds HTML to it. I just want to get the title, but instead I end up getting &lt;span blah blah&gt;TITLE&lt;/span&gt;.</p>
<p>Very poor code folks, and I think the naming conventions for the functions are not even worth commenting about&#8230; oh go on, I can&#8217;t resist &#8220;the _title&#8221;? Nice and descriptive, ain&#8217;t it. <img src='http://jesus-blog.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
<p>The thing is, I cannot understand why somebody would have done this. It&#8217;s just adding code that is in no way required. I think you&#8217;ll find that this particular program is riddled with dodgy designs, or lack thereof, like this, and if it was just coded properly in the first place, I dare say it would run considerably quicker, not to mention making the lives of us developers infinitely easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/bad-code/bad-code.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress is shit</title>
		<link>http://jesus-blog.com/coding-tips-and-tutorials/wordpress-is.html</link>
		<comments>http://jesus-blog.com/coding-tips-and-tutorials/wordpress-is.html#comments</comments>
		<pubDate>Wed, 30 Sep 2009 17:20:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips and Tutorials]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[bad php code]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=106</guid>
		<description><![CDATA[This post goes beyond my opinion of Wordpress though, I want it to highlight a more fundimental problem with PHP development. People just don't seem to be very good at it, and it's giving PHP a bad name.]]></description>
			<content:encoded><![CDATA[<p>Right, I don&#8217;t know why I&#8217;m suddenly getting loads of comments on this, but I&#8217;ve deleted this entire post. This blog is dead, and has been for years. This post was written in 2009!</p>
<p>I use Wordpress. My company uses Wordpress. I recommend Wordpress. Wordpress serves a purpose, and it saves me time, but it&#8217;s written like shit and a nightmare to work with. That&#8217;s just the way it is. It&#8217;s life. Move on.</p>
<p>Comments closed.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/coding-tips-and-tutorials/wordpress-is.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Zend framework on 1and1 hosting.</title>
		<link>http://jesus-blog.com/coding-tips-and-tutorials/zend-framework-on-1and1-hosting.html</link>
		<comments>http://jesus-blog.com/coding-tips-and-tutorials/zend-framework-on-1and1-hosting.html#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:38:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips and Tutorials]]></category>
		<category><![CDATA[1and1 hosting]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=103</guid>
		<description><![CDATA[How to get Zend Framework running on 1and1 hosting.]]></description>
			<content:encoded><![CDATA[<p>I had a bit of a hard time getting Zend Framework to run on my 1&amp;1 hosting. It was all down to the .htaccess file in the end. The default htaccess configuration in the ZF getting started guide just doesn&#8217;t work, and neither did all the other posts I could fine on the subject around the internet, however, I&#8217;ve finally cracked it.</p>
<p>Presuming you&#8217;ve put your ZF index file in the webroot, here&#8217;s what the 1and1 htaccess file should look like.</p>
<p><code><br />
AddHandler x-mapp-php5 .php<br />
AddType x-mapp-php5 .php<br />
Options -MultiViews<br />
<ifModule mod_rewrite.c><br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule !\.(txt|swf|js|ico|gif|jpg|png|css|xml)$ /<br />
</ifModule><br />
</code></p>
<p><strong>Note:</strong> The same file will not work on my local dev machine, which is running only PHP5. You will need to comment out the first two lines (AddHandler, AddType) to get it to run on a stadard PHP5 installation.<br />
<!--adsense--></p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/coding-tips-and-tutorials/zend-framework-on-1and1-hosting.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>TinyMCE not loading in Zend Framework</title>
		<link>http://jesus-blog.com/coding-tips-and-tutorials/tinymce-not-loading-in-zend-framework.html</link>
		<comments>http://jesus-blog.com/coding-tips-and-tutorials/tinymce-not-loading-in-zend-framework.html#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips and Tutorials]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[tinyMCE]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=101</guid>
		<description><![CDATA[I was having a bit of a problem with TinyMCE not loading in Zend Framework (ZF). It turns out the .htaccess file was not configured correctly. It was redirecting .js to the index bootstrap and causing the page to fail to load.
The solution was the htaccess file as so&#8230;

Options -MultiViews
RewriteEngine On
RewriteBase /website
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a bit of a problem with TinyMCE not loading in Zend Framework (ZF). It turns out the .htaccess file was not configured correctly. It was redirecting .js to the index bootstrap and causing the page to fail to load.</p>
<p>The solution was the htaccess file as so&#8230;</p>
<p><code><br />
Options -MultiViews</code></p>
<p>RewriteEngine On<br />
RewriteBase /website<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule !\.(txt|swf|js|ico|gif|jpg|png|css|xml)$ /website/</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/coding-tips-and-tutorials/tinymce-not-loading-in-zend-framework.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Super blogging &#8211; My Corribee</title>
		<link>http://jesus-blog.com/opinions/super-blogging-my-corribee.html</link>
		<comments>http://jesus-blog.com/opinions/super-blogging-my-corribee.html#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:55:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Search & PPC]]></category>
		<category><![CDATA[Corribee]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=93</guid>
		<description><![CDATA[I awoke in the morning to find I was no longer 7th, but 1st. I was shocked. I had THE fastest growing blog on all of wordpress...]]></description>
			<content:encoded><![CDATA[<p>I run another blog, although it&#8217;s hosted on wordpress.com rather than my domain, here.<a title="Nathan Whitworth PHP Developer" href="http://www.nathanwhitworth.co.uk"> </a></p>
<p>The blog is about my boat, <a title="Kudu, the Corribee" href="http://onkudu.wordpress.com">&#8216;Kudu&#8217;</a>. It&#8217;s a 21ft <strong><a title="Corribee" href="http://onkudu.wordpress.com/boats/newbridge-corribee/">Corribee</a></strong> &#8211; a sailing yacht &#8211; and we are planning some substantial voyages toghether. Anyway, the other evening I got an excited facebook message from a friend saying my blog was listed on the wordpress.com&#8217;s <strong>Blog Of The Day</strong> stat&#8217;s page. I had the 7th fastest growing blog on all of wordpress. I was ecstatic about it. The 7th fastest growing blog on all of wordpress!</p>
<p>I awoke in the morning to find I was no longer 7th, but 1st. I was shocked. I had THE fastest growing blog on all of wordpress, which means I had one of the fastest growing blogs on the entire internet at that point in time. Sadly it was short lived, I&#8217;ve since dropped off the list, but to sustain the sort of growth I was seeing was never going to happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/opinions/super-blogging-my-corribee.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nathan whitworth.co.uk site rebuild</title>
		<link>http://jesus-blog.com/opinions/nathan-whitworthcouk-site-rebuild.html</link>
		<comments>http://jesus-blog.com/opinions/nathan-whitworthcouk-site-rebuild.html#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:42:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Nathan Whitworth]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=91</guid>
		<description><![CDATA[I decided to rebuild my home page with Zend Framework since it was originally done as little more than static pages.]]></description>
			<content:encoded><![CDATA[<h2><a href="http://www.nathanwhitworth.co.uk"&gt;Nathan Whitworth</a></h2>
<p>I decided to rebuild my home page since it was originally done as little more than static pages. Ok, I used a bit of PHP to include headers and footers and do a couple of other litte things, but it was nothing clever.<br />
<!--adsense--><br />
Since it is trying to promote me as a developer, I thought I should apply a bit more effort than that. It turns out, I failed. I used Zend Framework to rebuild the site, and it just made everything even easier and less effort. From form validation to displaying my twitter feed, I had the lot built in about 4 hours, well, excluding the other 4 hours it took me trying to figure out how to get Zend Framework working with 1and1&#8217;s hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/opinions/nathan-whitworthcouk-site-rebuild.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Card Smart</title>
		<link>http://jesus-blog.com/opinions/card-smart.html</link>
		<comments>http://jesus-blog.com/opinions/card-smart.html#comments</comments>
		<pubDate>Fri, 16 Jan 2009 17:05:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[card smart]]></category>
		<category><![CDATA[cardsmart]]></category>
		<category><![CDATA[credit cards]]></category>
		<category><![CDATA[moneysupermarket]]></category>

		<guid isPermaLink="false">http://blog.nathanwhitworth.co.uk/?p=88</guid>
		<description><![CDATA[I&#8217;m just giving some link love here since a friend of mine has just launched a new project.
Cardsmart.co.uk is a credit card comparison service and it went live about 3 minutes ago at the time of writing. It&#8217;s quite exciting to see the birth of a brand new company, it&#8217;s quite a refreshing change given [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just giving some link love here since a friend of mine has just launched a new project.</p>
<p><a title="Card Smart" href="http://www.cardsmart.co.uk/">Cardsmart.co.uk</a> is a credit card comparison service and it went live about 3 minutes ago at the time of writing. It&#8217;s quite exciting to see the birth of a brand new company, it&#8217;s quite a refreshing change given all of the dying one&#8217;s that are around at the moment.</p>
<p>As I recall, they&#8217;ve got about 250 credit card offers on the site, which compared to money supermarket is a HUGE selection.</p>
<p>So there you have it, if you are in the market for a new bit of plastic <a title="Cardsmart" href="http://www.cardsmart.co.uk/">check out the site.</a></p>
<p>JP, you owe me a beer. <img src='http://jesus-blog.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jesus-blog.com/opinions/card-smart.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

