<?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>paulOr</title>
	<atom:link href="http://www.paulor.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paulor.net</link>
	<description>Just another WordPress developer</description>
	<lastBuildDate>Sun, 01 Apr 2012 21:32:41 +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>Happy Birthday, me!</title>
		<link>http://www.paulor.net/happy-birthday-me/</link>
		<comments>http://www.paulor.net/happy-birthday-me/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 21:30:59 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Photo]]></category>
		<category><![CDATA[april]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[Boots]]></category>
		<category><![CDATA[farm]]></category>
		<category><![CDATA[Muddy]]></category>
		<category><![CDATA[muddyboots]]></category>
		<category><![CDATA[Sam]]></category>
		<category><![CDATA[tractor]]></category>

		<guid isPermaLink="false">http://www.paulor.net/?p=1479336699</guid>
		<description><![CDATA[Here are a couple photos from today &#38; yesterday, just to remind myself in years to come :]]]></description>
			<content:encoded><![CDATA[<p>Here are a couple photos from today &amp; yesterday, just to remind myself in years to come :]</p>
<p><img class="alignnone size-large wp-image-1479336706" title="IMG_3148" src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3148-500x500.jpg" alt="" width="500" height="500" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3149-500x666.jpg" alt="" title="IMG_3149" width="500" height="666" class="alignnone size-large wp-image-1479336701" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3152-500x375.jpg" alt="" title="IMG_3152" width="500" height="375" class="alignnone size-large wp-image-1479336702" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3164-500x375.jpg" alt="" title="IMG_3164" width="500" height="375" class="alignnone size-large wp-image-1479336703" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3167-500x375.jpg" alt="" title="IMG_3167" width="500" height="375" class="alignnone size-large wp-image-1479336704" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3169-500x375.jpg" alt="" title="IMG_3169" width="500" height="375" class="alignnone size-large wp-image-1479336705" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3172-500x375.jpg" alt="" title="IMG_3172" width="500" height="375" class="alignnone size-large wp-image-1479336700" /></p>
<p><img src="http://www.paulor.net/wp-content/uploads/2012/04/IMG_3176-500x499.jpg" alt="" title="IMG_3176" width="500" height="499" class="alignnone size-large wp-image-1479336707" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulor.net/happy-birthday-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Custom Category Lists</title>
		<link>http://www.paulor.net/wordpress-custom-category-lists/</link>
		<comments>http://www.paulor.net/wordpress-custom-category-lists/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 11:15:12 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[custom category]]></category>

		<guid isPermaLink="false">http://www.paulor.net/?p=1479336697</guid>
		<description><![CDATA[WordPress has a category list widget which you can use to show all the used categories on your blog, you can even style it via CSS to make it pretty but sometimes designers like to make it hard for you &#8230;]]></description>
			<content:encoded><![CDATA[<p>WordPress has a category list widget which you can use to show all the used categories on your blog, you can even style it via CSS to make it pretty but sometimes designers like to make it hard for you and be all &#8221; no don&#8217;t use images, because then we need to scale them for iPhone &#038; iPad retina display, just use a symbols font for that! &#8221; Crazy.</p>
<p>So heres a categories list, just like the widget, but you can style it or change the HTML in any way you like!</p>
<pre>
$args = array(&#039;orderby&#039; =&gt; &#039;name&#039;, &#039;order&#039; =&gt; &#039;ASC&#039;);
$categories = get_categories($args);
foreach($categories as $category) {
    echo &#039;&lt;li&gt;&lt;a href=&quot;&#039;.get_category_link($category-&gt;cat_ID).&#039;&quot; class=&quot;mage&quot;&gt;&lt;span class=&quot;icon&quot;&gt;)&lt;/span&gt; &#039;.$category-&gt;cat_name.&#039;&lt;/a&gt;&lt;/li&gt;&#039;;
}
</pre>
<p>via <a href="http://www.inigo.net" target="_blank">Inigo Media</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulor.net/wordpress-custom-category-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative to Sessions within WordPress</title>
		<link>http://www.paulor.net/alternative-to-sessions-within-wordpress/</link>
		<comments>http://www.paulor.net/alternative-to-sessions-within-wordpress/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 20:57:59 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php sessions]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[transient]]></category>
		<category><![CDATA[transient api]]></category>
		<category><![CDATA[wordpress sessions]]></category>
		<category><![CDATA[wordpress transients api]]></category>

		<guid isPermaLink="false">http://www.paulor.net/?p=1479336692</guid>
		<description><![CDATA[Nobody told me that WordPress total jacks up the globals making it near impossible for you to register sessions within WordPress. I tried a couple hacks to enable it via functions.php, I even went as far as ripping out code &#8230;]]></description>
			<content:encoded><![CDATA[<p>Nobody told me that <a href="https://www.google.co.uk/webhp?sourceid=chrome-instant&#038;ix=sea&#038;ie=UTF-8&#038;ion=1#hl=en&#038;sclient=psy-ab&#038;q=wordpress+sessions+not+working&#038;oq=wordpress+sessions+not+working" target="_blank">WordPress total jacks up the globals</a> making it near impossible for you to register sessions within WordPress. I tried a couple hacks to enable it via functions.php, I even went as far as ripping out code from the core to get it to work!</p>
<p>In a Google search I stumbled upon the <a href="http://codex.wordpress.org/Transients_API" target="_blank">Transient API</a> &#8211; oh lordy, yes!<br />
So custom sessions aren&#8217;t working for me, transients are the next best thing, they are super easy too!</p>
<pre>
## STORE TEXT
set_transient($myvar, 'text I want to store', 60*60*12);

## RETRIEVE TEXT
echo get_transient($myvar);

## DELETE THE TEXT
delete_transient($myvar);
</pre>
<p>All my troubles seem so far away!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulor.net/alternative-to-sessions-within-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase/Decrease the word count in the_excerpt()</title>
		<link>http://www.paulor.net/increasedecrease-the-word-count-in-the_excerpt/</link>
		<comments>http://www.paulor.net/increasedecrease-the-word-count-in-the_excerpt/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 22:30:24 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[decrease]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[increase]]></category>
		<category><![CDATA[the_excerpt]]></category>
		<category><![CDATA[wordpres]]></category>

		<guid isPermaLink="false">http://www.paulor.net/?p=1479336689</guid>
		<description><![CDATA[Heres one I&#8217;d been needing for a while but didn&#8217;t scratch my head hard enough.. Increasing/decreasing the word count in the WordPress excerpt. Very useful! add_filter('excerpt_length', 'my_excerpt_length'); function my_excerpt_length($length) { return 60; }]]></description>
			<content:encoded><![CDATA[<p>Heres one I&#8217;d been needing for a while but didn&#8217;t scratch my head hard enough.. Increasing/decreasing the word count in the WordPress excerpt. Very useful!</p>
<pre>
add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($length) {
	return 60;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.paulor.net/increasedecrease-the-word-count-in-the_excerpt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Import Hack &#8211; Quick &amp; Dirty</title>
		<link>http://www.paulor.net/wordpress-import-hack-quick-dirty/</link>
		<comments>http://www.paulor.net/wordpress-import-hack-quick-dirty/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 21:41:41 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.paulor.net/?p=1479336684</guid>
		<description><![CDATA[After finally convincing a client of mine to replace their existing 6 year old, custom built, extremely limiting &#038; buggy blog software I&#8217;ve had to put in a bit of effort to transfer there 150+ blog posts from the MySQL &#8230;]]></description>
			<content:encoded><![CDATA[<p>After finally convincing a client of mine to replace their existing 6 year old, custom built, extremely limiting &#038; buggy blog software I&#8217;ve had to put in a bit of effort to transfer there 150+ blog posts from the MySQL table into WordPresses MySQL tables, which is pretty straight forward; the key here is to keep all of there featured images in place.</p>
<p>The following code does just that. It takes all the posts from the current blog, imports them into WordPresses tables, it inserts the featured image and then links it to the parent post. All thats then left to do is upload the images directory to WordPresses upload dir.</p>
<pre>
## DATABASE CONNECTION
// trololol you don&#039;t get to see this :]

## CLEAN URLS PLEASE
function toAscii($str) {
	$clean = preg_replace(&quot;/[^a-zA-Z0-9\/_|+ -]/&quot;, &#039;&#039;, $str);
	$clean = strtolower(trim($clean, &#039;-&#039;));
	$clean = preg_replace(&quot;/[\/_|+ -]+/&quot;, &#039;-&#039;, $clean);
	return $clean;
}

## SELECT THE BLOG DATABASE TO IMPORT, ORDER IT BY ID ASC (OR BY DATE ASC W/E)
$blog_q = mysql_query(&quot;SELECT * FROM `blog` ORDER BY `ID` ASC&quot;);
while($blog = mysql_fetch_array($blog_q)):

	## INSERT POST INTO WORDPRESS
	mysql_query(&quot;INSERT INTO `wp_posts` (
		`post_author`,
		`post_date`,
		`post_date_gmt`,
		`post_content`,
		`post_title`,
		`post_excerpt`,
		`post_status`,
		`comment_status`,
		`ping_status`,
		`post_password`,
		`post_name`,
		`to_ping`,
		`pinged`,
		`post_modified`,
		`post_modified_gmt`,
		`post_content_filtered`,
		`post_parent`,
		`guid`,
		`menu_order`,
		`post_type`,
		`post_mime_type`,
		`comment_count`) VALUES(
		&#039;1&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogARTICLE&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogTITLE&#039;].&quot;&#039;,
		&#039;&#039;,
		&#039;publish&#039;,
		&#039;open&#039;,
		&#039;open&#039;,
		&#039;&#039;,
		&#039;&quot;.toAscii($blog[&#039;blogTITLE&#039;]).&quot;&#039;,
		&#039;&#039;,
		&#039;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&#039;,
		&#039;0&#039;,
		&#039;&#039;,
		&#039;0&#039;,
		&#039;post&#039;,
		&#039;&#039;,
		&#039;0&#039;
		)&quot;);

	## INSERT IMAGE INTO POSTS FEATURED IMAGE
	mysql_query(&quot;INSERT INTO `wp_posts` (
		`post_author`,
		`post_date`,
		`post_date_gmt`,
		`post_content`,
		`post_title`,
		`post_excerpt`,
		`post_status`,
		`comment_status`,
		`ping_status`,
		`post_password`,
		`post_name`,
		`to_ping`,
		`pinged`,
		`post_modified`,
		`post_modified_gmt`,
		`post_content_filtered`,
		`post_parent`,
		`guid`,
		`menu_order`,
		`post_type`,
		`post_mime_type`,
		`comment_count`) VALUES(
		&#039;1&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&#039;,
		&#039;&quot;.$blog[&#039;blogIMAGEALT&#039;].&quot;&#039;,
		&#039;&#039;,
		&#039;inherit&#039;,
		&#039;open&#039;,
		&#039;open&#039;,
		&#039;&#039;,
		&#039;&quot;.toAscii($blog[&#039;blogIMAGEALT&#039;]).&quot;&#039;,
		&#039;&#039;,
		&#039;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&quot;.$blog[&#039;blogDATESUBMITTED&#039;].&quot;&#039;,
		&#039;&#039;,
		&#039;&quot;.mysql_insert_id().&quot;&#039;,
		&#039;http://www.newdomain.com/wp-content/uploads/2012/03/&quot;.$blog[&#039;blogIMAGE&#039;].&quot;&#039;,
		&#039;0&#039;,
		&#039;attachment&#039;,
		&#039;image/jpeg&#039;,
		&#039;0&#039;
		)&quot;);

	## LINK IT TOGETHER IN THE POST_META
	mysql_query(&quot;INSERT INTO `wp_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES(&#039;&quot;.mysql_insert_id().&quot;&#039;, &#039;_wp_attached_file&#039;, &#039;2012/03/&quot;.$blog[&#039;blogIMAGE&#039;].&quot;&#039;)&quot;);

	## AND SPIT OUT ONCE DONE&hellip;.
	echo $blog[&#039;ID&#039;].&#039; ---&gt; &#039;.$blog[&#039;blogTITLE&#039;].&#039;&lt;br /&gt;&#039;;

endwhile; // end, select the blog database
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.paulor.net/wordpress-import-hack-quick-dirty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

