Saturday, October 11, 2008

It’s been a long road

getting from there to here…

Friends 2.0


I promise this will be the end since there isn't much else I can do to the friends page. But I finally achieved what I set out to do in 2005 when I created the friends page. Starting from a set of rss links, the friends page achieves what Livejournal does by listing posts made by your friends in the order in which they were posted. LJ accomplishes this by storing posts on its server which it can read in order, but it's a bit of a feat to do it from nothing but a few rss links. I give you unlimited entries up until a week. If you haven't posted in more than a week, your last entry is truncated at the bottom in purple. It's all displayed in order by post date and it's awesome.

The page works through with the basic logic:

Define friends array with rss links, names, homepage
For each friend in the array, find all the posts in the last week -> each post is added to separate "posts" array
Sort that array of posts by date
Print the sorted array of posts

Sorting the array was the big problem solved today. Starting with the initial friends array in version 1.5 really did make this possible after all. It's easy to add/remove friends and the script handles everything! Of course there is a lot of error handling there too since RSS feeds are very flexible. Since you've probably already read about everything already I'll stop posting about it now. If anyone cares to to see the different versions of the site as it evolved:

0.9 - 1st edition, loading of first RSS post from each user
1.0 - Error handling if RSS feed not found, page went live, cosmetic changes
1.1 - Added History feature
1.2 - First Color support = red table if rss error, title moved to blue area of table
1.3 - Support for ['Content']['Encoded'] in place of description
1.4.2 - Script detects post age, homepage link changed to username, script assigns table color based on age, hides 2 week old entries, removed table border, changed default charset to UTF-8 to fix '?' issue, added leftmenu
1.5 - Friends Array added, rss image support w/failsafe
2.0 - Friends Sort by post date
2.1 - Multiple posts by one author, 4 posts by friends up to two weeks
Posted by eclipse on 10/11 at 12:15 AM
Possibly Related Posts:
02/14/2011 - MagpieRSS with RSS2.0 and Atom1.0
06/27/2010 - The Future of the AA Category
01/23/2010 - It's Been a Long Time
01/05/2010 - Once upon a Database Query
05/21/2009 - Friends Page Architect
12/29/2008 - Website Tinkering
11/29/2008 - Dark Mercury 4.0
11/05/2008 - Website updates for november
10/20/2008 - Once more in the Saab, dear friend
10/08/2008 - LAN Weekend and Days Off
10/04/2008 - Another round of website updates
11/28/2006 - Website back?
{screen_name}'s avatar

.(JavaScript must be enabled to view this email address)

 

I can tell you spent a lot of time on everything! It looks great!

Posted on Saturday, October 11, 2008  at  04:59 PM

Name:

URL:

Smileys

Remember my personal information

Submit the word you see below:


Previous entry: LAN Weekend and Days Off