Function loadAttachmentContext
This loads an attachment's contextual data including, most importantly, its size if it is an image. It requires the view_attachments permission to calculate image size. It attempts to keep the "aspect ratio" of the posted image in line, even if it has to be resized by the max_image_width and max_image_height settings.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Attachments.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Attachments.php
integer |
$id_msg |
ID of the post to load attachments for |
array |
$attachments |
An array of already loaded attachments. This function no longer depends on having $topic declared, thus, you need to load the actual topic ID for each attachment. |
array
|
An array of attachment info |