Will this module work with the Node Images module?
I've settled on Node Images as it seems the most user friendly / non-techie way of attaching images to nodes (and having them automatically deleted if the parent node is ever deleted), however I can't seem to get it to work with Lightbox2.

Thanks for any info.

Comments

chastytilayne’s picture

its pretty straight forward to include Lightbox2 support into any image module using the rel="lightbox" technique. i too decided on node images for its efficency...

but unless one or the other of these two modules choose to support one another you have to hack the simple tag into the source. nodeimage has its own javascript / pseduo lightbox thing going on with the image gallery feature it has, etc. but lightbox2 is much nicer to look at and more complex code.

it seems easier to approach node images..

for the most recent release of ni.. version = "6.x-2.1"
look in the node_images.module file around line 773:

    if ($format == 'thumbs') {
//      $output .= '<a href="javascript:void(0);" title="'.$description.'" onclick="window.open(\''.
//       file_create_url($image->filepath).'\', \'\', \'height='.$height.',width='.$width.'\');">'.$thumb.'</a> ';
	$output .= '<a href="' . file_create_url($image->filepath) .  '" title="' .$description. '"  rel="lightbox[' . $node->nid . ']" >' . $thumb . '</a>';
    }

all this does is change the thumbnail link from nodeimage's own popup window dealy to a grouped lightbox2 gallery.. dont include the and parts of this, and be careful with the { } brackets after the if statement and you should be fine even for a complete novice.

one more thing, looking at the information stored with nodeimage and it files:
it shouldnt be too too hard to get the images per node back out of the database. thats one of the big things with drupals image and file handling right now, maintaining relationships between files and their "parent" nodes. nodeimage handles all this on its own and its pretty darn efficient looking.. now it can be pretty looking on the display side too??

norvin1107’s picture

Many thanks chastytilayne ! I've gotten on to this problem and now its ok. Thanks again!

stella’s picture

Project: Lightbox2 » Node Images
Version: 5.x-2.9 » 6.x-2.1
Category: support » feature

Support for this needs to be added in the node images module, not lightbox2. Moving it to the appropriate issue queue.

nimek’s picture

You will find lightbox support here
https://drupal.org/node/2068723