Version Description
Added missing files from previous release... Also: mobile support, larger display area.
Download this release
Release Info
Developer | ulfben |
Plugin | WP jQuery Lightbox |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- readme.txt +15 -9
- wp-jquery-lightbox.php +14 -6
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://amzn.com/w/2QB6SQ5XX2U0N
|
|
4 |
Tags: lightbox, jquery, nodal, image, display, ulfben
|
5 |
Requires at least: 2.9.2
|
6 |
Tested up to: 3.1.2
|
7 |
-
Stable tag: 1.3
|
8 |
|
9 |
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous. Improved for mobile devices.
|
10 |
|
@@ -27,6 +27,9 @@ You can navigate the images with your keyboard: Arrows, P(revious)/N(ext) and X/
|
|
27 |
|
28 |
*If you value [my plugins](http://profiles.wordpress.org/users/ulfben/) please consider [sending me a book](http://amzn.com/w/2QB6SQ5XX2U0N)!*
|
29 |
|
|
|
|
|
|
|
30 |
= 1.3 (2011-05-01) =
|
31 |
* Improved scaling to *maximize* display area.
|
32 |
* Supports orientation / resize changes - Lightbox reflows with site.
|
@@ -43,27 +46,24 @@ You can navigate the images with your keyboard: Arrows, P(revious)/N(ext) and X/
|
|
43 |
1. Upload the `wp-jquery-lightbox`-folder to the `/wp-content/plugins/` directory
|
44 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
45 |
1. Check out the jQuery Lightbox-panel in your admin interface for usage details and configuration.
|
46 |
-
1. Note: [the gallery shortcode](http://codex.wordpress.org/Gallery_Shortcode) is *only* lightboxed if you set `[gallery link="file"]`
|
47 |
|
48 |
= How to Use: =
|
49 |
-
1. [WordPress built-in gallery](http://codex.wordpress.org/Gallery_Shortcode)
|
50 |
-
1.
|
51 |
|
52 |
`<a href="image-1.jpg" rel="lightbox" title="my caption">image #1</a>`
|
53 |
|
54 |
Note the use of title-attribute to set a caption
|
55 |
|
56 |
-
1.
|
57 |
|
58 |
`<a href="image-1.jpg" rel="lightbox[roadtrip]">image #1</a>`
|
59 |
|
60 |
`<a href="image-2.jpg" rel="lightbox[roadtrip]">image #2</a>`
|
61 |
|
62 |
`<a href="image-3.jpg" rel="lightbox[roadtrip]">image #3</a>`
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
1. You can navigate the images with your keyboard: Arrows, P(revious)/N(ext) and X/C/ESC for close. Clicking in the center of a picture also closes the lightbox.
|
67 |
|
68 |
= For developers: =
|
69 |
1. Always have `wp_footer();` just before the closing `</body>` tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript files.
|
@@ -71,6 +71,9 @@ You can navigate the images with your keyboard: Arrows, P(revious)/N(ext) and X/
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
74 |
= 1.3 (2011-05-01) =
|
75 |
* Improved scaling to make maximum use of display area.
|
76 |
* Supports orientation / resize changes - Lightbox reflows with site.
|
@@ -103,6 +106,9 @@ You can navigate the images with your keyboard: Arrows, P(revious)/N(ext) and X/
|
|
103 |
|
104 |
== Upgrade Notice ==
|
105 |
|
|
|
|
|
|
|
106 |
= 1.3 =
|
107 |
Enables larger viewing area, improved mobile experience and translations.
|
108 |
|
4 |
Tags: lightbox, jquery, nodal, image, display, ulfben
|
5 |
Requires at least: 2.9.2
|
6 |
Tested up to: 3.1.2
|
7 |
+
Stable tag: 1.3.1
|
8 |
|
9 |
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous. Improved for mobile devices.
|
10 |
|
27 |
|
28 |
*If you value [my plugins](http://profiles.wordpress.org/users/ulfben/) please consider [sending me a book](http://amzn.com/w/2QB6SQ5XX2U0N)!*
|
29 |
|
30 |
+
= 1.3.1 (2011-05-02) =
|
31 |
+
* Forgot to include languages files! :)
|
32 |
+
|
33 |
= 1.3 (2011-05-01) =
|
34 |
* Improved scaling to *maximize* display area.
|
35 |
* Supports orientation / resize changes - Lightbox reflows with site.
|
46 |
1. Upload the `wp-jquery-lightbox`-folder to the `/wp-content/plugins/` directory
|
47 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
48 |
1. Check out the jQuery Lightbox-panel in your admin interface for usage details and configuration.
|
|
|
49 |
|
50 |
= How to Use: =
|
51 |
+
1. With [WordPress built-in gallery](http://codex.wordpress.org/Gallery_Shortcode): [`[gallery link="file"]`](http://codex.wordpress.org/Gallery_Shortcode)
|
52 |
+
1. By adding a `rel="lightbox"` attribute to any link:
|
53 |
|
54 |
`<a href="image-1.jpg" rel="lightbox" title="my caption">image #1</a>`
|
55 |
|
56 |
Note the use of title-attribute to set a caption
|
57 |
|
58 |
+
1. To group sets of related images, follow step 2 but additionally include a group name in the rel attribute:
|
59 |
|
60 |
`<a href="image-1.jpg" rel="lightbox[roadtrip]">image #1</a>`
|
61 |
|
62 |
`<a href="image-2.jpg" rel="lightbox[roadtrip]">image #2</a>`
|
63 |
|
64 |
`<a href="image-3.jpg" rel="lightbox[roadtrip]">image #3</a>`
|
65 |
+
|
66 |
+
1. Keyboard support: Arrows, P(revious)/N(ext) and X/C/ESC for close.
|
|
|
|
|
67 |
|
68 |
= For developers: =
|
69 |
1. Always have `wp_footer();` just before the closing `</body>` tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript files.
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 1.3.1 (2011-05-02) =
|
75 |
+
* Forgot to include languages files! :)
|
76 |
+
|
77 |
= 1.3 (2011-05-01) =
|
78 |
* Improved scaling to make maximum use of display area.
|
79 |
* Supports orientation / resize changes - Lightbox reflows with site.
|
106 |
|
107 |
== Upgrade Notice ==
|
108 |
|
109 |
+
= 1.3.1 =
|
110 |
+
Added missing files from previous release... Also: mobile support, larger display area.
|
111 |
+
|
112 |
= 1.3 =
|
113 |
Enables larger viewing area, improved mobile experience and translations.
|
114 |
|
wp-jquery-lightbox.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: wp-jquery-lightbox
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-jquery-lightbox/
|
5 |
Description: A drop in replacement for LightBox-2 and similar plugins. Uses jQuery to save you from the JS-library mess in your header. :)
|
6 |
-
Version: 1.3
|
7 |
Author: Ulf Benjaminsson
|
8 |
Author URI: http://www.ulfben.com
|
9 |
*/
|
@@ -22,7 +22,7 @@ function jqlb_init() {
|
|
22 |
define('JQLB_SCRIPT_URL', JQLB_URL.'jquery.lightbox.min.js');
|
23 |
define('JQLB_STYLE_URL', JQLB_URL.'lightbox.min.css');
|
24 |
define('JQLB_LANGUAGES_DIR', JQLB_PLUGIN_DIR . 'languages/');
|
25 |
-
load_plugin_textdomain('jqlb', false,
|
26 |
add_action('admin_init', 'jqlb_register_settings');
|
27 |
add_action('admin_menu', 'jqlb_register_menu_item');
|
28 |
add_action('wp_print_styles', 'jqlb_css');
|
@@ -177,12 +177,20 @@ function jqlb_options_panel(){
|
|
177 |
<?php
|
178 |
$locale = jqlb_get_locale();
|
179 |
$diskfile = JQLB_LANGUAGES_DIR . "howtouse-" . $locale . ".html";
|
180 |
-
if (!file_exists($diskfile))
|
181 |
$diskfile = JQLB_LANGUAGES_DIR . "howtouse.html";
|
182 |
-
|
183 |
-
|
|
|
|
|
184 |
} else {
|
185 |
-
$text =
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
echo $text;
|
188 |
?>
|
3 |
Plugin Name: wp-jquery-lightbox
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-jquery-lightbox/
|
5 |
Description: A drop in replacement for LightBox-2 and similar plugins. Uses jQuery to save you from the JS-library mess in your header. :)
|
6 |
+
Version: 1.3.1
|
7 |
Author: Ulf Benjaminsson
|
8 |
Author URI: http://www.ulfben.com
|
9 |
*/
|
22 |
define('JQLB_SCRIPT_URL', JQLB_URL.'jquery.lightbox.min.js');
|
23 |
define('JQLB_STYLE_URL', JQLB_URL.'lightbox.min.css');
|
24 |
define('JQLB_LANGUAGES_DIR', JQLB_PLUGIN_DIR . 'languages/');
|
25 |
+
load_plugin_textdomain('jqlb', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
26 |
add_action('admin_init', 'jqlb_register_settings');
|
27 |
add_action('admin_menu', 'jqlb_register_menu_item');
|
28 |
add_action('wp_print_styles', 'jqlb_css');
|
177 |
<?php
|
178 |
$locale = jqlb_get_locale();
|
179 |
$diskfile = JQLB_LANGUAGES_DIR . "howtouse-" . $locale . ".html";
|
180 |
+
if (!file_exists($diskfile)){
|
181 |
$diskfile = JQLB_LANGUAGES_DIR . "howtouse.html";
|
182 |
+
}
|
183 |
+
$text = false;
|
184 |
+
if(function_exists('file_get_contents')){
|
185 |
+
$text = @file_get_contents($diskfile);
|
186 |
} else {
|
187 |
+
$text = @file($diskfile);
|
188 |
+
if($text !== false){
|
189 |
+
$text = implode("", $text);
|
190 |
+
}
|
191 |
+
}
|
192 |
+
if($text === false){
|
193 |
+
$text = '<p>The documentation files are missing! Try <a href="http://wordpress.org/extend/plugins/wp-jquery-lightbox/">downloading</a> and <a href="http://wordpress.org/extend/plugins/wp-jquery-lightbox/installation/">re-installing</a> this plugin.</p>';
|
194 |
}
|
195 |
echo $text;
|
196 |
?>
|