Lightbox2 works 100% "as advertised" for me - many thanks for all your good efforts!!

I do have, nevertheless, a minor issue with display in sequence of CCK ImageCache/ImageFields. They do display fine, no problem - but I cannot get them to display properly in sequence when a page consists of multiple nodes.

All my ImageCache/ImageFields are strictly single image fields.
I display them as "Lightbox2: Some ImageCache Type->original"

If I configure "Select Imagefield grouping in Views" as "Group by Node ID" I get all the images of the *main* node displayed in a nice sequence - but since my "page view" consists of multiple nodes displayed within one page (with the assistance of NodeFamily module), the imagefields contained in other "embedded" nodes are not available in the main display sequence - these are only independently available as single Lightbox views.

If I configure "Select Imagefield grouping in Views" as "Group by Field Name" I only get a single ungrouped Lightbox instance for each ImageCache/Imagefield - but not a nice sequential presentation of all images in view.

Question: how can I have a sequential presentation of *all* ImageCache/ImageFields available within a page view that consists of multiple nodes embedded in the viewed page?

Thanks & best regards,
abramo

.

CommentFileSizeAuthor
#7 405794-7.patch1.44 KBsp3boy

Comments

abramo’s picture

Title: CCK ImageField sequence display - minor clarification please » CCK ImageField sequence display problem
abramo’s picture

Category: feature » bug
Priority: Normal » Critical

I now realise this is a bug regarding the sequential display of all images within a viewed page comprising multiple nodes.

In short, there is no possibility under a CCK ImageCache/ImageField setup to have all images available in a viewed page display in a Lightbox2 sequence if that viewed page comprises multiple nodes.

Under such a CCK setup the URL configuration is automatically:
rel="lightbox[nid][image title]"

If a page is comprised of a number of nodes, a number of nid's is available in the multiple ImageCache/ImageField URLs on the page - and therefore Lightbox2 as it stands now does not provide in its CCK configuration any alternative that would allow all ImageFields in such a page to be displayed in sequence in a Lightbox2 screen.

None of the available CCK configuration alternatives:
- No grouping
- Group by Field Name
- Group by Node ID
- Group by Field Name and Node ID

allows for a sequential presentation in a Lightbox2 screen of all ImageFields on a page comprising multiple nodes (and therefore multiple nid's).

stella’s picture

Category: support » feature
abramo’s picture

Following some research, seems that Lightbox2 did have the capability in the past of displaying *all* CCK ImageFields in a viewed page irrespective of how many nodes that page comprised, as long as they were tagged for LIghtbox2 display.

However, this capability was terminated following the adoption of the suggestion introduced by this "issue" here: http://drupal.org/node/216078

As a temporary workaround for those needing to display all the ImageFields within a viewed page, irrespective of the number of nodes comprising that page, merely bring back the code in "lightbox2.module" to the state it used to be before the adoption of the above suggestion.

Proceed as follows:

- in Ligtbox2 configuration > CCK display settings > Select Imagefield grouping in Views:
select "Group by Field Name"

- in code of "lightbox2.module"
replace line 1881:
$rel = $rel .'['. $field['field_name'] .']['. $caption .']';
with:
$rel = $rel .'[cck_image_nodes]['. $caption .']';

This brings back the previously available functionality of displaying in a sequential Lightbox2 screen presentation *all* Lightbox2 ImageFields in a viewed page, irrespective of the number of nodes comprising that viewed page.

coniu’s picture

Category: bug » feature
Priority: Critical » Normal

hi,
i know that your version of drupal is different and this post is quite old.
but i hope this is useful for someone,
i had installed lightbox2 on drupal 6.x
i had the same problem until i discover the correct setting for lightbox:
-Automatic Handle image>>image node settings
automatic handler for image nodes: Lightbox Grouped
-general>>cck display settings
select imagefield grouping in views: no grouping

sp3boy’s picture

I've just started using Lightbox2 with Imagefield. I have a custom content type with two Imagefield fields and I have built a test view to show all images from multiple nodes. I can't get a result from the last suggestion. Setting the "grouping in views" to "no grouping" results in a rel= content with nothing in the first set of braces (content of second set omitted for clarity): lightbox[][...]. This results in Lightbox displaying the pop-up of each image when it's clicked, but no forward/backward links. Setting the node & field view grouping option allows me to browse within the images associated with each node but not across nodes.

Looking at the code in lightbox.js makes me think that a blank group name cannot be treated as "everything within the view output" but that's exactly what I'd like to do, same as @abramo.

So I'm thinking about the solution in #4...

sp3boy’s picture

Version: 5.x-2.9 » 6.x-1.x-dev
Component: User interface » Code
Status: Active » Needs review
StatusFileSize
new1.44 KB

Here is a small patch that adds an option in Admin / Settings / Lightbox2 / General / CCK Display Settings / "Select Imagefield grouping in Views" for "Group all nodes and fields". As I am using Drupal 6 I have built it against DRUPAL-6--1 but I would hope it could be back-ported for D5.

stella’s picture

Status: Needs review » Fixed

Committed for D6, thanks. It's unlikely that I'll port the patch for D5 as D7 is almost out.

abemonkey’s picture

Category: feature » support
Status: Fixed » Active

Not sure if my issue is exactly related but I'm having issues with Lightbox knowing what image has been opened in a group of images. You can clearly see what I'm talking about by checking out what I'm working on: axts.webfactional.com/products/lower if you click on a thumbnail in the middle of the group, when the lightbox opens it always says(1 of 8) instead of actually referencing which image it is and moving forward or back from there. Right now, the only way that I can get it to recognize any sort of grouping at all is to select "Group by node id" under the "CCK field settings" tab. Can someone either tell me what I'm doing wrong or what I should change to get the desired behavior? ie click on second thumbnail and the lightbox should say "image 2 of 8" with the option to advance forward or backward. Thanks! Just checked out my page in IE7 and the image order works! Weird. Still need help with the other browsers though!

abemonkey’s picture

Status: Active » Closed (fixed)

Just found in error in my jquery code. Had to do with a completely different function, but it was screwing up the picture order issue. Sorry.

glazzies’s picture

This patch worked great! Thanks for help!!

vaene’s picture

Great module, I think I just need guidance on the proper way to use it. I have a content type, portfolio_piece, with three cck fields:
1) field_port_image - a file type of widget image
2) field_project - a text field that tells which project the image is associated with
3) field_order - an integer field which gives the order of the image in that project

I created around 60 nodes of this type for each of 60 images and organized them into 6 different projects, created an image cache for portfolio thumb for the thumbnail and portfolio full for the full size view then went to views and create a separate view, display block, for each project. In the Views I used Content->field_port_image displaying as Portfolio Thumb for my fields and filtered by Content->field_project, and Sorted by Content->field_order. I then created to regular pages and added three view blocks to each page and got them into position using css.

Everything went swimmingly until I clicked the images and the lightbox2 was showing each image as part of a sequence of ALL the images on that page, from each of the three project view blocks, instead of just showing the image as part of the sequence of the particular view.

If I choose "Group by Field Name" or "Group all nodes and fields" I get all the images in the page, not just the images in the view, which is what I want. If I choose any other setting I get just the one image with no next and prev buttons. Is there any way for me to get just the sequence of the images in the particular view I have created when an image in that project view is clicked on? Or have I organized this in the wrong way to begin with?

Thanks for your help!