Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: mrsfalcon on February 11, 2019, 03:41:36 PM

Title: Building an image gallery from existing attachments
Post by: mrsfalcon on February 11, 2019, 03:41:36 PM
Does anyone have suggestions for building an image gallery from existing attachments? I checked out the gallery and it is nice, but I want to make use of existing images, not upload new ones. Thanks!
Title: Re: Building an image gallery from existing attachments
Post by: Sir Osis of Liver on February 11, 2019, 08:03:51 PM
Attachment file names are hashed without extensions for security reasons, you would have to restore the original file names, then you could post them in a gallery.  In your database, look in _attachments table, it contains filename and file_hash for each attachment.  Copy the attachment files into a new directory, then you can go through the table one file at a time and rename them (do not rename them in /attachments directory, you'll break the post links).  If you're dealing with a lot of files, you could write a script to rename all the files in one go.
Title: Re: Building an image gallery from existing attachments
Post by: vbgamer45 on February 11, 2019, 08:44:54 PM
Not aware of anything.
Do you want a giant list of images or separated by board?