Subversion Repositories Applications.papyrus

Rev

Rev 677 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 677 Rev 690
Line 19... Line 19...
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: iw_integrateur.fonct.php,v 1.13 2005-12-27 17:25:23 ddelon Exp $
24
// CVS : $Id: iw_integrateur.fonct.php,v 1.14 2006-01-09 21:58:16 ddelon Exp $
25
/**
25
/**
26
* Fonctions de l'integrateur de page Wikini
26
* Fonctions de l'integrateur de page Wikini
27
*
27
*
28
* Application permettant d'intégrer des pages wikini dans Papyrus.
28
* Application permettant d'intégrer des pages wikini dans Papyrus.
29
*
29
*
Line 31... Line 31...
31
//Auteur original :
31
//Auteur original :
32
*@author        David Delon <david.delon@clapas.net>
32
*@author        David Delon <david.delon@clapas.net>
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Aucun
34
*@author        Aucun
35
*@copyright     Tela-Botanica 2000-2004
35
*@copyright     Tela-Botanica 2000-2004
36
*@version       $Revision: 1.13 $ $Date: 2005-12-27 17:25:23 $
36
*@version       $Revision: 1.14 $ $Date: 2006-01-09 21:58:16 $
37
*
37
*
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 153... Line 153...
153
 
153
 
154
	}
154
	}
155
	// Detournement des handlers : comme ca on peut faire ce que l'on veut ....
155
	// Detournement des handlers : comme ca on peut faire ce que l'on veut ....
Line -... Line 156...
-
 
156
	function Method($method) {
-
 
157
 
-
 
158
		if ($method=="xml") {
-
 
159
			header("Content-type: text/xml");
-
 
160
			if ($pages = $this->LoadRecentlyChanged(50)) {
-
 
161
		
-
 
162
				$link=ereg_replace('&','&amp;',$this->Href());	            
-
 
163
			    $output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
-
 
164
			    $output .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">' . "\n";
-
 
165
			    $output .= "<channel>\n";
-
 
166
			    $output .= "<title> Derniers changements sur ". $this->config["wakka_name"]  . "</title>\n";
-
 
167
			    $output .= "<link>" .  $link . "</link>\n";
-
 
168
			    $output .= "<description> Derniers changements sur " . $this->config["wakka_name"] . " </description>\n";
-
 
169
			    $output .= "<language>fr</language>\n";
-
 
170
			    $output .= '<generator>WikiNi ' . WIKINI_VERSION . "</generator>\n";
-
 
171
			    foreach ($pages as $i => $page)
-
 
172
			    {
-
 
173
			        $output .= "<item>\n";
-
 
174
			        $output .= "<title>" . $page["tag"] . "</title>\n";
-
 
175
			        $output .= '<dc:creator>' . $page["user"] . "</dc:creator>\n";
-
 
176
			        $output .= '<pubDate>' . date("r", strtotime($page['time'])) . "</pubDate>\n";
-
 
177
			        $output .= "<description> Modification de " . $page["tag"] . " --- par " .$page["user"] /* . " le " . $day ." - ". $hh .":". $mm */ . "</description>\n";
-
 
178
			        $link=ereg_replace('&','&amp;',$this->Href("",$page["tag"]));
-
 
179
			        $output .= "<link>" . $link . "&amp;time=" . rawurlencode($page["time"]) . "</link>\n";
-
 
180
			        $output .= "</item>\n";
-
 
181
			    }
-
 
182
			    $output .= "</channel>\n";
-
 
183
			    $output .= "</rss>\n";
-
 
184
			    echo $output ;
-
 
185
 
-
 
186
			}
-
 
187
			exit;
-
 
188
			return;
156
	function Method($method) {
189
		}
Line 157... Line 190...
157
 
190
 
Line 158... Line 191...
158
		if ($method=="edit") {
191
		if ($method=="edit") {
Line 318... Line 351...
318
function afficherPageMenuWikini()
351
function afficherPageMenuWikini()
319
{
352
{
Line 320... Line 353...
320
 
353
 
Line 321... Line -...
321
	$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
-
 
322
 
-
 
323
 
354
	$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
324
 
355
 
325
	global $wiki;
356
	global $wiki;
326
	global $wikini_config_defaut;
357
	global $wikini_config_defaut;
327
	$sortie='';
358
	$sortie='';
Line 435... Line 466...
435
		return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\"  ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
466
		return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\"  ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
436
	}
467
	}
437
	else {
468
	else {
438
		return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\">"."\n".$sortie.'</div>'."\n");
469
		return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\">"."\n".$sortie.'</div>'."\n");
439
	}
470
	}
-
 
471
	
-
 
472
	
Line 440... Line 473...
440
 
473
 
Line 441... Line 474...
441
}
474
}
442
 
475