2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
5 // $Id: rss.inc.php,v 1.2 2003/02/20 12:21:07 panda Exp $
7 // RecentChanges ¤Î RSS ¤ò½ÐÎÏ
8 function plugin_rss_action()
10 global $script,$rss_max,$page_title,$whatsnew;
12 $self = 'http://'.SERVER_NAME.PHP_SELF.'?';
14 $page_title_utf8 = $page_title;
15 if (function_exists('mb_convert_encoding')) {
16 $page_title_utf8 = mb_convert_encoding($page_title_utf8,'UTF-8',SOURCE_ENCODING);
21 if (!file_exists(CACHE_DIR.'recent.dat')) {
24 $recent = file(CACHE_DIR.'recent.dat');
25 $lines = array_splice($recent,0,$rss_max);
26 foreach ($lines as $line) {
27 list($time,$page) = explode("\t",rtrim($line));
28 $r_page = rawurlencode($page);
30 if (function_exists('mb_convert_encoding')) {
31 $title = mb_convert_encoding($title,'UTF-8',SOURCE_ENCODING);
33 $desc = get_date('D, d M Y H:i:s T',$time);
37 <link>$self$r_page</link>
38 <description>$desc</description>
44 header('Content-type: application/xml');
47 <?xml version="1.0" encoding="UTF-8"?>
49 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
50 "http://my.netscape.com/publish/formats/rss-0.91.dtd">
55 <title>$page_title_utf8</title>
56 <link>$self$whatsnew</link>
57 <description>PukiWiki RecentChanges</description>
58 <language>ja</language>