Results 1 to 2 of 2

Thread: gfeedfetcher sorting

  1. #1
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gfeedfetcher sorting

    1) Script Title: gfeedfetcher

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...sdisplayer.htm

    3) Describe problem: I've added 3 feeds and told it to sort by date, but rather than sort ALL items by date it seems to sort each feed by date and append?

    EXAMPLE:
    Code:
    var newsfeed=new gfeedfetcher("example3", "example3class", "_new");
    newsfeed.addFeed("John Viele", "http://social.msdn.microsoft.com/Profile/u/activities/feed?displayName=John%20Viele");
    newsfeed.addFeed("Mark Alexander", "http://social.msdn.microsoft.com/Profile/mark.alexander/activity"); 
    newsfeed.addFeed("NPR Tech", "http://www.npr.org/rss/rss.php?id=1019");
    newsfeed.displayoptions("label datetime snippet"); //show the specified additional fields
    newsfeed.setentrycontainer("p"); //Display each entry as a paragraph
    newsfeed.filterfeed(25, "label", "date"); //Show X entries, sort by date
    newsfeed.init(); //Always call this last
    This gives me output everything from first feed, then everything from third feed. Some reason it doesn't show second feed items. I haven't doublechecked on the url yet.
    Last edited by james438; 04-11-2013 at 12:17 AM. Reason: added comment on the output; James438 - added code tags

  2. #2
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nevermind. I debugged into the script and figured out what was going on.

    First, that "filterfeed" call above only has 2 params, so "label" shouldn't be a param there. Also, I've added a 3rd param to "filterfeed" function to make it possible to specify how many items to pull from each feed before trying to sort and filter. This makes it possible to sort by date, and only show the 20 most recent entries over all feeds.

Similar Threads

  1. I need gfeedfetcher help
    By pappa74 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-06-2013, 08:49 PM
  2. gfeedfetcher problem
    By takethecake in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-19-2012, 03:35 AM
  3. gfeedfetcher tweak
    By agoulet in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 11-20-2011, 03:37 PM
  4. gfeedfetcher description
    By danskkr in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 05-16-2011, 09:59 AM
  5. A question about gfeedfetcher
    By danskkr in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-29-2011, 12:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •