![]() |
|
Remove suffix from thumbnails - 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: Remove suffix from thumbnails (/thread-2647.html) |
Remove suffix from thumbnails - grassyKnollTapDance - 2008-04-10 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 Remove suffix from thumbnails - sbillard - 2008-04-10 You don't need to create a thumbnail of the image yourself. Just place an image of the same name in the same album as the video. If the video is show.flv then an image named show.jpb will be used as the thumbnail. Remove suffix from thumbnails - grassyKnollTapDance - 2008-04-10 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... Remove suffix from thumbnails - trisweb - 2008-04-10 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? Remove suffix from thumbnails - AlexWilson - 2008-04-10 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 Thumb Image: www.mysite.com/script.php?file=zen/cache/discs/disc1.jpg 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. Remove suffix from thumbnails - grassyKnollTapDance - 2008-04-10 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. Remove suffix from thumbnails - sbillard - 2008-04-10 You should take a look at the Effervescence+ theme. It uses simpleviewer as one of its personalities. It does not have any issues with thumbnails--simpleviewer creates them itself. Remove suffix from thumbnails - grassyKnollTapDance - 2008-04-11 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]getZenThumb.php?fn=zen/cache/products/IMG_9196.jpg[/img]` -getZenThumb.php- 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) Remove suffix from thumbnails - trisweb - 2008-04-11 Should be http://www.zenphoto.org/zp/theme/ , not zenphoto.org/themes... not sure where you got that URL. Remove suffix from thumbnails - grassyKnollTapDance - 2008-04-11 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. Remove suffix from thumbnails - sbillard - 2008-04-11 That link would be to one of the thumbnails for the theme descriptions. Remove suffix from thumbnails - acrylian - 2008-04-11 zenphoto.org/themes was the old link before we did the new site. |