The MU forums have moved to WordPress.org

Adding and editing an algorithm to wp-signup.php (8 posts)

  1. mrdomain
    Member
    Posted 16 years ago #

    hi I am attaching a printscreen here. I explained the problem on it.

    Here it is content

    I will use wpmu for local purposes. When a user goes /wp-signup.php and writes "namesurname" there and then

    clicks next button I want "namesurname" to change to "34namesurname" automatically. 34 is just example here

    it will change depending on different usernames.

    Finally the user clicks signup button and he or she will has

    34namesurname.mydomain.com . Thats what I want. I know that it needs a algorithm , "namesurname" changes to "34namesurname" or "name" changes "13name" ,

    I can find that algorithm. But I dont know how and where to add this algorithm ?

    Should I edit wp-signup.php or wp-activate.php or wpmu-function.php or anything else

    and how to edit these php files where to copy algorithm content. Please help me solving

    this subject. Thanks.

    Please check the picture here

    http://trac.mu.wordpress.org/attachment/ticket/764/wpmu.JPG

    (I also created a ticket for this problem )

  2. mrdomain
    Member
    Posted 16 years ago #

    no one no opinion ?

  3. andrea_r
    Moderator
    Posted 16 years ago #

    Creating a trac ticket for this is a waste of time. the trac system is for bugs - that means things that *don't* work as expected.

    What you want to do is a fundamental change during the signup process, which 99% of us will not want.

    you'll have to read the code. Follow the signup process, see where it created usernames. Add whatever you like to the front of them on creation. there's some hooks in the signup file you may be able to tap into so all you'd need to do is write a plugin for it, instead of hacking the core.

  4. mrdomain
    Member
    Posted 16 years ago #

    I am sorry if i try to do bad. But i dont think so. Believe me if i was a php expert i would write but unfortunately iamnot. And iam trying to learn how it works. Did somebody learn it when he or she was born ? Ofcourse not. Am I rich ? ofcourse not.. Do i try to do something ? Yes iam trying to learn something and iam passionate about it.! Am I in the right way? I do think so . In these conditions how can I hack the core ? let me know.. Is it a bad thing to try to learn php? What is open source used for ? andrea_r these sentences are not for you iam asking to everyone. Please answer them. Thanks.

  5. andrea_r
    Moderator
    Posted 16 years ago #

    I was saying write a plugin in php which hooks into the already present filters in wp-signup which will do what you want without hacking.

  6. mrdomain
    Member
    Posted 16 years ago #

    andrea_r this is your post ( 2 years ago )
    http://mu.wordpress.org/forums/topic.php?id=1466

    andrea_r wrote:

    Well after a long comedy of errors, I got a localhost running offline under Windows, and I got MU installed - even though I couldn't do much.
    I'm trying to mirror my live site so I can test things before an upgrade, so I've restored a backup to my localhost install. Now I get "No WPMU site defined on this host."

    Any ideas? I've just about run out of brain power. It all looks so simple typed out like that, but it's taken me so long so far (2+ hours today alone) because of stupid user errors (yes, mine) and it's incredibly frustrating.

    I want you to just respect who tries to learn something here. Thanks.

  7. andrea_r
    Moderator
    Posted 16 years ago #

    *sighs*

    I do respect you are trying to learn here, and yes - I've come a long way myself.

    (for example, I set up a LAMP server this week. From scratch.)

    But it took me way more than a couple of hours for some things, and this project you want to do is one of those things that will take a little longer.

    I can't walk you through every step. I won't write it for you.

    I can send you to these places, which were found pretty easily:
    http://codex.wordpress.org/Writing_a_Plugin
    http://mu.wordpress.org/forums/topic.php?id=6811

    Read this code:
    http://www.ringofblogs.com/2008/07/31/wpmu-new-blog-settings-plugin-updated/
    http://wpmudevorg.wordpress.com/project/WPMU-Signup-Captcha
    http://wpmudevorg.wordpress.com/project/Signup-Security-Question

    Given that I'm the only one whose answered this thread, you can take that as an indication as to how much the community is interested in adding numbers (or any extra info) to usernames, and the difficulty thereof.

  8. mrdomain
    Member
    Posted 16 years ago #

    Yes I know andrea_r , you are trying to help me and anyothers. thank you for that. I am on the same way with you, I developed myself , ofcourse I spent hours. I am still trying do it. If I could succeed I will write here.

About this Topic

  • Started 16 years ago by mrdomain
  • Latest reply from mrdomain