ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image Gallery and Lightbox Integration

April 21, 2010 6:48pm

Subscribe [2]
  • #1 / Apr 21, 2010 6:48pm

    msunickb

    19 posts

    Hello all!

    I have built, using the EE image gallery module, a very simple image gallery for a client. The general setup is one image gallery, several categories with sub-categories within them.

    On the content page I simply grab the first image in each sub-category and display it on the page then the user can click to view the rest of the images in that category in a lightbox overlay. The rest of the images are rendered as well but I have them hidden on the page for use in the overlay. The user can only navigate using next and previous buttons.

    This works perfectly (it took a lot of searching the the forums to get it that way mind you 😊) with one exception. For some reason I get a duplicate of each image when the overlay loads. The first image shows the title of the category below it, the second does not.

    You can see a sample of the issue here… http://www.closetandroomsolutions.com/index.php/other-applications/

    Here’s the mysql query I used on the page:

    {exp:query sql="SELECT cat_folder, parent_id, cat_name, filename, entry_id FROM exp_gallery_categories c, exp_gallery_entries e WHERE e.cat_id= c.cat_id AND e.cat_id = '{category_id}' AND c.parent_id = '{embed:parent}' ORDER BY e.entry_date ASC"}

    Anyone have any thoughts? Any ideas you can provide would be great.

    Thanks!

  • #2 / Apr 23, 2010 1:51am

    robbiegod

    43 posts

    got a small suggestion…

    I think there is an issue in your SQL Query.  Could be that you have 2 categories or 2 galleries and so the query is grabbing each thing twice.

    What i would do is make a new template and just put that SQL query and output the image names on a page and see what results you get. If they come out that you only see 1 reference to each image in your output then you’ll know the query isn’t the problem.

    Give that a try and let us know what you see.

  • #3 / Apr 23, 2010 2:08am

    msunickb

    19 posts

    Thanks for the reply ijwebsites…

    I created a template as you suggested and it appears the query is actually outputting correctly.

    Here’s the template: http://www.closetandroomsolutions.com/index.php/site/test/ (I included the category hoping I would see some blanks ones but unfortunately I don’t)

  • #4 / Apr 23, 2010 2:13am

    robbiegod

    43 posts

    can you output the image names too and maybe the image ID # too.

  • #5 / Apr 23, 2010 2:29am

    msunickb

    19 posts

    Well, I started but I’m struggling. I think I’m too tired. http://www.closetandroomsolutions.com/index.php/site/test/

    I’ll look at it tomorrow when my head is a little clearer. It’s been a long week. 😊

    Thanks for the assistance…I’ll post again tomorrow.

  • #6 / May 17, 2010 1:49am

    msunickb

    19 posts

    So, I finally have gotten back to this and I don’t think that the query is resulting in the wrong number of results. I outputted the filenames after the query is run and only two files are outputted, however when you click to launch the “gallery” 4 images appear in the fancybox overlay.

    Any ideas?

    Thanks again and sorry it took so long to get back to this. I’ve been swamped and it’s possible I was hoping the client didn’t notice. 😊

    Edit: forgot a link to show a page with the filenames… http://www.closetandroomsolutions.com/index.php/wallbed/

  • #7 / May 18, 2010 10:03pm

    msunickb

    19 posts

    Nothing huh? I still can’t figure out what’s going on. I think I may just abandon this completely and go a different route. I hate to do that since it’s so close to working properly but I have beat myself up over this and can’t figure it out.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases