We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    This snippet is based on the work "EtoGal" by Frank Siegert (hugelmopf / hugelmpopf [at] web [dot] de).
    The original snippet can be found and discussed at the etomite forums: http://www.etomite.org/forums/index.php?showtopic=3022


    This snippet has been updated to correct an error in which credit to the original author(s) of the snippet was unintentionally left out. Please re-download the zip file if you are using this snippet. Alternately, consider an upgrade to MaxiGallery [ http://modxcms.com/forums/index.php/topic,3843 ], which is a much more refined and feature rich image gallery snippet.

    I have been reading a lot about this LightBox JS around the MODx forums and I thought, wouldn’t it be cool to integrate that into a MODx gallery snippet. I have MiniGallery running on most of my sites, so I decided to start there. I added some code to the MiniGallery snippet (With a lot of help from Mark Kaplan the PHP God!) and added the proper paths to the lightbox.js code.
    Just add these lines somewhere between the <head> and </head> of your MODx template

    <link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
    <script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>
    


    You can see it in use at my website:

    http://www.scottydelicious.com/photos/minigallerytest.html

    Enjoy,

    -sD-
    scotty Delicious

    ***Edit***
    I have edited the INSTALL.txt file to include the instructions above for calling the css and js files from the head of your html document. I also added the folder assets/galleries/ with instructions in the INSTALL.txt document.

    -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
      • 25663 MODX Staff
      • 12,272 Posts
      Nice work. laugh
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Excellent!
          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
          • 6726
          • 7,075 Posts
          Waow, this is cool grin

          Thanks !
          I’ll go toy with that...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 15914
            • 145 Posts
            Excellent... just what MiniGallery was missing! Good job!
              Kunal Kapoor
              Technical Director
              Limesharp Internet Limited - Effective, Functional, Standards Compliant

              IRC Nick: KingKoopa
              Skype ID: KingKoopa16
              • 21595
              • 159 Posts
              sure it’s easy for you but not for people like me and maybe in the install document you have to introduce
              that we have to put in the template
                     
              <link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
              <script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>


              thanks for your work
                • 15914
                • 145 Posts
                Maybe you could use [tt]regClientStartupScript()[/tt] and [tt]regClientCSS()[/tt] like I do in my script. Although you need to apply fixes to [tt]/manager/includes/document.parser.inc.php[/tt] before you can get that to work.

                This way,

                <link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
                <script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>


                only gets called when it needs to be.
                  Kunal Kapoor
                  Technical Director
                  Limesharp Internet Limited - Effective, Functional, Standards Compliant

                  IRC Nick: KingKoopa
                  Skype ID: KingKoopa16
                  • 26435
                  • 1,193 Posts
                  Quote from: nissai at Mar 03, 2006, 07:08 AM

                  sure it’s easy for you but not for people like me and maybe in the install document you have to introduce
                  that we have to put in the template
                         
                  <link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
                  <script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>


                  thanks for your work

                  Thank you for pointing that out. This is a very important step that I missed. I added it to the first post, and I will add it to the INSTALL.txt as soon as I get home today.

                  thanks

                  -sD-
                    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
                    Very cool!! great work Scotty!!
                      Free MODx Graphic resources and Templates www.tattoocms.it
                      -----------------------------------------------------

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

                      bubuna.com - Web & Multimedia Design
                      • 34162
                      • 1 Posts
                      Very nice!