Commit | Line | Data |
---|---|---|
c495c100 P |
1 | <?php |
2 | /* | |
3 | * forms | |
4 | * version plug-in de spip_form | |
5 | * | |
6 | * Auteur : | |
7 | * Antoine Pitrou | |
8 | * adaptation en 182e puis plugin par cedric.morin@yterium.com | |
9 | * © 2005,2006 - Distribue sous licence GNU/GPL | |
10 | * | |
11 | */ | |
12 | ||
13 | $p=explode(basename(_DIR_PLUGINS)."/",str_replace('\\','/',realpath(dirname(__FILE__)))); | |
14 | define('_DIR_PLUGIN_FORMS',(_DIR_PLUGINS.end($p))); | |
15 | ||
16 | function Forms_ajouterBoutons($boutons_admin) { | |
17 | // si on est admin | |
18 | if ($GLOBALS['connect_statut'] == "0minirezo" && $GLOBALS["connect_toutes_rubriques"] | |
19 | AND $GLOBALS["options"]=="avancees" | |
20 | AND (!isset($GLOBALS['meta']['activer_forms']) OR $GLOBALS['meta']['activer_forms']!="non") ) { | |
21 | ||
22 | // on voit le bouton dans la barre "naviguer" | |
23 | $boutons_admin['naviguer']->sousmenu["forms_tous"]= new Bouton( | |
24 | "../"._DIR_PLUGIN_FORMS."/img_pack/form-24.gif", // icone | |
25 | _T("forms:formulaires_sondages") //titre | |
26 | ); | |
27 | ||
28 | // on voit le bouton dans la barre "forum_admin" | |
29 | $boutons_admin['forum']->sousmenu["forms_reponses"]= new Bouton( | |
30 | "../"._DIR_PLUGIN_FORMS."/img_pack/form-24.gif", // icone | |
31 | _T("forms:suivi_reponses") //titre | |
32 | ); | |
33 | } | |
34 | return $boutons_admin; | |
35 | } | |
36 | ||
37 | /* public static */ | |
38 | function Forms_ajouterOnglets($flux) { | |
39 | $rubrique = $flux['args']; | |
40 | return $flux; | |
41 | } | |
42 | ||
43 | ?> |