I thing it would be nice to have possibility for users of blogs at WP MU to able to create blog names and usernames with these characters:
"-", "." and "_". for example: my-blog.domain.com, or my.domain.domain.com or my_domain.domain.com
this is now not allowed now and I do not know why. From my point of view (I am new with WP MU) there is no reason why not to allow this.
This would allow bloggers to create nicer URLs of their blogs. As My-super-blog.domain.com is better readable than Mysuperblog.domain.com. Huh, what do you think? I have heard some people that wanted the same for their site...
To enable this is need this simple edit of wp-include/wpmu-function.php file
on line 1011 (for blogname)
replace:
preg_match( "/[a-zA-Z0-9]+/", $blog_id, $maybe );
with:
preg_match( "/[a-zA-Z0-9\.\-\_]+/", $blog_id, $maybe );
then delete lines:
1022 and 1023:
if ( strpos( " " . $blog_id, "_" ) != false )
$errors->add('blog_id', ("Sorry, blog names may not contain the character '_'!"));
and line: 910 (for username)
replace:
preg_match( "/[a-zA-Z0-9]+/", $user_name, $maybe );
with:
preg_match( "/[a-zA-Z0-9\.\-\_]+/", $user_name, $maybe );
delete lines 932 and 933:
if ( strpos( " " . $user_name, "_" ) != false )
$errors->add('user_name', ("Sorry, usernames may not contain the character '_'!"));
and finally these texts should be changed then:
"Only letters and numbers allowed" and mention there that ".", "-" and "_" are allowed also.