Commit 0dcf6ff1 authored by frjo's avatar frjo
Browse files

Changes to work with Colorbox plugin version 1.3.21.1. The script files are no...

Changes to work with Colorbox plugin version 1.3.21.1. The script files are no longer in a subdirectory.
parent 88bea371
...@@ -294,10 +294,15 @@ function colorbox_get_version($colorbox_js = NULL) { ...@@ -294,10 +294,15 @@ function colorbox_get_version($colorbox_js = NULL) {
function colorbox_get_js() { function colorbox_get_js() {
$library_path = colorbox_get_path(); $library_path = colorbox_get_path();
if (file_exists($library_path . '/colorbox/jquery.colorbox.js') && file_exists($library_path . '/colorbox/jquery.colorbox-min.js')) { // Support for older version of the Colorbox plugin, pre 1.3.21.1.
if (is_dir($library_path . '/colorbox')) {
$library_path = $library_path . '/colorbox';
}
if (file_exists($library_path . '/jquery.colorbox.js') && file_exists($library_path . '/jquery.colorbox-min.js')) {
$colorbox_js_map = array('none' => 'jquery.colorbox.js', 'min' => 'jquery.colorbox-min.js'); $colorbox_js_map = array('none' => 'jquery.colorbox.js', 'min' => 'jquery.colorbox-min.js');
$colorbox_js = $colorbox_js_map[variable_get('colorbox_compression_type', 'min')]; $colorbox_js = $colorbox_js_map[variable_get('colorbox_compression_type', 'min')];
return $library_path . '/colorbox/' . $colorbox_js; return $library_path . '/' . $colorbox_js;
} }
// else { // else {
// drupal_set_message(t('You need to download the !colorbox and extract the entire contents of the archive into the %path folder of your server.', array('!colorbox' => l(t('Colorbox plugin'), 'http://colorpowered.com/colorbox/'), '%path' => $library_path)), 'error', FALSE); // drupal_set_message(t('You need to download the !colorbox and extract the entire contents of the archive into the %path folder of your server.', array('!colorbox' => l(t('Colorbox plugin'), 'http://colorpowered.com/colorbox/'), '%path' => $library_path)), 'error', FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment