[ Index ] |
|
Code source de WikiNi 0.4.4 |
1 <?php 2 /* 3 recentchangesrss.php 4 5 Copyright 2003 David DELON 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21 if ($user = $this->GetUser()) 22 { 23 $max = $user["changescount"]; 24 } 25 else 26 { 27 $max = 50; 28 } 29 30 if ($pages = $this->LoadRecentlyChanged($max)) 31 { 32 if (!($link = $this->GetParameter("link"))) $link=$this->config["root_page"]; 33 $output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n"; 34 $output .= "<!-- RSS v1.0 generated by Wikini -->\n"; 35 $output .= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n"; 36 $output .= "xmlns=\"http://purl.org/rss/1.0/\">"; 37 38 $output .= "<channel rdf:about=\"" . $this->Href('', $link) . "\">\n"; 39 $output .= "<title> Derniers changements sur ". $this->config["wakka_name"] . "</title>\n"; 40 $output .= "<link>" . $this->Href('', $link) . "</link>\n"; 41 $output .= "<description> Derniers changements sur " . $this->config["wakka_name"] . " </description>\n"; 42 43 $output .= "<items>\n<rdf:Seq>\n"; 44 $items = ''; 45 foreach ($pages as $i => $page) 46 { 47 list($day, $time) = explode(" ", $page["time"]); 48 $day= preg_replace("/-/", " ", $day); 49 list($hh,$mm,$ss) = explode(":", $time); 50 $itemurl = $this->Href('', $page['tag'], "time=" . rawurlencode($page["time"])); 51 52 $output .= '<rdf:li rdf:resource="' . $itemurl . '" />'; 53 54 $items .= "<item rdf:about=\"" . $itemurl . "\">\n"; 55 $items .= "<title>" . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</title>\n"; 56 $items .= "<description> Modification de " . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</description>\n"; 57 $items .= "<link>" . $itemurl . "</link>\n"; 58 $items .= "</item>\n"; 59 } 60 $output .= "</rdf:Seq>\n</items>\n</channel>\n"; 61 $output .= $items . "</rdf:RDF>\n"; 62 echo $output ; 63 } 64 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:05:46 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |