4 * Plugin générique de configuration pour SPIP
10 * @copyright (c) toggg, marcimat 2007-2008
11 * @link http://www.spip-contrib.net/
12 * @version $Id: cfg.php 36735 2010-03-28 21:25:09Z gilles.vincent@gmail.com $
15 if (!defined("_ECRIRE_INC_VERSION")) return;
18 * la fonction appelee par le core, une simple "factory" de la classe cfg
20 * @param mixed $class # inutilisé
22 function exec_cfg_dist($class = null)
24 include_spip('inc/filtres');
25 include_spip('inc/cfg');
27 ($nom = sinon(_request('cfg'), '')),
28 ($cfg_id = sinon(_request('cfg_id'),''))
31 // traitements du formulaire poste
32 // seulement s'il provient d'un formulaire CFG
33 // et non d'un formulaire CVT dans un fond CFG
40 include_spip("inc/presentation");
42 if (!$config->autoriser()) {
43 echo $config->acces_refuse();
47 pipeline('exec_init',array('args'=>array('exec'=>'cfg'),'data'=>''));
49 $commencer_page = charger_fonction('commencer_page', 'inc');
50 echo $commencer_page($config->get_boite(), 'cfg', $config->get_nom());
51 echo "<br /><br /><br />\n";
53 echo gros_titre(sinon($config->get_titre(), _T('cfg:configuration_modules')), '', false);
54 echo $config->barre_onglets();
57 echo debut_gauche('', true);
59 // si un formulaire cfg est demande
60 if ($s = $config->descriptif()) echo debut_boite_info(true) . $s . fin_boite_info(true);
62 // affiche éventuellement une colonne supplémentaire à gauche
63 if ($s = $config->gauche()) echo debut_boite_info(true) . $s . fin_boite_info(true);
65 echo pipeline('affiche_gauche',array('args'=>array('exec'=>'cfg'),'data'=>''));
66 echo creer_colonne_droite('', true);
67 echo pipeline('affiche_droite',array('args'=>array('exec'=>'cfg'),'data'=>''));
69 // affichage des messages envoyes par cfg
70 if ($s = $config->messages()) echo debut_boite_info(true) . $s . fin_boite_info(true);
72 // affichage des liens
73 if ($s = $config->liens()) echo debut_boite_info(true) . $s . fin_boite_info(true);
74 if ($s = $config->liens_multi()) echo debut_boite_info(true) . $s . fin_boite_info(true);
76 echo debut_droite("", true);
79 if ($config->get_presentation() == 'auto') {
80 echo debut_cadre_trait_couleur('', true, '', $config->get_boite());
81 echo $config->formulaire();
82 echo fin_cadre_trait_couleur(true);
84 echo $config->formulaire();
88 echo fin_gauche() . fin_page();