Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormista3
    • CommentTimeJul 2nd 2006
     permalink
    I'm pondering the best way to do this - I have a group of people with blogs, and want to show the latest post by each of them, alongside their favicon, on the homepage.

    9rules does this really nicely - do you think they are simply using an RSS parser to grab the info? (I'm guessing it caches this as well to save bandwith)

    Would this be hard to do with Wordpress? Has anyone done something similar?
  1.  permalink
    Keith Devens has an excellent PHP XML library. If you have access to the WP code, and aren't afraid of arrays, it should be relatively simple to implement. I use it to populate news pages and to grab events from google calendar.
    • CommentAuthormista3
    • CommentTimeJul 2nd 2006 edited
     permalink
    I'll check it out, cheers.

    My first port of call has been http://simplepie.org/ which looks ok, so far...
    •  
      CommentAuthormringlein
    • CommentTimeJul 2nd 2006 edited
     permalink
    I use magpie as well with something i was working on for a client who had the same question as you (sort of).
    They wanted to include RSS from various sources for a variety of reasons -- they needed a solution that wasn't too tech heavy and wasn't environment dependent (ex: PHP).

    www.virtualnewsfeed.com/feed
  2.  permalink
    Magpie is good. If you're interested in using PHP+AJAX to print/parse RSS feeds on your site, there are good tutorials out there. Hope these help.

    http://ajax.phpmagazine.net/2005/11/ajax_rss_reader_step_by_step_t.html
    http://www-128.ibm.com/developerworks/xml/library/x-ajaxrss/
    http://www.informit.com/articles/article.asp?p=430216&rl=1
    • CommentAuthormista3
    • CommentTimeJul 3rd 2006
     permalink
    Hey guys thanks for these.

    I've got a rough and ready idea up at http://www.creativeyoungteam.com/ but already have a few problems - some peope didn't have favicons, or even a title assigned to their rss feed!

    But I like the idea of coding something from scratch, ajax could be a nice way to show a select of recent news items on rotation, instead of just the one...
  3.  permalink
    If you choose to code ajax from scratch, you'll probably get familiar with the limitations of the xmlhttprequest object, as this quote from Apple explains:

    "...Second, the domain of the URL request destination must be the same as the one that serves up the page containing the script. This means, unfortunately, that client-side scripts cannot fetch web service data from other sources, and blend that data into a page."

    There is a workaround to this, involving some php, but one should pay attention to security issues while doing so. In any case, all you need is lightweight ajax (prototype or prototype lite from moo.fx, for example) and literally a coulple lines of php code. The xml parser could be either ajax or php, depending on how much you choose to rely on javascript.
    • CommentAuthormista3
    • CommentTimeJul 3rd 2006
     permalink
    Ooooh sounds complicated! I might just keep it simple then...
  4.  permalink
    The simplest way to do this might be the following: 1) Make an array where you place the feed addresses 2) use some php to parse the xml into an array, for example 3) print out the title and content from the array 4) call this program from ajax

    This way you won't have to deal with the xmlhttprequest so much, as you are only requesting the one php-file from your own domain. The ajax request might look like this:

    new Ajax.PeriodicalUpdater('mydiv', 'feed-grabber.php', {asynchronous:true, frequency:2; parameters: feed=0});

    This would update a div id'd "mydiv" every two seconds with data from feed-grabber.php, which in turn has parsed the 0 feed (the first one from the feed array). I could email you a working sample, if you aren't particularly interested in writing code.
    • CommentAuthormista3
    • CommentTimeJul 3rd 2006
     permalink
    Hey thanks, that sounds really good. Would it be hard to modify so that it showed content from lots of feeds, in different divs?

    If it works, I might try and turn it into a Wordpress plugin or something :)
  5.  permalink
    Like in this one: http://www.joutsenonkullervo.fi/hiihto/feeds.html ?

    That, by the way, is a really basic example where all the feeds must be in RSS2.0 format. And also, the line about Ajax.PeriodicalUpdater I posted earlier has a few typos at least...
  6.  permalink
    Oh, you can email me at (my username) @ gmail.com, if you want the source. It took like 25 minutes to code and to set up, so it might not be perfect, but at least it works.
Add your comments
    Username Password
  • Format comments as (Help)