Different Avatar Image on reply/initial post load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daryn
    Member
    • Nov 2008
    • 95
    • 3.7.x

    Different Avatar Image on reply/initial post load

    I asked this on vb.org but haven't gotten any answer yet, so I thought I'd ask here, maybe you may have an idea how to do this.

    So far I have managed to change the CSS values that relate to the avatar. I've set it to display at a max of 128x128 pixels. However, when a member posts a new message or pages over to another page of replies the avatars become their default 64x64 size. I can see that in these two instances that two different images are being pulled. When first loading a forum, you get the higher quality one. When replying or paging, you get the thumbnail.

    Inside the conversation_userinfo template, I isolated this code as what draws the thumbnail:

    Code:
    <vb:elseif condition="$conversation['avatar'] AND $conversation['avatar']['avatarpath'] AND $conversation['avatar']['hascustom']" />
                <a href="{vb:url 'profile', {vb:raw conversation}}" class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw baseurl_corecdn}/{vb:raw conversation.avatar.avatarpath}" alt="{vb:raw conversation.authorname}" title="{vb:raw conversation.authorname}" /></a>
    Any idea how to modify this condition to draw from the higher quality image?

    Thanks.
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4021
    • 5.7.X

    #2
    How does your CSS look like? And where did you put it? If you were able to do it via CSS, you don't have to modify the conversation_userinfo template.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • Daryn
      Member
      • Nov 2008
      • 95
      • 3.7.x

      #3
      I've got this in my css_additional

      Code:
      /* Postbit Avatar Container */
      .b-avatar--m {
          border-style: solid;
          border-width: 1px;
          border-color: #111111;
          border-radius: 5px;
          margin-left: -7px;
          height:128px;
          width:128px;
      }
      
      /* Postbit Avatar Image */
      .b-avatar--m > img {
          max-height:128px;
          max-width:128px;
      }
      But that only effects initial load, not replying or paging.

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4021
        • 5.7.X

        #4
        I wonder why that does not affect paging or replying. Do you have a link to your forum?

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        • Daryn
          Member
          • Nov 2008
          • 95
          • 3.7.x

          #5
          Beats me. You can see a topic with 2 pages here, the forum isn't open yet, so it's kinda bare.

          Comment

          • Mark.B
            vBulletin Support
            • Feb 2004
            • 24288
            • 6.0.X

            #6
            I know what this is.

            I'm not at home at the moment but there is a file change that needs to be made in order to sort it. I'll post the details up later on when I access my log of this. It's also in the tracker: VBV-12186.
            MARK.B
            vBulletin Support
            ------------
            My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
            My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

            Comment

            • Daryn
              Member
              • Nov 2008
              • 95
              • 3.7.x

              #7
              I'll wait for them eagerly. I can see the entry in the tracker, but don't have access to any of the code changes, so I'll just wait for them here.

              Comment

              • Mark.B
                vBulletin Support
                • Feb 2004
                • 24288
                • 6.0.X

                #8
                In file:
                /core/includes/class_core.php

                Up near the top are these two lines:
                PHP Code:
                define('FIXED_SIZE_AVATAR_WIDTH',  60);
                define('FIXED_SIZE_AVATAR_HEIGHT'80); 

                Edit the two numerical values to what you have chosen:
                PHP Code:
                define('FIXED_SIZE_AVATAR_WIDTH',  128);
                define('FIXED_SIZE_AVATAR_HEIGHT'128); 

                Then run both these:
                AdminCP > Maintenance > General Update Tools > Rebuild Avatar Thumbnails
                AdminCP > Maintenance > General Update Tools > Rebuild Customer Avatar Thumbnails

                Should sort it.
                MARK.B
                vBulletin Support
                ------------
                My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                Comment

                • Daryn
                  Member
                  • Nov 2008
                  • 95
                  • 3.7.x

                  #9
                  That did it. I've done it, and looks like this is something I'll have to do on 5.1.2 when that goes final. Looking forward to that one.

                  Comment

                  • caymangt4
                    New Member
                    • Jan 2015
                    • 1

                    #10
                    My forum is on the VB Cloud, how do I get this fixed? TIA

                    Comment

                    Related Topics

                    Collapse

                    Working...