Member
Member
grassyKnollTapDance   10-04-2008, 12:58
#1

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

Member
Member
sbillard   10-04-2008, 16:43
#2

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.

Member
Member
grassyKnollTapDance   10-04-2008, 17:01
#3

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...

Developer
Developer
trisweb   10-04-2008, 18:16
#4

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?

Member
Member
AlexWilson   10-04-2008, 19:29
#5

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.

Member
Member
grassyKnollTapDance   10-04-2008, 22:50
#6

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.

Member
Member
sbillard   10-04-2008, 23:16
#7

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.

Member
Member
grassyKnollTapDance   11-04-2008, 08:19
#8

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)

Developer
Developer
trisweb   11-04-2008, 09:11
#9

Should be http://www.zenphoto.org/zp/theme/ , not zenphoto.org/themes... not sure where you got that URL.

Member
Member
grassyKnollTapDance   11-04-2008, 11:39
#10

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.

Member
Member
sbillard   11-04-2008, 17:49
#11

That link would be to one of the thumbnails for the theme descriptions.

Administrator
Administrator
acrylian   11-04-2008, 18:11
#12

zenphoto.org/themes was the old link before we did the new site.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.