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

    I’m using Picture and thumbnails on same page

    Everything goes fine, I get one manage button BUT, when I’m in gallery management, I see in fact 2 gallery management ... so I see twice each component.

    So, I tried to &manageOuterTpl=`` to avoid displaying... that works, but, when I want to upload a picture, I get this error :

    PHP error debug
      Error: 	chmod() [function.chmod]: No such file or directory	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/xxx/assets/snippets/maxigallery/maxigallery.php	 
      Line: 	372	 
      Line 372 source: 	chmod($mg->path_to_gal.$name,0666);


    I didn’t find any way to disable gallery management.

    Here is the first call to display image :
    [!maxigallery? &pictureTpl=`ImageMoyenne` &display=`pictureview`  !]


    Second one for thumbnails :
                [!maxigallery? &lang=`fr` &max_thumb_size=`75x75` &max_pic_size=`450` &keep_bigimg=`1` &max_big_size=`800x600` &galleryOuterTpl=`@FILE:/assets/snippets/maxigallery/templates/scp/galleryoutertpl.html` &galleryPictureTpl=`@FILE:/assets/snippets/maxigallery/templates/scp/gallerypicturetpl.html` &js=`assets/snippets/maxigallery/templates/scp/unepage.js` !]


    Thumbnails and images are created despite the php error.

    Thanks for any help ! smiley
      • 4385
      • 372 Posts
      Wow, I was looking for the same thing yesterday. I had the same problem. I ended up finding MaxiGallerySolo last night and that solved my problem.

      http://www.modxcms.com/MaxiGallerySolo-0.html not sure why it is deprciated

      I used something like... [!MaxiGallerySolo? &galIDs=`[*id*]` &pics_to_show=`1` &open=`gallery_browser` &w=`250` &h=`300`!]

      then had my maxigallery set to offset=1

        DropboxUploader -- Upload files to a Dropbox account.
        DIG -- Dynamic Image Generator
        gus -- Google URL Shortener
        makeQR -- Uses google chart api to make QR codes.
        MODxTweeter -- Update your twitter status on publish.
        • 23050
        • 1,842 Posts
        Hey, I got it ! smiley

        Let’s say my gallery is on doc 10, and I will create a new doc to manage picture... this doc gets id 20.

        In doc 10, you add &manage_target=`20` to your MG call.

        In doc 20, you copy the same call that you have on doc 10 + you add &is_target=`1`

        That’s it !

        You now have a dedicated gallery manager on doc 20 and it works perfect ! smiley

        Edit : Thanks to ChibiSaru for correcting &manage_target thing
          • 7923
          • 4,213 Posts
          Quote from: Perrine at Dec 07, 2007, 02:17 PM

          Hey, I got it ! smiley

          Let’s say my gallery is on doc 10, and I will create a new doc to manage picture... this doc gets id 20.

          In doc 10, you add &manage_picture=`20` to your MG call.

          In doc 20, you copy the same call that you have on doc 10 + you add &is_target=`1`

          That’s it !

          You now have a dedicated gallery manager on doc 20 and it works perfect ! smiley
          Yes, that’s the correct way to do it.. Great that you found the answer by your own and thanks for posting it up.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 4385
            • 372 Posts
            So, am I doing it wrong? Should I not be using MaxiGallerySolo?

            I don’t have a site up yet, I was just doing a proof of concept for a site and wanted to show off some t-shirts.
            One large photo for the front and two small thumbnails for the back and a closeup detail one of the front.
              DropboxUploader -- Upload files to a Dropbox account.
              DIG -- Dynamic Image Generator
              gus -- Google URL Shortener
              makeQR -- Uses google chart api to make QR codes.
              MODxTweeter -- Update your twitter status on publish.
              • 7923
              • 4,213 Posts
              MaxiGallerySolo is deprecated (ie. not updated and supported), but you can use it if you want if it works correctly.. The solution that perrine posted is the correct way. Using just MaxiGallery is more optimized way..


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 4385
                • 372 Posts
                Thanks doze. Now I know why it was depreciated.

                And I just saw my answer posted this morning using just MaxiGallery.

                http://modxcms.com/forums/index.php/topic,20662.0.html
                  DropboxUploader -- Upload files to a Dropbox account.
                  DIG -- Dynamic Image Generator
                  gus -- Google URL Shortener
                  makeQR -- Uses google chart api to make QR codes.
                  MODxTweeter -- Update your twitter status on publish.
                  • 5056
                  • 1 Posts
                  Quote from: doze at Dec 09, 2007, 02:56 PM

                  Quote from: Perrine at Dec 07, 2007, 02:17 PM

                  Hey, I got it ! smiley

                  Let’s say my gallery is on doc 10, and I will create a new doc to manage picture... this doc gets id 20.

                  In doc 10, you add &manage_picture=`20` to your MG call.

                  In doc 20, you copy the same call that you have on doc 10 + you add &is_target=`1`

                  That’s it !

                  You now have a dedicated gallery manager on doc 20 and it works perfect ! smiley
                  Yes, that’s the correct way to do it.. Great that you found the answer by your own and thanks for posting it up.

                  Helloo there. ^^

                  I had exactly the same problem, but the answer provided in this topic isn’t 100% accurate.
                  `&manage_picture` should be `&manage_target`. ^^
                  Great solution btw!
                    • 19220
                    • 26 Posts
                    Hi,

                    I’m having a similar problem. I have a sidebar on my site that always shows one random image from a random gallery. The chunk used is called mgGalPicTpl and looks like:

                    <div class="imageElement">
                    <a href="[~[+maxigallery.picture.gal_id+]~]" title="[+maxigallery.strings.go_to_gallery+]">
                    <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" width="140px"/></a>
                    </div>
                    


                    And the snippet call looks like:

                    [!MaxiGallery? &gal_query_ids=`all` &order_by=`random` &limit=`1` &galleryPictureTpl=`mgGalPicTpl` &manageOuterTpl=`` &manageButtonTpl=`` &managePictureTpl=`` &manageUploadTpl=`` &manage_gallery=`` &manage_target=`` &is_target=`1`!]
                    


                    This looks good on all of the pages (it used to be simpler .. everything after galleryPictureTpl was added in an attempt to fix this problem). My gallery pages are all very simple, and look like this:

                    [!MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`0` &thumb_use_dropshadow=`1`!]
                    


                    At first, I was getting two managers when I clicked on the "manage" button. As you can see, I tried my best to turn all manager-related things off in the single-picture call. Now, the manager looks good, but I’m getting the same php error as the poster earlier in this thread. Is there some way to tell that single-picture call that it’s never supposed to be involved in manager-related functions? If I remove it, everything works well.

                    Also, it’s possible that I misunderstood the earlier posts in this thread. My understanding is that the solution posted here only works if I want the single-picture call to always manage pictures from a given docid. My galleries all have different docids, though.

                    Thanks,

                    -michael
                      • 23050
                      • 1,842 Posts
                      Hello Michael,

                      Do you use the call with &is_target on a different doc from where the gallery is displayed ?

                      I guess your error shows up because you call the 2 Wayfinder call on the same page. In the example I mentioned above, I have the gallery displayed on doc 10, whereas the manager (with &is_target) is on doc 20. Might the 2 calls on the same page make this error show up ?

                      The purpose of this tuto, is to display a gallery on a doc, and the manager on other doc.