We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25876
    • 79 Posts
    Hey Folks,

    I’m playing around with MaxiGallery (Great Snippet btw), but I’ve got 2 questions:

    First, I’m using lightboxv2, works perfectly, but is there a way to resize big images?
    I tried both max_big_size and max_pic_size, but if i upload a big img like 2000x1000px, it is always shown in its real size ... i want to resize the images, lets say, to 900x700 max size each so that they fit the screen.

    Second, if I’m using custumized templates, the "Manage pictures" button disappeares; It got something to do with the call:

    [!MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_per_row=`2` &max_thumb_size=`100` &max_pic_size=`800` 
    &thumb_use_dropshadow=`1` &thumb_shadow_bgcolor=`DFDDDD` 
    &css=`assets/snippets/maxigallery/templates_sim/default_sim.css` 
    &galleryOuterTpl=`@FILE:assets/snippets/maxigallery/templates_sim/galleryoutertpl.html` 
    &childgalleryPictureTpl=`@FILE:assets/snippets/maxigallery/templates_sim/childgallerytpl.html` 
    &galleryPictureTpl=`@FILE:assets/snippets/maxigallery/templates_sim/gallerypicturetpl.html` 
    &manageOuterTpl=`@FILE:assets/snippets/maxigallery/templates_sim/manageoutertpl.html` 
    &managePictureTpl=`@FILE:assets/snippets/maxigallery/templates_sim/managepicturetpl.html` 
    &manageUploadTpl=`@FILE:assets/snippets/maxigallery/templates_sim/manageuploadtpl.html` 
    &pageNumberTpl=`@FILE:assets/snippets/maxigallery/templates_sim/pagenumbertpl.html` 
    &pictureTpl=`@FILE:assets/snippets/maxigallery/templates_sim/picturetpl.html`!]

    If i use the call without the own template files, its there.

    Third, i know this has nothing to do with the snippet, but if i try to upload pictures with size bigger then 1MB, i get an Internal Error (Error 500); I set the max. upload size >2 MB in the MODx configuration ...
    How can i get this work? What do i have to do with my server settings? Maybe someone knows

    Thanks for every help!
      • 7923
      • 4,213 Posts
      Quote from: s1Mon at Mar 17, 2007, 12:39 PM

      First, I’m using lightboxv2, works perfectly, but is there a way to resize big images?
      I tried both max_big_size and max_pic_size, but if i upload a big img like 2000x1000px, it is always shown in its real size ... i want to resize the images, lets say, to 900x700 max size each so that they fit the screen.
      &max_big_size=`900` or &max_big_size=`900x700` should do it. you have to re-upload the images as the resizing is done on upload for now..

      Quote from: s1Mon at Mar 17, 2007, 12:39 PM

      Second, if I’m using custumized templates, the "Manage pictures" button disappeares;
      What is your galleryOuterTpl like? [+maxigallery.managebutton+] shows the button.

      Quote from: s1Mon at Mar 17, 2007, 12:39 PM

      Third, i know this has nothing to do with the snippet, but if i try to upload pictures with size bigger then 1MB, i get an Internal Error (Error 500); I set the max. upload size >2 MB in the MODx configuration ...
      How can i get this work? What do i have to do with my server settings? Maybe someone knows
      From resource repository page:


      IMPORTANT NOTE: It depends on your server settings that how many images you can upload at a time and how big. The image masking process for example is very slow and you might get a "Maximum execution time of NN seconds exceeded" -error message, if you are trying to upload many images at the same time with imagemasking on.. or if the images are large. Also when using big images, you may get "Memory Size Exhausted" -error as the image processing takes alot of memory too. These errors are not errors in the snippet code, they are caused by server settings. MaxiGallery script tries to use ini_set to increase the execution time and memory limit if needed, but it cannot do it if php is running in safe mode. (I have my setup on a safe_mode enabled server with 15seconds of execution time and 30sec max_input_time and 32Mb memory limit. It can handle 10 images at a time taken with 4MP camera, but with image masking on I can kill it pretty easily)

      So, Check these values from php.ini:

      max_execution_time, this is the maximum execution time allowed for each script, in seconds (it takes quite some time for maxigallery script to process the images if there are many of them and many imaging "filters" used).
      max_input_time, this is the maximum time each script may spend parsing request data, in seconds.
      memory_limit, this is the maximum amount of memory in megabytes that a script may consume (maxigallery keeps the images in memory while it makes thumbnails etc).
      post_max_size this is the maximum size of POST data in megabytes that PHP will accept (the pictures travel in the post data).
      upload_max_filesize this is the maximum allowed size for uploaded files in megabytes.

      These settings can also be configured from Apache, so you might want to see if the following can be found from your httpd.conf:

      php_admin_value upload_max_filesize Sets the corresponding php setting, see above.
      php_admin_value post_max_size Sets the corresponding php setting, see above.
      php_admin_value memory_limit Sets the corresponding php setting, see above.
      LimitRequestBody Same as post_max_size php setting, but for apache.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 25876
        • 79 Posts
        Thanks for the quick answer, doze

        Second -> solved
        First -> not solved

        Tried both, &max_big_size=`900` and &max_big_size=`900x700`, uploaded some big pictures fresh, but they only grow smaller!
        They have a size of appr. 400px, don’t know why, no matter if i call &max_big_size=`100` or &max_big_size=`900`, they’ve got the same size everytime ...
        I change the call, save it, refresh the gallery site, make a new upload; Something wrong?

        Third -> yea read that before but i’m too stupid to find my php.ini wink
          • 7923
          • 4,213 Posts
          Quote from: s1Mon at Mar 18, 2007, 03:50 PM

          Tried both, &max_big_size=`900` and &max_big_size=`900x700`, uploaded some big pictures fresh, but they only grow smaller!
          They have a size of appr. 400px, don’t know why, no matter if i call &max_big_size=`100` or &max_big_size=`900`, they’ve got the same size everytime ...
          I change the call, save it, refresh the gallery site, make a new upload; Something wrong?
          If you are using lightbox display type, it shows the normal pictures by default, so in that case you would use &max_pic_size=`900` or &max_pic_size=`900x700`. It is 450 by default.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 25876
            • 79 Posts
            right, thanks doze

            it’s working now with &max_pic_size