Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title./webskin/mxSession/feediTunes.cfm
<cfsetting enablecfoutputonly="true" /> 
<!--- @@Copyright: Copyright (c) 2009 Daemon Pty Limited. All rights reserved. --->
<!--- @@displayname: iTunes Feed --->
<!--- @@description: feeditunes --->
<!--- @@author: Geoffrey Bowers on 2009-05-29 --->

<!--- import tag libraries --->
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />

<!--- deactivate the tray --->
<cfset request.bHideContextMenu = true />

<!--- create local objects --->
<cfset oSession = application.fapi.getContentType("mxSession") />
<cfset oSpeaker = application.fapi.getContentType("mxSpeaker") />

<!--- get relevant sessions for podcast --->
<cfquery datasource="#application.dsn#" name="qSessions" maxrows="250">
SELECT objectid FROM mxSession
WHERE status = 'approved'
AND MP3PODCAST <> ''
ORDER BY datetimelastupdated DESC
</cfquery>


<cfoutput><?xml version="1.0" encoding="UTF-8"?>
<!-- http://www.apple.com/itunes/store/podcaststechspecs.html -->
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
	<title>WebDU 2009</title>
	<link>http://webdu.com.au</link>
	<language>en-us</language>
	<copyright>&##x2117; &amp; &##xA9; 2009 Daemon Pty Ltd</copyright>
	<itunes:subtitle>Sessions from the mighty WebDU 2009 Conference.</itunes:subtitle>
	<itunes:author>Rob Rohan</itunes:author>
	<itunes:summary>
The premier Antipodean web technology conference, webDU encompasses a broad spectrum of 
web technologies and techniques. webDU is the must attend annual event for anyone building 
a better Internet.
	</itunes:summary>
	<description>
The premier Antipodean web technology conference, webDU encompasses a broad spectrum of
web technologies and techniques. webDU is the must attend annual event for anyone building 
a better Internet.
	</description>

	<itunes:owner>
		<itunes:name>Daemon.com.au</itunes:name>
		<itunes:email>geoff@daemon.com.au</itunes:email>
	</itunes:owner>
	
	<image>
		<url>http://s3.amazonaws.com/webdu2009/podcast144_400.jpg</url>
		<title>WebDU 2009</title><!-- should match channel title -->
		<link>http://webdu.com.au</link>
	</image>
	
	<itunes:image href="http://s3.amazonaws.com/webdu2009/podcast600_600.jpg" />

	<itunes:category text="Technology">
		<itunes:category text="Gadgets"/>
		<itunes:category text="Tech News"/>
		<itunes:category text="Software How-To"/>
	</itunes:category>
	
	<itunes:explicit>no</itunes:explicit>
	<!-- //////////////////////////////////////////////////////////////////// -->
</cfoutput>

<cfoutput query="qSessions">
	<cftry>
	<cfset stSession = osession.getdata(objectid=qSessions.objectid) />
	<cfset stSpeaker = ospeaker.getdata(objectid=stsession.aSpeakerID[1]) />
	<item>
		<title>#xmlFormat(stsession.title)#</title>
		<pubDate>#dateformat(stsession.datetimelastupdated, "dddd, dd mmmm yyyy")# 
#timeFormat(stsession.datetimelastupdated, "medium")#</pubDate>
		<enclosure url='#stsession.mp3podcast#' 
<cfif isNumeric(stsession.medialength) AND stsession.medialength gt 0>length='#round(stsession.mediaLength)#' </cfif>typecfif>
type='#stsession.mediaType#' />
		<itunes:duration>#stsession.mediaDuration#</itunes:duration>
		<itunes:author>#xmlFormat(stspeaker.title)#</itunes:author>
		<guid>#stsession.mp3podcast#</guid>
	</item>
	<cfcatch>
		<!--- <cfdump var="#cfcatch#" /> --->
		<!--- suppress error in output --->
	</cfcatch>
	</cftry>
</cfoutput>

<cfoutput>

	<!-- /////////////////////////////////////////////// -->
</channel>
</rss>
</cfoutput>

<cfsetting enablecfoutputonly="false" />