Reload Avatar Scheduled Task?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • TheologyWeb
    replied
    Originally posted by Slowmin
    Sorted.

    Incase anyone is wanting to do this, I edited image.php in the core directory, if you find $table = 'customavatar';, then replace the $filedata_thumb to just say $filedata as I have here, it's not elegant, and I think someone can probably do this better! But it's doing what I wanted now.

    Code:
     else
    {
    $table = 'customavatar';
    if ($vbulletin->GPC['type'] == 'thumb' OR !empty($vbulletin->GPC['thumb']))
    {
    //$filedata = 'filedata_thumb';
    $filedata = 'filedata';
    }
    }
    Thank you!!

    I have been driving myself nuts trying to figure this out. I too was at the point of just trying to rebuild the thumbnails with a scheduled task every night, and did a search on that and found this thread. Kudos.

    Leave a comment:


  • Slowmin
    replied
    Sorted.

    Incase anyone is wanting to do this, I edited image.php in the core directory, if you find $table = 'customavatar';, then replace the $filedata_thumb to just say $filedata as I have here, it's not elegant, and I think someone can probably do this better! But it's doing what I wanted now.

    Code:
        else
        {
            $table = 'customavatar';
            if ($vbulletin->GPC['type'] == 'thumb' OR !empty($vbulletin->GPC['thumb']))
            {
                //$filedata = 'filedata_thumb';
                $filedata = 'filedata';
            }
        }

    Leave a comment:


  • Slowmin
    replied
    Not having much luck here, I'm looking through files, but can't find what it could be.

    Something is resizing at the point of upload to 100 x 100, but can't find what.
    I can't find where the avatar is picking to show the "thumb=1" in threads, if I could do that, then I could remove it so it just loads the full image.

    Anyone got any ideas? Because uploading pictures, for them to then resize to 100 x 100 is not a nice look.

    Leave a comment:


  • Slowmin
    replied
    I wouldn't even know where to begin with that! It certainly seems like something between the upload input and the avatar though, because as I say, when the avatar thumbnails are rebuilt, it goes to 150 x 150.

    Leave a comment:


  • Wayne Luke
    replied
    It is probably hardcoded. The system wasn't designed to change the size of the Avatars. Many design decisions are focused on specific avatar sizes at specific locations. Where it is hardcoded, I don't know. I haven't looked through code to find avatar sizes. Probably in the library code that deals with user profiles and avatars.

    Probably easier to edit the avatar template so it only uses the full size image. Though I haven't dissected that template either.

    Leave a comment:


  • Slowmin
    replied
    Originally posted by Wayne Luke
    Is your thumbnail size set to 150 under Settings -> Options -> Message Attachment Options? Avatars are treated the same as attachments.
    Yep, but it's not doing anything, the image thumbnail that is generated after uploading is still displaying at 100 x 100, is there something that hardcodes the avatar thumbnails when they get uploaded? Because rebuilding the avatar thumbnails makes them 150 x 150, yet when first uploaded, they get shrunk.

    Leave a comment:


  • Wayne Luke
    replied
    Originally posted by Slowmin
    So max height isn't doing anything useful? I'm not quite sure what is going on, the size is working fine on the thread, it's just the image looks garbage after being uploaded, attached image shows all this.
    You're missing the space between px and !important. This will cause parsing errors in the CSS.

    Is your thumbnail size set to 150 under Settings -> Options -> Message Attachment Options? Avatars are treated the same as attachments.

    Leave a comment:


  • Slowmin
    replied
    Yep, that's already done here:

    Code:
    define('FIXED_SIZE_AVATAR_WIDTH',  150);
    define('FIXED_SIZE_AVATAR_HEIGHT', 150);
    The avatars are displaying at those settings, the problem is that the thumbnail generated when it's uploaded is going to 100 x 100, if I rebuild avatar thumbnails, it goes to 150 x 150

    Leave a comment:


  • Mark.B
    replied
    Being on an iPad at the moment I don't have access to the files but I am sure there are avatar dimensions hard coded in core/includes/class_core.php.

    I recall these having to be edited at one time relating to a bug whereby avatars didn't resize on page 2 and onwards in a thread. However that bug was later fixed. I don't know if editing that value might help here. It might be worth a test. Ensure you back up the file first.

    Leave a comment:


  • Slowmin
    replied
    Originally posted by In Omnibus

    It might be Message Attachment Options / Attachment Resize Options in the AdminCP which sets the default thumbnail size to 121px. You can change that to "0" to have it default to the actual image size.
    Seems like a good shout, but it's not that, the avatar thumbnail it's making is going to 100 x 100, so none of the options in the Attachment Resize match that, I tried changing Thumbnail to 150px and to 0px, didn't do anything. Tried with some of the others too.

    Leave a comment:


  • In Omnibus
    replied
    Originally posted by Slowmin
    So what is making the thumbnail initially upload so small?
    It might be Message Attachment Options / Attachment Resize Options in the AdminCP which sets the default thumbnail size to 121px. You can change that to "0" to have it default to the actual image size.

    Leave a comment:


  • Slowmin
    replied
    So max height isn't doing anything useful? I'm not quite sure what is going on, the size is working fine on the thread, it's just the image looks garbage after being uploaded, attached image shows all this.



    1: Uploaded image to profile, crop it, looks nice on the profile.
    2: In the postbit, it is at 150x150 size, but the quality is awful.
    3: Right click to see the thumbnail, which has generated at a small size, so resized upwards through CSS.
    4: Rebuild Thumbnails in ACP.
    5: Now looks nice on a thread.
    6: Thumbnail is at the size I wanted in the first place.

    So what is making the thumbnail initially upload so small?

    Leave a comment:


  • Wayne Luke
    replied
    This is the only valid line that changes sizes:

    Code:
    max-width: 150px !important;

    Leave a comment:


  • Slowmin
    replied
    Not quite sure I follow, the height and width are both set from what is written there from what I can tell, unless I am missing something. Sorry, very new to this!

    Leave a comment:


  • Wayne Luke
    replied
    You should make sure to set both the height and width on images. Even then, non-square images may be deformed by this.

    Leave a comment:

Related Topics

Collapse

Working...