Announcement

Collapse
No announcement yet.

Image cropping

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

  • Image cropping

    I know this feature exists, I just can't remember where it was. Lets say my posting area has a width of 800px and I post and image that is 1000px, how can I make it auto-resize to fit in the 800px box? Also, if that happens, will there be an option to click the image to become full size?
    "You forgot about my trap card!"
    "Oh no!!"
    "Oh yes, and wait till you hear about it's special ability!"

  • #2
    You can only restrict the size of post attachments, not IMG tags.

    If you have a working image library setup:

    Admin CP -> vBulletin Options -> Image Settings

    And your forum is set to resize images:

    Admin CP -> vBulletin Options -> Message Attachment Options -> Resize Images

    Then it will automatically resize uploaded images to conform to the maximum dimensions that are defined in your:

    Admin CP -> Attachments -> Attachment Manager

    Also, be mindful of this restriction in the includes/config.php file:

    Code:
    // Image Processing Options
    // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
    $config['Misc']['maxwidth'] = 2592;
    $config['Misc']['maxheight'] = 1944;
    Note that this resizing does not preserve the original size and allow users to view the original size. You need to use thumbnails for that:

    Admin CP -> vBulletin Options -> Message Attachment Options -> Thumbnail Creation

    Comment


    • #3
      Here is a very crude yet effective method for the img tag. Keep in mind there are better ones on vbulletin.org that actually resize the image.

      go to your admin panel,
      custom BB codes > add new BB code

      title: enter whatever you want
      tag: img
      replacement:
      HTML Code:
      <div style="width: 450px; height: 450px; overflow: hidden;">
      <a href='{param}' target='_blank' rel='nofollow'><img src='{param}' border='0' title='Click for full size image'/></a>
      </div>
      replace the 450 width and height with whatever suits your needs.
      This code will take a full image url, like the normal img tag does, place it within a limited size <div> which crops any content larger than it;s boundaries, and makes the image into a link to the image specified. the title is the message shown when you mouse over the image indicating to click it to view it in full.

      If you wish you can put in an example and description, would be best to use an image larger than the size you specified in order to see what it does.

      If you dislike it you can go back to the default vbulletin way of handling the img tag by deleting this custom bb code in the bb code manager.

      You can also use a similar method for restricting signature sizes very efficiently and cleanly.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X