included in modpack 1.4.14This is an
addition for the modpack 1.4.13.
Installation: Download (attached to this thread) unzip and upload the archive contents to your server replacing the existing files.
This mod is in an early state. Therefore be aware of possible bugs and backup your files before using this.
The language is still hardcoded, means no lang file support so far.
Also it's working for now only with GD2. ImageMagick support will follow later.If you want to create a thumb for a pic from a second image, then make sure it has the same extension as the original file. If the orig is jpg, then the thumb base image has to be jpg too. For media files you can use jpg, gif or png.
Please tell me about issues you may find.
Credits:For this mod I've used the
jsCropperUI (BSD License). It's based on the
Prototype JavaScript framework and
script.aculo.usHow to use:1. Either next to an album click 'edit files' or below the intermediate image click 'edit file information'. Now you'll find above the thumb a link 'change thumb'. That's not really new for modpack users but read on.
2. Click the change thumb link and find the 'changeThumb.php' interface. Now you not only can create new thumbs for media files but also for images. You can upload new images or (if the original is an image) create the thumb from the image again. Also you can decide if you want to let the system automatically create thumbs or do that manually to find the best part of the image.
3. If you decide to upload a new image to create a thumb from that you have the possibility to check the checkbox 'Manually crop after upload'. If you do that, manually cropping is enabled, if not, the system auto crops the image (of course that's faster). If you manually crop, the image loads and a box appeares that indicates the area that will be cropped. This area has a min size of your thumb dimensions and will keep the aspect. So far I've tested with the modpacks 'exact size' thumbs and did some quick'n dirty tests with 'width' and 'height'. When you've found the part of the image you want to use as thumb click the 'save' button. Done... you just created a new custom thumb for your picture or media file.
4. a) Either upload a image to use as base for cropping
aa) manually crop (checkbox 'Manually crop after upload')
bb) auto crop (don't check 'Manually crop after upload')
b)
aa) click (if the orig is an image) 'Use the original image as base to crop the thumb' and you can manually crop the thumb from the original image
c) check the checkbox 'Remove current thumb' and click the button 'Remove current thumb' to delete the custom thumb. If it's a media file, then the media icon will display, if it's an image... then no thumb will display anymore.
Have a look at the screenshots in the next posts. The mod is attached to this post.
I've created a user on my demo site for you to play with this. Click 'my gallery' when logged in or browse to the user 'croptest's personal gallery. These four images you can edit.
user: croptest
pass: cropper
direct link to the user gallery of croptest:
http://stramm.st.funpic.org/index.php?cat=10307Version 1.1 uploaded today 10-14-2007 - cropping preview added
- lang file support (added the necessary code to the existing lang files [french, greek, italian, german] but not translated from english)
- ImageMagick support
- some other minor tweaks (eg. you can start cropping double clicking on the crop area instead of moving the mouse to the submit button and clicking that)
Version 1.2 uploaded 10-16-2007 - added a link within editpics and editonepic in addition to 'change thumb' that allows to directly jump to the thumb cropping using the orig image as base
- fixed a glitch in the cropper when using 'max aspect'
- when either using max aspect, width or height as aspect ration now the initial crop area is the thumb size and not anymore the fullsized width/ hight
- added 'change thumb' and 'crop thumb' to the lang file, the above existing modpack files have been upfated (using english)
- added lang fallback
Version 1.3 uploaded on 10-16-2007 as well - when viewing a non image file in editpics now the 'crop link' won't appeare anymore. As a media file doesn't have an original, fullsized image, you can't crop an image from that. So 'change thumb' is the only valid possibility (upload and auto/ or manually crop a thumb)
- fixed another glitch when using 'max aspect'
Version 1.3.1 uploaded on 10-18-2007 - fixed ImageMagick support
- some minor improvements
language contributions are welcome!