Hi,

Is there a way to make this happen:

Clicking on one image that will leads to the display of the next one? Thanks.

Hang

Comments

foredoc’s picture

It will be great, if the next/previous functionality will be integrated with the mouse/pointer position on the currently browsed image.

For example, if the mouse is clicked on the left part of the image, then the image will be replaced by the previous one; if the mouse is clicked on the right part of the image, then the image will be replaced by the next one.

Any ideas how to make this happen? Thanks.

scroogie’s picture

The original functionality (click for next image) can be enabled by choosing the correct display formatter on the "Display fields" page of CCK for your image content type. If you have the advanced_help module activated, there should be a help text describing that on /admin/advanced_help/node_gallery

Implementing image areas like suggested in the first comment can be done by implementing an additional formatter. See node_gallery_field_formatter_info() in node_gallery.module and theme_node_gallery_formatter_nextimagelink in theme.inc for examples.

foredoc’s picture

Status: Active » Closed (fixed)

Thanks. I will take a look.

foredoc’s picture

Status: Closed (fixed) » Active

Hi,

I checked node_gallery_field_formatter_info(), and theme_node_gallery_formatter_nextimagelink. It is easy to understand how "click"=>"next" logic is achieved. However, I am still not sure how to encode the logic like:

"click left part of image"=> prevous image
"click right part of image" => next image

Do I have to use jQuery for this purpose?

Thanks.

scroogie’s picture

There are different ways to achieve this. You can e.g. define HTML areas on the image, either with jQuery or statically. Or you could use the image through CSS background and create two linked divs in front of it. Or you could directly track the mouse position by X and Y coordinates with jQuery.

scroogie’s picture

Category: support » feature
Status: Active » Postponed

This might be a feature for a future version, or even for an additional module that implements display formatters.

justintime’s picture

Title: Click on a image leads to the next image? » Click left side of image for previous image, right side for next

updating title

Prodigy’s picture

You could also implement something similar by displaying prev and next arrows to the left(prev) and right(next) of the image.

A 'dirty' way would be to modify the image navigator template and turn the previous and next text links into images.

Just use CSS to position them absolutely, relative to the image or another div.

zengenuity’s picture

Status: Postponed » Closed (won't fix)

At this point, I won't be adding new features to the D6 version. If features are wanted for D7, please post a new issue.