Watermark not show for login user

Hello, i have ask about watermark.
I want watermark not show for logged user.
I try this, but image not show.
<div class="image-unit">
<?php
if(zp_loggedin()) {
#show album thum, without watermark
?>
" title="<?php printBareAlbumTitle();?>">
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes', null, null);
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>

<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),120,'...'); ?></p>
<?php
}else{
?>
" title="<?php printBareAlbumTitle();?>">
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>

<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),120,'...'); ?></p>
<?php
}
?>
</div>

Comments

  • acrylian Administrator, Developer
    First, please escape code properly using `backticks` as it otherwise displays crippled.

    First, you are using the standard functions a bit off. If you want to use the default options don't use `printCustomSizeXXX` functions. Those are for custom sizes not using the options. For image functions using the default options use the `default` image functions.

    Your custom size functions don't show the watermark because you disabled by setting `null` on the related parameter:
    http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintCustomSizedImage
  • Hi acrylan, tks for your answer.
    I was correct my code for there is example for showing image:
    `printCustomSizedImage(getBareImageTitle(),NULL,552,370,765,518,10,10,NULL,NULL,TRUE);`

    But, watermark show to in user loggedin, i want watermark remove for user logged in.
  • acrylian Administrator, Developer
    Then you have to call the functions differently.

    `
    if(zp_loggedin()) {

    } else {

    }
    `
  • Dear Acrylian, oke thanks i has done about that problem.

    But i want create download album, without watermark when user loggedin, but image will watermark when not user loggedin.

    i was use this `<?php printAlbumZip();?>` but watermark not shown for user not loggedin.

    Can you describe to me about that logic.
  • acrylian Administrator, Developer
    That is not possible to differ with that function. Btw the function is deprecated, you should use `printDownloadAlbumZipURL` from the downloadlist plugin instead.

    You could try to use the AlbumZip class of the plugin directly:
    http://www.zenphoto.org/documentation/plugins/misc/AlbumZip.html

    But in any case you can only switch between cached (sized) images or the full images.
Sign In or Register to comment.