Not Solved quick reply and hooks
#1
Not Solved
I made plugin that replace all "a" with "b" before saving post.

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

function test_info()
{
	return array(
		"name"			=> "test",
		"description"	=> "test",
		"author"		=> "test",
		"version"		=> "1.0",
		"guid" 			=> "",
		"compatibility" => "*"
	);
}

function test($post)
{
	$post->data['message'] = str_replace('a', 'b', $post->data['message']);
}

It works good except quick reply - you need to reload after quick reply to see results.
Why quick reply is not affected by this hook? Isn't it has all post validations? What hook should I use to change quick reply?
Reply
#2
Not Solved
Quick reply runs differently. You'll need to use a different hook.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)