Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » RSS aggregator

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 3942 Views
  • Decisive Flow
    Avatar
    Community Member
    73 Posts

    RSS aggregator Link to this post

    We are in desperate need of an RSS aggregator that will agregate our two feeds (one form our PlanHQ blog and one from our PlanHQ advice area) into one.

    In November last year, it looks like Sam put something in the support wiki about creating a new page type that does just that: http://doc.silverstripe.com/doku.php?id=rssaggregatingpage&s=rss

    Has there been any progress on this? we are happy to pay to get it developed, but need it urgently

    James started some code which looks like this, but doesn't work yet:

       function rss() {
          $rss = new RSSFeed($this->Children(), $this->Link(), "PlanHQ Blog", "", "Title", "Content", "Author");
          $rss->outputToBrowser();
       }
       

       
       function CombinedList() {
          return DataObject::get("SiteTree", "ParentID IN (`AdviceHolder`,`BlogHolder`)", "greatest(`AdviceEntry`.`Date`,`BlogEntry`.`Date`)");
       }
       
       function allrss() {
          $rss = new RSSFeed($this->CombinedList(), $this->Link(), "PlanHQ - Business Planning Advice and News", "", "Title", "Content", "Author");
          $rss->outputToBrowser();
       }

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: RSS aggregator Link to this post

    The piece of CombinedList that says "ParentID IN (`AdviceHolder`,`BlogHolder`)" is wrong.

    ParentID will be a number. You will need to make a list of all the ID #s of the advice holder pages.

    $holders = DataObject::get("SiteTree", "ClassName IN ('AdviceHolder', 'BlogHolder')");
    foreach($holders as $holder) $holderIDs[] = $holder->ID;
    $CSV_holderIDs = implode(", ", $holderIDs);

    return DataObject::get("SiteTree", "ParentID IN ($CSV_holderIDs)", "greatest(`AdviceEntry`.`Date`,`BlogEntry`.`Date`)");

  • julian
    Avatar
    Community Member
    17 Posts

    Re: RSS aggregator Link to this post

    .. or you could just write a Yahoo! Pipe and feed that into it?

    http://pipes.yahoo.com

  • mangee
    Avatar
    Community Member
    5 Posts

    Re: RSS aggregator Link to this post

    I too was playing with some code for use with the UP.org.nz site, didn't get too far, but it's a much requested feature. Planets ;)

  • Reflektera
    Avatar
    49 Posts

    Re: RSS aggregator Link to this post

    Has this come any further? Which is the easiest way to include rss feeds to a ss-site? I've tried Yahoo's pipes but I can't figure out how to do? It works just fine on a plain html-site but it won't show up on my ss-site...

    3942 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.