Charger l'environnement de PHPBoost

Article compatible pour la version 3.0 de PHPBoost !

Introduction



Voici un schéma récapitulant la structure de chaque page produite par PHPBoost.



Nous allons maintenant voir comment inclure ces fichiers et les opérations que nous avons à faire.

Structure d'une page



Voici le code entier qui permet de charger l'environnement du portail.
Code PHP :
<?php
//Licence
/*##################################################
* page.php
* -------------------
* begin : Date de création du fichier
* copyright : (C) 2007 Nom du/des développeur(s)
* email : email du/des développeur(s)
*
*
###################################################
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
*
###################################################*/
//Chargement des fonctions
include_once('../kernel/begin.php');
//Fichiers langue
include_once('lang/' . $CONFIG['lang'] . '/module_' . $CONFIG['lang
'] . '.php');
//Titre de la page
define('TITLE', $titre_de_la_page);
//Chargement du CSS éventuel
define('ALTERNATIVE_CSS', 'wiki');
//Inclusion du header
include_once('../kernel/header.php');
## Contenu de la page, script de votre module ##
//Footer
include_once('../kernel/footer.php');
?>


Voici des explications de chaque ligne :


La barre d'arborescence



La barre d'arborescence permet de se repérer dans le site. Elle représente des liens vers les diff