
Download Multisite for XOOPS 2.3.x, it allows for multiple site to be run from the one xoops, many XOOPS - One Code Base.
This is an early module, will remain a download forever.
Download now
xoops2.3_multisite_1.17rc.zip (155 Kb).
You will need to install and change the mainfile in the following way after installing:
//Line 33-45
// XOOPS Protocol (URL)
if (!empty($_SERVER['HTTPS']))
if ($_SERVER['HTTPS']=='on')
define('XOOPS_PROT', 'https://');
else
define('XOOPS_PROT', 'http://');
else
define('XOOPS_PROT', 'http://');
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define( 'XOOPS_URL', XOOPS_PROT.'www.xoops.org' );
define( 'XOOPS_URL', ''.strtolower(XOOPS_PROT.$_SERVER['HTTP_HOST'].'').'' );
// Footer Line - Loading of the common.
if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
//include XOOPS_ROOT_PATH."/modules/multisite/pre.load.php";
include XOOPS_ROOT_PATH."/include/common.php";
//include_once XOOPS_ROOT_PATH."/modules/multisite/post.load.php";
}
There is also a hack to header.php to see if an object exists already..
header.php
//line 43
global $xoopsOption, $xoopsConfig, $xoopsModule, $xoopsThemeFactory, $xoTheme;
// line 57 - 58
if(!is_object($xoopsThemeFactory))
$xoopsThemeFactory =& new xos_opal_ThemeFactory();
// Line 65 - 68
if(!is_object($xoTheme))
$xoTheme =& $xoopsThemeFactory->createInstance( array(
'contentTemplate' => @$xoopsOption['template_main'],
) );
Some more suggested code changes is to
/kernel/config.php
/**
* Get configs from a certain category
*
* @param int $category ID of a category
* @param int $module ID of a module
*
* @return array array of {@link XoopsConfig}s
*/
function &getConfigsByCat($category, $module = 0)
{
static $_cachedConfigs;
if (!empty($_cachedConfigs[$module][$category])) {
return $_cachedConfigs[$module][$category];
} else {
$domain_handler =& xoops_getmodulehandler('domain', 'multisite');
$ret = $domain_handler->getConfigByDomainCat($category, $ret, $module);
if (!is_array($ret))
{
$ret = array();
$criteria = new CriteriaCompo(new Criteria('conf_modid', intval($module)));
if (!empty($category)) {
$criteria->add(new Criteria('conf_catid', intval($category)));
}
$configs = $this->getConfigs($criteria, true);
if (is_array($configs)) {
foreach (array_keys($configs) as $i) {
$ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
}
}
}
$_cachedConfigs[$module][$category] = $ret;
return $_cachedConfigs[$module][$category];
}
}
not for the faint hearted. These are core changes so far.