Try this:
PHP Code:
if ($_REQUEST['type'] == 'MEDIA')
{ // check for attachments
$attachments = $DB_site->query("
SELECT attachment.filename, attachment.filesize, attachment.attachmentid, attachment.postid
FROM " . TABLE_PREFIX . "attachment
LEFT JOIN " . TABLE_PREFIX . "post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "thread ON (post.threadid = thread.threadid)
WHERE post.postid = thread.firstpostid
ORDER BY thread.dateline DESC
LIMIT 15
");
while ($attachment = $DB_site->fetch_array($attachments))
{
echo "\t\t<enclosure url=\"" .htmlspecialchars("$vboptions[bburl]/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&filename=$attachment[filename]") . "\" length=\"$attachment[filesize]\" type=\"audio/mpeg\" />\r\n";
}
}
After spending an hour over IRC, we finally got it to work correctly.
Link for mod!