We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14385
    • 31 Posts
    I created a chunk so that when someone signed up i would get a notification sent to my email. When i recive the email tho it comes like this:

    A new user has signed up at your website.
    
    Username: [+post.username+]
    Full Name: [+post.fullname+]
    Email: [+post.email+]
    Phone Number: [+post.phone+]
    



    Any ideas why it isnt working?
      • 26435
      • 1,193 Posts
      ScottyDelicious Reply #2, 19 years ago
      What?
      That is silly! I was not expecting that.
      Thank you for the bug report. I obviously did not replace the placeholders with their actual content.
      I will fix that for you.

      -sD-
      Dr. Scotty Delicious, Scientist DFPA.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 14385
        • 31 Posts
        If you could be so kind as to PM me when the reviised version is ready for download that would be great.

        Cheers.
          • 26435
          • 1,193 Posts
          ScottyDelicious Reply #4, 19 years ago
          Quote from: jodz at Sep 19, 2007, 10:23 AM

          If you could be so kind as to PM me when the reviised version is ready for download that would be great.

          Cheers.
          No problem

          -sD-
          Dr. Scotty Delicious, Scientist DFPA.
            Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
            All of the above... in no specific order.


            I send pointless little messages
            • 26435
            • 1,193 Posts
            ScottyDelicious Reply #5, 19 years ago
            Jodz,
            The file is not quite ready for download yet, but I found the problem.
            Because I am lazy and untalented tongue, I copied and pasted text from another part of my registration service and I did not check it thoroughly.

            the message to the user is stored in $message. The message to the administrator is stored in $notification. After replacing [+post.whatever+] in the message, I stored it in $message instead of $notifications. Oops!

            If you want to fix this immediately, try this...

            I have added a lot of code, so line numbers might not be exact, but AROUND line 680 to 690(?) there should be a block of code that looks like this:
            foreach ($_POST as $name => $value)
            {
            	$toReplace = '[+post.'.$name.'+]';
            	$message = str_replace($toReplace, $value, $notification);
            }


            REPLACE that with this:
            foreach ($_POST as $name => $value)
            {
            	$toReplace = '[+post.'.$name.'+]';
            	$notification = str_replace($toReplace, $value, $notification);
            }


            -sD-
            Dr. Scotty Delicious, DFPA.
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 14385
              • 31 Posts
              Worked like a charm, nice one mate wink
                • 25847
                • 62 Posts
                @Dr. Scotty Delicious

                I also applied this fix and it works perfectly!!! However, I do have one quick question. In my &notifyTpl Chunk, I have also added the following:

                Country: [+post.country+]

                This does indeed return a value, however, it is returning the number value for the country that was selected. For instance, if someone picked United States, the email reads as:

                Country: 223

                Is there any way that I can get it to properly display the country rather than the numeric code for the country?
                  • 25803 ☆ A M B ☆
                  • 721 Posts
                  Is there any way that I can get it to properly display the country rather than the numeric code for the country?

                  You’d have to replace the numeric value of 223 with a value of United States. The text between the <select> statements is not collected.