Version Description
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Lightbox Gallery |
Version | 0.2.4 |
Comparing to | |
See all releases |
Code changes from version 0.2.3 to 0.2.4
- js/jquery.lightbox.js +12 -4
- lightbox-gallery.php +11 -4
- readme.txt +12 -2
js/jquery.lightbox.js
CHANGED
@@ -79,11 +79,19 @@
|
|
79 |
else var position = objClicked.getAttribute('title');
|
80 |
settings.imageArray.push(new Array(objClicked.getAttribute('href'),position));
|
81 |
} else {
|
82 |
-
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
|
83 |
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
|
84 |
-
if(
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
}
|
89 |
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
|
79 |
else var position = objClicked.getAttribute('title');
|
80 |
settings.imageArray.push(new Array(objClicked.getAttribute('href'),position));
|
81 |
} else {
|
82 |
+
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
|
83 |
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
|
84 |
+
if( i > 0 ) {
|
85 |
+
if( !(jQueryMatchedObj[i-1].getAttribute('href') != jQueryMatchedObj[i].getAttribute('href') && jQuery(jQueryMatchedObj[i-1]).parent().parent().children().children().attr('href') == jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'))) {
|
86 |
+
if( settings.captionPosition == 'gallery' ) var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
|
87 |
+
else var position = jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('title');
|
88 |
+
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
|
89 |
+
}
|
90 |
+
} else {
|
91 |
+
if( settings.captionPosition == 'gallery' ) var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
|
92 |
+
else var position = jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('title');
|
93 |
+
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
|
94 |
+
}
|
95 |
}
|
96 |
}
|
97 |
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
|
lightbox-gallery.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Lightbox Gallery
|
|
4 |
Plugin URI: http://wordpressgogo.com/development/lightbox-gallery.html
|
5 |
Description: Changes to the lightbox view in galleries.
|
6 |
Author: Hiroaki Miyashita
|
7 |
-
Version: 0.2.
|
8 |
Author URI: http://wordpressgogo.com/
|
9 |
*/
|
10 |
|
@@ -17,7 +17,11 @@ add_action('wp_head', 'add_lightbox_gallery_head',1);
|
|
17 |
add_action('wp_print_scripts', 'add_lightbox_gallery_jquery',1);
|
18 |
|
19 |
function add_lightbox_gallery_head() {
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.lightbox.css" />'."\n";
|
22 |
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.tooltip.css" />'."\n";
|
23 |
}
|
@@ -65,7 +69,8 @@ function lightbox_gallery($attr) {
|
|
65 |
'size' => 'thumbnail',
|
66 |
'lightboxsize' => 'medium',
|
67 |
'meta' => 'false',
|
68 |
-
'class'
|
|
|
69 |
), $attr));
|
70 |
|
71 |
$id = intval($id);
|
@@ -122,7 +127,9 @@ function lightbox_gallery($attr) {
|
|
122 |
$output .= "<{$itemtag} class='gallery-item'>";
|
123 |
$output .= "
|
124 |
<{$icontag} class='gallery-icon'>
|
125 |
-
<a href='{$lightbox_link[0]}' title='{$attachment->post_excerpt}'
|
|
|
|
|
126 |
</{$icontag}>";
|
127 |
if ( $captiontag && (trim($attachment->post_excerpt) || trim($attachment->post_content) || $metadata) ) {
|
128 |
$output .= "<{$captiontag} class='gallery-caption'>";
|
4 |
Plugin URI: http://wordpressgogo.com/development/lightbox-gallery.html
|
5 |
Description: Changes to the lightbox view in galleries.
|
6 |
Author: Hiroaki Miyashita
|
7 |
+
Version: 0.2.4
|
8 |
Author URI: http://wordpressgogo.com/
|
9 |
*/
|
10 |
|
17 |
add_action('wp_print_scripts', 'add_lightbox_gallery_jquery',1);
|
18 |
|
19 |
function add_lightbox_gallery_head() {
|
20 |
+
if(@file_exists(TEMPLATEPATH.'/lightbox-gallery.css')) {
|
21 |
+
echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/lightbox-gallery.css" type="text/css" />'."\n";
|
22 |
+
} else {
|
23 |
+
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/lightbox-gallery.css" />'."\n";
|
24 |
+
}
|
25 |
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.lightbox.css" />'."\n";
|
26 |
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.tooltip.css" />'."\n";
|
27 |
}
|
69 |
'size' => 'thumbnail',
|
70 |
'lightboxsize' => 'medium',
|
71 |
'meta' => 'false',
|
72 |
+
'class' => 'gallery1',
|
73 |
+
'nofollow' => false
|
74 |
), $attr));
|
75 |
|
76 |
$id = intval($id);
|
127 |
$output .= "<{$itemtag} class='gallery-item'>";
|
128 |
$output .= "
|
129 |
<{$icontag} class='gallery-icon'>
|
130 |
+
<a href='{$lightbox_link[0]}' title='{$attachment->post_excerpt}'";
|
131 |
+
if ( $nofollow == "true" ) $output .= " rel='nofollow'";
|
132 |
+
$output .= "><img src='{$thumbnail_link[0]}' width='{$thumbnail_link[1]}' height='{$thumbnail_link[2]}' alt='{$attachment->post_excerpt}' /></a>
|
133 |
</{$icontag}>";
|
134 |
if ( $captiontag && (trim($attachment->post_excerpt) || trim($attachment->post_content) || $metadata) ) {
|
135 |
$output .= "<{$captiontag} class='gallery-caption'>";
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
|
|
3 |
Donate link: http://wordpressgogo.com/development/lightbox-gallery.html
|
4 |
Tags: lightbox, gallery, image, images, album, photo
|
5 |
Requires at least: 2.5
|
6 |
-
Tested up to: 2.6
|
7 |
-
Stable tag: 0.2.
|
8 |
|
9 |
This plugin changes the view of galleries to the lightbox.
|
10 |
|
@@ -25,6 +25,10 @@ You can also make regular images appear in a lightbox. See Faq.
|
|
25 |
3. Activate the plugin through the 'Plugins' menu in WordPress
|
26 |
4. That's it! :)
|
27 |
|
|
|
|
|
|
|
|
|
28 |
== Known Issues / Bugs ==
|
29 |
|
30 |
== Frequently Asked Questions ==
|
@@ -79,6 +83,12 @@ Adds a class attribute of the gallery. The default is 'gallery1'.
|
|
79 |
|
80 |
[gallery class="gallery2"]
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
== Uninstall ==
|
83 |
|
84 |
1. Deactivate the plugin
|
3 |
Donate link: http://wordpressgogo.com/development/lightbox-gallery.html
|
4 |
Tags: lightbox, gallery, image, images, album, photo
|
5 |
Requires at least: 2.5
|
6 |
+
Tested up to: 2.6.1
|
7 |
+
Stable tag: 0.2.4
|
8 |
|
9 |
This plugin changes the view of galleries to the lightbox.
|
10 |
|
25 |
3. Activate the plugin through the 'Plugins' menu in WordPress
|
26 |
4. That's it! :)
|
27 |
|
28 |
+
Lightbox Gallery will load 'lightbox-gallery.css' from your theme's directory if it exists.
|
29 |
+
If it doesn't exists, it will just load the default 'lightbox-gallery.css' that comes with Lightbox Gallery.
|
30 |
+
This will allow you to upgrade Lightbox Gallery without worrying about overwriting your lightbox gallery styles that you have created.
|
31 |
+
|
32 |
== Known Issues / Bugs ==
|
33 |
|
34 |
== Frequently Asked Questions ==
|
83 |
|
84 |
[gallery class="gallery2"]
|
85 |
|
86 |
+
* nofollow
|
87 |
+
|
88 |
+
Adds the attribute, rel="nofollow". The default is false.
|
89 |
+
|
90 |
+
[gallery nofollow="true"]
|
91 |
+
|
92 |
== Uninstall ==
|
93 |
|
94 |
1. Deactivate the plugin
|