Thumbcrop thumbnails

Hello,

When in ACP I try to crop thumbnails and our photo is big the photo is out of box in browser. That not exists when I choose from options different values than 'Size of photo' and 'Width' or 'Height'.

This two options get dimensions from photo, if photo have 3000x2500px then site look's not good. Is there any fix for this?

Comments

  • acrylian Administrator, Developer
    What theme? Maybe post a link to an example? (And what is ACP?)
  • ACP - Admin Control Panel ;-)

    No theme is required, upload big photo and set Image Size to 1500px, result will be not nice :-) Maybe set width to 100% width of page.
  • acrylian Administrator, Developer
    I still don't understand you issue. So if the image does not fit your theme (whatever that is) you will have to adjust that.
  • Hi,

    If still not understand the problem I send You a fix, I think You understand what is that fix mean:

    In zp-core/admin-thumbcrop.php
    Find:

    `

    jQuery(window).load(function(){

    jQuery('#cropbox').Jcrop({

    onChange: showPreview,

    onSelect: showPreview,

    onChange: showCoords,

    setSelect: [ <?php echo $iX; ?>, <?php echo $iY; ?>, <?php echo $iX+$iW; ?>, <?php echo $iY+$iH; ?> ],

    bgOpacity: .4,

    bgColor: 'black',

    aspectRatio: <?php echo $cropwidth; ?> / <?php echo $cropheight; ?>,

    boxWidth: boxWidth, /* Fix to corrent width of page in other resolutions */

    trueSize: [<?php echo $sizedwidth; ?>,<?php echo $sizedheight; ?>]

    });

    });

    `

    Move under div ID - 'content'

    Next, before:

    `jQuery(window).load(function(){`

    Add:

    `var boxWidth = Math.round($('#content').width() - (<?php echo ($thumbcropwidth - 30) + ($cropwidth - 30); ?> + 96));`

    In same function add at the end of function:

    boxWidth: boxWidth, /* Fix to corrent width of page in other resolutions */
    trueSize: [<?php echo $sizedwidth; ?>,<?php echo $sizedheight; ?>]

    And check resolution for very big photos - page did not out of browser box :-) I think You understand what I'am done.
  • acrylian Administrator, Developer
    Ok, I think I know understand the issue. We will try to reproduce this asap. Meanwhile, please open a ticket.
Sign In or Register to comment.