We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    I’ve a little problem with this nice snippet:

    Using Friendly Url and Use friendly alias path enabled, the Manage Picture button try to redirect to

    domain.com/alias undecided

    insted

    domain.com/folder/alias.html

    with Friendly Url disabled everything worksfine..


      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design
      • 26435
      • 1,193 Posts
      As far as I know, MiniGallery has never played nice with friendly alias paths, in any of it’s incarnations. This is not new, and it is obviously not addressed in this revision of MiniGallery. I don’t use FAP’s, so I didn’t even look into correcting it.

      later

      -sD-
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 14267
        • 113 Posts
        Find this line:

        $phpself = $this->config['friendly_urls']==1 ? $pageinfo['alias'] : "index.php?id=".$pageinfo['id'];
        

        change to:
        $aliaspath="";
        if ($modx->config['use_alias_path']) $aliaspath=$modx->virtualDir."/";
        $phpself = $this->config['friendly_urls']==1 ? $aliaspath.$pageinfo['alias'] : "index.php?id=".$pageinfo['id'];


        also change this:
        $childself = $this->config['friendly_urls']==1 ? $child['alias'] : "index.php?id=".$child['id'];

        to
        $childself = $this->config['friendly_urls']==1 ? $aliaspath.$child['alias'] : "index.php?id=".$child['id'];
        


        I haven’t checked it with child galleries because I don’t have any.

          • 2762
          • 1,198 Posts
          Quote from: ScottyDelicious at Mar 24, 2006, 06:04 PM

          As far as I know, MiniGallery has never played nice with friendly alias paths, in any of it’s incarnations. This is not new, and it is obviously not addressed in this revision of MiniGallery. I don’t use FAP’s, so I didn’t even look into correcting it.

          later

          -sD-
          right rolleyes it’s an old eto snippet wink
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 2762
            • 1,198 Posts
            Thaks jlarson!! your code works great!! now minigallery works in subfolders with FriendlyUrls wink

            I attach your file for any other people, thanks again wink
              Free MODx Graphic resources and Templates www.tattoocms.it
              -----------------------------------------------------

              MODx IT  www.modx.it
              -----------------------------------------------------

              bubuna.com - Web & Multimedia Design
              • 14267
              • 113 Posts
              You’re welcome. You should note that the snippet still requires a unique alias for each gallery--you can’t rely on the alias path. In other words, something like /folder1/photos and folder2/photos will share the same folder, photos.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I used this to make up a very nice little gallery for my partner, who just wants an online "art book" with 9 or 12 pictures in each page, that he can print out if he wants to. Came out very nice.

                http://www.alandaniel.co.uk/gallery
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 21595
                  • 159 Posts
                  Quote from: banzai at Mar 25, 2006, 07:15 AM

                  Thaks jlarson!! your code works great!! now minigallery works in subfolders with FriendlyUrls wink

                  I attach your file for any other people, thanks again wink

                  nothing in your file.
                  Scotty would you put all the changes in the snippet if you think everythink is worrking?
                    • 26435
                    • 1,193 Posts
                    I will do that tonight. I have some graphic desing stuff I need to do for my wedding in june, but I will get that bundled and attached to the first post tonight. thanks for your contribution. I think you just helped make MiniGallery the most versitile MODx gallery snippet so far.

                    I’ll let everyone know when I get the fix posted.

                    -sD-
                    scotty Delicious
                      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                      All of the above... in no specific order.


                      I send pointless little messages
                      • 2762
                      • 1,198 Posts
                      Quote from: nissai at Mar 25, 2006, 05:44 PM

                      nothing in your file.

                      sorry fixed now.
                        Free MODx Graphic resources and Templates www.tattoocms.it
                        -----------------------------------------------------

                        MODx IT  www.modx.it
                        -----------------------------------------------------

                        bubuna.com - Web & Multimedia Design