Mikhail Miguel wrote:
OBS:
IS JUST AN EXPERIMENTAL HACK,
IT IS NOT THE IDEAL WAY TO DO A "XOOPS MULTISITE".
database.phpfunction prefix($tablename='') {
if ( $tablename == '' ) {
return $this->prefix;
}
elseif ( $tablename == 'users' ) {
return 'same_users';
}
elseif ( $tablename == 'groups_users_link' ) {
return 'same_groups_users_link';
}
elseif ( $tablename == 'priv_msgs' ) {
return 'same_priv_msgs';
}
elseif ( $tablename == 'session' ) {
return 'same_session';
}
else {
return $this->prefix .'_'. $tablename;
}
}
to use the same files with diferent sites/subdomains, just replace the mainfile.php for:if (!(isset($subdominio))) {
$subdominio = $HTTP_HOST;
$subdominio = str_replace("www.","",$subdominio);
$subdominio = str_replace(".com","",$subdominio);
$subdominio = str_replace(".net","",$subdominio);
$subdominio = str_replace(".org","",$subdominio);
}
if (!(empty($subdominio))) {
include($subdominio."mainfile.php");
}
?>
$subdominio = str_replace("www.","",$subdominio); $subdominio = str_replace("www.","",$THE_SUB_DOMAIN_NAME);
Probably a bit of a misunderstanding...