Inline attachments

This commit is contained in:
Ice
2008-08-09 12:00:26 +00:00
parent adac90fb3d
commit 85c15f137b

View File

@@ -249,6 +249,20 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
$row['username'] = '<b style="color:#' . $row['user_colour'] . '">' . $row['username'] . '</b>';
}
// Pull attachment data
$sql2 = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE `post_msg_id` = '. $row['post_id'] .'
AND in_message = 0';
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2))
{
$attachments[] = $row2;
}
$db->sql_freeresult($result2);
$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
$len_check = $row['post_text'];
$maxlen = $text_length;
@@ -273,6 +287,10 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
{
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
}
if (!empty($attachments))
{
parse_attachments($row['forum_id'], $message, $attachments, $update_count);
}
$message = smiley_text($message); // Always process smilies after parsing bbcodes
if( $global_f < 1 )