For those of you using showcase and want to use the [bd] Attachment Store , you will need to make a simple single file edit until the next release of showcase (in which it will be included).
File: /library/NFLJ/Showcase/Model/Item.php
Line: 711
FIND:
Replace with:
The entire method (line 699-720) will look like this after the edit:
File: /library/NFLJ/Showcase/Model/Item.php
Line: 711
FIND:
PHP:
data.filename, data.file_size, data.file_hash, data.width, data.height, data.thumbnail_width, data.thumbnail_height
Replace with:
PHP:
' . XenForo_Model_Attachment::$dataColumns . '
The entire method (line 699-720) will look like this after the edit:
PHP:
/**
* Gets the first attachment (and limited data info) by the given content ID.
*
* @param string $contentType
* @param array $contentIds
*
* @return array Format: [attachment id] => info
*/
public function getAttachmentByContentId($contentType, $contentId)
{
return $this->fetchAllKeyed('
SELECT attachment.*,
' . XenForo_Model_Attachment::$dataColumns . '
FROM xf_attachment AS attachment
INNER JOIN xf_attachment_data AS data ON
(data.data_id = attachment.data_id)
WHERE attachment.content_type = ?
AND attachment.content_id = ?
ORDER BY attachment.attachment_id, attachment.attach_date, attachment.view_count
LIMIT 1
', 'attachment_id', array($contentType,$contentId));
}