![]() |
|
Disable watermarks for logged-in users - 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: Disable watermarks for logged-in users (/thread-11939.html) |
Disable watermarks for logged-in users - klikini - 2014-08-04 I would only like to show watermarks to guests (anyone that isn't logged in) but let logged-in users see and download watermark-free images. Seeing the watermark on the image page but downloading it without one would be fine too. Is there an option for this? Disable watermarks for logged-in users - sbillard - 2014-08-04 To do this you will have to have your theme use different function calls for logged-in users versus the general public since the watermark is permanent in the cached image. You can use `printCustomSizedImage()` to show the image with or without the watermark--that is a parameter to the function. Disable watermarks for logged-in users - klikini - 2014-08-04 I'm using the default theme, dark. How would I implement this, and is there a doc page for the function? Disable watermarks for logged-in users - acrylian - 2014-08-04 There is: http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintCustomSizedImage Disable watermarks for logged-in users - klikini - 2014-08-04 Okay so now I have it displaying images without a watermark, but they are very large. What is the format of the "size" parameter? I tried `$size = 595` assuming it was the width in pixels, but it didn't work. Disable watermarks for logged-in users - acrylian - 2014-08-04 "Size" is in pixel. If it is the width or height depends on your image option settings regarding "longest side". If it didn't work you maybe did not set the parameters correctly. http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide Disable watermarks for logged-in users - klikini - 2014-08-04 Okay, the size works now, but the watermark show up now too. What do I need to put in the `$effects` parameter to hide it? Disable watermarks for logged-in users - acrylian - 2014-08-04 `$thumbStandin` is the one and must be set to false. That means the image is treatened as a "thumb" and the only difference between a thumb and a sized image is that thumbs don't have watermarks. Disable watermarks for logged-in users - klikini - 2014-08-04 That works! Now how can I also hide it for logged in users on the full image page? `full-image.php` isn't there. Disable watermarks for logged-in users - acrylian - 2014-08-04 There is no full-image page on theme level and it is only used for protected images. Use the image functions for it. http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetUnprotectedImageURL http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetProtectedImageURL Add a check using `if(zp_loggedin()) { … } else { … }` Disable watermarks for logged-in users - klikini - 2014-08-04 It works perfectly now! I have it set up so that logged in users see and download (no more full-image.php... I have so it downloads directly) a watermark-free image while guests see and download a watermarked image. Thank you! Disable watermarks for logged-in users - klikini - 2014-08-05 Hah! It was messed up by the `` |