Creating a custom RSS or XML feed is easy using Media Factory applications. Just follow these steps:
http://myrss.projects.fm
. If you don't have permissions to create applications, speak with your project administrator or email support@newspark.ca.There are two templates included in the Custom RSS application: static and dynamic. If you only need one feed, just modify the static feed template and you're done. If you want to pull various sub-sets of data (such as programmatically into a CMS) use the dynamic feed.
Note: This default application assumes no public media detail page, and therefore links to the file in Media Factory.
You can also just copy this example dynamic feed into a template in an existing application:
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
<title>{%feed:title}</title>
<link>http://{$vhost}/</link>
<description>{%feed:description}</description>
<atom:link href="http://{$vhost}/{$basepage}?channel={$get.channel}&collection={$get.collection}&groupId={$get.groupId}&sort={$get.sort}&fileTypes={$get.fileTypes}" rel="self" type="application/rss+xml" />
<!--<image>
</url>
</title>
</link>
</image> -->
<!-- For details on <fm:MediaList> parameters visit http://developer.mediafactory.fm/doc/applications/components/fm_medialist -->
<fm:MediaList
fields="id,title,message,user_name,date,publicUrl,uid,user_firstname,user_lastname,filetype,filesize,notdeniedcomments"
channel="{$get.channel}"
collection="{$get.collection}"
fileTypes="{$get.fileTypes}"
includeChildren="1"
moderationStatus="notdenied"
groupId="{$get.groupId}"
includeChildGroups="true"
sort="{$get.sort}"
>
<fm:Loop>
<fm:Switch value="{$media_filetype}">
<fm:Case value="1">
<item>
<title>{$$media_title}</title>
<!--Use http://{$vhost}/mediadetail/{$$mid} to link to the base URL of this application -->
<link>
http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}
</link>
<description>
<![CDATA[
<p>{$$media_user_firstname} {%feed:postedPhoto}:</p> <p><img src="{$$media_publicUrl}/15" alt="{$$media_title}" /></p><p>{$$media_message}</p>
]]>
</description>
<pubDate><fm:DateFormat date="{$$media_date}" format="r" /></pubDate>
<guid isPermaLink="false">http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}</guid>
<media:content url="{$$media_publicUrl}/15" type="image/jpeg"/>
<media:title>{$$media_title}</media:title>
<media:description>{$$media_message}</media:description>
<media:thumbnail url="{$$media_publicUrl}/14"/>
<media:credit role="photographer" scheme="urn:ebu">{$$media_user_firstname} {$$media_user_lastname}</media:credit>
</item>
</fm:Case>
<fm:Case value="2">
<item>
<title>{$$media_title}</title>
<!--Use http://{$vhost}/mediadetail/{$$mid} to link to the base URL of this application -->
<link>
http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}
</link>
<description>
<![CDATA[
<p>{$$media_user_firstname} {%feed:postedVideo}:</p> <p><img src="{$$media_publicUrl}/15" alt="{$$media_title}" /></p><p>{$$media_message}</p>
]]>
</description>
<pubDate><fm:DateFormat date="{$$media_date}" format="r" /></pubDate>
<guid isPermaLink="false">http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}</guid>
<media:content url="{$$media_publicUrl}/2405" type="video/quicktime"/>
<media:title>{$$media_title}</media:title>
<media:description>{$$media_message}</media:description>
<media:thumbnail url="{$$media_publicUrl}/14"/>
<media:credit role="producer" scheme="urn:ebu">{$$media_user_firstname} {$$media_user_lastname}</media:credit>
</item>
</fm:Case>
<fm:Case value="3">
<item>
<title>{$$media_title}</title>
<!--Use http://{$vhost}/mediadetail/{$$mid} to link to the base URL of this application -->
<link>
http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}
</link>
<description>
<![CDATA[
<p>{$$media_user_firstname} {%feed:postedAudio}:</p> <p><img src="http://{$vhost}/static/vidcom/v2/images/audio.gif" alt="{$$media_title}" /></p><p>{$$media_message}</p>
]]>
</description>
<pubDate><fm:DateFormat date="{$$media_date}" format="r" /></pubDate>
<guid isPermaLink="false">http://mediafactory.fm/mediadetail/{$$mid}?vid={$vhostid}</guid>
<media:content url="{$$media_publicUrl}/31" type="audio/mpeg"/>
<media:title>{$$media_title}</media:title>
<media:description>{$$media_message}</media:description>
<media:thumbnail url="http://{$vhost}/static/vidcom/v2/images/audio.gif"/>
<media:credit role="producer" scheme="urn:ebu">{$$media_user_firstname} {$$media_user_lastname}</media:credit>
</item>
</fm:Case>
</fm:Switch>
</fm:Loop>
</fm:MediaList>
</channel>
</rss>