My setup involves a main site where users can join a group and then they would link and go to the Commons on a separate site. Basically, the setup is the same as that used on drupal.org and groups.drupal.org.

There are two things I know I need to do although there are probably more than what I can see now:

1. Connect the two sites to share user data (content profile)
2. Connect the two sites at the group level.

Is there documentation on how to do this somewhere?
Can you give me a high-level idea of what the main pieces are?
Which modules would be best to connect these pieces? Are they included in Commons? I am guessing not because I don't see any of this kind of functionality already in Commons.

Thank you! Any guidance is very much appreciated.

Comments

lightsurge’s picture

I want to do a similar sort of thing... but couldn't find any existing module/documentation to help do it. My two sites share the same 'user' tables amongst other tables, so when you're logged into one you're also logged into the other... and I suppose what I'd like to have is a block on each site showing user-specific information related to the other site.

There's modules to integrate other applications like Moodle for single-sign-on and shared information... but nothing as far as I can tell to integrate one drupal site within another.

lightsurge’s picture

You might find this helpful though: http://www.lullabot.com/articles/drupal-single-sign-across-sub-domains

Following this example would definitely enable you to share user profile etc across the two sites. Sharing the group data would also be possible in the same way.

lightsurge’s picture

Finally found a brilliant technique for sharing information between sites without having to view the information in iframes but only between subdomain sites. It's described at http://www.tomhoppe.com/index.php/2008/03/cross-sub-domain-javascript-aj...

For my purposes since my sites are subdomains and they share session cookies, there's a lot I can do with this technique.

  • Basically, you put a page on the source site, i.e. domain2.example.com/page.html with a script that sets the document domain as the parent domain i.e. example.com and fetches the desired data (in my case an appropriately themed View + arguments from Drupal.settings) and bungs it in a variable.
  • You can then insert this script into destination site using an iframe, and style it hidden. Then, add a script on the destination page which also sets document domain as the parent domain, and inserts the data retrieved by the inframe into a div.
  • Thus we have data that can be themed by your destination site. No messy iframes!

Is this a loophole waiting to be closed in favour of a more secure method though? Not sure.

japerry’s picture

Title: Integrate Commons site with main site » Commons integration with other drupal sites
Version: » 7.x-3.x-dev
Issue summary: View changes

This is still relevant as a support request. I'm guessing we may revisit this when g.d.o goes under its redesign.