Member
Member
usartdude   2013-07-09, 22:38
#1

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:

true false

i am getting an error that says: Call to undefined function getImagePublish()

what am I doing wrong?

Member
Member
sbillard   2013-07-10, 00:04
#2

Don't know where to start. I guess you have not read the themeing guide nor the information about the zenphoto object model.

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.

Member
Member
usartdude   2013-07-10, 00:20
#3

I have read both, but i don't have a good understanding of object orientation, so a lot of the information goes over my head.

thanks for pointing me in the right direction. I was able to get the result i wanted by changing it to:

true false

Administrator
Administrator
acrylian   2013-07-10, 09:14
#4

The flag_thumbnail plugin has an option to add an icon or text note to mark unpublished images, too. It uses a filter so no need to change the theme.

However, it does that only on the thumbnails, not on the image page itself.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.