Hello again
I was searching trough forums to find the answer but didn't find it. So here's the thing:
Once there was a way to make thumbnails the same width, so you could put them in 1 column and the width of all thumbs was the same. That hack worked in 1.3.3 and I remember that I tried it in 1.4.something and it returned an error. Is there some way to do it? I've seen something similar in your gallery.
Thanks, Luka
Posts: 23
i wouldn't mind knowing the answer to this as well.
Posts: 23
italjet.
have you still got a copy of that hack? I wouldn't mind having a look...
otherwise... who's the best person in the forum ask?
Uniform thumb widths look better in single columns, which is the layout I'm trying to acheive.
Are uniform widths a gallery 2 thing? I might jsut jump the gun if they are...
Posts: 12
Hey
Yeah well I do have a copy of that in some old test gallery. But I don't think it matters. I tried something else. I use ImageMagick. So the tool runs from command line and it has some switches. So I went trough IM help and figured that it uses size like 120x120, but both values are the same. This is done trough util.php
So I changed some of the code. I know, if you do this it's not so dynamic anymore but it works.
Ok, it worked, but the problem was that I set the resized image to 800x800 and now it is limited by 200. It's not much of a problem for me because I resize all images before I upload and it doesn't touch them... so it works for me.
But there is another way
I have set my thumb size to be 120x120, and edited util.php, so width of thumbnails will always be 120. Since it is limited by that number I raised the other number to 800. Why? Because I use 800x800 for resized images.
So it goes like this. When u're creating thumbnails your size is 120x800 and when u're creating resized images your size is 800x800. That works for me. It can probably be done smoother, but at this time I'm not getting into it since I'm not a php guru (actually I don't know shit about it). So the final code is
Thats it for now, there is 50cm of snow outside (I'm from Ljubljana, Slovenia) so I have to go dig out my car and go to school.
I hope it helps, I'll try to do it better later.
Have a nice weekend (I know I will hehe).
Luka
Posts: 12
hdotnet,
Yeah I probably want the same layout as you, and I'm working on it. Keep me posted of your progress, so we can do it faster.
Luka
Posts: 23
haven't had a chance to try italjet's hack yet... but I've come across this post...
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4512&highlight=thumbnail+width
same idea
Posts: 23
just got a fixed thumbnail width of 150px using a fresh install using ImageMagick
installed as normal
open up util.php, search for Geomotry
should take you to the compress_image function...
edit as per the comments in the code below:
uploaded a load of landscape and portrait photos and all thumbs are now processed using a fixed width.... yet they're aspect ratio remains the same..
result.
Posts: 23
just realised that the .sized image being generated by gallery shares the same dimensions as the .thumb image.... so clicking on a thumb gives you a resized image the same size as the thumb.
doh.
working on a fix
Posts: 23
found a fix....
just have to fiddle with compress_image in Util.php a little:
Posts: 38
Has anyone managed to set the thumbnail width for Gallery 2.2? Any help is greatly appreciated.
-----
Photography gallery at http://www.kennyyeoh.com