How to get value of textarea in newreply?
#1
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?
Reply
#2
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?
[Image: logo.svg.svg]
Reply
#3
(06-24-2019, 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
Reply
#4
variable to do what?
What goes around comes around
Reply
#5
(06-24-2019, 04:21 PM)Ashley1 Wrote: variable to do what?

I need modify part of text and return changed
Reply
#6
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 ...
What goes around comes around
Reply
#7
(06-24-2019, 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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)