Solved

Lightbox doesnt work: Image gallery using drupal: Lightbox2, CCK, Views, ImageCache

Posted on 2010-09-06
5
676 Views
Last Modified: 2012-05-10
Hi,
We have a website with an image-gallery:
http://relaunch.ethik.or.at/fotogalerie

This was ceated using CCK imagefield, imagecache and views. We want to use Lightbox2 and this module has also been activated. But somehow, when I click on the images, instead of lightbox only the image appears. What did I do wrong?
This tutorial uses a very similar approach:
http://jamestombs.co.uk/2009-03-18/create-a-simple-image-gallery-in-drupal-6-using-cck-and-views/996

I have also deactivated the Views AJAX capability, but it doesn't work there either.

Please advise. Thanks.
0
Comment
Question by:aboutadream
  • 2
  • 2
5 Comments
 
LVL 19

Assisted Solution

by:Albert Van Halen
Albert Van Halen earned 400 total points
ID: 33613451
Your're creating two menus with smoothmenu.
The first is on an alement with id smoothmenu1
The second is on an element with id smoothmenu2 -> this one does not exist.

Correct this error first...
0
 

Author Comment

by:aboutadream
ID: 33613610
Thanks, yeah I had initialized two menus in the template for vertical menus, which I did not yet implement. I removed those lines, but lightbox behaviour has not improved.
0
 
LVL 10

Assisted Solution

by:mstrelan
mstrelan earned 100 total points
ID: 33613721
Is your view set up to use Fields or Nodes? If it is fields you should be defining the image field in the view. In the settings for that field you can choose something like Thumbnail of image linked to Lightbox
0
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 400 total points
ID: 33613805
The problem lies in lightbox2_image_nodes function (in auto_image_handling.js)
You're calling lightbox2_init_triggers with settings which are empty
Only the first statement (with settings.trigger_lightbox_classes) is working. The rest will result in an error causing your lightbox to fail.

Correct the errors in Drupal.Settings object.
0
 

Author Closing Comment

by:aboutadream
ID: 33651497
Thanks a lot. The javascript problem, was a great hint. It is a problem of the drupal module, I guess, where I have to provide some additional arguments (Image-Description), to get the modules FileFields, CCK, ImageCache and LightBox2 running. I have to try it, haven't totally figured it out, but thanks to you I am on the right path.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question