11
Mithrandir
Re: Install two xoops sites onto one hosting account?

bd_csmc has made a multi-site hack and I have worked a bit further on it, but it is definitely not for beginners and you can seriously mess up a lot of things...and it is not quite ready for general release, yet.

12
kenneth6
Re: Install two xoops sites onto one hosting account?
  • 2005/2/5 13:00

  • kenneth6

  • Just popping in

  • Posts: 70

  • Since: 2005/2/1 1


Oh! Mithrandir, work hard on it!

Cheers!

13
pfaulkne
Install two xoops sites and share users
  • 2005/2/10 7:31

  • pfaulkne

  • Just popping in

  • Posts: 32

  • Since: 2004/2/14


I started looking into this (through the code) and was wondering if I'm on the right path. Please remember I'm new to this and am trying to understand how XOOPS works.

Basically I think this will work. There is most likely an easier way to get the end result but,...

I install a new XOOPS into any directory and have the installer create the tables. Let's have these have a prefix of 'common' for ease of understanding.

Then I install two sites that I actually want to use and to share users/groups. Let's call these prefixes 'site1' & 'site2'.

I found that in mainfile the db prefix is stated. I also found that in \html\kernel\user.php in the function &get(&id) there is a reference to prefix

$sql 'SELECT * FROM '.$this->db->prefix('users').' WHERE uid='.$id;


There are several like this. I'm assuming that instead of using this constant, if I hardcode 'common' inplace of the prefix, this would then direct the query to the 'common' tables where I want the users to be. If I changed this in both 'site1' and 'site2' file, then both sites would share the users.

I say assume because I haven't try this yet. (Still building a test box).
Just wanted to know if this was the right road or should do a U-Turn and take that left folk in the road.

Cheers

14
Beejay
Re: Install two xoops sites onto one hosting account?
  • 2005/2/10 8:06

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


I use virtuepark.com's multi-site module and I have got 7 network sites. It works great but like peeps have suggested continued development would be great

15
Mithrandir
Re: Install two xoops sites and share users

@pfaulkne : Exactly. My solution is to have a database table with sites and their corresponding database prefix and combine that with a common - or shared - database prefix for tables shared among sites.

The prefix() method has been changed to look at whether the table should be shared or not and set the table prefix accordingly.

This is working for me, but the various proceedings are quite clumsy and you can accidently delete all information in a module by changing a module table to be shared - or by deleting a site.

16
pfaulkne
Re: Install two xoops sites and share users
  • 2005/2/11 6:58

  • pfaulkne

  • Just popping in

  • Posts: 32

  • Since: 2004/2/14


Thanks. Looks like that road is definateely the right one. Cheers.

17
Anonymous
Re: Install two xoops sites onto one hosting account?
  • 2005/4/21 15:03

  • Anonymous

  • Posts: 0

  • Since:


Hi,

Any news about multisite hack ?

Login

Who's Online

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


Members: 0


Guests: 156


more...

Donat-O-Meter

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

Latest GitHub Commits