• Colorbox is working fine for images, but not for content. When I open a normal link to a webpage by adding class=’colorbox-link’, it opens a tiny window with nothing in it. I can set the window to 95% width and height via the settings page, but then all the images also open with a window on the background, 95% height and 95% wide.

    My questions/requests:

    Can the plugin be adjusted to automatically recognising the kind of content it is loading? In case of an image, add a window the size of that image, in case of content (html/php), use the settings given on the options page.

    Also, how can I adjust the whitespace around the images? There must be css for this, but I don’t know which lines to modify. I’d like to have a bit more whitespace/body around the images.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor techotronic

    (@techotronic)

    Hi,

    I already answered you first question here and here.

    There is one CSS file per theme, located in the plugin folder/themes/theme#/colorbox.css
    If you make substantial changes, I could think about including your theme in my plugin.

    Cheers,
    Arne

    Thread Starter Jack

    (@moxie)

    Thanks for the links 🙂
    I downloaded the new development version and the links works fine. So now I have the automated links for images, called from a thumb and given a class of cboxelement, and links opening in a fixed width and height window for external links like youtube and other webpages. However, when I open an internal image that I linked to with a text-link, this will also open in a fixed width and height window, given a class of colorbox-link. In case of a small image, there will be a lot of whitespace around the image. Couldn’t the plugin check if the link goes to a jpg,png or whatever other kind of image file?

    Plugin Contributor techotronic

    (@techotronic)

    Hi,
    yeah, you’re probably right about that, at the moment, every link with the class “colorbox-link” is opened with the width/height setting of the links and not the images.
    I’ll change that before releasing the next version, thanks!

    Cheers,
    Arne

    Plugin Contributor techotronic

    (@techotronic)

    Hi,
    I just committed the change, could you download and test the development version and tell me if everything works as expected?
    http://downloads.wordpress.org/plugin/jquery-colorbox.zip

    Cheers,
    Arne

    Thread Starter Jack

    (@moxie)

    Works fine, for the images loaded through a text link and manually given a class of colorbox-link. 🙂 But couldn’t this class be added automatically, just like in the case of thumbs? I’m not a coder, but I can’t see the difference between these two. One is a small image leading to a bigger image, the other is text leading to a bigger image. It would be nice if I didn’t need to add the class by myself for images. Not that I’m lazy, I just think it shouldn’t be necessary.

    Also, but that’s a tiny minor thingy, when opening a link, first you can see very briefly a bigger window appearing. After that it quickly resizes to the appropriate size. Has this got to do with the order in which your script works? If so, could this be altered, just for the sake of beauty? 😉 I’m thinking of first testing the size of the image and then opening the window, instead of the other way around. If this is how the script works.

    Thanks for making the changes!

    Plugin Contributor techotronic

    (@techotronic)

    Hi,
    1) you’re probably right, I could implement adding the “colorbox-link” class automatically to all text links. The problem will be making sure that the links are really only text links… I’ll have to think about that.
    2) that is caused by the parameters “initialWidth” and “initialHeight” that are set automatically by the colorbox library.
    I’ll include them on the settings page in one of the next versions.
    Cheers,
    Arne

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: jQuery Colorbox] A few issues/questions’ is closed to new replies.