?
Solved

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

Posted on 2010-09-06
5
Medium Priority
?
681 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 19

Assisted Solution

by:Albert Van Halen
Albert Van Halen earned 1600 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 400 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 1600 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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

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

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 …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
Suggested Courses

765 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