Announcement

Collapse
No announcement yet.

Display Edit Avatar Popup By Default if User has no avatar yet (vBcloud)

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod Display Edit Avatar Popup By Default if User has no avatar yet (vBcloud)

    This vBCloud mod makes uploading a user avatar a little bit easier by automatically opening the Edit Avatar popup by default when visiting the user profile page. It will only trigger the popup if user has not uploaded their custom avatar yet.

    Notes:
    • This mod is made for vBCloud. Though it will also work on vB5 self-hosted version, the recommended version for self-hosted can be found here.
    • v1.1 uses Template Hook system which vBCloud supports. No more workaround using Static HTML Module needed. Old version must be uninstalled first before installing new version. Instructions included in the readme file.
    • This is a FREE mod without vbmods.rocks branding. Any donation is welcome and appreciated.
    • This mod requires installing a script in AdminCP. If you are not comfortable doing this, you could purchase product installation service from us by clicking the button below.

    Need help or not comfortable installing this mod? Purchase the installation service below:

    vBulletin One-Time Plugin Installation Service Add-On: $20
    Purchase this product add-on to get one-time professional installation of this mod from us.

    Buy Now Add to Cart View Cart


    Version History:
    v1.2
    • Fixed a bug where the Edit Avatar popup was not appearing for users without custom avatar if the default avatar image file was changed by the site owner.
    v1.1
    • Converted into a template hook which is the proper way of creating a plugin for vBCloud.
    • Fixed a bug where Edit Avatar dialog was not appearing on load of Profile page.
    v1.0
    • Initial version

    Download the zip file below. Uncompress the file and then follow the installation instructions in the readme.txt file. Enjoy!
    Attached Files
    Last edited by glennrocksvb; 02-09-2022, 08:44 AM. Reason: Released v1.2
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    Thanks Glenn for doing the cloud version. The mod works great

    A donation was sent!

    Comment


      #3
      Thanks a lot. It works perfectly.

      Comment


        #4
        Thank you

        Comment


          #5
          This extension/code does not work anymore in actual vB 5.5.4. Even not in HTML-Module, because #editProfilePicture has changed to .edit-profile. Change that in your addon code and everything is fine.

          Comment


            #6
            Thanks for the heads up Hero. I will update this mod.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              Done.
              Helpful? Donate. Thanks!
              Buy me a coffeePayPal QR Code
              Fast VPS Host for vBulletin:
              A2 Hosting & IONOS

              Comment


                #8
                Originally posted by glennrocksvb View Post
                Done.
                Since 5.6.6 this function is inactive again.

                Comment


                • glennrocksvb
                  glennrocksvb commented
                  Editing a comment
                  Thanks for the heads up. I'll take a look.

                #9
                Released v1.1. Please see updated first post for more details.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #10
                  Glenn, why is this happening?

                  Comment


                    #11
                    Ok I put this into the template box. I think originally the wrong code was in there.

                    Code:
                    <!-- Edit Avatar by vBMods.rocks START -->
                    <li class="h-hide">
                    <script>
                    window.addEventListener("load",function(){setTimeo ut(function(){var t=$(".profileContainer .profile-photo"),e=$(".js-edit-profile");e.length&&/default_avatar/i.test(t.attr("src"))&&e.trigger("click")},1e3)},! 1);
                    </script>
                    </li>
                    <!-- Edit Avatar by vBMods.rocks END -->
                    So all that went away. But it still does not force an avatar. This is what’s shown on a new user
                    Attached Files

                    Comment


                      #12
                      The mod checks if the avatar on Profile page is using the default avatar by checking if the <img> src contains the word "default_avatar" but it seems you changed your default avatar to your site logo. The original default avatar <img> src is default_avatar_large.png

                      I will update the mod to be more flexible by checking something else. I found another way without looking at the src.
                      Helpful? Donate. Thanks!
                      Buy me a coffeePayPal QR Code
                      Fast VPS Host for vBulletin:
                      A2 Hosting & IONOS

                      Comment


                      • Mitch
                        Mitch commented
                        Editing a comment
                        Glenn that worked .... You're a friggin Genius

                      • glennrocksvb
                        glennrocksvb commented
                        Editing a comment
                        Thanks for confirming v1.2 works.

                      #13
                      Released v1.2. Please see updated first post. You need to uninstall the old version before installing the new one. See updated instructions in the readme file.
                      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 "|||"