Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Podcast - via custom document type? View modes: 
User avatar
tripletdad99 - 6/29/2009 5:30:54 PM
Podcast - via custom document type?
I am doing some freebie work for my church's website. One of the more important things is the sermon "podcast". I have built a custom document type to hold the meta data concerning the sermons (speaker, title, date, series, etc.) as well as the file uploader field to hold the actual .mp3 file. It's working "ok", but uploading of the .mp3 files (which are typically between 6-10 MB in size) takes a while - with little to no feedback to the user (other than the "progress bar" for the web browser itself - not very useful).

My post is to ask for advise on how to best accomplish this with Kentico. What have other's done to build a library of audio files - and make it easy for an admin or editor type user to upload these files? Has anyone else used Kentico to manage any "podcast" type of audio library?

User avatar
Mercer - 7/4/2009 2:18:19 PM
RE:Podcast - via custom document type?
The following is what I did to post podcasts on our site.

First, I created a new custom document type called Podcast. It includes the fields you outlined in your post, but I host all of my podcasts on Amazon S3 since my hosting provider has limited storage.

For the podcast document type, I created a new transformation that embeds a flash mp3 player. Here is the source I used for the transformation.

<%# Eval("Title") %>

<%# Eval("Description") %>


type="application/x-shockwave-flash" data="http://domain.com/audio/audio-player/player.swf" id="audioplayer<%# Eval("ID") %>"

height="24" width="290">
<param name="movie" value="http://domain.com/audio/audio-player/player.swf" />
<param name="FlashVars" value="playerID=030109&soundFile=<%# Eval("MP3") %>" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object><br /><Br><br>
<a href="<%# Eval("MP3") %>">Download MP3</a> | Date: <%# Eval("ReleaseDate") %>

Checkout http://wpaudioplayer.com/standalone for details on the flash mp3 player. I uploaded all of the required controls to the site using FTP in the path listed in the transform.

On the web site, I created a page that includes a repeater which uses the player transformation created above. This allows site visitors to see all of the podcasts, play the mp3 from the site or download the mp3 file. At the top of the page I also include a link to the RSS and iTune feed.

I also created an RSS feed by creating an RSS.ASPX page. I was successfully able to add my podcast to iTunes, although some of the tags need to be tweaked. The following is the source for the aspx page.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PodcastRSS.aspx.cs" %>

<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">


<title><![CDATA[Evergreen Christian Fellowship]]></title>
<author><![CDATA[Weekly Sermon]]></author>
<description>Evergreen Christian Fellowship is a community seeking to build an environment in which people can comfortably inquire of the things of God and grow in faith and service. We are committed to the truth of the Bible and the proclamation of the good news of Jesus Christ.
<copyright>Copyright 2009</copyright>
<lastBuildDate>Sat, 25 Mar 2006 11:30:00 -0500</lastBuildDate>
<pubDate>Sat, 25 Mar 2006 11:30:00 -0500</pubDate>

<itunes:author>Evergreen Christian Fellowship</itunes:author>
<itunes:summary>Evergreen Christian Fellowship is a community seeking to build an environment in which people can comfortably inquire of the things of God and grow in faith and service. We are committed to the truth of the Bible and the proclamation of the good news of Jesus Christ.</itunes:summary>
<itunes:image href="http://domain.com/Images/web-site/ECF-Color-Logo-(1).aspx"/>

<itunes:category text="Religion & Spirituality">
<itunes:category text="Christianity"/></itunes:category>
<itunes:category text="Religion & Spirituality"/>

<link><![CDATA[<%=HttpContext.Current.Request.Url.AbsoluteUri.Remove(HttpContext.Current.Request.Url.AbsoluteUri.Length - HttpContext.Current.Request.Url.PathAndQuery.Length) + HttpContext.Current.Request.ApplicationPath%>]]></link>
<description>Podcast RSS Feed</description>

<cms:cmsrepeater ID="PodcastRepeater" runat="server" OrderBy="ReleaseDate DESC" ClassNames="cms.podcast"
TransformationName="cms.podcast.rssitem" SelectedItemTransformationName="cms.podcast.rssitem"

The RSS.aspx page contains a repeater control which reads all of the podcast documents. The following is the code for the rssitem transform.

<title><%# Eval("Title") %></title>
<link><%# GetAbsoluteUrl(GetDocumentUrl()) %></link>
<guid><%# Eval("MP3") %></guid>
<description><%# Eval("Description") %></description>
<enclosure url="<%# Eval("MP3") %>" length="11779397" type="audio/mpeg"/>
<pubDate><%# Convert.ToDateTime(Eval("DocumentModifiedWhen")).ToString("r") %> -0500</pubDate>

I am sure there are improvements to be made, for example the iTune tages. Hope this helps.

User avatar
tripletdad99 - 7/5/2009 9:09:50 AM
RE:Podcast - via custom document type?
Thank you very much for taking the time to reply. I will take what you've suggested here into consideration.

Also, I was not aware of the Amazon S3 service. That's pretty cheap! Our hosting provider allows a fair amount of storage, but not that much!

User avatar
john-tennisnow - 5/25/2010 4:20:56 PM
RE:Podcast - via custom document type?
This is a great help but I'm a bit lost when it comes to the RSS feed. I see that you run the codebehind from a file called "PodcastRSS.aspx.cs". Do you mind sharing that code as well? I think that is where my problem is...


User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 5/31/2010 3:50:18 PM
RE:Podcast - via custom document type?
Hey there,

thank you all for interesting discussion about Podcast RSS feeds, it can be really helpful.

To John -- Are you familiar with our sample RSS aspx page NewsRss.aspx (with code-behind .cs) in the application folder ~\CMSPages ?

It is quite simple, I believe that the PodcastRSS would be not so much more complex...

Thanks to all for sharing your ideas anyway!