Advertisement:

Author Topic: Building an image gallery from existing attachments  (Read 212 times)

Offline mrsfalcon

  • Semi-Newbie
  • *
  • Posts: 23
Building an image gallery from existing attachments
« 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!

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,739
Re: Building an image gallery from existing attachments
« Reply #1 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.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,140
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Building an image gallery from existing attachments
« Reply #2 on: February 11, 2019, 08:44:54 PM »
Not aware of anything.
Do you want a giant list of images or separated by board?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro