I'm trying to make a signal for my image.php page so when i am in the page as admin, it alerts me that the image is unpublished.
I thought some kind of if-then like this would work:
<?php if(getImagePublish(true)) {
?>true <?php
}else{ ?> false <?php
}; ?>
i am getting an error that says: Call to undefined function getImagePublish()
what am I doing wrong?
Comments
There is no such functon `getImagePublish()` There is a method of the gallery class by that name, but it must be invoked as a method of a object of class gallery. Even then, it will not give you the information you wish--it returns the default "publish" option for images.
What you want is the `getShow()` method of the image object.
thanks for pointing me in the right direction. I was able to get the result i wanted by changing it to:
<?php if ($_zp_current_image->getShow()) {
?>true <?php
}else{ ?> false <?php
}; ?>
However, it does that only on the thumbnails, not on the image page itself.