![]() |
|
Watermark on Full Size Image - 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: Watermark on Full Size Image (/thread-1805.html) |
Watermark on Full Size Image - timo - 2007-11-12 I love the new zenphoto 1.1(.2) and am very excited about having all of the features I've gone though on my own and hacked together work out of the box. However, one thing I had going before I upgraded was image watermarking. This is a feature now officially supported, but it falls short at a critical spot. When you click to download the full size image, that has no watermark. I solved this before by changing getFullImageURL() to getWateredFullImageURL() on the image page, this new function I wrote into template-functions.php. This takes you to a new page I made, a simple php script to on the fly return the image with a watermark. This is a good way to consistently watermark your images, although it has it's downsides (broken after every upgrade). I think something to achieve the same means should to be included in the standard release. This is full.php and it is put in my theme folder:
function getWateredFullImageURL() { global $_zp_current_image; $hi = "/gallery/page/full/?a=" . $_zp_current_image->getAlbumName() . "&i=" . $_zp_current_image->getFileName(); return $hi; } ` Watermark on Full Size Image - marrs - 2007-11-12 Thanks timo Watermark on Full Size Image - aitf311 - 2007-11-12 Awesome work timo! Watermark on Full Size Image - timo - 2007-11-12 A couple things need to be done for it to be viable: I would love to spend a couple of days working the kinks out of it and learning mod_rewrite but I'm an overbooked high school senior. Watermark on Full Size Image - sbillard - 2007-11-12 timo: I thought seniors just had to ditch classes to get more time . Anyway, if you do get some time to work this out, we'd be glad to add it to ZP! Watermark on Full Size Image - aitf311 - 2007-11-20 timo: would you mind adding this to the zenphoto hacks page? http://www.zenphoto.org/trac/wiki/ZenphotoHacks We are getting ready to have a much better addons section and it would be great if it could be featured. Also, to use this in your theme and not have to modify template-functions you could put the function at the top of your themes page or make a customfunctions.php page and include it in your theme page Watermark on Full Size Image - timo - 2007-12-13 Someone emailed me asking for some further clarification of this hack. For this script to work one needs to fix the hard links to fit your setup. When the php code says I forgot to update my improved script I made a few weeks ago, all you have to do is add Watermark on Full Size Image - sbillard - 2007-12-13 timo: Some suggestions. if you change the url to something like These things would go miles to making your functions more easily used by zp theme makers. Watermark on Full Size Image - sbillard - 2007-12-15 This feature will be available in the 1.1.3 release due out soon. Themes will have to use the new function BTW, this change also supports password protected albums. If you haven't logged into the album, you won't be able to view the image. Watermark on Full Size Image - timo - 2007-12-15 Sbillard: That's awesome, I'm glad it's being worked into the standard release. I'm sorry I couldn't help with it, perhaps after all my college apps are done in February I'll have time to help develop. Also, I was looking through google but never found a good answer: is there a way to preserve the exif data from the original photo when the watermark is added? That may be something to look into, although it's not too important.. Watermark on Full Size Image - sbillard - 2007-12-16 timo: You were a great help. It was your idea and basic design that was incorporated. As for the EXIF data, I don't know. Maybe if we move to a different graphics library. You could put a new feature ticket into trac so we will remember if we do make the move. |