Member
Member
nathan   2006-04-13, 06:58
#1

Hi,

I have had a quick look at how the thumbnails are generated, and how they are not stored ALL the time, (unless we work around the max cache value). I would like to do the same thing but for different file sizes also. I would like to feed zenphoto the largest file I want to offer, then have it generate 3 smaller sized images that I coult like to and have the user download. They should begenerated like the thumbnails and be bound by the same max_cache values.

If anyone could give me a few pointers on the best way to do this, I would really appreciate it.

Developer
Developer
trisweb   2006-04-13, 08:29
#2

It's misleading, but we don't use max_cache at all right now.

If you want to give people 3 sizes, just give them in the URL and Zenphoto will generate them on request if they haven't been already. If they have, it redirects to the cached image.

Example links from my gallery in three sizes:

`http://www.trisweb.com/photos/Berkeley+4-10-2006/image/800/_4106695.JPG

http://www.trisweb.com/photos/Berkeley+4-10-2006/image/595/_4106695.JPG

http://www.trisweb.com/photos/Berkeley+4-10-2006/image/300/_4106695.JPG And the thumbnail: http://www.trisweb.com/photos/Berkeley+4-10-2006/image/thumb/_4106695.JPG`

Since it redirects to the cached version, the easiest way to get this URL is to right-click the image or thumbnail in zenphoto and select "Copy Image Location" in Firefox.

Or edit the image page url like so, adding a /image/[size] between the album and filename:
h[i][/i]ttp://www.trisweb.com/photos/Berkeley+4-10-2006/_4106695.JPG becomes h[i][/i]ttp://www.trisweb.com/photos/Berkeley+4-10-2006/[b]image/595/[/b]_4106695.JPG

The point is, zenphoto can produce images on demand at any size at any time. It's part of the beauty of it that people don't often catch on to. ;-) You got the idea.

Member
Member
nathan   2006-04-13, 09:05
#3

I got the idea. Thanks heaps. I had no idea it COULD do this already and it will save me heaps of time.

Cheers.

Member
Member
nathan   2006-04-13, 09:54
#4

Okay. Sorry, but how do I do this dynamically? Is there there a function I can call that will give me the name of the linked file, but ONLY the file name.

See, I want to do this dynamically, and it would be great if I could just include the album path, the image size and then the image file name.

Thanks again. I really had no idea zenphot was that powerful.

Member
Member
nathan   2006-04-13, 10:20
#5

Again. Sorry. I found it. getSizedImageURL($size)

Thanks again.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.