datahandler_post_validate_thread hook not working!
#1
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";

}
Reply
#2
add_hook($hook_name, $function_name);

Your function should be named "test"

The following is a valid hook

$plugins->add_hook("datahandler_post_validate_thread", "test");

function test() {
    // code here
}

Although I hope you won't use "test" as a function name Big Grin
Rasmus Lerdorf Wrote:If eval() is the answer, you're almost certainly asking the wrong question. - Rasmus Lerdorf
Reply
#3
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)