<?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>Kevin Bradwick</title>
	<atom:link href="http://www.kevinbradwick.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinbradwick.co.uk</link>
	<description>Web development and design blog</description>
	<lastBuildDate>Fri, 09 Jul 2010 08:11:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>fotoslide wordpress plugin</title>
		<link>http://www.kevinbradwick.co.uk/2010/07/fotoslide-plugin-for-wordpress/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/07/fotoslide-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 12:44:36 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=201</guid>
		<description><![CDATA[Following from the work I done previously with the WPS3slider, I felt it necessary to re-look at the way the plug-in was structured. The result is a more robust and simpler plug-in that generates multiple galleries on a web page. This plugin now has the following features; Optionally provide a caption message and customise its [...]]]></description>
			<content:encoded><![CDATA[<p>Following from the work I done previously with the <a href="http://www.kevinbradwick.co.uk/2010/06/wps3slider-plugin-for-wordpress/">WPS3slider</a>, I felt it necessary to re-look at the way the plug-in was structured. The result is a more robust and simpler plug-in that generates multiple galleries on a web page.</p>
<p>This plugin now has the following features;</p>
<ul>
<li>Optionally provide a caption message and customise its CSS properties from admin screen</li>
<li>Works with the existing Media Library</li>
<li>Uses timthumb.php to dynamically size images</li>
<li>Multiple galleries can be added without invalidating the HTML markup</li>
<li>Providing a link from the image is optional</li>
</ul>
<p>The plugin will appear on wordpress.org shortly, but if you want to get you hands on version 1.0 early, you can download it from the official project page on <a href="http://code.google.com/p/fotoslide/downloads/list">Google Code</a>.</p>
<p>Here&#8217;s a sample gallery!<br />
	

<span id="fotoslide-1" class="fotoslide">
<a href="" title="Cityscape at night" rel="bg:#FFF;txt:#000;opacity:0.7;pos:bottom;"><img src="http://www.kevinbradwick.co.uk/wp-content/plugins/fotoslide/timthumb.php?src=/wp-content/uploads/2010/07/image_01.jpg&amp;w=600&amp;h=375" alt="Image" /></a>
<a href="" title="Landscape with a tree and a caption on the left" rel="opacity:0.7;pos:left;"><img src="http://www.kevinbradwick.co.uk/wp-content/plugins/fotoslide/timthumb.php?src=/wp-content/uploads/2010/07/image_02.jpg&amp;w=600&amp;h=375" alt="Image" /></a>
<a href="" title="The beach with a caption on the right" rel="opacity:0.7;pos:right;"><img src="http://www.kevinbradwick.co.uk/wp-content/plugins/fotoslide/timthumb.php?src=/wp-content/uploads/2010/07/image_03.jpg&amp;w=600&amp;h=375" alt="Image" /></a>
<a href="" title="Some flowers on a field with the caption on the top" rel="opacity:0.7;pos:top;"><img src="http://www.kevinbradwick.co.uk/wp-content/plugins/fotoslide/timthumb.php?src=/wp-content/uploads/2010/07/image_04.jpg&amp;w=600&amp;h=375" alt="Image" /></a>
<span class="caption"></span></span>

</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/07/fotoslide-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Quick tip: Mounting CIFS volumes on Linux</title>
		<link>http://www.kevinbradwick.co.uk/2010/06/quick-tip-mounting-cifs-volumes-on-linux/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/06/quick-tip-mounting-cifs-volumes-on-linux/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:55:26 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=192</guid>
		<description><![CDATA[I recently got myself a Netgear ReadyNAS duo. Amazing bit of kit, best purchase I&#8217;ve made in a while. OneI always run into is remembering how to mount a CIFS volume. Do do this, create a mount point (I choose /mnt/cifs but use whatever you want), then execute the following command; $ mount -t cifs [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got myself a Netgear ReadyNAS duo. Amazing bit of kit, best purchase I&#8217;ve made in a while. OneI always run into is remembering how to mount a CIFS volume. Do do this, create a mount point (I choose /mnt/cifs but use whatever you want), then execute the following command;</p>
<pre name="code" class="php">
$ mount -t cifs [server-address]/MyVolume /mnt/cifs -o username=[username],password=[password]
</pre>
<p>The volume will then be found at /mnt/cifs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/06/quick-tip-mounting-cifs-volumes-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WPS3Slider plugin for WordPress</title>
		<link>http://www.kevinbradwick.co.uk/2010/06/wps3slider-plugin-for-wordpress/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/06/wps3slider-plugin-for-wordpress/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 13:50:13 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=179</guid>
		<description><![CDATA[This is my first contribution to the WordPress community. It is a plugin that will allow you to place s3slider galleries anywhere within your WordPress install. To render the images, the plugin uses the swiss army knife for dyamic thumbnail generators, timthumb. You can obtain the latest version of this plugin by visiting the plugin [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first contribution to the WordPress community. It is a plugin that will allow you to place <a href="http://www.serie3.info/s3slider/">s3slider</a> galleries anywhere within your WordPress install. To render the images, the plugin uses the swiss army knife for dyamic thumbnail generators, <a href="http://code.google.com/p/timthumb/">timthumb</a>.</p>
<p>You can obtain the latest version of this plugin by visiting the <a href="http://wordpress.org/extend/plugins/wps3slider/">plugin page on wordpress.org</a> or by using your WordPress admin area.</p>
<p>Once installed, go to your admin area &gt; Media &gt; WPS3Slider where you can start creating your galleries. Before you install, make sure the temp, cache and uploads folders are read, write and executable by the server.</p>
<pre name="code" class="php">chmod 777 {temp,cache,uploads}</pre>
<p>To insert a gallery in a post, click on the pictures icon above the media menu above the TinyMCE editor and select the gallery you want. This will then render you the shortcode to use within the post/page. If you want to place a gallery within your template files, you can simply use the do_shortcode method.</p>
<pre class="php" name="code">do_shortcode('&#91;wps3 id="5"&#93;');</pre>
<p><a href="http://www.kevinbradwick.co.uk/wps3slider-demo/">View a demo</a></p>
<p><strong>If you find any issues with the plugin, <a href="http://code.google.com/p/wps3slider/issues/list">please report them to the project on google code</a>.</strong></p>
<p>Enjoy.</p>
<h3>This plugin has been rewritten from the ground up and anyone interested in this plugin should check out <a href="http://www.kevinbradwick.co.uk/2010/07/fotoslide-wordpress-plugin/">FotoSlide</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/06/wps3slider-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Using multiple database connections with Yii framework</title>
		<link>http://www.kevinbradwick.co.uk/2010/05/using-multiple-database-connections-with-yii-framework/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/05/using-multiple-database-connections-with-yii-framework/#comments</comments>
		<pubDate>Mon, 17 May 2010 18:54:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Frameworks]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=158</guid>
		<description><![CDATA[There may be occasions where you will need to set up database connections to more than one database. This guide will show you the easy way to set up these resources. In your main.php config file, you may already have a db component set up by default. //.. main.php 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=testdrive', 'emulatePrepare' => [...]]]></description>
			<content:encoded><![CDATA[<p>There may be occasions where you will need to set up database connections to more than one database. This guide will show you the easy way to set up these resources.</p>
<p>In your main.php config file, you may already have a db component set up by default.</p>
<pre name="code" class="php">
//.. main.php
'db'=>array(
	'connectionString' => 'mysql:host=localhost;dbname=testdrive',
	'emulatePrepare' => true,
	'username' => 'root',
	'password' => 'password',
	'charset' => 'utf8',
),
</pre>
<p>This will be enabled by default. Now, if you want to enable another connection component, simply add another CDbConnection component and give it a different name.</p>
<pre name="code" class="php">
//.. main.php
'db'=>array(
	'connectionString' => 'mysql:host=localhost;dbname=testdrive',
	'emulatePrepare' => true,
	'username' => 'root',
	'password' => 'password',
	'charset' => 'utf8',
),
'db2'=>array(
        'class'  => 'CDbConnection',
	'connectionString' => 'mysql:host=localhost;dbname=database2',
	'emulatePrepare' => true,
	'username' => 'root',
	'password' => 'password',
	'charset' => 'utf8',
),
</pre>
<p>Now, in your models you can pass the connection instance using getDbConnection()</p>
<pre name="code" class="php">
class DbTable extends CActiveRecord
{
     public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    public function getDbConnection()
    {
        return Yii::app()->db2; // select the connection you want
    }
//.. etc
</pre>
<p>Using this technique you can have your model classes connect to numerous databases.</p>
<p>Enjoy <img src='http://www.kevinbradwick.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/05/using-multiple-database-connections-with-yii-framework/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Skeleton Theme for Developers</title>
		<link>http://www.kevinbradwick.co.uk/2010/03/wordpress-skeleton-theme-for-developers/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/03/wordpress-skeleton-theme-for-developers/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:13:20 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=148</guid>
		<description><![CDATA[If you are a frequent WP developer then you&#8217;ll know the time consuming job of setting up a completely new theme. Today I have created a basic theme that is free to use for anyone creating a new site. It features a developer options page in the Appearance Panel where you can configure such things [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a frequent WP developer then you&#8217;ll know the time consuming job of setting up a completely new theme. Today I have created a basic theme that is free to use for anyone creating a new site. It features a developer options page in the Appearance Panel where you can configure such things as thumbnails, javascript and contact page generation.</p>
<p>The in built contact page features field verification and csrf security prevention.</p>
<p>You can download or clone a copy of the theme by visiting the <a href="http://github.com/kbradwick/WPSkeletonTheme">Git Repo</a> at <a href="http://www.github.com">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/03/wordpress-skeleton-theme-for-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL JOIN statements</title>
		<link>http://www.kevinbradwick.co.uk/2010/02/sql-join-statements/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/02/sql-join-statements/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 16:35:01 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[join]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=122</guid>
		<description><![CDATA[When working with relational databases, you will often find that the data your require can reside on multiple tables. In simple terms, a join statement brings together these tables using a common identifier. Joins are the best way to query a database whilst improving transaction efficiency. An example We&#8217;ll create two tables, a users and [...]]]></description>
			<content:encoded><![CDATA[<p>When working with relational databases, you will often find that the data your require can reside on multiple tables. In simple terms, a join statement brings together these tables using a common identifier. Joins are the best way to query a database whilst improving transaction efficiency.</p>
<h3>An example</h3>
<p>We&#8217;ll create two tables, a users and account table. The account table holds account names (e.g. Guest, Admin, Super Admin) and the users table contains one foreign key that relates to the account type.</p>
<p>The structure looks like this;</p>
<p><img class="alignnone size-thumbnail wp-image-123" title="schema" src="http://www.kevinbradwick.co.uk/wp-content/uploads/2010/02/schema.png" alt="" /></p>
<p>And here&#8217;s some data that we&#8217;ll work with&#8230;</p>
<p><img class="alignnone size-thumbnail wp-image-126" title="sql-select-accounts" src="http://www.kevinbradwick.co.uk/wp-content/uploads/2010/02/sql-select-accounts.png" alt="" /></p>
<p><img class="alignnone size-full wp-image-130" title="users-data" src="http://www.kevinbradwick.co.uk/wp-content/uploads/2010/02/users-data.png" alt="" width="392" height="161" /></p>
<p>Now to perform a simple join of these two tables, we could use&#8230;</p>
<p><img class="alignnone size-full wp-image-132" title="join-1" src="http://www.kevinbradwick.co.uk/wp-content/uploads/2010/02/join-1.png" alt="" width="544" height="139" /></p>
<p>This simple query will return all records but using this as a base we can further customise our query to make it more useful. If we wanted to find out all users who have Admin accounts we&#8217;d use this statement.</p>
<pre name="code" class="php">
SELECT * FROM users u LEFT JOIN accounts a ON u.account_type = a.id WHERE a.name = 'Admin'

// or we could use the ID from the accounts table

SELECT * FROM users u LEFT JOIN accounts a ON u.account_type = a.id WHERE a.id = 2
</pre>
<h3>A note on usage</h3>
<p>This is MySQL join in its most simplest terms. You can join multiple tables providing you database design allows it. So with that cleared up, if you are not already using joins in your queries, start using them and cut down on the number of transactions you make&#8230;it&#8217;ll also make your life a lot easier retrieving data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/02/sql-join-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating the radius of a coordinate using PHP</title>
		<link>http://www.kevinbradwick.co.uk/2010/01/calculating-the-radius-of-a-coordinate-using-php/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/01/calculating-the-radius-of-a-coordinate-using-php/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:23:11 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[radius]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=59</guid>
		<description><![CDATA[Sometimes you&#8217;ll want to get the radius of a location. For this I have written a function that I&#8217;ll share with you. /* Copyright 2009 Kevin Bradwick (http://www.kevinbradwick.co.uk) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you&#8217;ll want to get the radius of a location. For this I have written a function that I&#8217;ll share with you.</p>
<pre name="code" class="php">/*

Copyright 2009  Kevin Bradwick (http://www.kevinbradwick.co.uk) 

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. 

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
*/

function geoRadius($lat, $lng, $rad, $kilometeres = FALSE, $out = 'OBJ')
	{
		$radius = ($kilometers) ? ($rad * 0.621371192) : $rad;

		(float)$dpmLAT = 1 / 69.1703234283616; 

		// Latitude calculation
		(float)$usrRLAT = $dpmLAT * $radius;
		(float)$latMIN = $lat - $usrRLAT;
		(float)$latMAX = $lat + $usrRLAT;

		// Longitude calculation
		(float)$mpdLON = 69.1703234283616 * cos($lat * (pi/180));
		(float)$dpmLON = 1 / $mpdLON; // degrees per mile longintude
		$usrRLON = $dpmLON * $radius;
		$lonMIN = $lng - $usrRLON;
		$lonMAX = $lng + $usrRLON;

		$output = array("lonMIN" =&gt; $lonMIN, "lonMAX" =&gt; $lonMAX, "latMIN" =&gt; $latMIN, "latMAX" =&gt; $latMAX);
		return ($out == 'OBJ') ? (object)$output : $output;
	}
</pre>
<p>Okay, so how do you use it? Well, the first two paramaters are the Latitude and Longitude of your origin. The third is the radius ammount. If you want to calculate it based on kilometers (default is in miles), enter a boolean value of TRUE for the fourth parameter. The last paramter specifices the output method, by default it will return an object, enter anything other that OBJ here will return an associative array.</p>
<p>So, once we&#8217;ve done that what do we have? You will then have 4 variables to use, each of them minimum and maximum values of Latitude and Longitude. This is how you could use the output of this function to query a database that contains geo data.</p>
<pre name="code" class="php">$radius = geoRadius(53.741690, -2.397750, 48.28032);
$sql = "SELECT * FROM `mytable` WHERE `latitude` BETWEEN {$radius-&gt;latMIN} AND {$radius-&gt;latMAX} AND `longitude` BETWEEN {$radius-&gt;lonMIN} AND {$radius-&gt;lonMAX}";
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/01/calculating-the-radius-of-a-coordinate-using-php/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Creating custom page layouts with WordPress</title>
		<link>http://www.kevinbradwick.co.uk/2010/01/creating-custom-page-layouts-with-wordpress/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/01/creating-custom-page-layouts-with-wordpress/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:14:13 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=52</guid>
		<description><![CDATA[If you are using WordPress to create a website, and you want to avoid it looking like a blog, then you need to look at creating custom pages. The &#8216;page.php&#8217; file displays your generic page content using this template. You could customise this page to make it look as you want and set it as [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using WordPress to create a website, and you want to avoid it looking like a blog, then you need to look at creating custom pages.</p>
<p>The &#8216;page.php&#8217; file displays your generic page content using this template. You could customise this page to make it look as you want and set it as the home page in the WordPress admin screen. But what happens if we want to create a contact form section? or maybe a one off page that contains some bespoke code? This is how you do it&#8230;</p>
<p>In your theme folder, create a new file. In this example, I&#8217;ll call it custom.php. Now insert the following code to it.</p>
<pre name="code" class="php">&lt;?php
/*
Template Name: Custom Page Layout
*/
get_header(); ?&gt;;

// enter your code here

&lt;?php get_footer(); ?&gt;</pre>
<p>Now with that, create a new page in the admin section and on the right where it says &#8220;Attributes&#8221;, select the template name you wrote in the custom.php (Custom Page Layout in this case).</p>
<p>Easy <img src='http://www.kevinbradwick.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/01/creating-custom-page-layouts-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing the pagination error using custom permalink structure in WordPress</title>
		<link>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:11:33 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pagination]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=50</guid>
		<description><![CDATA[For a while this has been really annoying me. Whenever I use the permalink structure /%category%/%postname%/ I get 404 errors when using the next_posts_link() and previous_posts_link(). I a fix for this here. You can use this code in a themes functions.php file or use it as a plugin. /* Plugin Name: Fix Paging in Category [...]]]></description>
			<content:encoded><![CDATA[<p>For a while this has been really annoying me. Whenever I use the permalink structure /%category%/%postname%/ I get 404 errors when using the next_posts_link() and previous_posts_link(). I a fix for this <a href="http://barefootdevelopment.blogspot.com/2007/11/fix-for-wordpress-paging-problem.html">here</a>. You can use this code in a themes functions.php file or use it as a plugin.</p>
<pre name="code" class="php">/*
Plugin Name: Fix Paging in Category Listings
Plugin URI: http://www.thinkbarefoot.com
Description: Fixes a bug where next/previous links are broken in category by year/month listings
Version: 0.5
Author: Doug Smith
Author URI: http://www.thinkbarefoot.com

Copyright 2007  Doug Smith  (email: dsmith@thinkbarefoot.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

*/

/**
 * Function to fix problem where next/previous buttons are broken on list
 * of posts in a category when the custom permalink string is:
 * /%category%/%year%/%monthnum%/%postname%/
 * The problem is that with a url like this:
 *
 * /category/2007/10/page/2
 *
 * the 'page' looks like a post name, not the keyword "page"
 */
function remove_page_from_query_string($query_string)
{
    if ($query_string['name'] == 'page' &amp;&amp; isset($query_string['page'])) {
        unset($query_string['name']);
        // 'page' in the query_string looks like '/2', so split it out
        list($delim, $page_index) = split('/', $query_string['page']);
        $query_string['paged'] = $page_index;
    }
    return $query_string;
}

add_filter('request', 'remove_page_from_query_string');</pre>
<p>Happy days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Grant remote access to MySQL</title>
		<link>http://www.kevinbradwick.co.uk/2010/01/grant-remote-access-to-mysql/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/01/grant-remote-access-to-mysql/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:05:32 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[remote access]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=45</guid>
		<description><![CDATA[If you&#8217;ve installed MySQL on a machine other than your work station (localhost) and you want to use the MYSQL GUI tools to administer the server then you&#8217;ll need to grant remote acccess on the root account (or another account that has useful privileges. This is how to do it. Connect via SSH and login [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve installed MySQL on a machine other than your work station (localhost) and you want to use the MYSQL GUI tools to administer the server then you&#8217;ll need to grant remote acccess on the root account (or another account that has useful privileges. This is how to do it.</p>
<p>Connect via SSH and login to mysql&#8230;</p>
<pre name="code" class="php">
# mysql -u root -p

// now grant access for the root account
mysql > GRANT USAGE ON *.* to root@'%' IDENTIFIED BY '[password]';
mysql > FLUSH PRIVILEGES;
</pre>
<p>Change [password] to whatever the password is for the root account and include the single quotes (&#8216;). The % sign means it will accept connections from this account on all IP addresses. You could if you wanted, choose a specific IP here.</p>
<p>You&#8217;ll now be able to login remotely.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/01/grant-remote-access-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
