diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 9e37d7961c..2d1daa21ba 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1078,6 +1078,22 @@ for($i = 0; $i < $total_posts; $i++) } $message = make_clickable($message); + // + // Parse smilies + // + if ( $board_config['allow_smilies'] ) + { + if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' ) + { + $user_sig = smilies_pass($user_sig); + } + + if ( $postrow[$i]['enable_smilies'] ) + { + $message = smilies_pass($message); + } + } + // // Highlight active words (primarily for search) // @@ -1103,22 +1119,6 @@ for($i = 0; $i < $total_posts; $i++) $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1)); } - // - // Parse smilies - // - if ( $board_config['allow_smilies'] ) - { - if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' ) - { - $user_sig = smilies_pass($user_sig); - } - - if ( $postrow[$i]['enable_smilies'] ) - { - $message = smilies_pass($message); - } - } - // // Replace newlines (we use this rather than nl2br because // till recently it wasn't XHTML compliant)