Hey
I am using the recentattachment.php in my vbadvance. But what I need, is it to show only the attachments from one forum..
How can I put that in the code.. ?
I am using the recentattachment.php in my vbadvance. But what I need, is it to show only the attachments from one forum..
How can I put that in the code.. ?
PHP:
$query_attachments = $vbulletin->db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "attachment
WHERE visible = 1 AND thumbnail_filesize > 0 AND dateline < " . TIME() ." ORDER BY dateline DESC LIMIT 4");
while ($attachment = $db->fetch_array($query_attachments))
{
$newattachment['attachment'] .= '<div><img class="inlineimg" src="' . $vbulletin->options['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $attachment['attachmentid'] . '"width="150" height="92"><a href="' . $vbulletin->options['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $attachment['attachmentid'] . '" target="_blank"></div><div>' . $attachment['filename'] . '</a></div><div><a href="' . $vbulletin->options['bburl'] . '/showthread.php?' . $session['sessionurl'] . 'postid=' . $attachment['postid'] . '" target="_blank">' . construct_phrase($vbphrase['view_post']) . '</a></div><br>';
eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_newattachments') . '";');
}
?>