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
Comments
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...
Out of curiosity what's the purpose of this flash plugin? Perhaps you could find a different one that's more configurable?
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.
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.
Anyway it's sorted now. I swapped the thumb dir in the XML for a php script. If anyone's interested:
-Call-
`
`
-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)