Hello,
I am working on OpenAtrium 1.0beta8.
What I am trying to achieve is the ability to give the user the ability to decide whether his new created group will get a subdomain or full domain.
Following https://community.openatrium.com/documentation-en/node/708 I was able to setup subdomain creation without any additional modules (such as subdomain / domain access), OR to setup full-domain - depending on the modifier type I have selected for the group space provider.

Reading the existing issues #659454: Allow more than one modifier type per provider and #750398: Subdomain method can not distinguish between domain and subdomain made me feel I am not alone in this situation (if I understood those issues correctly), but it seems there is no clean answer to it.

So, considering the current situation, and since I just need to "make it happen" -
- Is there an existing fix/hack for this ?
- What should be the simplest way for me to make such a hack/fix ?

I am not a newbie at all in Drupal, but I am new to all the amazing Development Seed work (Spaces, Features, etc...).

Any help would be appreciated.

Regards,
Shushu

Comments

johngriffin’s picture

Can this be generalised as the ability to "set the type per modifier" ?

If so I am looking to do the same thing. If this were possible then I think we need some sort of weighting system, or at least some rules for which type takes precedence over another.

shushu’s picture

Hi,
Unfortunately I couldn't find general solution, and as you can see - I got no answer about this subject from anyone.

My specific solution for my need was to develop a "subOrModule" method, which change the behavior based on existence of a "." in the value. Not so smart - but works for me.

If you need any further help I can I try to give some hand there.

Regards,
Shushu

johngriffin’s picture

Hi Shushu,

That sounds like an approach that could work for us. I've started on implementing a custom processor, but am having some trouble with exposing it and getting it recognised by purl. Would you be willing to share your code? It doesn't need to be readable, just working, I can pick out what I need!

Thanks,
John

shushu’s picture

I will check with the "sponsers" whether I can release it to the public.
Regards,
Shushu

shushu’s picture

Status: Active » Closed (won't fix)

Solution available in the new module http://drupal.org/project/subordomain.
@johngriffin - Hope is will help you...
Comments are welcome.
Thanks for www.CodeOasis.com for sponsoring the project.

johngriffin’s picture

Thanks shushu, we took a similar approach for our custom processor. We have code for a processor that will allow you to have path modifiers of arbitrary depth (that is any number of slashes in there). I've just released a module called purl_default - it exposes a purl processor called path_default, allowing you to set a modifier that will have no effect on the path. We used this to trigger spaces to be activated with no modifier in the path, giving us a default space that would always be activated if no others were.

See: http://drupal.org/project/purl_default