Version Description
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Lightbox Gallery |
Version | 0.2.5 |
Comparing to | |
See all releases |
Code changes from version 0.2.4 to 0.2.5
- js/jquery.lightbox.js +12 -9
- lightbox-gallery.php +38 -36
- readme.txt +1 -1
js/jquery.lightbox.js
CHANGED
@@ -81,16 +81,19 @@
|
|
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 |
-
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(
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
}
|
96 |
}
|
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( settings.captionPosition != 'gallery' ) {
|
85 |
+
var position = jQueryMatchedObj[i].getAttribute('title');
|
86 |
+
settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),position));
|
|
|
|
|
|
|
87 |
} else {
|
88 |
+
if( i > 1 ) {
|
89 |
+
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'))) {
|
90 |
+
var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
|
91 |
+
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
|
92 |
+
}
|
93 |
+
} else {
|
94 |
+
var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
|
95 |
+
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
|
96 |
+
}
|
97 |
}
|
98 |
}
|
99 |
}
|
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 |
|
@@ -99,48 +99,50 @@ function lightbox_gallery($attr) {
|
|
99 |
<div class='gallery {$class}'>");
|
100 |
|
101 |
foreach ( $attachments as $id => $attachment ) {
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
122 |
}
|
123 |
-
if($imagedata['image_meta']['created_timestamp'])
|
124 |
-
$metadata .= __('created_timestamp', 'lightbox-gallery') . ": ". date('Y:m:d H:i:s', $imagedata['image_meta']['created_timestamp']);
|
125 |
-
}
|
126 |
|
127 |
-
|
128 |
-
|
129 |
<{$icontag} class='gallery-icon'>
|
130 |
<a href='{$lightbox_link[0]}' title='{$attachment->post_excerpt}'";
|
131 |
-
|
132 |
-
|
133 |
</{$icontag}>";
|
134 |
-
|
135 |
-
|
136 |
-
if($attachment->post_excerpt) $output .= $attachment->post_excerpt . "<br />\n";
|
137 |
-
if($attachment->post_content) $output .= $attachment->post_content . "<br />\n";
|
138 |
-
if($metadata) $output .= $metadata;
|
139 |
-
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
-
$output .= "</{$itemtag}>";
|
142 |
-
if ( $columns > 0 && ++$i % $columns == 0 )
|
143 |
-
$output .= '<div style="clear: both"></div>';
|
144 |
}
|
145 |
|
146 |
$output .= '
|
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.5
|
8 |
Author URI: http://wordpressgogo.com/
|
9 |
*/
|
10 |
|
99 |
<div class='gallery {$class}'>");
|
100 |
|
101 |
foreach ( $attachments as $id => $attachment ) {
|
102 |
+
if ( $attachment->post_type == 'attachment' ) {
|
103 |
+
$thumbnail_link = wp_get_attachment_image_src($attachment->ID, $size, false);
|
104 |
+
$lightbox_link = wp_get_attachment_image_src($attachment->ID, $lightboxsize, false);
|
105 |
+
trim($attachment->post_content);
|
106 |
+
trim($attachment->post_excerpt);
|
107 |
|
108 |
+
if($meta == "true") {
|
109 |
+
$imagedata = wp_get_attachment_metadata($attachment->ID);
|
110 |
+
unset($metadata);
|
111 |
+
if($imagedata['image_meta']['camera'])
|
112 |
+
$metadata .= __('camera', 'lightbox-gallery') . ": ". $imagedata['image_meta']['camera'] . " ";
|
113 |
+
if($imagedata['image_meta']['aperture'])
|
114 |
+
$metadata .= __('aperture', 'lightbox-gallery') . ": F". $imagedata['image_meta']['aperture'] . " ";
|
115 |
+
if($imagedata['image_meta']['focal_length'])
|
116 |
+
$metadata .= __('focal_length', 'lightbox-gallery') . ": ". $imagedata['image_meta']['focal_length'] . "mm ";
|
117 |
+
if($imagedata['image_meta']['iso'])
|
118 |
+
$metadata .= __('ISO', 'lightbox-gallery') . ": ". $imagedata['image_meta']['iso'] . " ";
|
119 |
+
if($imagedata['image_meta']['shutter_speed']) {
|
120 |
+
if($imagedata['image_meta']['shutter_speed']<1) $speed = "1/". round(1/$imagedata['image_meta']['shutter_speed']);
|
121 |
+
else $speed = $imagedata['image_meta']['shutter_speed'];
|
122 |
+
$metadata .= __('shutter_speed', 'lightbox-gallery') . ": " . $speed . " ";
|
123 |
+
}
|
124 |
+
if($imagedata['image_meta']['created_timestamp'])
|
125 |
+
$metadata .= __('created_timestamp', 'lightbox-gallery') . ": ". date('Y:m:d H:i:s', $imagedata['image_meta']['created_timestamp']);
|
126 |
}
|
|
|
|
|
|
|
127 |
|
128 |
+
$output .= "<{$itemtag} class='gallery-item'>";
|
129 |
+
$output .= "
|
130 |
<{$icontag} class='gallery-icon'>
|
131 |
<a href='{$lightbox_link[0]}' title='{$attachment->post_excerpt}'";
|
132 |
+
if ( $nofollow == "true" ) $output .= " rel='nofollow'";
|
133 |
+
$output .= "><img src='{$thumbnail_link[0]}' width='{$thumbnail_link[1]}' height='{$thumbnail_link[2]}' alt='{$attachment->post_excerpt}' /></a>
|
134 |
</{$icontag}>";
|
135 |
+
if ( $captiontag && (trim($attachment->post_excerpt) || trim($attachment->post_content) || $metadata) ) {
|
136 |
+
$output .= "<{$captiontag} class='gallery-caption'>";
|
137 |
+
if($attachment->post_excerpt) $output .= $attachment->post_excerpt . "<br />\n";
|
138 |
+
if($attachment->post_content) $output .= $attachment->post_content . "<br />\n";
|
139 |
+
if($metadata) $output .= $metadata;
|
140 |
+
$output .= "</{$captiontag}>";
|
141 |
+
}
|
142 |
+
$output .= "</{$itemtag}>";
|
143 |
+
if ( $columns > 0 && ++$i % $columns == 0 )
|
144 |
+
$output .= '<div style="clear: both"></div>';
|
145 |
}
|
|
|
|
|
|
|
146 |
}
|
147 |
|
148 |
$output .= '
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
8 |
|
9 |
This plugin changes the view of galleries to the lightbox.
|
10 |
|
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.5
|
8 |
|
9 |
This plugin changes the view of galleries to the lightbox.
|
10 |
|