I am very new to Drupal and even newer to ColorBox so please bear with me. I have installed CCK, ColorBox, ImageCache, and Views and I am trying to make a Gallery using them (Similar to how one would create a gallery using Thickbox). After I had them installed, I went though the following steps:
-Created two ImageCache presets (Thumbnail and Display)
-Created a new centent type (Images)
-Created a new default view
-Created a new display view
-PATH: /images
-FIELD: Content: Image: Colorbox Thumbnail

After this I got stuck. When I browse to that location I see the thumbnail how they should look, but when I click on the thumbnail the image is not displayed in a ColorBox.

My ColorBox settings:
-Page per Gallery
-ImageCache Preset: display
-Path to ColorBox: /site/all/libraries/colorbox
-I deleted 'admin*' from the "do not display Colorbox on"

Can anyone help me? Does anyone know of a good Colorbox - Drupal Tutorial?

Comments

frjo’s picture

Have you installed the Colorbox plugin in /site/all/libraries/?

Have you installed version 2.x of jQuery Update module? Version 1.x will not work.

This is in the README file.

eigentor’s picture

Yeah I also guess your jquery_update version and thus your jquery version is not right. Had the same error, the 2.x version of Jquery update solved the problem. Download it, disable jquery_update, enable it again and boom - all the beauty of colorbox.

pawel.traczynski’s picture

It's not enough to set in the colorbox settings the size which you prefer to trigger the colorbox script.
You also need to go back to your view definition and edit field that is responsible for displaying images.
Content->images or similar.
I the field edit form there is a select list named Format. Select 'Colorbox: ...".

If it still doesnt work be sure that the colorbox JavaScript file is located at sites\all\libraries\colorbox\colorbox.

Hope that helps.

milehighlife’s picture

acpete48317,

I'm having a similar issue. Were you able to get your group of images to display in Colorbox as a gallery?

Thanks!

HLopes’s picture

Same problem, two different sites.

Can't put colorbox to work, no matter what.

Tried all versions of jquery update.
I'm sure that the library is in the correct folder.
Cleared caches lots of times.
Even tried with a different theme.

Not working.

And javascript stopped working....

Gee thanks!

kiwi_steve’s picture

HLopes, Is "Gee thanks!" supposed to illicit some sort of sympathetic response? You've given little or no useful information that might provide a resolution and just 'had a whine'.

The guys writing and testing this module are giving up their own personal time to work on this for no financial gain, and I suspect the help you will get with a response like that is going to be frosty at best.

HLopes’s picture

No, just a whine of frustration like you said, for having this module break all the work i've been doing (everything that uses jquery/javascript).

Just a scare, it's fixed now.

Already lost a couple days around this module..

"But it's prettier than lightbox", they say...
"Maybe, but it doesn't work", i say...

What's up with relying on a alpha/dev of another module (jquery update)?

Anyway, the only thing firefox error console throws is

y is undefined
T is undefined

in jquery.colorbox-min.js

PS:

If you change it to development mode, it throws $overlay and $current not defined.

Don't bother on updating your modules, just updated core and 38 modules, still the same.

PPS:

Well, this is new... It's working in views preview, but not in page.

frjo’s picture

HLopes: Do you have a example site where we can take a look at this problem?

The Colorbox plugin only works with jQuery 1.3 and 1.4. Drupal 6 ships with jQuery 1.2.6. That’s why jQuery Update 2.x is needed. That’s is also the main reason why Colorbox module is still in beta.

The Colorbox module has some ruff edges still, but it does work, it's used on over a 1000 sites already.

HLopes’s picture

No, i haven't, it's still on the local server.

Can build up one on the next few days, just to show you what's happening.

Meanwhile, i've managed to restrict the differences in loaded scripts between views preview and in-page display.

in-page display is loading a couple scripts more than views preview -

views/js/tabs.js
views/js/ajax.js
misc/collapse.js
misc/textarea.js
misc/autocomplete.js
jquery_update/replace/tabledrag.js

views preview has just one script that isn't being loaded inpage -

views/js/ajax_view.js

frjo’s picture

HLopes: How are you using the Colorbox module? With Image or Image Field module or something else?

Just to triple check the dependencies. Check so you have these two lines in head on your pages:

<script type="text/javascript" src="/sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js?c"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.min.js?c"></script>

Try to load them also and make sure that the version for the Colorbox plugin is at least 1.3.6 and the version for jQuery is 1.3.2.

isaacfreeman’s picture

I had a similar problem to HLopes. The issue was that JQuery Update wasn't adding the newer JQuery version in .

Visiting settings/jquery_update, I found that neither radio button was active. Selecting "Production (Minified)" got things working.

HLopes’s picture

Found the problem.

Page.tpl.php had $scripts on top and drupal_add_js() on bottom, and they were clashing with each other. Don't know why, and how the hell the remaining objects using jQuery were working.

Changed $scripts from top to bottom and removed drupal_add_js().

Is there any problem in doing so? It might be the problem with the other site as well.

All working fine now, so i'm guessing it's ok.

Thanks for all the help.

HLopes’s picture

Oh yeah, and it's a really nice module.

When i've got some spare time i'll try to add the "Per view gallery" option to the module to make up for the patience you've all had with me.

frjo’s picture

Glad you got it working and looking forward to your contributions.

phprf’s picture

I had nearly the same problem, but I found out that it was because I was still including a script from Fancy Login. The only problem I am having is: getting colorbox to display the borders in IE. I am using Example 1.

frjo’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta6

phprf: The problem with IE borders with the example styles are documented in the README file.

Your best option is to copy the style in to your theme and fix the paths there.

frjo’s picture

Status: Active » Fixed
sinasalek’s picture

Just discovered that DHTML module conflict with ColorBox!! the page freezes

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

HupaGOMan’s picture

Version: 6.x-1.0-beta6 » 7.x-1.0-beta1
Status: Closed (fixed) » Active

D 7.0 - Colorbox plugin 1.3.17.1 - jQuery 1.5.2 and jQuery UI 1.8.11

In CType Article previously posted (last week) article with three images using Colorbox - worked fine.

Nothing changed - post new article with Colorbox - images won't show. Tried several times, Filtered HTML, Full HTML, installed updated jQuery 1.5.2 and jQuery UI 1.8.11, enabled, emptied cache, re-upload images, images show in edit mode, - the image is there, but will not show in article.

http://screencast.com/t/rPj7MmOncAVa

What am I doing wrong or what am I missing anyone plz?

frjo’s picture

Status: Active » Closed (fixed)

Please start your own issue and don't open up old ones that have been closed.