Hi there,
first of all: Great gallery system. I tried several systems, and was an user of another system for a long time, but at least Zenphoto fits my needs perfectly! So thanks for this!
But here is my problem: I want to watermark all of my images, this works, but i dont want to give access by replacing
`
http://example.com/albumname/image.jpg.htm?p=*full-image`with
`
http://example.com/albums/albumname/image.jpg`Therefore i created an .htaccess file with a very simple rule
`Order Deny,Allow
Deny from all
Allow from 127.0.0.1`
which works perfect, but there is a problem while using images lower sized than the max image size setting (Options -> image display -> Image size). By whatever it does, it does not create a cached version (including the watermark already) of this image, and therefore i get a "403 - forbidden", because, it wants to use the actual image as preview.
The according part of my skin for the images previews is
`<?php printDefaultSizedImage(getImageTitle(), 'imagepreview'); ?>`
My question is: What do i have to change, that the system will ALWAYS generate a cached version, and NEVER delivers the actual image?
Comments
in i.php you will find some code
` // If the requested image is the same size or larger than the original, redirect to it.
if (!$upscale && $newh >= $h && $neww >= $w && !$crop) {
header("Location: " . getAlbumFolder(FULLWEBPATH) . pathurlencode($album) . "/" . rawurlencode($image));
return;
}`
I believe that if you just delete this you will get the image cached/watermarked. However, it may also get resized. I will look more into this.
Perhaps you should keep the if statement and replace the `header` and `return` with `$newh = $h; $neww=$w;`
If i just remove its contents and replace it with `$newh = $h; $neww=$w;`, it works like charm!
Thanks. Maybe you could make it an option in the next final version?
Btw: Is there a reason, i dont understand, that the watermark is in the bottom right corner (0,0 from bottom right) at the preview image, and at the botom right corner _plus_a_few_pixels_ (20,20 from bottom right) in the full image?
in real i'd be happy with a consistent positioning in the full image and the preview, somewhat around 10 pixels padding (because the 10 pixels are fit to my design *g*)
And, the positioning will be the same for full image.