Best Practice Sharing Portion of Database Between Two Multisite Domains.

Events happening in the community are now at Drupal community events on www.drupal.org.
Lakeside's picture

Have two domains. One is designed for desktop systems and the other strictly for mobile devices.

Ideally the member's content would appear on both domains and that their login info be the same.

Now for the problem:

Since these are two different domains (on a multisite) the site configuration is different. That includes the site name, modules, domain address.

What is the best practice to keep the basic admin info separate, but still have shared content? What about sharing user login info between the two sites? (Of course the admin login will be different for each site.)

Comments

Slightly Different Approach?

greggmarshall's picture

You might want to check out Domain Access (http://drupal.org/project/domain). It uses a single database to support multiple subdomains. Then on each node you can select which domains it appears on. But the different domains can have different themes, etc. And there are quite a few add-on modules to extend what is being controlled.

If all you are doing is a desktop/mobile theme switch, another option is Mobile Tools (http://drupal.org/mobile_tools). I am still learning it, but have found it can do theme switching.

Thanks GreggMarshall. The

Lakeside's picture

Thanks GreggMarshall.

The Domain module looks like it will do the job.

The module's info page mentions "multiple sites," which is different that "multisites". Has anyone used it on a multisite?

It sounds like what you want

Garrett Albright's picture

It sounds like what you want here isn't actually any sort of multi-site configuration, but one site with two themes; a normal one and one optimized for normal devices. Nothing else should be different about the two sites. Is that correct?

In that case, I'd imagine a module which uses a hook_boot() or hook_init() implementation to switch the theme if it detects the site is being accessed via the domain name for mobile devices would do the job. May be one or more modules out there already that do this, though I don't know any out of hand.

Really, though, mobile devices are so capable nowadays that all you likely really need is just a single theme with care taken so that it still works well on mobile devices - it doesn't use Flash for anything necessary, it doesn't require the ability to do roll-over effects, etc.

PacktPub has an upcoming book

Lakeside's picture

PacktPub has an upcoming book for mobile sites on Drupal 7, by Tom Stovall. Currently only the RAW version is available: a work in progress.

The author suggest using Domain to share content between two sites; mainly because of the theme selection. A key point made is that older cell phones don't have the capability of the newer ones and that mobile devices are constantly updating, which makes detection unreliable.

Still the hook_boot() or hook_init() is a good idea--just in case a desktop user stumbles across the mobile site and vice versa.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week