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

    I have installed Maxi Gallery and following the instructions on Wiki to set up a picture and thumbnail page on a website.

    When I click to upload pictures I get the following error.

    I have tried following the help in the following posts, but none of the changes seem to work for me.
    http://modxcms.com/forums/index.php/topic,21619.msg134052.html#msg134052
    http://modxcms.com/forums/index.php/topic,21619.msg134187.html#msg134187

    Also the error below seems to be on a different line ie.e 313. Any advice?

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: mkdir() [function.mkdir]: Unable to access assets/galleries/60/
    Error type/ Nr.: Warning - 2
    File: /var/www/vhosts/christinescottinteriors.co.uk/httpdocs/assets/snippets/maxigallery/maxigallery.php
    Line: 313
    Line 313 source: if(!mkdir($mg->path_to_gal, 0777)) {

    Parser timing
    MySQL: 0.1094 s (2 Requests)
    PHP: 0.0491 s
    Total: 0.1585 s


    Thanks in advance,
    Claire
      • 7923
      • 4,213 Posts
      Do you mean that you have this setup? http://wiki.modxcms.com/index.php/MaxiGallery#Picture_and_thumbnails_on_same_page

      In that case, you need to use &manage_target and &is_target parameters. See their usage from the wiki page.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 5399
        • 17 Posts
        I have now added those parameters to the code on the page

        <div class="thumbnails">
        [!MaxiGallery? &amp;galleryPictureTpl=`mgGalleryPicture` &amp;js=`mgJs` &amp;manage_target=’60’ &amp;is_target=`1`!]
        </div>
        <div class="enlargedphotos">
        [!MaxiGallery? &amp;pictureTpl=`mgPicture` &amp;display=`pictureview` &amp;manage_target=’60’ &amp;is_target=`1` !]
        </div>

        Now when I go to manage pictures the button to click on has disappeared??

        Claire
          • 7923
          • 4,213 Posts
          Use backticks ( ` ) instead of single quotes ( ’ ) in the snippet call

          EDIT: and you are not supposed to have manage_target and is_target parameters both in the same call. The is_target parameter should be on the target document.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 5399
            • 17 Posts
            I have changed to backticks but get the same error:

            « MODx Parse Error »
            MODx encountered the following error while attempting to parse the requested resource:
            « PHP Parse Error »

            PHP error debug
            Error: mkdir() [function.mkdir]: Unable to access assets/galleries/60/
            Error type/ Nr.: Warning - 2
            File: /var/www/vhosts/christinescottinteriors.co.uk/httpdocs/assets/snippets/maxigallery/maxigallery.php
            Line: 313
            Line 313 source: if(!mkdir($mg->path_to_gal, 0777)) {

            Parser timing
            MySQL: 0.2633 s (2 Requests)
            PHP: 0.0516 s
            Total: 0.3149 s

            I am not entirely sure what you mean by target document.

            Claire
              • 7923
              • 4,213 Posts
              have you created the separate document to manage the gallery? that &manage_target parameter needs to point to that document’s id.


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

                I have now tried to follow the instructions to create my first gallery and get the same error.

                I have also created a document with the snippet call
                <div class="thumbnails">
                [!MaxiGallery? &amp;galleryPictureTpl=`mgGalleryPicture` &amp;js=`mgJs` &amp;is_target=`1`!]
                </div>
                <div class="enlargedphotos">
                [!MaxiGallery? &amp;pictureTpl=`mgPicture` &amp;display=`pictureview` &amp;is_target=`1` !]
                </div>

                and on the document I want the gallery displayed on
                [!MaxiGallery? &amp;galleryPictureTpl=`mgGalleryPicture` &amp;js=`mgJs` &amp;manage_target=`63` !]
                </div>
                <div class="enlargedphotos">
                [!MaxiGallery? &amp;pictureTpl=`mgPicture` &amp;display=`pictureview` &amp;manage_target=`63` !]
                </div>

                and I get the same error.

                Sorry I am not that skilled in this area. Would anyone be able to point me the the direction I need to go or even take a look for me? Willing to pay for someones time.

                I am looking to get a gallery like this http://www.theinterior.co.uk/restrad.htm whereby the image changes on:hover and remains there until the user hovers over another image. On my site I want the thumbnails displayed on the left or the bottom of the enlarged image.

                Thanks in advance.

                Claire
                  • 7923
                  • 4,213 Posts
                  In the document that you use to manage the galleries, you only need one snippet call, and it can be just [!MaxiGallery? &is_target=`1`!]. In the manage gallery document, you only need to have those parameters in the snippet call what affect to the pictures that are uploaded, eg. picture sizes, shadow and masking settings etc. As you are not using any parameters that affect to the pictures, you can have just [!MaxiGallery? &is_target=`1`!] in the gallery management document (id 63 in your case).

                  EDIT: You can create the onmouseover picture change by following this thread: http://modxcms.com/forums/index.php/topic,23731.0.html


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 5399
                    • 17 Posts
                    Thanks for the quick reply.

                    I now have [!MaxiGallery? &amp;is_target=`1`!] on the gallery management document (63).

                    another document (64) containing
                    [!MaxiGallery? &galleryPictureTpl=`mgGalleryPicture` &js=`mgJs` &manage_target=`63` !]
                    [!MaxiGallery? &pictureTpl=`mgPicture` &display=`pictureview` &manage_target=`63` !]

                    I still get an error?

                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource:
                    « PHP Parse Error »

                    PHP error debug
                    Error: mkdir() [function.mkdir]: Unable to access assets/galleries/64/
                    Error type/ Nr.: Warning - 2
                    File: /var/www/vhosts/christinescottinteriors.co.uk/httpdocs/assets/snippets/maxigallery/maxigallery.php
                    Line: 313
                    Line 313 source: if(!mkdir($mg->path_to_gal, 0777)) {

                    Parser timing
                    MySQL: 0.0982 s (5 Requests)
                    PHP: 0.0546 s
                    Total: 0.1528 s
                      • 7923
                      • 4,213 Posts
                      Have you created the /assets/galleries folder to the FTP server and CHMOD it to 777? is there any folders under /assets/galleries if you look with a FTP client?


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