Lightbox Gallery - Version 0.2

Version Description

Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon wp plugin Lightbox Gallery
Version 0.2
Comparing to
See all releases

Code changes from version 0.1 to 0.2

js/jquery.lightbox.js CHANGED
@@ -44,7 +44,8 @@
44
  keyToNext: 'n', // (string) (n = next) Letter to show the next image.
45
  // Don�t alter these variables in any way
46
  imageArray: [],
47
- activeImage: 0
 
48
  },settings);
49
  // Caching the jQuery object with all elements matched
50
  var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
@@ -74,11 +75,15 @@
74
  settings.activeImage = 0;
75
  // We have an image set? Or just an image? Let�s see it.
76
  if ( jQueryMatchedObj.length == 1 ) {
77
- settings.imageArray.push(new Array(objClicked.getAttribute('href'),jQuery(objClicked).parent().next().html()));
 
 
78
  } else {
79
  // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
80
  for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
81
- settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQuery(jQueryMatchedObj[i]).parent().next().html()));
 
 
82
  }
83
  }
84
  while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
44
  keyToNext: 'n', // (string) (n = next) Letter to show the next image.
45
  // Don�t alter these variables in any way
46
  imageArray: [],
47
+ activeImage: 0,
48
+ captionPosition: ''
49
  },settings);
50
  // Caching the jQuery object with all elements matched
51
  var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
75
  settings.activeImage = 0;
76
  // We have an image set? Or just an image? Let�s see it.
77
  if ( jQueryMatchedObj.length == 1 ) {
78
+ if( settings.captionPosition == 'gallery' ) var position = jQuery(objClicked).parent().next().html();
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( settings.captionPosition == 'gallery' ) var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
85
+ else var position = jQueryMatchedObj[i].getAttribute('title');
86
+ settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),position));
87
  }
88
  }
89
  while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
lightbox-gallery.css CHANGED
@@ -3,4 +3,6 @@
3
  .gallery {margin: auto;}
4
  .gallery-item {float: left; margin: 10px auto; text-align: center;}
5
  .gallery img {border: 2px solid #cfcfcf;}
 
 
6
  .gallery-caption {margin-left: 0; display:none;}
3
  .gallery {margin: auto;}
4
  .gallery-item {float: left; margin: 10px auto; text-align: center;}
5
  .gallery img {border: 2px solid #cfcfcf;}
6
+ /* If you want to show images slowly, use this. */
7
+ /* .gallery img {display: none; border: 2px solid #cfcfcf;} */
8
  .gallery-caption {margin-left: 0; display:none;}
lightbox-gallery.js CHANGED
@@ -1,10 +1,11 @@
1
- // Change to your domain name
2
- var lightbox_path = 'http://domainname/wp-content/plugins/lightbox-gallery/';
3
 
4
  jQuery(document).ready(function () {
5
  var i = 0;
6
  showImg(i);
7
- jQuery('.gallery a').lightBox();
 
8
  jQuery('.gallery a').Tooltip({track:true, delay:0, showURL: false});
9
  });
10
 
1
+ // You do not need to change the following path if you installed WordPress into the root directory.
2
+ var lightbox_path = 'http://'+location.hostname+'/wp-content/plugins/lightbox-gallery/';
3
 
4
  jQuery(document).ready(function () {
5
  var i = 0;
6
  showImg(i);
7
+ jQuery('[@rel*=lightbox]').lightBox();
8
+ jQuery('.gallery a').lightBox({captionPosition:'gallery'});
9
  jQuery('.gallery a').Tooltip({track:true, delay:0, showURL: false});
10
  });
11
 
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.1
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
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
 
lightbox-gallery.pot ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordPress 用日本語リソース (UTF-8)
2
+ # Japanese (UTF-8) translation for WordPress
3
+ #
4
+ # Copyright (c) 2005-2008
5
+ # このファイルは WordPress 本体と同じライセンスのもと配布されています。
6
+ # This file is distributed under the same license as the WordPress package.
7
+ #
8
+ # WordPress 日本語版作成チーム / WP ja translation team
9
+ # <http://groups.google.com/group/wp-ja-pkg/web/members>
10
+ #
11
+ # 誤字脱字誤訳、あるいはよりよい訳などありましたら以下までぜひお知らせください。
12
+ # また、翻訳、校正、コミットをお手伝いしていただける方も随時募集中です。
13
+ # 連絡先 / Contact: wpja.team@gmail.com (件名か内容に「日本語リソース」と入れてください)
14
+ #
15
+ msgid ""
16
+ msgstr ""
17
+ "Project-Id-Version: Lightbox Gallery\n"
18
+ "Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n"
19
+ "POT-Creation-Date: 2008-03-26 13:02+0200\n"
20
+ "PO-Revision-Date: 2008-05-08 11:48+0900\n"
21
+ "Last-Translator: \n"
22
+ "Language-Team: \n"
23
+ "MIME-Version: 1.0\n"
24
+ "Content-Type: text/plain; charset=utf-8\n"
25
+ "Content-Transfer-Encoding: 8bit\n"
26
+ "X-Poedit-KeywordsList: __;_e;_c\n"
27
+ "X-Poedit-Basepath: ../\n"
28
+ "X-Poedit-SearchPath-0: lightbox-gallery\n"
29
+
30
+ #: lightbox-gallery/lightbox-gallery.php:95
31
+ msgid "camera"
32
+ msgstr ""
33
+
34
+ #: lightbox-gallery/lightbox-gallery.php:97
35
+ msgid "aperture"
36
+ msgstr ""
37
+
38
+ #: lightbox-gallery/lightbox-gallery.php:99
39
+ msgid "focal_length"
40
+ msgstr ""
41
+
42
+ #: lightbox-gallery/lightbox-gallery.php:101
43
+ msgid "shutter_speed"
44
+ msgstr ""
45
+
46
+ #: lightbox-gallery/lightbox-gallery.php:103
47
+ msgid "created_timestamp"
48
+ msgstr ""
49
+
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.5.1
7
- Stable tag: 0.1
8
 
9
  This plugin changes the view of galleries to the lightbox.
10
 
@@ -14,11 +14,13 @@ The Lightbox Gallery plugin changes the view of galleries to the lightbox.
14
 
15
  * Lightbox display of Gallery
16
  * Tooltip view of caption of images
17
- * Displays the associated metadata with images
 
 
18
 
19
  == Installation ==
20
 
21
- 1. Edit the `lightbox-gallery.js` and change the path of line 2 according to your settings.
22
  2. Copy the `lightbox-gallery` directory into your `wp-content/plugins` directory
23
  3. Activate the plugin through the 'Plugins' menu in WordPress
24
  4. That's it! :)
@@ -28,13 +30,11 @@ The Lightbox Gallery plugin changes the view of galleries to the lightbox.
28
  == Frequently Asked Questions ==
29
  * How can I make regular images appear in a lightbox without [gallery] shortcode?
30
 
31
- Just enclose "a" and "img" tags by "gallery" class. Here is a sample.
32
 
33
- &lt;div class="gallery"&gt;
34
- &lt;a href="image.jpg" title="this is a caption"&gt;<br />
35
  &lt;img src="thumbnail.jpg" alt="" /&gt;<br />
36
  &lt;/a&gt;
37
- &lt;/div&gt;
38
 
39
  == Screenshots ==
40
 
4
  Tags: lightbox, gallery, image, images, album, photo
5
  Requires at least: 2.5
6
  Tested up to: 2.5.1
7
+ Stable tag: 0.2
8
 
9
  This plugin changes the view of galleries to the lightbox.
10
 
14
 
15
  * Lightbox display of Gallery
16
  * Tooltip view of caption of images
17
+ * Displays the associated metadata with images
18
+
19
+ You can also make regular images appear in a lightbox. See Faq.
20
 
21
  == Installation ==
22
 
23
+ 1. Edit the `lightbox-gallery.js` and check the path of line 2 according to your settings.
24
  2. Copy the `lightbox-gallery` directory into your `wp-content/plugins` directory
25
  3. Activate the plugin through the 'Plugins' menu in WordPress
26
  4. That's it! :)
30
  == Frequently Asked Questions ==
31
  * How can I make regular images appear in a lightbox without [gallery] shortcode?
32
 
33
+ Just add rel="lightbox" into "a" tag. Here is a sample.
34
 
35
+ &lt;a href="image.jpg" rel="lightbox" title="this is a caption"&gt;<br />
 
36
  &lt;img src="thumbnail.jpg" alt="" /&gt;<br />
37
  &lt;/a&gt;
 
38
 
39
  == Screenshots ==
40