We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10573
    • 101 Posts
    [!MaxiGallerySolo? &galIDs=`5,6,7,8,9` &pics_to_show=`1` &type=`random` &open=`gallery_overview`!] 


    I have the call above. Is it possible to only show random wide (landscape) thumbnails?
    The portrait thumbnails seems to break the flow.
      • 10573
      • 101 Posts
      Or, how about a placeholder for thumbnail height or width? Then I can use PHX for a conditional based on the thumbnail size?
        • 33372
        • 1,611 Posts
        If you just want to change your HTML based on the thumbnail size (so portraits appear in a more appropriate layout), then you can do that by editing the MaxiGallerySolo snippet. Just get the random image you want to show and use getimagesize (http://www.php.net/manual/en/function.getimagesize.php) to figure out if it’s portrait (height>width), landscape, or square. Then change the output to whatever is appropriate for that type of image.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 7923
          • 4,213 Posts
          Use MaxiGallery 0.5, it has MaxiGallerySolo features and placeholders for picture heights/widths.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 10573
            • 101 Posts
            I put this directly on the page with my call above, but it doesn’t render.

            [+maxigallery.picture_height_thumb+]
            [+maxigallery.picture_width_thumb+]


            [!MaxiGallerySolo? &galIDs=`5,6,7,8,9` &pics_to_show=`1` &type=`random` &open=`gallery_overview`!] 

            Oh wait! I realized that I still have maxigallery solo!
            How can I do the above call with just MaxiGallery 0.5?
              • 7923
              • 4,213 Posts
              You use the placeholders in maxigallery templates


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 10573
                • 101 Posts
                Has anyone seen this error? I’m basically trying to show a random thumbnail, when clicked I want it to go to the gallery.

                Received the following Error
                « MODx Parse Error »
                
                MODx encountered the following error while attempting to parse the requested resource:
                « PHP Parse Error »
                 
                PHP error debug
                  Error:	array_merge() [function.array-merge]: Argument #1 is not an array	 
                  Error type/ Nr.:	Warning - 2	 
                  File:	C:\Program Files\xampp\htdocs\modx\assets\snippets\maxigallery\maxigallery.php	 
                  Line:	922	 
                  Line 922 source:	 $mg->mgconfig['gal_query_ids'] = array_merge($kids, $mg->mgconfig['gal_query_ids']);	 
                 
                Parser timing
                  MySQL:	0.0375 s	(14 Requests)
                  PHP:	0.2164 s	 
                  Total:	0.2539 s

                With this call:
                [!MaxiGallery? &gal_query_ids=`5` &order_by=`random` &limit=`1`!]


                I was trying to replace this call:
                [!MaxiGallerySolo? &galIDs=`5` &pics_to_show=`1` &type=`random` &open=`gallery_overview`!]
                  • 7923
                  • 4,213 Posts
                  I could not reproduce this error, do you have more information? What kind of site tree etc..

                  I made some changes to the random order thing, so if you are still having problems, try the SVN code. Seems to work fine at least for me.


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