IG_LightBox - Version 1.0.8

Version Notes

Enjoy it ;)

Download this release

Release Info

Developer Magento Core Team
Extension IG_LightBox
Version 1.0.8
Comparing to
See all releases


Code changes from version 1.0.7 to 1.0.8

app/code/community/IG/LightBox/Block/Media.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class IG_LightBox_Block_Media extends Mage_Catalog_Block_Product_View_Media
3
+ {
4
+ protected $_igLightBoxConfigPath = "ig_lightbox";
5
+
6
+ public function getIGLightBoxConfig($key)
7
+ {
8
+ return Mage::getStoreConfig($this->_igLightBoxConfigPath.'/'.$key);
9
+ }
10
+
11
+ public function getIgLightBoxMainImageSize()
12
+ {
13
+ list($main_width, $main_height) = split('x', $this->getIGLightBoxConfig('general/mainImageSize'));
14
+
15
+ $main_width = intval($main_width) > 0 ? intval($main_width) : 800;
16
+ $main_height = intval($main_height) > 0 ? intval($main_height) : 600;
17
+
18
+ return array($main_width, $main_height);
19
+ }
20
+
21
+ public function getIgLightBoxThumbnailImageSize()
22
+ {
23
+ list($thu_width, $thu_height) = split('x', $this->getIGLightBoxConfig('general/thumbnailImageSize'));
24
+
25
+ $thu_width = intval($thu_width) > 0 ? intval($thu_width) : 256;
26
+ $thu_height = intval($thu_height) > 0 ? intval($thu_height) : 256;
27
+
28
+ return array($thu_width, $thu_height);
29
+ }
30
+
31
+ public function getIgLightBoxBigImageSize()
32
+ {
33
+ list($big_width, $big_height) = split('x', $this->getIGLightBoxConfig('general/bigImageSize'));
34
+
35
+ $big_width = intval($big_width) > 0 ? intval($big_width) : 60;
36
+ $big_height = intval($big_height) > 0 ? intval($big_height) : 60;
37
+
38
+ return array($big_width, $big_height);
39
+ }
40
+
41
+ public function getIgLightBoxJsConfig()
42
+ {
43
+ $out = '';
44
+
45
+ /* Read configuration */
46
+ $background_opactiy = floatval($this->getIGLightBoxConfig('display/backgroundOpacity'));
47
+ $imagebox_opactiy = floatval($this->getIGLightBoxConfig('display/imageboxOpacity'));
48
+ $toolbar_opactiy = floatval($this->getIGLightBoxConfig('display/toolbarOpacity'));
49
+
50
+ $background_color = $this->getIGLightBoxConfig('display/backgroundColor');
51
+ $imagebox_color = $this->getIGLightBoxConfig('display/imageboxColor');
52
+ $toolbar_color = $this->getIGLightBoxConfig('display/toolbarColor');
53
+ $toolbar_text_color = $this->getIGLightBoxConfig('display/toolbarTextColor');
54
+ $toolbar_text_font = $this->getIGLightBoxConfig('display/toolbarTextFont');
55
+ $toolbar_text_size = intval($this->getIGLightBoxConfig('display/toolbarTextSize'));
56
+
57
+ $border_color = $this->getIGLightBoxConfig('display/borderColor');
58
+ $border_size = intval($this->getIGLightBoxConfig('display/borderSize'));
59
+
60
+ $fade_in_duration = floatval($this->getIGLightBoxConfig('effects/fadeIn'));
61
+ $fade_out_duration = floatval($this->getIGLightBoxConfig('effects/fadeOut'));
62
+ $image_swap_duration = floatval($this->getIGLightBoxConfig('effects/imageSwap'));
63
+ $image_resize_duration = floatval($this->getIGLightBoxConfig('effects/imageResize'));
64
+
65
+ /* Default values and ranges */
66
+ $background_color = $background_color ? $background_color : '#000000';
67
+ $imagebox_color = $imagebox_color ? $imagebox_color : '#000000';
68
+ $toolbar_color = $toolbar_color ? $toolbar_color : '#000000';
69
+ $toolbar_text_color = $toolbar_text_color ? $toolbar_text_color : '#000000';
70
+ $toolbar_text_font = $toolbar_text_font ? $toolbar_text_font : 'Verdana';
71
+ $border_color = $border_color ? $border_color : '#000000';
72
+
73
+ $toolbar_text_size = intval($toolbar_text_size) > 0 ? intval($toolbar_text_size) : 10;
74
+ $border_size = intval($border_size) >= 0 ? intval($border_size) : 0;
75
+
76
+ $background_opactiy = min(1.0, max(0.0, $background_opactiy));
77
+ $imagebox_opactiy = min(1.0, max(0.0, $imagebox_opactiy));
78
+ $toolbar_opactiy = min(1.0, max(0.0, $toolbar_opactiy));
79
+
80
+ $values = array(
81
+ "ig_lightbox_background_opactiy" => $background_opactiy,
82
+ "ig_lightbox_imagebox_opactiy" => $imagebox_opactiy,
83
+ "ig_lightbox_toolbar_opactiy" => $toolbar_opactiy,
84
+ "ig_lightbox_background_color" => $background_color,
85
+ "ig_lightbox_imagebox_color" => $imagebox_color,
86
+ "ig_lightbox_toolbar_color" => $toolbar_color,
87
+ "ig_lightbox_toolbar_text_color" => $toolbar_text_color,
88
+ "ig_lightbox_toolbar_text_font" => $toolbar_text_font,
89
+ "ig_lightbox_toolbar_text_size" => $toolbar_text_size,
90
+ "ig_lightbox_border_size" => $border_size,
91
+ "ig_lightbox_border_color" => $border_color,
92
+ "ig_lightbox_fade_in_duration" => $fade_in_duration,
93
+ "ig_lightbox_fade_out_duration" => $fade_out_duration,
94
+ "ig_lightbox_image_swap_duration" => $image_swap_duration,
95
+ "ig_lightbox_image_resize_duration" => $image_resize_duration,
96
+ "ig_lightbox_wrap_images" => $this->getIGLightBoxConfig('general/wrapImages')
97
+ );
98
+
99
+ $out.="<script type=\"text/javascript\">\n";
100
+ foreach ($values as $k => $v)
101
+ $out.="var $k='$v'\n";
102
+ $out.="</script>\n";
103
+
104
+ return $out;
105
+ }
106
+ }
107
+ ?>
app/code/community/IG/LightBox/etc/config.xml CHANGED
@@ -1,7 +1,7 @@
1
  <config>
2
  <modules>
3
  <IG_LightBox>
4
- <version>1.0.5</version>
5
  </IG_LightBox>
6
  </modules>
7
 
@@ -11,6 +11,16 @@
11
  <class>IG_LightBox_Helper</class>
12
  </ig_lightbox>
13
  </helpers>
 
 
 
 
 
 
 
 
 
 
14
  <resources>
15
  <ig_lightbox_setup>
16
  <setup>
@@ -88,9 +98,10 @@
88
  </adminhtml>
89
 
90
  <default>
91
- <ig_productform>
92
  <general>
93
  <enabled>1</enabled>
 
94
  <bigImageSize>800x600</bigImageSize>
95
  <mainImageSize>265x265</mainImageSize>
96
  <thumbnailImageSize>60x60</thumbnailImageSize>
@@ -117,6 +128,6 @@
117
  <imageResize>0.5</imageResize>
118
  <imageSwap>0.5</imageSwap>
119
  </effects>
120
- </ig_productform>
121
  </default>
122
  </config>
1
  <config>
2
  <modules>
3
  <IG_LightBox>
4
+ <version>1.0.8</version>
5
  </IG_LightBox>
6
  </modules>
7
 
11
  <class>IG_LightBox_Helper</class>
12
  </ig_lightbox>
13
  </helpers>
14
+ <blocks>
15
+ <ig_lightbox>
16
+ <class>IG_LightBox_Block</class>
17
+ </ig_lightbox>
18
+ <catalog>
19
+ <rewrite>
20
+ <product_view_media>IG_LightBox_Block_Media</product_view_media>
21
+ </rewrite>
22
+ </catalog>
23
+ </blocks>
24
  <resources>
25
  <ig_lightbox_setup>
26
  <setup>
98
  </adminhtml>
99
 
100
  <default>
101
+ <ig_lightbox>
102
  <general>
103
  <enabled>1</enabled>
104
+ <wrapImages>1</wrapImages>
105
  <bigImageSize>800x600</bigImageSize>
106
  <mainImageSize>265x265</mainImageSize>
107
  <thumbnailImageSize>60x60</thumbnailImageSize>
128
  <imageResize>0.5</imageResize>
129
  <imageSwap>0.5</imageSwap>
130
  </effects>
131
+ </ig_lightbox>
132
  </default>
133
  </config>
app/code/community/IG/LightBox/etc/system.xml CHANGED
@@ -61,6 +61,15 @@
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
  </thumbnailImageSize>
 
 
 
 
 
 
 
 
 
64
  </fields>
65
  </general>
66
 
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
  </thumbnailImageSize>
64
+ <wrapImages translate="label comment">
65
+ <label>Wrap images</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>20</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </wrapImages>
73
  </fields>
74
  </general>
75
 
app/design/frontend/default/default/template/ig_lightbox/media.phtml CHANGED
@@ -1,76 +1,4 @@
1
- <?php
2
- $_ig_lightbox_config_general = Mage::getStoreConfig('ig_lightbox/general');
3
- $_ig_lightbox_config_display = Mage::getStoreConfig('ig_lightbox/display');
4
- $_ig_lightbox_config_effects = Mage::getStoreConfig('ig_lightbox/effects');
5
-
6
- /* Read configuration */
7
- list($_ig_lightbox_main_width, $_ig_lightbox_main_height) = split('x', $_ig_lightbox_config_general['mainImageSize']);
8
- list($_ig_lightbox_thu_width, $_ig_lightbox_thu_height) = split('x', $_ig_lightbox_config_general['thumbnailImageSize']);
9
- list($_ig_lightbox_big_width, $_ig_lightbox_big_height) = split('x', $_ig_lightbox_config_general['bigImageSize']);
10
-
11
- $_ig_lightbox_background_opactiy = floatval($_ig_lightbox_config_display['backgroundOpacity']);
12
- $_ig_lightbox_imagebox_opactiy = floatval($_ig_lightbox_config_display['imageboxOpacity']);
13
- $_ig_lightbox_toolbar_opactiy = floatval($_ig_lightbox_config_display['toolbarOpacity']);
14
-
15
- $_ig_lightbox_background_color = $_ig_lightbox_config_display['backgroundColor'];
16
- $_ig_lightbox_imagebox_color = $_ig_lightbox_config_display['imageboxColor'];
17
- $_ig_lightbox_toolbar_color = $_ig_lightbox_config_display['toolbarColor'];
18
- $_ig_lightbox_toolbar_text_color = $_ig_lightbox_config_display['toolbarTextColor'];
19
- $_ig_lightbox_toolbar_text_font = $_ig_lightbox_config_display['toolbarTextFont'];
20
- $_ig_lightbox_toolbar_text_size = intval($_ig_lightbox_config_display['toolbarTextSize']);
21
-
22
- $_ig_lightbox_border_color = $_ig_lightbox_config_display['borderColor'];
23
- $_ig_lightbox_border_size = intval($_ig_lightbox_config_display['borderSize']);
24
-
25
- $_ig_padding_size = intval($_ig_lightbox_config_display['paddingSize']);
26
-
27
- $_ig_lightbox_fade_in_duration = floatval($_ig_lightbox_config_effects['fadeIn']);
28
- $_ig_lightbox_fade_out_duration = floatval($_ig_lightbox_config_effects['fadeOut']);
29
- $_ig_lightbox_image_swap_duration = floatval($_ig_lightbox_config_effects['imageSwap']);
30
- $_ig_lightbox_image_resize_duration = floatval($_ig_lightbox_config_effects['imageResize']);
31
-
32
- /* Default values and ranges */
33
- $_ig_lightbox_main_width = intval($_ig_lightbox_main_width) > 0 ? intval($_ig_lightbox_main_width) : 800;
34
- $_ig_lightbox_main_height = intval($_ig_lightbox_main_height) > 0 ? intval($_ig_lightbox_main_height) : 600;
35
- $_ig_lightbox_thu_width = intval($_ig_lightbox_thu_width) > 0 ? intval($_ig_lightbox_thu_width) : 256;
36
- $_ig_lightbox_thu_height = intval($_ig_lightbox_thu_height) > 0 ? intval($_ig_lightbox_thu_height) : 256;
37
- $_ig_lightbox_big_width = intval($_ig_lightbox_big_width) > 0 ? intval($_ig_lightbox_big_width) : 60;
38
- $_ig_lightbox_big_height = intval($_ig_lightbox_big_height) > 0 ? intval($_ig_lightbox_big_height) : 60;
39
-
40
- $_ig_lightbox_background_color = $_ig_lightbox_background_color ? $_ig_lightbox_background_color : '#000000';
41
- $_ig_lightbox_imagebox_color = $_ig_lightbox_imagebox_color ? $_ig_lightbox_imagebox_color : '#000000';
42
- $_ig_lightbox_toolbar_color = $_ig_lightbox_toolbar_color ? $_ig_lightbox_toolbar_color : '#000000';
43
- $_ig_lightbox_toolbar_text_color = $_ig_lightbox_toolbar_text_color ? $_ig_lightbox_toolbar_text_color : '#000000';
44
- $_ig_lightbox_toolbar_text_font = $_ig_lightbox_toolbar_text_font ? $_ig_lightbox_toolbar_text_font : 'Verdana';
45
- $_ig_lightbox_border_color = $_ig_lightbox_border_color ? $_ig_lightbox_border_color : '#000000';
46
-
47
- $_ig_lightbox_toolbar_text_size = intval($_ig_lightbox_toolbar_text_size) > 0 ? intval($_ig_lightbox_toolbar_text_size) : 10;
48
- $_ig_lightbox_border_size = intval($_ig_lightbox_border_size) >= 0 ? intval($_ig_lightbox_border_size) : 0;
49
-
50
- $_ig_lightbox_background_opactiy = min(1.0, max(0.0, $_ig_lightbox_background_opactiy));
51
- $_ig_lightbox_imagebox_opactiy = min(1.0, max(0.0, $_ig_lightbox_imagebox_opactiy));
52
- $_ig_lightbox_toolbar_opactiy = min(1.0, max(0.0, $_ig_lightbox_toolbar_opactiy));
53
- ?>
54
-
55
- <script type="text/javascript">
56
- ig_lightbox_img_border = <?php echo $_ig_padding_size ?>;
57
- ig_lightbox_background_opactiy = <?php echo $_ig_lightbox_background_opactiy ?>;
58
- ig_lightbox_imagebox_opactiy = <?php echo $_ig_lightbox_imagebox_opactiy ?>;
59
- ig_lightbox_toolbar_opactiy = <?php echo $_ig_lightbox_toolbar_opactiy ?>;
60
- ig_lightbox_background_color = "<?php echo $_ig_lightbox_background_color ?>";
61
- ig_lightbox_imagebox_color = "<?php echo $_ig_lightbox_imagebox_color ?>";
62
- ig_lightbox_toolbar_color = "<?php echo $_ig_lightbox_toolbar_color ?>";
63
- ig_lightbox_toolbar_text_color = "<?php echo $_ig_lightbox_toolbar_text_color ?>";
64
- ig_lightbox_toolbar_text_font = "<?php echo $_ig_lightbox_toolbar_text_font ?>";
65
- ig_lightbox_toolbar_text_size = <?php echo $_ig_lightbox_toolbar_text_size ?>;
66
- ig_lightbox_border_size = <?php echo $_ig_lightbox_border_size ?>;
67
- ig_lightbox_border_color = "<?php echo $_ig_lightbox_border_color ?>";
68
-
69
- ig_lightbox_fade_in_duration = <?php echo $_ig_lightbox_fade_in_duration ?>;
70
- ig_lightbox_fade_out_duration = <?php echo $_ig_lightbox_fade_out_duration ?>;
71
- ig_lightbox_image_swap_duration = <?php echo $_ig_lightbox_image_swap_duration ?>;
72
- ig_lightbox_image_resize_duration = <?php echo $_ig_lightbox_image_resize_duration ?>;
73
- </script>
74
 
75
  <div id="ig-lightbox-back"></div>
76
  <div id="ig-lightbox-image"></div>
@@ -78,9 +6,9 @@
78
  <table id="ig-lightbox-image-commands">
79
  <tbody>
80
  <tr>
81
- <td style="text-align: center" width="64"><a href="#" onclick="ig_lightbox_prev()"><img src="<?php echo $this->getSkinUrl('images/ig_lightbox/prev.png') ?>" alt="prev" /></a></td>
82
  <td id="ig-lightbox-image-commands-label-td"><div id="image-label"></div></td>
83
- <td style="text-align: center" width="64"><a href="#" onclick="ig_lightbox_next()"><img src="<?php echo $this->getSkinUrl('images/ig_lightbox/next.png') ?>" alt="next" /></a></td>
84
  </tr>
85
  </tbody>
86
  </table>
@@ -93,42 +21,66 @@
93
  $_helper = $this->helper('catalog/output');
94
  ?>
95
 
96
- <a href="#" onclick="ig_lightbox_show(0)">
97
  <?php
98
- $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->keepFrame(false)->resize($_ig_lightbox_main_width, $_ig_lightbox_main_height).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
 
99
  echo $_helper->productAttribute($_product, $_img, 'image')
100
  ?>
101
  </a>
102
 
103
  <?php
104
  $js_load=array();
105
- if (count($this->getGalleryImages()) > 0)
106
  {
107
  ?>
108
  <div class="more-views">
109
  <h4><?php echo $this->__('More Views') ?></h4>
110
  <ul>
111
  <?php
 
112
  foreach ($this->getGalleryImages() as $_image)
113
  {
114
- $src=$this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->constrainOnly(true)->keepFrame(false)->resize($_ig_lightbox_big_width, $_ig_lightbox_big_height);
115
- $lbl=$this->htmlEscape($_image->getLabel());
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  array_push($js_load, "ig_lightbox_img_sequence.push('$src');");
118
  array_push($js_load, "ig_lightbox_img_labels.push('$lbl');");
 
 
119
  ?>
120
  <li>
121
  <a href="#" onclick="ig_lightbox_show('<?php echo $_ig_lightbox_images_count; ?>')">
122
- <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->keepFrame(true)->resize($_ig_lightbox_thu_width, $_ig_lightbox_thu_height); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
123
  </a>
124
  </li>
125
  <?php
126
  $_ig_lightbox_images_count++;
 
127
  }
128
  ?>
129
  </ul>
130
  </div>
131
- <?php } ?>
 
 
 
 
 
 
 
132
 
133
  <script type="text/javascript">
134
  Event.observe(window, 'load', function() {
1
+ <?php echo $this->getIgLightBoxJsConfig() ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  <div id="ig-lightbox-back"></div>
4
  <div id="ig-lightbox-image"></div>
6
  <table id="ig-lightbox-image-commands">
7
  <tbody>
8
  <tr>
9
+ <td style="text-align: center" width="64"><a href="#" onclick="ig_lightbox_prev()"><img id="ig-lightbox-prev" src="<?php echo $this->getSkinUrl('images/ig_lightbox/prev.png') ?>" alt="prev" /></a></td>
10
  <td id="ig-lightbox-image-commands-label-td"><div id="image-label"></div></td>
11
+ <td style="text-align: center" width="64"><a href="#" onclick="ig_lightbox_next()"><img id="ig-lightbox-next" src="<?php echo $this->getSkinUrl('images/ig_lightbox/next.png') ?>" alt="next" /></a></td>
12
  </tr>
13
  </tbody>
14
  </table>
21
  $_helper = $this->helper('catalog/output');
22
  ?>
23
 
24
+ <a href="#" onclick="ig_lightbox_show(-1)">
25
  <?php
26
+ list($width, $height)=$this->getIgLightBoxMainImageSize();
27
+ $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->keepFrame(false)->resize($width, $height).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
28
  echo $_helper->productAttribute($_product, $_img, 'image')
29
  ?>
30
  </a>
31
 
32
  <?php
33
  $js_load=array();
34
+ if (count($this->getGalleryImages()) > 1)
35
  {
36
  ?>
37
  <div class="more-views">
38
  <h4><?php echo $this->__('More Views') ?></h4>
39
  <ul>
40
  <?php
41
+ $c=0;
42
  foreach ($this->getGalleryImages() as $_image)
43
  {
44
+ list($width, $height)=$this->getIgLightBoxBigImageSize();
45
+ $src=$this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->constrainOnly(true)->keepFrame(false)->resize($width, $height);
46
+
47
+ if ($_image->getFile() == $_product->getImage())
48
+ {
49
+ array_push($js_load, "ig_lightbox_main_img=$c;");
50
+ }
51
+
52
+ $lbl=$this->__("Photo %d of %d", $c+1, sizeof($this->getGalleryImages()));
53
+
54
+ if ($_image->getLabel())
55
+ $lbl.=' - '.$this->htmlEscape($_image->getLabel());
56
+
57
+ str_replace("'", "\\'", $lbl);
58
 
59
  array_push($js_load, "ig_lightbox_img_sequence.push('$src');");
60
  array_push($js_load, "ig_lightbox_img_labels.push('$lbl');");
61
+
62
+ list($width, $height)=$this->getIgLightBoxThumbnailImageSize();
63
  ?>
64
  <li>
65
  <a href="#" onclick="ig_lightbox_show('<?php echo $_ig_lightbox_images_count; ?>')">
66
+ <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->keepFrame(true)->resize($width, $height); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
67
  </a>
68
  </li>
69
  <?php
70
  $_ig_lightbox_images_count++;
71
+ $c++;
72
  }
73
  ?>
74
  </ul>
75
  </div>
76
+ <?php
77
+ }
78
+ else
79
+ {
80
+ array_push($js_load, "ig_lightbox_img_sequence.push('".$_product->getImageUrl()."');");
81
+ array_push($js_load, "ig_lightbox_img_labels.push('".$_product->getName()."');");
82
+ }
83
+ ?>
84
 
85
  <script type="text/javascript">
86
  Event.observe(window, 'load', function() {
app/locale/en_US/IG_LightBox.csv CHANGED
@@ -29,4 +29,5 @@
29
  "Size in pixels (e.g.: 10)","Size in pixels (e.g.: 10)"
30
  "Size in pixels (e.g.: 1)","Size in pixels (e.g.: 1)"
31
  "Font name (e.g.: Verdana)","Font name (e.g.: Verdana)"
32
- "Value in seconds (e.g.: 1.5)","Value in seconds (e.g.: 1.5)"
 
29
  "Size in pixels (e.g.: 10)","Size in pixels (e.g.: 10)"
30
  "Size in pixels (e.g.: 1)","Size in pixels (e.g.: 1)"
31
  "Font name (e.g.: Verdana)","Font name (e.g.: Verdana)"
32
+ "Value in seconds (e.g.: 1.5)","Value in seconds (e.g.: 1.5)"
33
+ "Photo %d of %d","Photo %d of %d"
app/locale/it_IT/IG_LightBox.csv CHANGED
@@ -1,4 +1,5 @@
1
  "Enable LightBox","Abilita LightBox"
 
2
  "Maximum size of big image","Dimensione massima immagine grande"
3
  "Maximum size of base image","Dimensione massima immagine base"
4
  "Maximum size of thumbnails","Dimensione massima dei thumbnail"
@@ -29,4 +30,5 @@
29
  "Size in pixels (e.g.: 10)","Dimensione in pixel (es.: 10)"
30
  "Size in pixels (e.g.: 1)","Dimensione in pixel (es.: 1)"
31
  "Font name (e.g.: Verdana)","Nome font (es.: Verdana)"
32
- "Value in seconds (e.g.: 1.5)","Valore in secondi (es.: 1.5)"
 
1
  "Enable LightBox","Abilita LightBox"
2
+ "Wrap images","Wrap images"
3
  "Maximum size of big image","Dimensione massima immagine grande"
4
  "Maximum size of base image","Dimensione massima immagine base"
5
  "Maximum size of thumbnails","Dimensione massima dei thumbnail"
30
  "Size in pixels (e.g.: 10)","Dimensione in pixel (es.: 10)"
31
  "Size in pixels (e.g.: 1)","Dimensione in pixel (es.: 1)"
32
  "Font name (e.g.: Verdana)","Nome font (es.: Verdana)"
33
+ "Value in seconds (e.g.: 1.5)","Valore in secondi (es.: 1.5)"
34
+ "Photo %d of %d","Foto %d di %d"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>IG_LightBox</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license>GNU GPL</license>
7
  <channel>community</channel>
@@ -18,9 +18,9 @@ You can change colors, effect, fonts or image sizes directly FROM MAGENTO BACK-E
18
  IDEALIAGroup LightBox is fully integrated in Magento system configuration.</description>
19
  <notes>Enjoy it ;)</notes>
20
  <authors><author><name>Riccardo Tempesta</name><user>auto-converted</user><email>tempesta@idealiagroup.com</email></author><author><name>Marco Giorgetti</name><user>auto-converted</user><email>giorgetti@idealiagroup.com</email></author><author><name>Maria Chiara Luongo</name><user>auto-converted</user><email>sunlight10@hotmail.it</email></author></authors>
21
- <date>2009-09-18</date>
22
- <time>16:51:17</time>
23
- <contents><target name="magelocale"><dir name="de_DE"><file name="IG_LightBox.csv" hash="0ba5aeb54e9ed302fa26773a36ef3ab5"/></dir><dir name="en_US"><file name="IG_LightBox.csv" hash="1c74b1248e1451699c928473601beb31"/></dir><dir name="it_IT"><file name="IG_LightBox.csv" hash="c749555010a00b805807546736c3db6a"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="ig_lightbox.css" hash="57d9a0cc9187bb6aee681a48d3950c36"/></dir><dir name="images"><dir name="ig_lightbox"><file name="close.png" hash="d27820a6f000dc575004e5b2e00152fb"/><file name="next.png" hash="ef678358e90669e00dad3d50137a9dfa"/><file name="prev.png" hash="9c0b22c4237e51b5be3447ee53eca339"/></dir></dir><dir name="js"><file name="ig_effects.js" hash="8433b39a8e7c93a0ed56e467e251f84b"/><file name="ig_lightbox.js" hash="80089da0784afa9753d2c5e695b28b9e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ig_lightbox.xml" hash="d9cdbc3ea453d5af59a3f71218cb20e2"/></dir><dir name="template"><dir name="ig_lightbox"><file name="media.phtml" hash="edb30142049069bdab489233a406535c"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="IG"><dir name="LightBox"><dir name="etc"><file name="config.xml" hash="524402cd365fa98528e5884096316fb9"/><file name="system.xml" hash="2e025ecf6ab256534ab3db8c63154331"/></dir><dir name="Helper"><file name="Data.php" hash="8a0b53a32373887f1ac6d9433bba5dd5"/></dir><dir name="sql"><dir name="ig_lightbox_setup"><file name="mysql4-install-1.0.3.php" hash="f7cf810260f5e96cd6fa6ff314bd5330"/><file name="mysql4-install-1.0.4.php" hash="f7cf810260f5e96cd6fa6ff314bd5330"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="IG_LightBox.xml" hash="5d8f136255066de4f378d5c9bfe6edaf"/></dir></target></contents>
24
  <compatible/>
25
  <dependencies/>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>IG_LightBox</name>
4
+ <version>1.0.8</version>
5
  <stability>stable</stability>
6
  <license>GNU GPL</license>
7
  <channel>community</channel>
18
  IDEALIAGroup LightBox is fully integrated in Magento system configuration.</description>
19
  <notes>Enjoy it ;)</notes>
20
  <authors><author><name>Riccardo Tempesta</name><user>auto-converted</user><email>tempesta@idealiagroup.com</email></author><author><name>Marco Giorgetti</name><user>auto-converted</user><email>giorgetti@idealiagroup.com</email></author><author><name>Maria Chiara Luongo</name><user>auto-converted</user><email>sunlight10@hotmail.it</email></author></authors>
21
+ <date>2009-10-26</date>
22
+ <time>18:05:15</time>
23
+ <contents><target name="magelocale"><dir name="de_DE"><file name="IG_LightBox.csv" hash="0ba5aeb54e9ed302fa26773a36ef3ab5"/></dir><dir name="en_US"><file name="IG_LightBox.csv" hash="d0e240588dab13a1ed211586334ca8d1"/></dir><dir name="it_IT"><file name="IG_LightBox.csv" hash="461be43e55b6b407637d2b6ef4079ac2"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="ig_lightbox.css" hash="57d9a0cc9187bb6aee681a48d3950c36"/></dir><dir name="images"><dir name="ig_lightbox"><file name="close.png" hash="d27820a6f000dc575004e5b2e00152fb"/><file name="next.png" hash="ef678358e90669e00dad3d50137a9dfa"/><file name="prev.png" hash="9c0b22c4237e51b5be3447ee53eca339"/></dir></dir><dir name="js"><file name="ig_effects.js" hash="8433b39a8e7c93a0ed56e467e251f84b"/><file name="ig_lightbox.js" hash="cbf858b12e94f91ff67c5e3fb3099837"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ig_lightbox.xml" hash="d9cdbc3ea453d5af59a3f71218cb20e2"/></dir><dir name="template"><dir name="ig_lightbox"><file name="media.phtml" hash="9383e589a6ed745dca566eaa81f758e5"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="IG"><dir name="LightBox"><dir name="Block"><file name="Media.php" hash="d835e6ea617350413719a2d34a653688"/></dir><dir name="etc"><file name="config.xml" hash="e686a05e05d3b5acd15393f0510791da"/><file name="system.xml" hash="a083627cd216f73bbd0ed318f3f50b2a"/></dir><dir name="Helper"><file name="Data.php" hash="8a0b53a32373887f1ac6d9433bba5dd5"/></dir><dir name="sql"><dir name="ig_lightbox_setup"><file name="mysql4-install-1.0.3.php" hash="f7cf810260f5e96cd6fa6ff314bd5330"/><file name="mysql4-install-1.0.4.php" hash="f7cf810260f5e96cd6fa6ff314bd5330"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="IG_LightBox.xml" hash="5d8f136255066de4f378d5c9bfe6edaf"/></dir></target></contents>
24
  <compatible/>
25
  <dependencies/>
26
  </package>
skin/frontend/default/default/js/ig_lightbox.js CHANGED
@@ -1,4 +1,6 @@
1
  /* BEGIN: Configurable parameters */
 
 
2
  var ig_lightbox_img_border = 10;
3
  var ig_lightbox_cmd_box_height = 32;
4
  var ig_lightbox_initial_width = 100;
@@ -82,6 +84,8 @@ function ig_lightbox_show(n)
82
  {
83
  if (!ig_lightbox_img_sequence.length) return;
84
 
 
 
85
  document.body.style.overflowX="hidden";
86
 
87
  // if (typeof(window.innerHeight) == "undefined")
@@ -111,6 +115,16 @@ function ig_lightbox_show(n)
111
  var img_width = img_loader.width;
112
 
113
  ig_lightbox_cur_image_n = n;
 
 
 
 
 
 
 
 
 
 
114
 
115
  if (ig_lightbox_win_is_open)
116
  {
1
  /* BEGIN: Configurable parameters */
2
+ var ig_lightbox_wrap_images = 1;
3
+ var ig_lightbox_main_img = 0;
4
  var ig_lightbox_img_border = 10;
5
  var ig_lightbox_cmd_box_height = 32;
6
  var ig_lightbox_initial_width = 100;
84
  {
85
  if (!ig_lightbox_img_sequence.length) return;
86
 
87
+ if (n<0) n=ig_lightbox_main_img;
88
+
89
  document.body.style.overflowX="hidden";
90
 
91
  // if (typeof(window.innerHeight) == "undefined")
115
  var img_width = img_loader.width;
116
 
117
  ig_lightbox_cur_image_n = n;
118
+
119
+ if (!ig_lightbox_wrap_images)
120
+ {
121
+ $('ig-lightbox-next').setStyle({
122
+ 'display': ((ig_lightbox_cur_image_n == ig_lightbox_img_sequence.length - 1) ? 'none' : 'block')
123
+ })
124
+ $('ig-lightbox-prev').setStyle({
125
+ 'display': ((ig_lightbox_cur_image_n == 0) ? 'none' : 'block')
126
+ })
127
+ }
128
 
129
  if (ig_lightbox_win_is_open)
130
  {