2021-03-19, 09:37 PM
In the
parse_message_start
hook you need to check if it is running for a post, something around the sort of the following code:function lkt_hookin__parse_message_start($message) {
global $g_lkt_previews, $g_lkt_links, $mybb, $post;
if (!isset($post['pid']) || !(THIS_SCRIPT == 'showthread.php'
||
THIS_SCRIPT == 'xmlhttp.php' && $mybb->input['action'] === 'edit_post' && $mybb->input['do'] == 'update_post'
||
THIS_SCRIPT == 'newreply.php' && $mybb->input['action'] == 'do_newreply' && $mybb->request_method == 'post'
)
) {
return $message;
}