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

    I'm trying to do something fairly straightforward but struggling to wrap my head around the best way to do it.

    I want a page that lists a bunch of albums from a specific parent, like so:

    [[!GalleryAlbums? &parent=`2` &showAll=`0` &prominentOnly=`0` &rowTpl=`findAlbumRowTpl` &thumbWidth=`152`]]


    Here's the catch: when you click on an album cover, I want it to then fire a lightbox (probably using http://www.jacklmoore.com/colorbox) with all of that gallery's images (rather than just showing all of the gallery's images as thumbnails or whatever).

    Has anyone out there done this before? Would love to see some examples of how to setup the Tpl's.

    Thanks in advance for any help!
      Nick Hoag
      Creative Partner
      The FutureForward

      http://thefutureforward.com
      • 23849
      • 223 Posts
      I ended up getting this working with some jQuery fun:

      GALLERY ALBUM CALL IN RESOURCE:
      [[!GalleryAlbums? &parent=`2` &showAll=`0` &prominentOnly=`0` &rowTpl=`findAlbumRowTpl` &thumbWidth=`152`]]
      


      findAlbumRowTpl:
      <div class="colorbox_thumb">
        <a href="#" class="gallery_[[+id]]_trigger"><img src="[[+image]]" alt="" /></a>
        <h3>[[+name]]</h3>
        <p>[[+description]]</p>
        [[!Gallery? &album=`[[+id]]` &thumbTpl=`ColorboxTpl` ]]
        <script type="text/javascript">
            $(document).ready(function (){            
                  $(".gallery_[[+id]]").colorbox({rel:'gallery_[[+id]]', transition:"none", width:"75%", height:"75%"});
                  //When gallery album thumbnail is clicked, fire the gallery in colorbox
                  $(".gallery_[[+id]]_trigger").click(function () { 
                    $('a[rel=gallery_[[+id]]]:first').click(); 
                        return false; 
                  });
            });
        </script>
      </div><!-- end .colorbox_thumb -->
      


      ColorBoxTpl:
      <a class="gallery_[[+album]]" href="[[+fileurl]]" title="[[+name]]"></a>
      


      I'm sure there's a more elegant solution, but that allows for a set of Gallery Albums to be displayed on a page, and then for the images inside each gallery to display on click. [ed. note: presson83 last edited this post 14 years, 5 months ago.]
        Nick Hoag
        Creative Partner
        The FutureForward

        http://thefutureforward.com
        • 39559
        • 34 Posts
        I am looking to do pretty much this exact same thing, but i cant seem to get colorbox to fire....
          • 32316
          • 387 Posts
          This thread interests me - and yet I am just seeing it for the first time about 6 days after the first post, and I know I have perused the forums multiple times in the last 6 days

          Sorry I don't know the answer to your problem - I just needed to vent my frustration about following the forums, it makes one wonder how many questions are unanswered because the person who knows a great solution to the problem just does not see the question! Or maybe I just have not figured out how use the forums!

          While I'm venting - anyone else frustrated that if one logs out of the forum (whether on purpose or because of some other factor - is it clearing the cache that does it, or just quitting my my browser, I haven't bothered to try to figure it out) that the forum completely forgets my previously viewed posts - so 'view new posts since last visit' is blank

          Sorry for the off topic rant - now back to your originally scheduled programming...
            • 39559
            • 34 Posts
            Quote from: whistlemaker at May 07, 2012, 09:18 PM
            This thread interests me - and yet I am just seeing it for the first time about 6 days after the first post, and I know I have perused the forums multiple times in the last 6 days

            Sorry I don't know the answer to your problem - I just needed to vent my frustration about following the forums, it makes one wonder how many questions are unanswered because the person who knows a great solution to the problem just does not see the question! Or maybe I just have not figured out how use the forums!

            While I'm venting - anyone else frustrated that if one logs out of the forum (whether on purpose or because of some other factor - is it clearing the cache that does it, or just quitting my my browser, I haven't bothered to try to figure it out) that the forum completely forgets my previously viewed posts - so 'view new posts since last visit' is blank

            Sorry for the off topic rant - now back to your originally scheduled programming...
            i have been searching and browsing the forums for days trying to gather all the info i need for the site i am working on (its for my wife, so the critiquing doesnt stop!); and i find it difficult to navigate considering i am used to vbulletin/phpbb/smf type forums...

            implementing a gallery for the site i am working on is turning into a chore....