@bennyb: Ok, I’m pretty new at this (my 3rd modx site) but am slowly figuring everything out!
To output thumbnails using phpThumb, download and install the
phpThumb snippet,
I’m assuming EvoGallery is already installed and you know how to use it to display a gallery on your page. To control the thumbnails, you’ll need to create a custom ’item template’ that contains the phpThumb call.
So, your EvoGallery call will look something like this:
[[EvoGallery? &display=`images` &type=`simple-list` &tpl=`gallery-ul` &itemTpl=`gallery-li`]]
I created a simple chunk called ’gallery-ul’ and added:
And another chunk called ’gallery-li’:
<li>
<a href="[+images_dir+][+filename+]"><img src="[+filename:phpthumb=`h=80&w=80&zc=C&q=65#[+images_dir+]`+]" alt="[+title+]" /></a>
</li>
Basically, this tells EvoGallery to output an unordered list, with each image as a new listing entry (styled however you like by CSS). The phpThumb snippet is called from the [+filename+] placeholder, with the following settings:
h=80&w=80 - this sets the thumbnail height and width to 80px
zc=C - this tells phpThumb to ’zoom and crop to center’, basically it shrinks the image until either the width or height is 80px, then crops from the centre to form a square thumbnail.
q=65 - this is image quality, in this case jpeg compression of 65.
Obviously change these to what you need for your layout, and there are many more settings you can use to control the thumbnail output - see
phpThumb documentation.
Here’s a link to existing
Modx Support/Comments for phpThumb.
Hope that helps - and if anyone has an idea about my multi-language problem from my post above, please let me know!
Luke