Member
Member
kankburhan   2015-10-30, 07:39
#1
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
?>
<a>" 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');
} ?>
</a>
<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),120,'...'); ?></p>
<?php
}else{
?>
<a>" 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');
} ?>
</a>
<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),120,'...'); ?></p>
<?php
}
?>
</div>
Administrator
Administrator
acrylian   2015-10-30, 09:59
#2
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
Member
Member
kankburhan   2015-11-02, 04:20
#3
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.
Administrator
Administrator
acrylian   2015-11-02, 09:54
#4
Then you have to call the functions differently.

`
if(zp_loggedin()) {
<with watermark>
} else {
<without watermark>
}
`
Member
Member
kankburhan   2015-11-03, 07:37
#5
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.
Administrator
Administrator
acrylian   2015-11-03, 09:46
#6
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.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.