Announcement

Collapse
No announcement yet.

Different Avatar Image on reply/initial post load

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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.

    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

    Comment


    • #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


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

        GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

        Comment


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

          http://www.tiredofittrucking.org/for.../167-here-i-am

          Comment


          • #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

            TalkNewsUK - My vBulletin 5.5.4 Demo
            AdminAmmo - My Cloud Demo

            Comment


            • #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


              • #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

                TalkNewsUK - My vBulletin 5.5.4 Demo
                AdminAmmo - My Cloud Demo

                Comment


                • #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


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

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X