now/Lifestream, ala WordPress
UPDATE: I have a fix for the time problems. You need to add the following code right after line 93 of stream.php (that line should look like this: $date = strtotime( substr( $item['pubdate'], 0, 25 ) );):
$date -= 3600*N;
Where N is how many hours you need to remove. If you need to add time, then change the -= to +=
I really like the concept of Jermey Keith’s Lifestream, and after reading Mike’s cry in the dark for something akin to this, that caches, I decided to create a plugin/page template combo that replicated Jeremy’s code, but using only bits and bots that are present in WordPress.
This doesn’t really address much of Mike’s needs… I am pretty sure I could easily wedge this data into an RSS feed if I wanted to, but I don’t really care to at the moment. Maybe tomorrow. What this does do is use the bundled versions of snoopy and magpieRSS to query and render the content.
This gives us built in caching, and a mechanism for retrieving the data that gets around host restrictions on fopen and the like.
There are currently two caveats to this code:
So there swell, I have a Lifestream, now I just need to stay on top of updating it. If you would like to take it for a spin, you can download the code, sans CSS, over here
comment/Content
comment/Information
I love the idea of this. I’ve never seen it before. I’ll definitely be trying it out. Thanks!
This is great; i hope ;) — How does it store the data?
The reason I’m looking for something which can store the data in the post table, is so that it’s easy to use the traditional WP tools for retrieving and displaying them, as well as searching and what not.
PS: Is the time set right in your lifestream? You need to go to bed sooner ;)
Now that is cool. One of the more interesting bits of code that I’ve seen in the past week. Must. Try. To. Find. Time. I’ll definitely play around with this.
Im getting an error;
Fatal error: Undefined class name ‘self’ in /usr/home/path/to/life.php on line 29
which is
self::install();
Using some Googleing it seems that maybe this is because my server is php 4. Im still looking into it, but any ideas?
[…] Ive set up a rather flakey Lifestream using Chris Davis’ code. Text Link Ads […]
Hey Mike,
Yeah, as I was saying in the post, this doesn’t really meet your requirements. The content is saved as a serialized RSS object in the options table. I could look into saving it to the post table in the future.
Matthew,
I was just about to suggest that. I had though self was a valid construct for PHP 4, guess not. As for the timezone thing, I don’t think it is actually working, so don’t sweat it. I will be releasing an update that finds the time another way.
Seems I’m on PHP4 as well. Damn. I’ll have to go through the files and change the self thingie as well.
It doesn’t seem to do anything if I add another stream that isn’t one of the defaults. I even tried manually adding another line to the options table in the db.
also… i noticed there are no rss_* lines in my options table either….
It works… just not for any other feeds I add.
It seems like it wasn’t liking the atom feed, so I ran it through feed burner but its still not working. Not sure what is wrong with it, but if I switch the feed out and replace it with another feed it works.
I’ll keep playing with it and let u know what I find :)
Awesome Chris. I was wondering when you’d release the code for this after your mentioning it on Twitter (yes, I’m that in tune with your life…. *cue spooky music*).
Anyways, it would be cool to have this data stored somewhere (or archived) for that matter, but in the internim it looks nifty, so yeah, thanks!
[…] Check out this LifeStream wordpress plugin that ChrisJDavis put together, you can see an example of it here on my site. Basically what it does is create a combined list of all of your online activities. Very cool, in fact I’m thinking about replacing my photoblog with this, since I don’t use it anymore. […]
kristin,
Yeah, magpie chokes on ATOM feeds for some reason. From a once over of the code, it should handle them, but something is b0rken.
Also magpie is a stickler for well formed feeds, so if there is an error in a feed it won’t be displayed. That is what is happening with Twitter’s feed.
Kartooner,
I am not sure what the use of that would be, but that hasn’t stopped me from coding things in the past, so why let it stop me now?
This is very much a 1.0 release, expect better error handling, and feed handling in the next major release. There will be a quick error fix release today sometime I imagine.
This is great. The only problem that I have is that I’m unable to change the date. It’s set to American/Eastern or something, but I wanna change it to Australia/Sydney, but it doesn’t show the date/times I want. Any ideas on how to sort this out?
Also, what should I be looking for in the database to delete all the data?
I tried change the time settings, but it didn’t work. Everything is still showing the same times as before.
Oh, and thanks for the heads up on the control panel.
so, this is probably a total n00b question… but… i just installed it all and had two problems.
1) why is it only showing your stuff chris? even though my info is in there.
2) i’m getting this error:
Warning: array_slice() [function.array-slice]: The first argument should be an array in /home/.desi/seanmcdonaldhome/seanmcdonald.ca/wp-content/themes/Cutline/stream.php on line 81
Warning: Invalid argument supplied for foreach() in /home/.desi/seanmcdonaldhome/seanmcdonald.ca/wp-content/themes/Cutline/stream.php on line 83
well, i figured out why it was showing chris’ stuff and not mine, found that in the file - although, i guess that means the admin page doesn’t work?
still getting that array_slice() [function.array-slice] error i mentioned in my previous comment.
i apologize for being the equivalent of spam on here today… i didn’t read the two caveats that you put up Chris.
i put the twitter feed through feedburner and the issue went away, although my lifestream has some strange and random dates going backwards right now. i’ll play with it some more.
thanks for this.
seanmcdonald.ca/lifestream
No problem Sean, I hope your experimentations go well.
Thanks for the update Chris. That extra line of code works like a charm. :D Now it doesn’t look like I’m on the net in the early hours of the morning.
Oh, just to have an archived life I suppose.
Hey, would it be possible to make it compatible with Ma.gnolia’s feed in the future release? I use that over Delicious, mainly because of the functionality of it over anything else.
Yeah, I’m definitely in it to archive my life to the extend possible. Also, by storing the lifestream as posts, you can easily use all the tools available to normal posts on them.
And the cross-referencing possibilities are endless! :D
I really like this plugin and I also like this idea of archiving ones life. The only thing I saw as a problem was on my side actually because I don’t put title’s on my flickr photos so that comes up as an empty pink box :)
Terrific idea, good work on the plugin, it just needs a little bit of extra love and it will be a great thing.
I must be doing something terribly wrong.
a) I get two headers on my lifestream page.
b) The stream is placed at the bottom.
Any idea what I’m doing wrong? Sorry for being a noob here…
Mike,
I get it Heilemann, I get it. I will do my best to whip something up for you, as I always do. :)
Gunnar,
So, what are you thinking exactly when you say “a little bit of extra love”? I need details people!
Dennis,
Off the top of my head, I would think it is the fact that the template file
stream.phpis set up for my theme, and not yours. Experiment with working the lifestream code into one of your existing page templates and see how that works.well, mine is up and running… thanks Chris.
the only issue i’m having is with time, and i think it’s not hte plugin, but my accounts… cocomment is off by hours and i’ve check my settings. del.ico.us seems really slow at coming it.
other than that, it’s great…
archiving would be cool.
You don’t know how long I’ve been thinking about something like this. Thanks for a wonderful plugin. I second the idea of this being put into a database and then presenting it form their. It would allow endless cross referencing and a search ability. For some reason my del.icio.us is only posting a link I saved about 6 months. It’s the last item in the feed and it’s indicated it was posted yesterday (but in the feed it says March). Other then that I realized for some reason flickr’s time was behind 3 hours but everything else was 5 hours ahead so I added a little something to your time stamp update above (also the parentheses and colon in your example through me off for a sec) .
$date = strtotime( substr( $item[‘pubdate’], 0, 25 ) );
if( $name == “life_flickr”) {
$date += 3600*3;
}
else {
$date -= 3600*5;
}
Thanks again Chris.
Yeah, I get this too. I’ve seen a few people getting it to work properly, though I don’t get how.
When I first stumbled across JK’s stream, I wonder how long will it takes for someone to write a WP plugin of the equivalent. Well it certainly doesn’t take too long, does it?!
Nice work. Although I know a couple of people have had problem with magpieRSS’s caching because of the lack of file locking mechanism. That could lead to cache corruption that can sometimes occur when there are a large amount of concurrent users trying to read and write to your cached rss data.
But I wont take the credit away from you, nice job!
FYI: You can try looking into pear’s cache_lite in the future for better caching capability.
chris… i’m sure this is already possible in the code, but i couldn’t quite figure where to make the change.
a good addition would be to control how many days show - when i figure it out i’ll likely keep it to the last week.
if it were archived, i suppose you could go back and check out previous weeks.
this is a great idea, but I am having a lot of problems installing the actual script, even after changing self to lifeadmin.
[…] In a effort to be a little more like the cool kids I added a lifestream to this very site. A lifestream is pretty much just a combined list of all of your online activities. I’m currently tracking my Twitter, Flickr, Last.fm, and blog posts. Many thanks go to ChrisJDavis for his nifty lil WordPress plugin. […]
Brandon, not ALL ‘self’s change to lifeadmin, just those within that class. The other ‘self’s change to whatever class they are within.
What I showed was just an example.
Thanks matthew.
Perhaps an updated version for those of us on php 4 would be incredibly helpful for us :)
i just found out from feedburner that once you put feeds through their format conversion, they can’t garuntee what timezone it will come out representing.
i’ve tried diong this to manage the times:
$date = strtotime( substr( $item[‘pubdate’], 0, 25 ) );
if( $name == “life_flickr”) {
$date += 3600*3;
}
else if( $name == “life_delicious”) {
$date += 3600*1;
}
else {
$date -= 3600*6;
}
this is the point where it becomes obvious i’m a hack at php and i start messing things up… it’s working to some extent, but some of the times still aren’t working 100% not even sure if there’s anything that could be done about this in the actually plugin.
I did the same exact thing Sean. I had to add more code for twitter’s time (when it finally came back up yesterday and I was able to get it to run thru feedburner).
if( $name == “life_flickr”) {
$date += 3600*3;
}
elseif( $name == “life_twitter”) {
$date += 3600;
}
else {
$date -= 3600*5;
}
Chris, something is wrong with the gravatars on here. ijust got the completely wrong one next to my name (I should be the Space Invader guy).
Thanks for the time tips everyone, and Gil, Gravatars are all screwed up everywhere. That isn’t something I have control over.
[…] And also thanks to Chris of course, for creating this wonderful plugin. […]
i just noticed that lifestream doesn’t cache entries from last.fm - it only keeps track of the last 10 songs. so, if you’ve played 5 songs today, it will only have 5 songs from the day before - or 3 songs from yesterday and 2 songs from the day before that…
so basically, in your entire lifestream it will only show the last 10 songs you’ve played.
i’m almost there… i think(?)
i am however getting two errors:
1. Fatal error: Call to undefined function: install() in /go/wp-content/themes/281/life.php on line 29
2. Fatal error: Call to undefined function: get_option() in /go/wp-content/themes/281/life.php on line 27
any help is greatly appreciated! i can’t figure this on out.
thanks!
[…] Толком к этому всему новый плагин для абсолютного эксибионизма на блоге - Lifestream. У меня пока что не получилось его заставить работать. Выдаётся фатальная ошибка на какой-то класс. Via Binary Bonsai. […]
First of all, this is great plugin! Thanks for that. I just downloaded and i’m trying to install it in of mine blogs.
I’ve met simular problems as matthew above with undefined class ‘self’. But it resolves, as was sayed, replacing ‘self’ by ‘lifeadmin’ plugin works ok.
Other problem is a function ‘date_default_timezone_set’ in stream.php which is avaible only in php5 and above. Anyway, i’ve commented it out and seems to work fine for me.
Sorry for my bad english and tnanks again!
ok, i have everything working but the date. when the existing text is in place:
date_default_timezone_set(“America/Eastern”);
i get a fatal error. are there specific parameters i should put in like GMT or what?
any help is VERY appreciated!
thanks for the great plugin!
also, last one i promise. is there a way to set the number of days or time you want the posts to show?
thank you!!
i got the
Fatal error: Call to undefined function: install() in /home/toze/public_html/texto/wp-content/themes/minimalistic/life.php on line 29and i don’t think i’m php-savvy enough to solve it.can anyone shed some light on this please?
I’m just testing this out, I get an error on line 29 also. I made the lifeadmin:: changes that were suggested earlier up the comments, but it now says I have an undefined function instal() on the same line. Any help, I’m a complete php novice.
i believe this has to do with the php4 issue. i had a similar problem which was solved by the self/lifeadmin issue on a previous post.
i’m not a superstar w/ php either so i could be wrong. any have any to add?
and when someone has a spare second can i get an answer for the time issue i posts a couple of posts back?
thanks so much!
Lots of PR love. Just a detail, but why not add
rel="nofollow"around line 129 in stream.php ?franky. dumb question from a relative newby but what does that accomplish? might need to add it to mine(?)
also, do you know why i get an error with the time phrase:
date_default_timezone_set(“America/Eastern”);
on line 73?
thanks!
Any instructions on how to install this? I have the plug activated and all i get is a blank screen under manager
[…] La cosa buffa è che la maggior parte di queste informazioni sono spesso gi
Anyone figure out the del.icio.us issue yet? Perplexing.
My Flickr feed seems to be on US time instead of GMT, it would be nice if we could set manually an amount of hours to +/- from the feeds time incase they don’t follow my local timezone?
[…] I’ve bodged together a quick Lifestream ala Jermey Keith, using Chris J. Davis’s plugin. It’s still a bit rough around the edges, and some of the times are wacky but should do for now. […]
Will there be a final/stable version for public download? I love the idea around the lifestream feature but I am hardly a php coder…
Could somebody send me his fixed version of the plugin? Somehow I can’t get it installed or fixed. Thanks a million!
I finally got it working and I am quite thankful.
I don’t know if you are taking feature requests, but…
A storage type thing to keep more than just the 10 last.fm tracks.
ability to isolate one feed and display them all together? ajax?
Consider using API?
[…] I also need more creative outlets which don’t involve my computer since, owing equally to school and nerdom, I spend a lot of time staring into a light bulb behind a screen. But against my luddite pleas, I’ve been following a very 2.0 way of scrapbooking. Something called a lifestream. It aggregates all my various social networking identities and presents them as one continuous stream. It’s still in it’s infancy, so expect strange happenings. Posted by rabsteen Filed in General, the fabulous life […]
[…] Lifestream, ala WordPress @ Sillyness Spelled Wrong Intentionally (tags: wordpress plugin rss flickr php del.icio.us) […]
Thanks for this! Got it working, but just see weirdness with my Twitter and Delicious feeds. Nothing that can’t be fixed.
Very cool.
Sorry that I spammed this entry so utterly. Again, if you lads got a fixed version, could please send it?
My email’s: bombayvindaloo@gmail.com
[…] This is all thanks to Chris J Davis’ Lifestream plugin. […]
Gunnar Hafdal. you are the bomb! thanks so much!
that time bug was killing me.
cheers!
Unfortunately I am getting an error on the top of my page that reads:
Warning: array_slice() [function.array-slice]: The first argument should
be an array in
/home/.jerrie/hubs/artifacting.com/blog/wp-content/themes/k2/stream.php on
line 115
Warning: Invalid argument supplied for foreach() in
/home/.jerrie/hubs/artifacting.com/blog/wp-content/themes/k2/stream.php on
line 117
This is the section of the code giving me problems:
$details = array(‘title’,’link’);
$list = array();
foreach ( life::defaultStreams() as $name => $feed ) {
$rss = @fetch_rss( $feed );
$items = $rss->items = array_slice( $rss->items, 0 ); **THIS IS LINE 115**
foreach ($items as $item ) {
$date = strtotime( substr( $item[‘pubdate’], 0, 25 ) );
$date += 00*10;
$list[ $date ][ “name” ] = $name;
foreach ($details as $detail) {
$list[$date][‘title’] = $item[‘title’];
$list[$date][‘link’] = $item[‘link’];
}
}
}
Do you have any idea what might be causing this?
Again thanks for all your help. I know you owe me no favors, so i
sincerely do appreciate it!
No problem, I’m glad that I can be of any help :)
i’m sorry to pester you chris (or anyone into php, anyway), but i figure the reason the plugin isn’t working for me is that the server that hosts me is still on php4. so is there any gracious soul who’d convert this to php4? i’d be very grateful :)
what plugin are you guys using that allows for php in your content and pages?
My lifestream page is empty. No errors, just a blank page. Install is setup correctly with lifestream as the page template. Any clue where to start here?
[…] Chris J Davis has created a geeky cool plugin for wordpress that allows you to easily put up your “lifestream” Essentially a timeline that documents all your online antics from flickr, delicious, twitter, last.fm, and any other thing you’d like to hack into it. Not quite completely polished but very promising. You can check mine out here which still needs a bit of tweaking. You can get it for yourself from Chris’ site. […]
[…] So I added lifestream from the great Chris J. Davis…one problem. The time doesn’t work with PHP 4. I don’t want to call my hosting company and ask them about that…It might cost money…so until he makes one the page will display an error line. […]
Can somebody please post a fixed version of this that works with PHP 4? I have tried both these versions, followed the fixes I found in the comments and it won’t work. Please? I want this to work but I can’t get it to! You can see my pleas for help above and on Binary Bonsai and other sites that have it but no one will help me. I would really appreciate it if someone could either help me or post a fixed version of the files!
[…] I have been trying to set up Chris‘ latest offering to the WordPress community; the LifeStream plugin. Everything looks to be working apart from my Twitter feed, I just can;t seem to get it to show up. I’ve run the feed through FeedBurner, along with other feeds but no joy. Of Interest? […]
[…] 这确实是个非常好的想法,现在提供RSS输出的Web2.0服务太多了。而将这些RSS汇集在一起,就可以形成自己在虚拟世界中的“生活轨迹”。Chris J. Davis于是专门写了一个wordpress的lifestream插件。这个插件可以自定义lifestream的输出
[…] I liked the idea of a Lifestream view for my blog, so I took at Chris J. Davis’ Lifestream plugin. Unfortunately, it was limited to a small subset of RSS feeds, which I did not find useful. So, I rewrote the “engine” behind the lifestream to produce my own lifestream plugin. Enjoy! […]
[…] tagged facebook, flickr, lifestream, linkyloo, plugin, wordpress and Wordpress Plugins View blog reactions If you enjoyed this post from Weblog Tools Collection please Subscribe to the RSS feed. RelatedPosts from the Past: […]
thanks for the great plugin, Chris!
to Alec above who got an empty page - this happened to me too, but it is solved after i made a feedburner feed for twitter (like what Chris mentioned in his post above).
my life, syndicated…
now you can track me on flickr, twitter, delicious, lastfm, upcoming, cocomments and everything else in my lifestream, made possible by this awesome plugin from chris davis with minor tweaks to make it work in php4. click the screenshot to see it in a…
This plugin is great.. Never seen something like this before..
However…
I seem to be having a problem no one else has mentioned. The lifestream is working okay. I was having time issues so I commented out the timezone line in stream.php, but now (and I don’t know if it’s related) I have no days showing up as little headings. I just get one long unbroken list of stuff. I’ve checked the source code the rendered page and the days are there, they are behind the table or something. Can anyone help?
[…] Make a new Lifestream plugin that actually works well. […]
Chris thanks for the great plugin, but as usual I’m having a few problems.
The LifeStream installed and is working but some feeds are not showing up; namely Twitter and Del.icio.us. I’ve run them both through FeedBurner just to be on the safe side and according to the stats there is a WordPress bot subscribed but nothing appears in the list.
I can only presume that it is timing out or something, is there a way to over come this?
Cheers.
[…] Wow, I certainly have been out-doing myself on updates to this site recently! I’ve now (after a lot of tweaking around) installed a Lifestream on my site, courtesy of Chris Davis. […]
[…] Om alles kort samen te vatten kom het dus neer op een website wat beschrijft wat ik beleef, fotografeer, ontwikkel, bezoek, bekijk en beluister. Een Lifestream is misschien wel een leuke manier om dat samen te vatten. Nu nog een interessante indeling en grafisch ontwerp en ik ben klaar om het nieuwe jaar in te gaan. Gerelateerde artikelen op het artikel: “Een nieuw jaar, een nieuwe begin”, wie weet vind je deze artikelen (ook) interessant. […]
Nice. I do a similar thing with my site. Actually, with my Stalker Feed, rather than on the web page per se yet - stupid final privacy concern. Have been considering uniting on the page, though; maybe I’ll implement this or maybe I’ll feed everything into FeedWordpress to keep it on-site.
[…] Elliott Back ha riscritto il motore di Lifestream creando un plugin un po’ più versatile. L’installazione è ancora piuttosto complessa, ma si può cominciare a personalizzare parecchio il proprio “flusso”. […]
Thanks for the inspiration… and implementation :)
[…] I stumbled upon it via the Lifestream - ala wordpress post containing a link to the original Streaming my life away article by Jeremy Keith. […]
[…] Today’s new blog feature that you almost certainly didn’t notice: a Lifestream. (Inspiration: Chris J Davis.) […]
Are the download broken?
Hey, great plugin, but I’m not quite able to use it. I have no idea where to find my lifestream once everything seems to be working inside the WP admin. However, I can just pull up “stream.php” which is in my theme’s directory. The catch is, I get all sorts of abspath errors. Well, just the one. When I try to correct it, I get another error that suggests WP’s rss.php is getting confused by me invoking it from inside my theme directory. I have a sneaking suspicion that this is all because I insist on keeping my wp install *not* in the root and inside a subdirectory instead. Any idea if this is the case and if so how I can fix it?
Hey ThePete.
There could very well be errors in the plugin and newer versions of WordPress. Since I have moved on from WordPress, I am no longer maintaining these plugins, so I am not sure what help I can give.
Sorry mate.
…de tus contactos.
Existen varios plugins que acercan tu identidad social a tu blog en WordPress:
1. LifeStream. Puedes descargarlo desde …
…ptions window, but I could never get it to work. It
…2/14/lifestream-wp-plugin-for-wordpress/” title=”lien vers un plugin” target=”_blank”>plusieurs m
…=”http://adactio.com/journal/1202/”>Jeremy Keith’s php source code a couple of years ago.
Chris Davis’s Lifestream
Lifestr…
media/Flickr
media/LastFM
old/Archives
Sillyness, Werd by Chris J. Davis is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License, unless otherwise noted.
Based on a work at chrisjdavis.org.