1
script_fu
3 Different Dotcoms (One) Database...

I have three domains on the same shared server.

1)I want my users to be able to switch between the three different domains with out logging into each one seperate.
If you log into one domain your logged into all three at the same time.

2)I want all three sites to pull from one database IE wildcards. Can you share one database with multiple XOOPS sites?

3)Example http://www.dogs.com http://www.cats.com http://www.people.com = one database.

4)Can this be done?


2
Catzwolf
Re: 3 Different Dotcoms (One) Database...
  • 2003/12/27 6:54

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


The short answer is yes, we are currently testing this with all the new sites and it is possible that this could end up as part of the core in the next major XOOPS release.

3
script_fu
Re: 3 Different Dotcoms (One) Database...

Bravo... Can you or anyone else go into a lil more detail (Aka) roadmap... Would banners, members, partners and weblinks be part of this? Fast deployment of many sites on one database sharing all the above would in a word rock.

People if you have any ideas on this share them. Im not a programer so im not sure what is possible or is not. I think
big business around the world is watching XOOPS and what better way to peak their intrest than a project like Catzwolf spoke of!


BTW Thank you for your post... Catz..
Billy

4
DonXoop
Re: 3 Different Dotcoms (One) Database...

Wow, I like this news.
The basics wouldn't be too bad if most of the data was shared; depth in permissions and server name aliasing.

It would be nice to have flexibility in what is shared and what is domain specific. And who can float where config.

Even if just the core and modules were central with site specific content and configs it would be a benefit.


5
script_fu
Re: 3 Different Dotcoms (One) Database...

Quote:

DonXoop wrote:
Wow, I like this news.
The basics wouldn't be too bad if most of the data was shared; depth in permissions and server name aliasing.

It would be nice to have flexibility in what is shared and what is domain specific. And who can float where config.

Even if just the core and modules were central with site specific content and configs it would be a benefit.



Me too Don Me too...
Does anyone know when the next major release is due?
Aka Roadmap...

6
Herko
Re: 3 Different Dotcoms (One) Database...
  • 2003/12/28 19:42

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


This is a very simple 'trick', really, and to correct Catzwolf on this: it does NOT include the 'being logged in on all sites', since that requires some hacking that is not good for security and performance (the session would be valid for more then one domain which makes it easier to hack, and the sessions table would be huge if you have 100 visitors on each site). It does include registration on one site, and being registered on all sites.

It works like this: a new subclass is made for the database class, and in your mainfile.php you tell which tables use a non-default prefix. This enables you to tell the sites to use one set of tables for user manangement (although avatars is a small problem then), as the sites all use the tables with the same prefix.

Herko

7
script_fu
Re: 3 Different Dotcoms (One) Database...

Nice post Herko... So this addresses members/user what about
partners/weblinks. I spend most of my time updateing weblinks. Is there a way to share the weblinks between XOOPS sites? If I could update one site with current links
then the other sites when clicked would show the same info.
I used 3 different sites above as a reference but in reality
I have close to 40 sites. So fast deployment and links are real big problem. So one database for links/partners/banners/members across all sites make deployment very quick...

How would this be installed. Would I upload #1 site and config then upload #2 then during config use wildcards on #1's database. So when #2 is set up I would type the path to the #1 website database instead of making a new databse for 2...???

I hope that makes sence... Err...
Im starting to confuse myself trying to figure this out...

8
script_fu
Re: 3 Different Dotcoms (One) Database...

Bump...

9
script_fu
Re: 3 Different Dotcoms (One) Database...


10
Herko
Re: 3 Different Dotcoms (One) Database...
  • 2003/12/29 7:56

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


The guy you refer to has connected his whole XOOPS site to a db on another server. That's it, not sharing parts of a site.

The addon I described works for ALL tables you want to, so it also works for links and downloads and whatever you want to share cross-site. Basically, it works like this:
Site 1 (cats.com) uses db server localhost, database xoops, prefix cats_.
Site 2 (dogs.com) uses db server localhost, database xoops, prefix dogs_.
Site 3 (people.com) uses db server localhost, database xoops, prefix people_.
With this addon you can have each site look unique, but get certain data from another prefixed table. For instance, you want to share all mylinks info. Then you determine the source table set prefix: in this case, we will use cats.com's mylinks info for all 3 sites. So, in the other two sites' mainfile.php, you tell it that the alternative prefix is 'cats_' and that it is to be used for the mylinks tables. Then, when you go to the mylinks module on the dogs site, it is shown in the dogs.com look and feel, but the content is exactly the same as on all other sites, because it uses the content from the cats.com site.

If all you want to do is have 3 domains and share ALL info on all 3 sites, then you install them all, and edit the mainfiles to match the database info exactly (so they all share one database, AND prefix). I'm not sure what needs to be done at one site, and what is done on all 3 (avatars are uploaded to the domain's /uploads folder, so you can't share those cross-site, for instance), but it should get you a looong way...

Herko

Login

Who's Online

280 user(s) are online (219 user(s) are browsing Support Forums)


Members: 0


Guests: 280


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