Code: Select all
// it is required also the forum id of this attach, to know if this user can or not execute things here
$sql = 'SELECT T.*, A.*
FROM ' . ATTACHMENTS_TABLE . " AS A
JOIN " . TOPICS_TABLE . " AS T on T.topic_id = A.topic_id
WHERE A.attach_id = $attach_id";
$result = $db->sql_query($sql);
$attachment = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$auth->acl_get
Code: Select all
// let admins and moderators that can edit or attachment owner to follow
$own_attachment = ($auth->acl_get('m_edit', $attachment['forum_id']) || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
Code: Select all
https://www.phpbb-work.ru/preview-attachments-ext-t91.html
I see. It can be surely added as option, to display a thumb in place of link. As option it will be added.Thumbnails must be seen, as often photos are uploaded from a smartphone and they may initially be upside down. And when you immediately see it, you know that you need to rotate the photo. And you don't have to do anything extra.