We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is an auto-generated topic for <a href="http://modxcms.com/extras/package/642">Gallery 0.1.0-rc2</a> by splittingred.

    Brief Description:
    Gallery is a dynamic Gallery Extra for MODx Revolution. It allows you to quickly and easily put up galleries of images, sort them, tag them, and display them in a myriad of ways in the front-end of your site.



    - Added GalleryItem snippet

    - Better integration between GalleryAlbums, Gallery, and GalleryItem snippet calls

    - Now can use them all on the same page to browse galleries

    - Fixed bug with limit statement in Gallery snippet



    See the official documentation here: <a href="http://svn.modxcms.com/docs/display/ADDON/Gallery">http://svn.modxcms.com/docs/display/ADDON/Gallery</a>
      • 20853
      • 14 Posts
      Shaun - excellent add on smiley
      I’ve been looking around for a gallery that does tags for ages and this look promising.
      Beautifully simple, yet allows me complete control over presentation.

      I’m giving it try out and found a problem with the URL formatting. Here’s an example:
      http://axe/modx-2.0.0-rc-2/index.php?id=19?galItem=3&galAlbum=1&galTag=

      You can see that ’?’ is being used incorrectly, it should be ’&’.
      I presume your system is working because you have SEO friendly URLs turned on?
      I’ve edited Chunks galAlbumRowTpl and galItemThumb replacing ’?’ with ’&’.

      The odd thing is that reading around MODx I can’t find a general solution.
      Adding link attributes needs either a ’?’ or ’&’ and it can’t be hard wired because of SEO.
      Maybe Gallery should create the link inside the snippet and use placeholders to set them?

      Keep up the good work
      Duncan
        • 20853
        • 14 Posts
        It took me a little time to work out how to get Gallery up and running; so I hope Shaun doesn’t mind me posting how I did it.

        1) Unless you are using search engine friendly URLs then edit the two Gallery Chunks as per my previous post. This is the default MODx configuration; if you aren’t sure what I mean then you probably need to make the edits.

        2) Create a new Chunk called galItemMain in the Gallery category.
        <div class="image">
          <a href="[[+image]]">
            <img src="[[+image]]" alt="[[+name]]" />
          </a>
          <p>Albums: [[+albums]]</p>
          <p>Tags: [[+tags]]</p>
        </div>


        3) Create a Resource with the following HTML:
        <p>A list of the first 10 active, prominent albums:</p>
        [[!GalleryAlbums]]
        
        <p>The selected gallery:</p>
        [[!Gallery]]
        
        <p style="clear:left">The selected Image (max size 500px):</p>
        [[!GalleryItem? &toPlaceholders=`0` &tpl=`galItemMain`]]


        That’s all you need to get Gallery up and running.
        I’m really looking forward to v0.2 as batch import will be a godsend!
        I’m also hoping that it might populate tags from the image metadata as they are already tagged; this would be useful on the single image upload too!
          • 20853
          • 14 Posts
          Just found that the GalleryItem snippet produces placeholder content with the same URL problem described above.
          In particular, the [[+albums]] and [[+tags]] placeholders cause the above example to fail.

          Fixing these needs some more Chunks and an update to the page HTML.

          New Chunk galItemAlbum (based on galitemalbum.chunk.tpl)
          <span class="gal-item-album"><a href="[[~[[*id]]]]&[[+albumRequestVar]]=[[+id]]">[[+name]]</a></span>


          New Chunk galItemTag (based on galitemtag.chunk.tpl)
          <span class="gal-item-tag"><a href="[[~[[*id]]]]&[[+tagRequestVar]]=[[+tag]]">[[+tag]]</a></span>


          Updated page HTML for the GalleryItem call:
          [[!GalleryItem? &toPlaceholders=`0` &tpl=`galItemMain` &albumTpl=`galItemAlbum` &tagTpl=`galItemTag`]]




          There’s got to be a general fix - I can’t believe this problem is new!
            • 28215
            • 4,149 Posts
            It’s probably a bug. You can file it here:

            http://github.com/splittingred/Gallery/issues
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 20853
              • 14 Posts
              Quote from: splittingred at Jun 08, 2010, 01:20 PM

              It’s probably a bug. You can file it here:
              http://github.com/splittingred/Gallery/issues
              Ah Ha!
              Thanks for the link to Gallery Issues.

              It turns out my URL formatting problem has already been reported in Issue titled "Outputting valid code".
              There isn’t much detail in that report, but it looks like the same problem
              I’ll add a comment with some detail.