MyBB Community Forums

Full Version: Quick Edit Hook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Are there any hooks that work when the quick edit is used because "editpost_do_editpost_start" and "editpost_end" work fine in a full edit, but don't seem to work at all with a quick edit.
The code is in xmlhttp.php, it currently has no plugin hooks - you might want to add in an suggestion if you want this.
If you don't just wanna manipulate the value that's sent to the database that is. Then you can use the datahandler plugin hooks.
datahandler_post_update_thread and datahandler_post_update for edits.
Hmm. I need to manipulate the (message) data coming from the database to the edit form, and then manipulate the (message) data after it's edited and before it gets stored back in the database.

Am, I to understand then that this can't be done with the quick edit form?
MrDoom Wrote:Hmm. I need to manipulate the (message) data coming from the database to the edit form, and then manipulate the (message) data after it's edited and before it gets stored back in the database.
Ok, here's an update on this. I managed to get the second part working by using "datahandler_post_update" and the variable "$this->post_update_data['message']" to update the information going back into the database. The only issue with it is it works like the Updated message on quick edit posts in that the changes only show up after a full refresh of the page.

I am still unable to find a way to manipulate the message data as it goes into the quick edit form. Am I to understand that this is the part which CraKteR said couldn't be done? Because:
CraKteR Wrote:If you don't just wanna manipulate the value that's sent to the database that is.
Made it sound like I would be unable to do the second part of what I wanted, and not the first.

Any info on this is appreciated. Thanks.
MrDoom Wrote:I am still unable to find a way to manipulate the message data as it goes into the quick edit form. Am I to understand that this is the part which CraKteR said couldn't be done? Because:
CraKteR Wrote:If you don't just wanna manipulate the value that's sent to the database that is.
Made it sound like I would be unable to do the second part of what I wanted, and not the first.

Any info on this is appreciated. Thanks.

You can - depending on how you would like it to be manipulated.
inline_edit.js - you can edit this file if you know js.
Under this function.
showTextbox: function()