Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.1.10 |
Comparing to | |
See all releases |
Code changes from version 1.1.9 to 1.1.10
- admin/controllers/BWGControllerAlbums_bwg.php +2 -2
- admin/controllers/BWGControllerGalleries_bwg.php +3 -3
- admin/controllers/BWGControllerOptions_bwg.php +4 -0
- admin/controllers/BWGControllerThemes_bwg.php +8 -8
- admin/models/BWGModelAddAlbumsGalleries.php +4 -4
- admin/models/BWGModelOptions_bwg.php +2 -0
- admin/views/BWGViewAddAlbumsGalleries.php +1 -1
- admin/views/BWGViewBWGShortcode.php +23 -3
- admin/views/BWGViewOptions_bwg.php +25 -4
- admin/views/BWGViewUninstall_bwg.php +6 -0
- frontend/models/BWGModelAlbum_compact_preview.php +6 -2
- frontend/models/BWGModelImage_browser.php +6 -0
- frontend/views/BWGViewAlbum_compact_preview.php +23 -1
- frontend/views/BWGViewAlbum_extended_preview.php +22 -1
- frontend/views/BWGViewGalleryBox.php +86 -24
- frontend/views/BWGViewImage_browser.php +18 -5
- frontend/views/BWGViewSlideshow.php +17 -15
- frontend/views/BWGViewThumbnails.php +9 -1
- js/bwg.js +9 -0
- js/bwg_frontend.js +3 -0
- js/bwg_shortcode.js +10 -0
- photo-gallery.php +55 -51
- readme.txt +4 -2
- update/bwg_update.php +21 -13
admin/controllers/BWGControllerAlbums_bwg.php
CHANGED
@@ -210,7 +210,7 @@ class BWGControllerAlbums_bwg {
|
|
210 |
public function delete($id) {
|
211 |
global $wpdb;
|
212 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id);
|
213 |
-
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE
|
214 |
if ($wpdb->query($query)) {
|
215 |
$wpdb->query($query_gal);
|
216 |
echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
|
@@ -229,7 +229,7 @@ class BWGControllerAlbums_bwg {
|
|
229 |
if (isset($_POST['check_' . $album_id]) || isset($_POST['check_all_items'])) {
|
230 |
$flag = TRUE;
|
231 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $album_id);
|
232 |
-
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE
|
233 |
$wpdb->query($query);
|
234 |
$wpdb->query($query_gal);
|
235 |
}
|
210 |
public function delete($id) {
|
211 |
global $wpdb;
|
212 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id);
|
213 |
+
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
|
214 |
if ($wpdb->query($query)) {
|
215 |
$wpdb->query($query_gal);
|
216 |
echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
|
229 |
if (isset($_POST['check_' . $album_id]) || isset($_POST['check_all_items'])) {
|
230 |
$flag = TRUE;
|
231 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $album_id);
|
232 |
+
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $album_id, $album_id);
|
233 |
$wpdb->query($query);
|
234 |
$wpdb->query($query_gal);
|
235 |
}
|
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -307,7 +307,7 @@ class BWGControllerGalleries_bwg {
|
|
307 |
);
|
308 |
}
|
309 |
|
310 |
-
function set_text_watermark
|
311 |
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
312 |
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
313 |
|
@@ -370,7 +370,7 @@ class BWGControllerGalleries_bwg {
|
|
370 |
ini_restore('memory_limit');
|
371 |
}
|
372 |
|
373 |
-
function set_image_watermark
|
374 |
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
375 |
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
376 |
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
@@ -622,7 +622,7 @@ class BWGControllerGalleries_bwg {
|
|
622 |
if ($preview_image == '') {
|
623 |
if ($id != 0) {
|
624 |
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
|
625 |
-
if ($random_preview_image == '') {
|
626 |
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
|
627 |
}
|
628 |
}
|
307 |
);
|
308 |
}
|
309 |
|
310 |
+
function set_text_watermark($original_filename, $dest_filename, $watermark_text, $watermark_font, $watermark_font_size, $watermark_color, $watermark_transparency, $watermark_position) {
|
311 |
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
312 |
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
313 |
|
370 |
ini_restore('memory_limit');
|
371 |
}
|
372 |
|
373 |
+
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
374 |
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
375 |
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
376 |
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
622 |
if ($preview_image == '') {
|
623 |
if ($id != 0) {
|
624 |
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
|
625 |
+
if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
|
626 |
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
|
627 |
}
|
628 |
}
|
admin/controllers/BWGControllerOptions_bwg.php
CHANGED
@@ -159,6 +159,8 @@ class BWGControllerOptions_bwg {
|
|
159 |
$built_in_watermark_font = (isset($_POST['built_in_watermark_font']) ? esc_html(stripslashes($_POST['built_in_watermark_font'])) : '');
|
160 |
$built_in_watermark_color = (isset($_POST['built_in_watermark_color']) ? esc_html(stripslashes($_POST['built_in_watermark_color'])) : '');
|
161 |
$gallery_role = (isset($_POST['gallery_role']) ? esc_html(stripslashes($_POST['gallery_role'])) : 0);
|
|
|
|
|
162 |
$album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
|
163 |
$image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
|
164 |
|
@@ -240,6 +242,8 @@ class BWGControllerOptions_bwg {
|
|
240 |
'built_in_watermark_color' => $built_in_watermark_color,
|
241 |
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
242 |
'gallery_role' => $gallery_role,
|
|
|
|
|
243 |
'album_role' => $album_role,
|
244 |
'image_role' => $image_role
|
245 |
), array('id' => 1));
|
159 |
$built_in_watermark_font = (isset($_POST['built_in_watermark_font']) ? esc_html(stripslashes($_POST['built_in_watermark_font'])) : '');
|
160 |
$built_in_watermark_color = (isset($_POST['built_in_watermark_color']) ? esc_html(stripslashes($_POST['built_in_watermark_color'])) : '');
|
161 |
$gallery_role = (isset($_POST['gallery_role']) ? esc_html(stripslashes($_POST['gallery_role'])) : 0);
|
162 |
+
$image_right_click = (isset($_POST['image_right_click']) ? esc_html(stripslashes($_POST['image_right_click'])) : 0);
|
163 |
+
$popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
|
164 |
$album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
|
165 |
$image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
|
166 |
|
242 |
'built_in_watermark_color' => $built_in_watermark_color,
|
243 |
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
244 |
'gallery_role' => $gallery_role,
|
245 |
+
'image_right_click' => $image_right_click,
|
246 |
+
'popup_fullscreen' => $popup_fullscreen,
|
247 |
'album_role' => $album_role,
|
248 |
'image_role' => $image_role
|
249 |
), array('id' => 1));
|
admin/controllers/BWGControllerThemes_bwg.php
CHANGED
@@ -1079,12 +1079,12 @@ class BWGControllerThemes_bwg {
|
|
1079 |
'%s',
|
1080 |
'%s',
|
1081 |
'%d',
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
|
1089 |
'%s',
|
1090 |
'%s',
|
@@ -1097,7 +1097,7 @@ class BWGControllerThemes_bwg {
|
|
1097 |
'%s',
|
1098 |
'%s',
|
1099 |
'%s',
|
1100 |
-
|
1101 |
'%s',
|
1102 |
'%s',
|
1103 |
'%d',
|
@@ -1125,7 +1125,7 @@ class BWGControllerThemes_bwg {
|
|
1125 |
'%s',
|
1126 |
'%d',
|
1127 |
'%d',
|
1128 |
-
|
1129 |
'%s',
|
1130 |
'%s',
|
1131 |
'%s',
|
1079 |
'%s',
|
1080 |
'%s',
|
1081 |
'%d',
|
1082 |
+
'%s',
|
1083 |
+
'%s',
|
1084 |
+
'%s',
|
1085 |
+
'%s',
|
1086 |
+
'%d',
|
1087 |
+
'%s',
|
1088 |
|
1089 |
'%s',
|
1090 |
'%s',
|
1097 |
'%s',
|
1098 |
'%s',
|
1099 |
'%s',
|
1100 |
+
'%s',
|
1101 |
'%s',
|
1102 |
'%s',
|
1103 |
'%d',
|
1125 |
'%s',
|
1126 |
'%d',
|
1127 |
'%d',
|
1128 |
+
'%d',
|
1129 |
'%s',
|
1130 |
'%s',
|
1131 |
'%s',
|
admin/models/BWGModelAddAlbumsGalleries.php
CHANGED
@@ -30,16 +30,16 @@ class BWGModelAddAlbumsGalleries {
|
|
30 |
else {
|
31 |
$limit = 0;
|
32 |
}
|
33 |
-
$query = "SELECT id, name, 1 as is_album FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION SELECT id, name, 0 as is_album FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1" . $where . $order_by . " LIMIT " . $limit . ",20";
|
34 |
$rows = $wpdb->get_results($query);
|
35 |
return $rows;
|
36 |
}
|
37 |
|
38 |
-
public function page_nav() {
|
39 |
global $wpdb;
|
40 |
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
41 |
-
$query = "SELECT id
|
42 |
-
$total = $wpdb->
|
43 |
$page_nav['total'] = $total;
|
44 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
45 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
30 |
else {
|
31 |
$limit = 0;
|
32 |
}
|
33 |
+
$query = "SELECT id, name, 1 as is_album FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION SELECT id, name, 0 as is_album FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where . $order_by . " LIMIT " . $limit . ",20";
|
34 |
$rows = $wpdb->get_results($query);
|
35 |
return $rows;
|
36 |
}
|
37 |
|
38 |
+
public function page_nav($album_id) {
|
39 |
global $wpdb;
|
40 |
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
41 |
+
$query = "SELECT id FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION SELECT id FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where;
|
42 |
+
$total = count($wpdb->get_col($query));
|
43 |
$page_nav['total'] = $total;
|
44 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
45 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
admin/models/BWGModelOptions_bwg.php
CHANGED
@@ -112,6 +112,8 @@ class BWGModelOptions_bwg {
|
|
112 |
$row->built_in_watermark_color = 'FFFFFF';
|
113 |
$row->built_in_watermark_opacity = 30;
|
114 |
|
|
|
|
|
115 |
$row->gallery_role = 0;
|
116 |
$row->album_role = 0;
|
117 |
$row->image_role = 0;
|
112 |
$row->built_in_watermark_color = 'FFFFFF';
|
113 |
$row->built_in_watermark_opacity = 30;
|
114 |
|
115 |
+
$row->image_right_click = 0;
|
116 |
+
$row->popup_fullscreen = 0;
|
117 |
$row->gallery_role = 0;
|
118 |
$row->album_role = 0;
|
119 |
$row->image_role = 0;
|
admin/views/BWGViewAddAlbumsGalleries.php
CHANGED
@@ -25,7 +25,7 @@ class BWGViewAddAlbumsGalleries {
|
|
25 |
public function display() {
|
26 |
$album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
|
27 |
$rows_data = $this->model->get_rows_data($album_id);
|
28 |
-
$page_nav = $this->model->page_nav();
|
29 |
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
31 |
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
25 |
public function display() {
|
26 |
$album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
|
27 |
$rows_data = $this->model->get_rows_data($album_id);
|
28 |
+
$page_nav = $this->model->page_nav($album_id);
|
29 |
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
31 |
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -172,7 +172,7 @@ class BWGViewBWGShortcode {
|
|
172 |
</td>
|
173 |
</tr>
|
174 |
<tr id="tr_album">
|
175 |
-
<td class="spider_label"><label for="album">Album: </label></td>
|
176 |
<td>
|
177 |
<select name="album" id="album" style="width:150px;">
|
178 |
<option value="0" selected="selected">Select Album</option>
|
@@ -550,6 +550,15 @@ class BWGViewBWGShortcode {
|
|
550 |
|
551 |
<!--Lightbox view-->
|
552 |
<tbody id="tbody_popup">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
<tr id="tr_popup_width_height">
|
554 |
<td title="Maximum values for lightbox width and height." class="spider_label"><label for="popup_width">Lightbox dimensions: </label></td>
|
555 |
<td>
|
@@ -737,7 +746,6 @@ class BWGViewBWGShortcode {
|
|
737 |
?>
|
738 |
</div>
|
739 |
</div>
|
740 |
-
|
741 |
<div class="mceActionPanel">
|
742 |
<div style="float:left;">
|
743 |
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="line-height: 25px; padding: 0 5px; text-decoration: none; vertical-align: middle; width: inherit; float: left;" href="http://wpdemo.web-dorado.com/thumbnails-view-2/">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
|
@@ -763,7 +771,10 @@ class BWGViewBWGShortcode {
|
|
763 |
<?php
|
764 |
}
|
765 |
?>
|
766 |
-
<script>
|
|
|
|
|
|
|
767 |
<script type="text/javascript">
|
768 |
bwg_update_shortcode();
|
769 |
<?php if (!$from_menu) { ?>
|
@@ -938,6 +949,14 @@ class BWGViewBWGShortcode {
|
|
938 |
jQuery("#popup_height").val(short_code['popup_height']);
|
939 |
jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
|
940 |
jQuery("#popup_interval").val(short_code['popup_interval']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
941 |
if (short_code['popup_enable_filmstrip'] == 1) {
|
942 |
jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
|
943 |
jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
|
@@ -1126,6 +1145,7 @@ class BWGViewBWGShortcode {
|
|
1126 |
}
|
1127 |
// Lightbox paramteres.
|
1128 |
if (gallery_type != 'slideshow') {
|
|
|
1129 |
tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
|
1130 |
tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
|
1131 |
tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
|
172 |
</td>
|
173 |
</tr>
|
174 |
<tr id="tr_album">
|
175 |
+
<td title="The selected album expanded content will be displayed." class="spider_label"><label for="album">Album: </label></td>
|
176 |
<td>
|
177 |
<select name="album" id="album" style="width:150px;">
|
178 |
<option value="0" selected="selected">Select Album</option>
|
550 |
|
551 |
<!--Lightbox view-->
|
552 |
<tbody id="tbody_popup">
|
553 |
+
<tr id="tr_popup_fullscreen">
|
554 |
+
<td title="Enable full width feature for the lightbox." class="spider_label">
|
555 |
+
<label>Full width lightbox:</label>
|
556 |
+
</td>
|
557 |
+
<td>
|
558 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1">Yes</label>
|
559 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0">No</label>
|
560 |
+
</td>
|
561 |
+
</tr>
|
562 |
<tr id="tr_popup_width_height">
|
563 |
<td title="Maximum values for lightbox width and height." class="spider_label"><label for="popup_width">Lightbox dimensions: </label></td>
|
564 |
<td>
|
746 |
?>
|
747 |
</div>
|
748 |
</div>
|
|
|
749 |
<div class="mceActionPanel">
|
750 |
<div style="float:left;">
|
751 |
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="line-height: 25px; padding: 0 5px; text-decoration: none; vertical-align: middle; width: inherit; float: left;" href="http://wpdemo.web-dorado.com/thumbnails-view-2/">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
|
771 |
<?php
|
772 |
}
|
773 |
?>
|
774 |
+
<script>
|
775 |
+
window.onload = bwg_shortcode_load;
|
776 |
+
window.onload = bwg_popup_fullscreen;
|
777 |
+
</script>
|
778 |
<script type="text/javascript">
|
779 |
bwg_update_shortcode();
|
780 |
<?php if (!$from_menu) { ?>
|
949 |
jQuery("#popup_height").val(short_code['popup_height']);
|
950 |
jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
|
951 |
jQuery("#popup_interval").val(short_code['popup_interval']);
|
952 |
+
if (short_code['popup_fullscreen'] == 1) {
|
953 |
+
jQuery("#popup_fullscreen_1").attr('checked', 'checked');
|
954 |
+
jQuery("#tr_popup_width_height").css('display', 'none');
|
955 |
+
}
|
956 |
+
else {
|
957 |
+
jQuery("#popup_fullscreen_0").attr('checked', 'checked');
|
958 |
+
jQuery("#tr_popup_width_height").css('display', '');
|
959 |
+
}
|
960 |
if (short_code['popup_enable_filmstrip'] == 1) {
|
961 |
jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
|
962 |
jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
|
1145 |
}
|
1146 |
// Lightbox paramteres.
|
1147 |
if (gallery_type != 'slideshow') {
|
1148 |
+
tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
|
1149 |
tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
|
1150 |
tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
|
1151 |
tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
|
admin/views/BWGViewOptions_bwg.php
CHANGED
@@ -126,6 +126,16 @@ class BWGViewOptions_bwg {
|
|
126 |
<div class="spider_description">Input an existing directory inside the Wordpress directory to store uploaded images.<br />Old directory content will be moved to the new one.</div>
|
127 |
</td>
|
128 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
<tr>
|
130 |
<td class="spider_label_options">
|
131 |
<label>Gallery role:</label>
|
@@ -301,7 +311,7 @@ class BWGViewOptions_bwg {
|
|
301 |
</table>
|
302 |
</td>
|
303 |
<td style="width: 50%; vertical-align: top;height: 100%; display: table-cell;">
|
304 |
-
<span id="preview_built_in_watermark" style="display:table-cell; background-image:url(<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>);background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
|
305 |
</span>
|
306 |
</td>
|
307 |
</tr>
|
@@ -447,7 +457,7 @@ class BWGViewOptions_bwg {
|
|
447 |
</table>
|
448 |
</td>
|
449 |
<td style="width: 50%; vertical-align: top;height: 100%; display: table-cell;">
|
450 |
-
<span id="preview_watermark" style="display:table-cell; background-image:url(<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>);background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
|
451 |
</span>
|
452 |
</td>
|
453 |
</tr>
|
@@ -457,8 +467,18 @@ class BWGViewOptions_bwg {
|
|
457 |
<!--Lightbox-->
|
458 |
<div class="spider_div_options" id="div_content_3">
|
459 |
<table>
|
460 |
-
<tbody>
|
461 |
-
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
<td class="spider_label_options">
|
463 |
<label for="popup_width">Lightbox dimensions:</label>
|
464 |
</td>
|
@@ -1066,6 +1086,7 @@ class BWGViewOptions_bwg {
|
|
1066 |
window.onload = bwg_inputs();
|
1067 |
window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
|
1068 |
window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
|
|
|
1069 |
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'" ?>);
|
1070 |
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'" ?>);
|
1071 |
window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0'" ?>);
|
126 |
<div class="spider_description">Input an existing directory inside the Wordpress directory to store uploaded images.<br />Old directory content will be moved to the new one.</div>
|
127 |
</td>
|
128 |
</tr>
|
129 |
+
<tr>
|
130 |
+
<td class="spider_label_options">
|
131 |
+
<label>Right click protection:</label>
|
132 |
+
</td>
|
133 |
+
<td>
|
134 |
+
<input type="radio" name="image_right_click" id="image_right_click_1" value="1" <?php if ($row->image_right_click) echo 'checked="checked"'; ?> /><label for="image_right_click_1">Yes</label>
|
135 |
+
<input type="radio" name="image_right_click" id="image_right_click_0" value="0" <?php if (!$row->image_right_click) echo 'checked="checked"'; ?> /><label for="image_right_click_0">No</label>
|
136 |
+
<div class="spider_description">Disable image right click possibility.</div>
|
137 |
+
</td>
|
138 |
+
</tr>
|
139 |
<tr>
|
140 |
<td class="spider_label_options">
|
141 |
<label>Gallery role:</label>
|
311 |
</table>
|
312 |
</td>
|
313 |
<td style="width: 50%; vertical-align: top;height: 100%; display: table-cell;">
|
314 |
+
<span id="preview_built_in_watermark" style="display:table-cell; background-image:url('<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>');background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
|
315 |
</span>
|
316 |
</td>
|
317 |
</tr>
|
457 |
</table>
|
458 |
</td>
|
459 |
<td style="width: 50%; vertical-align: top;height: 100%; display: table-cell;">
|
460 |
+
<span id="preview_watermark" style="display:table-cell; background-image:url('<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>');background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
|
461 |
</span>
|
462 |
</td>
|
463 |
</tr>
|
467 |
<!--Lightbox-->
|
468 |
<div class="spider_div_options" id="div_content_3">
|
469 |
<table>
|
470 |
+
<tbody>
|
471 |
+
<tr id="tr_popup_fullscreen">
|
472 |
+
<td class="spider_label_options">
|
473 |
+
<label>Full width lightbox:</label>
|
474 |
+
</td>
|
475 |
+
<td>
|
476 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1">Yes</label>
|
477 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0">No</label>
|
478 |
+
<div class="spider_description">Enable full width feature for the lightbox.</div>
|
479 |
+
</td>
|
480 |
+
</tr>
|
481 |
+
<tr id="tr_popup_dimensions" >
|
482 |
<td class="spider_label_options">
|
483 |
<label for="popup_width">Lightbox dimensions:</label>
|
484 |
</td>
|
1086 |
window.onload = bwg_inputs();
|
1087 |
window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
|
1088 |
window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
|
1089 |
+
window.onload = bwg_popup_fullscreen;
|
1090 |
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'" ?>);
|
1091 |
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'" ?>);
|
1092 |
window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0'" ?>);
|
admin/views/BWGViewUninstall_bwg.php
CHANGED
@@ -138,9 +138,15 @@ class BWGViewUninstall_bwg {
|
|
138 |
<p><?php echo $prefix; ?>bwg_option,</p>
|
139 |
<p><?php echo $prefix; ?>bwg_theme.</p>
|
140 |
</div>
|
|
|
|
|
|
|
141 |
<div class="<?php echo ($flag) ? 'updated' : 'error'?>">
|
142 |
<p><?php echo ($flag) ? 'The folder was successfully deleted.' : 'An error occurred when deleting the folder.'?></p>
|
143 |
</div>
|
|
|
|
|
|
|
144 |
<div class="wrap">
|
145 |
<h2>Uninstall Photo Gallery</h2>
|
146 |
<p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Photo Gallery will be Deactivated Automatically.</strong></p>
|
138 |
<p><?php echo $prefix; ?>bwg_option,</p>
|
139 |
<p><?php echo $prefix; ?>bwg_theme.</p>
|
140 |
</div>
|
141 |
+
<?php
|
142 |
+
if (isset($_POST['bwg_delete_files'])) {
|
143 |
+
?>
|
144 |
<div class="<?php echo ($flag) ? 'updated' : 'error'?>">
|
145 |
<p><?php echo ($flag) ? 'The folder was successfully deleted.' : 'An error occurred when deleting the folder.'?></p>
|
146 |
</div>
|
147 |
+
<?php
|
148 |
+
}
|
149 |
+
?>
|
150 |
<div class="wrap">
|
151 |
<h2>Uninstall Photo Gallery</h2>
|
152 |
<p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Photo Gallery will be Deactivated Automatically.</strong></p>
|
frontend/models/BWGModelAlbum_compact_preview.php
CHANGED
@@ -50,14 +50,18 @@ class BWGModelAlbum_compact_preview {
|
|
50 |
public function get_album_row_data($id) {
|
51 |
global $wpdb;
|
52 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album WHERE published=1 AND id="%d"', $id));
|
53 |
-
|
|
|
|
|
54 |
return $row;
|
55 |
}
|
56 |
|
57 |
public function get_gallery_row_data($id) {
|
58 |
global $wpdb;
|
59 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery WHERE published=1 AND id="%d"', $id));
|
60 |
-
|
|
|
|
|
61 |
return $row;
|
62 |
}
|
63 |
|
50 |
public function get_album_row_data($id) {
|
51 |
global $wpdb;
|
52 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album WHERE published=1 AND id="%d"', $id));
|
53 |
+
if ($row) {
|
54 |
+
$row->permalink = $this->bwg_create_post($row->name, $row->slug, "album", $id);
|
55 |
+
}
|
56 |
return $row;
|
57 |
}
|
58 |
|
59 |
public function get_gallery_row_data($id) {
|
60 |
global $wpdb;
|
61 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery WHERE published=1 AND id="%d"', $id));
|
62 |
+
if ($row) {
|
63 |
+
$row->permalink = $this->bwg_create_post($row->name, $row->slug, "gallery", $id);
|
64 |
+
}
|
65 |
return $row;
|
66 |
}
|
67 |
|
frontend/models/BWGModelImage_browser.php
CHANGED
@@ -54,6 +54,12 @@ class BWGModelImage_browser {
|
|
54 |
return $row;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
public function page_nav($id, $images_per_page, $bwg) {
|
58 |
global $wpdb;
|
59 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d"', $id));
|
54 |
return $row;
|
55 |
}
|
56 |
|
57 |
+
public function get_option_row_data() {
|
58 |
+
global $wpdb;
|
59 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
60 |
+
return $row;
|
61 |
+
}
|
62 |
+
|
63 |
public function page_nav($id, $images_per_page, $bwg) {
|
64 |
global $wpdb;
|
65 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d"', $id));
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -31,6 +31,9 @@ class BWGViewAlbum_compact_preview {
|
|
31 |
if (!isset($params['compuct_album_image_title'])) {
|
32 |
$params['compuct_album_image_title'] = 'none';
|
33 |
}
|
|
|
|
|
|
|
34 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
35 |
$type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
|
36 |
$sort_direction = ' ASC ';
|
@@ -49,13 +52,14 @@ class BWGViewAlbum_compact_preview {
|
|
49 |
$params['compuct_album_enable_page'] = 0;
|
50 |
$params['compuct_album_image_title'] = $options_row->image_title_show_hover;
|
51 |
}
|
|
|
52 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
53 |
if (!$theme_row) {
|
54 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
55 |
return;
|
56 |
}
|
57 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $bwg]) ? esc_html($_POST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
58 |
-
if (!$album_gallery_id) {
|
59 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
60 |
return;
|
61 |
}
|
@@ -63,6 +67,10 @@ class BWGViewAlbum_compact_preview {
|
|
63 |
$items_per_page = $params['compuct_album_images_per_page'];
|
64 |
$items_col_num = $params['compuct_album_image_column_number'];
|
65 |
$image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
|
|
|
|
|
|
|
|
|
66 |
$page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
|
67 |
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
68 |
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
@@ -71,6 +79,10 @@ class BWGViewAlbum_compact_preview {
|
|
71 |
$items_per_page = $params['compuct_albums_per_page'];
|
72 |
$items_col_num = $params['compuct_album_column_number'];
|
73 |
$album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
|
|
|
|
|
|
|
|
|
74 |
$page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
|
75 |
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
76 |
$album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
|
@@ -412,6 +424,9 @@ class BWGViewAlbum_compact_preview {
|
|
412 |
foreach ($album_galleries_row as $album_galallery_row) {
|
413 |
if ($album_galallery_row->is_album) {
|
414 |
$album_row = $this->model->get_album_row_data($album_galallery_row->alb_gal_id);
|
|
|
|
|
|
|
415 |
$preview_image = $album_row->preview_image;
|
416 |
if (!$preview_image) {
|
417 |
$preview_image = $album_row->random_preview_image;
|
@@ -422,6 +437,9 @@ class BWGViewAlbum_compact_preview {
|
|
422 |
}
|
423 |
else {
|
424 |
$gallery_row = $this->model->get_gallery_row_data($album_galallery_row->alb_gal_id);
|
|
|
|
|
|
|
425 |
$preview_image = $gallery_row->preview_image;
|
426 |
if (!$preview_image) {
|
427 |
$preview_image = $gallery_row->random_preview_image;
|
@@ -496,6 +514,7 @@ class BWGViewAlbum_compact_preview {
|
|
496 |
'theme_id' => $params['theme_id'],
|
497 |
'thumb_width' => $params['compuct_album_image_thumb_width'],
|
498 |
'thumb_height' => $params['compuct_album_image_thumb_height'],
|
|
|
499 |
'image_width' => $params['popup_width'],
|
500 |
'image_height' => $params['popup_height'],
|
501 |
'image_effect' => $params['popup_effect'],
|
@@ -582,6 +601,9 @@ class BWGViewAlbum_compact_preview {
|
|
582 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
583 |
</div>
|
584 |
</div>
|
|
|
|
|
|
|
585 |
<?php
|
586 |
if ($from_shortcode) {
|
587 |
return;
|
31 |
if (!isset($params['compuct_album_image_title'])) {
|
32 |
$params['compuct_album_image_title'] = 'none';
|
33 |
}
|
34 |
+
if (!isset($params['popup_fullscreen'])) {
|
35 |
+
$params['popup_fullscreen'] = 0;
|
36 |
+
}
|
37 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
38 |
$type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
|
39 |
$sort_direction = ' ASC ';
|
52 |
$params['compuct_album_enable_page'] = 0;
|
53 |
$params['compuct_album_image_title'] = $options_row->image_title_show_hover;
|
54 |
}
|
55 |
+
|
56 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
57 |
if (!$theme_row) {
|
58 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
59 |
return;
|
60 |
}
|
61 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $bwg]) ? esc_html($_POST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
62 |
+
if (!$album_gallery_id || ($type == 'album' && !$this->model->get_album_row_data($album_gallery_id))) {
|
63 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
64 |
return;
|
65 |
}
|
67 |
$items_per_page = $params['compuct_album_images_per_page'];
|
68 |
$items_col_num = $params['compuct_album_image_column_number'];
|
69 |
$image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
|
70 |
+
if (!$image_rows) {
|
71 |
+
echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
|
72 |
+
return;
|
73 |
+
}
|
74 |
$page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
|
75 |
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
76 |
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
79 |
$items_per_page = $params['compuct_albums_per_page'];
|
80 |
$items_col_num = $params['compuct_album_column_number'];
|
81 |
$album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
|
82 |
+
if (!$album_galleries_row) {
|
83 |
+
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
84 |
+
return;
|
85 |
+
}
|
86 |
$page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
|
87 |
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
88 |
$album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
|
424 |
foreach ($album_galleries_row as $album_galallery_row) {
|
425 |
if ($album_galallery_row->is_album) {
|
426 |
$album_row = $this->model->get_album_row_data($album_galallery_row->alb_gal_id);
|
427 |
+
if (!$album_row) {
|
428 |
+
continue;
|
429 |
+
}
|
430 |
$preview_image = $album_row->preview_image;
|
431 |
if (!$preview_image) {
|
432 |
$preview_image = $album_row->random_preview_image;
|
437 |
}
|
438 |
else {
|
439 |
$gallery_row = $this->model->get_gallery_row_data($album_galallery_row->alb_gal_id);
|
440 |
+
if (!$gallery_row) {
|
441 |
+
continue;
|
442 |
+
}
|
443 |
$preview_image = $gallery_row->preview_image;
|
444 |
if (!$preview_image) {
|
445 |
$preview_image = $gallery_row->random_preview_image;
|
514 |
'theme_id' => $params['theme_id'],
|
515 |
'thumb_width' => $params['compuct_album_image_thumb_width'],
|
516 |
'thumb_height' => $params['compuct_album_image_thumb_height'],
|
517 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
518 |
'image_width' => $params['popup_width'],
|
519 |
'image_height' => $params['popup_height'],
|
520 |
'image_effect' => $params['popup_effect'],
|
601 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
602 |
</div>
|
603 |
</div>
|
604 |
+
<script>
|
605 |
+
var bwg_current_url = '<?php echo add_query_arg($current_url, '', home_url($wp->request)); ?>';
|
606 |
+
</script>
|
607 |
<?php
|
608 |
if ($from_shortcode) {
|
609 |
return;
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -31,6 +31,9 @@ class BWGViewAlbum_extended_preview {
|
|
31 |
if (!isset($params['extended_album_image_title'])) {
|
32 |
$params['extended_album_image_title'] = 'none';
|
33 |
}
|
|
|
|
|
|
|
34 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
35 |
if (!$theme_row) {
|
36 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
@@ -38,7 +41,7 @@ class BWGViewAlbum_extended_preview {
|
|
38 |
}
|
39 |
$type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : 'album');
|
40 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $bwg]) ? esc_html($_POST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
41 |
-
if (!$album_gallery_id) {
|
42 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
43 |
return;
|
44 |
}
|
@@ -46,6 +49,10 @@ class BWGViewAlbum_extended_preview {
|
|
46 |
$items_per_page = $params['extended_album_images_per_page'];
|
47 |
$items_col_num = $params['extended_album_image_column_number'];
|
48 |
$image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
|
|
|
|
|
|
|
|
|
49 |
$page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
|
50 |
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
51 |
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
@@ -54,6 +61,10 @@ class BWGViewAlbum_extended_preview {
|
|
54 |
$items_per_page = $params['extended_albums_per_page'];
|
55 |
$items_col_num = 1;
|
56 |
$album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
|
|
|
|
|
|
|
|
|
57 |
$page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
|
58 |
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
59 |
$album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
|
@@ -423,6 +434,9 @@ class BWGViewAlbum_extended_preview {
|
|
423 |
foreach ($album_galleries_row as $album_galallery_row) {
|
424 |
if ($album_galallery_row->is_album) {
|
425 |
$album_row = $this->model->get_album_row_data($album_galallery_row->alb_gal_id);
|
|
|
|
|
|
|
426 |
$preview_image = $album_row->preview_image;
|
427 |
if (!$preview_image) {
|
428 |
$preview_image = $album_row->random_preview_image;
|
@@ -433,6 +447,9 @@ class BWGViewAlbum_extended_preview {
|
|
433 |
}
|
434 |
else {
|
435 |
$gallery_row = $this->model->get_gallery_row_data($album_galallery_row->alb_gal_id);
|
|
|
|
|
|
|
436 |
$preview_image = $gallery_row->preview_image;
|
437 |
if (!$preview_image) {
|
438 |
$preview_image = $gallery_row->random_preview_image;
|
@@ -527,6 +544,7 @@ class BWGViewAlbum_extended_preview {
|
|
527 |
'theme_id' => $params['theme_id'],
|
528 |
'thumb_width' => $params['extended_album_image_thumb_width'],
|
529 |
'thumb_height' => $params['extended_album_image_thumb_height'],
|
|
|
530 |
'image_width' => $params['popup_width'],
|
531 |
'image_height' => $params['popup_height'],
|
532 |
'image_effect' => $params['popup_effect'],
|
@@ -627,6 +645,9 @@ class BWGViewAlbum_extended_preview {
|
|
627 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
628 |
</div>
|
629 |
</div>
|
|
|
|
|
|
|
630 |
<?php
|
631 |
if ($from_shortcode) {
|
632 |
return;
|
31 |
if (!isset($params['extended_album_image_title'])) {
|
32 |
$params['extended_album_image_title'] = 'none';
|
33 |
}
|
34 |
+
if (!isset($params['popup_fullscreen'])) {
|
35 |
+
$params['popup_fullscreen'] = 0;
|
36 |
+
}
|
37 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
38 |
if (!$theme_row) {
|
39 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
41 |
}
|
42 |
$type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : 'album');
|
43 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $bwg]) ? esc_html($_POST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
44 |
+
if (!$album_gallery_id || ($type == 'album' && !$this->model->get_album_row_data($album_gallery_id))) {
|
45 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
46 |
return;
|
47 |
}
|
49 |
$items_per_page = $params['extended_album_images_per_page'];
|
50 |
$items_col_num = $params['extended_album_image_column_number'];
|
51 |
$image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
|
52 |
+
if (!$image_rows) {
|
53 |
+
echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
|
54 |
+
return;
|
55 |
+
}
|
56 |
$page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
|
57 |
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
58 |
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
61 |
$items_per_page = $params['extended_albums_per_page'];
|
62 |
$items_col_num = 1;
|
63 |
$album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
|
64 |
+
if (!$album_galleries_row) {
|
65 |
+
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
66 |
+
return;
|
67 |
+
}
|
68 |
$page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
|
69 |
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
70 |
$album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
|
434 |
foreach ($album_galleries_row as $album_galallery_row) {
|
435 |
if ($album_galallery_row->is_album) {
|
436 |
$album_row = $this->model->get_album_row_data($album_galallery_row->alb_gal_id);
|
437 |
+
if (!$album_row) {
|
438 |
+
continue;
|
439 |
+
}
|
440 |
$preview_image = $album_row->preview_image;
|
441 |
if (!$preview_image) {
|
442 |
$preview_image = $album_row->random_preview_image;
|
447 |
}
|
448 |
else {
|
449 |
$gallery_row = $this->model->get_gallery_row_data($album_galallery_row->alb_gal_id);
|
450 |
+
if (!$gallery_row) {
|
451 |
+
continue;
|
452 |
+
}
|
453 |
$preview_image = $gallery_row->preview_image;
|
454 |
if (!$preview_image) {
|
455 |
$preview_image = $gallery_row->random_preview_image;
|
544 |
'theme_id' => $params['theme_id'],
|
545 |
'thumb_width' => $params['extended_album_image_thumb_width'],
|
546 |
'thumb_height' => $params['extended_album_image_thumb_height'],
|
547 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
548 |
'image_width' => $params['popup_width'],
|
549 |
'image_height' => $params['popup_height'],
|
550 |
'image_effect' => $params['popup_effect'],
|
645 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
646 |
</div>
|
647 |
</div>
|
648 |
+
<script>
|
649 |
+
var bwg_current_url = '<?php echo add_query_arg($current_url, '', home_url($wp->request)); ?>';
|
650 |
+
</script>
|
651 |
<?php
|
652 |
if ($from_shortcode) {
|
653 |
return;
|
frontend/views/BWGViewGalleryBox.php
CHANGED
@@ -33,6 +33,7 @@ class BWGViewGalleryBox {
|
|
33 |
$theme_id = (isset($_GET['theme_id']) ? esc_html($_GET['theme_id']) : 1);
|
34 |
$thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120);
|
35 |
$thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);
|
|
|
36 |
$image_width = (isset($_GET['image_width']) ? esc_html($_GET['image_width']) : 800);
|
37 |
$image_height = (isset($_GET['image_height']) ? esc_html($_GET['image_height']) : 500);
|
38 |
$image_effect = ((isset($_GET['image_effect']) && esc_html($_GET['image_effect'])) ? esc_html($_GET['image_effect']) : 'fade');
|
@@ -71,6 +72,8 @@ class BWGViewGalleryBox {
|
|
71 |
|
72 |
$theme_row = $this->model->get_theme_row_data($theme_id);
|
73 |
$option_row = $this->model->get_option_row_data();
|
|
|
|
|
74 |
if ($tag_id != 0) {
|
75 |
$image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by);
|
76 |
}
|
@@ -87,6 +90,7 @@ class BWGViewGalleryBox {
|
|
87 |
'theme_id' => $theme_id,
|
88 |
'thumb_width' => $thumb_width,
|
89 |
'thumb_height' => $thumb_height,
|
|
|
90 |
'image_width' => $image_width,
|
91 |
'image_height' => $image_height,
|
92 |
'image_effect' => $image_effect,
|
@@ -323,7 +327,7 @@ class BWGViewGalleryBox {
|
|
323 |
}
|
324 |
.bwg_comments p,
|
325 |
.bwg_comment_body_p {
|
326 |
-
margin: 5px !important
|
327 |
text-align: left;
|
328 |
word-wrap: break-word;
|
329 |
word-break: break-word;
|
@@ -417,8 +421,7 @@ class BWGViewGalleryBox {
|
|
417 |
<?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo $image_filmstrip_height; ?>px;
|
418 |
vertical-align: middle;
|
419 |
width: 100%;
|
420 |
-
}
|
421 |
-
|
422 |
.bwg_filmstrip_container {
|
423 |
display: table;
|
424 |
height: <?php echo $image_filmstrip_height; ?>px;
|
@@ -613,8 +616,13 @@ class BWGViewGalleryBox {
|
|
613 |
<div class="bwg_btn_container">
|
614 |
<div class="bwg_ctrl_btn_container">
|
615 |
<i title="<?php echo __('Play', 'bwg'); ?>" class="bwg_ctrl_btn bwg_play_pause fa fa-play"></i>
|
616 |
-
<?php if ($enable_image_fullscreen) {
|
|
|
|
|
617 |
<i title="<?php echo __('Maximize', 'bwg'); ?>" class="bwg_ctrl_btn bwg_resize-full fa fa-resize-full "></i>
|
|
|
|
|
|
|
618 |
<i title="<?php echo __('Fullscreen', 'bwg'); ?>" class="bwg_ctrl_btn bwg_fullscreen fa fa-fullscreen"></i>
|
619 |
<?php } ?>
|
620 |
<i title="<?php echo $current_image_alt . "<br />" . $current_image_description; ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
|
@@ -673,7 +681,7 @@ class BWGViewGalleryBox {
|
|
673 |
<span class="bwg_popup_image_second_spun" id="image_id_<?php echo $image_row->id; ?>">
|
674 |
<span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
|
675 |
<span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
|
676 |
-
<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; ?>"/>
|
677 |
</span>
|
678 |
</span>
|
679 |
</span>
|
@@ -938,7 +946,7 @@ class BWGViewGalleryBox {
|
|
938 |
/* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
|
939 |
function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
|
940 |
var delay = (c + r) * count;
|
941 |
-
|
942 |
return jQuery('<div class="bwg_gridlet" />').css({
|
943 |
width : width,
|
944 |
height : height,
|
@@ -1020,14 +1028,12 @@ class BWGViewGalleryBox {
|
|
1020 |
grid.children().eq(rows - 1).addClass('rs-bottom-left');
|
1021 |
grid.children().eq(- rows).addClass('rs-top-right');
|
1022 |
/* Execution steps.*/
|
1023 |
-
|
1024 |
setTimeout(function () {
|
1025 |
grid.children().css({
|
1026 |
opacity: op,
|
1027 |
transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
|
1028 |
});
|
1029 |
}, 1);
|
1030 |
-
|
1031 |
jQuery(next_image_class).css('opacity', 1);
|
1032 |
/* After transition.*/
|
1033 |
jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
|
@@ -1172,7 +1178,7 @@ class BWGViewGalleryBox {
|
|
1172 |
else {
|
1173 |
jQuery(".spider_popup_close_fullscreen").show();
|
1174 |
}
|
1175 |
-
if (jQuery(window).height() > <?php echo $image_height; ?>) {
|
1176 |
jQuery("#spider_popup_wrap").css({
|
1177 |
height: <?php echo $image_height; ?>,
|
1178 |
top: '50%',
|
@@ -1198,7 +1204,7 @@ class BWGViewGalleryBox {
|
|
1198 |
});
|
1199 |
bwg_popup_current_height = jQuery(window).height();
|
1200 |
}
|
1201 |
-
if (jQuery(window).width() >= <?php echo $image_width; ?>) {
|
1202 |
jQuery("#spider_popup_wrap").css({
|
1203 |
width: <?php echo $image_width; ?>,
|
1204 |
left: '50%',
|
@@ -1230,7 +1236,7 @@ class BWGViewGalleryBox {
|
|
1230 |
}
|
1231 |
/* Set watermark container size.*/
|
1232 |
bwg_change_watermark_container();
|
1233 |
-
if ((jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) && (jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>)) {
|
1234 |
jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
|
1235 |
}
|
1236 |
else {
|
@@ -1240,7 +1246,7 @@ class BWGViewGalleryBox {
|
|
1240 |
}
|
1241 |
}
|
1242 |
jQuery(window).resize(function() {
|
1243 |
-
if (!jQuery.fullscreen.isFullScreen()) {
|
1244 |
bwg_popup_resize();
|
1245 |
}
|
1246 |
});
|
@@ -1326,10 +1332,16 @@ class BWGViewGalleryBox {
|
|
1326 |
}
|
1327 |
}
|
1328 |
jQuery(document).ready(function () {
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1333 |
if (typeof jQuery().swiperight !== 'undefined' && jQuery.isFunction(jQuery().swiperight)) {
|
1334 |
jQuery('#spider_popup_wrap').swiperight(function () {
|
1335 |
bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data)
|
@@ -1359,7 +1371,7 @@ class BWGViewGalleryBox {
|
|
1359 |
bwg_change_watermark_container();
|
1360 |
}, 500);
|
1361 |
/* If browser doesn't support Fullscreen API.*/
|
1362 |
-
if (!jQuery.fullscreen.isNativelySupported()) {
|
1363 |
jQuery(".bwg_fullscreen").hide();
|
1364 |
}
|
1365 |
/* Set image container height.*/
|
@@ -1537,11 +1549,11 @@ class BWGViewGalleryBox {
|
|
1537 |
if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
|
1538 |
comment_container_width = jQuery(".bwg_comment_container").width();
|
1539 |
}
|
1540 |
-
jQuery(document).on("fscreenchange", function () {
|
1541 |
-
if (jQuery.fullscreen.isFullScreen()) {
|
1542 |
-
|
1543 |
}
|
1544 |
-
})
|
1545 |
function bwg_exit_fullscreen() {
|
1546 |
if (jQuery(window).width() > <?php echo $image_width; ?>) {
|
1547 |
bwg_popup_current_width = <?php echo $image_width; ?>;
|
@@ -1549,6 +1561,15 @@ class BWGViewGalleryBox {
|
|
1549 |
if (jQuery(window).height() > <?php echo $image_height; ?>) {
|
1550 |
bwg_popup_current_height = <?php echo $image_height; ?>;
|
1551 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1552 |
jQuery("#spider_popup_wrap").on("fscreenclose", function() {
|
1553 |
jQuery("#spider_popup_wrap").css({
|
1554 |
width: bwg_popup_current_width,
|
@@ -1583,7 +1604,7 @@ class BWGViewGalleryBox {
|
|
1583 |
}
|
1584 |
});
|
1585 |
}
|
1586 |
-
if (jQuery.fullscreen.isFullScreen()) {
|
1587 |
/* Exit Fullscreen.*/
|
1588 |
jQuery.fullscreen.exit();
|
1589 |
bwg_exit_fullscreen();
|
@@ -1603,7 +1624,6 @@ class BWGViewGalleryBox {
|
|
1603 |
margin: 0,
|
1604 |
zIndex: 100000
|
1605 |
});
|
1606 |
-
|
1607 |
jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
|
1608 |
jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
|
1609 |
/* jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
|
@@ -1611,7 +1631,6 @@ class BWGViewGalleryBox {
|
|
1611 |
maxWidth: (screen_width - comment_container_width),
|
1612 |
maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
|
1613 |
});
|
1614 |
-
|
1615 |
/* Set watermark container size.*/
|
1616 |
bwg_change_watermark_container();
|
1617 |
jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
|
@@ -1642,7 +1661,50 @@ class BWGViewGalleryBox {
|
|
1642 |
jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
|
1643 |
}
|
1644 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1645 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
function bwg_play() {
|
1647 |
bwg_playInterval = setInterval(function () {
|
1648 |
if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
|
33 |
$theme_id = (isset($_GET['theme_id']) ? esc_html($_GET['theme_id']) : 1);
|
34 |
$thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120);
|
35 |
$thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);
|
36 |
+
$open_with_fullscreen = (isset($_GET['open_with_fullscreen']) ? esc_html($_GET['open_with_fullscreen']) : 0);
|
37 |
$image_width = (isset($_GET['image_width']) ? esc_html($_GET['image_width']) : 800);
|
38 |
$image_height = (isset($_GET['image_height']) ? esc_html($_GET['image_height']) : 500);
|
39 |
$image_effect = ((isset($_GET['image_effect']) && esc_html($_GET['image_effect'])) ? esc_html($_GET['image_effect']) : 'fade');
|
72 |
|
73 |
$theme_row = $this->model->get_theme_row_data($theme_id);
|
74 |
$option_row = $this->model->get_option_row_data();
|
75 |
+
$image_right_click = $option_row->image_right_click;
|
76 |
+
|
77 |
if ($tag_id != 0) {
|
78 |
$image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by);
|
79 |
}
|
90 |
'theme_id' => $theme_id,
|
91 |
'thumb_width' => $thumb_width,
|
92 |
'thumb_height' => $thumb_height,
|
93 |
+
'open_with_fullscreen' => $open_with_fullscreen,
|
94 |
'image_width' => $image_width,
|
95 |
'image_height' => $image_height,
|
96 |
'image_effect' => $image_effect,
|
327 |
}
|
328 |
.bwg_comments p,
|
329 |
.bwg_comment_body_p {
|
330 |
+
margin: 5px !important;
|
331 |
text-align: left;
|
332 |
word-wrap: break-word;
|
333 |
word-break: break-word;
|
421 |
<?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo $image_filmstrip_height; ?>px;
|
422 |
vertical-align: middle;
|
423 |
width: 100%;
|
424 |
+
}
|
|
|
425 |
.bwg_filmstrip_container {
|
426 |
display: table;
|
427 |
height: <?php echo $image_filmstrip_height; ?>px;
|
616 |
<div class="bwg_btn_container">
|
617 |
<div class="bwg_ctrl_btn_container">
|
618 |
<i title="<?php echo __('Play', 'bwg'); ?>" class="bwg_ctrl_btn bwg_play_pause fa fa-play"></i>
|
619 |
+
<?php if ($enable_image_fullscreen) {
|
620 |
+
if (!$open_with_fullscreen) {
|
621 |
+
?>
|
622 |
<i title="<?php echo __('Maximize', 'bwg'); ?>" class="bwg_ctrl_btn bwg_resize-full fa fa-resize-full "></i>
|
623 |
+
<?php
|
624 |
+
}
|
625 |
+
?>
|
626 |
<i title="<?php echo __('Fullscreen', 'bwg'); ?>" class="bwg_ctrl_btn bwg_fullscreen fa fa-fullscreen"></i>
|
627 |
<?php } ?>
|
628 |
<i title="<?php echo $current_image_alt . "<br />" . $current_image_description; ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
|
681 |
<span class="bwg_popup_image_second_spun" id="image_id_<?php echo $image_row->id; ?>">
|
682 |
<span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
|
683 |
<span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
|
684 |
+
<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; ?>" />
|
685 |
</span>
|
686 |
</span>
|
687 |
</span>
|
946 |
/* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
|
947 |
function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
|
948 |
var delay = (c + r) * count;
|
949 |
+
/* Return a gridlet elem with styles for specific transition.*/
|
950 |
return jQuery('<div class="bwg_gridlet" />').css({
|
951 |
width : width,
|
952 |
height : height,
|
1028 |
grid.children().eq(rows - 1).addClass('rs-bottom-left');
|
1029 |
grid.children().eq(- rows).addClass('rs-top-right');
|
1030 |
/* Execution steps.*/
|
|
|
1031 |
setTimeout(function () {
|
1032 |
grid.children().css({
|
1033 |
opacity: op,
|
1034 |
transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
|
1035 |
});
|
1036 |
}, 1);
|
|
|
1037 |
jQuery(next_image_class).css('opacity', 1);
|
1038 |
/* After transition.*/
|
1039 |
jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
|
1178 |
else {
|
1179 |
jQuery(".spider_popup_close_fullscreen").show();
|
1180 |
}
|
1181 |
+
if (jQuery(window).height() > <?php echo $image_height; ?> && <?php echo $open_with_fullscreen; ?> != 1 ) {
|
1182 |
jQuery("#spider_popup_wrap").css({
|
1183 |
height: <?php echo $image_height; ?>,
|
1184 |
top: '50%',
|
1204 |
});
|
1205 |
bwg_popup_current_height = jQuery(window).height();
|
1206 |
}
|
1207 |
+
if (jQuery(window).width() >= <?php echo $image_width; ?> && <?php echo $open_with_fullscreen; ?> != 1 ) {
|
1208 |
jQuery("#spider_popup_wrap").css({
|
1209 |
width: <?php echo $image_width; ?>,
|
1210 |
left: '50%',
|
1236 |
}
|
1237 |
/* Set watermark container size.*/
|
1238 |
bwg_change_watermark_container();
|
1239 |
+
if (((jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) && (jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>)) && (<?php echo $open_with_fullscreen; ?> != 1)) {
|
1240 |
jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
|
1241 |
}
|
1242 |
else {
|
1246 |
}
|
1247 |
}
|
1248 |
jQuery(window).resize(function() {
|
1249 |
+
if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen) && !jQuery.fullscreen.isFullScreen()) {
|
1250 |
bwg_popup_resize();
|
1251 |
}
|
1252 |
});
|
1332 |
}
|
1333 |
}
|
1334 |
jQuery(document).ready(function () {
|
1335 |
+
<?php
|
1336 |
+
if ($image_right_click) {
|
1337 |
+
?>
|
1338 |
+
/* Disable right click.*/
|
1339 |
+
jQuery(".bwg_image_wrap").bind("contextmenu", function (e) {
|
1340 |
+
return false;
|
1341 |
+
});
|
1342 |
+
<?php
|
1343 |
+
}
|
1344 |
+
?>
|
1345 |
if (typeof jQuery().swiperight !== 'undefined' && jQuery.isFunction(jQuery().swiperight)) {
|
1346 |
jQuery('#spider_popup_wrap').swiperight(function () {
|
1347 |
bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data)
|
1371 |
bwg_change_watermark_container();
|
1372 |
}, 500);
|
1373 |
/* If browser doesn't support Fullscreen API.*/
|
1374 |
+
if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen) && !jQuery.fullscreen.isNativelySupported()) {
|
1375 |
jQuery(".bwg_fullscreen").hide();
|
1376 |
}
|
1377 |
/* Set image container height.*/
|
1549 |
if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
|
1550 |
comment_container_width = jQuery(".bwg_comment_container").width();
|
1551 |
}
|
1552 |
+
/*jQuery(document).on("fscreenchange", function () {
|
1553 |
+
if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen) && jQuery.fullscreen.isFullScreen()) {
|
1554 |
+
bwg_exit_fullscreen();
|
1555 |
}
|
1556 |
+
});*/
|
1557 |
function bwg_exit_fullscreen() {
|
1558 |
if (jQuery(window).width() > <?php echo $image_width; ?>) {
|
1559 |
bwg_popup_current_width = <?php echo $image_width; ?>;
|
1561 |
if (jQuery(window).height() > <?php echo $image_height; ?>) {
|
1562 |
bwg_popup_current_height = <?php echo $image_height; ?>;
|
1563 |
}
|
1564 |
+
<?php
|
1565 |
+
/* "Full width lightbox" sets yes.*/
|
1566 |
+
if ($open_with_fullscreen) {
|
1567 |
+
?>
|
1568 |
+
bwg_popup_current_width = jQuery(window).width();
|
1569 |
+
bwg_popup_current_height = jQuery(window).height();
|
1570 |
+
<?php
|
1571 |
+
}
|
1572 |
+
?>
|
1573 |
jQuery("#spider_popup_wrap").on("fscreenclose", function() {
|
1574 |
jQuery("#spider_popup_wrap").css({
|
1575 |
width: bwg_popup_current_width,
|
1604 |
}
|
1605 |
});
|
1606 |
}
|
1607 |
+
if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen) && jQuery.fullscreen.isFullScreen()) {
|
1608 |
/* Exit Fullscreen.*/
|
1609 |
jQuery.fullscreen.exit();
|
1610 |
bwg_exit_fullscreen();
|
1624 |
margin: 0,
|
1625 |
zIndex: 100000
|
1626 |
});
|
|
|
1627 |
jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
|
1628 |
jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
|
1629 |
/* jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
|
1631 |
maxWidth: (screen_width - comment_container_width),
|
1632 |
maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
|
1633 |
});
|
|
|
1634 |
/* Set watermark container size.*/
|
1635 |
bwg_change_watermark_container();
|
1636 |
jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
|
1661 |
jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
|
1662 |
}
|
1663 |
});
|
1664 |
+
/* Open with fullscreen.*/
|
1665 |
+
<?php
|
1666 |
+
if ($open_with_fullscreen) {
|
1667 |
+
?>
|
1668 |
+
bwg_open_with_fullscreen();
|
1669 |
+
<?php
|
1670 |
+
}
|
1671 |
+
?>
|
1672 |
});
|
1673 |
+
/* Open with fullscreen.*/
|
1674 |
+
function bwg_open_with_fullscreen() {
|
1675 |
+
jQuery(".bwg_watermark").css({display: 'none'});
|
1676 |
+
var comment_container_width = 0;
|
1677 |
+
if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
|
1678 |
+
comment_container_width = jQuery(".bwg_comment_container").width();
|
1679 |
+
}
|
1680 |
+
bwg_popup_current_width = jQuery(window).width();
|
1681 |
+
bwg_popup_current_height = jQuery(window).height();
|
1682 |
+
jQuery("#spider_popup_wrap").css({
|
1683 |
+
width: jQuery(window).width(),
|
1684 |
+
height: jQuery(window).height(),
|
1685 |
+
left: 0,
|
1686 |
+
top: 0,
|
1687 |
+
margin: 0,
|
1688 |
+
zIndex: 100000
|
1689 |
+
});
|
1690 |
+
jQuery(".bwg_image_wrap").css({width: (jQuery(window).width() - comment_container_width)});
|
1691 |
+
jQuery(".bwg_image_container").css({height: (bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>)});
|
1692 |
+
jQuery(".bwg_popup_image").css({
|
1693 |
+
maxWidth: jQuery(window).width() - comment_container_width,
|
1694 |
+
maxHeight: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
|
1695 |
+
}, {
|
1696 |
+
complete: function () { bwg_change_watermark_container(); }
|
1697 |
+
});
|
1698 |
+
jQuery(".bwg_filmstrip_container").css({width: jQuery(window).width() - comment_container_width});
|
1699 |
+
jQuery(".bwg_filmstrip").css({width: jQuery(window).width() - comment_container_width - 40});
|
1700 |
+
/* Set filmstrip initial position.*/
|
1701 |
+
bwg_set_filmstrip_pos(jQuery(window).width() - comment_container_width - 40);
|
1702 |
+
|
1703 |
+
jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-small");
|
1704 |
+
jQuery(".bwg_resize-full").attr("title", "<?php echo __('Restore', 'bwg'); ?>");
|
1705 |
+
jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
|
1706 |
+
}
|
1707 |
+
|
1708 |
function bwg_play() {
|
1709 |
bwg_playInterval = setInterval(function () {
|
1710 |
if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -46,12 +46,18 @@ class BWGViewImage_browser {
|
|
46 |
$image_browser_images_conteiner = WDWLibrary::spider_hex2rgb($theme_row->image_browser_full_bg_color);
|
47 |
$bwg_image_browser_image = WDWLibrary::spider_hex2rgb($theme_row->image_browser_bg_color);
|
48 |
$image_title = $params['image_browser_title_enable'];
|
49 |
-
$enable_image_description = $params['image_browser_description_enable'];
|
|
|
|
|
|
|
|
|
|
|
50 |
$params_array = array(
|
51 |
'action' => 'GalleryBox',
|
52 |
'current_view' => $bwg,
|
53 |
'gallery_id' => $params['gallery_id'],
|
54 |
'theme_id' => $params['theme_id'],
|
|
|
55 |
'image_width' => $params['popup_width'],
|
56 |
'image_height' => $params['popup_height'],
|
57 |
'image_effect' => $params['popup_effect'],
|
@@ -504,11 +510,18 @@ class BWGViewImage_browser {
|
|
504 |
</div>
|
505 |
<script>
|
506 |
jQuery(window).load(function () {
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
});
|
|
|
512 |
</script>
|
513 |
<?php
|
514 |
if ($from_shortcode) {
|
46 |
$image_browser_images_conteiner = WDWLibrary::spider_hex2rgb($theme_row->image_browser_full_bg_color);
|
47 |
$bwg_image_browser_image = WDWLibrary::spider_hex2rgb($theme_row->image_browser_bg_color);
|
48 |
$image_title = $params['image_browser_title_enable'];
|
49 |
+
$enable_image_description = $params['image_browser_description_enable'];
|
50 |
+
$option_row = $this->model->get_option_row_data();
|
51 |
+
$image_right_click = $option_row->image_right_click;
|
52 |
+
if (!isset($params['popup_fullscreen'])) {
|
53 |
+
$params['popup_fullscreen'] = 0;
|
54 |
+
}
|
55 |
$params_array = array(
|
56 |
'action' => 'GalleryBox',
|
57 |
'current_view' => $bwg,
|
58 |
'gallery_id' => $params['gallery_id'],
|
59 |
'theme_id' => $params['theme_id'],
|
60 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
61 |
'image_width' => $params['popup_width'],
|
62 |
'image_height' => $params['popup_height'],
|
63 |
'image_effect' => $params['popup_effect'],
|
510 |
</div>
|
511 |
<script>
|
512 |
jQuery(window).load(function () {
|
513 |
+
<?php
|
514 |
+
if ($image_right_click) {
|
515 |
+
?>
|
516 |
+
/* Disable right click.*/
|
517 |
+
jQuery('div[id^="bwg_container"]').bind("contextmenu", function (e) {
|
518 |
+
return false;
|
519 |
+
});
|
520 |
+
<?php
|
521 |
+
}
|
522 |
+
?>
|
523 |
});
|
524 |
+
var bwg_current_url = '<?php echo add_query_arg($current_url, '', home_url($wp->request)); ?>';
|
525 |
</script>
|
526 |
<?php
|
527 |
if ($from_shortcode) {
|
frontend/views/BWGViewSlideshow.php
CHANGED
@@ -27,6 +27,7 @@ class BWGViewSlideshow {
|
|
27 |
global $WD_BWG_UPLOAD_DIR;
|
28 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
29 |
$options_row = $this->model->get_options_row_data();
|
|
|
30 |
if (!$from) {
|
31 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
32 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
@@ -239,7 +240,6 @@ class BWGViewSlideshow {
|
|
239 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover {
|
240 |
visibility: visible;
|
241 |
}
|
242 |
-
|
243 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover span {
|
244 |
left: 20px;
|
245 |
}
|
@@ -597,8 +597,7 @@ class BWGViewSlideshow {
|
|
597 |
$current_key = $key;
|
598 |
}
|
599 |
?>
|
600 |
-
<span id="bwg_dots_<?php echo $key; ?>_<?php echo $bwg; ?>" class="bwg_slideshow_dots_<?php echo $bwg; ?> <?php echo (($image_row->id == $current_image_id) ? 'bwg_slideshow_dots_active_' . $bwg : 'bwg_slideshow_dots_deactive_' . $bwg); ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), '<?php echo $key; ?>', data_<?php echo $bwg; ?>)" image_id="<?php echo $image_row->id; ?>" image_key="<?php echo $key; ?>">
|
601 |
-
</span>
|
602 |
<?php
|
603 |
}
|
604 |
?>
|
@@ -884,10 +883,10 @@ class BWGViewSlideshow {
|
|
884 |
/* After transition.*/
|
885 |
jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
|
886 |
function bwg_after_trans() {
|
887 |
-
/*
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
jQuery(current_image_class).removeAttr('style');
|
892 |
jQuery(next_image_class).removeAttr('style');
|
893 |
jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
|
@@ -1118,7 +1117,6 @@ class BWGViewSlideshow {
|
|
1118 |
else if (current_key == '-2') { /* Dots.*/
|
1119 |
current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
|
1120 |
}
|
1121 |
-
|
1122 |
}
|
1123 |
if (bwg_trans_in_progress_<?php echo $bwg; ?>) {
|
1124 |
event_stack_<?php echo $bwg; ?>.push(current_key + '-' + key);
|
@@ -1165,7 +1163,6 @@ class BWGViewSlideshow {
|
|
1165 |
jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: <?php echo $image_height; ?>});
|
1166 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
|
1167 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: (<?php echo $image_height - $slideshow_filmstrip_height; ?>)});
|
1168 |
-
|
1169 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
|
1170 |
/*maxWidth: <?php echo $image_width; ?>,
|
1171 |
maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
|
@@ -1208,10 +1205,16 @@ class BWGViewSlideshow {
|
|
1208 |
bwg_popup_resize_<?php echo $bwg; ?>();
|
1209 |
});
|
1210 |
jQuery(window).load(function () {
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1215 |
if (typeof jQuery().swiperight !== 'undefined' && jQuery.isFunction(jQuery().swiperight)) {
|
1216 |
jQuery('#bwg_container1_<?php echo $bwg; ?>').swiperight(function () {
|
1217 |
bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>);
|
@@ -1237,8 +1240,7 @@ class BWGViewSlideshow {
|
|
1237 |
}, 500);
|
1238 |
/* Set image container height.*/
|
1239 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
|
1240 |
-
|
1241 |
-
var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x*/
|
1242 |
jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
|
1243 |
var evt = window.event || e; /* Equalize event object.*/
|
1244 |
evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
|
27 |
global $WD_BWG_UPLOAD_DIR;
|
28 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
29 |
$options_row = $this->model->get_options_row_data();
|
30 |
+
$image_right_click = $options_row->image_right_click;
|
31 |
if (!$from) {
|
32 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
33 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
240 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover {
|
241 |
visibility: visible;
|
242 |
}
|
|
|
243 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover span {
|
244 |
left: 20px;
|
245 |
}
|
597 |
$current_key = $key;
|
598 |
}
|
599 |
?>
|
600 |
+
<span id="bwg_dots_<?php echo $key; ?>_<?php echo $bwg; ?>" class="bwg_slideshow_dots_<?php echo $bwg; ?> <?php echo (($image_row->id == $current_image_id) ? 'bwg_slideshow_dots_active_' . $bwg : 'bwg_slideshow_dots_deactive_' . $bwg); ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), '<?php echo $key; ?>', data_<?php echo $bwg; ?>)" image_id="<?php echo $image_row->id; ?>" image_key="<?php echo $key; ?>"></span>
|
|
|
601 |
<?php
|
602 |
}
|
603 |
?>
|
883 |
/* After transition.*/
|
884 |
jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
|
885 |
function bwg_after_trans() {
|
886 |
+
/*if (bwg_from_focus_<?php echo $bwg; ?>) {
|
887 |
+
bwg_from_focus_<?php echo $bwg; ?> = false;
|
888 |
+
return;
|
889 |
+
}*/
|
890 |
jQuery(current_image_class).removeAttr('style');
|
891 |
jQuery(next_image_class).removeAttr('style');
|
892 |
jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
|
1117 |
else if (current_key == '-2') { /* Dots.*/
|
1118 |
current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
|
1119 |
}
|
|
|
1120 |
}
|
1121 |
if (bwg_trans_in_progress_<?php echo $bwg; ?>) {
|
1122 |
event_stack_<?php echo $bwg; ?>.push(current_key + '-' + key);
|
1163 |
jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: <?php echo $image_height; ?>});
|
1164 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
|
1165 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: (<?php echo $image_height - $slideshow_filmstrip_height; ?>)});
|
|
|
1166 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
|
1167 |
/*maxWidth: <?php echo $image_width; ?>,
|
1168 |
maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
|
1205 |
bwg_popup_resize_<?php echo $bwg; ?>();
|
1206 |
});
|
1207 |
jQuery(window).load(function () {
|
1208 |
+
<?php
|
1209 |
+
if ($image_right_click) {
|
1210 |
+
?>
|
1211 |
+
/* Disable right click.*/
|
1212 |
+
jQuery('div[id^="bwg_container"]').bind("contextmenu", function () {
|
1213 |
+
return false;
|
1214 |
+
});
|
1215 |
+
<?php
|
1216 |
+
}
|
1217 |
+
?>
|
1218 |
if (typeof jQuery().swiperight !== 'undefined' && jQuery.isFunction(jQuery().swiperight)) {
|
1219 |
jQuery('#bwg_container1_<?php echo $bwg; ?>').swiperight(function () {
|
1220 |
bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>);
|
1240 |
}, 500);
|
1241 |
/* Set image container height.*/
|
1242 |
jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
|
1243 |
+
var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x */
|
|
|
1244 |
jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
|
1245 |
var evt = window.event || e; /* Equalize event object.*/
|
1246 |
evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -31,6 +31,9 @@ class BWGViewThumbnails {
|
|
31 |
if (!isset($params['image_title'])) {
|
32 |
$params['image_title'] = 'none';
|
33 |
}
|
|
|
|
|
|
|
34 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
35 |
$sort_direction = ' ASC ';
|
36 |
if ($from) {
|
@@ -46,6 +49,7 @@ class BWGViewThumbnails {
|
|
46 |
$params['thumb_height'] = $params['height'];
|
47 |
$params['thumb_width'] = $params['width'];
|
48 |
$params['image_column_number'] = $params['count'];
|
|
|
49 |
$params['popup_width'] = $options_row->popup_width;
|
50 |
$params['popup_height'] = $options_row->popup_height;
|
51 |
$params['popup_effect'] = $options_row->popup_type;
|
@@ -269,7 +273,7 @@ class BWGViewThumbnails {
|
|
269 |
<div id="bwg_container1_<?php echo $bwg; ?>">
|
270 |
<div id="bwg_container2_<?php echo $bwg; ?>">
|
271 |
<form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
|
272 |
-
<div style="background-color:rgba(0, 0, 0, 0); text-align:
|
273 |
<?php
|
274 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
|
275 |
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
@@ -293,6 +297,7 @@ class BWGViewThumbnails {
|
|
293 |
'theme_id' => $params['theme_id'],
|
294 |
'thumb_width' => $params['thumb_width'],
|
295 |
'thumb_height' => $params['thumb_height'],
|
|
|
296 |
'image_width' => $params['popup_width'],
|
297 |
'image_height' => $params['popup_height'],
|
298 |
'image_effect' => $params['popup_effect'],
|
@@ -378,6 +383,9 @@ class BWGViewThumbnails {
|
|
378 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
379 |
</div>
|
380 |
</div>
|
|
|
|
|
|
|
381 |
<?php
|
382 |
if ($from_shortcode) {
|
383 |
return;
|
31 |
if (!isset($params['image_title'])) {
|
32 |
$params['image_title'] = 'none';
|
33 |
}
|
34 |
+
if (!isset($params['popup_fullscreen'])) {
|
35 |
+
$params['popup_fullscreen'] = 0;
|
36 |
+
}
|
37 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
38 |
$sort_direction = ' ASC ';
|
39 |
if ($from) {
|
49 |
$params['thumb_height'] = $params['height'];
|
50 |
$params['thumb_width'] = $params['width'];
|
51 |
$params['image_column_number'] = $params['count'];
|
52 |
+
$params['popup_fullscreen'] = $options_row->popup_fullscreen;
|
53 |
$params['popup_width'] = $options_row->popup_width;
|
54 |
$params['popup_height'] = $options_row->popup_height;
|
55 |
$params['popup_effect'] = $options_row->popup_type;
|
273 |
<div id="bwg_container1_<?php echo $bwg; ?>">
|
274 |
<div id="bwg_container2_<?php echo $bwg; ?>">
|
275 |
<form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
|
276 |
+
<div style="background-color:rgba(0, 0, 0, 0); text-align: <?php echo $theme_row->thumb_align; ?>; width:100%;">
|
277 |
<?php
|
278 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
|
279 |
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
297 |
'theme_id' => $params['theme_id'],
|
298 |
'thumb_width' => $params['thumb_width'],
|
299 |
'thumb_height' => $params['thumb_height'],
|
300 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
301 |
'image_width' => $params['popup_width'],
|
302 |
'image_height' => $params['popup_height'],
|
303 |
'image_effect' => $params['popup_effect'],
|
383 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
384 |
</div>
|
385 |
</div>
|
386 |
+
<script>
|
387 |
+
var bwg_current_url = '<?php echo add_query_arg($current_url, '', home_url($wp->request)); ?>';
|
388 |
+
</script>
|
389 |
<?php
|
390 |
if ($from_shortcode) {
|
391 |
return;
|
js/bwg.js
CHANGED
@@ -795,6 +795,15 @@ function bwg_enable_disable(display, id, current) {
|
|
795 |
jQuery("#" + id).css('display', display);
|
796 |
}
|
797 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
798 |
function spider_check_isnum(e) {
|
799 |
var chCode1 = e.which || e.paramlist_keyCode;
|
800 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57) && (chCode1 != 46) && (chCode1 != 45)) {
|
795 |
jQuery("#" + id).css('display', display);
|
796 |
}
|
797 |
|
798 |
+
function bwg_popup_fullscreen() {
|
799 |
+
if (jQuery("#popup_fullscreen_1").is(':checked')) {
|
800 |
+
jQuery("#tr_popup_dimensions").css('display', 'none');
|
801 |
+
}
|
802 |
+
else {
|
803 |
+
jQuery("#tr_popup_dimensions").css('display', '');
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
function spider_check_isnum(e) {
|
808 |
var chCode1 = e.which || e.paramlist_keyCode;
|
809 |
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57) && (chCode1 != 46) && (chCode1 != 45)) {
|
js/bwg_frontend.js
CHANGED
@@ -36,6 +36,9 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
36 |
height: jQuery("#" + id).css('height'),
|
37 |
display: 'table-cell'
|
38 |
});
|
|
|
|
|
|
|
39 |
jQuery.post(
|
40 |
window.location,
|
41 |
post_data,
|
36 |
height: jQuery("#" + id).css('height'),
|
37 |
display: 'table-cell'
|
38 |
});
|
39 |
+
// if (!bwg_current_url) {
|
40 |
+
// bwg_current_url = window.location;
|
41 |
+
// }
|
42 |
jQuery.post(
|
43 |
window.location,
|
44 |
post_data,
|
js/bwg_shortcode.js
CHANGED
@@ -54,6 +54,15 @@ function bwg_enable_disable(display, id, current) {
|
|
54 |
jQuery("#" + id).css('display', display);
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
function bwg_change_label(id, text) {
|
58 |
jQuery('#' + id).html(text);
|
59 |
}
|
@@ -312,6 +321,7 @@ function bwg_gallery_type(gallery_type) {
|
|
312 |
jQuery("#tr_popup_enable_facebook").css('display', '');
|
313 |
jQuery("#tr_popup_enable_twitter").css('display', '');
|
314 |
jQuery("#tr_popup_enable_google").css('display', '');
|
|
|
315 |
}
|
316 |
}
|
317 |
|
54 |
jQuery("#" + id).css('display', display);
|
55 |
}
|
56 |
|
57 |
+
function bwg_popup_fullscreen() {
|
58 |
+
if (jQuery("#popup_fullscreen_1").is(':checked')) {
|
59 |
+
jQuery("#tr_popup_width_height").css('display', 'none');
|
60 |
+
}
|
61 |
+
else {
|
62 |
+
jQuery("#tr_popup_width_height").css('display', '');
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
function bwg_change_label(id, text) {
|
67 |
jQuery('#' + id).html(text);
|
68 |
}
|
321 |
jQuery("#tr_popup_enable_facebook").css('display', '');
|
322 |
jQuery("#tr_popup_enable_twitter").css('display', '');
|
323 |
jQuery("#tr_popup_enable_google").css('display', '');
|
324 |
+
bwg_popup_fullscreen();
|
325 |
}
|
326 |
}
|
327 |
|
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.
|
8 |
* Author: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*/
|
@@ -257,6 +257,7 @@ function bwg_shortcode($params) {
|
|
257 |
|
258 |
if ($params['gallery_type'] != 'slideshow') {
|
259 |
shortcode_atts(array(
|
|
|
260 |
'popup_width' => 800,
|
261 |
'popup_height' => 600,
|
262 |
'popup_effect' => 'fade',
|
@@ -297,6 +298,7 @@ function bwg_shortcode($params) {
|
|
297 |
'watermark_position' => 'bottom-right',
|
298 |
), $params);
|
299 |
break;
|
|
|
300 |
}
|
301 |
default: {
|
302 |
$params['watermark_type'] = 'none';
|
@@ -304,7 +306,7 @@ function bwg_shortcode($params) {
|
|
304 |
}
|
305 |
}
|
306 |
foreach ($params as $key => $param) {
|
307 |
-
if (empty($param[$key]) ==
|
308 |
$param[$key] = esc_html(addslashes($param[$key]));
|
309 |
}
|
310 |
}
|
@@ -524,6 +526,8 @@ function bwg_activate() {
|
|
524 |
`built_in_watermark_color` varchar(255) NOT NULL,
|
525 |
`built_in_watermark_opacity` int(4) NOT NULL,
|
526 |
|
|
|
|
|
527 |
`gallery_role` tinyint(1) NOT NULL,
|
528 |
`album_role` tinyint(1) NOT NULL,
|
529 |
`image_role` tinyint(1) NOT NULL,
|
@@ -755,55 +759,55 @@ function bwg_activate() {
|
|
755 |
`masonry_thumb_hover_effect_value` varchar(128) NOT NULL,
|
756 |
`masonry_thumb_transition` tinyint(1) NOT NULL,
|
757 |
|
758 |
-
`slideshow_cont_bg_color`
|
759 |
-
`slideshow_close_btn_transparent`
|
760 |
`slideshow_rl_btn_bg_color` varchar(64) NOT NULL,
|
761 |
`slideshow_rl_btn_border_radius` varchar(64) NOT NULL,
|
762 |
-
`slideshow_rl_btn_border_width`
|
763 |
-
`slideshow_rl_btn_border_style`
|
764 |
-
`slideshow_rl_btn_border_color`
|
765 |
-
`slideshow_rl_btn_box_shadow`
|
766 |
`slideshow_rl_btn_color` varchar(64) NOT NULL,
|
767 |
-
`slideshow_rl_btn_height`
|
768 |
-
`slideshow_rl_btn_size`
|
769 |
`slideshow_rl_btn_width` int(4) NOT NULL,
|
770 |
`slideshow_close_rl_btn_hover_color` varchar(64) NOT NULL,
|
771 |
-
`slideshow_filmstrip_pos`
|
772 |
`slideshow_filmstrip_thumb_border_width` int(4) NOT NULL,
|
773 |
`slideshow_filmstrip_thumb_border_style` varchar(64) NOT NULL,
|
774 |
`slideshow_filmstrip_thumb_border_color` varchar(64) NOT NULL,
|
775 |
-
`slideshow_filmstrip_thumb_border_radius`
|
776 |
`slideshow_filmstrip_thumb_margin` varchar(64) NOT NULL,
|
777 |
-
`slideshow_filmstrip_thumb_active_border_width`
|
778 |
-
`slideshow_filmstrip_thumb_active_border_color`
|
779 |
-
`slideshow_filmstrip_thumb_deactive_transparent`
|
780 |
-
`slideshow_filmstrip_rl_bg_color`
|
781 |
`slideshow_filmstrip_rl_btn_color` varchar(64) NOT NULL,
|
782 |
-
`slideshow_filmstrip_rl_btn_size`
|
783 |
`slideshow_title_font_size` int(4) NOT NULL,
|
784 |
`slideshow_title_font` varchar(64) NOT NULL,
|
785 |
-
`slideshow_title_color`
|
786 |
`slideshow_title_opacity` int(4) NOT NULL,
|
787 |
-
`slideshow_title_border_radius`
|
788 |
-
`slideshow_title_background_color`
|
789 |
-
`slideshow_title_padding`
|
790 |
`slideshow_description_font_size` int(4) NOT NULL,
|
791 |
`slideshow_description_font` varchar(64) NOT NULL,
|
792 |
-
`slideshow_description_color`
|
793 |
`slideshow_description_opacity` int(4) NOT NULL,
|
794 |
-
`slideshow_description_border_radius`
|
795 |
-
`slideshow_description_background_color`
|
796 |
-
`slideshow_description_padding`
|
797 |
`slideshow_dots_width` int(4) NOT NULL,
|
798 |
`slideshow_dots_height` int(4) NOT NULL,
|
799 |
-
`slideshow_dots_border_radius`
|
800 |
-
`slideshow_dots_background_color`
|
801 |
`slideshow_dots_margin` int(4) NOT NULL,
|
802 |
-
`slideshow_dots_active_background_color`
|
803 |
`slideshow_dots_active_border_width` int(4) NOT NULL,
|
804 |
-
`slideshow_dots_active_border_color`
|
805 |
-
`slideshow_play_pause_btn_size`
|
806 |
-
`slideshow_rl_btn_style`
|
807 |
|
808 |
`blog_style_margin` varchar(128) NOT NULL,
|
809 |
`blog_style_padding` varchar(128) NOT NULL,
|
@@ -815,7 +819,7 @@ function bwg_activate() {
|
|
815 |
`blog_style_box_shadow` varchar(128) NOT NULL,
|
816 |
`blog_style_transparent` int(4) NOT NULL,
|
817 |
`blog_style_align` varchar(128) NOT NULL,
|
818 |
-
|
819 |
`blog_style_share_buttons_margin` varchar(128) NOT NULL,
|
820 |
`blog_style_share_buttons_border_radius` varchar(128) NOT NULL,
|
821 |
`blog_style_share_buttons_border_width` int(4) NOT NULL,
|
@@ -968,6 +972,8 @@ function bwg_activate() {
|
|
968 |
'built_in_watermark_color' => 'FFFFFF',
|
969 |
'built_in_watermark_opacity' => 30,
|
970 |
|
|
|
|
|
971 |
'gallery_role' => 0,
|
972 |
'album_role' => 0,
|
973 |
'image_role' => 0
|
@@ -1061,6 +1067,8 @@ function bwg_activate() {
|
|
1061 |
'%d',
|
1062 |
'%d',
|
1063 |
'%d',
|
|
|
|
|
1064 |
));
|
1065 |
}
|
1066 |
$exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
|
@@ -2381,20 +2389,15 @@ function bwg_activate() {
|
|
2381 |
'%d'
|
2382 |
));
|
2383 |
}
|
2384 |
-
$version =
|
2385 |
-
$new_version =
|
2386 |
-
if ($version && $version
|
2387 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
2388 |
-
|
2389 |
-
|
2390 |
-
if (function_exists($func_name)) {
|
2391 |
-
$func_name();
|
2392 |
-
}
|
2393 |
-
}
|
2394 |
-
update_option("wd_bwg_version", '1.1.9');
|
2395 |
}
|
2396 |
else {
|
2397 |
-
add_option("wd_bwg_version",
|
2398 |
add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
|
2399 |
}
|
2400 |
}
|
@@ -2446,6 +2449,7 @@ function bwg_options_scripts() {
|
|
2446 |
}
|
2447 |
|
2448 |
function bwg_front_end_scripts() {
|
|
|
2449 |
global $wp_scripts;
|
2450 |
if (isset($wp_scripts->registered['jquery'])) {
|
2451 |
$jquery = $wp_scripts->registered['jquery'];
|
@@ -2456,18 +2460,18 @@ function bwg_front_end_scripts() {
|
|
2456 |
}
|
2457 |
wp_enqueue_script('jquery');
|
2458 |
wp_enqueue_script('jquery-ui-tooltip');
|
2459 |
-
wp_enqueue_style('jquery-ui', WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css');
|
2460 |
|
2461 |
-
wp_enqueue_script('bwg_frontend', WD_BWG_URL . '/js/bwg_frontend.js', array(),
|
2462 |
-
wp_enqueue_style('bwg_frontend', WD_BWG_URL . '/css/bwg_frontend.css');
|
2463 |
|
2464 |
// Styles/Scripts for popup.
|
2465 |
-
wp_enqueue_style('bwg_font-awesome', WD_BWG_URL . '/css/font-awesome-4.0.1/font-awesome.css');
|
2466 |
-
wp_enqueue_script('bwg_jquery_mobile', WD_BWG_URL . '/js/jquery.mobile.js', array(),
|
2467 |
-
wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(),
|
2468 |
-
wp_enqueue_style('bwg_mCustomScrollbar', WD_BWG_URL . '/css/jquery.mCustomScrollbar.css');
|
2469 |
wp_enqueue_script('jquery-fullscreen', WD_BWG_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
|
2470 |
-
wp_enqueue_script('bwg_gallery_box', WD_BWG_URL . '/js/bwg_gallery_box.js', array(),
|
2471 |
wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
|
2472 |
'bwg_field_required' => __('field is required.', 'bwg'),
|
2473 |
'bwg_mail_validation' => __('This is not a valid email address.', 'bwg'),
|
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.10
|
8 |
* Author: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*/
|
257 |
|
258 |
if ($params['gallery_type'] != 'slideshow') {
|
259 |
shortcode_atts(array(
|
260 |
+
'popup_fullscreen' => 0,
|
261 |
'popup_width' => 800,
|
262 |
'popup_height' => 600,
|
263 |
'popup_effect' => 'fade',
|
298 |
'watermark_position' => 'bottom-right',
|
299 |
), $params);
|
300 |
break;
|
301 |
+
|
302 |
}
|
303 |
default: {
|
304 |
$params['watermark_type'] = 'none';
|
306 |
}
|
307 |
}
|
308 |
foreach ($params as $key => $param) {
|
309 |
+
if (empty($param[$key]) == FALSE) {
|
310 |
$param[$key] = esc_html(addslashes($param[$key]));
|
311 |
}
|
312 |
}
|
526 |
`built_in_watermark_color` varchar(255) NOT NULL,
|
527 |
`built_in_watermark_opacity` int(4) NOT NULL,
|
528 |
|
529 |
+
`image_right_click` tinyint(1) NOT NULL,
|
530 |
+
`popup_fullscreen` tinyint(1) NOT NULL,
|
531 |
`gallery_role` tinyint(1) NOT NULL,
|
532 |
`album_role` tinyint(1) NOT NULL,
|
533 |
`image_role` tinyint(1) NOT NULL,
|
759 |
`masonry_thumb_hover_effect_value` varchar(128) NOT NULL,
|
760 |
`masonry_thumb_transition` tinyint(1) NOT NULL,
|
761 |
|
762 |
+
`slideshow_cont_bg_color` varchar(64) NOT NULL,
|
763 |
+
`slideshow_close_btn_transparent` int(4) NOT NULL,
|
764 |
`slideshow_rl_btn_bg_color` varchar(64) NOT NULL,
|
765 |
`slideshow_rl_btn_border_radius` varchar(64) NOT NULL,
|
766 |
+
`slideshow_rl_btn_border_width` int(4) NOT NULL,
|
767 |
+
`slideshow_rl_btn_border_style` varchar(64) NOT NULL,
|
768 |
+
`slideshow_rl_btn_border_color` varchar(64) NOT NULL,
|
769 |
+
`slideshow_rl_btn_box_shadow` varchar(128) NOT NULL,
|
770 |
`slideshow_rl_btn_color` varchar(64) NOT NULL,
|
771 |
+
`slideshow_rl_btn_height` int(4) NOT NULL,
|
772 |
+
`slideshow_rl_btn_size` int(4) NOT NULL,
|
773 |
`slideshow_rl_btn_width` int(4) NOT NULL,
|
774 |
`slideshow_close_rl_btn_hover_color` varchar(64) NOT NULL,
|
775 |
+
`slideshow_filmstrip_pos` varchar(64) NOT NULL,
|
776 |
`slideshow_filmstrip_thumb_border_width` int(4) NOT NULL,
|
777 |
`slideshow_filmstrip_thumb_border_style` varchar(64) NOT NULL,
|
778 |
`slideshow_filmstrip_thumb_border_color` varchar(64) NOT NULL,
|
779 |
+
`slideshow_filmstrip_thumb_border_radius` varchar(64) NOT NULL,
|
780 |
`slideshow_filmstrip_thumb_margin` varchar(64) NOT NULL,
|
781 |
+
`slideshow_filmstrip_thumb_active_border_width` int(4) NOT NULL,
|
782 |
+
`slideshow_filmstrip_thumb_active_border_color` varchar(64) NOT NULL,
|
783 |
+
`slideshow_filmstrip_thumb_deactive_transparent` int(4) NOT NULL,
|
784 |
+
`slideshow_filmstrip_rl_bg_color` varchar(64) NOT NULL,
|
785 |
`slideshow_filmstrip_rl_btn_color` varchar(64) NOT NULL,
|
786 |
+
`slideshow_filmstrip_rl_btn_size` int(4) NOT NULL,
|
787 |
`slideshow_title_font_size` int(4) NOT NULL,
|
788 |
`slideshow_title_font` varchar(64) NOT NULL,
|
789 |
+
`slideshow_title_color` varchar(64) NOT NULL,
|
790 |
`slideshow_title_opacity` int(4) NOT NULL,
|
791 |
+
`slideshow_title_border_radius` varchar(64) NOT NULL,
|
792 |
+
`slideshow_title_background_color` varchar(64) NOT NULL,
|
793 |
+
`slideshow_title_padding` varchar(64) NOT NULL,
|
794 |
`slideshow_description_font_size` int(4) NOT NULL,
|
795 |
`slideshow_description_font` varchar(64) NOT NULL,
|
796 |
+
`slideshow_description_color` varchar(64) NOT NULL,
|
797 |
`slideshow_description_opacity` int(4) NOT NULL,
|
798 |
+
`slideshow_description_border_radius` varchar(64) NOT NULL,
|
799 |
+
`slideshow_description_background_color` varchar(64) NOT NULL,
|
800 |
+
`slideshow_description_padding` varchar(64) NOT NULL,
|
801 |
`slideshow_dots_width` int(4) NOT NULL,
|
802 |
`slideshow_dots_height` int(4) NOT NULL,
|
803 |
+
`slideshow_dots_border_radius` varchar(64) NOT NULL,
|
804 |
+
`slideshow_dots_background_color` varchar(64) NOT NULL,
|
805 |
`slideshow_dots_margin` int(4) NOT NULL,
|
806 |
+
`slideshow_dots_active_background_color` varchar(64) NOT NULL,
|
807 |
`slideshow_dots_active_border_width` int(4) NOT NULL,
|
808 |
+
`slideshow_dots_active_border_color` varchar(64) NOT NULL,
|
809 |
+
`slideshow_play_pause_btn_size` int(4) NOT NULL,
|
810 |
+
`slideshow_rl_btn_style` varchar(64) NOT NULL,
|
811 |
|
812 |
`blog_style_margin` varchar(128) NOT NULL,
|
813 |
`blog_style_padding` varchar(128) NOT NULL,
|
819 |
`blog_style_box_shadow` varchar(128) NOT NULL,
|
820 |
`blog_style_transparent` int(4) NOT NULL,
|
821 |
`blog_style_align` varchar(128) NOT NULL,
|
822 |
+
`blog_style_share_buttons_bg_color` varchar(128) NOT NULL,
|
823 |
`blog_style_share_buttons_margin` varchar(128) NOT NULL,
|
824 |
`blog_style_share_buttons_border_radius` varchar(128) NOT NULL,
|
825 |
`blog_style_share_buttons_border_width` int(4) NOT NULL,
|
972 |
'built_in_watermark_color' => 'FFFFFF',
|
973 |
'built_in_watermark_opacity' => 30,
|
974 |
|
975 |
+
'image_right_click' => 0,
|
976 |
+
'popup_fullscreen' => 0,
|
977 |
'gallery_role' => 0,
|
978 |
'album_role' => 0,
|
979 |
'image_role' => 0
|
1067 |
'%d',
|
1068 |
'%d',
|
1069 |
'%d',
|
1070 |
+
'%d',
|
1071 |
+
'%d',
|
1072 |
));
|
1073 |
}
|
1074 |
$exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
|
2389 |
'%d'
|
2390 |
));
|
2391 |
}
|
2392 |
+
$version = get_option("wd_bwg_version");
|
2393 |
+
$new_version = '1.1.10';
|
2394 |
+
if ($version && version_compare($version, $new_version, '<')) {
|
2395 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
2396 |
+
bwg_update($version);
|
2397 |
+
update_option("wd_bwg_version", $new_version);
|
|
|
|
|
|
|
|
|
|
|
2398 |
}
|
2399 |
else {
|
2400 |
+
add_option("wd_bwg_version", $new_version, '', 'no');
|
2401 |
add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
|
2402 |
}
|
2403 |
}
|
2449 |
}
|
2450 |
|
2451 |
function bwg_front_end_scripts() {
|
2452 |
+
$version = get_option("wd_bwg_version");
|
2453 |
global $wp_scripts;
|
2454 |
if (isset($wp_scripts->registered['jquery'])) {
|
2455 |
$jquery = $wp_scripts->registered['jquery'];
|
2460 |
}
|
2461 |
wp_enqueue_script('jquery');
|
2462 |
wp_enqueue_script('jquery-ui-tooltip');
|
2463 |
+
wp_enqueue_style('jquery-ui', WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css', array(), $version);
|
2464 |
|
2465 |
+
wp_enqueue_script('bwg_frontend', WD_BWG_URL . '/js/bwg_frontend.js', array(), $version);
|
2466 |
+
wp_enqueue_style('bwg_frontend', WD_BWG_URL . '/css/bwg_frontend.css', array(), $version);
|
2467 |
|
2468 |
// Styles/Scripts for popup.
|
2469 |
+
wp_enqueue_style('bwg_font-awesome', WD_BWG_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
2470 |
+
wp_enqueue_script('bwg_jquery_mobile', WD_BWG_URL . '/js/jquery.mobile.js', array(), $version);
|
2471 |
+
wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(), $version);
|
2472 |
+
wp_enqueue_style('bwg_mCustomScrollbar', WD_BWG_URL . '/css/jquery.mCustomScrollbar.css', array(), $version);
|
2473 |
wp_enqueue_script('jquery-fullscreen', WD_BWG_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
|
2474 |
+
wp_enqueue_script('bwg_gallery_box', WD_BWG_URL . '/js/bwg_gallery_box.js', array(), $version);
|
2475 |
wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
|
2476 |
'bwg_field_required' => __('field is required.', 'bwg'),
|
2477 |
'bwg_mail_validation' => __('This is not a valid email address.', 'bwg'),
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.8.
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,6 +12,8 @@ Photo Gallery is an advanced plugin with a list of tools and options for adding
|
|
12 |
|
13 |
== Description ==
|
14 |
|
|
|
|
|
15 |
### [WordPress Photo Gallery](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html)
|
16 |
|
17 |
Photo Gallery is an advanced plugin with a list of tools and options for adding and editing images for different views. It is fully responsive. The product includes plugin for adding image galleries and albums to posts and pages, as well as multiple widgets. You can add images, providing detailed descriptions and tags, organize the galleries into different albums.
|
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.8.2
|
7 |
+
Stable tag: 1.1.10
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
https://www.youtube.com/watch?v=4Mxg0FsFZZE&index=5&list=PLnxWPiY5tLFUsFI67acGEPAqoDMZqss5F
|
16 |
+
|
17 |
### [WordPress Photo Gallery](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html)
|
18 |
|
19 |
Photo Gallery is an advanced plugin with a list of tools and options for adding and editing images for different views. It is fully responsive. The product includes plugin for adding image galleries and albums to posts and pages, as well as multiple widgets. You can add images, providing detailed descriptions and tags, organize the galleries into different albums.
|
update/bwg_update.php
CHANGED
@@ -1,18 +1,26 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
function
|
4 |
global $wpdb;
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
return;
|
18 |
}
|
1 |
<?php
|
2 |
|
3 |
+
function bwg_update($version) {
|
4 |
global $wpdb;
|
5 |
+
if (version_compare($version, '1.0.1') == -1) {
|
6 |
+
// Add image title option.
|
7 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `image_title_show_hover` varchar(20) NOT NULL DEFAULT 'none' AFTER `image_enable_page`");
|
8 |
+
// Add image title theme options.
|
9 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_shadow` varchar(64) NOT NULL DEFAULT '0px 0px 0px #888888' AFTER `thumb_transition`");
|
10 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_margin` varchar(64) NOT NULL DEFAULT '2px' AFTER `thumb_transition`");
|
11 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_font_weight` varchar(64) NOT NULL DEFAULT 'bold' AFTER `thumb_transition`");
|
12 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_font_size` int(4) NOT NULL DEFAULT 16 AFTER `thumb_transition`");
|
13 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_font_style` varchar(64) NOT NULL DEFAULT 'segoe ui' AFTER `thumb_transition`");
|
14 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_font_color` varchar(64) NOT NULL DEFAULT 'CCCCCC' AFTER `thumb_transition`");
|
15 |
+
// Add thumb upload dimensions.
|
16 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `upload_thumb_height` int(4) NOT NULL DEFAULT 300 AFTER `thumb_height`");
|
17 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `upload_thumb_width` int(4) NOT NULL DEFAULT 300 AFTER `thumb_height`");
|
18 |
+
}
|
19 |
+
if (version_compare($version, '1.1.10') == -1) {
|
20 |
+
// Add image right click option.
|
21 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `image_right_click` tinyint(1) NOT NULL DEFAULT 0 AFTER `gallery_role`");
|
22 |
+
// Add popup fullscreen option
|
23 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `popup_fullscreen` tinyint(1) NOT NULL DEFAULT 0 AFTER `image_right_click`");
|
24 |
+
}
|
25 |
return;
|
26 |
}
|