[Snippet] Lifestream script
#1
Posted 12 January 2009 - 12:47 AM
File Submitter: bogge
File Submitted: 12 Jan 2009
File Updated: 12 Jan 2009
File Category: 3rd Party Integration
This snippet generates a lifestream with the Etomite CMS, using SimplePie. Don't forget to add your own feeds...
Demo
More information and css example
Usage
[!lifestream!] Shows lifestream
[!lifestream?limit=20m&cachelen=3600!] Shows lifestream fetching 20 posts from each feed and with 1h cache.
Note: You must have a working SimplePie “installation” for this snippet to work.
Click here to download this file
#3
Posted 12 January 2009 - 04:36 PM
Basicaly you feed the script with feeds (rss) from various sites and services (like flickr, delicious, blogs). The script takes all the feeds items and organize it in a chronological order and output the organized information in a list. That list is you lifestream.
But if you look at the demo (the list with different colors is my lifestream, what i have done online the last month.) and the more information, i think you should be able to figure this out.
Maybe a better English speaking person could explain this better...
#4
Posted 12 March 2009 - 03:51 PM
(My etomite installation is in the top level directory - if yours is in a subdirectory the cache directory may need to be added at that level.)
#5
Posted 13 March 2009 - 06:29 AM
I will correct this problem and release a new version, as soon as possible.
But in if i understand the problem you want to control the location of the cache folder. To do so you can add the following line to the script:
$feed->set_cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache_files');
I should be placed between these lines:
$feed->set_cache_duration($cachelen); $feed->init();
By changing the you can control exactly where the cache files should be stored. I wil add this feature to next version.
#6
Posted 13 March 2009 - 12:47 PM
I was only using the snippet to check that I had simplepie properly installed and integrated with etomite, and that I could get the information I wanted back from a wordpress site. I posted so that if someone had a similar problem there was a possible solution documented. I didn't try to work out why the snippet wasn't working, as I won't be using it for the live site.
Thanks for providing the snippet - it made the testing I needed to do easy!
#7
Posted 14 March 2009 - 10:55 AM
As default the default cache directory is set in simplepie.inc row 490, and it is set to "./cache".
So if you have installed Etomite in website root, the default cache location is root/cache.
So that is why you got that problem i think. Nice to be of some use, enjoy!
#8
Posted 29 June 2009 - 12:37 PM
Your snippet worked perfectly - thank you.
Unfortunately whenever I connect to my own blog I don't get anything returned. I have just installed the latest wordpress and posted a few test posts. It is really weird.....
I can link to the rss feed through my browser bookmarks reader and that all works fine. So I assume it is all working fine.
Your script produced a blank page when I tried to connect to my own blog, so I tried the example page from SimplePie. It worked fine for the example feeds but when I put my blog feed in it again showed up blank. I have searched wordpress but I only found two users with similar problem and no one had given an answer or suggestion (six months old those posts were).
I don't suppose you have any ideas what could be up with wordpress do you? I have searched all the admin options etc and documentation but to no avail?
(Sorry if this has nothing to do with your script - which works perfectly it seems for every site feed except mine :-)
Thanks for a great script btw.
Paul.
PS I even installed the Better Feed plugin to see if that helped, but it has made no difference :-(
This post has been edited by PaulD: 29 June 2009 - 12:39 PM
#9
Posted 29 June 2009 - 01:21 PM
PaulD, on 29 June 2009 - 12:37 PM, said:
Your snippet worked perfectly - thank you.
Unfortunately whenever I connect to my own blog I don't get anything returned. I have just installed the latest wordpress and posted a few test posts. It is really weird.....
what address did you give for the feed - I got this wrong the first time. Other applications may do auto-discovery of the feed address better, or differently. (my feed on one site is http://blog.roguegen...m/tags/rgc/feed - initially I didn't have the feed at the end, which worked elsewhere but not here - the feed address generation may not be the wordpress default - I know I made some changes in other areas.)
#10
Posted 29 June 2009 - 10:14 PM
It was exactly what I was thinking, that I was simply not providing the right feed address. I have since tried all the default options:
http://example.com/feed/
http://example.com/feed/rss/
http://example.com/feed/rss2/
http://example.com/feed/rdf/
http://example.com/feed/atom/
http://example.com/?feed=rss
http://example.com/?feed=rss2
http://example.com/?feed=rdf
http://example.com/?feed=atom
http://example.com/wp-rss.php
http://example.com/wp-rss2.php
http://example.com/wp-rdf.php
http://example.com/wp-atom.php
...and none are working. I have also deleted everything and reinstalled completely from scratch with a new database and still the same problem :-(
I have also tried all these with permalinks on and off. I also tried all these with www and without etc. etc.
I only started all this because I was stuck accessing the wordpress database directly using getExtTableRows (in this topic) and I thought the problems might be related. I don't think they are now.
I was only accessing the database directly myself because the technique of requiring the header.php (giving access to all the functions) was not working either in my php enabled chunk.
I love SimplePie and will use it, when I can get it to work with my blog. I think I am going to try using this lifestream snippet on another etomite site, and see if I can read my blog that way. There was some hints that having wordpress in a subfolder may be causing an issue (at least with feedburner anyway, so could be similar). Either way, I am stuck and just a bit fed up with it now :(
Thanks for the suggestion though. I did search SimplePie and Wordpress Codex but again, with no clues as to what it might be. I may go and search SimplePie again.
Paul.
#11
Posted 30 June 2009 - 12:47 AM
By installing the feedburner plugin on wordpress I have redirected all feed links to feedburner.com.
Then by using the feedburner link in the simplepie snippet LifeStream I finally get my posts!
If simple pie was not so cool, this would not have achieved what I wanted. But for now (given how much I like simple pie) it will do.
So etomite, lifestream, my wordpress install and associated feeds all seem to be working. But I cannot get Lifestream to read my local blog directly. I wonder if it has anything to do with my host? Or perhaps it is the sub folder issue that is causing problems. I can only test that by installing wordpress in the root and trying again, but am still a bit fed up with it all.
Just thought I would let you know how I solved it (for now at least.)
Am off to play with it now.
Paul
:)
PS Thankyou Bogge for the snippet. I may not use it directly but if I don't thank you for the inspiration!
This post has been edited by PaulD: 30 June 2009 - 12:49 AM

Sign In
Register
Help
MultiQuote