![]() |
|
Edit in Place and Context - 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: Edit in Place and Context (/thread-6400.html) |
Edit in Place and Context - gjr - 2010-01-07 Hi, I am trying to be able to edit image fields using frontend edit-in-place while in ZP_ALBUM context because I am working on a project that may not need the image.php file. How hard would this be - any tips? I get the following error when trying to edit an image field in album context: So I think I understand the error in that it is trying to set image fields but the object is the current album. Since there are many images in play in album context, would it be even possible to edit in place across multiple images? Edit in Place and Context - acrylian - 2010-01-07 How is that page setup? You will probably have to setup the global Edit in Place and Context - sbillard - 2010-01-07 The If you looked at the referenced line in functions-controller.php you would discover you are in the function that handles edit in place (the front end editing.) In particular, the Edit in Place and Context - swidnikk - 2011-04-28 I'm having the exact same issue. Seems that this should work according to comments near functions-controller.php->editInPlace_handle_request:210 I'd like to be able to edit tags from album.php. You're right its not an object... $_zp_current_image doesn't appear to be an object in the context of an album. Is there a way to get an image object from a text property? So that we can enable edit in place on the album.php page? Here's a thread of what's going on, but might be hard to follow. I've added the following from Image.php to Album.php This becomes editable tags when logged in as the admin user and front end editing is enabled. The PHP prints out the following (which looks the same as the code in Image.php) The JS function editInPlace is from jquery.editinplace.js:349 and looks like This eventually reaches There is a comment on this page which says, if ( !in_context(ZP_IMAGE) && !in_context(ZP_ALBUM) && !in_context(ZP_ZENPAGE_PAGE) && !in_context(ZP_ZENPAGE_NEWS_ARTICLE)) So, I'm in the Album context but I want an image to be edited. The next few lines will see that the context is passed in correctly as image but $_zp_current_image must be incorrect since I'm on an album page with many many images. I guess the image to be edited needs to be passed down to this function somehow or $_zp_current_image needs to be set by looking at the java script. Edit in Place and Context - sbillard - 2011-04-28 Sorry, but the ajax editing is not setup to do what you wish. When the inline editing is actually being processed your theme script has not yet been loaded, so nothing it does has any impact on this editing. The only thing provided for is for editing fields of the object associated with the page. I should note as well that this is an area we will not be enhancing. The simple reason for this is that this inline editing is vulnearble to Cross Site Reference Forgery attacks. We consider the front-end editing feature not secure and really do discourage its use. |