![]() |
|
Adding username in desc during upload automatical - 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: Adding username in desc during upload automatical (/thread-4401.html) |
Adding username in desc during upload automatical - silencer54 - 2009-01-06 Hi, i'm looking for a feature (or hack) for the upload of images in the adminarea: Is this possible or is there a feature? Adding username in desc during upload automatical - sbillard - 2009-01-08 The current implementaion of zenphoto does not record who uploaded an image, so I am sorry byt what you want is not available. Adding username in desc during upload automatical - silencer54 - 2009-01-08 Hi sbillard, can you give me a hint how to customize the current implementation. Adding username in desc during upload automatical - silencer54 - 2009-01-08 Here is a little hack which adds the username in the desc filed in database zp_images semiautomaticaly after upload: First for single uploaded images put $image->setDesc($_zp_current_admin['name']); in admin-upload.php line 71 after $image->setTitle($name); For zip upload the desc field is only filled but no direct database insert. This hack only works if the user got permisson to edit. Adding username in desc during upload automatical - sbillard - 2009-01-08 You may wish to check out the nightly build [3247] from tonight. Your thoughts sparked a new filter--applied when albums/images are created. The example plugin Note, for ZIP files this requires that PHP have ZZIPlib configured since I did not want to figure out how to modify the lib-pclzip.php to create the image objects as it created the image files. You can, of course, make a modification of this plugin to change other fields as well. Adding username in desc during upload automatical - silencer54 - 2009-01-09 Thanks for the filter it works great. The new nightly build fixed a problem in the admin/edit area for me, too. Adding username in desc during upload automatical - sbillard - 2009-01-10 Good to know. We have finally got rid of scriptaculous and prototype in favor of using only jQuery. This has fixed a few javascript conflicts. Adding username in desc during upload automatical - ozh - 2009-01-12 sbillard: line 149 on class-image.php cannot just be It should be, instead, something like: Then, the plugin would be something along the lines of: function add_admin_to_desc($obj) { Adding username in desc during upload automatical - sbillard - 2009-01-12 Sorry, but it works. Why do you think it does not? |