

<?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>kieranbarnes &#187; PHP</title>
	<atom:link href="http://bloke.org/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloke.org</link>
	<description>Independent PHP, WordPress &#38; CubeCart Programmer</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:58:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>[Snippet] Setting the timezone for PHP 5.3</title>
		<link>http://bloke.org/php/snippet-setting-the-timezone-for-php-5-3/</link>
		<comments>http://bloke.org/php/snippet-setting-the-timezone-for-php-5-3/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 14:43:53 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Europe]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3744</guid>
		<description><![CDATA[PHP 5.3 requires a time zone to be set if you do any kind of date processing. Simply set this in your php.ini Or if you are on a shared host, you can do it in a .htaccess If all else fails, put the following in your code Related posts: [Snippet] Formatting the date in [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/snippet-formatting-the-date-in-twitter-xml-feed/' rel='bookmark' title='[Snippet] Formatting the date in twitter XML feed'>[Snippet] Formatting the date in twitter XML feed</a> <small>The date in the Twitter XML feed is daft and...</small></li>
<li><a href='http://bloke.org/php/snippet-simplified-ukus-date-conversion/' rel='bookmark' title='[Snippet] Simplified UK/US Date Conversion'>[Snippet] Simplified UK/US Date Conversion</a> <small>One of my major annoyances in PHP &amp; MySQL world...</small></li>
<li><a href='http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/' rel='bookmark' title='[Snippet] Allow PHP in Smarty (CubeCart 5)'>[Snippet] Allow PHP in Smarty (CubeCart 5)</a> <small>Although it is generally bad practise to put PHP code...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/snippet-setting-the-timezone-for-php-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TimThumb upscale fix: stop timthumb from upscaling small images</title>
		<link>http://bloke.org/php/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/</link>
		<comments>http://bloke.org/php/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 17:40:48 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Rein Aris]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3602</guid>
		<description><![CDATA[ Ever found that TimThumb is upscaling your small images and looking crap? As of version 2.8.1 TimThumb does not check if the image is smaller than the specified proportions before resizing. Here's a fix thanks to Rein Aris, slightly updated to work with version 2.8.1 Find this code, starting on line 537 and replace with the [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/smarty-security-stop-tpl-access/' rel='bookmark' title='Smarty Security &#8211; Stop .tpl access'>Smarty Security &#8211; Stop .tpl access</a> <small>WHMCS uses the Smarty template engine. Which means your .tpl...</small></li>
<li><a href='http://bloke.org/php/embedding-videos-with-tinymce/' rel='bookmark' title='Embedding Videos with TinyMCE'>Embedding Videos with TinyMCE</a> <small>By default TinyMCE strips out any code that you would...</small></li>
<li><a href='http://bloke.org/html-css-ajax/prevent-images-from-displaying-while-loading-with-anythingslider/' rel='bookmark' title='Prevent images from displaying while loading with AnythingSlider'>Prevent images from displaying while loading with AnythingSlider</a> <small>AnythingSlider is just another jQuery slider effect, except we can...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Videos with TinyMCE</title>
		<link>http://bloke.org/php/embedding-videos-with-tinymce/</link>
		<comments>http://bloke.org/php/embedding-videos-with-tinymce/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 17:53:38 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[HTML, CSS, AJAX]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3369</guid>
		<description><![CDATA[By default TinyMCE strips out any code that you would use to embed videos or Flash into your site. To allow videos to be embedded you need to change how TinyMCE init's. Mainly, the valid_elements, extended_valid_elements &#38; valid_child_elements parts of the code. Use the following code Related posts: Who needs credit cards? I don't! Times are [...]
Related posts:<ol>
<li><a href='http://bloke.org/general/who-needs-credit-cards/' rel='bookmark' title='Who needs credit cards?'>Who needs credit cards?</a> <small>I don't! Times are hard. We're in a credit crunch,...</small></li>
<li><a href='http://bloke.org/php/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/' rel='bookmark' title='TimThumb upscale fix: stop timthumb from upscaling small images'>TimThumb upscale fix: stop timthumb from upscaling small images</a> <small> Ever found that TimThumb is upscaling your small images and...</small></li>
<li><a href='http://bloke.org/php/idiot-proof-lightbox/' rel='bookmark' title='Idiot Proof Lightbox'>Idiot Proof Lightbox</a> <small>I've just made some modifications to my Gallery code which...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/embedding-videos-with-tinymce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make an SEO friendly URL in PHP</title>
		<link>http://bloke.org/php/make-an-seo-friendly-url-in-php/</link>
		<comments>http://bloke.org/php/make-an-seo-friendly-url-in-php/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 17:41:55 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PS]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3483</guid>
		<description><![CDATA[Just like WordPress creates it's slugs or friendly URLs, I had to write some code to achieve the same for a customer running a custom web application. Here's how I did it. So, taking a string like; Rock Climbing Experience Plus One Year Membership for £15 at Rock Over Climbing (67% Off) We will get; rock-climbing-experience-plus-one-year-membership-for-15-at-rock-over-climbing-67-off Making [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/snippet-formatting-currency-string/' rel='bookmark' title='[Snippet] Formatting a currency string'>[Snippet] Formatting a currency string</a> <small>The Shopp ecommerce plugin for WordPress has a little annoying...</small></li>
<li><a href='http://bloke.org/php/truncate-string-nearest-word/' rel='bookmark' title='Truncate a string to the nearest word'>Truncate a string to the nearest word</a> <small>Truncating a string in PHP is easy, substr($start,$finish), but its...</small></li>
<li><a href='http://bloke.org/php/snippet-formatting-imei-number-php/' rel='bookmark' title='[Snippet] Formatting an IMEI Number in PHP'>[Snippet] Formatting an IMEI Number in PHP</a> <small>Formatting an IMEI number in PHP is reasonably simple. The...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/make-an-seo-friendly-url-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Header Redirects</title>
		<link>http://bloke.org/php/php-header-redirects/</link>
		<comments>http://bloke.org/php/php-header-redirects/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 01:48:30 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[HTTP]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3559</guid>
		<description><![CDATA[There's a few ways to redirect a page in PHP. Well, two. A right and a wrong. Wrong Way Right way This is evident on IIS6 and IIS7 where the wrong redirect will just fail. Even if you are not using IIS6 or IIS7 its good practice to set the headers correctly and exit the [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/using-wordpress-header-and-footers-externally/' rel='bookmark' title='Using WordPress header and footers externally'>Using WordPress header and footers externally</a> <small>I needed to integrate a WordPress header (header.php) and footer...</small></li>
<li><a href='http://bloke.org/apache/apache-redirects-based-on-ip-addresssubnet/' rel='bookmark' title='Apache redirects based on IP Address/Subnet'>Apache redirects based on IP Address/Subnet</a> <small>Ever needed to redirect a source IP address or source...</small></li>
<li><a href='http://bloke.org/php/wp-o-matic-fix-for-wordpress-25/' rel='bookmark' title='WP-o-Matic fix for WordPress 2.5'>WP-o-Matic fix for WordPress 2.5</a> <small>WP-o-Matic makes autoblogging a easy by automatically creating posts from...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/php-header-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress/Shopp Shipping Calculator/Options Access-Control-Allow-Origin Error</title>
		<link>http://bloke.org/php/wordpressshopp-shipping-calculatoroptions-access-control-allow-origin-error/</link>
		<comments>http://bloke.org/php/wordpressshopp-shipping-calculatoroptions-access-control-allow-origin-error/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 01:39:45 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shopp]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3593</guid>
		<description><![CDATA[I've recently been debugging a customer's WordPress/Shopp store. When the customer set the Cart &#38; Checkout to be served over SSL  the shipping calculator failed. Serving Cart / Checkout / My Account pages over SSL is not built into Shopp for some reason. I have a post on this -  SSL/HTTPS for Shopp pages or checkout process only. If [...]
Related posts:<ol>
<li><a href='http://bloke.org/wordpress/usual-wordpress-io-error/' rel='bookmark' title='Not your usual WordPress IO Error'>Not your usual WordPress IO Error</a> <small>Today I noticed I was getting the dreaded WordPress IO...</small></li>
<li><a href='http://bloke.org/wordpress/sslhttps-for-shopp-pages-or-checkout-process-only/' rel='bookmark' title='SSL/HTTPS for Shopp pages or checkout process only'>SSL/HTTPS for Shopp pages or checkout process only</a> <small>Shopp currently doesn't redirect you to any SSL/HTTPS pages during...</small></li>
<li><a href='http://bloke.org/wordpress/remove-shopp-javascript-from-non-shopp-pages/' rel='bookmark' title='Remove Shopp Javascript from non-Shopp pages'>Remove Shopp Javascript from non-Shopp pages</a> <small>Following on from a post on the Shopp forum regarding...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/wordpressshopp-shipping-calculatoroptions-access-control-allow-origin-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Snippet] Debugging Smarty on a live site</title>
		<link>http://bloke.org/php/snippet-debugging-smarty-on-a-live-site/</link>
		<comments>http://bloke.org/php/snippet-debugging-smarty-on-a-live-site/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 15:07:30 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Smarty Debug Console]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3588</guid>
		<description><![CDATA[Development server? Staging server? What are they? Sometimes we have to debug code on a live server. You know it. Adding the following code to your Smarty template will enabled the Smarty Debug Console for your eyes only. &#160; &#160; Related posts: [Snippet] Allow PHP in Smarty (CubeCart 5) Although it is generally bad practise [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/' rel='bookmark' title='[Snippet] Allow PHP in Smarty (CubeCart 5)'>[Snippet] Allow PHP in Smarty (CubeCart 5)</a> <small>Although it is generally bad practise to put PHP code...</small></li>
<li><a href='http://bloke.org/php/smarty-security-stop-tpl-access/' rel='bookmark' title='Smarty Security &#8211; Stop .tpl access'>Smarty Security &#8211; Stop .tpl access</a> <small>WHMCS uses the Smarty template engine. Which means your .tpl...</small></li>
<li><a href='http://bloke.org/wordpress/debugging-wordpress/' rel='bookmark' title='Debugging WordPress'>Debugging WordPress</a> <small>Debugging WordPress is actually quite simple. Stop yourself going grey...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/snippet-debugging-smarty-on-a-live-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Snippet] Allow PHP in Smarty (CubeCart 5)</title>
		<link>http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/</link>
		<comments>http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 14:27:47 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[CubeCart]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[GLOBALS]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3464</guid>
		<description><![CDATA[Although it is generally bad practise to put PHP code directly into your (CubeCart 5) Smarty templates, its sometimes inenvitable. You will need to edit controllers/controller.index.inc.php Change To This will enable PHP in your templates &#160; Related posts: [Snippet] Debugging Smarty on a live site Development server? Staging server? What are they? Sometimes we have... [...]
Related posts:<ol>
<li><a href='http://bloke.org/php/snippet-debugging-smarty-on-a-live-site/' rel='bookmark' title='[Snippet] Debugging Smarty on a live site'>[Snippet] Debugging Smarty on a live site</a> <small>Development server? Staging server? What are they? Sometimes we have...</small></li>
<li><a href='http://bloke.org/php/cubecart-paypal-ipn-hack-for-multiple-stores/' rel='bookmark' title='CubeCart  PayPal IPN Hack for multiple stores'>CubeCart  PayPal IPN Hack for multiple stores</a> <small>Heres a nice little hack to alter the IPN information...</small></li>
<li><a href='http://bloke.org/php/smarty-security-stop-tpl-access/' rel='bookmark' title='Smarty Security &#8211; Stop .tpl access'>Smarty Security &#8211; Stop .tpl access</a> <small>WHMCS uses the Smarty template engine. Which means your .tpl...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To List A Custom Post Type&#8217;s Taxonomies And Terms</title>
		<link>http://bloke.org/php/how-to-list-a-custom-post-types-taxonomies-and-terms/</link>
		<comments>http://bloke.org/php/how-to-list-a-custom-post-types-taxonomies-and-terms/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:10:28 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3460</guid>
		<description><![CDATA[Jennifer M. Dodd has published a brilliant article on listing post taxonomies / terms / formats &#38; categories. I love it! Entitled  How To List A Custom Post Type's Taxonomies And Terms, she offers two functions that cover displaying all custom taxonomies, terms, post formats, categories and tags. Just saved me hours writing my own. [...]
Related posts:<ol>
<li><a href='http://bloke.org/wordpress/redirecting-a-custom-post-type/' rel='bookmark' title='Redirecting a custom post type'>Redirecting a custom post type</a> <small>Ever had to rename a custom post type? Pain in...</small></li>
<li><a href='http://bloke.org/wordpress/custom-post-type-indexarchives/' rel='bookmark' title='Custom Post Type Index/Archives'>Custom Post Type Index/Archives</a> <small>Custom Post Types have come a long way recently. Custom...</small></li>
<li><a href='http://bloke.org/wordpress/really-simple-wordpress-post-filtering/' rel='bookmark' title='Really Simple WordPress Post Filtering'>Really Simple WordPress Post Filtering</a> <small>Sometimes you don't want to show every post category on...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/php/how-to-list-a-custom-post-types-taxonomies-and-terms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Snippet] Programmatically add a WordPress User</title>
		<link>http://bloke.org/uncategorized/snippet-programmatically-add-a-wordpress-user/</link>
		<comments>http://bloke.org/uncategorized/snippet-programmatically-add-a-wordpress-user/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 23:05:21 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://bloke.org/?p=3440</guid>
		<description><![CDATA[Here's how I would programmatically add a WordPress User Related posts: [Snippet] Manually reset a WordPress password WordPress stores user passwords in MD5 checksums, so using your... Debugging WordPress Debugging WordPress is actually quite simple. Stop yourself going grey... [Snippet] Allow PHP in Smarty (CubeCart 5) Although it is generally bad practise to put PHP [...]
Related posts:<ol>
<li><a href='http://bloke.org/mysql/snippet-manually-reset-a-wordpress-password/' rel='bookmark' title='[Snippet] Manually reset a WordPress password'>[Snippet] Manually reset a WordPress password</a> <small>WordPress stores user passwords in MD5 checksums, so using your...</small></li>
<li><a href='http://bloke.org/wordpress/debugging-wordpress/' rel='bookmark' title='Debugging WordPress'>Debugging WordPress</a> <small>Debugging WordPress is actually quite simple. Stop yourself going grey...</small></li>
<li><a href='http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/' rel='bookmark' title='[Snippet] Allow PHP in Smarty (CubeCart 5)'>[Snippet] Allow PHP in Smarty (CubeCart 5)</a> <small>Although it is generally bad practise to put PHP code...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://bloke.org/uncategorized/snippet-programmatically-add-a-wordpress-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

