Trying to figure out colorbox

Hi!

I'm trying to make colorbox work on both the image and exifdata in a copy of the default theme in 1.2.9-trunk.

I have looked at the Zenpage theme where it's used and working fine, so I thought I just copy some code from there to the default theme. I get the box working for both but the exif data box has no text at all. It starts at default size and then shrinks to nothing probably because there's nothing to show.

If I however comment out "<link rel="stylesheet" href="<?php echo $zenCSS ?>" type="text/css" />" in image.php the box works fine for exifdata...

I guess there's something colliding somewhere, but I can't figure it out.

Any help would be appreciated !

Comments

  • acrylian Administrator, Developer
    You need to look at the head of the theme files. Colorbox requires some JS code to tell it what links to use how (other than Thickbox). How to set that up is described on the colorbox site.

    That CSS link has nothing to do with the colorbox.
  • I'm trying to do the exact same. Pischla, did you get it to work?

    I'm stumped. The head section of my image.php is exactly the same as the other default themes included in 1.2.9 I used for reference which have the exifdata colorbox working. The only time I get it to work is when I omit my theme's style sheet as Pischla mentioned above.
  • acrylian Administrator, Developer
    The colorbox files are within zp-core/js. You have to included them from there into your theme. Several standard themes use it already for the Image info adn Zenpage theme for the full image display. Look there for an example.
  • gmh Member
    I am also having this problem. Has anyone figured out where the problem lies?
  • acrylian Administrator, Developer
    Maybe a little more specific what exactly you did? Did you compare the Zenpage theme with yours (whatever that is as you did not say it) and visited the colorbox site?
  • gmh Member
    Thanks for the reply. I am using a custom theme modified from the default. If I use the default them colorbox works fine when image info is selected. If I use my theme, the colorbox pops up and then immediately shrinks to a tiny size showing no information. I have compared my theme with the default and it appears I have the proper reference to the jquery.colorbox.min js and the colorbox.css. I can also replicate the behavior someone previously mentioned of getting the image info box to work if I comment out the reference to zen.css. I'm sure there is something I'm missing that's different between my theme and the default, I just can't figure out what it is. Also, I have visited the colorbox site but haven't yet found a solution to my problem there.

    Thanks for any assistance, you have a great program!
  • acrylian Administrator, Developer
    What do you call with the colorbox. Note that is does not work if the fullimages are protected (as discussed several times on the forum and if I remember right on the troubleshooting).
  • gmh Member
    I am calling getImageMetaData. I will look at the settings I have for full image protection. I guess since I could get the metadata before I upgraded to 1.2.9 I was thinking the problem had something to do with changing to colorbox instead of thickbox.
  • I'm having a similar issue. I have a theme I've built based on stopdesign and while the colorbox works in stopdesign it fails to work on my theme. I've checked the headers and seem to be including the correct JavaScript and CSS components but when I click in the EXIF link it shows a tiny colorbox in the middle of the screen with no data in it. Firebug shows that the data is contained within the colorbox but for some reason it's dimensions are not sufficient to show it. Any and all ideas welcome, a link which exhibits the problem is below

    http://www.kieranoshea.com/gallery/jog-race-guernsey-aug-11/IMG00378-20110826-1926.jpg.html
  • acrylian Administrator, Developer
    You need to do:
    a) Enable the colorbox plugin and allow it for the theme page needed
    b) Add the actual js calls on that theme page. It is not included automatically as it can be configured in dozend ways and it will never fit anyone.

    EDIT: Sorry, should have followed the link first. Something with your HTML/CSS is maybe not right, probably the width/height so the colorbox collapses.
  • I figured out what was causing the issue, just a tiny CSS change required to fix but took ages to find. For anyone else experiencing the same issue, try making the following change

    `#imagemetadata table {

    text-align: left;

    line-height: 1em;

    border: 1px solid #ccc;

    position: absolute;

    top: 2em;

    right: 0px;

    background-color: #fafafa;

    }`

    to be changed to

    `#imagemetadata table {

    text-align: left;

    line-height: 1em;

    border: 1px solid #ccc;

    top: 2em;

    right: 0px;

    background-color: #fafafa;

    }`

    Note the removal of the position attribute.

    Hope this helps someone!
Sign In or Register to comment.