<?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/"
	xmlns:georss="http://www.georss.org/georss" 
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>bioneural.net &#187; simplepie</title>
	<atom:link href="http://www.bioneural.net/tag/simplepie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bioneural.net</link>
	<description>bioneural.net is for stuff worth sharing: commentary by Bruce McKenzie. Major topics covered are gadgets, informatics, Internet, Mac, mobile, musings, New Zealand, photography, Project Koru, quicklinks, rant, rave, travel and Windows</description>
	<lastBuildDate>Sat, 13 Mar 2010 15:49:45 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<title>bioneural.net</title>
		<url>http://www.bioneural.net/images/kiwi-yellow-64px.png</url>
		<link>http://www.bioneural.net</link>
		<width>64</width>
		<height>64</height>
		<description>bioneural.net</description>
	</image>
		<item>
		<title>Latest tweets using SimplePie</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie#comments</comments>
		<pubDate>Mon, 09 Mar 2009 01:17:14 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1457</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> It's taken me a while to warm to Twitter. I created the Quicklinks category on my blog for sharing things that didn't warrant a full post, but even that's too much effort sometimes&#8212;especially if it's just sharing a link. You might argue that's what bookmarking services like Digg and Delicious are for, but even then it's a multistep process. I've only recently become aware of just how well suited the Twitter API is to sharing links or updating your status message to multiple services with minimal effort. This post shares some PHP code to integrate your tweets within your WordPress blog, and code to simplify getting your WordPress posts into other people's tweets.


The interconnectedness of tweeting

A few examples:


	I use the Twitter updater plug-in to notify Twitter of new posts on my WordPress blog.
	Darkslide on my iPhone can post a Flickr image link via the iPhone Twitterrific app. 
	Most of my links are discovered in my preferred RSS reader NetNewsWire, which can send these to desktop Twitterrific (News menu).
	The Twitter app for Facebook will update your Facebook status using your tweets.
	Twitter offer an RSS feed which can be used in conjunction with the SimplePie PHP library to bring tweets to your WordPress blog.


This last example is the focus of this post. I will assume that you have already downloaded and correctly installed SimplePie for WordPress from here.

A SimplePie template for Twitter

Create a text file called tweets.tmpl containing the following:



	{IF_ERROR_BEGIN}{ERROR_MESSAGE}{IF_ERROR_END}
		{ITEM_LOOP_BEGIN}
		{ITEM_DATE_UTC}{ITEM_DESCRIPTION}#
		{ITEM_LOOP_END}



Upload this file to the following directory on your server:

/wp-content/plugins/simplepie-plugin-for-wordpress/templates/

Now for a little ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>A Xmas spent upgrading bioneural.net</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2007%2F12%2F27%2Fa-xmas-spent-upgrading-bioneuralnet%2F&amp;seed_title=A+Xmas+spent+upgrading+bioneural.net</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2007%2F12%2F27%2Fa-xmas-spent-upgrading-bioneuralnet%2F&amp;seed_title=A+Xmas+spent+upgrading+bioneural.net#comments</comments>
		<pubDate>Thu, 27 Dec 2007 17:08:26 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2007/12/27/a-xmas-spent-upgrading-bioneuralnet/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> It's amazing how much detritus accumulates in your server directories and MySQL tables over the years. Add to the mix a propensity to hack core files to the point where you dare not upgrade your packages, and you have yourself a fine mess. I hope it wasn't too obvious, but bioneural.net had developed Diogenes syndrome. It was time for a clear-out and makeover. If you're thinking that sounds like work, it is. What follows is not riveting reading, but if you're contemplating doing the same, perusing what this involved for me might help you judge how many days to set aside&#8212;and maybe bug-fix your own migration.


Why upgrade?



There were multiple reasons why I felt a major overhaul was called for:


	My host (mt) told me I needed to upgrade from my (ss) product to the (gs) product that had superseded it, and that if I took no action I would "loose the benefit of choosing [my] own migration timeline";
	The (ss) product was stuck at MySQL 3.23.58 and PHP 4.4.1, whereas the (gs) upgrade offered MySQL 4.1.11 and PHP 4.4.7 or 5.2.2;
	Such upgrades would bring security fixes, as would upgrading Gallery from 2.1.2 to 2.2.4;
	WordPress 2.3.1 (current as of this writing) requires MySQL 4.0 or greater, so I was stuck on WordPress 2.0.11;
	I wanted to configure ecto 3 to work with WordPress's new integral tagging system (ecto 2 did work with UTW and some hacks to xmlrpc.php);
	I made a number of hacks to core WordPress files (xmlrpc.php, wp_rss2.php, etc.) which makes updating a ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2007%2F12%2F27%2Fa-xmas-spent-upgrading-bioneuralnet%2F&amp;seed_title=A+Xmas+spent+upgrading+bioneural.net/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Baking SimplePie with favicon topping</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F07%2F01%2Fbaking-simplepie-with-favicon-topping%2F&amp;seed_title=Baking+SimplePie+with+favicon+topping</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F07%2F01%2Fbaking-simplepie-with-favicon-topping%2F&amp;seed_title=Baking+SimplePie+with+favicon+topping#comments</comments>
		<pubDate>Sat, 01 Jul 2006 00:17:52 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[opml]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2006/07/01/baking-simplepie-with-favicon-topping/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> Having settled on SimplePie as a solution for embedding iStockPhoto feeds, I decided to see if I could use it to parse the latest posts from multiple sites in my OPML file (blogroll if you prefer). Would it really be as simple to cook as it sounded? There were qualifiers, however. I wanted to show only a selection of headlines at any one time. I wanted to vary the order in which the sites were listed. And I wanted to automatically fetch and display the favicon for each site. Armed only with copy-and-paste level PHP know-how, I was going to need help in the kitchen&#8212;that much was clear at the outset.


Update 18.08.06: Ryan has added error handling for feeds which specify no author; this eliminates most of the fatal errors I was getting with some feeds. If a particular feed doesn't work for you there are several things to try: Is it specified in the page (required for auto-discovery) or must you specify the full feed URL cf. the domain name? Is the feed valid? If a site offers RSS and Atom feeds (WordPress sites do by default) try varying the feed format. Also, specifying the actual feed path rather than relying on auto-discovery should reduce display time. Many thanks Ryan!

Link lists

Lists of links to other sites are just plain boring. But they can be functional, potentially serving a number of purposes:


	Bookmarks that the siteowner uses to track sites of personal interest;
	Serving readers by linking to sites with related news ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F07%2F01%2Fbaking-simplepie-with-favicon-topping%2F&amp;seed_title=Baking+SimplePie+with+favicon+topping/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Embedding iStockPhoto feeds revisited</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F06%2F15%2Fembedding-istockphoto-feeds-revisited%2F&amp;seed_title=Embedding+iStockPhoto+feeds+revisited</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F06%2F15%2Fembedding-istockphoto-feeds-revisited%2F&amp;seed_title=Embedding+iStockPhoto+feeds+revisited#comments</comments>
		<pubDate>Thu, 15 Jun 2006 11:17:53 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[istockphoto]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2006/06/15/embedding-istockphoto-feeds-revisited/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> In an earlier post I described a JavaScript-based method to include recently-approved iStockPhoto images in a page on your website. When I migrated from a static blogging system (iBlog) to WordPress I found a useful plugin that worked very well in MAMP. Unfortunately it broke when I moved my developmental site to a live DreamHost server. Here is a bit more background to the problem and an eventual solution that uses SimplePie. Although the focus here is on displaying photographs, it's a solution that should work with practically any feed you might wish to embed.


No go with latestistockimages.php

I was initially using Christine's (of UTW fame) iStockPhoto plug-in for WordPress to display my latest approved images. This worked fine under a localhost development environment, but when I went "live" with DreamHost it stopped working due to the blocking out "outdated" PHP code that posed a security risk. For some reason my e-mails to the author went unanswered, and the download link has been a 404 for ages.

Plugging the gap with Feed2JS

I turned back to Feed2JS, with this in my sidebar:



	My iStockPhoto photocast
	 ]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F06%2F15%2Fembedding-istockphoto-feeds-revisited%2F&amp;seed_title=Embedding+iStockPhoto+feeds+revisited/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Welcome to WordPress</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F03%2F16%2Fwelcome-to-wordpress%2F&amp;seed_title=Welcome+to+WordPress</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F03%2F16%2Fwelcome-to-wordpress%2F&amp;seed_title=Welcome+to+WordPress#comments</comments>
		<pubDate>Thu, 16 Mar 2006 03:30:31 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[iblog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2006/03/16/notes-on-migration-to-wordpress/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> Beware: As at March 16 2006 this site is potentially unstable. Lots of things are broke. If you are using Internet Explorer 6 or older please consider upgrading to a browser with better standards support, such as Firefox, Safari, or Opera.

bioneural.net has migrated from iBlog to WordPress.




How to migrate from iBlog

Coming... sometime.

Update 29.05.06: A step-by-step migration guide is now online, here.

Things to fix


Weather Icon: WARNING: You forgot to make the cache directory writable. Please chmod 777 this folder. Should show icon + temp only; why is other data displaying?
iStockPhoto feed is not displayed. Why?

Warning: fopen(): URL file-access is disabled in the server configuration in /home/.ashea/bioneural/bioneural.net/wp-content/plugins/latestistockimages.php on line 50

Warning: fopen(http://www.istockphoto.com/istock_myfiles_rss.php?ID=430123): failed to open stream: no suitable wrapper could be found in /home/.ashea/bioneural/bioneural.net/wp-content/plugins/latestistockimages.php on line 50

Dreamhost Support say:


We've purposely disabled URL access to php system functions (such as copy() open() etc.) because of security and performance problems.  We have replaced it with CURL:

http://wiki.dreamhost.com/index.php/CURL

Unfortunately, it's beyond the scope of our support as how to port your script to use CURL instead of the system calls, but we can definately say it would do the job. You may want to talk to the maker of the plug-in about converting in, since frankly no good PHP is written using fopen these days.


Solution may be SimplePie or reverting to JavaScript via Feed2JS?

I tried hacking the plug-in based on some CURL examples but this took the site down! SimplePie is not so simple; temporary reversion to Feed2JS completed solution currently in testing implemented (with help from ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2006%2F03%2F16%2Fwelcome-to-wordpress%2F&amp;seed_title=Welcome+to+WordPress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
	</channel>
</rss>
