I'm testing out a default install of colorbox and am not seeing off-site links open properly, just a turnstyle icon and no get request in firebug. Some links to drupal content work fine (all image links work) but others enf up redirect the page.

Is there a test I can add to keep those pages from redirecting? What would keep outside pages from loading in the modal?

The drupal settings js looks like "colorbox": { "transition": "fade", "speed": "350", "opacity": "0.90", "slideshow": true, "slideshowAuto": true, "slideshowSpeed": "2500", "slideshowStart": "start slideshow", "slideshowStop": "stop slideshow", "current": "{current} of {total}", "previous": "« Prev", "next": "Next »", "close": "Close", "overlayClose": true, "maxWidth": "100%", "maxHeight": "100%" }

Thanks for any help!

CommentFileSizeAuthor
#3 colorbox-load_ 880458_3.patch754 bytesfrjo

Comments

frjo’s picture

How does the url:s to open the external links look? If you want to open e.g. google.com in an Colorbox it needs to use an IFRAME.

You can set iframe to true like this:

"[path]?width=500&height=500&iframe=true"

More info in the README and under "Load in Colorbox" in the Colorbox settings.

nicknickoli’s picture

I'm looking at the documentation on http://colorpowered.com/colorbox/ and think Colorbox should be picking the format, iframe, image, or whatever automatically? If I add a class="colorbox-load" to some links, the panel will popup on them. The two bugs I'm having are with off site links (they don't show up in the iframe and redirect the page) and if there's a broken link (colorbox just hangs with an hourglass until I refresh).

Is there a workaround to get it picking the right type of window? I'm testing with some js like this-

$('head').append('<link type="text/css" rel="stylesheet" href="/sites/cozi.com/libraries/colorbox/example3/colorbox.css" />');
$('.panel-col-first .pane-content .node.full-article a').each(function() {
    if($(this).find('img').length) {
		$(this).colorbox({title: 'Gallery: '+ $(this).attr('alt'), rel: 'gallery' }); }
	else {
		$(this).colorbox({width:'100%', height:'100%', iframe: true}); }
});
$.colorbox.init();
frjo’s picture

StatusFileSize
new754 bytes

On the Colorbox setting page you can select the style you want to use.

In a coming version of the Colorbox module you will also be able to override the style for some specific path etc. via a hook.

Some changes to later version of Colorbox plugin seems to have broken the colorbox_loaf feature. The query part is not being striped away. Please try this patch and report back how it works for you.

frjo’s picture

Status: Active » Closed (fixed)