/trunk/wikini/maj_wikini/actions/recentcommentsrss.php |
---|
New file |
0,0 → 1,102 |
<?php |
/* |
recentchangesrss.php |
Copyright 2003,2007 David DELON, Jean-Pascal MILCENT |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
*/ |
if ($user = $this->GetUser()) { |
$max = $user['changescount']; |
} else { |
$max = 50; |
} |
if ($comments = $this->LoadRecentComments($max)) { |
if (!($link = $this->GetParameter('link'))) $link = $this->GetConfigValue('root_page'); |
if (!($format = $this->GetParameter('format'))) $format = 'rss1.0'; |
// Création de la sortie pour le contenu xml |
$output = '<?xml version="1.0" encoding="iso-8859-1" ?>'."\n"; |
// En-tête du contenu xml |
switch ($format) { |
case 'rss1.0' : |
$output .= '<!-- RSS v1.0 generated by Wikini -->'."\n"; |
$output .= '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'."\n"; |
$output .= 'xmlns="http://purl.org/rss/1.0/">'; |
$output .= '<channel rdf:about="'.$this->Href('', $link).'">'."\n"; |
$output .= '<title>Derniers commentaires sur '.$this->GetConfigValue('wakka_name').'</title>'."\n"; |
$output .= '<link>'.$this->Href('', $link).'</link>'."\n"; |
$output .= '<description>Derniers commentaires sur '.$this->GetConfigValue('wakka_name').'</description>'."\n"; |
$output .= "<items>\n<rdf:Seq>\n"; |
break; |
case 'rss2.0' : |
$output .= '<!-- RSS v2.0 generated by Wikini -->'."\n"; |
$output .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" >'."\n"; |
$output .= '<channel>'."\n"; |
$output .= '<title>Derniers commentaires sur '.$this->GetConfigValue('wakka_name').'</title>'."\n"; |
$output .= '<link>'.$this->Href('', $link).'</link>'."\n"; |
$output .= '<description>Derniers commentaires sur '.$this->GetConfigValue('wakka_name').'</description>'."\n"; |
break; |
} |
// Corps du contenu XML |
$items = ''; |
foreach ($comments as $i => $comment) { |
list($day, $time) = explode(' ', $comment['time']); |
$day = preg_replace('/-/', ' ', $day); |
list($hh,$mm,$ss) = explode(':', $time); |
$itemurl = $this->Href('', $comment['comment_on'], 'show_comments=1#'.$comment['tag']); |
switch ($format) { |
case 'rss1.0' : |
$output .= '<rdf:li rdf:resource="' . $itemurl . '" />'; |
$items .= '<item rdf:about="'.$itemurl.'">'."\n"; |
$items .= '<title>Commentaire '.$comment['tag'].' - page '.$comment['comment_on'].' --- par '.$comment['user'].' le '.$day.' - '.$hh.':'.$mm.'</title>'."\n"; |
$items .= '<description>'.'Modification du commentaire '.$comment['tag'].' sur la page '.$comment['comment_on'].' --- par '.$comment['user'].' le '.$day.' - '.$hh.':'.$mm.'</description>'."\n"; |
$items .= '<link>'.$itemurl.'</link>'."\n"; |
$items .= '</item>'."\n"; |
break; |
case 'rss2.0' : |
$output .= '<item>'."\n"; |
$output .= '<title>Commentaire '.$comment['tag'].' - page '.$comment['comment_on'].' --- par '.$comment['user'].' le '.$day.' - '.$hh.':'.$mm.'</title>'."\n"; |
$output .= '<link>'.$itemurl.'</link>'."\n"; |
$output .= '<guid>'.$itemurl.'</guid>'."\n"; |
$output .= '<description>'.htmlentities($this->Format($comment['body'])).'</description>'."\n"; |
$output .= '<content:encoded>'.htmlentities($this->Format($comment['body'])).'</content:encoded>'."\n"; |
$output .= '</item>'."\n"; |
break; |
} |
} |
//Pied du contenu XML |
switch ($format) { |
case 'rss1.0' : |
$output .= "</rdf:Seq>\n</items>\n</channel>\n"; |
$output .= $items . "</rdf:RDF>\n"; |
break; |
case 'rss2.0' : |
$output .= '</channel>'."\n"; |
$output .= '</rss>'."\n"; |
break; |
} |
echo $output; |
} |
?> |
/trunk/wikini/maj_wikini/actions/header.php |
---|
New file |
0,0 → 1,116 |
<?php |
/* header.php |
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de> |
Copyright 2002, 2003 David DELON |
Copyright 2002, 2003, 2004 Charles NEPOTE |
Copyright 2002 Patrick PAUL |
Copyright 2003 Eric DELORD |
All rights reserved. |
Redistribution and use in source and binary forms, with or without |
modification, are permitted provided that the following conditions |
are met: |
1. Redistributions of source code must retain the above copyright |
notice, this list of conditions and the following disclaimer. |
2. Redistributions in binary form must reproduce the above copyright |
notice, this list of conditions and the following disclaimer in the |
documentation and/or other materials provided with the distribution. |
3. The name of the author may not be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
$message = $this->GetMessage(); |
$user = $this->GetUser(); |
?> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html> |
<head> |
<title><?php echo $this->GetWakkaName().":".$this->GetPageTag(); ?></title> |
<?php if ($this->GetMethod() != 'show') |
echo "<meta name=\"robots\" content=\"noindex, nofollow\"/>\n";?> |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> |
<meta name="keywords" content="<?php echo $this->GetConfigValue("meta_keywords") ?>" /> |
<meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" /> |
<link rel="stylesheet" type="text/css" media="screen" href="wakka.basic.css" /> |
<style type="text/css" media="all"> @import "<?php echo (!$_COOKIE["sitestyle"])?'wakka':$_COOKIE["sitestyle"] ?>.css";</style> |
<script type="text/javascript"> |
function fKeyDown() { |
if (event.keyCode == 9) { |
event.returnValue= false; |
document.selection.createRange().text = String.fromCharCode(9) } } |
</script> |
<!-- The ACeditor contribution --> |
<style type="text/css"> |
.buttons { background: #ccc; border: 1px solid #ccc; margin: 1; float:left; } |
.raise{ border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; background: #ccc; margin:1; float:left; } |
.press { border-top: 1px solid buttonshadow; border-left: 1px solid buttonshadow; border-bottom: 1px solid buttonhighlight; border-right: 1px solid buttonhighlight; background: #ccc; margin:1; float:left; } |
/* ci dessous les petits champs */ |
.ACsearchbox { background: #FFFFF8; border: 0px; border-bottom: 1px solid #CCCCAA; padding: 0px; margin: 0px; font-size: 10px; } |
.texteChampsImage {font-size: 10px; } |
#toolbar { margin: 0; width: 450px; padding: 0; height:20px; background: #ccc; border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; text-align:left; } |
</style> |
<script type="text/javascript" src="ACeditor.js"></script> |
<!-- End on The ACEditor Contrib --> |
</head> |
<body <?php echo (!$user || ($user["doubleclickedit"] == 'Y')) && ($this->GetMethod() == "show") ? "ondblclick=\"document.location='".$this->href("edit")."';\" " : "" ?> |
<?php /* ACeditor*/ echo "onLoad=\"thisForm=document.ACEditor;\""?> > |
<div style="display: none;"><a href="<?php echo $this->href() ?>/resetstyle" accesskey="7"></a></div> |
<? |
$menu_page=$this->config["menu_page"]; |
if (version_compare(phpversion(), '5.0') < 0) { |
eval(' |
if (!function_exists("clone")) { |
function clone($object) { |
return $object; |
} |
} |
'); |
} |
if (isset($menu_page) and ($menu_page!="")) |
{ |
// Ajout Menu de Navigation |
echo '<table class="page_table">'; |
echo '<tr><td class="menu_column">'; |
$wikiMenu = clone($this); |
$wikiMenu->tag=$menu_page; |
$wikiMenu->SetPage($wikiMenu->LoadPage($wikiMenu->tag)); |
echo $wikiMenu->Format($wikiMenu->page["body"], "wakka"); |
echo '</td>'; |
echo '<td class="body_column">'; |
} |
?> |
<h1 class="wiki_name"><?php echo $this->config["wakka_name"] ?></h1> |
<h1 class="page_name"> |
<a href="<?php echo $this->config["base_url"] ?>RechercheTexte&phrase=<?php echo urlencode($this->GetPageTag()); ?>"> |
<?php echo $this->GetPageTag(); ?> |
</a> |
</h1> |
<div class="header"> |
<?php echo $this->ComposeLinkToPage($this->config["root_page"]); ?> :: |
<?php echo $this->config["navigation_links"] ? $this->Format($this->config["navigation_links"])." :: \n" : "" ?> |
Vous êtes <?php echo $this->Format($this->GetUserName()); if ($user = $this->GetUser()) echo " (<a href=\"".$this->config["base_url"] ."ParametresUtilisateur&action=logout\">Déconnexion</a>)\n"; ?> |
</div> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/wikini/maj_wikini/actions/recentusersrss.php |
---|
New file |
0,0 → 1,106 |
<?php |
/* |
recentusersrss.php |
Copyright 2003,2007 David DELON, Jean-Pascal MILCENT |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
*/ |
if ($user = $this->GetUser()) { |
$max = $user['changescount']; |
} else { |
$max = 50; |
} |
$last_users = $this->LoadAll('SELECT name, signuptime, motto FROM '.$this->GetConfigValue('table_prefix').'users ORDER BY signuptime DESC LIMIT '.$max); |
if ($last_users) { |
if (!($link = $this->GetParameter('link'))) $link = $this->GetConfigValue('root_page'); |
if (!($format = $this->GetParameter('format'))) $format = 'rss1.0'; |
// Création de la sortie pour le contenu xml |
$output = '<?xml version="1.0" encoding="iso-8859-1" ?>'."\n"; |
// En-tête du contenu xml |
switch ($format) { |
case 'rss1.0' : |
$output .= '<!-- RSS v1.0 generated by Wikini -->'."\n"; |
$output .= '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'."\n"; |
$output .= 'xmlns="http://purl.org/rss/1.0/">'; |
$output .= '<channel rdf:about="'.$this->Href('', $link).'">'."\n"; |
$output .= '<title>Derniers inscrits sur '.$this->GetConfigValue('wakka_name').'</title>'."\n"; |
$output .= '<link>'.$this->Href('', $link).'</link>'."\n"; |
$output .= '<description>Derniers inscrits sur '.$this->GetConfigValue('wakka_name').'</description>'."\n"; |
$output .= "<items>\n<rdf:Seq>\n"; |
break; |
case 'rss2.0' : |
$output .= '<!-- RSS v2.0 generated by Wikini -->'."\n"; |
$output .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" >'."\n"; |
$output .= '<channel>'."\n"; |
$output .= '<title>Derniers inscrits sur '.$this->GetConfigValue('wakka_name').'</title>'."\n"; |
$output .= '<link>'.$this->Href('', $link).'</link>'."\n"; |
$output .= '<description>Derniers inscrits sur '.$this->GetConfigValue('wakka_name').'</description>'."\n"; |
break; |
} |
// Corps du contenu XML |
$items = ''; |
foreach ($last_users as $i => $user) { |
$itemurl = $this->Href('', $user['name']); |
switch ($format) { |
case 'rss1.0' : |
$output .= '<rdf:li rdf:resource="' . $itemurl . '" />'; |
$items .= '<item rdf:about="'.$itemurl.'">'."\n"; |
$items .= '<title>'.'Utilisateur '.htmlentities($user['name']).' - inscription le '.$user['signuptime'].'</title>'."\n"; |
$items .= '<description>'.'L\'utilisateur '.htmlentities($user['name']).' s\'est inscrit le '.$user['signuptime']; |
if (!empty($user['motto'])) { |
$items .= ' avec pour devise "'.htmlentities($user['motto']).'"'; |
} |
$items .= '</description>'."\n"; |
$items .= '<link>'.$itemurl.'</link>'."\n"; |
$items .= '</item>'."\n"; |
break; |
case 'rss2.0' : |
$output .= '<item>'."\n"; |
$output .= '<title>'.'Utilisateur '.htmlentities($user['name']).' - inscription le '.$user['signuptime'].'</title>'."\n"; |
$output .= '<link>'.$itemurl.'</link>'."\n"; |
$output .= '<guid>'.$itemurl.'</guid>'."\n"; |
$output .= '<description>'.'L\'utilisateur '.htmlentities($user['name']).' s\'est inscrit le '.$user['signuptime']; |
if (!empty($user['motto'])) { |
$output .= ' avec pour devise "'.htmlentities($user['motto']).'"'; |
} |
$output .= '</description>'."\n"; |
$output .= '</item>'."\n"; |
break; |
} |
} |
//Pied du contenu XML |
switch ($format) { |
case 'rss1.0' : |
$output .= "</rdf:Seq>\n</items>\n</channel>\n"; |
$output .= $items . "</rdf:RDF>\n"; |
break; |
case 'rss2.0' : |
$output .= '</channel>'."\n"; |
$output .= '</rss>'."\n"; |
break; |
} |
echo $output; |
} |
?> |