We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24100
    • 35 Posts
    In lieu of having the MaxiGallery snippet automatically create the thumbnails from the full-size images, I need to use custom thumbnails. I have tried the route of simply keeping the naming convention the same (prefex ’tn_’) and using the file manager or FTP to get the files in the correct folder, but the MaxiGallery script doesn’t ’pick up’ the new files in the directory. I don’t see anything like an xml file anywhere that would get updated from the script. Doesn’t appear to be a caching issue either, unless I’m not testing it correctly. huh

    I was hoping this would be a straightforward task; perhaps it is and I’m simply missing something? Has anyone else had to solve this same problem?

    Thanks!
      • 7923
      • 4,213 Posts
      MaxiGallery creates a database table where it keeps the picture info.. you need to add you custom thumbnails there too..

      But, if you want some pictures in certain size and some with other.. you can change the maxigallery snippetcall to use some picture size, then upload pictures, then change the snippet call to another picture size and upload pictures..

      Or if that isn’t what you are looking for, explain more and I’ll try to help if you want.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 11975
        • 2,542 Posts
        Hi doze,


        I was thinking about a similar feature because I wanted to use a part of the image and not a thumb.
        it would be handy to be able to to crop the picture to make the thumb.


        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 24100
          • 35 Posts
          Thanks for the reply doze.

          I did see the db table with the information for the full-size images. As a short-term workaround, for when the client will be updating their site, I could have them upload the full-size images through the gallery, then in the file manager delete the "tn_" thumbnails and upload the custom "tn_" thumbnails. It’s not the most elegant solution, but any other possible solution I’ve thought about would involve modifying the MaxiGallery script.

          If I modified the script I was thinking of commenting out the calls to create the thumbnail, and then uploading the images and their thumbs at one time, but then realized I would need a way to not enter the "tn_" files in the database so that they wouldn’t be displayed. And I’m sure there would be other considerations as well. I’m new to PHP and have only skimmed the MaxiGallery code, so I’m not rushing into this solution.

          But thinking more about it, is there another way to upload the images? I recall reading in the forum that one can remove the "manage pictures" button from the template, but how would a user upload the files so they are entered in the database?

          Thanks for your help, it is very much appreciated! MODx is very cool because of components like MaxiGallery. I can’t wait until I fully get my head around how to best use it. grin
            • 7923
            • 4,213 Posts
            Oh, now I get what you mean.. yes, you should be able to just replace the tn_<filename>.<ext> files. if you look at the templates in v0.5 that shows thumbnails for example, the tn_ prefix is just added there to the filename. They are not cached anywhere.. just make sure you use the same file names.

            The possibility to remove manage pictures button is to be used if someone has built a separate document to manage the pictures (ie. using &manage_gallery parameter).


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 24100
              • 35 Posts
              Thanks for the information doze.

              I’m going to run with the solution I mentioned above where the user/client will upload the large images from the "manage pictures" link and then go to the file manager and upload the custom thumbnails to the correct gallery. And as you mentioned, the filenames will remain the same so the custom thumbs will replace the resized versions. It ends up being only one, rather painless, extra step. wink

              Thanks again for your help!