Hi there,

I have a multisite drupal installation, and shared the user tables. All is working well, which brings me to my next step. Is it posible to share a certain node-type from the master database with the multisites. Like: all the different multisites have their own story nodes, stored in their own database. But the page nodes are stored in the main site database, and shared with the subsites. So what i wan't to do is: i'd like to store certain node-types local en certain node-types centralized.

I hope somebody can point me out in right direction.

Big thanx in advance.

Grtz Daflow

Comments

robby1066’s picture

I'd be really interested in hearing a solution for this. As far as I know, since all nodes (of any type) have references stored in the node table, it's not possible to split up node types to different databases. So I think any solution that's possible would require two seperate node tables, one in each db.

I had a project recently where I had to do something similar, an events calendar that had to include events for a local restauraunt and the corporate headquarters. The way I ended up doing it was hacking the event.module to make one query for the local database, then switch to the corporate db with drupals db_set_active function, then switch back once I had collected the node data I needed. It's ugly as hell and it's got a lot of potential for some nasty bugs, so I wouldn't recommend it.

Another route that you might think about is a module that uses xmlrpc to get node data from another database. That could be pretty straightforward if you only needed to display a few pages or something, but it could get pretty complicated as well, depending on your needs.

Good luck!

daflow’s picture

Hi there robby1066,

I tought about the db_set_active solution. And i must agree with you that it suits the needs for small scaled solutions. I have to tell you that my situation isn't realy a small one, so the db_set_active won't really be an option.

I've played around with the xml-rpc interface for some flash based sites. I could do it with the xml-rpc interface, but i think it is a rather "roundabout"-like method.
But in the end i have to solve this situation, so i will have to dive into it.

To all: Other solutions are welcome.

Thanx

Grtz daflow

harry slaughter’s picture

solved a very similar problem:

http://drupal.org/node/59309

--
Drupal tips, tricks and services
http://devbee.com/ - Effective Drupal

--
Devbee - http://devbee.net/