My life in a stream
Thursday, February 26th, 2009 at 11:23 pm
A few minutes ago I changed the home of popcorn.cx to display the output of Lifestream for Wordpress, the plugin that I have been playing around with for the last week. Previously the home page was the same as the blog index except for the addition of a Flickr badge across the top.
Despite not saying anything, I have had a look at other lifestream plugins. I returned to the first one I tried because it was easy to install, it worked and it has active development. I am also planning to send in some patches for the couple of bugs that I have fixed so far.
Of the big list I initially gave, some were me not understanding the functionality correctly (the iBox stuff), some were actual bugs, some were changes to other things and some I am going to live with for now.
The changes I have made are:
- Reverted back to an earlier version of SimplePie, the RSS parser, as I traced the problem with the Amazon wishlist back to the latest devel version. I submitted a bug report with them.
- Modified the FeedBurner plugin to also check for ?direct=1 in the URL so the links to my own posts were not redirected through FeedBurner. (The main reason for this was because FeedBurner seems to be playing up – sometimes with feedproxy.google.com URLs and sometimes with the original feeds.feedburner.com URLs, but not the most recent posts)
- The timezone setting for the plugin let you choose an offset from -12 to +12 (displaying adjusted time in a drop down), but that is not an offset from epoch, it is an offset from the server time. My server is in -8 while I am in +11. That is an offset of +19, yet when I chose the correct time of day it gave my -5. So all events were a day out. I tweaked the settings page to adjust the offsets based on the server zone (-4 to +20 instead) which fixed that.
- In the rendering code I needed to apply the offset where it works out if it should display ‘Today’ or ‘Tomorrow’ instead of the actual date.
- The code that groups all of the events for a day also needed the offset added as it was done using the SQL DATE() function which (again) uses the (MySQL) server timezone.
- Added ordering to grouped events (so they show the same as how I added them)
- I added LibraryThing as a feed.
I still have other changes planned, but these got me to a point where I was happy to use it on the home page.
One major change that I would like to do is to change the Flickr feed to use the Flickr API instead of just the RSS feed. A limitation of the RSS is that it is only the 20 most recent items. The other night I added 67 photos from the photo walk. Initially it was showing 40 items because the feed refreshed during the upload, but now it only shows 20 because I readded the feed and it lost the history. The API wouldn’t have that limitation: my photos page (that has been there for a while, but I don’t link to it from anywhere) uses the API to get all the photos that I have uploaded. And as you can see it also gets set information that might be good to include.