Default Avatar in vB 3.8.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nat.n
    Member
    • Apr 2009
    • 44
    • 3.8.x

    Default Avatar in vB 3.8.2

    Hello,

    I found something for previous vB versions, but not for this one (3.8.2).
    I wish to set up a default avatar "no avatar" picture for registered users (guests, won't have a permission to post - therefore, there's no need to have a "guest" default avatar).

    After registration, the user will have ("by default") this picture as his/her avatar.
    The "no avatar"... avatar won't change, unless the registered user add his/her own avatar of pick one from the avatars "gallery".

    I'm afraid, I'm not able to do this from the Usergroups section of my ACP.

    Any suggestion, should be much appreciated,

    Thank you in advance!
  • DoE
    Senior Member
    • Sep 2007
    • 763

    #2
    Will the default avatar for registered users be used only in the postbit? There are two ways you can achieve this, one by modifying the associated php file, which will give a default avatar reguardless of which style or postbit you are using, or by modifying just the postbit template (which you would need to add to each styles postbit template you are using). Let me know which one you want, but keep in mind I don't write plug-ins or products so if you want it handled in php you will need to modify the file directly, but I'll explain in detail how to do it. Either way, let me know the path of where your default avatar is.

    Also, with 3.8 series the profile page uses a scaled version of a users avatar. Would you like a scaled default avatar displayed in the users profile page as well? If you would, create an admin-viewable only area in your gallery and upload the default avatar, save it so that it will create the profile page thumbnail version of it. The thumbs are stored in your gallery directory, just let me know the number vB assigned to it.

    Let me know what you want, default avatar path, and associated generated thumbnail number (only if you want the default to show in the profile page) and I'll see if I can have this done for you later today, or tomorrow at the latest.

    Comment

    • nat.n
      Member
      • Apr 2009
      • 44
      • 3.8.x

      #3
      Thank you very much for your reply!!!

      What I have in mind is to "give" (by default) an avatar everyone who join the forum, so, whether these (registered) users post or not, to have an avatar.

      This one is stored in my /forum/images/misc/ folder and its dimensions are 80x80. (noavatar.png)

      It's the first time I use vBulletin (I'm very familiar with phpBB though) and therefore, the vB version I use is the 3.8.2 (I set it up yesterday and I'm working on it).
      I didn't set up a new template/theme/skin but, as I wish the board's appearance to be similar to the website, it's for sure I'll change template (so, not sure that I want to change the settings to any template... It's seems better to add this option -of the default avatar- once).

      My concern is, this "default no-avatar" picture, to be changed, when the user decides to upload his/her own avatar.

      Thank you once again!

      Comment

      • DoE
        Senior Member
        • Sep 2007
        • 763

        #4
        Because you are new to vB and may have questions for the Support Staff at a later time, I didn't want you to modify your code, so I decided to create a plug-in you can upload to here: Plugins & Products -> Download/Upload Plugins. Just be sure you have Plugins turned on here: vBulletin Options -> Enable Plugin/Hook System.

        The Default Avatar plugin is very basic. If a user has no avatar, one is displayed in the Postbit for him/her. No other bells or whistles.

        Just download the attachment to your PC and then through your Admin CP, go to Plugins and Products and import it.
        Last edited by Zachery; Fri 17 Apr '09, 2:06pm.

        Comment

        • nat.n
          Member
          • Apr 2009
          • 44
          • 3.8.x

          #5
          Thank you very - very much, I really appreciate it!!!

          It works exactly the way I wanted to!!!

          It's perfect!
          Last edited by nat.n; Fri 17 Apr '09, 8:12am.

          Comment

          • DoE
            Senior Member
            • Sep 2007
            • 763

            #6
            You're welcome. If you have any questions just ask. And welcome to vBulletin! I switched from phpbb to vB a couple of years ago, best thing I done, you will be happy you did as well.

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 74132

              #7
              You can do this with simple template edits:

              In postbit and/or postbit_legacy find:
              HTML Code:
              <if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
              Change to:
              HTML Code:
              <if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td><else /><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$stylevar[imgdir_misc]/unknown.gif" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API

              Comment

              • DoE
                Senior Member
                • Sep 2007
                • 763

                #8
                Yip, and I offered that. The only downside with template edits is it would need to be done to multiple styles if the site has more than one, and with the xml, no worries about the dreaded revert when upgrading.

                Comment

                • Zachery
                  Former vBulletin Support
                  • Jul 2002
                  • 59097

                  #9
                  Please be aware that code modifications and third party code is not permitted here.

                  Comment

                  • texterted
                    Senior Member
                    • Mar 2008
                    • 135
                    • 3.8.x

                    #10
                    Originally posted by Zachery
                    Please be aware that code modifications and third party code is not permitted here.
                    Yeah, but where would vBulletin be without it?

                    Comment

                    • DoE
                      Senior Member
                      • Sep 2007
                      • 763

                      #11
                      Originally posted by Zachery
                      Please be aware that code modifications and third party code is not permitted here.
                      nothing major, just a simple xml file.

                      Seriously though, what about those of us who have no use for vb org? So many complaints. Why not allow simple xml files here for all the members who will not go to vb org for one reason or another? I answer questions from users here, especially those who are new, because of my experience there, where as a new user to vB I was told to not ask for help unless I offer help first, talk about a catch 22!

                      Questions, and help, posted at vBulletin.com should never go unanswered, nor should new members be directed off site for basic help. I'll keep offering help, and if once in a while the kind of help I offer breaks the rules, then I guess it'll be up to the mods here to remove the help in question.
                      Last edited by DoE; Fri 17 Apr '09, 4:08pm.

                      Comment

                      • Zachery
                        Former vBulletin Support
                        • Jul 2002
                        • 59097

                        #12
                        Its agasint the rules, its not allowed.

                        Comment

                        • nat.n
                          Member
                          • Apr 2009
                          • 44
                          • 3.8.x

                          #13
                          Well, I thank you all!

                          DoE's help was precious, and as for "third party code", I think... it should be a kind of gradation of third party codes; DoE's .xml didn't "modify" the vB script and it is not the kind of code that could change or... destroy vB script.
                          In any case he was very helpful and it's important to have users who care and offer their knowledge to others (especially newbies to vB, as I am).

                          Originally posted by DoE
                          You're welcome. If you have any questions just ask. And welcome to vBulletin! I switched from phpbb to vB a couple of years ago, best thing I done, you will be happy you did as well.
                          I'm already!!!
                          I hope members will be, as well!

                          Comment

                          Related Topics

                          Collapse

                          Working...