Was hoping to get this working in 3.0.1 :ermm:
Got stuck with this :-
# Code modifications in file "attachment.php"
search for this code:
Code:
if (!$attachmentinfo = $DB_site->query_first("
SELECT filename, filesize, postid, attachment.userid,
" . iif(!$vboptions['attachfile'] AND !$thumb, 'filedata,') . "
" . iif($thumb, 'thumbnail, thumbnail_dateline AS dateline,', 'dateline,') . "
visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
WHERE attachmentid = $attachmentid
"))
Here's the nearest I could find in attachment.php
Code:
if (!$attachmentinfo = $DB_site->query_first("
SELECT filename, attachment.postid, attachment.userid, attachmentid,
" . iif($thumb, 'thumbnail AS filedata, thumbnail_dateline AS dateline, thumbnail_filesize AS filesize,', 'attachment.dateline, filedata, filesize,') . "
attachment.visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted,
thread.forumid, forum.password, thread.threadid
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
" . iif($postid, "WHERE attachment.postid = $postid", "WHERE attachmentid = $attachmentid") . "
"))