ZenphotoCMS Forum
Show who uploaded image - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Show who uploaded image (/thread-12088.html)



Show who uploaded image - Oldemar - 12-01-2015

Is there a function to put in the template to show the username of who uploaded the current image?




Show who uploaded image - acrylian - 12-01-2015

Not directly a template function but you can get it via the object model methods:
echo $_zp_current_image->getOwner().

Works of course this way only in context, e.g. on image.php or within the next_image() loop (album.php/search.php).




Show who uploaded image - Oldemar - 12-01-2015

Thanks, but is there a way to make it not show the user's email? I tried to uncheck Email ID, but that didnt help.




Show who uploaded image - acrylian - 12-01-2015

The method getOwner() gets the user id name as it is set on the item, image in this case. If that is the mail address for some reason that is displayed.

If you want to display something else from the user account like the real name you will have to do some coding via the object model using the adminstrator class: http://www.zenphoto.org/documentation/classes/Zenphoto_Administrator.html




Show who uploaded image - Oldemar - 12-01-2015

Thank you. It works fine for new users after I changed my settings.