MyBB Community Forums

Full Version: Have hooks changed?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I changed the compatibility of the Tagging Plugin to 18* 

There is a hook added for "postbit"
$plugins->add_hook("postbit", "tagging_show_post");

The function for that is:
function tagging_show_post($post)
{
	$post['message'] = tagging_parse($post['message'], $post['tags']);
	return $post;
}

If I change that to: 
function tagging_show_post($post)
{
	//$post['message'] = tagging_parse($post['message'], $post['tags']);
	$post['message'] = "test";
	return $post;
}

It will still be normal. Even if I add a die() or something to that function, it will still be normal.
Be more specific, what does "normal" mean? The same as old? Do you use any other plugins that modify the post message?
well, that plugin was coded before release of MyBB 1.6.5 and plugin system changed a bit since MyBB 1.6.5

Plugin Changes coming in 1.6.5
You should pass $post by reference. You also will not need to use the keyword return.
as @dragonexpert says you should change post to pass by reference this have changed since MyBB 1.6.5 series like another changes on plugins to make it work.