source: spip-zone/_plugins_/spipBB/dev_2.1_JR/inc/spipbb_init.php @ 39851

Last change on this file since 39851 was 39851, checked in by jrolli@…, 10 years ago

Je crée un dossier à part pour uploader ce que j'ai fait... à fusionner et effacer à terme.

File size: 2.6 KB
Line 
1<?php
2#----------------------------------------------------------#
3#  Plugin  : spipbb - Licence : GPL                        #
4#  File    : inc/spipbb_init                               #
5#  Authors : Scoty, 2007 et als                            #
6#  http://www.spip-contrib.net/Plugin-SpipBB#contributeurs #
7#  Contact : chryjs!@!free!.!fr                            #
8#----------------------------------------------------------#
9
10//    This program 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 any later version.
13//
14//    This program is distributed in the hope that it will be useful,
15//    but WITHOUT ANY WARRANTY; without even the implied warranty of
16//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//    GNU General Public License for more details.
18//
19//    You should have received a copy of the GNU General Public License
20//    along with this program; if not, write to the Free Software
21//    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
23if (!defined("_ECRIRE_INC_VERSION")) return;
24include_spip('inc/plugin'); // pour version du plugin
25spipbb_log('included',3,__FILE__);
26
27# lire version plugin.xml
28#
29if(version_compare($GLOBALS['spip_version_code'],'15375','>=')) {
30        $get_infos = charger_fonction('get_infos','plugins');
31        $infos = $get_infos(_DIR_PLUGIN_SPIPBB);
32}
33else {
34        $infos = plugin_get_infos(_DIR_PLUGIN_SPIPBB);
35}
36$GLOBALS['spipbb_plug_version'] = $infos['version'];
37
38# recup des metas
39// c: 18/12/7 normalement ce n'est pas utile !! car deja initialise ailleurs !
40// $GLOBALS['spipbb'] = @unserialize($GLOBALS['meta']['spipbb']); # init juste apres dans inc/spipbb_util spipbb_is_configured
41
42#
43# inclure fonctions communes (exec/ .. action/ )...
44# controle config. ... Charge conversion 192
45#
46include_spip('inc/spipbb_util');
47
48#
49# Controle de la version du plugin vs SPIP
50#
51if (defined('SPIPBB_SPIP19200')) {
52        // minipres + message
53        include_spip('inc/minipres');
54        echo minipres(_T('spipbb:plugin_mauvaise_version'));
55        die(_T('spipbb:plugin_mauvaise_version'));
56}
57else
58{
59
60        #
61        # Si Install/Maj ? Redir immediate, sauf si on y est !
62        #
63        // c: 18/12/7 pas beau mais pas beau du tout un redirect planque dans un include !!!
64        if(!spipbb_is_configured() AND _request('exec')!="spipbb_configuration") {
65                include_spip('inc/headers');
66                redirige_par_entete(generer_url_ecrire("spipbb_configuration",'',true));
67        }
68
69        #
70        # inclure fonctions communes a tous exec
71        #
72        include_spip('inc/spipbb_presentation');
73        include_spip('inc/spipbb_menus_gauche');
74}
75?>
Note: See TracBrowser for help on using the repository browser.