Hello - I'm linking to a flash plugin that I can't edit and I need the thumbnails to have the same filename as their source images.
It would make my life a lot easier if I could remove the '_100_cw85_ch85.jpg' suffix from the generated thumbnails!! Is there a simple way to do this in zen? I've noticed that if I rename them manually or in php the thumbnail is re-generated so that's out of the question. Another possibility is mod_rewrite but it's not working for me...
Thanks - GKTD
Thx for your time - I'm not actually dealing with vids, just images in galleries and thumbs in the cache. I want zen to generate thumbs for me but without the suffix so:
Main Image: www.mysite.com/zen/albums/discs/disc1.jpg
Thumb Image: www.mysite.com/zen/cache/discs/disc1.jpg
NOT
Thumb Image: www.mysite.com/zen/cache/discs/disc1.jpg_100_cw85_ch85.jpg
If that's doable...
Not really. Zenphoto uses the same directory for thumbnails of different sizes, as well as resized main images, and all resized images of any kind. It needs to keep them separate and unique, hence the suffix.
Out of curiosity what's the purpose of this flash plugin? Perhaps you could find a different one that's more configurable?
What about a little php script that loads it for you, the URL might be in the right format:
Main Image: www.mysite.com/zen/albums/discs/disc1.jpg
(so, main directory: www.mysite.com/zen/albums/discs/)
Thumb Image: www.mysite.com/script.php?file=zen/cache/discs/disc1.jpg
(thumb "directory": www.mysite.com/script.php?file=zen/cache/discs/)
If the Flash thing accepts "www.mysite.com/script.php?file=zen/cache/discs/" as a valid directory to look for the thumbs, you could have script.php do essentially what mod_rewrite would, and slap on the appended part of the filename and load the file.
I think you got it in one Alex. The plugin is simpleviewer - a guy wants me to hook it up with his zen images and the documentation states that the main images and thumbs MUST have identical filenames, you only get to supply a path to the main/thumbs directories.
If simpleviewer will swallow a php page + image name instead of a full filename, then I can add the suffix in thumbs/getImage.php but leave it out in main/getImage.php...
Nothing in life is simple chaps - not even simpleviewer apparantly.
That sounds pretty sweet, although some miserly part of me doesn't like the thought of duplicating thumbnails when Zen's are already there. It's negligable in terms of disc space + admin I suppose but still...
Anyway it's sorted now. I swapped the thumb dir in the XML for a php script. If anyone's interested:
-Call-
`[img]zen/galleries/products/IMG_9196.jpg[/img]
[img]getZenThumb.php?fn=zen/cache/products/IMG_9196.jpg[/img]`
-getZenThumb.php-
`//get filename + zen suffix
if (isset($_GET['fn']))
$imagePath = $_GET['fn'] . '_100_cw85_ch85.jpg';
else
$imagePath = 'error';
header("Content-Type: image/jpegn");
header("Content-Transfer-Encoding: binary");
readfile ($imagePath);`
I'll look into a theme next time - using Zen for the 1st time has been great so I'll be back thx for your help fellas.
(p.s. don't know if you're doing some admin ATM but the image links on zenphoto.org/themes are a bit fruity: www.zenphoto.org/themes/images/themes/effervescenceplus_large.jpg)
Should be http://www.zenphoto.org/zp/theme/ , not zenphoto.org/themes... not sure where you got that URL.
ah nuts I've been emptying my cache for testing all morning so I can't tell you... maybe just a bad link in a post? I can't find it now.