I'm just filing this here as it's something we're exploring for a project. Tagged 4.7 but if cvs/5.0 is perhaps more hopeful.
The idea: each group has its own subdomain of a site. This way:
content for the apples group displays on apples.domain.com
content for the oranges group displays on oranges.domain.com
...and so on.
The subdomains do not need to be made on the fly. We just want to be able to define groups to live on different subdomains.
Background: We are looking at a hybrid multisite setup (shared users, distinct content) that could get quite large. Given the other features of og, if we could designate the home subdomain of each group and get each group's content to "live" on its subdomain, we could likely run a full multisite with one db, and that may prove to be worthwhile and easier to manage down the line.
Any thoughts, ideas, suggestions are welcome. Thanks.
Comments
Comment #1
mfredrickson commentedThis might be better solved with an install profile in Drupal 5.0 and use of the custom_url_rewrite feature. See my comments here:
http://groups.drupal.org/node/1819#comment-4689
I would imagine some changes would need to be made to groups to allow for clear rewriting of urls, but I do think this would work, on the whole.
-Mark
Comment #2
moshe weitzman commentedrewriting urls via custom_url_rewrite() does seem like the right path except that it will be a big performance drain. url() is called *very* often and adding lookups for each instance will be a problem. probably about as bad as all the drupal_get_alias() calls that we do now. maybe there is a workaround.
this feature request really doesn't strictly belong in og. one could say that each forum should be on its own subdomain, and each blog, each profile, etc.
Comment #3
DaveNotik commented+1 on the need. This would be a very valuable feature.
(So is this something that also requires changes in core, or is a separate module and other modules simply need to make themselves compatible with it, or...?)
Comment #4
mfredrickson commented@moshe - Yes, this would be painful performance wise. But how else can you alias links on drupal pages to point to different subdomains? Normal path aliasing wouldn't work, as it is just relative to the drupal root. A much cheaper alternative is just redirecting from group.example.com to www.example.com/node/xxx - but I don't think this is what Laura is looking for, nor is it what I need.
The big difference between forums/blogs/etc living at a subdomain and a group living there, is that group is much closer to real website. It has subscribed users. Private and public content. With some add on modules, you can provide a lot of admin features - like roles or categories. That's 90% of a drupal site right there!
@david - I don't see this requiring a core patch. As moshe points out it might be _very_ expensive, so we might need to look at optimizing some core features (eg. custom_url_rewrite) - but the functionality is there.
My gut feeling is that I could bang out a proof of concept pretty quickly if I had some time (read: funding) to do it. Perhaps it's time for a bounty?
Comment #5
moshe weitzman commentedone optimization would be to cache all the group nids in one query and then only rewrite node/x urls and og/ urls ... would work ok for sites without a ton og groups. once you hit a threshold, it is better to query many times [like path_url_alias()]
Comment #6
m3avrck commentedI'm about to implement something similar on a large project of mine and I'm leaning towards using Drupal's sites directory.
default/
somegroup.mydomain.com/
When you go into the latter, it defines a variable in settings.php that is checked with variable_get() with my custom module to add in different features. All links should still work provided you use base_path().
That's probably the best place to start. Profiles might work as well but those don't exist in 4.7.
Comment #7
dkruglyak commented+1 on the need. I would add that this is something that should work on 4.7 as well.
Comment #8
nedjoHave a look at the new og_sites project - when its release shows up, in a few hours - http://drupal.org/project/og_sites. It provides a multisite solution through organic groups.
Comment #9
laura s commentedI saw your note on the lists, and am quite excited about this. Will be looking into it right away. Thanks!
Comment #10
setvik commentedAnother option is the subdomain module i just released. It's in beta, but works well.
It places each OG group & that group's content on its own subdomain.
Comment #11
moshe weitzman commentedOther efforts: http://drupal.org/project/domain by ken rickard. And Adrian's multidomain module at http://www.bryght.com/blog/adrian/multidomain-module-for-drupal-5 (unfinished, and abandoned)
Comment #12
mackh commented#10 is stein's subdomain module is at http://drupal.org/project/subdomain
Comment #13
Traverus commentedno longer maintained