Solved

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

Posted on 2010-09-06
5
674 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now