<?php
// If we have incoming search terms to highlight - get it done.
if($mybb->input['highlight'])
{
$parser_options['highlight'] = $mybb->input['highlight'];
$post['subject'] = $parser->highlight_message($post['subject'], $parser_options['highlight']);
}
if($GLOBALS['thread']['tid'] && $post['pid'] && $GLOBALS['thread']['firstpost'] == $post['pid'])
{
$post['message'] = str_replace('{URL}', $GLOBALS['settings']['bburl'].'/'.get_thread_url($GLOBALS['thread']['tid']), $post['message']);
$post['message'] = str_replace('{TITLE}', $parser->parse_badwords($post['subject']), $post['message']);
}
$post['message'] = $parser->parse_message($post['message'], $parser_options);
get_post_attachments($id, $post);