We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    Hmm.. I looked at the code and it doesn’t work like that after all.. and this got me thinking the whole gal_query_ids and pic_query_ids parameters..

    Maybe I should implement it like so, that by default the gallery will be browsed like you want and if user wants that the link from the picture goes to the original gallery, he can then make a custom template to do so..

    So, I’ll get it fixed and get back to you.


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 7923
      • 4,213 Posts
      Download a new version now from this thread and try it out..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 19315
        • 84 Posts
        That’s great! It works fine now. The photos are displayed in the same document as the maxigallery call, and so are in the page of the correct languge, and I’ve managed to use phx to control which title/descriptions are shown.

        Thank you!

        Michal.
          • 7923
          • 4,213 Posts
          Sweet... good job!


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

            i am very interested in this discussion:
            I am buildin a multi-language site with the doc structure

            IT
            --home
            --galleries dir
            --- gal1
            --- gal2
            etc.
            EN
            --home
            --galleries dir
            --- gal1
            --- gal2
            etc.
            DE
            etc.

            but after setting up the galleries dir, gal1, gal2 with correct parameters (thx doze) and uploading images, I found that the work should have been done (?isthisenglish?) once per language!! Of course I am missing something.
            I’d like to have a structure like this:

            IT
            --home
            --galleries dir
            EN
            --home
            --galleries dir
            GALLERIES DIR
            --gal1
            --gal2
            --etc.

            and the "galleries dir" page of each language pointing to the main "GALLERIES DIR" (set up once for ever). On the other hand I guess this method could limit the document content of GALLERIES DIR (and subpages) to change with the language - and this could be a big handicap for a site built up for a multi-language content!!
            Is there a simple method to get both the targets? Something like a sort of template for the "galleries dir" pages and subpages of each language which binds the maxigallery content to the doc name and not to the doc ID... so I just have to name a document "gal1" and put in the correct maxigallery call in order to get the gal1 gallery pics, regardless the language.
            Hope I’ve been clear, hope there’s a simple way I just didn’t focus. I am not very skilled in handling special parameters, but I can study (if strictly needed...:)).
            thx in advance
              • 19315
              • 84 Posts
              Hi,

              I’m not sure I understand everything in your post, but I’ll have a go at a bit of explanation.

              I think you would need a structure like this, with the gallery directories repeated for each language (at least that is what I do):
              Quote from: KBtechnics at Apr 25, 2008, 08:44 AM

              IT
              --home
              --galleries dir
              --- gal1
              --- gal2
              etc.
              EN
              --home
              --galleries dir
              --- gal1
              --- gal2
              etc.
              This ensures that when a user is on EN -> .... -> gal1 they see the English page, with English menus etc, and similarly for the italian pages. However, you only have to upload the photos *once*. Say you upload the photos in the Italian page "gal1", say with id 5. Then in the English gal1, in the MaxiGallery call have &gal_query_ids=`5`.

              Also, say the Italian "galleries dir" had id 6, then in the English "galleries dir" in the MaxiGallery call, you would also have to have &childgalleries_ids=`6` to show the correct child galleries.

              Note: I think this would result in having the Italian gallery titles, descriptions, and links on the English "galleries dir" page. I wrote my own custom snippets to include in the MaxiGallery template of "galleries dir" to get the correct title, descriptions and links of the child galleries. (There might be an easier way though: I have just just found out about the getField snippet, which might help)

              Hope this helps: this is how I do it, but there might be an easier way, I don’t know.

              Michal.
                • 2217
                • 21 Posts
                Good advice, Michalc.
                I am planning to go on in another way in the future, but you brought me the good use of &gal_query_ids and &childgalleries_ids parameters.
                Just a couple of things:

                1- target document is language-independent
                Also, say the Italian "galleries dir" had id 6, then in the English "galleries dir" in the MaxiGallery call, you would also have to have &childgalleries_ids=`6` to show the correct child galleries.
                In this way I can have a "galleries dir" in every language, listing the gallery shown in the IT "galleries dir" (i.e. id=6). The goal is reached but when I click on a gallery thumb (i.e. gal1), it links to the IT corresponding gallery (document). So the EN/galleries dir/gal1 is unuseful.

                2 - Picture manager is document id - dependent
                When I try to manage pictures in the IT gallery page (i.e. gal1) in which I created that gallery, everything works. If I try to manage pictures in the EN/galleries dir/gal1 I can do everything but uploading. In facts the gal1 gallery has the gal_id=IT/.../gal1 document id.
                Reading the maxigallery.php script, it seems that the upload form is strictly related to the document id from which the script is called. If I call the script from a document which hasn’t the same id of the gallery, I cannot fully manage that gallery.
                It would be useful to make the picture manager docid-independent. Let’s say, use a parameter &gal_id (see the modx_maxigallery database table) allowing any document to show and manage a gallery.

                Once again, maybe I am talking about something easily perfomable. If any can help...
                  • 19315
                  • 84 Posts
                  Quote from: KBtechnics at Apr 27, 2008, 05:37 AM

                  In this way I can have a "galleries dir" in every language, listing the gallery shown in the IT "galleries dir" (i.e. id=6). The goal is reached but when I click on a gallery thumb (i.e. gal1), it links to the IT corresponding gallery (document). So the EN/galleries dir/gal1 is unuseful.
                  Ah: they are useful (if you want them to be). In the Maxigallery template in "galleries dir", you can include calls to custom snippets that display the title, description, *and link* to the correct child gallery in the current language.

                  Quote from: KBtechnics at Apr 27, 2008, 05:37 AM

                  2 - Picture manager is document id - dependent
                  When I try to manage pictures in the IT gallery page (i.e. gal1) in which I created that gallery, everything works. If I try to manage pictures in the EN/galleries dir/gal1 I can do everything but uploading.
                  This is something that I too discovered, but haven’t figured out a way to avoid.

                  Michal.
                    • 7923
                    • 4,213 Posts
                    1. like michail said, you can do snippets to the maxigallery templates what will like to correct places and show correct language titles and descriptions, or simply do own templates for each language in chunks and define them in your snippet call

                    2. use &view_gallery parameter to view a gallery from another document if you want to manage it too.


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