Photo Gallery by WD – Responsive Photo Gallery - Version 1.1.19

Version Description

  • preload images count options
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.1.19
Comparing to
See all releases

Code changes from version 1.1.18 to 1.1.19

admin/controllers/BWGControllerOptions_bwg.php CHANGED
@@ -169,6 +169,8 @@ class BWGControllerOptions_bwg {
169
  $album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
170
  $show_search_box = (isset($_POST['show_search_box']) ? esc_html(stripslashes($_POST['show_search_box'])) : 0);
171
  $search_box_width = (isset($_POST['search_box_width']) ? esc_html(stripslashes($_POST['search_box_width'])) : 180);
 
 
172
  $popup_enable_info = (isset($_POST['popup_enable_info']) ? esc_html(stripslashes($_POST['popup_enable_info'])) : 1);
173
  $popup_info_always_show = (isset($_POST['popup_info_always_show']) ? esc_html(stripslashes($_POST['popup_info_always_show'])) : 0);
174
  $popup_enable_rate = (isset($_POST['popup_enable_rate']) ? esc_html(stripslashes($_POST['popup_enable_rate'])) : 0);
@@ -265,6 +267,8 @@ class BWGControllerOptions_bwg {
265
  'album_view_type' => $album_view_type,
266
  'show_search_box' => $show_search_box,
267
  'search_box_width' => $search_box_width,
 
 
268
  'popup_enable_info' => $popup_enable_info,
269
  'popup_info_always_show' => $popup_info_always_show,
270
  'popup_enable_rate' => $popup_enable_rate,
169
  $album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
170
  $show_search_box = (isset($_POST['show_search_box']) ? esc_html(stripslashes($_POST['show_search_box'])) : 0);
171
  $search_box_width = (isset($_POST['search_box_width']) ? esc_html(stripslashes($_POST['search_box_width'])) : 180);
172
+ $preload_images = (isset($_POST['preload_images']) ? esc_html(stripslashes($_POST['preload_images'])) : 1);
173
+ $preload_images_count = (isset($_POST['preload_images_count']) ? esc_html(stripslashes($_POST['preload_images_count'])) : 10);
174
  $popup_enable_info = (isset($_POST['popup_enable_info']) ? esc_html(stripslashes($_POST['popup_enable_info'])) : 1);
175
  $popup_info_always_show = (isset($_POST['popup_info_always_show']) ? esc_html(stripslashes($_POST['popup_info_always_show'])) : 0);
176
  $popup_enable_rate = (isset($_POST['popup_enable_rate']) ? esc_html(stripslashes($_POST['popup_enable_rate'])) : 0);
267
  'album_view_type' => $album_view_type,
268
  'show_search_box' => $show_search_box,
269
  'search_box_width' => $search_box_width,
270
+ 'preload_images' => $preload_images,
271
+ 'preload_images_count' => $preload_images_count,
272
  'popup_enable_info' => $popup_enable_info,
273
  'popup_info_always_show' => $popup_info_always_show,
274
  'popup_enable_rate' => $popup_enable_rate,
admin/models/BWGModelOptions_bwg.php CHANGED
@@ -123,6 +123,8 @@ class BWGModelOptions_bwg {
123
  $row->album_view_type = 'thumbnail';
124
  $row->show_search_box = 0;
125
  $row->search_box_width = 180;
 
 
126
  $row->popup_enable_info = 1;
127
  $row->popup_info_always_show = 0;
128
  $row->popup_enable_rate = 0;
123
  $row->album_view_type = 'thumbnail';
124
  $row->show_search_box = 0;
125
  $row->search_box_width = 180;
126
+ $row->preload_images = 1;
127
+ $row->preload_images_count = 10;
128
  $row->popup_enable_info = 1;
129
  $row->popup_info_always_show = 0;
130
  $row->popup_enable_rate = 0;
admin/views/BWGViewOptions_bwg.php CHANGED
@@ -170,8 +170,8 @@ class BWGViewOptions_bwg {
170
  <label>Show search box:</label>
171
  </td>
172
  <td>
173
- <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box(1)" /><label for="show_search_box_1">Yes</label>
174
- <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box(0)" /><label for="show_search_box_0">No</label>
175
  <div class="spider_description"></div>
176
  </td>
177
  </tr>
@@ -183,6 +183,25 @@ class BWGViewOptions_bwg {
183
  <input type="text" name="search_box_width" id="search_box_width" value="<?php echo $row->search_box_width; ?>" class="spider_int_input" /> px
184
  <div class="spider_description"></div>
185
  </td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  </tr>
187
  </tbody>
188
  </table>
@@ -1221,7 +1240,8 @@ class BWGViewOptions_bwg {
1221
  window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
1222
  window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
1223
  window.onload = bwg_popup_fullscreen(<?php echo $row->popup_fullscreen; ?>);
1224
- window.onload = bwg_show_search_box(<?php echo $row->show_search_box; ?>);
 
1225
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0'" ?>);
1226
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_info', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_info', 'popup_enable_ctrl_btn_0'" ?>);
1227
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_download', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_download', 'popup_enable_ctrl_btn_0'" ?>);
170
  <label>Show search box:</label>
171
  </td>
172
  <td>
173
+ <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($row->show_search_box) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_search_box_width', 'show_search_box_1')" /><label for="show_search_box_1">Yes</label>
174
+ <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$row->show_search_box) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_search_box_width', 'show_search_box_0')" /><label for="show_search_box_0">No</label>
175
  <div class="spider_description"></div>
176
  </td>
177
  </tr>
183
  <input type="text" name="search_box_width" id="search_box_width" value="<?php echo $row->search_box_width; ?>" class="spider_int_input" /> px
184
  <div class="spider_description"></div>
185
  </td>
186
+ </tr>
187
+ <tr>
188
+ <td class="spider_label_options">
189
+ <label>Preload images:</label>
190
+ </td>
191
+ <td>
192
+ <input type="radio" name="preload_images" id="preload_images_1" value="1" <?php if ($row->preload_images) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_preload_images_count', 'preload_images_1')" /><label for="preload_images_1">Yes</label>
193
+ <input type="radio" name="preload_images" id="preload_images_0" value="0" <?php if (!$row->preload_images) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_preload_images_count', 'preload_images_0')" /><label for="preload_images_0">No</label>
194
+ <div class="spider_description"></div>
195
+ </td>
196
+ </tr>
197
+ <tr id="tr_preload_images_count">
198
+ <td class="spider_label_options">
199
+ <label for="preload_images_count">Count of images: </label>
200
+ </td>
201
+ <td>
202
+ <input type="text" name="preload_images_count" id="preload_images_count" value="<?php echo $row->preload_images_count; ?>" class="spider_int_input" />
203
+ <div class="spider_description">Count of images to preload (0 for all).</div>
204
+ </td>
205
  </tr>
206
  </tbody>
207
  </table>
1240
  window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
1241
  window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
1242
  window.onload = bwg_popup_fullscreen(<?php echo $row->popup_fullscreen; ?>);
1243
+ window.onload = bwg_enable_disable(<?php echo $row->show_search_box ? "'', 'tr_search_box_width', 'show_search_box_1'" : "'none', 'tr_search_box_width', 'show_search_box_0'" ?>);
1244
+ window.onload = bwg_enable_disable(<?php echo $row->preload_images ? "'', 'tr_preload_images_count', 'preload_images_1'" : "'none', 'tr_preload_images_count', 'preload_images_0'" ?>);
1245
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0'" ?>);
1246
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_info', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_info', 'popup_enable_ctrl_btn_0'" ?>);
1247
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_download', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_download', 'popup_enable_ctrl_btn_0'" ?>);
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -752,6 +752,7 @@ class BWGViewGalleryBox {
752
  data["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
753
  data["<?php echo $key; ?>"]["comment_count"] = "<?php echo $image_row->comment_count; ?>";
754
  data["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
 
755
  data["<?php echo $key; ?>"]["avg_rating"] = "<?php echo $image_row->avg_rating; ?>";
756
  data["<?php echo $key; ?>"]["rate"] = "<?php echo $image_row->rate; ?>";
757
  data["<?php echo $key; ?>"]["rate_count"] = "<?php echo $image_row->rate_count; ?>";
@@ -851,22 +852,23 @@ class BWGViewGalleryBox {
851
  <div class="bwg_slide_bg">
852
  <div class="bwg_slider">
853
  <?php
 
854
  foreach ($image_rows as $key => $image_row) {
855
  $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
856
  if ($image_row->id == $current_image_id) {
857
  $current_key = $key;
858
  ?>
859
- <span class="bwg_popup_image_spun" id="image_id_<?php echo $image_row->id; ?>">
860
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
861
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
862
  <?php
863
  if (!$is_video) {
864
  ?>
865
- <img id="bwg_popup_image" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>" />
866
  <?php
867
  }
868
  else { ?>
869
- <span id="bwg_popup_image" class="bwg_popup_video" image_id="<?php echo $image_row->id; ?>">
870
  <iframe class="bwg_video_frame" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
871
  </span>
872
  <?php
@@ -875,6 +877,8 @@ class BWGViewGalleryBox {
875
  </span>
876
  </span>
877
  </span>
 
 
878
  <input type="hidden" id="bwg_current_image_key" value="<?php echo $key; ?>" />
879
  <?php
880
  if ($key == 0) {?>
@@ -883,37 +887,15 @@ class BWGViewGalleryBox {
883
  if ($key == (count($image_rows) - 1)) {?>
884
  <script>jQuery("#spider_popup_right").hover().css({"display": "none"});</script><?php
885
  }
 
886
  }
887
- else {
888
- ?>
889
- <span class="bwg_popup_image_second_spun" id="image_id_<?php echo $image_row->id; ?>">
890
- <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
891
- <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
892
- <?php
893
- if (!$is_video) {
894
- ?>
895
- <img id="bwg_popup_image_second" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
896
- <?php
897
- }
898
- else { ?>
899
- <span id="bwg_popup_image_second" class="bwg_popup_video">
900
- <iframe class="bwg_video_frame" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
901
- </span>
902
- <?php
903
- }
904
- ?>
905
- </span>
906
- </span>
907
- </span>
908
- <?php
909
- }
910
- }
911
  ?>
912
  </div>
913
  </div>
914
  </div>
915
- <a id="spider_popup_left" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data); return false;" ontouchend="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data); return false;"><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
916
- <a id="spider_popup_right" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data); return false;" ontouchend="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data); return false;"><span id="spider_popup_right-ico"><span><i class="bwg_next_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
917
  </div>
918
  </div>
919
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;" ontouchend="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
@@ -1314,40 +1296,71 @@ class BWGViewGalleryBox {
1314
  else {
1315
  jQuery(".bwg_image_info_container1").css("display", "none");
1316
  }
1317
- var current_image_class = "#image_id_" + data[current_key]["id"];
1318
- var next_image_class = "#image_id_" + data[key]["id"];
1319
- bwg_<?php echo $image_effect; ?>(current_image_class, next_image_class, direction);
1320
- jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1321
- jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1322
- jQuery("#bwg_download").attr("download", data[key]['image_url']);
1323
- /* Load comments.*/
1324
- if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1325
- if (data[key]["comment_count"] == 0) {
1326
- jQuery("#bwg_added_comments").hide();
 
 
 
 
 
 
 
 
1327
  }
1328
- else {
1329
- jQuery("#bwg_added_comments").show();
1330
- spider_set_input_value('ajax_task', 'display');
1331
- spider_set_input_value('image_id', jQuery('#bwg_popup_image').attr('image_id'));
1332
- spider_ajax_save('bwg_comment_form');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1333
  }
 
1334
  }
1335
- /* Update custom scroll.*/
1336
- if (typeof jQuery().mCustomScrollbar !== 'undefined' && jQuery.isFunction(jQuery().mCustomScrollbar)) {
1337
- jQuery(".bwg_comments").mCustomScrollbar({
1338
- advanced:{
1339
- updateOnContentResize: true
1340
- }
1341
  });
1342
  }
1343
- jQuery(".mCSB_scrollTools").hide();
1344
- <?php
1345
- if ($enable_image_filmstrip) {
1346
- ?>
1347
- bwg_move_filmstrip();
1348
- <?php
1349
  }
1350
- ?>
1351
  }
1352
  }
1353
  jQuery(document).on('keydown', function (e) {
@@ -1373,6 +1386,19 @@ class BWGViewGalleryBox {
1373
  e.returnValue = false;
1374
  }
1375
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
1376
  function bwg_popup_resize() {
1377
  var comment_container_width = 0;
1378
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
@@ -1592,6 +1618,14 @@ class BWGViewGalleryBox {
1592
  bwg_reset_zoom();
1593
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1594
  var bwg_click = isMobile ? 'touchend' : 'click';
 
 
 
 
 
 
 
 
1595
  if (navigator.appVersion.indexOf("MSIE 10") != -1 || navigator.appVersion.indexOf("MSIE 9") != -1) {
1596
  setTimeout(function () {
1597
  bwg_popup_resize();
@@ -1970,6 +2004,11 @@ class BWGViewGalleryBox {
1970
  <?php
1971
  }
1972
  ?>
 
 
 
 
 
1973
  });
1974
  /* Open with fullscreen.*/
1975
  function bwg_open_with_fullscreen() {
@@ -2028,13 +2067,13 @@ class BWGViewGalleryBox {
2028
  if (!jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
2029
  bwg_play();
2030
  }
2031
- var i = 0;
2032
  jQuery(".bwg_slider").children("span").each(function () {
2033
  if (jQuery(this).css('opacity') == 1) {
2034
  jQuery("#bwg_current_image_key").val(i);
2035
  }
2036
  i++;
2037
- });
2038
  });
2039
  jQuery(window).blur(function() {
2040
  event_stack = [];
752
  data["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
753
  data["<?php echo $key; ?>"]["comment_count"] = "<?php echo $image_row->comment_count; ?>";
754
  data["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
755
+ data["<?php echo $key; ?>"]["filename"] = "<?php echo $image_row->filename; ?>";
756
  data["<?php echo $key; ?>"]["avg_rating"] = "<?php echo $image_row->avg_rating; ?>";
757
  data["<?php echo $key; ?>"]["rate"] = "<?php echo $image_row->rate; ?>";
758
  data["<?php echo $key; ?>"]["rate_count"] = "<?php echo $image_row->rate_count; ?>";
852
  <div class="bwg_slide_bg">
853
  <div class="bwg_slider">
854
  <?php
855
+ $current_key = -6;
856
  foreach ($image_rows as $key => $image_row) {
857
  $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
858
  if ($image_row->id == $current_image_id) {
859
  $current_key = $key;
860
  ?>
861
+ <span class="bwg_popup_image_spun" id="bwg_popup_image" image_id="<?php echo $image_row->id; ?>">
862
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
863
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
864
  <?php
865
  if (!$is_video) {
866
  ?>
867
+ <img class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
868
  <?php
869
  }
870
  else { ?>
871
+ <span class="bwg_popup_video">
872
  <iframe class="bwg_video_frame" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
873
  </span>
874
  <?php
877
  </span>
878
  </span>
879
  </span>
880
+ <span class="bwg_popup_image_second_spun">
881
+ </span>
882
  <input type="hidden" id="bwg_current_image_key" value="<?php echo $key; ?>" />
883
  <?php
884
  if ($key == 0) {?>
887
  if ($key == (count($image_rows) - 1)) {?>
888
  <script>jQuery("#spider_popup_right").hover().css({"display": "none"});</script><?php
889
  }
890
+ break;
891
  }
892
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
893
  ?>
894
  </div>
895
  </div>
896
  </div>
897
+ <a id="spider_popup_left"><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
898
+ <a id="spider_popup_right"><span id="spider_popup_right-ico"><span><i class="bwg_next_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
899
  </div>
900
  </div>
901
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;" ontouchend="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
1296
  else {
1297
  jQuery(".bwg_image_info_container1").css("display", "none");
1298
  }
1299
+ var current_image_class = jQuery(".bwg_popup_image_spun").css("zIndex") == 2 ? ".bwg_popup_image_spun" : ".bwg_popup_image_second_spun";
1300
+ var next_image_class = current_image_class == ".bwg_popup_image_second_spun" ? ".bwg_popup_image_spun" : ".bwg_popup_image_second_spun";
1301
+
1302
+ var is_video = data[key]['filetype'] == "YOUTUBE" || data[key]['filetype'] == "VIMEO";
1303
+ var innhtml = '<span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">';
1304
+ if (!is_video) {
1305
+ innhtml += '<img class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[key]["image_url"]).text() + '" alt="' + jQuery('<div />').html(data[key]["alt"]).text() + '" />';
1306
+ }
1307
+ else {
1308
+ innhtml += '<span class="bwg_popup_video"><iframe class="bwg_video_frame" src="' + (data[key]['filetype'] == "YOUTUBE" ? "//www.youtube.com/embed/" + data[key]['filename'] + "?enablejsapi=1" : "//player.vimeo.com/video/" + data[key]['filename'] + "?api=1") + '" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe></span>';
1309
+ }
1310
+ innhtml += '</span></span>';
1311
+ jQuery(next_image_class).html(innhtml);
1312
+
1313
+ function bwg_afterload() {
1314
+ <?php
1315
+ if ($option_row->preload_images) {
1316
+ echo 'bwg_preload_images(key);';
1317
  }
1318
+ ?>
1319
+ bwg_<?php echo $image_effect; ?>(current_image_class, next_image_class, direction);
1320
+ jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1321
+ jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1322
+ jQuery("#bwg_download").attr("download", data[key]['image_url']);
1323
+ /* Load comments.*/
1324
+ if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1325
+ if (data[key]["comment_count"] == 0) {
1326
+ jQuery("#bwg_added_comments").hide();
1327
+ }
1328
+ else {
1329
+ jQuery("#bwg_added_comments").show();
1330
+ spider_set_input_value('ajax_task', 'display');
1331
+ spider_set_input_value('image_id', jQuery('#bwg_popup_image').attr('image_id'));
1332
+ spider_ajax_save('bwg_comment_form');
1333
+ }
1334
+ }
1335
+ /* Update custom scroll.*/
1336
+ if (typeof jQuery().mCustomScrollbar !== 'undefined' && jQuery.isFunction(jQuery().mCustomScrollbar)) {
1337
+ jQuery(".bwg_comments").mCustomScrollbar({
1338
+ advanced:{
1339
+ updateOnContentResize: true
1340
+ }
1341
+ });
1342
+ }
1343
+ jQuery(".mCSB_scrollTools").hide();
1344
+ <?php
1345
+ if ($enable_image_filmstrip) {
1346
+ ?>
1347
+ bwg_move_filmstrip();
1348
+ <?php
1349
  }
1350
+ ?>
1351
  }
1352
+ if (!is_video) {
1353
+ var cur_img = jQuery(next_image_class).find('img');
1354
+ cur_img.one('load', function() {
1355
+ bwg_afterload();
1356
+ }).each(function() {
1357
+ if(this.complete) jQuery(this).load();
1358
  });
1359
  }
1360
+ else {
1361
+ bwg_afterload();
 
 
 
 
1362
  }
1363
+ bwg_popup_resize();
1364
  }
1365
  }
1366
  jQuery(document).on('keydown', function (e) {
1386
  e.returnValue = false;
1387
  }
1388
  });
1389
+ function bwg_preload_images(key) {
1390
+ count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
1391
+ if (count != 0) {
1392
+ for (var i = key - count; i < key + count; i++) {
1393
+ jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !(data[i]['filetype'] == "YOUTUBE" || data[i]['filetype'] == "VIMEO")) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1394
+ }
1395
+ }
1396
+ else {
1397
+ for (var i = 0; i < data.length; i++) {
1398
+ jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !(data[i]['filetype'] == "YOUTUBE" || data[i]['filetype'] == "VIMEO")) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1399
+ }
1400
+ }
1401
+ }
1402
  function bwg_popup_resize() {
1403
  var comment_container_width = 0;
1404
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1618
  bwg_reset_zoom();
1619
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1620
  var bwg_click = isMobile ? 'touchend' : 'click';
1621
+ jQuery("#spider_popup_left").on(bwg_click, function () {
1622
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data);
1623
+ return false;
1624
+ });
1625
+ jQuery("#spider_popup_right").on(bwg_click, function () {
1626
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data);
1627
+ return false;
1628
+ });
1629
  if (navigator.appVersion.indexOf("MSIE 10") != -1 || navigator.appVersion.indexOf("MSIE 9") != -1) {
1630
  setTimeout(function () {
1631
  bwg_popup_resize();
2004
  <?php
2005
  }
2006
  ?>
2007
+ <?php
2008
+ if ($option_row->preload_images) {
2009
+ echo "bwg_preload_images(parseInt(jQuery('#bwg_current_image_key').val()));";
2010
+ }
2011
+ ?>
2012
  });
2013
  /* Open with fullscreen.*/
2014
  function bwg_open_with_fullscreen() {
2067
  if (!jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
2068
  bwg_play();
2069
  }
2070
+ /*var i = 0;
2071
  jQuery(".bwg_slider").children("span").each(function () {
2072
  if (jQuery(this).css('opacity') == 1) {
2073
  jQuery("#bwg_current_image_key").val(i);
2074
  }
2075
  i++;
2076
+ });*/
2077
  });
2078
  jQuery(window).blur(function() {
2079
  event_stack = [];
js/bwg.js CHANGED
@@ -855,15 +855,6 @@ function bwg_popup_fullscreen(num) {
855
  }
856
  }
857
 
858
- function bwg_show_search_box(num) {
859
- if (num) {
860
- jQuery("#tr_search_box_width").css('display', '');
861
- }
862
- else {
863
- jQuery("#tr_search_box_width").css('display', 'none');
864
- }
865
- }
866
-
867
  function bwg_change_album_view_type(type) {
868
  if (type == 'thumbnail') {
869
  jQuery("#album_thumb_dimensions").html('Album thumb dimensions: ');
855
  }
856
  }
857
 
 
 
 
 
 
 
 
 
 
858
  function bwg_change_album_view_type(type) {
859
  if (type == 'thumbnail') {
860
  jQuery("#album_thumb_dimensions").html('Album thumb dimensions: ');
languages/bwg-ca.po CHANGED
@@ -111,7 +111,7 @@ msgstr "No hi ha imatges en aquesta galeria."
111
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:616
112
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:595
113
  msgid "Back"
114
- msgstr "Esquena"
115
 
116
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:627
117
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:606
111
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:616
112
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:595
113
  msgid "Back"
114
+ msgstr "Tornar"
115
 
116
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:627
117
  #: C:\wamp\www\wordpressraf\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:606
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.1.18
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
@@ -555,6 +555,8 @@ function bwg_activate() {
555
  `popup_enable_tumblr` tinyint(1) NOT NULL,
556
  `show_search_box` tinyint(1) NOT NULL,
557
  `search_box_width` int(4) NOT NULL,
 
 
558
  `thumb_click_action` varchar(16) NOT NULL,
559
  `thumb_link_target` tinyint(1) NOT NULL,
560
  `comment_moderation` tinyint(1) NOT NULL,
@@ -1066,6 +1068,8 @@ function bwg_activate() {
1066
  'popup_enable_tumblr' => 0,
1067
  'show_search_box' => 0,
1068
  'search_box_width' => 180,
 
 
1069
  'popup_enable_info' => 1,
1070
  'popup_enable_rate' => 0,
1071
  'thumb_click_action' => 'open_lightbox',
@@ -1173,6 +1177,8 @@ function bwg_activate() {
1173
  '%d',
1174
  '%d',
1175
  '%d',
 
 
1176
  '%s',
1177
  '%d',
1178
  '%d',
@@ -2679,7 +2685,7 @@ function bwg_activate() {
2679
  ));
2680
  }
2681
  $version = get_option("wd_bwg_version");
2682
- $new_version = '1.1.18';
2683
  if ($version && version_compare($version, $new_version, '<')) {
2684
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2685
  bwg_update($version);
@@ -2694,7 +2700,7 @@ register_activation_hook(__FILE__, 'bwg_activate');
2694
 
2695
  function bwg_update_hook() {
2696
  $version = get_option("wd_bwg_version");
2697
- $new_version = '1.1.18';
2698
  if ($version && version_compare($version, $new_version, '<')) {
2699
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2700
  bwg_update($version);
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.1.19
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
555
  `popup_enable_tumblr` tinyint(1) NOT NULL,
556
  `show_search_box` tinyint(1) NOT NULL,
557
  `search_box_width` int(4) NOT NULL,
558
+ `preload_images` tinyint(1) NOT NULL,
559
+ `preload_images_count` int(4) NOT NULL,
560
  `thumb_click_action` varchar(16) NOT NULL,
561
  `thumb_link_target` tinyint(1) NOT NULL,
562
  `comment_moderation` tinyint(1) NOT NULL,
1068
  'popup_enable_tumblr' => 0,
1069
  'show_search_box' => 0,
1070
  'search_box_width' => 180,
1071
+ 'preload_images' => 0,
1072
+ 'preload_images_count' => 10,
1073
  'popup_enable_info' => 1,
1074
  'popup_enable_rate' => 0,
1075
  'thumb_click_action' => 'open_lightbox',
1177
  '%d',
1178
  '%d',
1179
  '%d',
1180
+ '%d',
1181
+ '%d',
1182
  '%s',
1183
  '%d',
1184
  '%d',
2685
  ));
2686
  }
2687
  $version = get_option("wd_bwg_version");
2688
+ $new_version = '1.1.19';
2689
  if ($version && version_compare($version, $new_version, '<')) {
2690
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2691
  bwg_update($version);
2700
 
2701
  function bwg_update_hook() {
2702
  $version = get_option("wd_bwg_version");
2703
+ $new_version = '1.1.19';
2704
  if ($version && version_compare($version, $new_version, '<')) {
2705
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2706
  bwg_update($version);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Photo Gallery ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
- Stable tag: 1.1.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -168,6 +168,11 @@ If any problem occurs, please contact us at [info@web-dorado.com](mailto:info@w
168
  6. Photo Gallery - Edit Watermark
169
 
170
  == Changelog ==
 
 
 
 
 
171
 
172
  = 1.1.15 =
173
  * added search images in gallery (optional), optional info, resize.
1
+ === Gallery Photo ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
+ Stable tag: 1.1.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
168
  6. Photo Gallery - Edit Watermark
169
 
170
  == Changelog ==
171
+ = 1.1.19 =
172
+ * preload images count options
173
+
174
+ = 1.1.18 =
175
+ * redirect url optional
176
 
177
  = 1.1.15 =
178
  * added search images in gallery (optional), optional info, resize.
update/bwg_update.php CHANGED
@@ -117,6 +117,12 @@ function bwg_update($version) {
117
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `lightbox_hit_font_weight` varchar(8) NOT NULL DEFAULT 'normal'");
118
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `lightbox_hit_font_size` int(4) NOT NULL DEFAULT 14");
119
  }
 
 
 
 
 
 
120
  return;
121
  }
122
 
117
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `lightbox_hit_font_weight` varchar(8) NOT NULL DEFAULT 'normal'");
118
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `lightbox_hit_font_size` int(4) NOT NULL DEFAULT 14");
119
  }
120
+ if (version_compare($version, '1.1.19') == -1) {
121
+ // Add preload option.
122
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `preload_images` tinyint(1) NOT NULL DEFAULT 1");
123
+ // Add search box width option.
124
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `preload_images_count` int(4) NOT NULL DEFAULT 10");
125
+ }
126
  return;
127
  }
128