3 header("Content-type: text/xml; charset=utf-8");
4 echo "<?xml version=\"1.0\"?>";
6 if( $style == "new" ) {
7 $addl = " - " . wfMsg( "newpages");
15 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
16 xmlns="http://my.netscape.com/rdf/simple/0.9/">
19 <title><?php echo iconv($wgInputEncoding, "utf-8", wfMsg("sitetitle") . $addl ) ?></title>
20 <link><?php echo $wgServer ?></link>
21 <description><?php echo iconv($wgInputEncoding, "utf-8", wfMsg("sitesubtitle") ) ?></description>
26 #<title>Wikipedia</title>
28 #<link>http://wikipedia.org/</link>
32 if( $limit < 1) $limit = 1;
33 if( $tlimit > 500) $limit = 500;
35 if(!isset($limit)) $limit = 10;
39 $sql = "SELECT rc_title as cur_title, rc_comment as cur_comment FROM recentchanges,cur
40 WHERE rc_cur_id=cur_id AND rc_new=1 AND rc_namespace=0 AND cur_is_redirect=0
41 AND LENGTH(cur_text) > 75
42 ORDER BY rc_timestamp DESC LIMIT {$limit}";
44 # 10 most recently edit articles that aren't frickin tiny
45 $sql = "SELECT rc_title as cur_title,rc_comment as cur_comment FROM recentchanges,cur
46 WHERE rc_cur_id=cur_id AND rc_namespace=0 AND rc_this_oldid=0 AND cur_is_redirect=0
47 AND LENGTH(cur_text) > 150
48 ORDER BY rc_timestamp DESC LIMIT {$limit}";
50 $res = wfQuery( $sql );
52 while( $row = wfFetchObject( $res ) ) {
53 $title = htmlspecialchars(
54 iconv($wgInputEncoding, "utf-8",
55 str_replace( "_", " ", $row->cur_title ) ) );
56 $url = wfFullUrl( wfUrlencode( $row->cur_title ) );
57 $description = "<description>" . iconv($wgInputEncoding, "utf-8",
58 htmlspecialchars( $row->cur_comment )) . "</description>";
61 <title>{$title}</title>
69 #<title>Search Wikipedia</title>
70 #<description>Search Wikipedia articles</description>
72 #<link>http://www.wikipedia.org/w/wiki.phtml?search=</link>