2012-06-19, 08:38 AM
No, still doesn't work. I've no other plugins installed so conflict shouldn't be an issue.
Datahahandler Issue
|
2012-06-19, 08:38 AM
No, still doesn't work. I've no other plugins installed so conflict shouldn't be an issue.
2012-06-19, 09:05 AM
I can't help but think that you're mixing your hooks. You're using validate_thread but looking for $post['message'], which is only available in the validate_post hook.
Consider this version instead:
Try this;
It should work. Make sure you add correct forum id in;
--- Edit: I've not seen Tomm M's code. I checked and tested mien and it works.
2012-06-19, 09:14 AM
Yaldaram; yours will work because $mybb->input['message'] is always less than 50 characters - $mybb needs to be added to the global declaration.
2012-06-19, 09:17 AM
You're correct Tom Moore. Amazingly I forgot to add global object
2012-06-19, 09:20 AM
Oh, and regardless, is_validated is always set to true after your plugin function has finished as it is modified after the plugin hook in the datahandler. It is a marker to say the post/thread has ran through the validate function.
2012-06-19, 09:38 AM
Tried Tomm M's example, works perfectly. That was a little more complicated than was expected. Thank you to everyone in this thread who helped, +1.
2012-06-19, 03:29 PM
sorry I missed the $data = $handler->data; bit.
your original code would have worked has it used $mess = $handler->data['message']; instead of $post
Lost interest, sold my sites, will browse here once in a while. It's been fun.
2012-06-19, 05:58 PM
2014-01-09, 06:09 PM
Guys how to add a hook to validate editpost.php
|
« Next Oldest | Next Newest »
|