Subversion Repositories Applications.papyrus

Rev

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

Rev 434 Rev 436
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: integrateur_wikini.php,v 1.2 2005-08-25 08:59:12 ddelon Exp $
24
// CVS : $Id: integrateur_wikini.php,v 1.3 2005-08-31 17:34:52 ddelon Exp $
25
/**
25
/**
26
* Integrateur de page Wikini
26
* 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        Jean-Pascal MILCENT <jpm@tela-botanica.org>
32
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
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.2 $ $Date: 2005-08-25 08:59:12 $
36
*@version       $Revision: 1.3 $ $Date: 2005-08-31 17:34:52 $
37
*
37
*
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
-
 
41
 
-
 
42
 
41
/** Inclusion de la classe PEAR de gestion des URL. */
43
/** Inclusion de la classe PEAR de gestion des URL. */
42
require_once 'Net/URL.php';
44
require_once 'Net/URL.php';
-
 
45
 
-
 
46
// TODO : un seul fichier de configuration ?
-
 
47
/** Inclusion du fichier de configuration de cette application.*/
-
 
48
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
-
 
49
 
-
 
50
require_once ADWI_CHEMIN_BIBLIOTHEQUE.'adwi_wikini.fonct.php';
-
 
51
 
43
/** Inclusion du fichier de configuration général de IntegrateurWikini.*/
52
/** Inclusion du fichier de configuration général de IntegrateurWikini.*/
44
require_once 'client'.GEN_SEP.'integrateur_wikini'.GEN_SEP.'configuration'.GEN_SEP.'iw_config.inc.php';
53
require_once 'client'.GEN_SEP.'integrateur_wikini'.GEN_SEP.'configuration'.GEN_SEP.'iw_config.inc.php';
Line 45... Line 54...
45
 
54
 
46
/** Inclusion du fichier permettant d'encoder du texte mais pas les balises XHTML.*/
55
/** Inclusion du fichier permettant d'encoder du texte mais pas les balises XHTML.*/
47
require_once IW_CHEMIN_BIBLIO.'iw_encodage.fonct.php';
56
require_once IW_CHEMIN_BIBLIO.'iw_encodage.fonct.php';
48
/** Inclusion du fichier permettant d'inclure les données dans du XHTML.*/
57
/** Inclusion du fichier permettant d'inclure les données dans du XHTML.*/
Line -... Line 58...
-
 
58
require_once IW_CHEMIN_BIBLIO.'iw_affichage_xhtml.fonct.php';
49
require_once IW_CHEMIN_BIBLIO.'iw_affichage_xhtml.fonct.php';
59
 
50
 
60
global $wikini_config_defaut;
Line -... Line 61...
-
 
61
global $wiki;
-
 
62
global $wiki_p;
-
 
63
 
51
global $wiki;
64
 
52
global $wiki_p;
65
// $_REQUEST['wiki'] est obligatoire, car wakka.php envoie un redirect si non detecté, avec perte de tout l'environnement !
53
 
66
 
Line 54... Line 67...
54
if ( ! isset( $_REQUEST['wiki'] ) ) {
67
if ( ! isset( $_REQUEST['wiki'] ) ) {
55
    $_REQUEST['wiki'] = $GLOBALS['_GEN_commun']['info_application']->page;
68
	    $_REQUEST['wiki'] = $wikini_config_defaut['root_page'];
Line 65... Line 78...
65
// Dans tous les cas, il faut gerer le WakaConfig Generique !
78
// Dans tous les cas, il faut gerer le WakaConfig Generique !
66
// Prevoir de revoir la contrib menu ... qui doit être switchable, ou plutot,
79
// Prevoir de revoir la contrib menu ... qui doit être switchable, ou plutot,
67
// Customiser son menu avec papyrus ...
80
// Customiser son menu avec papyrus ...
Line 68... Line 81...
68
 
81
 
69
ob_start();
82
ob_start();
70
include_once '/home/david/workspace/papyrus/wikini/wikini_01/wakka.php';
83
include_once IW_CHEMIN_WIKINI_COURANT.'wakka.php';
71
ob_end_clean();
-
 
72
 
84
ob_end_clean();
Line 73... Line 85...
73
$_SERVER['PHP_SELF']=$server;
85
$_SERVER['PHP_SELF']=$server;
74
 
86
 
75
 
87
 
76
// On surcharge la classe Wiki pour en faire ce qu'on en veut
88
// On surcharge la classe Wiki pour en faire ce qu'on en veut
77
Class Wiki_Papyrus extends Wiki {
89
Class Wiki_Papyrus extends Wiki {
78
    function Format($text, $formatter = "wakka") {
90
    function Format($text, $formatter = "wakka") {
Line 79... Line 91...
79
		return $this->IncludeBuffered("/home/david/workspace/papyrus/wikini/wikini_01/formatters/".$formatter.".php", "<i>Impossible de trouver le formateur \"$formatter\"</i>", compact("text")); 
91
		return $this->IncludeBuffered(IW_CHEMIN_WIKINI_COURANT_FORMATTER.$formatter.".php", "<i>Impossible de trouver le formateur \"$formatter\"</i>", compact("text")); 
80
	}
92
	}
Line 132... Line 144...
132
*
144
*
133
* @return  string  du code XHTML correspondant au contenu renvoyé par l'application.
145
* @return  string  du code XHTML correspondant au contenu renvoyé par l'application.
134
*/
146
*/
135
function afficherContenuCorps()
147
function afficherContenuCorps()
136
{
148
{
137
	global $wiki;
-
 
Line -... Line 149...
-
 
149
	
-
 
150
	global $wiki;
138
	
151
	global $wikini_config_defaut;
139
	$sortie='';
-
 
140
	
152
	$sortie='';
141
    $wakkaConfig = $GLOBALS['wikini_config_defaut'];
153
    $wakkaConfig = $GLOBALS['wikini_config_defaut'];
Line 142... Line 154...
142
    $wiki  = new Wiki_Papyrus($wakkaConfig);
154
    $wiki  = new Wiki_Papyrus($wakkaConfig);
143
 
155
 
Line 174... Line 186...
174
    
186
    
175
    $sortie.= ob_get_contents();
187
    $sortie.= ob_get_contents();
Line 176... Line -...
176
    ob_end_clean();
-
 
177
 
188
    ob_end_clean();
Line 178... Line 189...
178
 
189
 
Line 190... Line 201...
190
*
201
*
191
* @return  string  du code XHTML correspondant au pied renvoyé par l'application.
202
* @return  string  du code XHTML correspondant au pied renvoyé par l'application.
192
*/
203
*/
193
function afficherContenuPied()
204
function afficherContenuPied()
194
{
205
{
-
 
206
	return;
195
    return inclusion_html('pied_page');
207
    return inclusion_html('pied_page');
196
}
208
}
197
?>
209
?>
198
210