ZenphotoCMS Forum
Different thumb sizes for album - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Different thumb sizes for album (/thread-1668.html)



Different thumb sizes for album - enes - 2007-09-24

Is it possible to have two different sizes for thumbnails? For example one size for index page and the other for albums.


Different thumb sizes for album - acrylian - 2007-09-24

Yes, it is. You have to edit your theme to use the printCustomAlbumThumbImage() instead of printAlbumThumb()

Take a look at the template functions guide here: http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide


Different thumb sizes for album - thinkdreams - 2007-09-24

You can pass multiple sizes through the thumbnail function printCustomAlbumThumbImage in template-functions.php. The function will give you a point of reference as to what parameters it takes. That way, you can use that function in your theme to display thumbs in whatever size you wish, and then have differing sizes in each index.php or album.php page. Does that make sense?


Different thumb sizes for album - enes - 2007-09-24

Wow thats it, and much more, great, thanx guys


Different thumb sizes for album - LpSoleil - 2008-05-13

Again, i need this function but really don't know how to put it in place. I will have 3 different thumbnail size. 1 for Index.php, 1 for Album.php, 1 for Image.php.

I went to template-functions.php and try to figure it out.. my poor php skills does'nt help me. Can you ?

Thank you


Different thumb sizes for album - acrylian - 2008-05-13

http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functionprintCustomAlbumThumbImage
and
http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/


Different thumb sizes for album - LpSoleil - 2008-05-13

Thank you,
well, the closest solution I found is :
`

<?php if (hasNextImage()) { ?>

Suivant

<?php printCustomSizedImage(getNextImageThumb(), null, $ls?50:null, $ls?null:50); ?>

`

That give me the correct dimension but I'm still unable to get the next image to show as the Thumbnail for the next image...it present the same image as the main one. (in image.php)


Different thumb sizes for album - acrylian - 2008-05-13

`printCustomSizedImage` does only work within a `next_image` main loop or directly as a repacement for the one sized image on image.php. `getNextImageThumb()` itself returns url of the thumb of the next image.


Different thumb sizes for album - LpSoleil - 2008-05-13

Well, i will have to dig deeper in the understanding of php and functions. Gracias Acrylian! For all your anwsers. To me and anyone!


Different thumb sizes for album - LpSoleil - 2008-05-13

Now, I found this code to display the entire list of Thumbnail...
what is the trick to do or to translate to php :

loop while currentImage = +1 ?

`

<!--/////////////////////////////////////*******************************************//////////////////////////////////-->

<?php while (next_image(true,0)): ?>

<a>" alt="<?php echo getImageTitle(); ?>" title="<?php echo getImageTitle(); ?>">

<?php printCustomSizedImage(getImageTitle(), null, $ls?50:null, $ls?null:50); ?>

<?php endwhile; ?>

<!--/////////////////////////////////////*******************************************//////////////////////////////////-->

</a>`