ZenphotoCMS Forum
Copyright on image page - 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: Copyright on image page (/thread-9801.html)



Copyright on image page - SubJunk - 2012-03-25

There's the copyright field for images in the admin panel, but I don't see a way to access it on the image pages so it displays.
Can we have something like getImageCopyright() or getCopyright() accessible from theme/image.php?




Copyright on image page - sbillard - 2012-03-26

How about the image object methog getCopyright()?




Copyright on image page - SubJunk - 2012-03-26

When I call getCopyright from image.php it's not recognised:

Call to undefined function getCopyright() in image.php




Copyright on image page - kagutsuchi - 2012-03-26

Just to clarify, as sbillard said, the getCopyright() method belongs to the _Image class. Are you calling it from an instantiated image object?




Copyright on image page - sbillard - 2012-03-26

What kagutschi means is that you must use the object model to get this field. If you are on the image page the $_zp_current_image->getCopyright().




Copyright on image page - SubJunk - 2012-03-26

Sorry for the late reply I was sleeping, yes using it like that works, thanks

Maybe it should be possible to call getImageCopyright() in future versions, since most of those functions are already accessible on the image page (getImageDesc, getImageLocation, etc.)




Copyright on image page - sbillard - 2012-03-27

There is really no need--in fact probably the reverse should be done, all the bare "get" type functions should be deprecated and the object model used instead. That would reduce considerably the size of the template functions script at no loss of function.