• Resolved roxor

    (@roxor)


    Hello all the good people,
    I have a main domain and have several other domains mapped to it such that people can create their own blogs on mapped domains. (using multisite and domain mapping)
    Say-
    Pets.com -main domain
    cats.com -mapped domain 1
    dogs.com -mapped domain 2
    The problem is I can’t have same name sub-domains or sub-directory blogs on all three domains
    blog1.cats.com OR cats.com/blog1 -is fine.
    blog1.dogs.com OR dogs.com/blog1 -says this site is already reserved.
    blog1.pets.com OR pets.com/blog1 -says this site is already reserved.
    seems like WP is ignoring the domain name part
    Finally I came across this plugin *Networks for WordPress*, I am excited to know Will creating a network with this plugin solve the issue or is there other way around?
    I also want a single buddypress install on main network domain, so that people of one sub-network can also interact and be friends with people on other sub-network. Do you think “BP Multi Network plugin” will be helpful in this case ??
    I will be very-very thankful for any kind of support ??
    roxor

    https://www.ads-software.com/extend/plugins/networks-for-wordpress/

Viewing 15 replies - 31 through 45 (of 45 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Honestly, since there are multiple networks, I was keeping out of it. Mine aren’t that complex.

    Thread Starter roxor

    (@roxor)

    Its not that complex as it seems to be, maybe i am wrong & notice later when i will have to manage everything.
    OMG i had plans for even bigger one, using several domains.
    but I will try to keep everything organized, that would make things easy.
    Hey Ipstenu, can you say something for 4th last comment. My and David’s conversation after I say – “hi david, I have found the exact-exact problem with the registration process………..”
    thanks, Roxor

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    This one?

    Where dean and dean1 don’t work, but dean2 and dean1 do?

    Testing that without any network plugins installed, just a plain old Multisite I have installed locally… dean and dean1 work just fine for me.

    Thread Starter roxor

    (@roxor)

    Hi Ipstenu, yes that is the one.
    if you are testing it without any network plugin that means they must be on same domains right ? i am just assuming
    the point is getting same name blogs on different domains(networks)
    ex- Ipstenu.domain1.com, Ipstenu.domain2.com
    both in same WP install and both exist simultaneously.

    So the problem here I am facing is
    If i want to make roxor.pidia.eu and roxor.pidia.us
    then it would be possible if i use
    usernames- roxor1 and roxor2 for these blogs respectively.
    then it would NOT be possible if i use
    usernames- roxor and roxor1 for these blogs respectively.
    here is the proof for it
    https://www.flickr.com/photos/76068561@N08/7020860041/in/set-72157629315408980/lightbox/
    view all the seven images and notice the usernames and the sitenames that I have used.

    these two blogs roxor.pidia.eu, roxor.pidia.us doesnot exist now since I did a new install so you should be able to get the both blogs if you use usernames roxor1 and roxor2 at present.
    thanks for responding Ipstenu ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yeah but you said when you tried to make USERS of dean and dean1 didn’t work…

    My eyes suck, I can’t read your images.

    Thread Starter roxor

    (@roxor)

    while making users dean and dean1 -it goes fine
    but when these usernames try to get blogs of same name on different domains(networks)
    ex- dean.domain1.com and dean.domain2.com
    then it gives errors – “sorry this site is already reserved”
    even thou no such second site exists in database or network panel

    Thread Starter roxor

    (@roxor)

    sorry for the inconvenience, I know my image sucks ….lol
    i knew it would be unreadable so I highlighted the important points such as usernames and site-urls in red.
    So even if you just read the red, green text then it should be pretty much understandable.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Ahhh. Okay. (Colorblindness not withstanding, I really can’t make out the text.)

    Is the first site ‘confirmed’ and registered? Not just stuck in holding?

    Thread Starter roxor

    (@roxor)

    yes the first site was confirmed and registered, i could even make posts.
    but since I have a new install now you cant find roxor.pidia.us anymore.
    but you can try it yourself.

    Thread Starter roxor

    (@roxor)

    Hi David and Ipstenu ??
    I have some good news,
    A– I tried using email ids as usernames and this solves the problem.
    I used this plugin to achieve that – https://www.ads-software.com/extend/plugins/network-username-restrictions-override/
    issues that I am concerned about here is
    1- the plugin is not updated, it is compatible upto WP-3.2.1 but still works, do you think this might create a problem later ?
    2- I am also using buddypress, So is this good idea to have people’s username as their email.
    It would sound funny if you get an update- [email protected] commented on your photograph.

    B– I have tried all possible combinations of usernames
    name1, 1name, name2, 2name, na1me, na2me, n1ame, nam2e etc etc …
    and Now I can say with confidence that problem arises ONLY if I don’t use numbers in usernames. ex- name and name1
    So it would be better if I force registrants to use usernames as a combination of letters and numbers. this should solve the problem.
    for this I found a plugin which is very near to it. Same plugin as above.
    it gives the option to set usernames as e-mails and all-numeric.
    here is the screenshot – https://s.www.ads-software.com/extend/plugins/network-username-restrictions-override/screenshot-1.png?r=525950
    There is only one short php file for this plugin if we can modify that OR some lines of code that can be added in WP core files that would force registrants to use usernames as a combination of letters and numbers.
    I am zero at php, but still I feel like few lines of code is all I need to make this work.
    cheers, roxor

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    1) Nah, plugins are generally okay, even if they don’t say ‘works on X version of WP’

    2) Good is subjective, if it works for you, it’s fine.

    Thread Starter roxor

    (@roxor)

    >> I might run into problems with @mentions in buddypress if I use e-mail id’s as usernames. Many people often have long weird mail id’s.
    >> Also I am getting false errors while registration saying “username must be 4 chars” with that outdated plugin.

    It would be great if I could just force registrants to use usernames as a combination of letters and numbers.
    I looked into wp-signup.php and found this $user_name

    ` // User name
    echo ‘<label for=”user_name”>’ . __(‘Username:’) . ‘</label>’;
    if ( $errmsg = $errors->get_error_message(‘user_name’) ) {
    echo ‘<p class=”error”>’.$errmsg.'</p>’;
    }
    echo ‘<input name=”user_name” type=”text” id=”user_name” value=”‘. esc_attr($user_name) .'” maxlength=”60″ /><br />’;
    _e( ‘(Must be at least 4 characters, letters and numbers only.)’ );
    ?>`
    *and other few lines that contained $user_name*

    I also did a search for variable $user_name in WP files here
    https://phpxref.ftwr.co.uk/wordpress/nav.html?index.html
    this would tell me where a particular variable was used.
    It returned a long list where this variable was defined and referenced in whole WP. Now I am planning to go thru all of them.

    I have no idea how to go for it, but if something can be added or altered here should give the result. I want you to please help me out here.
    thanks, Roxor

    Thread Starter roxor

    (@roxor)

    Hi Ipstenu, I looked into the code of /wp-includes/ms-functions.php and found these line which would affect the input of usernames. especially the lines –
    440-443
    461-462
    464-465
    467-471

    /wp-includes/ms-functions.php
    432 function wpmu_validate_user_signup($user_name, $user_email) {
    433 global $wpdb;
    434
    435 $errors = new WP_Error();
    436
    437 $orig_username = $user_name;
    438 $user_name = preg_replace( ‘/\s+/’, ”, sanitize_user( $user_name, true ) );
    439
    440 if ( $user_name != $orig_username || preg_match( ‘/[^a-z0-9]/’, $user_name ) ) {
    441 $errors->add( ‘user_name’, __( ‘Only lowercase letters (a-z) and numbers are allowed.’ ) );
    442 $user_name = $orig_username;
    443 }
    444
    445 $user_email = sanitize_email( $user_email );
    446
    447 if ( empty( $user_name ) )
    448 $errors->add(‘user_name’, __(‘Please enter a username’));
    449
    450 $illegal_names = get_site_option( ‘illegal_names’ );
    451 if ( is_array( $illegal_names ) == false ) {
    452 $illegal_names = array( ‘www’, ‘web’, ‘root’, ‘admin’, ‘main’, ‘invite’, ‘administrator’ );
    453 add_site_option( ‘illegal_names’, $illegal_names );
    454 }
    455 if ( in_array( $user_name, $illegal_names ) == true )
    456 $errors->add(‘user_name’, __(‘That username is not allowed’));
    457
    458 if ( is_email_address_unsafe( $user_email ) )
    459 $errors->add(‘user_email’, __(‘You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.’));
    460
    461 if ( strlen( $user_name ) < 4 )
    462 $errors->add(‘user_name’, __(‘Username must be at least 4 characters’));
    463
    464 if ( strpos( ‘ ‘ . $user_name, ‘_’ ) != false )
    465 $errors->add( ‘user_name’, __( ‘Sorry, usernames may not contain the character “_”!’ ) );
    466
    467 // all numeric?
    468 $match = array();
    469 preg_match( ‘/[0-9]*/’, $user_name, $match );
    470 if ( $match[0] == $user_name )
    471 $errors->add(‘user_name’, __(‘Sorry, usernames must have letters too!’));

    I need to write php lines that would force registrants to use usernames as a combination of albhabets(a-z) and numbers(0-9)
    I am trying my best But I can’t write what I am thinking in correct php, please help me here.
    thanks, Roxor

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I need to write php lines that would force registrants to use usernames as a combination of albhabets(a-z) and numbers(0-9)

    There are some plugins that can do that, IIRC, but for the life of me all I can find is https://www.ads-software.com/extend/plugins/restrict-usernames/

    Thread Starter roxor

    (@roxor)

    Hi Ipstenu
    thank you, The plugin did exactly what I wanted ??
    I would like to keep this thread open for couple of days, I am working on centralized signup, I might need help from you and David again.
    roxor

Viewing 15 replies - 31 through 45 (of 45 total)
  • The topic ‘Networks for WordPress, having multisites and multidomains -HELP’ is closed to new replies.