MyBB Community Forums

Full Version: How to get value of textarea in newreply?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I'm writting a little plugin and I need to get value form textarea when user click 'Reply' button in post footer and mybb redirect him to new page with text editor.

Can you tell me what hook and variable I have to use?
Which textarea? The quick reply one? There is no reply button.
Please can you elaborate identifying which textarea and which reply button you are talking about?
(2019-06-24, 03:36 PM)effone Wrote: [ -> ]Which textarea? The quick reply one? There is no reply button.
Please can you elaborate identifying which textarea and which reply button you are talking about?

I meant this button: https://i.ibb.co/NxCqJXr/s1.png
And this value from this textarea: https://i.ibb.co/RQjdcV0/s2.png
variable to do what?
(2019-06-24, 04:21 PM)Ashley1 Wrote: [ -> ]variable to do what?

I need modify part of text and return changed
And you want to know what hook to use? Guess you would hook your function into the postbit hook. As for variable, don't know, $post['pid'] somewhere along the line ...
(2019-06-24, 01:20 PM)Lord Fenrir Wrote: [ -> ]Hi, I'm writting a little plugin and I need to get value form textarea when user click 'Reply' button in post footer and mybb redirect him to new page with text editor.

Can you tell me what hook and variable I have to use?
Probably what you are looking for is parse_quoted_message hook:
$plugins->add_hook('parse_quoted_message', 'myplugin_parse_quoted_message');

function myplugin_parse_quoted_message(&$quoted_post)
{
 $quoted_post['message'];
 $quoted_post['username'];
}

Keep in mind that this will hook every quote in the forum (pms for example) and multiquote too.