Announcement

Collapse
No announcement yet.

Make IP Address in the New User Email Notification clickable that shows detailed IP information

Collapse
This is a sticky topic.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod Make IP Address in the New User Email Notification clickable that shows detailed IP information

    Admins receive the New User email notification whenever a new user signs up to their forum. By default, the email shows an unclickable plain-text IP address of the user.

    To convert the IP Address in the email into a clickable link that shows detailed IP information that includes, city, region, country, postal code, ISP company, etc., follow the below instructions.
    1. Logon to AdminCP.
    2. Go to Language & Phrases → Search in Phrases.
    3. In the "Search for Text" field , enter newuser_gemailbody.
    4. In the "Search in" field, choose "Phrase Variable Name Only".
    5. Click Find button.
    6. In the Search Results, click Edit button.
    7. In the "Translation" textarea, enter your custom phrase. You can copy the original translation as shown in the "Text" options and then paste it into the "Translation" textarea.
    8. Modify the {6} placeholder which corresponds to the user's IP address by replacing
      Code:
      IP Address: {6}
      with:
      Code:
      IP Address: https://ipinfo.io/{6}
      OR to show a very plain page with IP information in a simple JSON format
      Code:
      IP Address: https://ipinfo.io/{6}/json
      NOTE: Make sure there is no space between "/" and "{6}", otherwise, the link will be broken and it will just become https://ipinfo.io/
    9. Click Save button.
      ​​​​​
    If you are using CloudFlare, Sucuri or something similar, you may not be able to see the actual user's IP address. To fix that, you have do this.
    Last edited by glennrocksvb; 01-20-2022, 10:05 AM.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    Can this be implemented on cloud too?

    Comment


      #3
      Yes. This is just updating a phrase in the Phrase Manager which can also be done in vBCloud.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


      • Mitch
        Mitch commented
        Editing a comment
        It worked, Thanks

      #4
      Does that

      https://ipinfo.io/{6}

      Not work on IVP6? Had a user sign up and only my IP came back

      If I put the IP in that site manually it works

      Would I be better off using the JSON code instead?

      Comment


      • Mitch
        Mitch commented
        Editing a comment
        It just happened again with a standard IP.. Mine came back

      #5
      Does the IP link in the email contain the IP address? If ​not, maybe the placeholder for IP is not {6} in your case. Check the original phrase text. If IP is not supplied in the ipinfo.io URL, it defaults to your own IP, that's why you're seeing yours.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


        #6
        Here is the original phrase text

        There is a new user, {1} at {2}

        To view their profile, go here:
        {3}

        Email Address : {4}
        Birthday : {5}
        IP Address: {6}

        {7}


        The IP shown in the email is the users, not mine. I click the link and mine shows up.

        I'm, going to forward a copy of the email to your email

        Comment


          #7
          I got your email and the vB email has a broken IP link due to the space before the IP address. Check the custom phrase and make sure there is no space before the {6} placeholder.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


          • Mitch
            Mitch commented
            Editing a comment
            There was a space, and also spaces between placeholders 3,4,5.. I removed all spaces and will see what happens

          #8
          The space doesn't matter for {3}, {4} and {5} since they are not part of a link. It's actually better to have a space before them so that they are not too close to its label.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #9
            Mitch I noticed in your forwarded email that you removed the "IP Address:" label. If you don't have to remove it, it should look like this:

            Code:
            IP Address: https://ipinfo.io/{6}
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


            • Mitch
              Mitch commented
              Editing a comment
              Thanks for catching that, you are correct.. This happened cause I copied and pasted the code from post #1

            • glennrocksvb
              glennrocksvb commented
              Editing a comment
              Sorry about that. I updated the first post to make the instructions clearer.

            • Mitch
              Mitch commented
              Editing a comment
              It's working good now..

            #10
            A nice addition. Works great.
            The Linux Community has given me much. I do what I can to return the favor!

            Comment


              #11
              Can the more detailed information you get from Add Detailed IP Info Modal to the Who's Online page be incorporated into this MOD?
              The Linux Community has given me much. I do what I can to return the favor!

              Comment


                #12
                Originally posted by Snowhog View Post
                Can the more detailed information you get from Add Detailed IP Info Modal to the Who's Online page be incorporated into this MOD?
                Displaying a popup modal requires JavaScript which is not allowed in email clients for security reasons. But it displays the same information in a new window/tab.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #13
                  so the new code must be like that

                  There is a new user, {1} at {2}

                  To view their profile, go here:
                  {3}

                  Email Address : {4}
                  Birthday : {5}
                  IP Address: https://ipinfo.io/{6}/json

                  {7}

                  Comment


                  • glennrocksvb
                    glennrocksvb commented
                    Editing a comment
                    Correct.

                  #14
                  Originally posted by mofeu View Post
                  so the new code must be like that

                  There is a new user, {1} at {2}

                  To view their profile, go here:
                  {3}

                  Email Address : {4}
                  Birthday : {5}
                  IP Address: https://ipinfo.io/{6}/json

                  {7}
                  You should also include the html line <br />
                  it's more important if you use any language other than English.
                  So, It would look like that:
                  Code:
                  There is a new user, {1} at {2}<br />
                  <br />
                  To view their profile, go here:<br />
                  {3}<br />
                  <br />
                  Email Address : {4}<br />
                  Birthday : {5}<br />
                  IP Address: https://ipinfo.io/{6}/json<br />
                  <br />
                  {7}​
                  Also, as it is html, so, for sake of well organized email, if language is rtl language, it is important to add all of the above code, and every email message text in between:
                  Code:
                  <p style="text-align: right;">
                  </p>
                  That's my notes in case someone needed it.

                  Comment


                    #15
                    Originally posted by Blackhorse View Post
                    You should also include the html line <br />
                    it's more important if you use any language other than English.
                    Correct but it should also be done if using English language if you have your own custom translation like it does on this topic where the IP is changed to a link. When vB started HTML support on emails, they added <br /> to the default translation. That leaves all email messages with custom translations to display all in one line because of missing <br />. I had this issue that I fixed recently because most of my email body phrases have custom translation.
                    Helpful? Donate. Thanks!
                    Buy me a coffeePayPal QR Code
                    Fast VPS Host for vBulletin:
                    A2 Hosting & IONOS

                    Comment

                    Users Viewing This Page

                    Collapse

                    There is 1 user viewing this forum topic.

                    • Guest Guest

                    Latest Posts

                    Collapse

                    Working...
                    X
                    Searching...Please wait.
                    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                    Please push the back button and reload the previous window.'
                    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                    Please push the back button and reload the previous window.'
                    An internal error has occurred and the module cannot be displayed.
                    There are no results that meet this criteria.
                    Search Result for "|||"