I just tried getting the node images module working and added a few images to a page. I really like how it let me choose to put the images before the text. I wanted to setup lightbox2 automatic image handling for that module but they dont appear to be integrated. I was on this page: /admin/settings/lightbox2/automatic

Can node images be configured to work with lightbox2?
Is there a better ( ie more common ) way of going about this?

Here is the page I was referring to:
http://lvorganics.com/node/2

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??