Decent Blogging using TWiki

Function: RenderRss

Render rss an feed

See also: RenderAtom, WebSyndication

Parameters

  • SEARCH: expression used to extract the items
  • LIMIT: number of items to include
  • TITLE: channel title
  • TEASEONLY: if defined only the Teaser will be shown, otherwise the full Text also

Implementation

%STARTINCLUDE%
*~~
<channel rdf:about="%SCRIPTURL{"view"}%/%WEB%/WebRss">
  <title>%TITLE%</title>
  <link>%SCRIPTURL{"view"}%/%WEB%</link>
  <description>%SITEMAPWHAT%</description>
<image rdf:resource="%WEBLOGOIMG%" />
  <dc:language>en-us</dc:language>
  <dc:rights>%WEBRSSCOPYRIGHT%</dc:rights>
  <dc:publisher>%WIKIWEBMASTERNAME% [%WIKIWEBMASTER%]</dc:publisher>
  <dc:creator>%WIKIWEBMASTERNAME% [%WIKIWEBMASTER%]</dc:creator>
  <dc:source><nop>%WIKITOOLNAME%</dc:source>
  <items>
    <rdf:Seq>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created"  
~~~   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"}%/%INCLUDINGWEB%</link>
  <url>%WEBLOGOIMG%</url>
</image>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created" 
~~~   reverse="on" 
~~~   limit="%LIMIT%" 
~~~   separator="$n"
~~~   format="
*~~     <item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$n
~~~       <title>$expand(Headline or Name or name)</title>$n
~~~       <link>%SCRIPTURL{"view"}%/$web/$topic</link>$n
~~~       <description>
~~~        $encode(
*~~          $percntCALC{\"$IF($EXACT(BlogComment,$expand(TopicType)),$expand(Name) 
~~~                replies on \\"[[$expand(BaseRef)][$expand(@BaseRef.Headline)]]\\":)\"}$percnt
~~~          $percntCALC{\"$IF($EXACT(TWikiTopic,$expand(TopicType)),$expand(TopicDescription))\"}$percnt
~~~          $expand(Teaser)%IFDEFINED{"%TEASEONLY%" then=" " else="<p />$expand(Text)"}%)
~~~      </description>$n
~~~      <dc:creator>$expand(BlogAuthor or Name)</dc:creator>$n
~~~      <dc:date>$formatTime(createdate, '$year-$mo-$dayT$hour:$minute:$secondZ')</dc:date>$n
~~~      <dc:subject>$expand(SubjectCategory)</dc:subject>
~~~      <dc:contributor>$n
~~~        <rdf:Description link=\"%SCRIPTURL{"view"}%/Main/$expand(info.author)\">$n
~~~          <rdf:value>$expand(info.author)</rdf:value>$n
~~~        </rdf:Description>$n
~~~      </dc:contributor>$n
~~~   </item>
~~~ "}%
*~~
%STOPINCLUDE%

Calls to 'RenderRss'

TopicForm
TopicType: TopicFunction
TopicDescription: Render rss an feed
r1 - 2006-02-08 - 14:46:13 - TWikiContributor
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.