En cours de test, une piste consiste à remplacer les fichiers db-config.php et siteconfig.php.
Pour de nouvelles installations servir les bases de données avec le fichier texte pour l'importation de la base de données par défaut de Geeklog 1.5.0 http://www.geeklog.fr/cms//filemgmt/index.php?id=12 en prenant soin de modifier les paths.
Pour une mise à jour, remplacer temporairement les db-config.php et siteconfig.php par les originaux, ajouter le config.php et procéder à la mise à jour.
db-config.php
<?php
/*
* Geeklog database configuration
*
* You should not need to edit this file. See the installation instructions
* for details.
*
*/
if (strpos($_SERVER['PHP_SELF'], 'db-config.php') !== false) {
die('This file can not be used on its own!');
}
global $_DB_host, $_DB_name, $_DB_user, $_DB_pass, $_DB_table_prefix, $_DB_dbms;
if ($_SERVER['HTTP_HOST'] == 'www.domain1.com') {
$_DB_host = 'localhost';
$_DB_name = 'geeklog1';
$_DB_user = 'user1';
$_DB_pass = 'password1';
$_DB_table_prefix = 'gl_';
$_DB_dbms = 'mysql';
} else if ($_SERVER['HTTP_HOST'] == 'www.domain2.com') {
$_DB_host = 'localhost';
$_DB_name = 'geeklog2';
$_DB_user = 'user2';
$_DB_pass = 'password2';
$_DB_table_prefix = 'gl_';
$_DB_dbms = 'mysql';
}
?>
siteconfig.php
<?php
/*
* Geeklog site configuration
*
* You should not need to edit this file. See the installation instructions
* for details.
*
*/
if (strpos($_SERVER['PHP_SELF'], 'siteconfig.php') !== false) {
die('This file can not be used on its own!');
}
global $_CONF;
$_CONF['path'] = '/path/to/Geeklog/';
$_CONF['path_system'] = $_CONF['path'] . 'system/';
if ($_SERVER['HTTP_HOST'] == 'www.domain1.com') {
// To disable your site1 quickly, simply set this flag to false
$_CONF['site_enabled'] = true;
$_CONF['default_charset'] = 'iso-8859-1';
$_CONF_FCK['imagelibrary'] = '/images/library1';
} else if ($_SERVER['HTTP_HOST'] == 'www.domain2.com') {
// To disable your site2 quickly, simply set this flag to false
$_CONF['site_enabled'] = true;
$_CONF['default_charset'] = 'iso-8859-1';
$_CONF_FCK['imagelibrary'] = '/images/library2';
}
// Useful Stuff
if (!defined('LB')) {
define('LB',"\n");
}
if (!defined('VERSION')) {
define('VERSION', '1.5.0');
}
?>