2

Right now in each gallery, when a user clicks on the thumbnail, a larger version will show up in the middle of the screen. With it are arrows to navigate, a "1 of x" caption, a link to start a slideshow, and an x to close it. When I click the image, it takes me to the page of the media. What I want it to do is take me to the next image in the slideshow (like the arrows would have done). I tried looking at the configuration of the Media Gallery Module but there were only options on column and row layout. When I tried to check the settings in the gallery content type, all of the fields were locked and could not be edited. I tried Google for a solution, but not really anything turned up for this specific problem.

  • I see that the module is in beta version, and what you are asking is more of a feature request rather than question. Similar thread is running on Issues for media gallery. – AjitS Jun 4 '12 at 5:40
2

You should use Firebug and take a look at the function that gets called, when clicking on the "Next"-Button.(Something like onClick() )

Now take a look at the function, that gets called, when you click on the image.

Now just place the "Next"-Button function into the image. Delete the old one.

The functions are usually in a .js-File.

This is not so hard, i am a beginner and managed it with the shadowbox.

0

You may use this JQuery script to achive your required result. You can use JS Injector Module to insert this script or simply upload a js file in your theme folder and call it through .info file

/*
Redirects lightbox image click to advance to next image instead of opening image details.
Via http://drupal.org/node/1088738#comment-4362570
code from #12
Posted by stephandale on April 10, 2011 at 12:26pm
*/
(function ($) {

Drupal.behaviors.initColorboxDefaultStyle = {
  attach: function (context, settings) {
    $(document).bind('cbox_complete', function () {
    $('.lightbox-stack .gallery-thumb-inner a').click(function(e) {
        e.preventDefault();
        $.colorbox.next();
      });
    });
  }
};

})(jQuery);
0

I have had the same problem, and I can tell a little more about the reasons, in an example:

On the Gallery ( /galleries/myGallery) , you click on a photo and the colorbox opens. But the content of the colorbox is not only the image, but the body of /media-gallery/lightbox/11/22 . And this content features a link around the image, namely /media-gallery/detail/11/22 .

I cannot find a way to remove that link, but maybe this helps somebody to remove the problem without overwriting the standard behaviour with JavaScript. Which works of course, but there should be a better way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.