root/trunk/website/forums/rss.cfm @ 37

Revision 5, 2.5 kB (checked in by DanWilson, 17 years ago)

Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)

Line 
1<cfsetting enablecfoutputonly=true showdebugoutput=false>
2<!---
3        Name         : rss.cfm
4        Author       : Raymond Camden
5        Created      : July 5, 2004
6        Last Updated : March 2, 2007
7        History      : Support for UUID (rkc 1/27/05)
8                                   You can't have 2 or more of the same link, so I add r=X to make it unique. Thanks to Tom Thomas for finding this bug (rkc 8/3/05)
9                                   Title used in RSS wasn't dynamic (rkc 3/2/07)
10        Purpose          : Displays RSS for a Conference
11--->
12
13<cfif not isDefined("url.conferenceid") or not len(url.conferenceid)>
14        <cflocation url="index.cfm" addToken="false">
15</cfif>
16
17<!--- get parent conference --->
18<cftry>
19        <cfset request.conference = application.galleon.conference.getConference(url.conferenceid)>
20        <cfcatch>
21                <cflocation url="index.cfm" addToken="false">
22        </cfcatch>
23</cftry>
24
25<!--- get my latest posts --->
26<cfset data = application.galleon.conference.getLatestPosts(conferenceid=url.conferenceid)>
27
28<cfcontent type="text/xml"><cfoutput><?xml version="1.0" encoding="iso-8859-1"?>
29
30<rdf:RDF
31        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns##"
32        xmlns:dc="http://purl.org/dc/elements/1.1/"
33        xmlns="http://purl.org/rss/1.0/"
34>
35
36        <channel rdf:about="#application.galleon.settings.rootURL#">
37        <title>#application.galleon.settings.title# : Conference : #request.conference.name#</title>
38        <description>Conference : #request.conference.name# : #request.conference.description#</description>
39        <link>#application.galleon.settings.rootURL#</link>
40       
41        <items>
42                <rdf:Seq>
43                        <cfloop query="data">
44                        <rdf:li rdf:resource="#application.galleon.settings.rootURL#messages.cfm?#xmlFormat("threadid=#threadid#")##xmlFormat("&r=#currentRow#")#" />
45                        </cfloop>
46                </rdf:Seq>
47        </items>
48       
49        </channel>
50
51        <cfloop query="data">
52                <cfset dateStr = dateFormat(posted,"yyyy-mm-dd")>
53                <cfset z = getTimeZoneInfo()>
54                <cfset dateStr = dateStr & "T" & timeFormat(posted,"HH:mm:ss") & "-" & numberFormat(z.utcHourOffset,"00") & ":00">
55       
56                <item rdf:about="#application.galleon.settings.rootURL#messages.cfm?#xmlFormat("threadid=#threadid#")##xmlFormat("&r=#currentRow#")#">
57                <title>#xmlFormat(title)#</title>
58                <description>#xmlFormat(body)#</description>
59                <link>#application.galleon.settings.rootURL#messages.cfm?#xmlFormat("threadid=#threadid#")##xmlFormat("&r=#currentRow#")#</link>
60                <dc:date>#dateStr#</dc:date>
61                <dc:subject>#thread#</dc:subject>
62                </item>
63        </cfloop>
64       
65</rdf:RDF>
66</cfoutput>
67
68<cfsetting enablecfoutputonly=false>
Note: See TracBrowser for help on using the browser.