Lightbox Gallery - Version 0.3

Version Description

Download this release

Release Info

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

Code changes from version 0.2.6 to 0.3

lightbox-gallery-ja.po CHANGED
@@ -1,17 +1,3 @@
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"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Lightbox Gallery\n"
lightbox-gallery.css CHANGED
@@ -3,6 +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
- /* 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;}
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. And you need to edit lightbox-gallery.js too. */
7
  /* .gallery img {display: none; border: 2px solid #cfcfcf;} */
8
+ .gallery-caption {margin-left: 0; display:none;}
lightbox-gallery.js CHANGED
@@ -2,11 +2,14 @@
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('a[@rel*=lightbox]').lightBox();
8
- jQuery('.gallery1 a').lightBox({captionPosition:'gallery'});
9
- jQuery('.gallery1 a').Tooltip({track:true, delay:0, showURL: false});
 
 
 
10
 
11
  // Add these lines if you want to handle multiple galleries in one page.
12
  // You need to add into a [gallery] shorttag. ex) [gallery class="gallery2"]
@@ -17,9 +20,9 @@ jQuery(document).ready(function () {
17
  });
18
 
19
  function showImg(i){
20
- if(i == jQuery('img').length){
21
- return;
22
- }else{
23
- jQuery(jQuery('img')[i]).animate({opacity:'show'},"normal",function(){i++;showImg(i)});
24
- }
25
  }
2
  var lightbox_path = 'http://'+location.hostname+'/wp-content/plugins/lightbox-gallery/';
3
 
4
  jQuery(document).ready(function () {
5
+
6
+ // If you make images display slowly, use following two lines;
7
+ // var i = 0;
8
+ // showImg(i);
9
+
10
+ jQuery('a[@rel*=lightbox]').lightBox();
11
+ jQuery('.gallery1 a').lightBox({captionPosition:'gallery'});
12
+ jQuery('.gallery1 a').Tooltip({track:true, delay:0, showURL: false});
13
 
14
  // Add these lines if you want to handle multiple galleries in one page.
15
  // You need to add into a [gallery] shorttag. ex) [gallery class="gallery2"]
20
  });
21
 
22
  function showImg(i){
23
+ if(i == jQuery('img').length){
24
+ return;
25
+ }else{
26
+ jQuery(jQuery('img')[i]).animate({opacity:'show'},"normal",function(){i++;showImg(i)});
27
+ }
28
  }
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.6
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -17,17 +17,43 @@ 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
- 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
  }
28
 
29
  function add_lightbox_gallery_jquery() {
30
- if ( !is_admin() ) {
 
 
 
 
 
 
 
 
 
 
 
 
31
  wp_enqueue_script( 'jquery');
32
  wp_enqueue_script('dimensions', '/wp-content/plugins/lightbox-gallery/js/jquery.dimensions.js', array('jquery'));
33
  wp_enqueue_script('bgtiframe', '/wp-content/plugins/lightbox-gallery/js/jquery.bgiframe.js', array('jquery'));
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.3
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
+ global $wp_query;
21
+
22
+ $flag = false;
23
+ if($wp_query->posts) {
24
+ for($i=0;$i<count($wp_query->posts);$i++) {
25
+ if ( preg_match('/\[gallery([^\]]+)?\]/', $wp_query->posts[$i]->post_content) ) {
26
+ $flag = true;
27
+ break;
28
+ }
29
+ }
30
+ }
31
+
32
+ if ( !is_admin() && $flag ) {
33
+ if (@file_exists(TEMPLATEPATH.'/lightbox-gallery.css')) {
34
+ echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/lightbox-gallery.css" type="text/css" />'."\n";
35
+ } else {
36
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/lightbox-gallery.css" />'."\n";
37
+ }
38
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.lightbox.css" />'."\n";
39
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/lightbox-gallery/js/jquery.tooltip.css" />'."\n";
40
+ }
41
  }
42
 
43
  function add_lightbox_gallery_jquery() {
44
+ global $wp_query;
45
+
46
+ $flag = false;
47
+ if($wp_query->posts) {
48
+ for($i=0;$i<count($wp_query->posts);$i++) {
49
+ if ( preg_match('/\[gallery([^\]]+)?\]/', $wp_query->posts[$i]->post_content) ) {
50
+ $flag = true;
51
+ break;
52
+ }
53
+ }
54
+ }
55
+
56
+ if ( !is_admin() && $flag ) {
57
  wp_enqueue_script( 'jquery');
58
  wp_enqueue_script('dimensions', '/wp-content/plugins/lightbox-gallery/js/jquery.dimensions.js', array('jquery'));
59
  wp_enqueue_script('bgtiframe', '/wp-content/plugins/lightbox-gallery/js/jquery.bgiframe.js', array('jquery'));
lightbox-gallery.pot CHANGED
@@ -1,17 +1,3 @@
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"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Lightbox Gallery\n"
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.1
7
- Stable tag: 0.2.6
8
 
9
  This plugin changes the view of galleries to the lightbox.
10
 
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.2
7
+ Stable tag: 0.3
8
 
9
  This plugin changes the view of galleries to the lightbox.
10