We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33423
    • 27 Posts
    Is it possible to make fixed thumb size in maxigallery.

    I’ve changed default parameter but nothing changed.
    $mgconfig['max_thumb_size'] = (isset($max_thumb_size)) ? $max_thumb_size : '128x128'; // [ number for autosize | widthxheight to set biggest width and height for thumbnail ] 


    Thanks...
      • 7455
      • 2,204 Posts
      you can only set a max depending on the fact if the image is portrait or landscape it will grab height or with (the longest side) and set this to you max so you would need to do it like this: $max_thumb_size : ’128’

      if you like the pictures to be square use css on the li {display:block; width:128px; height128px; overflow:hidden}
        follow me on twitter: @dimmy01
        • 3006
        • 32 Posts
        Ill borrow this thread for a question...

        Isnt it possible to crop the image thumbnail with php? I want square images 73x73px on the thumbnail page. As for now i do that with the css code supplied earlier but wont work 100% cause if i expand the box to like 75x75 then it just shows more of the picture cuase the thumbnail picture is like 110x73

        So the perfect thing would be to crop the thumbnail (like a squarebox 73x73) before it is finished, im pretty sure this IS possible with php but maybe its not working together with this script ?
          • 7923
          • 4,213 Posts
          yes, it is possible, but not implemented in maxigallery.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 23491 ☆ A M B ☆
            • 1,056 Posts
            Quote from: beejay at Jul 16, 2007, 12:56 PM

            Ill borrow this thread for a question...

            Isnt it possible to crop the image thumbnail with php? I want square images 73x73px on the thumbnail page. As for now i do that with the css code supplied earlier but wont work 100% cause if i expand the box to like 75x75 then it just shows more of the picture cuase the thumbnail picture is like 110x73

            So the perfect thing would be to crop the thumbnail (like a squarebox 73x73) before it is finished, im pretty sure this IS possible with php but maybe its not working together with this script ?

            Could you not take the CSS further and apply directly to img ? This way you can still "crop", only at the image-level rather than the container...let us know!


            This seemed to work for me:

            .thumbscontainer .thumbs li img{
                display:block; width:128px; height128px; overflow:hidden
            }
            
              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 3006
              • 32 Posts
              Quote from: pixelchutes at Jul 17, 2007, 02:42 AM

              Could you not take the CSS further and apply directly to img ? This way you can still "crop", only at the image-level rather than the container...let us know!


              This seemed to work for me:

              .thumbscontainer .thumbs li img{
                  display:block; width:128px; height128px; overflow:hidden
              }
              



              It just squeeze the pictures for me, looks very bad :S So i dont think it is a good idea...
                • 3006
                • 32 Posts
                Quote from: doze at Jul 16, 2007, 09:25 PM

                yes, it is possible, but not implemented in maxigallery.

                doze; will it be implented in futher versions?

                Thanks for a great snippet anyway!
                  • 7923
                  • 4,213 Posts
                  Quote from: beejay at Jul 17, 2007, 04:53 AM

                  Quote from: doze at Jul 16, 2007, 09:25 PM

                  yes, it is possible, but not implemented in maxigallery.

                  doze; will it be implented in futher versions?

                  Thanks for a great snippet anyway!
                  Yes, when I get the time to convert maxigallery to use phpThumb for image processing.


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 25979
                    • 178 Posts
                    any chance it will be soon wink

                    Great stuff. Thx

                    salik
                      //Why use windows since there is a door?//
                      • 7923
                      • 4,213 Posts
                      Sorry but no.. it won’t happen very soon..


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."