If u add colorbox theme to your template (css,js files in info) close but don't show up.

Comments

frjo’s picture

Category: bug » support

Did you copy the image directory as well? From the README:

"The easiest is to start with either the default style or one of the
example styles from the Colorbox plugin. Simply copy the whole
style folder to the theme and rename it and the files to
something logical."

If you want to start from e.g. the default theme in Colorbox you should copy the whole "colorbox/style/default" directory to you theme.

spamator12’s picture

Yes, next, previous button are working very well, but as I said Close button don't show up. I didn't change even one thing in theme (just copied it and add cs js relations in info file). If I choose Stockholm Syndrom everything works fine but if I choose my own template (none - but it's Stockholm Syndrom without any code change) there is no Close button.

This is probably some js error - related with files destinations or I just don't understand/misunderstood something.

BTW how to add more classes to colorbox (what file to edit)?

So images beside:
<a href="blebelbelbele.jpg" title="test1" class="colorbox imagefield imagefield-imagelink" rel="gallery-333"><img typeof="foaf:Image" src="blebleblelbelbleblele.jpg" alt="test1" title="test1" /></a>

would have:
<div class"class1"><div class"class2"><a href="blebelbelbele.jpg" title="test1" class="colorbox imagefield imagefield-imagelink" rel="gallery-333"><img typeof="foaf:Image" src="blebleblelbelbleblele.jpg" alt="test1" title="test1" /></a></div></div>

dolly nyc’s picture

I'm having the same problem. I copied the entire "Stockholm Syndrome" to my theme's directory, renamed the files .css and .js but like spamator12, didn't touch the code at all. The close box doesn't show up (haven't tried Prev & Next yet). Any solution?? Thanks

frjo’s picture

Tested in on a local Drupal 7 site just now and it seems to works as it should here.

Did you by any chance forget to include the styles js file in your **info file? Both the css and the js file need to be there.

dolly nyc’s picture

yes, the .js file is in my theme .info file as well as the .css file

does it have something to do with this line in the .js file [line 3]:
Drupal.behaviors.initColorboxStockholmsyndromeStyle =

As noted above, I only changed the filename and not any of the code itself, per the instructions in the README file--but could that be what's confusing the module? I am a total newbie, don't know much js, certainly not enough to know whether that is the problem, and don't know how to fix if it is.

dolly nyc’s picture

A followup: While waiting to hear a response, I changed the Colorbox configuration "Options" to "Custom" see if that made a difference; then changed back to Default: now the close box graphic shows up.

(Love Colorbox, but am still having issues, which I'll post in other existing threads.)

frjo’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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