Multi-site:- Site Name must include one or more numbers?

Hi.

Hope your well?

Could you please tell me if (and how!) multi-site ‘Pro Site’, new site registrations can be require to include one or more numbers in the ‘SITE NAME’?

thanking you in advance.

Regards

johnv

  • Vaughan
    • Ex Staff

    Hi John,

    Hope you’re well?

    I haven’t tested this, so it might not work.

    Can you create a file called wpmu_blog_validation.php

    In this file, add the following;

    [removed code, use code from attached posts below]

    Now upload this file to /wp-content/mu-plugins/

    If mu-plugins folder doesn’t exist, create it first.

    Hopefully this should now require a minimum of 2 numbers in the blogname. If you wish to decrease or increase the amount of numbers required, you can change the value in the following line.

    $blogname_numbers = 2;

    Hope this helps

  • john
    • Site Builder, Child of Zeus

    Hi Vaughan.

    Thank you so much!

    Have followed your instructions!

    Have not yet set-up Pro Sites; which I will do asap; and get back to you so as to let you know if all is well!!

    Am I correct in assuming, that Super-Admin will over-ride this for new Admin Sites?

    Again thank you very much!

    Kind Regards

    johnv

  • john
    • Site Builder, Child of Zeus

    Hi.

    That would be a very useful condition for me to have!

    Might be a day or two, untill I can test it out. It’s my wife’s birthday today, and her ‘clan’ decends tomorrow!!! On my best behaviour!!

    Regards

    johnv

  • john
    • Site Builder, Child of Zeus

    Hi Vaughn.

    Hope your well?

    I survived the ‘in-laws’!!

    I think I followed your instructions ok. I created ‘mu-plugins’ in the ‘wp content/plugins folder???

    I then moved ‘file_webscript.gif wpmu_blog_validation.php’ into it’???

    But am not getting the desired function when registering a site either as a ‘pretend customer’ of as ‘super admin’!

    Have I missed something out please?

    Regards

    johnv

  • john
    • Site Builder, Child of Zeus

    Hi Vaughan.

    Silly me!!!

    I moved the’ mu-plugin’ into the ‘/wp-content folder’.

    When going to the domain name the browser then displayed the text code of the file in the ‘mu-plugin’, instead of the front page!!

    So I deleted the text in the ‘wpmu_blog_validation.php’, and was thus able to get a connection to the sites’ front page!!

    Any suggestions, please?

    Regards

    johnv

  • Vaughan
    • Ex Staff

    Hi John,

    Can you try the attached wpmu_functions.php

    Unzip it to your desktop, then upload the wpmu_functions.php file to the /wp-content/mu-plugins folder

    (remove the old code I gave you above)

    I have tested this on my own multisite & it works perfectly.

    Hope this helps

  • john
    • Site Builder, Child of Zeus

    Hi Vaughan.

    Thank you so much!!!!

    Could I push my luck, and ask you to place a ‘Super Admin’ ‘exemption’; as mentioned previously; on the Zip File and re-attach?

    Might be more economic on your work load that way around!!!!

    Again with gratitude.

    Regards

    johnv

  • john
    • Site Builder, Child of Zeus

    Hi Vaughan.

    I trust you are well?

    The new attachment file works ‘real nice’ thank you.

    We have a slight complication, however!

    When I attempt to log into the ‘main domain’ with “/login” I find that the browser opens in the dashboard of “numbers12” (which is the only site I have used to test the two numeral facility)!!!

    If I use “login” , then I and i am sent a redirect for the “number12” site!!!!!

    Most interesting, Eh?

    Wondered if you would have a look and let me know what you think?

    Thanking you in advance.

    johnv

  • Ash
    • Code Norris

    Hello @john

    I hope you are well today.

    Do you mean when you try to login in your main site using URL http://mainsite.com/login and after login it takes you to http://subsite1.mainsote.com ?

    If yes, do you have any script that deals with redirect?

    Would you please go to My Sites (after login) from top left of the admin bar, which is selected as your private site?

    And, do you see the same in all browser? If you have caching plugin, please delete cache and check.

    Please let us know how it goes.

    Cheers

    Ash

  • john
    • Site Builder, Child of Zeus

    Hi Ash.

    Thanks for your reply.

    Think the problem is to do with using the same computer for Super admin and ‘Test Signup’ (Dual Personality Disorder!!!), will let you know if medication needed!

    Regards

    johnv