diff --git a/colorbox.install b/colorbox.install index 9668968..b441372 100644 --- a/colorbox.install +++ b/colorbox.install @@ -14,13 +14,15 @@ function colorbox_requirements($phase) { if ($phase == 'runtime') { $t = get_t(); $library = libraries_detect('colorbox'); + $error_type = isset($library['error']) ? drupal_ucfirst($library['error']) : ''; + $error_message = isset($library['error message']) ? $library['error message'] : ''; if (empty($library['installed'])) { $requirements['colorbox_plugin'] = array( 'title' => $t('Colorbox plugin'), - 'value' => $t('At least @a', array('@a' => COLORBOX_MIN_PLUGIN_VERSION)), + 'value' => $t('@e: At least @a', array('@e' => $error_type, '@a' => COLORBOX_MIN_PLUGIN_VERSION)), 'severity' => REQUIREMENT_ERROR, - 'description' => $t('You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array('!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => 'sites/all/libraries')), + 'description' => $t('!error You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array('!error' => $error_message, '!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => 'sites/all/libraries')), ); } elseif (version_compare($library['version'], COLORBOX_MIN_PLUGIN_VERSION, '>=')) { diff --git a/colorbox.module b/colorbox.module index ee6d9be..ad8d231 100644 --- a/colorbox.module +++ b/colorbox.module @@ -77,7 +77,7 @@ function colorbox_libraries_info() { $libraries['colorbox'] = array( 'name' => 'Colorbox plugin', 'vendor url' => 'http://www.jacklmoore.com/colorbox', - 'download url' => 'http://www.jacklmoore.com/colorbox', + 'download url' => 'https://github.com/jackmoore/colorbox/archive/1.x.zip', 'version arguments' => array( 'file' => 'jquery.colorbox-min.js', 'pattern' => '@(?i:Colorbox) v([0-9\.a-z]+)@',