let user have their own subdomain

toul - May 23, 2007 - 19:12

Is there a way in drupal that would allow each user to have their own subdomain?

Not sure

agentrickard - May 23, 2007 - 19:45

mmmhhhh

toul - May 23, 2007 - 20:03

ok.
thank you for the links...
i try to figure out. i think wordpress has a function to allow user after they registered to have a subdomain or something like this: www.mysite.com/username

subscribing

drupalina - July 16, 2007 - 10:30

subscribing

the same question

Summit - October 25, 2007 - 10:15

Hi,

I really would like this functionality also.
lets join forces how to solve this!
Subscribing.

Greetings,
Martijn

Domain Access

agentrickard - November 7, 2007 - 14:22

It occurs to me that the Domain Access module that I am writing could be used for this purpose.

You would need a Domain User extension module that does the following:

- On signup, lets the user (optionally) create a subdomain record. [This is easy, using hook_form_alter()].
- On content creation, force the user to be on their subdomain (so that the content is node accessed to their 'site'). [This is easy, using hook_form_alter() and domain_goto().

For this to work, your server would need to support Wildcard DNS.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

Domain user extension module?

Summit - November 8, 2007 - 09:04

Hi,

Will you help build the Domain user extension module?
I am not a programmer, but for sure will help you with testing etc...
I see lots of people want this functionality, and your new module cuold be a great centre in this!

Greetings,
Martijn

Yes

agentrickard - November 8, 2007 - 14:05

I'd love for someone else to do it, but after I finish Domain Prefix, I should be able to write Domain User.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

mod_rewrite *

AainaalyaA - November 8, 2007 - 22:04

What about mod_rewrite with wildcards? shouldn't that help in creating subdoms automatically?

AsidrA Society | www.AsidrA.com

Yes

agentrickard - November 9, 2007 - 02:27

mod_rewrite is important, and the uses depends on what behavior you want.

In some instances, we use mod_rewrite to redirect from user.example.com to example.com/user/UID. This works very well for some sites. See, for example http://ken.blufftontoday.com

In the case of Domain Access, we're talking about giving users an entire site to themselves at username.example.com. That will work in concert with wildcard DNS because:

a) we have a way to automate the creation of 'registered' third-level domains.
b) on each third-level domain, we can load specific themes, settings, and content (using node_access rules).

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

Exciting stuff

Michelle - November 9, 2007 - 15:47

There are so many possibilites for this. I'm surprised I haven't seen more discussion on it.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

this seems a promising

skizzo - November 9, 2007 - 17:02

this seems a promising development... and I want to be ready for it :-) so for my new site I decided to restrict characters in usernames to [a-z, A-Z, 0-9, hyphen]. Well, I would like to do that in anyway! According to http://drupal.org/node/29694 permitted characters are configurable in D4, not so in D5. I found the following in user.module but have no idea on how to further restrict the characters. Thank you for any help, and congratulations for CR Online!


function user_validate_name($name) {
if (!strlen($name)) return t('You must enter a username.');
if (substr($name, 0, 1) == ' ') return t('The username cannot begin with a space.');
if (substr($name, -1) == ' ') return t('The username cannot end with a space.');
if (strpos($name, ' ') !== FALSE) return t('The username cannot contain multiple spaces in a row.');
if (ereg("[^\x80-\xF7 [:alnum:]@_.-]", $name)) return t('The username contains an illegal character.');
if (preg_match('/[\x{80}-\x{A0}'. // Non-printable ISO-8859-1 + NBSP
'\x{AD}'. // Soft-hyphen
'\x{2000}-\x{200F}'. // Various space characters
'\x{2028}-\x{202F}'. // Bidirectional text overrides
'\x{205F}-\x{206F}'. // Various text hinting characters
'\x{FEFF}'. // Byte order mark
'\x{FF01}-\x{FF60}'. // Full-width latin
'\x{FFF9}-\x{FFFD}'. // Replacement characters
'\x{0}]/u', // NULL byte
$name)) {
return t('The username contains an illegal character.');
}
if (strpos($name, '@') !== FALSE && !eregi('@([0-9a-z](-?[0-9a-z])*.)+[a-z]{2}([zmuvtg]|fo|me)?$', $name)) return t('The username is not a valid authenti
cation ID.');
if (strlen($name) > USERNAME_MAX_LENGTH) return t('The username %name is too long: it must be %max characters or less.', array('%name' => $name, '%max' =
> USERNAME_MAX_LENGTH));
}

Are you asking me?

Michelle - November 10, 2007 - 00:54

Not sure if you were directing that question at me... I haven't a clue. I don't know anything about regex and what you'red doing there is completely greek to me.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

good luck

dman - November 10, 2007 - 00:43

Sounds like fun.

Note that wildcard DNS is a hosting thing, so you must have a co-operative ISP or lots of control over your own machine to get it sorted out. It won't work out-of-the-box (if ever) for most shared hosting environments.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

True

agentrickard - November 10, 2007 - 13:36

Very true. But we do our own hosting.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

subscribing

H3rnand3z - November 9, 2007 - 17:30

subscribing

subscribing

MrBT - November 28, 2007 - 19:23

subscribing

subscribing thank you.

okday - November 30, 2007 - 18:20

subscribing

thank you.

subscribing Life Blog | Data

litebulb1 - December 11, 2007 - 18:44

Domain User

agentrickard - December 12, 2007 - 17:09

The Domain User module is in HEAD for Domain Access, and I expect to have a release candidate shortly.

However, Domain User is a node access module, and as such may have more overhead than most people want.

Testers will be appreciated.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

 
 

Drupal is a registered trademark of Dries Buytaert.