Commit 62c7fbd0 authored by frjo's avatar frjo
Browse files

Renaming Colorbox script to the more correct Colorbox plugin, including the drush command.

parent f94b8e8d
......@@ -31,10 +31,10 @@ The Colorbox module:
* Style the Colorbox with a custom colorbox.css file in your theme.
* Option to open a login form by clicking on any login link
* Simple API to open any form in a Colorbox
* Drush command to download and install the Colorbox script in
* Drush command to download and install the Colorbox plugin in
sites/all/libraries
The Colorbox script:
The Colorbox plugin:
* Supports images, image groups, slideshow, ajax, inline, and
iframed content.
......@@ -52,9 +52,9 @@ Installation:
------------
1. Download and install the jQuery Update module version 6.x-2.x.
Make sure you get the 2.x version since 1.x will not work.
2. Download and unpack the Colorbox script itself to "sites/all/libraries".
2. Download and unpack the Colorbox plugin to "sites/all/libraries".
Link: http://colorpowered.com/colorbox/colorbox.zip
Drush users can use the command "drush colorbox-script".
Drush users can use the command "drush colorbox-plugin".
3. Place the Colorbox module directory in your modules folder (this will
usually be "sites/all/modules/").
4. Go to "Administer" -> "Site building" -> "Modules" and enable the module.
......@@ -69,7 +69,7 @@ all the configuration options.
Add a custom Colorbox style to your theme:
----------------------------------------
The easiest is to start with either the default style or one of the
example styles from the Colorbox script. Simply copy the whole
example styles from the Colorbox plugin. Simply copy the whole
style folder to the theme and rename it and the files to
something logical.
......@@ -96,11 +96,11 @@ Here is an example where the user register form is opened in an
Drush:
------
A Drush command is provides for easy installation of the Colorbox
script itself.
plugin itself.
% drush colorbox-script
% drush colorbox-plugin
The command will download the script and unpack it in "sites/all/libraries".
The command will download the plugin and unpack it in "sites/all/libraries".
It is possible to add another path as an option to the command, but not
recommended unless you know what you are doing.
......
......@@ -140,7 +140,7 @@ function colorbox_admin_settings() {
'#title' => t('Style'),
'#options' => $colorbox_styles,
'#default_value' => variable_get('colorbox_style', 'default'),
'#description' => t('Select the style to use for the Colorbox. The example styles are the ones that come with the Colorbox script. Select "None" if you have added Colorbox styles to your theme.'),
'#description' => t('Select the style to use for the Colorbox. The example styles are the ones that come with the Colorbox plugin. Select "None" if you have added Colorbox styles to your theme.'),
);
$form['colorbox_custom_settings']['colorbox_custom_settings_activate'] = array(
'#type' => 'radios',
......@@ -312,7 +312,7 @@ function colorbox_admin_settings() {
'#type' => 'textfield',
'#title' => t('Path to Colorbox'),
'#default_value' => $colorbox_path,
'#description' => t('Enter the path relative to Drupal root where the colorbox directory is located. NO trailing slash!'),
'#description' => t('Enter the path relative to Drupal root where the Colorbox plugin directory is located. NO trailing slash!'),
);
$form['colorbox_advanced_settings']['colorbox_compression_type'] = array(
'#type' => 'radios',
......
......@@ -7,7 +7,7 @@
*/
/**
* The Colorbox library URI.
* The Colorbox plugin URI.
*/
define('COLORBOX_DOWNLOAD_URI', 'http://colorpowered.com/colorbox/colorbox.zip');
......@@ -30,11 +30,11 @@ function colorbox_drush_command() {
$items = array();
// the key in the $items array is the name of the command.
$items['colorbox-script'] = array(
'callback' => 'drush_colorbox_script',
'description' => dt("Downloads the Colorbox library."),
$items['colorbox-plugin'] = array(
'callback' => 'drush_colorbox_plugin',
'description' => dt("Downloads the Colorbox plugin."),
'arguments' => array(
'path' => dt('Optional. A path where to install the Colorbox library. If omitted Drush will use the default location.'),
'path' => dt('Optional. A path where to install the Colorbox plugin. If omitted Drush will use the default location.'),
),
);
......@@ -55,8 +55,8 @@ function colorbox_drush_command() {
*/
function colorbox_drush_help($section) {
switch ($section) {
case 'drush:colorbox-script':
return dt("Downloads the Colorbox library from colorpowered.com, default location is sites/all/libraries.");
case 'drush:colorbox-plugin':
return dt("Downloads the Colorbox plugin from colorpowered.com, default location is sites/all/libraries.");
}
}
......@@ -71,7 +71,7 @@ function colorbox_drush_help($section) {
* To print something to the terminal window, use drush_print().
*
*/
function drush_colorbox_script() {
function drush_colorbox_plugin() {
$args = func_get_args();
if ($args[0]) {
$path = $args[0];
......@@ -93,11 +93,11 @@ function drush_colorbox_script() {
$filename = basename(COLORBOX_DOWNLOAD_URI);
$dirname = basename(COLORBOX_DOWNLOAD_URI, '.zip');
// Remove any existing Colorbox library directory
// Remove any existing Colorbox plugin directory
if (is_dir($dirname)) {
drush_log(dt('A existing Colorbox library was overwritten at @path', array('@path' => $path)), 'notice');
drush_log(dt('A existing Colorbox plugin was overwritten at @path', array('@path' => $path)), 'notice');
}
// Remove any existing Colorbox library zip archive
// Remove any existing Colorbox plugin zip archive
if (is_file($filename)) {
drush_op('unlink', $filename);
}
......@@ -118,9 +118,9 @@ function drush_colorbox_script() {
chdir($olddir);
if (is_dir($path .'/'. $dirname)) {
drush_log(dt('Colorbox library has been downloaded to @path', array('@path' => $path)), 'success');
drush_log(dt('Colorbox plugin has been downloaded to @path', array('@path' => $path)), 'success');
}
else {
drush_log(dt('Drush was unable to download the Colorbox library to @path', array('@path' => $path)), 'error');
drush_log(dt('Drush was unable to download the Colorbox plugin to @path', array('@path' => $path)), 'error');
}
}
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