1 Drupal colorbox module:
2 ------------------------
4 Fredrik Jonsson (http://drupal.org/user/5546)
5 Joe Wheaton (http://drupal.org/user/298179)
7 License - GPL (see LICENSE)
12 Colorbox is a lightweight customizable lightbox plugin for jQuery
13 1.3 and 1.4. This module allows for integration of Colorbox into Drupal.
14 The jQuery library is a part of Drupal since version 5+.
16 Images, forms, iframed or inline content etc. can be displayed in a
17 overlay above the current page.
19 * jQuery - http://jquery.com/
20 * Colorbox - http://colorpowered.com/colorbox/
28 * Excellent integration with Image field and Image styles
29 * Choose between a default style and 5 example styles that are included.
30 * Style the Colorbox with a custom colorbox.css file in your theme.
31 * Option to open a login form by clicking on any login link
32 * Simple API to open any form in a Colorbox
33 * Drush command to download and install the Colorbox plugin in
38 * Supports images, image groups, slideshow, ajax, inline, and
40 * Appearance is controlled through CSS so users can restyle the box.
41 * Preloads background images and can preload upcoming images in a
43 * Generates W3C valid XHTML and adds no JS global variables and
45 * Tested in Firefox 2 & 3, Safari 3 & 4, Opera 9, Chrome,
46 Internet Explorer 6, 7, 8.
47 * Released under the MIT License.
52 1. Download and unpack the Colorbox plugin in "sites/all/libraries".
53 Link: http://colorpowered.com/colorbox/colorbox.zip
54 Drush users can use the command "drush colorbox-plugin".
55 2. Download and unpack the Colorbox module directory in your modules folder
56 (this will usually be "sites/all/modules/").
57 3. Go to "Administer" -> "Modules" and enable the module.
59 If you want to use Colorbox with the Embedded Media Field module
60 please check "Enable Colorbox load" in the settings.
65 Go to "Configuration" -> "Media" -> "Colorbox" to find
66 all the configuration options.
69 Use the Views Colorbox Trigger field:
70 ------------------------------------
74 Add a custom Colorbox style to your theme:
75 ----------------------------------------
76 The easiest is to start with either the default style or one of the
77 example styles from the Colorbox plugin. Simply copy the whole
78 style folder to the theme and rename it and the files to
81 Add entries in the themes info file for the Colorbox CSS/JS files.
83 In the Colorbox settings select "None" as style. This will leave the
84 styling of Colorbox up to your theme.
87 Load content in a Colorbox:
88 ----------------------------------
89 Check the "Enable Colorbox load" option in Colorbox settings.
91 This enables custom links that can open content in a Colorbox. Add the class "colorbox-load" to the link and build the url like this "[path]?width=500&height=500&iframe=true" or "[path]?width=500&height=500" if you don't want an iframe.
93 Other modules may activate this for easy Colorbox integration.
96 Load inline content in a Colorbox:
97 ----------------------------------
98 Check the "Enable Colorbox inline" option in Colorbox settings.
100 This enables custom links that can open inline content in a Colorbox. Inline in this context means some part/tag of the current page, e.g. a div. Replace "id-of-content" with the id of the tag you want to open.
102 Add the class "colorbox-inline" to the link and build the url like this "?width=500&height=500&inline=true#id-of-content".
104 Other modules may activate this for easy Colorbox integration.
107 Load a selection of forms in a Colorbox:
108 ----------------------------------------
109 Check the "Enable Colorbox load" option in Colorbox settings.
111 The following form_id can be used:
118 The links to open a form needs the class "colorbox-load". The URL should look like this.
120 "/colorbox/form/[form_id]?destination=[path_to_send_user_to_after_submit]&width=[with_in_pixel]&height=[height_in_pixel]".
122 Here is an example where the user register form is opened in an
123 500 by 250 pixel Colorbox.
125 <a class="colorbox-load" href="/colorbox/form/user_register_form?destination=user&width=500&height=250">Create new account</a>
130 A Drush command is provides for easy installation of the Colorbox
133 % drush colorbox-plugin
135 The command will download the plugin and unpack it in "sites/all/libraries".
136 It is possible to add another path as an option to the command, but not
137 recommended unless you know what you are doing.
140 Example styles borders do not display in Internet Explorer:
141 ----------------------------------------------------------
142 If you use one of the example styles and have problems with the border
143 images not loading in Internet Explorer please read
144 http://colorpowered.com/colorbox/#help_paths.
146 The default style in Colorbox module does not have this problem.
151 * Porting all features from the Thickbox module,
152 by Fredrik Jonsson (http://drupal.org/user/5546).
153 * Image module integration improvements by recrit
154 (http://drupal.org/user/452914).
155 * Help with testing and many good suggestions by Shane
156 (http://drupal.org/user/262473).