SPIP

Présentation

TODO cékoidonc

Mutualisation

Aide de référence : http://www.spip-contrib.net/La-mutualisation-facile

Procédure rapide pour tester sur sa machine

Téléchargement des fichiers

sudo svn checkout svn://trac.rezo.net/spip/spip /var/www/mutualisation/

sudo svn co svn://zone.spip.org/spip-zone/_plugins_/_test_/mutualisation/ /var/www/mutualisation/mutualisation/

Configuration

sudo apache2ctl restart

<?php

       if (!defined("_ECRIRE_INC_VERSION")) return;
       require _DIR_RACINE.'mutualisation/mutualiser.php';

       $site = str_replace('www.', '', $_SERVER['HTTP_HOST']);
       if ($site != $_SERVER['HTTP_HOST']) {
               include_spip('inc/headers');
               redirige_par_entete('http://'.$site.'/');
       }

       define('_DIR_PLUGINS', _DIR_RACINE . 'sites/' . $site . '/plugins/');


       define ('_INSTALL_SERVER_DB', 'mysql');
       define ('_INSTALL_HOST_DB', 'localhost');
       define ('_INSTALL_USER_DB_ROOT', 'root');
       define ('_INSTALL_PASS_DB_ROOT', '******');
       define ('_INSTALL_NAME_DB', 'mu_'.prefixe_mutualisation($site));
       define ('_INSTALL_TABLE_PREFIX', 'spip');

    /* Inutile pour le moment mais ca te servira pour le service
    d'hébergement avec les utilisateurs / code d'activation stockés en BD
       define ('_INSTALL_PANEL_HOST_DB', 'localhost');
       define ('_INSTALL_PANEL_USER_DB', 'root');
       define ('_INSTALL_PANEL_PASS_DB', '******');
       define ('_INSTALL_PANEL_NAME_DB', 'mutualisation_spip');
       define ('_INSTALL_PANEL_NAME_TABLE', 'utilisateurs');
       define ('_INSTALL_PANEL_FIELD_SITE', 'url');
       define ('_INSTALL_PANEL_FIELD_PASS', 'password');
       define ('_INSTALL_PANEL_FIELD_CODE', 'code'); */



       demarrer_site($site,
               array(
                       'creer_site' => true,
                       'creer_base' => true,
                       'creer_user_base' => true,
                       'repertoire' => 'sites',
                       /*'code' => 'codeAchanger',
                       'mail' => 'root+spip@xx.refer.org',
                       'utiliser_panel' => true    */
               )
       );


?>

Tests

127.0.0.1 toto.chezmoi
127.0.0.1 titi.chezmoi
127.0.0.1 tutu.chezmoi