Subversion Repositories Applications.papyrus

Rev

Rev 438 | Rev 442 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
433 ddelon 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of Integrateur Wikini.                                                             |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
439 ddelon 24
// CVS : $Id: iw_config.inc.php,v 1.6 2005-09-09 09:37:17 ddelon Exp $
433 ddelon 25
/**
26
* Configuration de l'intégrateur de page Wikini
27
*
28
* Fichier de configuration de l'intégrateur de page Wikini
29
*
30
*@package IntegrateurWikini
31
*@subpackage Configuration
32
//Auteur original :
33
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
34
//Autres auteurs :
35
*@author        Aucun
36
*@copyright     Tela-Botanica 2000-2004
439 ddelon 37
*@version       $Revision: 1.6 $ $Date: 2005-09-09 09:37:17 $
433 ddelon 38
// +------------------------------------------------------------------------------------------------------+
39
*/
40
 
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
44
 
436 ddelon 45
 
433 ddelon 46
// +------------------------------------------------------------------------------------------------------+
47
// Définition de la langue
48
/** Constante stockant la valeur i18n fournie par Papyrus et pouvant être passée dans l'url.*/
49
define('IW_I18N', $GLOBALS['_GEN_commun']['i18n']);
50
 
51
// +------------------------------------------------------------------------------------------------------+
52
// Définition des chemins de fichiers.
53
/** Constante stockant le chemin du dossier racine.*/
54
define('IW_CHEMIN_RACINE', GEN_CHEMIN_CLIENT.'integrateur_wikini'.GEN_SEP);
55
/** Constante stockant le chemin du dossier contenant les traductions.*/
56
define('IW_CHEMIN_LANGUES', IW_CHEMIN_RACINE.'langues'.GEN_SEP);
57
/** Constante stockant le chemin du dossier contenant la bibliothèque de code.*/
58
define('IW_CHEMIN_BIBLIO', IW_CHEMIN_RACINE.'bibliotheque'.GEN_SEP);
59
/** Constante stockant le chemin du dossier contenant la bibliothèque Wikini.*/
60
define('IW_CHEMIN_BIBLIO_WIKINI', IW_CHEMIN_BIBLIO.'wikini'.GEN_SEP);
436 ddelon 61
/** Constante stockant le chemin du dossier contenant les sites Wikini.*/
62
define('IW_CHEMIN_WIKINI', GEN_CHEMIN_WIKINI);
433 ddelon 63
 
437 ddelon 64
// TODO : un wiki par défaut pour chaque papyrus à l'installation de Papyrus
436 ddelon 65
if (!isset($GLOBALS['_GEN_commun']['info_application']->wikini)) {
66
   $GLOBALS['_GEN_commun']['info_application']->wikini = 'defaut';
433 ddelon 67
}
437 ddelon 68
 
436 ddelon 69
$config_wikini = adwi_valeurs_par_code_alpha($GLOBALS['_GEN_commun']['info_application']->wikini,&$GLOBALS['_GEN_commun']['pear_db'] );
70
 
437 ddelon 71
// Parametres de base de donnée de Papyrus par défaut
72
 
73
 
74
if ((!isset($config_wikini['bdd_hote'])) || (empty($config_wikini['bdd_hote']))) {
75
   $config_wikini['bdd_hote'] = PAP_BDD_SERVEUR;
76
}
77
 
78
if ((!isset($config_wikini['bdd_nom'])) || (empty($config_wikini['bdd_nom'])))  {
79
   $config_wikini['bdd_nom'] = PAP_BDD_NOM;
80
}
81
 
82
if ((!isset($config_wikini['bdd_utilisateur'])) || (empty($config_wikini['bdd_utilisateur'])))  {
83
   $config_wikini['bdd_utilisateur'] = PAP_BDD_UTILISATEUR;
84
}
85
 
86
if ((!isset($config_wikini['bdd_mdp'])) || (empty($config_wikini['bdd_mdp'])))  {
87
   $config_wikini['bdd_mdp'] = PAP_BDD_MOT_DE_PASSE;
88
}
89
 
438 ddelon 90
if ((!isset($config_wikini['table_prefix'])) || (empty($config_wikini['table_prefix'])))  {
91
	$config_wikini['table_prefix'] = $GLOBALS['_GEN_commun']['info_application']->wikini.'_';
92
}
93
 
437 ddelon 94
 
438 ddelon 95
// Ordre de selection de la page de demarrage :
439 ddelon 96
// Page Specifiee dans le menu
97
// Page par defaut du Wiki enregistré
437 ddelon 98
// PagePrincipale
99
 
100
if ((!isset($GLOBALS['_GEN_commun']['info_application']->page))  ||  (empty($GLOBALS['_GEN_commun']['info_application']->page))) {
101
	if ((!isset($config_wikini['page']))  || (empty($config_wikini['page']))) {
102
   		$config_wikini['page'] = 'PagePrincipale';
103
	}
104
}
105
else {
106
	$config_wikini['page'] = $GLOBALS['_GEN_commun']['info_application']->page;
107
}
108
 
109
if ((!isset($config_wikini['code_alpha_wikini'])) || (empty($config_wikini['code_alpha_wikini'])))  {
110
   $config_wikini['code_alpha_wikini'] = $GLOBALS['_GEN_commun']['info_application']->wikini;
111
}
112
 
436 ddelon 113
/** Constante stockant le chemin du dossier contenant le site Wikini en cours */
439 ddelon 114
 
115
/** Utilité ? **/
437 ddelon 116
if ((!isset($config_wikini['chemin'])) || (empty($config_wikini['chemin'])))  {
117
	define('IW_CHEMIN_WIKINI_COURANT', GEN_CHEMIN_WIKINI.$config_wikini['code_alpha_wikini'].GEN_SEP);
118
}
119
else {
120
	define('IW_CHEMIN_WIKINI_COURANT',$config_wikini['chemin'].GEN_SEP);
121
}
122
 
436 ddelon 123
/** Constante stockant le chemin du dossier contenant le site Wikini en cours */
124
define('IW_CHEMIN_WIKINI_COURANT_FORMATTER', IW_CHEMIN_WIKINI_COURANT.'formatters'.GEN_SEP);
125
 
433 ddelon 126
global $wikini_config_defaut;
436 ddelon 127
 
433 ddelon 128
$wikini_config_defaut = array(
434 ddelon 129
    "wakka_version" => "0.1.1",
130
	"wikini_version" => "0.4.3",
436 ddelon 131
    'mysql_host'            => $config_wikini['bdd_hote'],
132
    'mysql_database'        => $config_wikini['bdd_nom'],
133
    'mysql_user'            => $config_wikini['bdd_utilisateur'],
134
    'mysql_password'        => $config_wikini['bdd_mdp'],
135
    'table_prefix'          => $config_wikini['table_prefix'],
136
    'root_page'             => $config_wikini['page'],
137
    'wakka_name'            => $config_wikini['code_alpha_wikini'],
434 ddelon 138
    'base_url'              => str_replace('&amp;', '&', $GLOBALS['_GEN_commun']['url']->getUrl()).'&wiki=',
433 ddelon 139
    'rewrite_mode'          => '0',
140
    'meta_keywords'         => '',
141
    'meta_description'      => '',
436 ddelon 142
    'action_path'           => IW_CHEMIN_WIKINI_COURANT.'actions',
143
    'handler_path'          => IW_CHEMIN_WIKINI_COURANT.'handlers',
433 ddelon 144
    'header_action'         => 'header',
145
    'footer_action'         => 'footer',
146
    'navigation_links'      => 'DerniersChangements :: DerniersCommentaires :: ParametresUtilisateur',
147
    'referrers_purge_time'  => 24,
148
    'pages_purge_time'      => 90,
149
    'default_write_acl'     => '*',
150
    'default_read_acl'      => '*',
151
    'default_comment_acl'   => '*',
152
    'preview_before_save'   => '0');
434 ddelon 153
 
433 ddelon 154
// +------------------------------------------------------------------------------------------------------+
155
// |                                            PIED du PROGRAMME                                         |
156
// +------------------------------------------------------------------------------------------------------+
157
 
158
 
159
 
160
/* +--Fin du code ----------------------------------------------------------------------------------------+
161
*
162
* $Log: not supported by cvs2svn $
439 ddelon 163
* Revision 1.5  2005/09/06 08:35:36  ddelon
164
* Integrateur Wikini et administration des Wikini
165
*
438 ddelon 166
* Revision 1.4  2005/09/02 11:29:25  ddelon
167
* Integrateur Wikini et administration des Wikini
168
*
437 ddelon 169
* Revision 1.3  2005/08/31 17:34:52  ddelon
170
* Integrateur Wikini et administration des Wikini
171
*
436 ddelon 172
* Revision 1.2  2005/08/25 08:59:12  ddelon
173
* Integrateur Wikini et administration des Wikini
174
*
433 ddelon 175
* Revision 1.1  2005/03/02 17:47:05  jpm
176
* Ajout des fichiers necessaires à l'intégrateur de wikini.
177
*
178
*
179
* +-- Fin du code ----------------------------------------------------------------------------------------+
180
*/
181
?>