MyBB Community Forums

Full Version: Is there any hook for Quick Edit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently using a plugin which prevents users who haven't made up to a given number of posts from posting links.
So far, it works for new threads and new replies but spammers still find a way around by first posting without links then using Quick Edit to add links
The plugin uses two hooks
datahandler_post_validate_post
datahandler_post_validate_thread

Is there a hook to make this plugin also work for quick edit?
Quick edit should also use datahandler_post_validate_post: https://github.com/mybb/mybb/blob/380cfb...p.php#L540 - validate_post runs the hook here: https://github.com/mybb/mybb/blob/380cfb...t.php#L811
(2017-10-09, 06:06 PM)Euan T Wrote: [ -> ]Quick edit should also use datahandler_post_validate_post: https://github.com/mybb/mybb/blob/380cfb...p.php#L540 - validate_post runs the hook here: https://github.com/mybb/mybb/blob/380cfb...t.php#L811

Thanks a lot for the prompt response. Well, Quick Edit doesn't seem to be affected by this hook at all.
Here's the plugin @ https://community.mybb.com/attachment.php?aid=25258
What info / access would you need to help debug this please?
I'll need to test it out and see what's happening. I'll try and do so tomorrow and get back to you Smile
(2017-10-10, 04:34 PM)Euan T Wrote: [ -> ]I'll need to test it out and see what's happening. I'll try and do so tomorrow and get back to you Smile

Great. Thanks a great deal
Did you set a value for "Restricted_Forums" setting? Quick edit does not expose the $fid variable, and the plugin checks it against the aforementioned setting if it contains a value. Removing it (thus allowing the plugin to work in every forum) should work as a temporary patch, but the plugin should be updated to use a "broad-spectrum" forum id variable.
(2017-10-10, 04:34 PM)Euan T Wrote: [ -> ]I'll need to test it out and see what's happening. I'll try and do so tomorrow and get back to you Smile

(2017-10-11, 11:38 AM)Shade Wrote: [ -> ]Did you set a value for "Restricted_Forums" setting? Quick edit does not expose the $fid variable, and the plugin checks it against the aforementioned setting if it contains a value. Removing it (thus allowing the plugin to work in every forum) should work as a temporary patch, but the plugin should be updated to use a "broad-spectrum" forum id variable.

Thanks a million guys. Clearing the Restricted Forums setting did the trick.
You guys are the best. Keep up the good work @MYBB