hoangserip
10-20-2011, 02:49 AM
I found the problem. How not to make a change here, Do you need help?
link mod: https://vborg.vbsupport.ru/showthread.php?t=194832
hook name : showthread_query
if ($forum['showfirstpost'])
{
$ids[] = $thread[firstpostid];
$postids = "post.postid IN (0" . implode(',', $ids) . ")";
if ($thread['hasattach'])
{
$attachments = $db->query_read("
SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter,
postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize,
attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow
FROM " . TABLE_PREFIX . "attachment
LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype USING (extension)
WHERE postid IN (-1" . $ids . ")
ORDER BY attachmentid
$ids) . ")";)
$postattach = array();
while ($attachment = $db->fetch_array($attachments))
{
if (!$attachment['build_thumbnail'])
{
$attachment['hasthumbnail'] = false;
}
$postattach["$attachment[postid]"]["$attachment[attachmentid]"] = $attachment;
}
// Restore
$thread['attach'] = $thread['hasattach'];
unset($thread['hasattach']);
}
}
link mod: https://vborg.vbsupport.ru/showthread.php?t=194832
hook name : showthread_query
if ($forum['showfirstpost'])
{
$ids[] = $thread[firstpostid];
$postids = "post.postid IN (0" . implode(',', $ids) . ")";
if ($thread['hasattach'])
{
$attachments = $db->query_read("
SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter,
postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize,
attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow
FROM " . TABLE_PREFIX . "attachment
LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype USING (extension)
WHERE postid IN (-1" . $ids . ")
ORDER BY attachmentid
$ids) . ")";)
$postattach = array();
while ($attachment = $db->fetch_array($attachments))
{
if (!$attachment['build_thumbnail'])
{
$attachment['hasthumbnail'] = false;
}
$postattach["$attachment[postid]"]["$attachment[attachmentid]"] = $attachment;
}
// Restore
$thread['attach'] = $thread['hasattach'];
unset($thread['hasattach']);
}
}