Is it possible to configure colorbox to display images managed with node gallery?

Colorbox would normally be available as a formatter for image fields - I guess it's not available in this case because the field is File, and not Image(?)

I've thought about creating a custom formatter, but wanted to check first to see if there is already a solution or a recommended approach?

Thanks for a great module!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

loko’s picture

Same problem here.

I found this video but author did not say how he did it.

zengenuity’s picture

You might be able to configure the colorbox settings in the File Types configuration under Structure. That's where the image styles get set, so Colorbox may work there, as well.

dave bruns’s picture

FileSize
57.21 KB

Thanks for this idea. I hadn't even realized that the File Types menu was there!

I guess the File Types menu comes from the file entity module? I haven't used this module before so I feel pretty clueless about what to try and configure. I can see that I can enable additional displays, but I'm not sure that's the right direction?

My goal is to enable the colorbox formatter for the the file that represents an image in views (see attached image from another view that's using an image field and colorbox - for reference and as a reminder to myself about where I'm trying to get to).

Is the idea is to configure file types so that colorbox recognizes certain files as images, and therefore makes the colorbox formatter available?

If there's any info I should research or read first, just let me know. Also happy to post a question in the colorbox issue queue if that makes more sense.

Vagabondo’s picture

You could use Colorbox_node
http://drupal.org/project/colorbox_node
In this way you can show any other field you like as well.

janis_lv’s picture

i'd like this too, old versions had *box'es support.

dave bruns’s picture

I haven't had time to try this myself, but it looks like perhaps the media colorbox will do the trick: https://drupal.org/project/media_colorbox

Anyone using this with node gallery?

dave bruns’s picture

FileSize
75.3 KB
52.46 KB

I finally got a chance to try media gallery out. Basically, it seems to work, but with some issues noted below.

With a vanilla install of NG + media gallery, you have to change the Gallery Item > Gallery Media > Node Gallery Thumbnail to use the Media Colorbox formatter, then make sure the gallery type is "per page gallery". Screens attached for reference.

I've only looked at this briefly, but are two issues I see off-hand:

1. Captions don't work out of the box, and I'm not sure why yet. I have Media colorbox captions in the field formatter set to Title, but the title always displays "Gallery Media" in Colorbox. I need to poke around with this more. I haven't used file entity before and wonder if I need to do something with file types...

2. You only get to click through the images in the current view pager, not the full set. Not sure if there's a way around this or not, or it it's really that important.

Has anyone got colorbox media & NG working with captions successfully?

Edit: there seems to be a problem right now with media colorbox displaying other fields as captions: https://drupal.org/node/2060073

kappaluppa’s picture

I've got colorbox working via views and the colorbox trigger. But the rendered formats have built in links and I can't override them via the views. So I can't make the colorbox work by clicking on the image (sort of ), I have it working by clicking on the gallery item node title.

I can add colorbox, colorbox-load, or colorbox-node via the class field in "output this field as link" but it is showing the entire node - header/footer and all.

The biggest problem I'm running into is working with the image as a 'file' rather than an 'image'. All sorts of new problems come up because of this.

Stefan Vilonel’s picture

I've seen this is quite an old post but there is not enough info on the web about this.

bkat’s picture

Issue summary: View changes

I just made this work as follows:

1. Structure -> Content Types -> Node Gallery Image -> Manage Display
select Colorbox and configure it how you want. This only matters if you click on the image in a gallery image node, not in the gallery page.

2. Structure -> File Types -> Image -> Manage File Display -> Node Gallery File Thumbnail
select Colorbox and set content display to node_gallery_thumbnail, select the image style you want in the colorbox and set gallery to "per page gallery"

You can see it in action at https://usafl.com/galleries/2014/2014-afl-us-combine/naofall-folahan

krasch78’s picture

bkat I am not sure I understand the first part. Or I am not sure where to make the settings.
You say Structure ->Content Types -> Node Gallery Image -> Manage Display
I don't have a content type called Node Gallery Image, but I have "Gallery Item", - is that the one?

If so - where is it I have to select Colorbox?

Any chance you could add some screenshots with your settings? I would appreciate it very much!

bkat’s picture

The content type is actually Gallery Image (Machine name: node_gallery_image)
This is an individual image that will be linked to a gallery. I did a D6 to D7 upgrade so its possible that the names could be different from a clean D7 install.

You'll see in the screen shot, that I selected Colorbox as the format for the Gallery Image field. Please note, as I mentioned above, this setting only affects when viewing an individual gallery image. The second one is what makes the gallery view (thumbnail grid) turn into a slideshow when you click on one of the images.

nordicmaterial’s picture

Tested #12. Works indeed. Thank you, bkat.

dave bruns’s picture

Status: Active » Closed (fixed)

Revisiting this issue after a long time. I had the chance to try this out again today on a fresh Drupal 7.34 install with all the latest stuff (node gallery 7.x-1.0, colorbox 7.x-2.8) . What I found is that colorbox support is now pretty easy to enable with node gallery. My steps were pretty much the same as bkat above (thanks bkat!) , but:

1. On a fresh install, Node Gallery Image is now Node Gallery Item, and, because it's handled as a file, no need to make changes there.

2. Structure -> File Types -> Image -> Manage File Display -> Node Gallery File Thumbnail
select Colorbox and set content display to node_gallery_thumbnail, select the image style you want in the colorbox and set gallery to "per page gallery" (same as bkat)

The only thing I noticed is that the 'per page gallery' setting will collect all thumbnails on a page that contains node teasers (i.e. if you have 4 nodes displayed as teasers, with each node displaying 4 thumbnails in the strip view, colorbox will group all 16 together, even though they are not related.

Actually, to avoid a confusing experience for users, I'd rather just disable colorbox when thumbnails are in teaser mode. But I'm not sure how ... the combination of view modes on nodes and file types gets pretty confusing.

All that said, I'm going to close this issue.

senzaesclusiva’s picture

Lightbox2 and Node Gallery runs well in bundle on my D7.36

senzaesclusiva’s picture

Ops sorry, i posted in the wrong page :(