Photo Gallery by WD – Responsive Photo Gallery - Version 1.1.13

Version Description

Download this release

Release Info

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

Code changes from version 1.1.12 to 1.1.13

admin/models/BWGModelTags_bwg.php CHANGED
@@ -29,7 +29,7 @@ class BWGModelTags_bwg {
29
  else {
30
  $limit = 0;
31
  }
32
- $query ="SELECT * FROM ".$wpdb->prefix."terms as A LEFT JOIN ".$wpdb->prefix ."term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy ='bwg_tag' " . $where . $order_by ;
33
  $rows = $wpdb->get_results($query);
34
  return $rows;
35
  }
29
  else {
30
  $limit = 0;
31
  }
32
+ $query ="SELECT * FROM ".$wpdb->prefix."terms as A LEFT JOIN ".$wpdb->prefix ."term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy ='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . ",20";
33
  $rows = $wpdb->get_results($query);
34
  return $rows;
35
  }
admin/views/BWGViewAddTags.php CHANGED
@@ -28,7 +28,7 @@ class BWGViewAddTags {
28
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
29
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
30
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
31
- $image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : '0');
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
  wp_print_scripts('jquery');
34
  ?>
@@ -50,9 +50,9 @@ class BWGViewAddTags {
50
  <table class="wp-list-table widefat fixed pages">
51
  <thead>
52
  <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
53
- <th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
54
- <a onclick="spider_set_input_value('order_by', 'id');
55
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
56
  spider_form_submit(event, 'tags_form')" href="">
57
  <span>ID</span><span class="sorting-indicator"></span></th>
58
  </a>
@@ -91,6 +91,7 @@ class BWGViewAddTags {
91
  </table>
92
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
93
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
 
94
  </form>
95
  <script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
96
  <?php
28
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
29
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
30
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
31
+ $image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
  wp_print_scripts('jquery');
34
  ?>
50
  <table class="wp-list-table widefat fixed pages">
51
  <thead>
52
  <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
53
+ <th class="table_small_col <?php if ($order_by == 'term_id') {echo $order_class;} ?>">
54
+ <a onclick="spider_set_input_value('order_by', 'term_id');
55
+ spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'term_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
56
  spider_form_submit(event, 'tags_form')" href="">
57
  <span>ID</span><span class="sorting-indicator"></span></th>
58
  </a>
91
  </table>
92
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
93
  <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
94
+ <input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
95
  </form>
96
  <script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
97
  <?php
admin/views/BWGViewEditThumb.php CHANGED
@@ -194,7 +194,9 @@ class BWGViewEditThumb {
194
  .thumb_preview_td {
195
  background-color: #F5F5F5;
196
  border-radius: 3px;
197
- border: 1px solid #CCCCCC;
 
 
198
  }
199
  .thumb_message {
200
  -moz-box-sizing: border-box;
@@ -232,6 +234,12 @@ class BWGViewEditThumb {
232
  <img title="Crop" class="spider_crop" onclick="spider_crop('crop', 'crop_image')" src="<?php echo WD_BWG_URL . '/images/crop.png'; ?>"/>
233
  </div>
234
  <table style="height: inherit; top: 45px; position: absolute ;width: inherit; margin: 0 auto;">
 
 
 
 
 
 
235
  <tr>
236
  <td class="thumb_preview_td" style="vertical-align: middle; width: <?php echo ($popup_width - $thumb_width) - 40; ?>px;">
237
  <img id="image_view" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_data->image_url; ?>?date=<?php echo date('Y-m-y H:i:s'); ?>" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;" />
@@ -251,6 +259,18 @@ class BWGViewEditThumb {
251
  <input id="h" type="hidden" name="h" value="" />
252
  </form>
253
  <script language="javascript">
 
 
 
 
 
 
 
 
 
 
 
 
254
  function spider_crop(type, form_id) {
255
  document.getElementById("edit_type").value = type;
256
  document.getElementById(form_id).submit();
@@ -259,9 +279,12 @@ class BWGViewEditThumb {
259
  window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
260
  // jQuery('#image_view').Jcrop();
261
  jQuery(window).load(function() {
 
 
 
262
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
263
- var thumb_width = parseInt('<?php echo $options->upload_thumb_width; ?>');
264
- var thumb_height = parseInt('<?php echo $options->upload_thumb_height; ?>');
265
  if (<?php echo $w; ?> == 0) {
266
  jQuery('#image_view').Jcrop({
267
  onChange: spider_update_thumb,
@@ -281,7 +304,7 @@ class BWGViewEditThumb {
281
  aspectRatio: thumb_width / thumb_height
282
  });
283
  }
284
- })
285
  function spider_update_coords(c) {
286
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
287
  jQuery('#x').val(c.x * ratio);
194
  .thumb_preview_td {
195
  background-color: #F5F5F5;
196
  border-radius: 3px;
197
+ border: 1px solid #CCCCCC;
198
+ font-family: sans-serif;
199
+ font-size: 12px;
200
  }
201
  .thumb_message {
202
  -moz-box-sizing: border-box;
234
  <img title="Crop" class="spider_crop" onclick="spider_crop('crop', 'crop_image')" src="<?php echo WD_BWG_URL . '/images/crop.png'; ?>"/>
235
  </div>
236
  <table style="height: inherit; top: 45px; position: absolute ;width: inherit; margin: 0 auto;">
237
+ <tr>
238
+ <td class="thumb_preview_td" colspan="2">
239
+ <input type="checkbox" id="chb" onclick="spider_crop_ratio()" checked="checked">
240
+ <label for="chb">Keep aspect ratio</label>
241
+ </td>
242
+ </tr>
243
  <tr>
244
  <td class="thumb_preview_td" style="vertical-align: middle; width: <?php echo ($popup_width - $thumb_width) - 40; ?>px;">
245
  <img id="image_view" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_data->image_url; ?>?date=<?php echo date('Y-m-y H:i:s'); ?>" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;" />
259
  <input id="h" type="hidden" name="h" value="" />
260
  </form>
261
  <script language="javascript">
262
+ function spider_crop_ratio() {
263
+ if (document.getElementById("chb").checked == false) {
264
+ spider_crop_fix("", "");
265
+ }
266
+ else {
267
+ spider_crop_fix("<?php echo $options->upload_thumb_width; ?>", "<?php echo $options->upload_thumb_height; ?>");
268
+ }
269
+ jQuery('#crop_button').show();
270
+ jQuery('#thumb_message').hide();
271
+ jQuery('#croped_message').hide();
272
+ jQuery('#thumb_image_preview').show();
273
+ }
274
  function spider_crop(type, form_id) {
275
  document.getElementById("edit_type").value = type;
276
  document.getElementById(form_id).submit();
279
  window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
280
  // jQuery('#image_view').Jcrop();
281
  jQuery(window).load(function() {
282
+ spider_crop_fix("<?php echo $options->upload_thumb_width; ?>", "<?php echo $options->upload_thumb_height; ?>");
283
+ });
284
+ function spider_crop_fix(wi, he) {
285
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
286
+ var thumb_width = parseInt(wi);
287
+ var thumb_height = parseInt(he);
288
  if (<?php echo $w; ?> == 0) {
289
  jQuery('#image_view').Jcrop({
290
  onChange: spider_update_thumb,
304
  aspectRatio: thumb_width / thumb_height
305
  });
306
  }
307
+ }
308
  function spider_update_coords(c) {
309
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
310
  jQuery('#x').val(c.x * ratio);
frontend/models/BWGModelAlbum_compact_preview.php CHANGED
@@ -126,7 +126,7 @@ class BWGModelAlbum_compact_preview {
126
  $bwg_post_id = get_page_by_title($title, OBJECT, $post_type);
127
  $options_row = $this->get_options_row_data();
128
  $theme_row = $this->get_theme_row_data(0);
129
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type . '" gallery_type="album_compact_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" compuct_album_column_number="' . $options_row->album_column_number . '" compuct_albums_per_page="' . $options_row->albums_per_page . '" compuct_album_title="' . $options_row->album_title_show_hover . '" compuct_album_thumb_width="' . $options_row->album_thumb_width . '" compuct_album_thumb_height="' . $options_row->album_thumb_height . '" compuct_album_image_column_number="' . $options_row->image_column_number . '" compuct_album_images_per_page="' . $options_row->images_per_page . '" compuct_album_image_title="' . $options_row->image_title_show_hover . '" compuct_album_image_thumb_width="' . $options_row->thumb_width . '" compuct_album_image_thumb_height="' . $options_row->thumb_height . '" compuct_album_enable_page="' . $options_row->album_enable_page . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '"]';
130
  if (!$bwg_post_id) {
131
  $post = array(
132
  'post_content' => $shortecode_string,
126
  $bwg_post_id = get_page_by_title($title, OBJECT, $post_type);
127
  $options_row = $this->get_options_row_data();
128
  $theme_row = $this->get_theme_row_data(0);
129
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type . '" gallery_type="album_compact_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" order_by="asc" compuct_album_column_number="' . $options_row->album_column_number . '" compuct_albums_per_page="' . $options_row->albums_per_page . '" compuct_album_title="' . $options_row->album_title_show_hover . '" compuct_album_view_type="' . $options_row->album_view_type . '" compuct_album_thumb_width="' . $options_row->album_thumb_width . '" compuct_album_thumb_height="' . $options_row->album_thumb_height . '" compuct_album_image_column_number="' . $options_row->image_column_number . '" compuct_album_images_per_page="' . $options_row->images_per_page . '" compuct_album_image_title="' . $options_row->image_title_show_hover . '" compuct_album_image_thumb_width="' . $options_row->thumb_width . '" compuct_album_image_thumb_height="' . $options_row->thumb_height . '" compuct_album_enable_page="' . $options_row->album_enable_page . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '"]';
130
  if (!$bwg_post_id) {
131
  $post = array(
132
  'post_content' => $shortecode_string,
frontend/models/BWGModelGalleryBox.php CHANGED
@@ -53,9 +53,15 @@ class BWGModelGalleryBox {
53
  return $row;
54
  }
55
 
56
- public function get_image_rows_data_tag($tag_id, $sort_by) {
57
  global $wpdb;
58
- $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY `' . $sort_by . '` ASC', $tag_id));
 
 
 
 
 
 
59
  return $row;
60
  }
61
 
53
  return $row;
54
  }
55
 
56
+ public function get_image_rows_data_tag($tag_id, $sort_by, $order_by = 'asc') {
57
  global $wpdb;
58
+ if ($sort_by == 'size' || $sort_by == 'resolution') {
59
+ $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
60
+ }
61
+ elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
62
+ $sort_by = '`order`';
63
+ }
64
+ $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $tag_id));
65
  return $row;
66
  }
67
 
frontend/models/BWGModelWidget.php CHANGED
@@ -48,7 +48,7 @@ class BWGModelWidgetFrontEnd {
48
  $bwg_post_id = get_page_by_title($title, OBJECT, 'bwg_tag');
49
  $options_row = $this->get_options_row_data();
50
  $theme_row = $this->get_theme_row_data(0);
51
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="' . $id . '" sort_by="date" image_column_number="' . $options_row->image_column_number . '" images_per_page="' . $options_row->images_per_page . '" image_title="' . $options_row->image_title_show_hover . '" image_enable_page="' . $options_row->image_enable_page . '" thumb_width="' . $options_row->thumb_width . '" thumb_height="' . $options_row->thumb_height . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '"]';
52
  if (!$bwg_post_id) {
53
  $post = array(
54
  'post_content' => $shortecode_string,
48
  $bwg_post_id = get_page_by_title($title, OBJECT, 'bwg_tag');
49
  $options_row = $this->get_options_row_data();
50
  $theme_row = $this->get_theme_row_data(0);
51
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="' . $id . '" sort_by="date" order_by="asc" image_column_number="' . $options_row->image_column_number . '" images_per_page="' . $options_row->images_per_page . '" image_title="' . $options_row->image_title_show_hover . '" image_enable_page="' . $options_row->image_enable_page . '" thumb_width="' . $options_row->thumb_width . '" thumb_height="' . $options_row->thumb_height . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '"]';
52
  if (!$bwg_post_id) {
53
  $post = array(
54
  'post_content' => $shortecode_string,
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -72,7 +72,6 @@ class BWGViewAlbum_compact_preview {
72
  $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
73
  if (!$image_rows) {
74
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
75
- return;
76
  }
77
  $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
78
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
72
  $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
73
  if (!$image_rows) {
74
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
 
75
  }
76
  $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
77
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -54,7 +54,6 @@ class BWGViewAlbum_extended_preview {
54
  $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
55
  if (!$image_rows) {
56
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
57
- return;
58
  }
59
  $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
60
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
54
  $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
55
  if (!$image_rows) {
56
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
 
57
  }
58
  $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
59
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -77,7 +77,7 @@ class BWGViewGalleryBox {
77
  $image_right_click = $option_row->image_right_click;
78
 
79
  if ($tag_id != 0) {
80
- $image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by);
81
  }
82
  else {
83
  $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
@@ -1194,11 +1194,13 @@ class BWGViewGalleryBox {
1194
  }
1195
  }
1196
  /* Update custom scroll.*/
1197
- jQuery(".bwg_comments").mCustomScrollbar({
1198
- advanced:{
1199
- updateOnContentResize: true
1200
- }
1201
- });
 
 
1202
  jQuery(".mCSB_scrollTools").hide();
1203
  <?php
1204
  if ($enable_image_filmstrip) {
@@ -1471,7 +1473,9 @@ class BWGViewGalleryBox {
1471
  });
1472
  }
1473
  /* Change default scrollbar in comments.*/
1474
- jQuery(".bwg_comments").mCustomScrollbar({scrollInertia: 150});
 
 
1475
  var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" /*FF doesn't recognize mousewheel as of FF3.x*/
1476
  jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
1477
  var evt = window.event || e; /* Equalize event object.*/
77
  $image_right_click = $option_row->image_right_click;
78
 
79
  if ($tag_id != 0) {
80
+ $image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by, $order_by);
81
  }
82
  else {
83
  $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
1194
  }
1195
  }
1196
  /* Update custom scroll.*/
1197
+ if (typeof jQuery().mCustomScrollbar !== 'undefined' && jQuery.isFunction(jQuery().mCustomScrollbar)) {
1198
+ jQuery(".bwg_comments").mCustomScrollbar({
1199
+ advanced:{
1200
+ updateOnContentResize: true
1201
+ }
1202
+ });
1203
+ }
1204
  jQuery(".mCSB_scrollTools").hide();
1205
  <?php
1206
  if ($enable_image_filmstrip) {
1473
  });
1474
  }
1475
  /* Change default scrollbar in comments.*/
1476
+ if (typeof jQuery().mCustomScrollbar !== 'undefined' && jQuery.isFunction(jQuery().mCustomScrollbar)) {
1477
+ jQuery(".bwg_comments").mCustomScrollbar({scrollInertia: 150});
1478
+ }
1479
  var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" /*FF doesn't recognize mousewheel as of FF3.x*/
1480
  jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
1481
  var evt = window.event || e; /* Equalize event object.*/
frontend/views/BWGViewThumbnails.php CHANGED
@@ -312,7 +312,7 @@ class BWGViewThumbnails {
312
  'image_width' => $params['popup_width'],
313
  'image_height' => $params['popup_height'],
314
  'image_effect' => $params['popup_effect'],
315
- 'sort_by' => (isset($params['type']) ? 'order' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
316
  'order_by' => $sort_direction,
317
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
318
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
312
  'image_width' => $params['popup_width'],
313
  'image_height' => $params['popup_height'],
314
  'image_effect' => $params['popup_effect'],
315
+ 'sort_by' => (isset($params['type']) ? 'date' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
316
  'order_by' => $sort_direction,
317
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
318
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
js/bwg_gallery_box.js CHANGED
@@ -64,6 +64,7 @@ function spider_destroypopup(duration) {
64
  if (isMobile && viewportmeta) {
65
  viewportmeta.content = 'width=device-width, initial-scale=1';
66
  }
 
67
  }
68
 
69
  // Submit popup.
64
  if (isMobile && viewportmeta) {
65
  viewportmeta.content = 'width=device-width, initial-scale=1';
66
  }
67
+ window.location.hash = "";
68
  }
69
 
70
  // Submit popup.
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.12
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
@@ -2403,7 +2403,7 @@ function bwg_activate() {
2403
  ));
2404
  }
2405
  $version = get_option("wd_bwg_version");
2406
- $new_version = '1.1.12';
2407
  if ($version && version_compare($version, $new_version, '<')) {
2408
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2409
  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.13
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
2403
  ));
2404
  }
2405
  $version = get_option("wd_bwg_version");
2406
+ $new_version = '1.1.13';
2407
  if ($version && version_compare($version, $new_version, '<')) {
2408
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2409
  bwg_update($version);
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10