We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17851
    • 213 Posts
    OK, I must be an idiot. I’m using MODx 0.9.6 and MaxiGallery 0.5.2 on WinXP and Apache. I followed the instructions for installation--unzipped and installed the assets folders/files, created my snippet, created a folder and page--and all I get is "No documents found" I don’t see the Manage Pictures button anywhere. I’m sure it’s something easy, but I haven’t found any info.

    Anyone have a suggestion?
      Mark Macatee
      President
      Power 10 Solutions
      http://www.power10solutions.com
      • 7923
      • 4,213 Posts
      The "No documents found" string is not coming from MaxiGallery, atleast I don’t remember using such string anywhere. I think it comes from Ditto.

      Anyways, the installing and using maxigallery is pretty simple. You just copy the assets folder from maxigallery archive to your site root (overwriting the existing assets folder), chmod the assets/galleries directory, create the snippet from the contents of maxigallery.txt and put [!MaxiGallery!] to some document (if you named the snippet MaxiGallery, the names are case sensitive). That call gives you the basic gallery.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17851
        • 213 Posts
        I think my problem could be template related b/c everything looks ok when I use the Minimal Template. I do get one of my templates to correctly show the Manage Pictures button, but when I upload the pics, I get a blank page. Anything I should avoid in the template I assign to the Gallery doc?
          Mark Macatee
          President
          Power 10 Solutions
          http://www.power10solutions.com
          • 7923
          • 4,213 Posts
          For the blank page issue, see the system error log in modx manager if there is some message that would help identifying the issue.

          Also, have you noticed this in maxigallery wiki:


          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. You don’t necessarily see any error page, it can also just return a blank page when you upload pictures and if you look into /assets/galleries/<docid>/ folder, you may see that it has done for example thumbnail for some picture but then stopped there as either memory limit or maximum execution time got reached.

          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.

          For styling issues, maxigallery produces the thumbnails in a unordered list by default, the css can be found from /assets/snippets/maxigallery/css/default.css


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 17851
            • 213 Posts
            Yeah, I saw the items about the parameters. I’ll look into the Apache settings...it doesn’t happen on the remote LAMP server. Also, I think the problem had to do with having Ditto in the same template. I removed Ditto and it works fine.
              Mark Macatee
              President
              Power 10 Solutions
              http://www.power10solutions.com
              • 6144
              • 13 Posts
              Did you ever figure out this issue? I am having the same issue where no "manage picture" button shows up. I read through the threads and tried to use the "blank template" but still nothing shows up.
                • 7923
                • 4,213 Posts
                Oh yes, and in addition to those php.ini values, one thing that you need to have in your server is gd2 library in php.. check that from the phpinfo in modx manager.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 4456
                  • 9 Posts
                  I created the sample pages and snippets (per Installation and Creating your first gallery instructions) and when I display the ’My Galleries’ page no galleries are listed and no Manage button is displayed.

                  I include markers inside HTML comment tags to show where and what chunks are included and in this case the marker tells me the chunk is being retrieved from a file: @FILE:assets/snippets/maxigallery/templates/galleryoutertpl.html and the file exists, but nothing shows up in the document.

                  The code:

                  • Retrieves rows from the galleries table - well there are no rows yet...
                  • Retrieves all sub documents of the My Galleries page using the ids retrieved in step 1 - since there are no rows yet, no subdocuments are found
                  My questions are:

                  • How is the sample ’Gallery 1’ (as per the instructions for Creating your first gallery) supposed to show up?
                  • Why is there no Manage button?

                  I was hoping that typing all this info into a post would help me see the problem, but no such luck this time :-(

                  Thanks for your help.
                    • 4456
                    • 9 Posts
                    Solved part of the problem - my html marker killed the template retrieval as the getTemplate function tests for empty output from getChunk before it tests for @FILE.
                    Removing my marker made the Manage Pictures button appear.

                    However clicking the button yields a blank page...
                      • 4456
                      • 9 Posts
                      The next piece solved - problem caused by my reading between the lines - I noticed that MaxiGallery supports the @FILE: binding and I assumed it also supported the @CHUNK: binding - wrong.

                      I had placed the contents of the outer template file in a chunk and used the @CHUNK binding in my MaxiGallery call.

                      All is well now.

                      May I suggest changing the getTemplate() function in chunkie.class.inc.php from
                      	function getTemplate($tpl){
                      		// by Mark Kaplan
                      		global $modx;
                      		$template = "";
                      		if ($modx->getChunk($tpl) != "") {my_die("getTemplate($tpl)");
                      			$template = $modx->getChunk($tpl);
                      		} else if(substr($tpl, 0, 6) == "@FILE:") {
                      			$template = $this->get_file_contents($modx->config['base_path'].substr($tpl, 6));
                      		} else if(substr($tpl, 0, 6) == "@CODE:") {
                      			$template = substr($tpl, 6);
                      		} else {
                      			$template = FALSE;
                      		}
                      		return $template;
                      	}
                      

                      to
                      	function getTemplate($tpl){
                      		// by Mark Kaplan
                      		global $modx;
                      		switch (substr($tpl, 0, 6)) {
                      		case '@FILE:':
                      			$template = $this->get_file_contents($modx->config['base_path'].substr($tpl, 6));
                      			break;
                      		case '@CODE:':
                      			$template = substr($tpl, 6);
                      			break;
                      		case '@CHUNK':
                      			$template = $modx->getChunk(substr($tpl, 7));
                      			break;
                      		default:
                      			$template = $modx->getChunk($tpl);
                      			break;
                      		}
                      		return $template;
                      	}
                      


                      to support the @CHUNK binding as well and to first check for the explicit bindings.

                      Thanks for this great snippet - I’ve been attempting to integrate Gallery2 with MODx and kept running into problems.

                      Now it’s Good Bye to Gallery2... smiley