Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » How do I generate a Media RSS Feed?

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: 1736 Views
  • socks
    Avatar
    Community Member
    190 Posts

    How do I generate a Media RSS Feed? Link to this post

    Does RSSFeed support Media RSS? I'd like to include mp3's of a radio show in the feed.

    I tried:

    // RSS
    function init() {
    RSSFeed::linkToFeed($this->Link() . "rss");
    parent::init();
    }
    function rss() {
    $rss = new RSSFeed($this->LatestUpdates(), $this->Link(), "Pet World", "", "Title", "Content", "AudioFile");
    $rss->outputToBrowser();
    }

    function LatestUpdates() {
    // 5 is the number of items listed
    return DataObject::get("AudioPetWorldPage", "", "Created Desc", "", 5);
    }

    Everything works except the audio file.

    Thanks

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: How do I generate a Media RSS Feed? Link to this post

    MediaRSS is a separate specification - its not "auto-detected" in any way in the RSSFeed class that you want your output to comply to this specification. Have a look here: http://search.yahoo.com/mrss

    Your best bet is to subclass RSSFeed and overload some of the methods and/or create new ones for the things specific to MediaRSS. Let us know how you go on, this could be a nice addition for a little module or recipe!

  • socks
    Avatar
    Community Member
    190 Posts

    Re: How do I generate a Media RSS Feed? Link to this post

    Thanks Ingo for the response. That probably exceeds my knowledge but maybe a co-worker and I can figure something out. If we do, we'll definitely post our results.

    1736 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.