| 1 |
<?php |
<?php |
| 2 |
// $Id: lightbox2.module,v 1.16.2.16.2.152 2009/08/09 15:06:16 tracypilcher Exp $ |
// $Id: lightbox2.module,v 1.16.2.16.2.153 2009/09/05 09:52:26 snpower Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 22 |
function lightbox2_help($path, $arg) { |
function lightbox2_help($path, $arg) { |
| 23 |
switch ($path) { |
switch ($path) { |
| 24 |
case 'admin/modules#description': |
case 'admin/modules#description': |
| 25 |
return t('Enables Lightbox2 for Drupal'); |
$output = t('Enables Lightbox2 for Drupal'); |
| 26 |
|
break; |
| 27 |
case 'admin/help#lightbox2': |
case 'admin/help#lightbox2': |
| 28 |
return t('<h3>Overview</h3> |
$output = '<h3>'. t('Overview') .'</h3>'; |
| 29 |
<p align="justify">Lightbox2 JS is a simple, unobtrusive script used to overlay images on the current page. It\'s a snap to setup and works on all modern browsers. The module comes with a Lightbox2 Lite option which does not use the JQuery libraries; it is therefore less likely to conflict with anything else.</p> |
$output .= '<p>'. t('Lightbox2 JS is a simple, unobtrusive script used to overlay images on the current page. It\'s a snap to setup and works on all modern browsers. The module comes with a Lightbox2 Lite option which does not use the JQuery libraries; it is therefore less likely to conflict with anything else.') .'</p>'; |
| 30 |
<p align="justify">Places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths. Keeps users on the same page. Clicking to view an image and then having to click the back button to return to your site is bad for continuity (and no fun!).</p> |
$output .= '<p>'. t('Places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths. Keeps users on the same page. Clicking to view an image and then having to click the back button to return to your site is bad for continuity (and no fun!).') .'</p>'; |
| 31 |
<h3>Features</h3> |
// Features |
| 32 |
The version 2 module has several benefits over the plain Lightbox module. Note, not all of these features are available when the "Lightbox2 Lite" option is enabled. |
$output .= '<h3>'. t('Features') .'</h3>'; |
| 33 |
<ul> |
$output .= '<p>'. t('The version 2 module has several benefits over the plain Lightbox module. Note, not all of these features are available when the "Lightbox2 Lite" option is enabled.') .'</p>'; |
| 34 |
<li>Image Sets: group related images and navigate through them with ease - ideal for your image galleries.</li> |
$output .= '<ul>'; |
| 35 |
<li>Slideshow Capability: automatically transition between grouped images, includes play/pause and previous and next buttons.</li> |
$output .= '<li>'. t('Image Sets: group related images and navigate through them with ease - ideal for your image galleries.') .'</li>'; |
| 36 |
<li>HTML Content Support: ability to show websites or other HTML content in a lightbox.</li> |
$output .= '<li>'. t('Slideshow Capability: automatically transition between grouped images, includes play/pause and previous and next buttons.') .'</li>'; |
| 37 |
<li>Video Content Support: ability to show videos in a lightbox.</li> |
$output .= '<li>'. t('HTML Content Support: ability to show websites or other HTML content in a lightbox.') .'</li>'; |
| 38 |
<li>Visual Effects: fancy pre-loader and transition when you click on the image.</li> |
$output .= '<li>'. t('Video Content Support: ability to show videos in a lightbox.') .'</li>'; |
| 39 |
<li>Keyboard Shortcuts: useful <a href="http://drupal.org/node/249827">keyboard shortcuts</a> for switching between images, toggling play / pause, etc.</li> |
$output .= '<li>'. t('Visual Effects: fancy pre-loader and transition when you click on the image.') .'</li>'; |
| 40 |
<li>Zoom Capability: larger images are reduced in size so they fit snugly inside the browser window. A zoom button can then be clicked on to see it in its original size.</li> |
$output .= '<li>'. t('Keyboard Shortcuts: useful <a href="http://drupal.org/node/249827">keyboard shortcuts</a> for switching between images, toggling play / pause, etc.') .'</li>'; |
| 41 |
<li>Automatic Image Detection: configurable automatic re-formatting of |
$output .= '<li>'. t('Zoom Capability: larger images are reduced in size so they fit snugly inside the browser window. A zoom button can then be clicked on to see it in its original size.') .'</li>'; |
| 42 |
image thumbnails, so there is no need to add \'rel="lightbox"\' to each |
$output .= '<li>'. t('Automatic Image Detection: configurable automatic re-formatting of image thumbnails, so there is no need to add \'rel="lightbox"\' to each image link on your site. '); |
| 43 |
image link on your site. <a |
$output .= t('<a href="!image">Image</a>, <a href="!inline">Inline</a>, <a href="!flickr">Flickr</a>, <a href="!img_assist">Image Assist</a> and <a href="!imagefield">CCK Imagefield</a> modules are all supported. ', array('!image' => 'http://drupal.org/project/image', '!inline' => 'http://drupal.org/project/inline', '!flickr' => 'http://drupal.org/project/flickr', '!img_assist' => 'http://drupal.org/project/img_assist', '!imagefield' => 'http://drupal.org/project/imagefield')); |
| 44 |
href="http://drupal.org/project/image">Image</a>, <a |
$output .= t('It\'s also possible to configure a custom list of image classes which should trigger the lightbox functionality.'); |
| 45 |
href="http://drupal.org/project/inline">Inline</a>, <a |
$output .='</li>'; |
| 46 |
href="http://drupal.org/project/flickr">Flickr</a>, <a |
$output .= '<li>'. t('<a href="!imagecache">Imagecache</a> Support: adds a Lightbox2 field formatter for <a href="!imagefield">CCK imagefields</a> for your custom <a href="!views">views</a>.', array('!imagecache' => 'http://drupal.org/project/imagecache', '!imagefield' => 'http://drupal.org/project/imagefield', '!views' => 'http://drupal.org/project/views')). '</li>'; |
| 47 |
href="http://drupal.org/project/img_assist">Image Assist</a> and <a |
$output .= '<li>'. t('Image Page Link: a link to the image node can be provided within the lightbox itself.') .'</li>'; |
| 48 |
href="http://drupal.org/project/imagefield">CCK Imagefield</a> modules are all |
$output .= '<li>'. t('Page Exclusion Capability: exclude certain pages on your site from having the lightbox2 functionality.') .'</li>'; |
| 49 |
supported. It\'s also possible to configure a custom list of image classes |
$output .= '<li>'. t('Login Support: ability to modify all user/login links so the login form appears in a lightbox.') .'</li>'; |
| 50 |
which should trigger the lightbox functionality.</li> |
$output .= '<li>'. t('Skin and Animation Configuration: configure the order and speed of the lightbox animations, along with the lightbox colors, border size and overlay opacity.') .'</li>'; |
| 51 |
<li><a href="http://drupal.org/project/imagecache">Imagecache</a> Support: adds a Lightbox2 field formatter for <a href="http://drupal.org/project/imagefield">CCK imagefields</a> for your custom <a href="http://drupal.org/project/views">views</a>.</li> |
$output .= '<li>'. t('Gallery 2 Support: support for Gallery 2 images via the <a href="!gallery">Gallery</a> module (beta).', array('!gallery' => 'http://drupal.org/project/gallery')) .'</li>'; |
| 52 |
<li>Image Page Link: a link to the image node can be provided within the lightbox itself.</li> |
$output .= '</ul>'; |
| 53 |
<li>Page Exclusion Capability: exclude certain pages on your site from having the lightbox2 functionality.</li> |
// Usage |
| 54 |
<li>Login Support: ability to modify all user/login links so the login form appears in a lightbox.</li> |
$output .= '<h3>'. t('Usage') .'</h3>'; |
| 55 |
<li>Skin and Animation Configuration: configure the order and speed of the lightbox animations, along with the lightbox colors, border size and overlay opacity.</li> |
$output .= '<h5 style="text-decoration: underline;">'. t('Adding a Basic Lightbox') .'</h5>'; |
| 56 |
<li>Gallery 2 Support: support for Gallery 2 images via the <a href="http://drupal.org/project/gallery">Gallery</a> module (beta).</li> |
$output .= '<p>'. t('Add rel="lightbox" attribute to any link tag to activate the lightbox. For example:') .'</p>'; |
| 57 |
</ul> |
$output .= '<code>'. t('<a href="image-1.jpg" rel="lightbox">image #1</a><br /> |
| 58 |
<p align="justify"><h3>Usage</h3></p> |
<a href="image-1.jpg" rel="lightbox[][my caption]">image #1</a>') .'</code>'; |
| 59 |
<h5 style="text-decoration: underline;">Adding a Basic Lightbox</h5> |
$output .= '<p>'. t('Optional: To show a caption either use the title attribute or put in the second set of [] of the rel attribute.') .'</p>'; |
| 60 |
<p>Add rel="lightbox" attribute to any link tag to activate the lightbox. For example: </p> |
// Grouping Images |
| 61 |
<p><a href="image-1.jpg" rel="lightbox">image #1</a></p> |
$output .= '<h5 style="text-decoration: underline;">'. t('Grouping Images') .'</h5>'; |
| 62 |
<p><a href="image-1.jpg" rel="lightbox[][my caption]">image #1</a></p> |
$output .= '<p>'. t('If you have a set of related images that you would like to group, follow step one but additionally include a group name between square brackets in the rel attribute. For example:') .'</p>'; |
| 63 |
<p>Optional: To show a caption either use the title attribute or put in the second set of [] of the rel attribute.</p> |
$output .= '<code>'. t('<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a><br /> |
| 64 |
<h5 style="text-decoration: underline;">Grouping Images</h5> |
<a href="images/image-2.jpg" rel="lightbox[roadtrip][caption 2]">image#2</a><br /> |
| 65 |
<p>If you have a set of related images that you would like to group, follow |
<a href="images/image-3.jpg" rel="lightbox[roadtrip][caption 3]">image#3</a>') .'</code>'; |
| 66 |
step one but additionally include a group name between square brackets in the |
$output .= '<p>'. t('No limits to the number of image sets per page or how many images are allowed in each set.') .'</p>'; |
| 67 |
rel attribute. For example:</p><p><a href="images/image-1.jpg" |
$output .= '<p>'. t('If you have a set of images that you would like to group together in a lightbox, but only wish for one of these images to be visible on your page, you can assign the "lightbox_hide_image" class to hide the additional images. For example:') .'</p>'; |
| 68 |
rel="lightbox[roadtrip]">image #1</a><br /> |
$output .= '<p><code>'. t('<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a><br /> |
| 69 |
<a href="images/image-2.jpg" rel="lightbox[roadtrip][caption 2]">image |
<a href="images/image-2.jpg" rel="lightbox[roadtrip]" class="lightbox_hide_image">image #2</a><br /> |
| 70 |
#2</a><br /> |
<a href="images/image-3.jpg" rel="lightbox[roadtrip][caption 3]" class="lightbox_hide_image">image #3</a>') .'</code></p>'; |
| 71 |
<a href="images/image-3.jpg" rel="lightbox[roadtrip][caption 3]">image |
// Slideshow |
| 72 |
#3</a><br /></p> |
$output .= '<h5 style="text-decoration: underline;">'. t('Slideshow') .'</h5>'; |
| 73 |
<p>No limits to the number of image sets per page or how many images are allowed |
$output .= '<p>'. t('This is very similar to the grouping functionality described above. The only difference is that "rel" attribute should be set to "lightshow" instead of "lightbox". Using the same example as above, we could launch the images in a slideshow by doing:') .'</p>'; |
| 74 |
in each set.</p> |
$output .= '<p><code>'. t('<a href="images/image-1.jpg" rel="lightshow[roadtrip]">image #1</a><br /> |
| 75 |
|
<a href="images/image-2.jpg" rel="lightshow[roadtrip][caption 2]">image #2</a><br /> |
| 76 |
<p>If you have a set of images that you would like to group together in a lightbox, but only wish for one of these images to be visible on your page, you can assign the "lightbox_hide_image" class to hide the additional images. For example:</p> |
<a href="images/image-3.jpg" rel="lightshow[roadtrip][caption 3]">image #3</a>') .'</code></p>'; |
| 77 |
|
// Video Content |
| 78 |
<p><a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a><br /> |
$output .= '<h5 style="text-decoration: underline;">'. t('Video Content') .'</h5>'; |
| 79 |
<a href="images/image-2.jpg" rel="lightbox[roadtrip]" class="lightbox_hide_image">image #2</a><br /> |
$output .= '<p>'. t('It\'s possible to show video content in the lightbox. In this case the "rel" attribute should be set to <code>lightvideo</code>. It\'s possible to group videos and to control the size of the lightbox by setting the \'width\' and \'height\' properties. The properties can be configured like <code>lightvideo[group|width:300px; height: 200px;]</code> and <code>lightvideo[|width:300px; height: 200px;][my caption]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no properties are set, then the default width and height of 400px will be used. See below for more detailed examples.') .'</p>'; |
| 80 |
<a href="images/image-3.jpg" rel="lightbox[roadtrip][caption 3]" class="lightbox_hide_image">image #3</a></p> |
$output .= '<p>'. t('Basic example:') .'<br />'; |
| 81 |
|
$output .= '<code>'. t('<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo">Google video example - default size</a>') .'</code></p>'; |
| 82 |
<h5 style="text-decoration: underline;">Slideshow</h5> |
$output .= '<p>'. t('Basic example with caption:') .'<br />'; |
| 83 |
<p>This is very similar to the grouping functionality described above. The only difference is that "rel" attribute should be set to "lightshow" instead of "lightbox". Using the same example as above, we could launch the images in a slideshow by doing:</p> |
$output .= '<code>'. t('<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[][my caption]">Google video example - default size</a>') .'</code></p>'; |
| 84 |
|
$output .= '<p>'. t('Grouped example:') .'<br />'; |
| 85 |
<p><a href="images/image-1.jpg" rel="lightshow[roadtrip]">image #1</a><br /> |
$output .= '<code>'. t('<a href="http://video.google.com/videoplay?docid=29023498723974239479" rel="lightvideo[group][my caption]">Grouped example 1</a><br /> |
| 86 |
<a href="images/image-2.jpg" rel="lightshow[roadtrip][caption 2]">image #2</a><br /> |
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[group][my caption]">Grouped example 2</a>') .'</code></p>'; |
| 87 |
<a href="images/image-3.jpg" rel="lightshow[roadtrip][caption 3]">image #3</a></p> |
$output .= '<p>'. t('Controlling lightbox size example:') .'<br />'; |
| 88 |
|
$output .= '<code>'. t('<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[|width:400px; height:300px;][my caption]">Google video example - custom size</a>') .'<br /></code></p>'; |
| 89 |
<h5 style="text-decoration: underline;">Video Content</h5> |
$output .= '<p>'. t('Supported Video Formats:') .'<br />'; |
| 90 |
<p> |
$output .= t('asx, wmv, mov and swf videos should all be supported. A number of video providers are also supported, for example YouTube and Google Video. For full details on how to integrate these with lightbox, please see the online documentation.') .'</p>'; |
| 91 |
It\'s possible to show video content in the lightbox. In this case the "rel" attribute should be set to <code>lightvideo</code>. It\'s possible to group videos and to control the size of the lightbox by setting the \'width\' and \'height\' properties. The properties can be configured like <code>lightvideo[group|width:300px; height: 200px;]</code> and <code>lightvideo[|width:300px; height: 200px;][my caption]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no properties are set, then the default width and height of 400px will be used. See below for more detailed examples.</p> |
// HTML Content |
| 92 |
|
$output .= '<h5 style="text-decoration: underline;">'. t('HTML Content') .'</h5>'; |
| 93 |
<p>Basic example:<br /> |
$output .= '<p>'. t('It\'s possible to show webpage content in the lightbox, using iframes. In this case the "rel" attribute should be set to <code>lightframe</code>. Again it\'s possible to group the items, (e.g. <code>lightframe[search]</code>) but in addition to that, it\'s possible to control some of the iframe properties. It\'s possible to set the \'width\', \'height\' and \'scrolling\' properties of the iframe. The properties are separated from the group name by a <code>|</code>, for example <code>lightframe[search|width:100px;]</code> and <code>lightframe[search|width:120px][my caption]</code>. If no grouping is being used, then the <code>|</code> is still used and the format would be <code>lightframe[|width:100px;]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no iframe properties are set, then the default width and height of 400px will be used. See below for more detailed examples.') .'</p>'; |
| 94 |
<code> |
$output .= '<p>'. t('Basic example:') .'<br />'; |
| 95 |
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo">Google video example - default size</a><br /> |
$output .= '<code>'. t('<a href="http://www.google.com" rel="lightframe[][Search Google]">Search google</a>') .'</code></p>'; |
| 96 |
</code></p> |
$output .= '<p>'. t('Grouped example:') .'<br />'; |
| 97 |
|
$output .= '<code>'. t('<a href="http://www.google.com" rel="lightframe[search]">Search google</a><br /> |
| 98 |
<p>Basic example with caption:<br /> |
<a href="http://www.yahoo.com" rel="lightframe[search][Search Yahoo]">Search yahoo</a>') .'</code></p>'; |
| 99 |
<code> |
$output .= '<p>'. t('Controlling iframe property example:') .'<br />'; |
| 100 |
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[][my caption]">Google video example - default size</a><br /> |
$output .= '<code>'. t('<a href="http://www.google.com" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">Search google</a>') .'</code></p>'; |
| 101 |
</code></p> |
$output .= '<p>'. t('Controlling iframe property when grouped example:') .'<br />'; |
| 102 |
|
$output .= '<code>'. t('<a href="http://www.google.com" rel="lightframe[search|width:400px; height:300px; scrolling: auto;]">Search google</a><br /> |
| 103 |
<p>Grouped example:<br /> |
<a href="http://www.yahoo.com" rel="lightframe[search|width:400px; height:300px;][Search Yahoo]">Search yahoo</a>') .'</code></p>'; |
| 104 |
<code> |
// Inline Content Support |
| 105 |
<a href="http://video.google.com/videoplay?docid=29023498723974239479" rel="lightvideo[group][my caption]">Grouped example 1</a><br /> |
$output .= '<h5 style="text-decoration: underline;">'. t('Inline Content Support') .'</h5>'; |
| 106 |
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[group][my caption]">Grouped example 2</a><br /> |
$output .= '<p>'. t('It\'s possible to show HTML snippets in the lightbox, that is on the same domain. In this case the "rel" attribute should be set to <code>lightmodal</code>. Again it\'s possible to group the content, (e.g. <code>lightmodal[search]</code>) but in addition to that, it\'s possible to control some of the inline / modal properties. It\'s possible to set the \'width\', \'height\' and \'scrolling\' properties of the inline content. The properties are separated from the group name by a <code>|</code>, for example <code>lightmodal[search|width:100px;]</code> and <code>lightmodal[search|width:100px;][my caption]</code>. If no grouping is being used, then the <code>|</code> is still used and the format would be <code>lightmodal[|width:100px;]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no properties are set, then the default width and height of 400px will be used. See below for more detailed examples.') .'</p>'; |
| 107 |
</code></p> |
$output .= '<p>'. t('Basic example:') .'<br />'; |
| 108 |
|
$output .= '<code>'. t('<a href="search.php" rel="lightmodal">Search</a>') .'</code></p>'; |
| 109 |
<p>Controlling lightbox size example:<br /> |
$output .= '<p>'. t('Basic example with caption:') .'<br />'; |
| 110 |
<code> |
$output .= '<code>'. t('<a href="search.php" rel="lightmodal[][my caption]">Search</a>') .'</code></p>'; |
| 111 |
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[|width:400px; height:300px;][my caption]">Google video example - custom size</a><br /> |
$output .= '<p>'. t('Grouped example:') .'<br />'; |
| 112 |
</code></p> |
$output .= '<code>'. t('<a href="search.php" rel="lightmodal[search]">Search</a><br /> |
| 113 |
|
<a href="search.php?status=1" rel="lightmodal[search][published]">Search published content</a>') .'</code></p>'; |
| 114 |
<p>Supported Video Formats<br /> |
$output .= '<p>'. t('Controlling modal property example:') .'<br />'; |
| 115 |
asx, wmv, mov and swf videos should all be supported. A number of video providers are also supported, for example YouTube and Google Video. For full details on how to integrate these with lightbox, please see the online documentation.</p> |
$output .= '<code>'. t('<a href="search.php" rel="lightmodal[|width:400px; height:300px; scrolling: auto;]">Search</a>') .'</code></p>'; |
| 116 |
|
$output .= '<p>'. t('Controlling modal property when grouped example:') .'<br />'; |
| 117 |
<h5 style="text-decoration: underline;">HTML Content</h5> |
$output .= '<code>'. t('<a href="search.php" rel="lightmodal[search|width:400px; height:300px; scrolling: auto;]">Search</a><br /> |
| 118 |
<p>It\'s possible to show webpage content in the lightbox, using iframes. In this case the "rel" attribute should be set to <code>lightframe</code>. Again it\'s possible to group the items, (e.g. <code>lightframe[search]</code>) but in addition to that, it\'s possible to control some of the iframe properties. It\'s possible to set the \'width\', \'height\' and \'scrolling\' properties of the iframe. The properties are separated from the group name by a <code>|</code>, for example <code>lightframe[search|width:100px;]</code> and <code>lightframe[search|width:120px][my caption]</code>. If no grouping is being used, then the <code>|</code> is still used and the format would be <code>lightframe[|width:100px;]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no iframe properties are set, then the default width and height of 400px will be used. See below for more detailed examples.</p> |
<a href="search.php?status=1" rel="lightmodal[search|width:400px; height:300px;][Search published]">Search published content</a><br /> |
| 119 |
|
<a href="search.php?status=0" rel="lightmodal[search|width:400px; height:300px;][Search Unpublished]">Search unpublished content</a>') .'</code></p>'; |
| 120 |
<p>Basic example:<br /> |
// Keyboard Shortcuts |
| 121 |
<code> |
$output .= '<h3>'. t('Keyboard Shortcuts') .'</h3>'; |
| 122 |
<a href="http://www.google.com" rel="lightframe[][Search Google]">Search google</a> |
$output .= '<p>'. t('The default keyboard shortcuts are listed below. You can override these on the admin page.') .'</p>'; |
| 123 |
</code></p> |
$output .= '<table>'; |
| 124 |
|
$output .= '<tr><td>'. t('Close Lightbox') .'</td><td>x</td></tr>'; |
| 125 |
<p>Grouped example:<br /> |
$output .= '<tr><td></td><td>o</td></tr> |
| 126 |
<code> |
<tr><td></td><td>c</td></tr> |
| 127 |
<a href="http://www.google.com" rel="lightframe[search]">Search google</a><br /> |
<tr><td></td><td>ESC</td></tr>'; |
| 128 |
<a href="http://www.yahoo.com" rel="lightframe[search][Search Yahoo]">Search yahoo</a> |
$output .= '<tr><td>'. t('Previous Image') .'</td><td>p</td></tr>'; |
| 129 |
</code></p> |
$output .= '<tr><td></td><td>'. t('Left Arrow') .'</td></tr>'; |
| 130 |
|
$output .= '<tr><td>'. t('Next Image') .'</td><td>n</td></tr>'; |
| 131 |
<p>Controlling iframe property example:<br /> |
$output .= '<tr><td></td><td>'. t('Right Arrow') .'</td></tr>'; |
| 132 |
<code> |
$output .= '<tr><td>'. t('Toggle Zoom') .'</td><td>'. t('z (not available in slideshow)') .'</td></tr>'; |
| 133 |
<a href="http://www.google.com" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">Search google</a> |
$output .= '<tr><td>'. t('Toggle Play / Pause') .'</td><td>'. t('Spacebar (slideshow only)'). '</td></tr>'; |
| 134 |
</code></p> |
$output .= '</table>'; |
| 135 |
|
$output .= '<p>'. t('Not all of the keyboard shortcuts work in the Opera browser, for example "z" for toggling the zoom and "spacebar" for toggling play / pause in slideshows. This can be overcome by updating your shortcut settings in the Opera preferences editor.') .'</p>'; |
|
<p>Controlling iframe property when grouped example:<br /> |
|
|
<code> |
|
|
<a href="http://www.google.com" rel="lightframe[search|width:400px; height:300px; scrolling: auto;]">Search google</a><br /> |
|
|
<a href="http://www.yahoo.com" rel="lightframe[search|width:400px; height:300px;][Search Yahoo]">Search yahoo</a> |
|
|
</code></p> |
|
|
|
|
|
<h5 style="text-decoration: underline;">Inline Content Support</h5> |
|
|
<p>It\'s possible to show HTML snippets in the lightbox, that is on the same domain. In this case the "rel" attribute should be set to <code>lightmodal</code>. Again it\'s possible to group the content, (e.g. <code>lightmodal[search]</code>) but in addition to that, it\'s possible to control some of the inline / modal properties. It\'s possible to set the \'width\', \'height\' and \'scrolling\' properties of the inline content. The properties are separated from the group name by a <code>|</code>, for example <code>lightmodal[search|width:100px;]</code> and <code>lightmodal[search|width:100px;][my caption]</code>. If no grouping is being used, then the <code>|</code> is still used and the format would be <code>lightmodal[|width:100px;]</code>. The properties should all be of the format "property: value;" - note the closing semi-colon. If no properties are set, then the default width and height of 400px will be used. See below for more detailed examples.</p> |
|
|
|
|
|
<p>Basic example:<br /> |
|
|
<code> |
|
|
<a href="search.php" rel="lightmodal">Search</a> |
|
|
</code></p> |
|
|
|
|
|
<p>Basic example with caption:<br /> |
|
|
<code> |
|
|
<a href="search.php" rel="lightmodal[][my caption]">Search</a> |
|
|
</code></p> |
|
|
|
|
|
<p>Grouped example:<br /> |
|
|
<code> |
|
|
<a href="search.php" rel="lightmodal[search]">Search</a><br /> |
|
|
<a href="search.php?status=1" rel="lightmodal[search][published]">Search published content</a> |
|
|
</code></p> |
|
|
|
|
|
<p>Controlling modal property example:<br /> |
|
|
<code> |
|
|
<a href="search.php" rel="lightmodal[|width:400px; height:300px; scrolling: auto;]">Search</a> |
|
|
</code></p> |
|
|
|
|
|
<p>Controlling modal property when grouped example:<br /> |
|
|
<code> |
|
|
<a href="search.php" rel="lightmodal[search|width:400px; height:300px; scrolling: auto;]">Search</a><br /> |
|
|
<a href="search.php?status=1" rel="lightmodal[search|width:400px; height:300px;][Search published]">Search published content</a><br /> |
|
|
<a href="search.php?status=0" rel="lightmodal[search|width:400px; height:300px;][Search Unpublished]">Search unpublished content</a> |
|
|
</code></p> |
|
|
|
|
|
|
|
|
<h3>Keyboard Shortcuts</h3> |
|
|
<p>The default keyboard shortcuts are listed below. You can override these on the admin page.</a> |
|
|
|
|
|
<table border=0> |
|
|
<tr><td>Close Lightbox</td><td>x</td></tr> |
|
|
<tr><td></td><td>o</td></tr> |
|
|
<tr><td></td><td>c</td></tr> |
|
|
<tr><td></td><td>ESC</td></tr> |
|
|
|
|
|
<tr><td>Previous Image</td><td>p</td></tr> |
|
|
<tr><td></td><td>Left Arrow</td></tr> |
|
|
|
|
|
<tr><td>Next Image</td><td>n</td></tr> |
|
|
<tr><td></td><td>Right Arrow</td></tr> |
|
|
|
|
|
<tr><td>Toggle Zoom</td><td>z (not available in slideshow)</td></tr> |
|
|
|
|
|
<tr><td>Toggle Play / Pause</td><td>Spacebar (slideshow only)</td></tr> |
|
|
</table> |
|
| 136 |
|
|
|
<p>Not all of the keyboard shortcuts work in the Opera browser, for example "z" for toggling the zoom and "spacebar" for toggling play / pause in slideshows. This can be overcome by updating your shortcut settings in the Opera preferences editor.</p> |
|
|
'); |
|
| 137 |
break; |
break; |
| 138 |
} |
} |
| 139 |
|
return !empty($output) ? $output : ''; |
| 140 |
} |
} |
| 141 |
|
|
| 142 |
/** |
/** |