I am developing a drupal 7 website. I have noticed that lightbox2 is not built for drupal 7 yet, can anyone assist me in configuiring the colourbox module.

What am i trying to achieve, so far i have installed the module and plugin and can add images to an article - this is fine however its not what i am after. I am looking to have a basic page called gallery and be able to add as many images to this page to display thumbnails which on click will display the colorbox gallery. Is there any way i can set it up so that i am not having to create an article each time and style the images so they are in a gridview, say 4x4 and enable paging for any new images that are added.

Apologies, i am not a php developer and am new to this module. Or, can anyone advise on a more appropriate module to use and assist me in its development.

Thanks

Comments

dkeays’s picture

I did the same thing and had to use Views to do it in a similar way I did in Drupal6.
Here is a description of what I did.
http://www.rdksoftware.com/node/230.

Changes:
1- CCK, image-field, and file-field: they're built in and aren't needed.
2- Image Cache and Image API: use image effects (built in) instead.
3- When adding the Image field to the content type, limit it to one image.
4- Views settings
a- For the image field: Set the "formatter" to "colorbox", the "node image style" to "thumbnail" and the "colorbox image style" to "large" (or "normal").
b- add the title field as the first field and set 'Exclude from display'.
c- add a 'colorbox trigger' field below the title field and set it to "title".
5- There are no image-cache permissions to set.

The functionality I've lost is the ability to link from the lightbox (colorbox) to the node, display the summary in the lightbox, and download the node from the lightbox, and to add water-marks to the image. The last item has more to do with image effects than this module.

bwill’s picture

I tried patching this together using dkeays' method on a D7 install to no avail. does the developer have any suggestions?

dkeays’s picture

The part I got stuck on was 4a. After specifying an image field, you have to specify the formaters to use. In colorbox there are 2- one for the colorbox and one for the node.

Is this basically what you are looking for? This simple site is in 6, but the public photo album is basically what you want I think.

rdksoftware.com/family/photo_album

Anonymous’s picture

+1

cgalli’s picture

It's very simple. (took me a few hours nonetheless...)

in the colorbox settings, you can choose to view a gallery over the pics in each node or over all pics on the page. Choose the latter when displaying a view and all pic in the view will be shown in the gallery.

yurin’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta3
Assigned: crasher » yurin

Thanks for all your help, it really works for me on D7 except one thing: if the view is using pager (few images on each page), is there any way the gallery could display all images on all pages? All I can achieve now is just using gallery for all images on page, then user has to close it and click on "next page" - awful. Any help will be appriciated.

Todd Zebert’s picture

I'm looking for what @yurin is in #6!

frjo’s picture

@yurin, you need to add all the images to the first page one way another. This is the only way the Colorbox plugin can find them.

My first try would be to add all the remaining images in a views attachment and displaying them with a 1x1 pixel image style. A display:none: in the css as well most likely.

yurin’s picture

Thank you. I thought it won't be so easy. That's a pitty, because you have to load all the images into one page. This could be tricky when there are too many images. I'll give it a try anyway.

Anonymous’s picture

I wonder.. would they still show up in the colorbox if the field is disabled in the theme template? Then the user wouldn't have to d/l all the little images

hutch’s picture

@yurin, is there any way you can get the View you are using to insert the images as a href instead of img src, then you won't have to worry about images being loaded into the DOM, Colorbox will fetch them when they are required. See the example I posted recently, #1119880: Single Thumbnail That Opens a Colorbox Slideshow?

Katy J’s picture

I have a content type gallery set to display multiple images formatted with colorbox as thumbnails/large size. I then have a view that displays all these images in a block. The images are all showing up in colorbox on click, but are not linked i.e. there is no 'next' arrow and no real attribute in the source code.
I thought comment #5 was my solution to images in the view not forming a gallery, but still not working. I have 'per page gallery' selected in both the view and under settings in the content type > manage display. Does anyone have any other ideas why the gallery might not be working? Any thoughts most appreciated. Cheers.

hutch’s picture

I recently created a howto page here.
It describes how to get Galleria running in a Colorbox.

lsolesen’s picture

Status: Active » Closed (fixed)

Closing as @hutch created a howto page.

balcoder’s picture

If you have a view set up to show all content of type image. If each image is stored in a separate node (say you created a content type called photo and set the Number of values field to 1 then each image will be stored under a separate node) or you have both images stored in separate nodes and multiple images stored single nodes you will need to set the Gallery (image grouping) field to Per page gallery in your image content field in your view.