1
jcoulter
Multiple Xoops Sites with one Member Database
  • 2005/5/23 14:48

  • jcoulter

  • Just popping in

  • Posts: 21

  • Since: 2005/5/18


Here's something I'd like to be able to do, so any advice would be appreciated. I have my doubts it can be done, but worth asking about anyway.

I want to have different installations of XOOPS on a domain, with each being in its own subdomain. Each installation would have totally independent contents EXCEPT members. I would like to have one central site where the user logs in and from there is automatically logged in to the subdomains.

EXAMPLE:

Each of the below would have a different, independent, installation of Xoops.

(A) http://www.mydomain.com - member login found here.

(B) store.mydomain.com - online storefront. member groups might include "Retailers", "Distributors", "Other".

(C) private.mydomain.com - private are for users of registered products. Member groups might include "Moderators", "Registered Users".

(D) freestuff.mydomain.com - another area where free downloads and discussion can take place.

So, a sample user might be "Joe Smith". Joe would be a member of the "Other" store member group and maybe a "Moderator" in the private area. Joe would log into XOOPS from domain (A) but would not need to log in to any of the subdomains.

Can something like this be done?

Thanks!

2
Mikhail
Re: Multiple Xoops Sites with one Member Database
  • 2005/5/23 15:13

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


IS JUST AN EXPERIMENTAL HACK,
IT IS NOT THE IDEAL WAY TO DO A "XOOPS MULTISITE".

MORE ABOUT IT HERE:
https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=16700&forum=14





database.php
function 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");
}
?>





Quote:

jcoulter wrote:
Here's something I'd like to be able to do, so any advice would be appreciated. I have my doubts it can be done, but worth asking about anyway.

I want to have different installations of XOOPS on a domain, with each being in its own subdomain. Each installation would have totally independent contents EXCEPT members. I would like to have one central site where the user logs in and from there is automatically logged in to the subdomains.

EXAMPLE:

Each of the below would have a different, independent, installation of Xoops.

(A) http://www.mydomain.com - member login found here.

(B) store.mydomain.com - online storefront. member groups might include "Retailers", "Distributors", "Other".

(C) private.mydomain.com - private are for users of registered products. Member groups might include "Moderators", "Registered Users".

(D) freestuff.mydomain.com - another area where free downloads and discussion can take place.

So, a sample user might be "Joe Smith". Joe would be a member of the "Other" store member group and maybe a "Moderator" in the private area. Joe would log into XOOPS from domain (A) but would not need to log in to any of the subdomains.

Can something like this be done?

Thanks!

Login

Who's Online

258 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 258


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits