elements
if ($action=='rdf') {
### RSS 1.0 (RDF) definitions
SDV($RssTimeFmt,'%Y-%m-%dT%H:%M+00:00'); # time format
SDV($RssItemsRDFListFmt,"\n");
SDV($RssChannelFmt,array('
%HTMLlat1;
%HTMLspecial;
]>
$WikiTitle - $Group.$Title
$PageUrl
$RssChannelDesc
$RssChannelBuildDate
',&$RssItemsRDFList,'
'));
SDV($RssItemFmt,'
-
$WikiTitle - $Group.$Title
$PageUrl
$RssItemDesc
$RssItemPubDate
');
SDV($HandleRssFmt,array(&$RssChannelFmt,&$RssItems,''));
}
### RSS 2.0 definitions
SDV($RssTimeFmt,'%a, %d %b %Y %H:%M:%S GMT');
SDV($RssChannelFmt,'
%HTMLlat1;
%HTMLspecial;
]>
$WikiTitle - $Group.$Title
$PageUrl
$RssChannelDesc
$RssChannelBuildDate
$Version');
SDV($RssItemFmt,'
-
$PageName
$PageUrl
$RssItemDesc
$RssItemPubDate
');
SDV($HandleRssFmt,array(&$RssChannelFmt,&$RssItems,''));
function rssencode($s)
{ return preg_replace('/([\\x80-\\xff])/e',"''.ord('\$1').';'",$s); }
function HandleRss($pagename) {
global $RssMaxItems,$RssSourceSize,$RssDescSize,
$RssChannelFmt,$RssChannelDesc,$RssTimeFmt,$RssChannelBuildDate,
$RssItemsRDFList,$RssItemsRDFListFmt,$RssItems,$RssItemFmt,$RssItemDesc,
$RssItemPubDate,$GCount,$HandleRssFmt;
$t = ReadTrail($pagename);
$page = RetrieveAuthPage($pagename,false);
$cbgmt = $page['time'];
$r = array();
for($i=0;$i/s","",$text));
preg_match("/^(.{0,$RssDescSize}\\s)/s",$text,$match);
$r[] = array('name' => $t[$i]['name'],'time' => $page['time'],
'desc' => $match[1]." ...");
if ($page['time']>$cbgmt) $cbgmt=$page['time'];
}
SDV($RssChannelBuildDate,rssencode(gmstrftime($RssTimeFmt,$cbgmt)));
SDV($RssChannelDesc,rssencode(FmtPageName('$Group.$Title',$pagename)));
foreach($r as $page) {
$RssItemPubDate = gmstrftime($RssTimeFmt,$page['time']);
$RssItemDesc = $page['desc']; $GCount = 0;
$RssItemsRDFList[] =
rssencode(FmtPageName($RssItemsRDFListFmt,$page['name']));
$RssItems[] =
rssencode(FmtPageName($RssItemFmt,$page['name']));
}
header("Content-type: text/xml");
PrintFmt($pagename,$HandleRssFmt);
exit();
}