Mise en route du suivi.
[aidenligne_francais_universite.git] / ecrire / exec / configuration.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2007 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13 if (!defined("_ECRIRE_INC_VERSION")) return;
14
15 // http://doc.spip.org/@exec_configuration_dist
16 function exec_configuration_dist()
17 {
18 global $connect_statut, $connect_toutes_rubriques, $options, $spip_lang_left, $spip_lang_right,$changer_config, $spip_display;
19
20 include_spip('inc/presentation');
21 include_spip('inc/config');
22
23 if ($connect_statut != '0minirezo') {
24 echo _T('avis_non_acces_page');
25 echo fin_gauche(), fin_page();
26 exit;
27 }
28
29 if (!$connect_toutes_rubriques) {
30 include_spip('inc/headers');
31 redirige_par_entete(generer_url_ecrire('admin_tech','',true));
32 }
33
34 //
35 // Modifications
36 //
37
38
39 init_config();
40 if ($changer_config == 'oui') {
41 appliquer_modifs_config();
42 }
43 else {
44 $forums_publics = $GLOBALS['meta']["forums_publics"];
45 if (!$forums_publics) {
46 ecrire_meta("forums_publics", "posteriori");
47 ecrire_metas();
48 }
49 }
50 lire_metas();
51
52 pipeline('exec_init',array('args'=>array('exec'=>'configuration'),'data'=>''));
53
54 $commencer_page = charger_fonction('commencer_page', 'inc');
55 echo $commencer_page(_T('titre_page_configuration'), "configuration", "configuration");
56
57 echo "<br /><br /><br />\n";
58 gros_titre(_T('titre_configuration'));
59 echo barre_onglets("configuration", "contenu");
60
61
62 debut_gauche();
63
64 //
65 // Le logo de notre site, c'est site{on,off}0.{gif,png,jpg}
66 //
67 if ($spip_display != 4) {
68 $iconifier = charger_fonction('iconifier', 'inc');
69 echo $iconifier('id_syndic', 0, 'configuration', true);
70 }
71
72 echo pipeline('affiche_gauche',array('args'=>array('exec'=>'configuration'),'data'=>''));
73 creer_colonne_droite();
74 echo pipeline('affiche_droite',array('args'=>array('exec'=>'configuration'),'data'=>''));
75 debut_droite();
76
77 echo avertissement_config();
78
79 //
80 // Afficher les options de config
81 //
82 $action = generer_url_ecrire('configuration');
83
84 echo "<form action='$action' method='post'><div>", form_hidden($action);
85 echo "<input type='hidden' name='changer_config' value='oui' />";
86 debut_cadre_couleur("racine-site-24.gif");
87
88 // initialiser adresse_site au besoin
89 if (strlen($GLOBALS['meta']["adresse_site"])<10) {
90 ecrire_meta('adresse_site', preg_replace(",/$,", "", url_de_base()),'non');
91 ecrire_metas();
92 }
93 $adresse_site = entites_html($GLOBALS['meta']["adresse_site"]);
94
95 $nom_site = entites_html($GLOBALS['meta']["nom_site"]);
96 $email_webmaster = entites_html($GLOBALS['meta']["email_webmaster"]);
97 $descriptif_site = entites_html($GLOBALS['meta']["descriptif_site"]);
98
99
100 debut_cadre_relief("", false, "", _T('info_nom_site').aide ("confnom"));
101 echo "<input type='text' name='nom_site' value=\"$nom_site\" size='40' class='forml' />";
102 fin_cadre_relief();
103
104 debut_cadre_relief("", false, "", _T('info_adresse_url'));
105 echo "<input type='text' name='adresse_site' value=\"$adresse_site/\" size='40' class='forml' />";
106 fin_cadre_relief();
107
108 debut_cadre_relief("", false, "", _T('entree_description_site'));
109 echo "<textarea name='descriptif_site' class='forml' rows='4' cols='40'>$descriptif_site</textarea>";
110 fin_cadre_relief();
111
112 if ($options == "avancees") {
113 echo "<div>&nbsp;</div>";
114
115 debut_cadre_relief("", false, "", _T('info_email_webmestre'));
116 echo "<input type='text' name='email_webmaster' value=\"$email_webmaster\" size='40' class='formo' />";
117 fin_cadre_relief();
118 }
119
120 echo "<div style='text-align:right;'><input type='submit' name='Valider' value='"._T('bouton_enregistrer')."' class='fondo' /></div>";
121
122 fin_cadre_couleur();
123
124 echo "<p>&nbsp;</p>";
125
126
127 //
128 // Options des articles
129 //
130
131 if ($options == 'avancees') {
132 debut_cadre_trait_couleur("article-24.gif", false, "", _T('titre_les_articles'));
133
134
135 //
136 // Champs optionnels des articles
137 //
138
139 debut_cadre_relief("", false, "", _T('info_contenu_articles').aide ("confart"));
140
141 $articles_surtitre = $GLOBALS['meta']["articles_surtitre"];
142 $articles_soustitre = $GLOBALS['meta']["articles_soustitre"];
143 $articles_descriptif = $GLOBALS['meta']["articles_descriptif"];
144 $articles_chapeau = $GLOBALS['meta']["articles_chapeau"];
145 $articles_ps = $GLOBALS['meta']["articles_ps"];
146 $articles_redac = $GLOBALS['meta']["articles_redac"];
147 $articles_urlref = $GLOBALS['meta']["articles_urlref"];
148
149 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
150
151 echo "<tr><td colspan='2' class='verdana2'>";
152 echo _T('texte_contenu_articles');
153 echo "</td></tr>";
154
155 echo "<tr>";
156 echo "<td align='$spip_lang_left' class='verdana2'>";
157 echo _T('info_surtitre');
158 echo "</td>";
159 echo "<td align='$spip_lang_left' class='verdana2'>";
160 echo afficher_choix('articles_surtitre', $articles_surtitre,
161 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
162 echo "</td></tr>\n";
163
164 echo "<tr>";
165 echo "<td align='$spip_lang_left' class='verdana2'>";
166 echo _T('info_sous_titre');
167 echo "</td>";
168 echo "<td align='$spip_lang_left' class='verdana2'>";
169 echo afficher_choix('articles_soustitre', $articles_soustitre,
170 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
171 echo "</td></tr>\n";
172
173 echo "<tr>";
174 echo "<td align='$spip_lang_left' class='verdana2'>";
175 echo _T('info_descriptif');
176 echo "</td>";
177 echo "<td align='$spip_lang_left' class='verdana2'>";
178 echo afficher_choix('articles_descriptif', $articles_descriptif,
179 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
180 echo "</td></tr>\n";
181
182 echo "<tr>";
183 echo "<td align='$spip_lang_left' class='verdana2'>";
184 echo _T('info_chapeau_2');
185 echo "</td>";
186 echo "<td align='$spip_lang_left' class='verdana2'>";
187 echo afficher_choix('articles_chapeau', $articles_chapeau,
188 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
189 echo "</td></tr>\n";
190
191 echo "<tr>";
192 echo "<td align='$spip_lang_left' class='verdana2'>";
193 echo _T('info_post_scriptum_2');
194 echo "</td>";
195 echo "<td align='$spip_lang_left' class='verdana2'>";
196 echo afficher_choix('articles_ps', $articles_ps,
197 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
198 echo "</td></tr>\n";
199
200 echo "<tr>";
201 echo "<td align='$spip_lang_left' class='verdana2'>";
202 echo _T('info_date_publication_anterieure');
203 echo "</td>";
204 echo "<td align='$spip_lang_left' class='verdana2'>";
205 echo afficher_choix('articles_redac', $articles_redac,
206 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
207 echo "</td></tr>\n";
208
209 echo "<tr>";
210 echo "<td align='$spip_lang_left' class='verdana2'>";
211 echo _T('info_urlref');
212 echo "</td>";
213 echo "<td align='$spip_lang_left' class='verdana2'>";
214 echo afficher_choix('articles_urlref', $articles_urlref,
215 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " &nbsp; ");
216 echo "</td></tr>\n";
217
218 echo "<tr><td style='text-align: $spip_lang_right;' colspan='2'>";
219 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />";
220 echo "</td></tr>";
221 echo "</table>";
222
223 fin_cadre_relief();
224
225 //
226 // Articles post-dates
227 //
228
229 debut_cadre_relief("", false, "", _T('titre_publication_articles_post_dates').aide ("confdates"));
230
231 $post_dates = $GLOBALS['meta']["post_dates"];
232
233 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
234 echo "<tr><td class='verdana2'>";
235 echo _T('texte_publication_articles_post_dates');
236 echo "</td></tr>";
237
238 echo "<tr><td align='$spip_lang_left' class='verdana2'>";
239 echo afficher_choix('post_dates', $post_dates,
240 array('oui' => _T('item_publier_articles'),
241 'non' => _T('item_non_publier_articles')));
242 echo "</td></tr>\n";
243
244 echo "<tr><td style='text-align:$spip_lang_right;'>";
245 echo "<input type='submit' value='"._T('bouton_valider')."' class='fondo' />";
246 echo "</td></tr>";
247 echo "</table>\n";
248
249 fin_cadre_relief();
250
251 fin_cadre_trait_couleur();
252 }
253
254
255
256 echo "<br />\n";
257
258
259 //
260 // Actives/desactiver les breves
261 //
262
263 debut_cadre_trait_couleur("breve-24.gif", false, "", _T('titre_breves').aide ("confbreves"));
264
265 $activer_breves = $GLOBALS['meta']["activer_breves"];
266
267 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
268 echo "<tr><td class='verdana2'>";
269 echo _T('texte_breves')."<br />\n";
270 echo _T('info_breves');
271 echo "</td></tr>";
272
273 echo "<tr><td align='center' class='verdana2'>";
274 echo afficher_choix('activer_breves', $activer_breves,
275 array('oui' => _T('item_utiliser_breves'),
276 'non' => _T('item_non_utiliser_breves')), " &nbsp; ");
277 echo "</td></tr>\n";
278
279 echo "<tr><td style='text-align:$spip_lang_right;'>";
280 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />";
281 echo "</td></tr>";
282 echo "</table>\n";
283
284 fin_cadre_trait_couleur();
285
286 echo "<br />\n";
287
288
289 //
290 // Gestion des mots-cles
291 //
292
293 if ($options == "avancees") {
294
295 debut_cadre_trait_couleur("mot-cle-24.gif", false, "", _T('info_mots_cles'));
296
297 $articles_mots = $GLOBALS['meta']["articles_mots"];
298 $config_precise_groupes = $GLOBALS['meta']["config_precise_groupes"];
299 $mots_cles_forums = $GLOBALS['meta']["mots_cles_forums"];
300 $forums_publics = $GLOBALS['meta']["forums_publics"];
301
302 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
303 echo "<tr><td class='verdana2'>";
304 echo _T('texte_mots_cles')."<br />\n";
305 echo _T('info_question_mots_cles');
306 echo "</td></tr>";
307
308 echo "<tr>";
309 echo "<td align='center' class='verdana2'>";
310
311
312 echo bouton_radio("articles_mots", "oui", _T('item_utiliser_mots_cles'), $articles_mots == "oui", "changeVisible(this.checked, 'mots-config', 'block', 'none');");
313 echo " &nbsp;";
314 echo bouton_radio("articles_mots", "non", _T('item_non_utiliser_mots_cles'), $articles_mots == "non", "changeVisible(this.checked, 'mots-config', 'none', 'block');");
315
316
317 // echo afficher_choix('articles_mots', $articles_mots,
318 // array('oui' => _T('item_utiliser_mots_cles'),
319 // 'non' => _T('item_non_utiliser_mots_cles')), "<br />");
320 echo "</td></tr></table>";
321
322 if ($articles_mots != "non") $style = "display: block;";
323 else $style = "display: none;";
324
325 echo "<div id='mots-config' style='$style'>";
326
327 echo "<br />\n";
328 debut_cadre_relief("", false, "", _T('titre_config_groupe_mots_cles'));
329
330 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
331 echo "<tr><td class='verdana2'>";
332 echo _T('texte_config_groupe_mots_cles');
333 echo "</td></tr>";
334
335 echo "<tr>";
336 echo "<td align='$spip_lang_left' class='verdana2'>";
337 echo afficher_choix('config_precise_groupes', $config_precise_groupes,
338 array('oui' => _T('item_utiliser_config_groupe_mots_cles'),
339 'non' => _T('item_non_utiliser_config_groupe_mots_cles')));
340 echo "</td></tr></table>";
341 fin_cadre_relief();
342
343 if ($forums_publics != "non"){
344 echo "<br />\n";
345 debut_cadre_relief("", false, "", _T('titre_mots_cles_dans_forum'));
346 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
347 echo "<tr><td class='verdana2'>";
348 echo _T('texte_mots_cles_dans_forum');
349 echo "</td></tr>";
350
351 echo "<tr>";
352 echo "<td align='$spip_lang_left' class='verdana2'>";
353 echo afficher_choix('mots_cles_forums', $mots_cles_forums,
354 array('oui' => _T('item_ajout_mots_cles'),
355 'non' => _T('item_non_ajout_mots_cles')));
356 echo "</td></tr>";
357 echo "</table>";
358 fin_cadre_relief();
359 }
360 echo "</div>";
361
362
363 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
364 echo "<tr><td style='text-align:$spip_lang_right;'>";
365 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />";
366 echo "</td></tr>";
367 echo "</table>\n";
368
369 fin_cadre_trait_couleur();
370
371 echo "<br />\n";
372 }
373
374
375 //
376 // Actives/desactiver systeme de syndication
377 //
378
379 debut_cadre_trait_couleur("site-24.gif", false, "", _T('titre_referencement_sites').aide ("reference"));
380
381 $activer_sites = $GLOBALS['meta']['activer_sites'];
382 $activer_syndic = $GLOBALS['meta']["activer_syndic"];
383 $proposer_sites = $GLOBALS['meta']["proposer_sites"];
384 $visiter_sites = $GLOBALS['meta']["visiter_sites"];
385 $moderation_sites = $GLOBALS['meta']["moderation_sites"];
386
387 echo "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
388
389 echo "<tr><td align='$spip_lang_left' class='verdana2'>";
390
391 echo bouton_radio("activer_sites", "oui", _T('item_gerer_annuaire_site_web'), $activer_sites == "oui", "changeVisible(this.checked, 'config-site', 'block', 'none');");
392 echo " &nbsp;";
393 echo bouton_radio("activer_sites", "non", _T('item_non_gerer_annuaire_site_web'), $activer_sites == "non", "changeVisible(this.checked, 'config-site', 'none', 'block');");
394
395 echo "</td></tr></table>\n";
396
397
398
399 if ($activer_sites != 'non') $style = "display: block;";
400 else $style = "display: none;";
401
402 echo "<div id='config-site' style='$style'>";
403
404 // Utilisateurs autorises a proposer des sites references
405 //
406 echo "<br />\n";
407 debut_cadre_relief();
408 echo "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
409 echo "\n<tr><td style='color: #000000' class='verdana1 spip_x-small'>";
410 echo _T('info_question_proposer_site');
411 echo "\n<div style='text-align: center'><select name='proposer_sites' class='fondo' size='1'>\n";
412 echo "<option".mySel('0',$proposer_sites).">"._T('item_choix_administrateurs')."</option>\n";
413 echo "<option".mySel('1',$proposer_sites).">"._T('item_choix_redacteurs')."</option>\n";
414 echo "<option".mySel('2',$proposer_sites).">"._T('item_choix_visiteurs')."</option>\n";
415 echo "</select></div>\n";
416 echo "</td></tr></table>\n";
417 fin_cadre_relief();
418
419
420 if ($options == "avancees") {
421 debut_cadre_relief("", false, "", _T('titre_syndication').aide ("rubsyn"));
422
423 echo "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
424 //
425 // Reglage de la syndication
426 //
427 echo "<tr><td class='verdana2'>";
428 echo _T('texte_syndication');
429 echo "</td></tr>";
430
431 echo "<tr><td align='$spip_lang_left' class='verdana2'>";
432
433 echo bouton_radio("activer_syndic", "oui", _T('item_utiliser_syndication'), $activer_syndic == "oui", "changeVisible(this.checked, 'config-syndic', 'block', 'none');");
434 echo "<br />\n";
435 echo bouton_radio("activer_syndic", "non", _T('item_non_utiliser_syndication'), $activer_syndic == "non", "changeVisible(this.checked, 'config-syndic', 'none', 'block');");
436
437
438
439
440 if ($activer_syndic != "non") $style = "display: block;";
441 else $style = "display: none;";
442
443 echo "<div id='config-syndic' style='$style'>";
444
445 // Moderation par defaut des sites syndiques
446 echo "<hr /><p align='$spip_lang_left'>";
447 echo _T('texte_liens_sites_syndiques')."</p>";
448
449 echo afficher_choix('moderation_sites', $moderation_sites,
450 array('oui' => _T('item_bloquer_liens_syndiques'),
451 'non' => _T('item_non_bloquer_liens_syndiques')));
452
453 // Si indexation, activer/desactiver pages recuperees
454
455 $activer_moteur = $GLOBALS['meta']["activer_moteur"];
456 if ($activer_moteur == "oui") {
457 echo "<hr /><p align='$spip_lang_left'>";
458 echo _T('texte_utilisation_moteur_syndiques')." ";
459 echo "</p><blockquote><i>"._T('texte_utilisation_moteur_syndiques_2')."</i></blockquote>";
460
461 echo afficher_choix('visiter_sites', $visiter_sites,
462 array('non' => _T('item_limiter_recherche'),
463 'oui' => _T('item_non_limiter_recherche')));
464 }
465 echo "</div>";
466
467 echo "</td></tr>\n";
468
469 echo "</table>\n";
470
471 fin_cadre_relief();
472 }
473 echo "</div>";
474
475
476 //
477 // Gestion des flux RSS
478 //
479
480 debut_cadre_relief("feed.png", false, "", _T('ical_titre_rss'));
481
482 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
483
484 echo "<tr><td class='verdana2'>";
485 echo _T('info_syndication_integrale_1',
486 array('url' => generer_url_ecrire('synchro'),
487 'titre' => _T("icone_suivi_activite"))
488 ),
489 '<p>',
490 _T('info_syndication_integrale_2'),
491 '</p>';
492 echo "</td></tr>";
493
494 echo "<tr>";
495 echo "<td align='$spip_lang_left' class='verdana2'>";
496 echo afficher_choix('syndication_integrale', $GLOBALS['meta']["syndication_integrale"],
497 array('oui' => _T('item_autoriser_syndication_integrale'),
498 'non' => _T('item_non_autoriser_syndication_integrale')), "<br />\n");
499 echo "</td></tr>";
500 echo "</table>\n";
501
502 fin_cadre_relief();
503
504
505 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
506 echo "<tr><td style='text-align:$spip_lang_right;'>";
507 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />";
508 echo "</td></tr>";
509 echo "</table>\n";
510
511 fin_cadre_trait_couleur();
512
513 echo "<br />\n";
514
515
516 //
517 // Gestion des documents joints
518 //
519
520 debut_cadre_trait_couleur("doc-24.gif", false, "", _T('titre_documents_joints'));
521
522 $documents_rubrique = $GLOBALS['meta']["documents_rubrique"];
523 $documents_article = $GLOBALS['meta']["documents_article"];
524
525 echo "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
526
527 echo "<tr><td class='verdana2'>";
528 echo _T('texte_documents_joints');
529 echo _T('texte_documents_joints_2');
530 echo "</td></tr>";
531
532 echo "<tr>";
533 echo "<td align='$spip_lang_left' class='verdana2'>";
534 echo afficher_choix('documents_article', $documents_article,
535 array('oui' => _T('item_autoriser_documents_joints'),
536 'non' => _T('item_non_autoriser_documents_joints')), "<br />\n");
537 echo "<br /><br />\n";
538 echo afficher_choix('documents_rubrique', $documents_rubrique,
539 array('oui' => _T('item_autoriser_documents_joints_rubriques'),
540 'non' => _T('item_non_autoriser_documents_joints_rubriques')), "<br />\n");
541 echo "</td></tr>";
542
543 echo "<tr><td style='text-align:$spip_lang_right;'>";
544 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />";
545 echo "</td></tr>";
546 echo "</table>\n";
547
548 fin_cadre_trait_couleur();
549
550
551 echo pipeline('affiche_milieu',array('args'=>array('exec'=>'configuration'),'data'=>''));
552
553 echo "</div></form>";
554
555
556 echo fin_gauche(), fin_page();
557
558 }
559 ?>