DarkMercury.net / Comments
       Meh. Featured. Friends. News. Links.       



  It's been a long road


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 - 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, 4 posts by friends up to two weeks
2.1 - Took away hiding of entries. Unlimited posts by one author for 24 hours, after that it just shows the latest entry.


Posted by: Eclipse on Oct 10, 08 | 10:15 pm

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

Posted by: Alison on Oct 11, 08 | 1:59 pm


Input your comment below:

Name
Homepage


Remember me

<< LAN Weekend and Days Off   |   Home   |   Once more in the Saab, dear friend >>