datahandler_post_validate_thread hook not working! - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Development (https://community.mybb.com/forum-68.html) +---- Thread: datahandler_post_validate_thread hook not working! (/thread-158340.html) |
datahandler_post_validate_thread hook not working! - marcus123 - 2014-08-31 I have a hook to: $plugins->add_hook("datahandler_post_validate_thread", "test"); Want function only affect new threads but nothing is happening??? $post->data['subject'] $post->data['message'] function allowed_charecters(&$post) { global $mybb; if($post->data['subject'] > $test) { echo "works"; } RE: datahandler_post_validate_thread hook not working! - TheGarfield - 2014-08-31 add_hook($hook_name, $function_name); Your function should be named "test" The following is a valid hook
Although I hope you won't use "test" as a function name RE: datahandler_post_validate_thread hook not working! - marcus123 - 2014-08-31 Thanks buddy! Sorry it is named right just failed to post it here. How would you do this?? If new thread or you edit first post check title but dont check if it's a reply? How to get postcounter? |