--- splash.module 2011-04-15 16:49:09.000000000 -0700 +++ splash.module.new 2011-04-15 16:45:34.000000000 -0700 @@ -196,6 +196,28 @@ function splash_init() { } drupal_add_js('$(document).ready(function(){ tb_show("", "'.$url.'") });', 'inline'); + } + // colorbox + else if (module_exists('colorbox') && ($splash_how['mode'] == 'colorbox')) { + //_colorbox_doheader(); + $query = array(); + $url_parts = parse_url($url); + // Open external URLs and templated texts in iFrame + if ($url_parts['scheme'] || $splash_what['mode'] == 'template') { + $query[] = 'iframe=true'; + } + if ($url_parts['scheme'] || $splash_what['mode'] == 'sequence') { + $query[] = 'ajax=1&iframe=true'; + } + // Set size + if ($size) { + $query[] = 'width='.$size[0].'&height='.$size[1]; + } + if (count($query)) { + $url = url($url, array('query' => implode('&', $query))); + } + drupal_add_js('$(document).ready(function(){ var timer = setTimeout(function(){ $.fn.colorbox({href:"'.$host.$url.'",open:true,width:"'.$size[0].'",height:"'.$size[1].'",speed:700,scrolling:false,opacity:0.5 }); },3000); });', 'inline'); + // New window } else if ($splash_how['mode'] == 'window') { @@ -233,4 +255,4 @@ function splash_page() { } } -?> \ No newline at end of file +?>