Render an RSS feed
See also:
RenderAtom
Parameters
- LIMIT: number of items to include
- THEWEB: web where to search
- THETOPIC: discussion or comment where to start to generate the feed
Implementation
%STARTINCLUDE%
*~~
<channel rdf:about="%SCRIPTURL{"view"}%/Applications.DiscussionApp/WebRssDiscussion?web=%THEWEB%&topic=%THETOPIC%">
%~~ DBQUERY{topic="%THEWEB%.%THETOPIC%"
~~~ format="
*~~ <title>$expand(Summary or Name)</title>$n
~~~ <link>%SCRIPTURL{"view"}%/$web/$topic</link>$n
~~~ <description>Discussion initiated by $percntSPACEOUT{$formfield(Name)}$percnt</description>$n
~~~ <image rdf:resource=\"$percntWIKILOGOIMG$percnt\" />$n
~~~ <dc:language>%LANG%</dc:language>$n
~~~ <dc:rights>$percntWEBRSSCOPYRIGHT$percnt</dc:rights>$n
~~~ <dc:publisher>$percntWIKIWEBMASTERNAME$percnt [$percntWIKIWEBMASTER$percnt]</dc:publisher>$n
~~~ <dc:creator>$percntSPACEOUT{$formfield(Name)}$percnt</dc:creator>$n
~~~ <dc:source><nop>$percntWIKITOOLNAME$percnt</dc:source>"
~~~ }%
<items>
<rdf:Seq>
%~~ DBQUERY{"TopicType=~'\b(Comment|Discussion)\b' AND (BaseRef='%THETOPIC%' OR TopicRef='%THETOPIC%' OR name='%THETOPIC%')"
~~~ web="%THEWEB%"
~~~ order="Timestamp"
~~~ reverse="on"
~~~ limit="%LIMIT%"
~~~ format=" <rdf:li rdf:resource=\"%SCRIPTURL{"view"}%/$web/$topic\" />"
~~~ }%
</rdf:Seq>
</items>
</channel>
<image rdf:about="%WEBLOGOIMG%">
<title>TWiki/NatSkin</title>
<link>%SCRIPTURL{"view"}%/%THEWEB%</link>
<url>%IFDEFINED{"%WEBLOGOIMG%" then="%WEBLOGOIMG%" else="%WIKILOGOIMG%"}%</url>
</image>
%~~ DBQUERY{"TopicType=~'\b(Comment|Discussion)\b' AND (BaseRef='%THETOPIC%' OR TopicRef='%THETOPIC%' OR name='%THETOPIC%')"
~~~ web="%THEWEB%"
~~~ order="Timestamp"
~~~ reverse="on"
~~~ limit="%LIMIT%"
~~~ separator="$n"
~~~ format="
*~~ <item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$n
~~~ <title>
*~~ $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"Comment\" glue=\"off\"}$percnt
~~~ $expand(Summary or Name)
~~~ $percntELSEDEFINED$percnt
~~~ $expand(Summary)
~~~ $percntFIDEFINED$percnt
*~~ </title>$n
~~~ <link>%SCRIPTURL{"view"}%/$web/$topic</link>$n
~~~ <dc:creator>$percntSPACEOUT{$expand(Name)}$percnt</dc:creator>$n
~~~ <dc:date>$formatTime(Timestamp, '$year-$mo-$dayT$hour:$minute:$secondsZ')</dc:date>$n
~~~ <dc:subject>$expand(Category)</dc:subject>
~~~ <dc:contributor>$n
~~~ <rdf:Description link=\"%SCRIPTURL{"view"}%/%MAINWEB%/$formfield(Name)\">$n
~~~ <rdf:value>$percntSPACEOUT{$formfield(Name)}$percnt</rdf:value>$n
~~~ </rdf:Description>$n
~~~ </dc:contributor>$n
~~~ <description>
~~~ $encode(
~~~ <b>$percntSPACEOUT{$formfield(Name)}$percnt:
~~~ $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"Comment\" glue=\"off\"}$percnt
~~~ $expand(Summary)
~~~ $percntFIDEFINED$percnt</b>$n$n
*~~ $expand(Text or text)
~~~ $percntIFDEFINEDTHEN{\"$expand(Tag)\" glue=\"off\"}$percnt
~~~ <p /><b>Tags</b>:
~~~ $percntFORMATLIST{\"$test\" sort=\"on\"
~~~ format=\"<a href=\\"%SCRIPTURL{"view"}%/$web/WebTagCloud?search=$1\\"
~~~ rel=\\"tag\\">$1</a>\"
~~~ }$percnt
~~~ $percntFIDEFINED$percnt
*~~ )
~~~ </description>$n
*~~ </item>
~~~ "}%
*~~
%STOPINCLUDE%
Calls to 'RenderRss'