README.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. CONTENTS OF THIS FILE
  2. ----------------------
  3. * Introduction
  4. * Installation
  5. * Adding Lightbox Functionality to your Images
  6. - No Grouping
  7. - With Grouping
  8. - Slideshow
  9. - Video
  10. - HTML Content Support
  11. - Inline Content Support
  12. - Turning the Image Caption into a Link
  13. * Keyboard Shortcuts
  14. * Translation of Configured Strings
  15. * Known Issues
  16. - Keyboard Shortcuts in Opera
  17. INTRODUCTION
  18. ------------
  19. Maintainers:
  20. Stella Power (http://drupal.org/user/66894)
  21. Daniel F. Kudwien (http://drupal.org/user/54136)
  22. Mark Ashmead (http://drupal.org/user/52392)
  23. Fernando Correa da Conceição (http://drupal.org/user/889254)
  24. Documentation: http://drupal.org/node/144469
  25. Licensed under the GNU/GPL License
  26. Based on Lightbox v2.03.3 by Lokesh Dhakar
  27. <http://www.huddletogether.com/projects/lightbox2/>
  28. Originally written to make use of the Prototype framework, and Script.acalo.us,
  29. now altered to use jQuery.
  30. Permission has been granted to Mark Ashmead & other Drupal Lightbox2 module
  31. maintainers to distribute the original lightbox.js via Drupal.org under this
  32. license scheme. This file has been subsequently modified to make use of jQuery
  33. instead of prototype / script.acalo.us.
  34. This module enables the use of lightbox2 which places images above your
  35. current page, not within. This frees you from the constraints of the layout,
  36. particularly column widths.
  37. This module will include the lightbox CSS and JS files in your Drupal
  38. Installation without the need to edit the theme. The module comes with a
  39. Lightbox2 Lite option which does not use the jQuery libraries; it is therefore
  40. less likely to conflict with anything else.
  41. INSTALLATION
  42. ------------
  43. 1. Copy lightbox2 folder to modules directory.
  44. 2. At admin/build/modules enable the lightbox2 module.
  45. 3. Enable permissions at admin/user/permissions.
  46. 4. Configure the module at admin/settings/lightbox2.
  47. 5. Modify your image links to open in a lightbox where necessary, see "Adding
  48. Lightbox Functionality to your Images' section below.
  49. 6. If you need to play flv files, then you may need to install a FLV player.
  50. There are a number of freely available ones on the Internet, including
  51. http://www.jeroenwijering.com/
  52. ADDING LIGHTBOX FUNCTIONALITY TO YOUR IMAGES
  53. --------------------------------------------
  54. No Grouping
  55. ===========
  56. Add rel="lightbox" attribute to any link tag to activate the lightbox.
  57. For example:
  58. <a href="images/image-1.jpg" rel="lightbox">image #1</a>
  59. <a href="images/image-1.jpg" rel="lightbox[][my caption]">image #1</a>
  60. Optional: To show a caption either use the title attribute or put in the second
  61. set of [] of the rel attribute.
  62. With Grouping
  63. ==============
  64. If you have a set of related images that you would like to group, follow step
  65. one but additionally include a group name between square brackets in the rel
  66. attribute. For example:
  67. <a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
  68. <a href="images/image-2.jpg" rel="lightbox[roadtrip][caption 2]">image #2</a>
  69. <a href="images/image-3.jpg" rel="lightbox[roadtrip][caption 3]">image #3</a>
  70. No limits to the number of image sets per page or how many images are allowed
  71. in each set. Go nuts!
  72. If you have a set of images that you would like to group together in a
  73. lightbox, but only wish for one of these images to be visible on your page, you
  74. can assign the "lightbox_hide_image" class to hide the additional images. For
  75. example:
  76. <a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
  77. <a href="images/image-2.jpg" rel="lightbox[roadtrip]" class="lightbox_hide_image">image #2</a>
  78. <a href="images/image-3.jpg" rel="lightbox[roadtrip]" class="lightbox_hide_image">image #3</a>
  79. Slideshow
  80. =========
  81. This is very similar to the grouping functionality described above. The only
  82. difference is that "rel" attribute should be set to "lightshow" instead of
  83. "lightbox". Using the same example as above, we could launch the images in a
  84. slideshow by doing:
  85. <a href="images/image-1.jpg" rel="lightshow[roadtrip]">image #1</a>
  86. <a href="images/image-2.jpg" rel="lightshow[roadtrip][caption 2]">image #2</a>
  87. <a href="images/image-3.jpg" rel="lightshow[roadtrip][caption 3]">image #3</a>
  88. Video
  89. =====
  90. It's possible to show video content in the lightbox. In this case the "rel"
  91. attribute should be set to "lightvideo". It's possible to group videos and
  92. to control the size of the lightbox by setting the 'width' and 'height
  93. properties. The properties can be configured like
  94. "lightvideo[group|width:300px; height: 200px;]" and
  95. "lightvideo[|width:300px; height: 200px;][my caption]". The properties should
  96. all be of the format "property: value;" - note the closing semi-colon. If no
  97. properties are set, then the default width and height of 400px will be used.
  98. See below for more detailed examples.
  99. Basic example:
  100. <a href="http://video.google.com/videoplay?docid=1811233136844420765"
  101. rel="lightvideo">Google video example - default size</a>
  102. Basic example with caption:
  103. <a href="http://video.google.com/videoplay?docid=1811233136844420765"
  104. rel="lightvideo[][my caption]">Google video example - default size</a>
  105. Grouped example:
  106. <a href="http://video.google.com/videoplay?docid=29023498723974239479"
  107. rel="lightvideo[group][caption 1]">Grouped example 1</a>
  108. <a href="http://video.google.com/videoplay?docid=1811233136844420765"
  109. rel="lightvideo[group][caption 2]">Grouped example 2</a>
  110. Controlling lightbox size example:
  111. <a href="http://video.google.com/videoplay?docid=1811233136844420765"
  112. rel="lightvideo[|width:400px; height:300px;][my caption]">Google video example -
  113. custom size</a>
  114. Supported Video Formats
  115. asx, wmv, mov and swf videos should all be supported. A number of video
  116. providers are also supported, for example YouTube and Google Video. For full
  117. details on how to integrate these with lightbox, please see the online
  118. documentation.
  119. HTML Content Support
  120. ====================
  121. It's possible to show webpage content in the lightbox, using iframes. In this
  122. case the "rel" attribute should be set to "lightframe". Again it's possible to
  123. group the content, (e.g. "lightframe[search]") but in addition to that, it's
  124. possible to control some of the iframe properties. It's possible to set the
  125. 'width', 'height' and 'scrolling' properties of the iframe. The properties are
  126. separated from the group name by a '|', for example
  127. "lightframe[search|width:100px;]" and
  128. "lightframe[search|width:100px;][my caption]". If no grouping is being used,
  129. then the '|' is still used and the format would be "lightframe[|width:100px;]".
  130. The properties should all be of the format "property: value;" - note the closing
  131. semi-colon. If no iframe properties are set, then the default width and height
  132. of 400px will be used. See below for more detailed examples.
  133. Basic example:
  134. <a href="http://www.google.com" rel="lightframe">Search google</a>
  135. Basic example with caption:
  136. <a href="http://www.google.com" rel="lightframe[][my caption]">Search google</a>
  137. Grouped example:
  138. <a href="http://www.google.com" rel="lightframe[search]">Search google</a>
  139. <a href="http://www.yahoo.com" rel="lightframe[search][Search Yahoo]">Search yahoo</a>
  140. Controlling iframe property example:
  141. <a href="http://www.google.com" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">Search google</a>
  142. Controlling iframe property when grouped example:
  143. <a href="http://www.google.com" rel="lightframe[search|width:400px; height:300px; scrolling: auto;][Search Google]">Search google</a>
  144. <a href="http://www.yahoo.com" rel="lightframe[search|width:400px; height:300px;]">Search yahoo</a>
  145. <a href="http://www.yahoo.com" rel="lightframe[search|width:400px; height:300px;][Search Yahoo]">Search yahoo</a>
  146. Inline Content Support
  147. =======================
  148. It's possible to show HTML snippets in the lightbox, that is on the same domain.
  149. In this case the "rel" attribute should be set to "lightmodal". Again it's
  150. possible to group the content, (e.g. "lightmodal[search]") but in addition to
  151. that, it's possible to control some of the inline / modal properties. It's
  152. possible to set the 'width', 'height' and 'scrolling' properties of the inline
  153. content. The properties are separated from the group name by a '|', for example
  154. "lightmodal[search|width:100px;]" and
  155. "lightmodal[search|width:100px;][my caption]". If no grouping is being used,
  156. then the '|' is still used and the format would be "lightmodal[|width:100px;]".
  157. The properties should all be of the format "property: value;" - note the closing
  158. semi-colon. If no properties are set, then the default width and height of
  159. 400px will be used. See below for more detailed examples.
  160. Basic example:
  161. <a href="search.php" rel="lightmodal">Search</a>
  162. Basic example with caption:
  163. <a href="search.php" rel="lightmodal[][my caption]">Search</a>
  164. Grouped example:
  165. <a href="search.php" rel="lightmodal[search]">Search</a>
  166. <a href="search.php?status=1" rel="lightmodal[search][published]">Search published content</a>
  167. Controlling modal property example:
  168. <a href="search.php" rel="lightmodal[|width:400px; height:300px; scrolling: auto;]">Search</a>
  169. Controlling modal property when grouped example:
  170. <a href="search.php" rel="lightmodal[search|width:400px; height:300px; scrolling: auto;]">Search</a>
  171. <a href="search.php?status=1" rel="lightmodal[search|width:400px; height:300px;][Search published]">Search published content</a>
  172. <a href="search.php?status=0" rel="lightmodal[search|width:400px; height:300px;][Search Unpublished]">Search unpublished content</a>
  173. Turning the Image Caption into a Link
  174. =====================================
  175. If you wish to turn the caption into a link, format your caption in the
  176. following way:
  177. <a href="images/image-1.jpg" rel="lightbox[][&lt;a href=\"http://www.yourlink.com\"&gt;Clicky Visit Link&lt;/a&gt;'>image #1</a>
  178. Note, the < and > characters have been changed to their HTML entities, and the "
  179. have been escaped.
  180. KEYBOARD SHORTCUTS
  181. ------------------
  182. Not all of the default keyboard shortcuts work in the Opera browser, for example
  183. 'z' for toggling the zoom and 'spacebar' for toggling play / pause in
  184. slideshows. This can be overcome by updating your shortcut settings in the
  185. Opera preferences editor.
  186. The default keyboard shortcuts are listed below. You can override these on
  187. admin/settings/lightbox2.
  188. Close : x, o, c, ESC
  189. Previous Image : p, Left Arrow
  190. Next Image : n, Right Arrow
  191. Toggle Zoom : z (not available in slideshow)
  192. Toggle Play / Pause : Spacebar (slideshow only)
  193. TRANSLATION OF CONFIGURED STRINGS
  194. ----------------------------------
  195. In order to translate the lightbox2 configuration strings, such as the text for
  196. the "View Image Details" link and the image count, please install the i18n:
  197. internationalization module and follow the instructions at
  198. http://drupal.org/node/134002.
  199. KNOWN ISSUES
  200. ------------
  201. Keyboard Shortcuts in Opera
  202. ---------------------------
  203. Not all of the default keyboard shortcuts work in the Opera browser, for example
  204. 'z' for toggling the zoom and 'spacebar' for toggling play / pause in
  205. slideshows. This can be overcome by updating your shortcut settings in the
  206. Opera preferences editor.