Etomite Community Forums: [Snippet] Lifestream script - Etomite Community Forums

Jump to content

Read Me

This forum is posted in automatically when a snippet is added to the library, or updated. Please use the snippet topic to discuss that snippet.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Snippet] Lifestream script

#1 User is offline   bogge 

  • Etomite Forum Newbie
  • Group: Member
  • Posts: 18
  • Joined: 11-May 06

Posted 12 January 2009 - 12:47 AM

File Name: Lifestream script
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

#2 User is offline   vw53a 

  • Likes Etomite Forums!
  • PipPip
  • Group: Member
  • Posts: 390
  • Joined: 16-January 05
  • Gender:Male
  • Location:Coevorden, NL
  • Interests:Cars, Computers and everything else technical and/or well designed.

Posted 12 January 2009 - 11:37 AM

Could you point to a place where one could find out what lifestream is? I've googled it but came up with a wide variety of products, phrases, blogs, etc.

#3 User is offline   bogge 

  • Etomite Forum Newbie
  • Group: Member
  • Posts: 18
  • Joined: 11-May 06

Posted 12 January 2009 - 04:36 PM

Lifestream is a chronological aggregated view of your life activities online.

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 User is offline   mikef 

  • Loves Etomite Forums!
  • PipPipPipPip
  • Group: Member
  • Posts: 1,546
  • Joined: 30-August 05
  • Gender:Male
  • Location:Cheshire, UK
  • Interests:Photography, Gardening for Wildlife

Posted 12 March 2009 - 03:51 PM

When I installed this, I needed to add a directory at the top level of the site called 'cache' with 755 permissions to get it to work. This may be permission dependent, but it did not make use of the cache subdirectory in the simplepie installation.
(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 User is offline   bogge 

  • Etomite Forum Newbie
  • Group: Member
  • Posts: 18
  • Joined: 11-May 06

Posted 13 March 2009 - 06:29 AM

Hello Mikef,

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 User is offline   mikef 

  • Loves Etomite Forums!
  • PipPipPipPip
  • Group: Member
  • Posts: 1,546
  • Joined: 30-August 05
  • Gender:Male
  • Location:Cheshire, UK
  • Interests:Photography, Gardening for Wildlife

Posted 13 March 2009 - 12:47 PM

No, the problem wasn't that I wanted to put the cache folder in the website's root directory, but that for some reason it wasn't using the cache directory under the simplepie installation, and I fixed that by creating the folder in the website's root.
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 User is offline   bogge 

  • Etomite Forum Newbie
  • Group: Member
  • Posts: 18
  • Joined: 11-May 06

Posted 14 March 2009 - 10:55 AM

Ok...

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 User is offline   PaulD 

  • Likes Etomite Forums!
  • PipPip
  • Group: Member
  • Posts: 299
  • Joined: 06-February 06
  • Gender:Male
  • Location:Lutterworth, Leicestershire

Posted 29 June 2009 - 12:37 PM

SimplePie is fantastic! I love it!

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 User is offline   mikef 

  • Loves Etomite Forums!
  • PipPipPipPip
  • Group: Member
  • Posts: 1,546
  • Joined: 30-August 05
  • Gender:Male
  • Location:Cheshire, UK
  • Interests:Photography, Gardening for Wildlife

Posted 29 June 2009 - 01:21 PM

View PostPaulD, on 29 June 2009 - 12:37 PM, said:

SimplePie is fantastic! I love it!

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 User is offline   PaulD 

  • Likes Etomite Forums!
  • PipPip
  • Group: Member
  • Posts: 299
  • Joined: 06-February 06
  • Gender:Male
  • Location:Lutterworth, Leicestershire

Posted 29 June 2009 - 10:14 PM

Thanks for that Mike, but to no avail.

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 User is offline   PaulD 

  • Likes Etomite Forums!
  • PipPip
  • Group: Member
  • Posts: 299
  • Joined: 06-February 06
  • Gender:Male
  • Location:Lutterworth, Leicestershire

Posted 30 June 2009 - 12:47 AM

Sorry to double post but I have got it to work in a roundabout way.

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


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users