Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: mdp_Automatic Thumbnail's
> jonhicks wrote:
> Quick question about this plug-in. Does it automagically provide thumbnails for every image? Do you/ can you choose which images are affected? Any special tag to use? I want to use this in a gallery section, but want to keep my custom thumbnails for the portfolio section…
If you upload an image (using the Upload File or Replace Image dialog) it will automatically create a thumbnail for that image (assuming the image is a jpeg). If you upload a thumbnail, it will replace the automatically created thumbnail. The images and thumbnails you uploaded prior to installing the hack will not be touched.
Right now, there is no way to just replace the image without the thumbnail being automatically created. Also, the images will always be resized (assuming the dimensions are greater than the resize value). Soon I plan on making resizing and thumbnailing an option.
Offline
#38 2004-06-28 11:38:54
- heraclitus
- New Member
- Registered: 2004-06-26
- Posts: 2
Re: mdp_Automatic Thumbnail's
Thanks for the hack. A problem. Using ImageMagick 6.0.2, thumbnails aren’t being created and an error saying
Warning: chmod(): No such file or directory in /Library/WebServer/Documents/textpattern/include/txp_image.php on line 534
comes up. Something is being created, though, as I get failed image palceholders where the thumbs might be. I’m a complete newb, so this is probably something obvious.
Offline
Re: mdp_Automatic Thumbnail's
> heraclitus wrote:
> Thanks for the hack. A problem. Using ImageMagick 6.0.2, thumbnails aren’t being created and an error saying
Warning: chmod(): No such file or directory in /Library/WebServer/Documents/textpattern/include/txp_image.php on line 534
comes up. Something is being created, though, as I get failed image palceholders where the thumbs might be. I’m a complete newb, so this is probably something obvious.
Check your image directory permissions, make it 0777 if possible, but 755 should work as well. If that doesn’t work, email or IM me and we’ll try to get to the bottom of it.
Offline
Re: mdp_Automatic Thumbnail's
Small bugfix update when replacing images.
New Version 0.5.1 Released
- Square thumbnail’s work in both ImageMagick and GD.
- Checkboxes when you upload/replace an image to choose weather you want to resize, create a thumbnail, or both.
- Easier to change the final image sizes.
- Subtle name change.
This is a much nicer version than the last. Probably the biggest improvement is now you can choose to manipulate the uploaded file or not (you can choose to Resize, create a thumbnail or both). I’d definitely recommend using the latest version of ImageMagick (or atleast 6+), but I am going to try to work out the problems with the older versions.
Last edited by greenrift (2004-07-01 01:12:17)
Offline
#41 2004-06-29 11:32:12
- heraclitus
- New Member
- Registered: 2004-06-26
- Posts: 2
Re: mdp_Automatic Thumbnail's
> greenrift wrote:
> Check your image directory permissions, make it 0777 if possible, but 755 should work as well. If that doesn’t work, email or IM me and we’ll try to get to the bottom of it.
My bad, sorry. It’s an ImageMagick problem. It is just not installing properly on my system. This make take some time…
Offline
Re: mdp_Automatic Thumbnail's
Hi greenrift, when I upload an image, I get the main image but no thumbnail. I have “resize” and “thumb” checked. I have GD and my images directory permissions are 777. When I replace an image the image disappears. When I upload an image (new image) and then seperately upload it again under upload thumbnail I get two large images but then I can do replace image and I get a thumbnail, but unfortunately my main image disappears. I have RT_IMAGICK set to 0. The thumbnail i get is not square, although I have the height/width set to 50 for each, but the image itself is not square so maybe that’s the problem.
Offline
#43 2004-07-03 12:43:07
- grapeice925
- Archived Plugin Author
- Registered: 2004-03-25
- Posts: 5
Re: mdp_Automatic Thumbnail's
greenrift, may I make a request on this “hack”? Currently, when you upload a file, and it shrinks down the fullsize image you specify, it only does so by width. Would it be possible to add some more code in there to check which side of the image is larger, and make the larger side become the side by which you scale the image?
For example, photos I need to upload into my gallery and have shrunk down can be either 1000 × 2000 pixels (just making something up here) or 2000 × 1000 pixels. Because you can only speciify width, my vertical images will be a nice size, but my horizontal images are too small, or smaller than I would like them to be. So, I would much rather have the larger side of the image always 500 pixels, for example.
Do you think something like this would be possible?
BTW, awesome hack!! I use it for a client’s site now and he loves it.
Last edited by grapeice925 (2004-07-03 12:43:50)
Offline
Re: mdp_Automatic Thumbnail's
Well, I’m not really certain what I’m doing wrong, but when I try to upload an image, I get the following errors.
<code>Warning: chmod(): No such file or directory in /home/snowglas/public_html/naked/textpattern/include/txp_image.php on line 578
Warning: getimagesize(/home/snowglas/public_html/naked/images/2t.jpg): failed to open stream: No such file or directory in /home/snowglas/public_html/naked/textpattern/include/txp_image.php on line 580 </code>
Those two lines seem to be looking for something called the thumbpath, but I’m not sure where exactly I’m supposed to define that?
I don’t know if this is what’s causing the problem, but I am using an addon domain to my account, so this textpattern install’s running in a subdirectory of my site. However, the config file does have the proper paths leading to the directory that that addon resolves to.
Edit: Well, it seems to work properly now that I set it to use the GD library instead of Imagemagick. Not sure if this is exactly the right fix, but hey! I’m happy. Fabulous hack, by the by, thanks so much!
Last edited by january (2004-07-05 16:17:02)
Offline
Re: mdp_Automatic Thumbnail's
I just started seeing this error:
Fatal error: Call to undefined function: imagecreatefromjpeg() in /home2/leroycli/public_html/textpattern/include/txp_image.php on line 447
And can only deduct that my server was changed. This image resize worked fine last week. And this week, I am getting this error?
What do you think? Think something with the GD extension was changed on my server?
Here are my settings:
// Automatic Resize & Thumbnail’s v0.5
define(‘RT_IMAGICK’,0); // Setting to zero causes hack to use the GD Library.
define(‘RT_RESIZE’,640); // New width of image, in pixels.
define(‘RT_TW’,150); // Width of thumbnail, in pixels. Set to zero to fix height.
define(‘RT_TH’,150); // Height of thumbnail, in pixels. Set to zero to fix width.
Last edited by codylindley (2004-07-26 16:00:39)
codylindley.com
Offline
Re: mdp_Automatic Thumbnail's
> codylindley wrote:
> I just started seeing this error:
> And can only deduct that my server was changed. This image resize worked fine last week. And this week, I am getting this error?
> What do you think? Think something with the GD extension was changed on my server?
That would be my best guess, try running Extension test (upload to server, rename to .php, visit it in your browser). It should hopefully say “GD Loaded” and underneath a big array that includes “imagecreatefromjpeg”. If it doesn’t, then someone messed with GD. If it does, I’ll have to think about it a little bit more.
Offline
Re: mdp_Automatic Thumbnail's
Greenrift
Thanks, you were right, something was up with the server. Getting that fixed.
Appreciate the input.
cody
codylindley.com
Offline