Version Description
- Fixed: Options variable problem.
- Fixed: Vulnerable GET variable.
Download this release
Release Info
| Developer | webdorado |
| Plugin | |
| Version | 1.3.62 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.61 to 1.3.62
- admin/views/BWGViewBWGShortcode.php +1 -12
- admin/views/BWGViewWidget.php +47 -39
- admin/views/BWGViewWidgetSlideshow.php +25 -44
- framework/WDWLibrary.php +210 -233
- frontend/controllers/BWGControllerAlbum_compact_preview.php +2 -25
- frontend/controllers/BWGControllerThumbnails.php +1 -1
- frontend/views/BWGViewAlbum_compact_preview.php +86 -197
- frontend/views/BWGViewAlbum_extended_preview.php +130 -126
- frontend/views/BWGViewGalleryBox.php +1 -1
- frontend/views/BWGViewImage_browser.php +17 -68
- frontend/views/BWGViewSlideshow.php +47 -218
- frontend/views/BWGViewThumbnails.php +19 -134
- js/bwg_frontend.js +84 -86
- js/bwg_gallery_box.js +37 -44
- photo-gallery.php +3 -3
- readme.txt +5 -1
admin/views/BWGViewBWGShortcode.php
CHANGED
|
@@ -34,18 +34,7 @@ class BWGViewBWGShortcode {
|
|
| 34 |
'blindV' => __('Blind Vertical','bwg_back'),
|
| 35 |
'random' => __('Random','bwg_back'),
|
| 36 |
);
|
| 37 |
-
$watermark_fonts =
|
| 38 |
-
'arial' => 'Arial',
|
| 39 |
-
'Lucida grande' => 'Lucida grande',
|
| 40 |
-
'segoe ui' => 'Segoe ui',
|
| 41 |
-
'tahoma' => 'Tahoma',
|
| 42 |
-
'trebuchet ms' => 'Trebuchet ms',
|
| 43 |
-
'verdana' => 'Verdana',
|
| 44 |
-
'cursive' =>'Cursive',
|
| 45 |
-
'fantasy' => 'Fantasy',
|
| 46 |
-
'monospace' => 'Monospace',
|
| 47 |
-
'serif' => 'Serif',
|
| 48 |
-
);
|
| 49 |
$gallery_types_name = array(
|
| 50 |
'thumbnails' => __('Thumbnails', 'bwg_back'),
|
| 51 |
'thumbnails_masonry' => __('Masonry', 'bwg_back'),
|
| 34 |
'blindV' => __('Blind Vertical','bwg_back'),
|
| 35 |
'random' => __('Random','bwg_back'),
|
| 36 |
);
|
| 37 |
+
$watermark_fonts = WDWLibrary::get_fonts();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
$gallery_types_name = array(
|
| 39 |
'thumbnails' => __('Thumbnails', 'bwg_back'),
|
| 40 |
'thumbnails_masonry' => __('Masonry', 'bwg_back'),
|
admin/views/BWGViewWidget.php
CHANGED
|
@@ -1,68 +1,76 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
class BWGViewWidget {
|
| 4 |
-
|
| 5 |
-
// Events //
|
| 6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 8 |
-
// Constants //
|
| 9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 11 |
-
// Variables //
|
| 12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 13 |
private $model;
|
| 14 |
|
| 15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 16 |
-
// Constructor & Destructor //
|
| 17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 18 |
public function __construct($model) {
|
| 19 |
-
|
| 20 |
}
|
| 21 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 22 |
-
// Public Methods //
|
| 23 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 24 |
|
| 25 |
public function display() {
|
| 26 |
}
|
| 27 |
|
| 28 |
function widget($args, $instance) {
|
| 29 |
extract($args);
|
| 30 |
-
|
| 31 |
-
$
|
| 32 |
-
$
|
| 33 |
-
$
|
| 34 |
-
$
|
| 35 |
-
$
|
| 36 |
-
$
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
echo $before_widget;
|
| 41 |
// Title of widget.
|
| 42 |
if ($title) {
|
| 43 |
echo $before_title . $title . $after_title;
|
| 44 |
}
|
| 45 |
// Widget output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
if ($type == 'gallery') {
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
else {
|
| 51 |
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerAlbum_compact_preview.php');
|
| 52 |
$controller_class = 'BWGControllerAlbum_compact_preview';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
$controller = new $controller_class();
|
| 55 |
global $bwg;
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
'gallery_type' => $type,
|
| 59 |
-
'id' => ($type == 'gallery' ? $gallery_id : $album_id),
|
| 60 |
-
'show' => $show,
|
| 61 |
-
'count' => $count,
|
| 62 |
-
'width' => $width,
|
| 63 |
-
'height' => $height,
|
| 64 |
-
'theme_id' => $theme_id);
|
| 65 |
-
$controller->execute($params, 1, $bwg);
|
| 66 |
$bwg++;
|
| 67 |
// After widget.
|
| 68 |
echo $after_widget;
|
| 1 |
<?php
|
|
|
|
| 2 |
class BWGViewWidget {
|
| 3 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
private $model;
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
public function __construct($model) {
|
| 7 |
+
$this->model = $model;
|
| 8 |
}
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
public function display() {
|
| 11 |
}
|
| 12 |
|
| 13 |
function widget($args, $instance) {
|
| 14 |
extract($args);
|
| 15 |
+
global $wd_bwg_options;
|
| 16 |
+
$title = (!empty($instance['title']) ? $instance['title'] : "");
|
| 17 |
+
$type = (!empty($instance['type']) ? $instance['type'] : "gallery");
|
| 18 |
+
$gallery_id = (!empty($instance['gallery_id']) ? $instance['gallery_id'] : 0);
|
| 19 |
+
$album_id = (!empty($instance['album_id']) ? $instance['album_id'] : 0);
|
| 20 |
+
$theme_id = (!empty($instance['theme_id']) ? $instance['theme_id'] : 0);
|
| 21 |
+
$show = (!empty($instance['show']) ? $instance['show'] : "random");
|
| 22 |
+
$sort_by = 'order';
|
| 23 |
+
if ($show == 'random') {
|
| 24 |
+
$sort_by = 'RAND()';
|
| 25 |
+
}
|
| 26 |
+
$order_by = 'ASC';
|
| 27 |
+
if ($show == 'last') {
|
| 28 |
+
$order_by = 'DESC';
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
$count = (!empty($instance['count']) ? $instance['count'] : $wd_bwg_options->image_column_number);
|
| 32 |
+
$width = (!empty($instance['width']) ? $instance['width'] : $wd_bwg_options->thumb_width);
|
| 33 |
+
$height = (!empty($instance['height']) ? $instance['height'] : $wd_bwg_options->thumb_height);
|
| 34 |
+
|
| 35 |
+
// Before widget.
|
| 36 |
echo $before_widget;
|
| 37 |
// Title of widget.
|
| 38 |
if ($title) {
|
| 39 |
echo $before_title . $title . $after_title;
|
| 40 |
}
|
| 41 |
// Widget output.
|
| 42 |
+
$params = array (
|
| 43 |
+
'from' => 'widget',
|
| 44 |
+
'theme_id' => $theme_id,
|
| 45 |
+
'sort_by' => $sort_by,
|
| 46 |
+
'order_by' => $order_by
|
| 47 |
+
);
|
| 48 |
if ($type == 'gallery') {
|
| 49 |
+
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerThumbnails.php');
|
| 50 |
+
$controller_class = 'BWGControllerThumbnails';
|
| 51 |
+
$params['gallery_id'] = $gallery_id;
|
| 52 |
+
$params['thumb_width'] = $width;
|
| 53 |
+
$params['thumb_height'] = $height;
|
| 54 |
+
$params['image_column_number'] = $count;
|
| 55 |
+
$params['images_per_page'] = $count;
|
| 56 |
+
$params['gallery_type'] = 'thumbnails';
|
| 57 |
}
|
| 58 |
else {
|
| 59 |
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerAlbum_compact_preview.php');
|
| 60 |
$controller_class = 'BWGControllerAlbum_compact_preview';
|
| 61 |
+
$params['album_id'] = $album_id;
|
| 62 |
+
$params['compuct_albums_per_page'] = $count;
|
| 63 |
+
$params['compuct_album_thumb_width'] = $width;
|
| 64 |
+
$params['compuct_album_thumb_height'] = $height;
|
| 65 |
+
$params['compuct_album_image_thumb_width'] = $width;
|
| 66 |
+
$params['compuct_album_image_thumb_height'] = $height;
|
| 67 |
+
$params['compuct_album_view_type'] = 'thumbnail';
|
| 68 |
+
$params['gallery_type'] = 'album_compact_preview';
|
| 69 |
}
|
| 70 |
$controller = new $controller_class();
|
| 71 |
global $bwg;
|
| 72 |
+
$pairs = WDWLibrary::get_shortcode_option_params( $params );
|
| 73 |
+
$controller->execute($pairs, 1, $bwg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
$bwg++;
|
| 75 |
// After widget.
|
| 76 |
echo $after_widget;
|
admin/views/BWGViewWidgetSlideshow.php
CHANGED
|
@@ -1,48 +1,36 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
class BWGViewWidgetSlideshow {
|
| 4 |
-
|
| 5 |
-
// Events //
|
| 6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 8 |
-
// Constants //
|
| 9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 11 |
-
// Variables //
|
| 12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 13 |
private $model;
|
| 14 |
|
| 15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 16 |
-
// Constructor & Destructor //
|
| 17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 18 |
public function __construct($model) {
|
| 19 |
$this->model = $model;
|
| 20 |
}
|
| 21 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 22 |
-
// Public Methods //
|
| 23 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 24 |
|
| 25 |
-
public function display() {
|
| 26 |
-
}
|
| 27 |
|
| 28 |
function widget($args, $instance) {
|
| 29 |
extract($args);
|
|
|
|
| 30 |
$title = (isset($instance['title']) ? $instance['title'] : "");
|
| 31 |
$gallery_id = (isset($instance['gallery_id']) ? $instance['gallery_id'] : 0);
|
| 32 |
-
$width = (isset($instance['width']) ? $instance['width'] : 200);
|
| 33 |
-
$height = (isset($instance['height']) ? $instance['height'] : 200);
|
| 34 |
-
$effect = (isset($instance['effect']) ? $instance['effect'] : "fade");
|
| 35 |
-
$interval = (isset($instance['interval']) ? $instance['interval'] : 5);
|
| 36 |
-
$shuffle = (isset($instance['shuffle']) ? $instance['shuffle'] : 0);
|
| 37 |
$theme_id = (isset($instance['theme_id']) ? $instance['theme_id'] : 0);
|
| 38 |
-
$
|
| 39 |
-
$
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
echo $before_widget;
|
| 42 |
// Title of widget.
|
| 43 |
if ($title) {
|
| 44 |
echo $before_title . $title . $after_title;
|
| 45 |
}
|
|
|
|
| 46 |
// Widget output.
|
| 47 |
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
|
| 48 |
$controller_class = 'BWGControllerSlideshow';
|
|
@@ -52,15 +40,18 @@ class BWGViewWidgetSlideshow {
|
|
| 52 |
'from' => 'widget',
|
| 53 |
'gallery_type' => 'slideshow',
|
| 54 |
'gallery_id' => $gallery_id,
|
| 55 |
-
'width' => $width,
|
| 56 |
-
'height' => $height,
|
| 57 |
-
'effect' => $effect,
|
| 58 |
-
'interval' => $interval,
|
| 59 |
-
'shuffle' => $shuffle,
|
| 60 |
'theme_id' => $theme_id,
|
| 61 |
-
'
|
| 62 |
-
'
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
$bwg++;
|
| 65 |
// After widget.
|
| 66 |
echo $after_widget;
|
|
@@ -175,14 +166,4 @@ class BWGViewWidgetSlideshow {
|
|
| 175 |
</p>
|
| 176 |
<?php
|
| 177 |
}
|
| 178 |
-
|
| 179 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 180 |
-
// Getters & Setters //
|
| 181 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 182 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 183 |
-
// Private Methods //
|
| 184 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 185 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 186 |
-
// Listeners //
|
| 187 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 188 |
}
|
| 1 |
<?php
|
|
|
|
| 2 |
class BWGViewWidgetSlideshow {
|
| 3 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
private $model;
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
public function __construct($model) {
|
| 7 |
$this->model = $model;
|
| 8 |
}
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
public function display() {}
|
|
|
|
| 11 |
|
| 12 |
function widget($args, $instance) {
|
| 13 |
extract($args);
|
| 14 |
+
global $wd_bwg_options;
|
| 15 |
$title = (isset($instance['title']) ? $instance['title'] : "");
|
| 16 |
$gallery_id = (isset($instance['gallery_id']) ? $instance['gallery_id'] : 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
$theme_id = (isset($instance['theme_id']) ? $instance['theme_id'] : 0);
|
| 18 |
+
$width = (!empty($instance['width']) ? $instance['width'] : $wd_bwg_options->slideshow_width);
|
| 19 |
+
$height = (!empty($instance['height']) ? $instance['height'] : $wd_bwg_options->slideshow_height);
|
| 20 |
+
$filmstrip_height = (!empty($instance['filmstrip_height']) ? $instance['filmstrip_height'] : $wd_bwg_options->slideshow_filmstrip_height);
|
| 21 |
+
$slideshow_effect = (!empty($instance['effect']) ? $instance['effect'] : "fade");
|
| 22 |
+
$slideshow_interval = (!empty($instance['interval']) ? $instance['interval'] : $wd_bwg_options->slideshow_interval);
|
| 23 |
+
$enable_slideshow_shuffle = (isset($instance['shuffle']) ? $instance['shuffle'] : 0);
|
| 24 |
+
$enable_slideshow_autoplay = (isset($instance['enable_autoplay']) ? $instance['enable_autoplay'] : 0);
|
| 25 |
+
$enable_slideshow_ctrl = (isset($instance['enable_ctrl_btn']) ? $instance['enable_ctrl_btn'] : 0);
|
| 26 |
+
|
| 27 |
+
// Before widget.
|
| 28 |
echo $before_widget;
|
| 29 |
// Title of widget.
|
| 30 |
if ($title) {
|
| 31 |
echo $before_title . $title . $after_title;
|
| 32 |
}
|
| 33 |
+
|
| 34 |
// Widget output.
|
| 35 |
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
|
| 36 |
$controller_class = 'BWGControllerSlideshow';
|
| 40 |
'from' => 'widget',
|
| 41 |
'gallery_type' => 'slideshow',
|
| 42 |
'gallery_id' => $gallery_id,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
'theme_id' => $theme_id,
|
| 44 |
+
'slideshow_width' => $width,
|
| 45 |
+
'slideshow_height' => $height,
|
| 46 |
+
'slideshow_filmstrip_height' => $filmstrip_height,
|
| 47 |
+
'slideshow_effect' => $slideshow_effect,
|
| 48 |
+
'slideshow_interval' => $slideshow_interval,
|
| 49 |
+
'enable_slideshow_shuffle' => $enable_slideshow_shuffle,
|
| 50 |
+
'enable_slideshow_autoplay' => $enable_slideshow_autoplay,
|
| 51 |
+
'enable_slideshow_ctrl' => $enable_slideshow_ctrl,
|
| 52 |
+
);
|
| 53 |
+
$pairs = WDWLibrary::get_shortcode_option_params( $params );
|
| 54 |
+
$controller->execute($pairs, 1, $bwg);
|
| 55 |
$bwg++;
|
| 56 |
// After widget.
|
| 57 |
echo $after_widget;
|
| 166 |
</p>
|
| 167 |
<?php
|
| 168 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
}
|
framework/WDWLibrary.php
CHANGED
|
@@ -1645,8 +1645,13 @@ class WDWLibrary {
|
|
| 1645 |
$theme = self::get_theme_row_data(0);
|
| 1646 |
$type = (!empty($params['gallery_type'])) ? $params['gallery_type'] : 'thumbnails';
|
| 1647 |
$use_option_defaults = (isset($params['use_option_defaults']) && $params['use_option_defaults'] == 1) ? TRUE : FALSE;
|
|
|
|
| 1648 |
$everyone_option = array(
|
| 1649 |
'gallery_type' => $params['gallery_type'],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1650 |
'thumb_click_action' => (!$use_option_defaults && isset($params['thumb_click_action'])) ? $params['thumb_click_action'] : $wd_bwg_options->thumb_click_action,
|
| 1651 |
'thumb_link_target' => (!$use_option_defaults && isset($params['thumb_link_target'])) ? $params['thumb_link_target'] : $wd_bwg_options->thumb_link_target,
|
| 1652 |
'popup_fullscreen' => (!$use_option_defaults && isset($params['popup_fullscreen'])) ? $params['popup_fullscreen'] : $wd_bwg_options->popup_fullscreen,
|
|
@@ -1686,251 +1691,223 @@ class WDWLibrary {
|
|
| 1686 |
'ecommerce_icon' => (!$use_option_defaults && isset($params['ecommerce_icon'])) ? $params['ecommerce_icon'] : $wd_bwg_options->ecommerce_icon_show_hover,
|
| 1687 |
'show_search_box' => (!$use_option_defaults && isset($params['show_search_box'])) ? $params['show_search_box'] : $wd_bwg_options->show_search_box,
|
| 1688 |
'search_box_width' => (!$use_option_defaults && isset($params['search_box_width'])) ? $params['search_box_width'] : $wd_bwg_options->search_box_width,
|
| 1689 |
-
|
| 1690 |
-
|
|
|
|
|
|
|
|
|
|
| 1691 |
switch ( $type ) {
|
| 1692 |
-
|
| 1693 |
-
|
| 1694 |
-
|
| 1695 |
-
|
| 1696 |
-
|
| 1697 |
-
|
| 1698 |
-
|
| 1699 |
-
|
| 1700 |
-
|
| 1701 |
-
|
| 1702 |
-
|
| 1703 |
-
|
| 1704 |
-
|
| 1705 |
-
|
| 1706 |
-
|
| 1707 |
-
|
| 1708 |
-
|
| 1709 |
-
|
| 1710 |
-
|
| 1711 |
-
|
| 1712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1713 |
break;
|
| 1714 |
-
|
| 1715 |
-
|
| 1716 |
-
|
| 1717 |
-
|
| 1718 |
-
|
| 1719 |
-
|
| 1720 |
-
|
| 1721 |
-
|
| 1722 |
-
|
| 1723 |
-
|
| 1724 |
-
|
| 1725 |
-
|
| 1726 |
-
|
| 1727 |
-
|
| 1728 |
-
|
| 1729 |
-
'watermark_type' => (!$use_option_defaults && isset($params['watermark_type'])) ? $params['watermark_type'] : 'none',
|
| 1730 |
-
'load_more_image_count' => (!$use_option_defaults && isset($params['load_more_image_count'])) ? $params['load_more_image_count'] : 15,
|
| 1731 |
-
'show_tag_box' => (!$use_option_defaults && isset($params['show_tag_box'])) ? $params['show_tag_box'] : 0,
|
| 1732 |
-
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : 0,
|
| 1733 |
-
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : 0
|
| 1734 |
-
);
|
| 1735 |
-
}
|
| 1736 |
break;
|
| 1737 |
-
|
| 1738 |
-
|
| 1739 |
-
|
| 1740 |
-
|
| 1741 |
-
|
| 1742 |
-
|
| 1743 |
-
|
| 1744 |
-
|
| 1745 |
-
|
| 1746 |
-
|
| 1747 |
-
|
| 1748 |
-
|
| 1749 |
-
|
| 1750 |
-
|
| 1751 |
-
|
| 1752 |
-
|
| 1753 |
-
|
| 1754 |
-
|
| 1755 |
-
|
| 1756 |
-
|
| 1757 |
-
|
| 1758 |
-
|
| 1759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1760 |
break;
|
| 1761 |
-
|
| 1762 |
-
|
| 1763 |
-
|
| 1764 |
-
|
| 1765 |
-
|
| 1766 |
-
|
| 1767 |
-
|
| 1768 |
-
|
| 1769 |
-
|
| 1770 |
-
|
| 1771 |
-
|
| 1772 |
-
|
| 1773 |
-
|
| 1774 |
-
|
| 1775 |
-
|
| 1776 |
-
|
| 1777 |
-
|
| 1778 |
-
|
| 1779 |
-
|
| 1780 |
-
|
| 1781 |
-
|
| 1782 |
-
|
| 1783 |
-
|
| 1784 |
-
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : 0
|
| 1785 |
-
);
|
| 1786 |
-
}
|
| 1787 |
break;
|
| 1788 |
-
|
| 1789 |
-
|
| 1790 |
-
|
| 1791 |
-
|
| 1792 |
-
|
| 1793 |
-
|
| 1794 |
-
|
| 1795 |
-
|
| 1796 |
-
|
| 1797 |
-
|
| 1798 |
-
|
| 1799 |
-
|
| 1800 |
-
|
| 1801 |
-
|
| 1802 |
-
|
| 1803 |
-
|
| 1804 |
-
|
| 1805 |
-
|
| 1806 |
-
|
| 1807 |
-
}
|
| 1808 |
break;
|
| 1809 |
-
|
| 1810 |
-
|
| 1811 |
-
|
| 1812 |
-
|
| 1813 |
-
|
| 1814 |
-
|
| 1815 |
-
|
| 1816 |
-
|
| 1817 |
-
|
| 1818 |
-
|
| 1819 |
-
|
| 1820 |
-
|
| 1821 |
-
|
| 1822 |
-
|
| 1823 |
-
|
| 1824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1825 |
break;
|
| 1826 |
-
|
| 1827 |
-
|
| 1828 |
-
|
| 1829 |
-
|
| 1830 |
-
|
| 1831 |
-
|
| 1832 |
-
|
| 1833 |
-
|
| 1834 |
-
|
| 1835 |
-
|
| 1836 |
-
|
| 1837 |
-
|
| 1838 |
-
'compuct_album_thumb_width' => (!$use_option_defaults && isset($params['compuct_album_thumb_width'])) ? $params['compuct_album_thumb_width'] : $wd_bwg_options->album_thumb_width,
|
| 1839 |
-
'compuct_album_thumb_height' => (!$use_option_defaults && isset($params['compuct_album_thumb_height'])) ? $params['compuct_album_thumb_height'] : $wd_bwg_options->album_thumb_height,
|
| 1840 |
-
'compuct_album_image_column_number' => (!$use_option_defaults && isset($params['compuct_album_image_column_number'])) ? $params['compuct_album_image_column_number'] : $wd_bwg_options->image_column_number,
|
| 1841 |
-
'compuct_album_images_per_page' => (!$use_option_defaults && isset($params['compuct_album_images_per_page'])) ? $params['compuct_album_images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1842 |
-
'compuct_album_image_title' => (!$use_option_defaults && isset($params['compuct_album_image_title'])) ? $params['compuct_album_image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1843 |
-
'compuct_album_image_thumb_width' => (!$use_option_defaults && isset($params['compuct_album_image_thumb_width'])) ? $params['compuct_album_image_thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1844 |
-
'compuct_album_image_thumb_height' => (!$use_option_defaults && isset($params['compuct_album_image_thumb_height'])) ? $params['compuct_album_image_thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1845 |
-
'compuct_album_enable_page' => (!$use_option_defaults && isset($params['compuct_album_enable_page'])) ? $params['compuct_album_enable_page'] : $wd_bwg_options->album_enable_page,
|
| 1846 |
-
'compuct_album_load_more_image_count' => (!$use_option_defaults && isset($params['compuct_album_load_more_image_count'])) ? $params['compuct_album_load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1847 |
-
'compuct_albums_per_page_load_more' => (!$use_option_defaults && isset($params['compuct_albums_per_page_load_more'])) ? $params['compuct_albums_per_page_load_more'] : $wd_bwg_options->albums_per_page,
|
| 1848 |
-
'compuct_album_mosaic_hor_ver' => (!$use_option_defaults && isset($params['compuct_album_mosaic_hor_ver'])) ? $params['compuct_album_mosaic_hor_ver'] : $wd_bwg_options->mosaic,
|
| 1849 |
-
'compuct_album_resizable_mosaic' => (!$use_option_defaults && isset($params['compuct_album_resizable_mosaic'])) ? $params['compuct_album_resizable_mosaic'] : $wd_bwg_options->resizable_mosaic,
|
| 1850 |
-
'compuct_album_mosaic_total_width' => (!$use_option_defaults && isset($params['compuct_album_mosaic_total_width'])) ? $params['compuct_album_mosaic_total_width'] : $wd_bwg_options->mosaic_total_width,
|
| 1851 |
-
'show_tag_box' => (!$use_option_defaults && isset($params['show_tag_box'])) ? $params['show_tag_box'] : $wd_bwg_options->show_tag_box,
|
| 1852 |
-
'show_sort_images' => (!$use_option_defaults && isset($params['show_sort_images'])) ? $params['show_sort_images'] : $wd_bwg_options->show_sort_images,
|
| 1853 |
-
'show_album_name' => (!$use_option_defaults && isset($params['show_album_name'])) ? $params['show_album_name'] : $wd_bwg_options->show_album_name,
|
| 1854 |
-
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : $wd_bwg_options->show_gallery_description,
|
| 1855 |
-
);
|
| 1856 |
-
}
|
| 1857 |
break;
|
| 1858 |
-
|
| 1859 |
-
|
| 1860 |
-
|
| 1861 |
-
|
| 1862 |
-
|
| 1863 |
-
|
| 1864 |
-
|
| 1865 |
-
|
| 1866 |
-
|
| 1867 |
-
|
| 1868 |
-
|
| 1869 |
-
|
| 1870 |
-
|
| 1871 |
-
|
| 1872 |
-
|
| 1873 |
-
|
| 1874 |
-
'masonry_album_image_thumb_height' => (!$use_option_defaults && isset($params['masonry_album_image_thumb_height'])) ? $params['masonry_album_image_thumb_height'] : 120,
|
| 1875 |
-
'masonry_album_enable_page' => (!$use_option_defaults && isset($params['masonry_album_enable_page'])) ? $params['masonry_album_enable_page'] : 1,
|
| 1876 |
-
'watermark_type' => (!$use_option_defaults && isset($params['watermark_type'])) ? $params['watermark_type'] : 'none',
|
| 1877 |
-
'masonry_album_load_more_image_count' => (!$use_option_defaults && isset($params['masonry_album_load_more_image_count'])) ? $params['masonry_album_load_more_image_count'] : 15,
|
| 1878 |
-
'masonry_albums_per_page_load_more' => (!$use_option_defaults && isset($params['masonry_albums_per_page_load_more'])) ? $params['masonry_albums_per_page_load_more'] : 15,
|
| 1879 |
-
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : 0,
|
| 1880 |
-
'show_album_name' => (!$use_option_defaults && isset($params['show_album_name'])) ? $params['show_album_name'] : 0
|
| 1881 |
-
);
|
| 1882 |
-
}
|
| 1883 |
break;
|
| 1884 |
-
|
| 1885 |
-
|
| 1886 |
-
|
| 1887 |
-
|
| 1888 |
-
|
| 1889 |
-
|
| 1890 |
-
|
| 1891 |
-
|
| 1892 |
-
|
| 1893 |
-
|
| 1894 |
-
|
| 1895 |
-
|
| 1896 |
-
|
| 1897 |
-
|
| 1898 |
-
|
| 1899 |
-
|
| 1900 |
-
|
| 1901 |
-
|
| 1902 |
-
|
| 1903 |
-
|
| 1904 |
-
|
| 1905 |
-
|
| 1906 |
-
|
| 1907 |
-
|
| 1908 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1909 |
}
|
| 1910 |
-
|
| 1911 |
-
|
| 1912 |
-
$defaul = array(
|
| 1913 |
-
'gallery_id' => $params['gallery_id'],
|
| 1914 |
-
'theme_id' => (!$use_option_defaults && isset($params['theme_id'])) ? $params['theme_id'] : $theme->id,
|
| 1915 |
-
'sort_by' => (!$use_option_defaults && isset($params['sort_by'])) ? $params['sort_by'] : 'order',
|
| 1916 |
-
'order_by' => (!$use_option_defaults && isset($params['order_by'])) ? $params['order_by'] : 'asc',
|
| 1917 |
-
'show_search_box' => (!$use_option_defaults && isset($params['show_search_box'])) ? $params['show_search_box'] : 0,
|
| 1918 |
-
'search_box_width' => (!$use_option_defaults && isset($params['search_box_width'])) ? $params['search_box_width'] : 180,
|
| 1919 |
-
'blog_style_width' => (!$use_option_defaults && isset($params['blog_style_width'])) ? $params['blog_style_width'] : 800,
|
| 1920 |
-
'blog_style_title_enable' => (!$use_option_defaults && isset($params['blog_style_title_enable'])) ? $params['blog_style_title_enable'] : 1,
|
| 1921 |
-
'blog_style_images_per_page' => (!$use_option_defaults && isset($params['blog_style_images_per_page'])) ? $params['blog_style_images_per_page'] : 5,
|
| 1922 |
-
'blog_style_enable_page' => (!$use_option_defaults && isset($params['blog_style_enable_page'])) ? $params['blog_style_enable_page'] : 1,
|
| 1923 |
-
'watermark_type' => (!$use_option_defaults && isset($params['watermark_type'])) ? $params['watermark_type'] : 'none',
|
| 1924 |
-
'blog_style_load_more_image_count' => (!$use_option_defaults && isset($params['blog_style_load_more_image_count'])) ? $params['blog_style_load_more_image_count'] : 5,
|
| 1925 |
-
'blog_style_description_enable' => (!$use_option_defaults && isset($params['blog_style_description_enable'])) ? $params['blog_style_description_enable'] : 0,
|
| 1926 |
-
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : 0,
|
| 1927 |
-
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : 0
|
| 1928 |
-
);
|
| 1929 |
}
|
| 1930 |
-
break;
|
| 1931 |
}
|
| 1932 |
-
$defauls = array_merge($defaul, $everyone_option);
|
| 1933 |
-
return $defauls;
|
| 1934 |
}
|
| 1935 |
}
|
| 1936 |
|
| 1645 |
$theme = self::get_theme_row_data(0);
|
| 1646 |
$type = (!empty($params['gallery_type'])) ? $params['gallery_type'] : 'thumbnails';
|
| 1647 |
$use_option_defaults = (isset($params['use_option_defaults']) && $params['use_option_defaults'] == 1) ? TRUE : FALSE;
|
| 1648 |
+
|
| 1649 |
$everyone_option = array(
|
| 1650 |
'gallery_type' => $params['gallery_type'],
|
| 1651 |
+
'tag' => (!$use_option_defaults && isset($params['tag'])) ? $params['tag'] : 0,
|
| 1652 |
+
'theme_id' => (!$use_option_defaults && isset($params['theme_id'])) ? $params['theme_id'] : $theme->id,
|
| 1653 |
+
'sort_by' => (!$use_option_defaults && isset($params['sort_by'])) ? $params['sort_by'] : 'order',
|
| 1654 |
+
'order_by' => (!$use_option_defaults && isset($params['order_by'])) ? $params['order_by'] : 'asc',
|
| 1655 |
'thumb_click_action' => (!$use_option_defaults && isset($params['thumb_click_action'])) ? $params['thumb_click_action'] : $wd_bwg_options->thumb_click_action,
|
| 1656 |
'thumb_link_target' => (!$use_option_defaults && isset($params['thumb_link_target'])) ? $params['thumb_link_target'] : $wd_bwg_options->thumb_link_target,
|
| 1657 |
'popup_fullscreen' => (!$use_option_defaults && isset($params['popup_fullscreen'])) ? $params['popup_fullscreen'] : $wd_bwg_options->popup_fullscreen,
|
| 1691 |
'ecommerce_icon' => (!$use_option_defaults && isset($params['ecommerce_icon'])) ? $params['ecommerce_icon'] : $wd_bwg_options->ecommerce_icon_show_hover,
|
| 1692 |
'show_search_box' => (!$use_option_defaults && isset($params['show_search_box'])) ? $params['show_search_box'] : $wd_bwg_options->show_search_box,
|
| 1693 |
'search_box_width' => (!$use_option_defaults && isset($params['search_box_width'])) ? $params['search_box_width'] : $wd_bwg_options->search_box_width,
|
| 1694 |
+
'show_tag_box' => (!$use_option_defaults && isset($params['show_tag_box'])) ? $params['show_tag_box'] : $wd_bwg_options->show_tag_box,
|
| 1695 |
+
'show_sort_images' => (!$use_option_defaults && isset($params['show_sort_images'])) ? $params['show_sort_images'] : $wd_bwg_options->show_sort_images,
|
| 1696 |
+
'show_gallery_description' => (!$use_option_defaults && isset($params['show_gallery_description'])) ? $params['show_gallery_description'] : $wd_bwg_options->show_gallery_description,
|
| 1697 |
+
);
|
| 1698 |
+
$default = array();
|
| 1699 |
switch ( $type ) {
|
| 1700 |
+
case 'thumbnails' : {
|
| 1701 |
+
$default = array(
|
| 1702 |
+
'gallery_id' => $params['gallery_id'],
|
| 1703 |
+
'gal_title' => isset($params['gal_title']) ? $params['gal_title'] : '',
|
| 1704 |
+
'image_title' => (!$use_option_defaults && isset($params['image_title'])) ? $params['image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1705 |
+
'load_more_image_count' => (!$use_option_defaults && isset($params['load_more_image_count'])) ? $params['load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1706 |
+
'image_column_number' => (!$use_option_defaults && isset($params['image_column_number'])) ? $params['image_column_number'] : $wd_bwg_options->image_column_number,
|
| 1707 |
+
'image_enable_page' => (!$use_option_defaults && isset($params['image_enable_page'])) ? $params['image_enable_page'] : $wd_bwg_options->image_enable_page,
|
| 1708 |
+
'images_per_page' => (!$use_option_defaults && isset($params['images_per_page'])) ? $params['images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1709 |
+
'thumb_width' => (!$use_option_defaults && isset($params['thumb_width'])) ? $params['thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1710 |
+
'thumb_height' => (!$use_option_defaults && isset($params['thumb_height'])) ? $params['thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1711 |
+
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : $wd_bwg_options->showthumbs_name,
|
| 1712 |
+
);
|
| 1713 |
+
}
|
| 1714 |
+
break;
|
| 1715 |
+
case 'thumbnails_masonry': {
|
| 1716 |
+
$default = array(
|
| 1717 |
+
'gallery_id' => $params['gallery_id'],
|
| 1718 |
+
'masonry_hor_ver' => (!$use_option_defaults && isset($params['masonry_hor_ver'])) ? $params['masonry_hor_ver'] : 'vertical',
|
| 1719 |
+
'load_more_image_count' => (!$use_option_defaults && isset($params['load_more_image_count'])) ? $params['load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1720 |
+
'image_column_number' => (!$use_option_defaults && isset($params['image_column_number'])) ? $params['image_column_number'] : $wd_bwg_options->image_column_number,
|
| 1721 |
+
'image_enable_page' => (!$use_option_defaults && isset($params['image_enable_page'])) ? $params['image_enable_page'] : $wd_bwg_options->image_enable_page,
|
| 1722 |
+
'images_per_page' => (!$use_option_defaults && isset($params['images_per_page'])) ? $params['images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1723 |
+
'thumb_width' => (!$use_option_defaults && isset($params['thumb_width'])) ? $params['thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1724 |
+
'thumb_height' => (!$use_option_defaults && isset($params['thumb_height'])) ? $params['thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1725 |
+
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : $wd_bwg_options->showthumbs_name,
|
| 1726 |
+
);
|
| 1727 |
+
}
|
| 1728 |
break;
|
| 1729 |
+
case 'thumbnails_mosaic': {
|
| 1730 |
+
$default = array(
|
| 1731 |
+
'gallery_id' => $params['gallery_id'],
|
| 1732 |
+
'mosaic_hor_ver' => (!$use_option_defaults && isset($params['mosaic_hor_ver'])) ? $params['mosaic_hor_ver'] : $wd_bwg_options->mosaic,
|
| 1733 |
+
'image_title' => (!$use_option_defaults && isset($params['image_title'])) ? $params['image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1734 |
+
'load_more_image_count' => (!$use_option_defaults && isset($params['load_more_image_count'])) ? $params['load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1735 |
+
'images_per_page' => (!$use_option_defaults && isset($params['images_per_page'])) ? $params['images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1736 |
+
'image_enable_page' => (!$use_option_defaults && isset($params['image_enable_page'])) ? $params['image_enable_page'] : $wd_bwg_options->image_enable_page,
|
| 1737 |
+
'resizable_mosaic' => (!$use_option_defaults && isset($params['resizable_mosaic'])) ? $params['resizable_mosaic'] : $wd_bwg_options->image_enable_page,
|
| 1738 |
+
'mosaic_total_width' => (!$use_option_defaults && isset($params['mosaic_total_width'])) ? $params['mosaic_total_width'] : $wd_bwg_options->mosaic_total_width,
|
| 1739 |
+
'thumb_width' => (!$use_option_defaults && isset($params['thumb_width'])) ? $params['thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1740 |
+
'thumb_height' => (!$use_option_defaults && isset($params['thumb_height'])) ? $params['thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1741 |
+
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : $wd_bwg_options->showthumbs_name,
|
| 1742 |
+
);
|
| 1743 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1744 |
break;
|
| 1745 |
+
case 'slideshow': {
|
| 1746 |
+
$default = array(
|
| 1747 |
+
'gallery_id' => $params['gallery_id'],
|
| 1748 |
+
'slideshow_effect' => (!$use_option_defaults && isset($params['slideshow_effect'])) ? $params['slideshow_effect'] : $wd_bwg_options->slideshow_type,
|
| 1749 |
+
'slideshow_interval' => (!$use_option_defaults && isset($params['slideshow_interval'])) ? $params['slideshow_interval'] : $wd_bwg_options->slideshow_interval,
|
| 1750 |
+
'slideshow_width' => (!$use_option_defaults && isset($params['slideshow_width'])) ? $params['slideshow_width'] : $wd_bwg_options->slideshow_width,
|
| 1751 |
+
'slideshow_height' => (!$use_option_defaults && isset($params['slideshow_height'])) ? $params['slideshow_height'] : $wd_bwg_options->slideshow_height,
|
| 1752 |
+
'thumb_width' => (!$use_option_defaults && isset($params['thumb_width'])) ? $params['thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1753 |
+
'thumb_height' => (!$use_option_defaults && isset($params['thumb_height'])) ? $params['thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1754 |
+
'enable_slideshow_autoplay' => (!$use_option_defaults && isset($params['enable_slideshow_autoplay'])) ? $params['enable_slideshow_autoplay'] : $wd_bwg_options->slideshow_enable_autoplay,
|
| 1755 |
+
'enable_slideshow_shuffle' => (!$use_option_defaults && isset($params['enable_slideshow_shuffle'])) ? $params['enable_slideshow_shuffle'] : $wd_bwg_options->slideshow_enable_shuffle,
|
| 1756 |
+
'enable_slideshow_ctrl' => (!$use_option_defaults && isset($params['enable_slideshow_ctrl'])) ? $params['enable_slideshow_ctrl'] : $wd_bwg_options->slideshow_enable_ctrl,
|
| 1757 |
+
'enable_slideshow_filmstrip' => (!$use_option_defaults && isset($params['enable_slideshow_filmstrip'])) ? $params['enable_slideshow_filmstrip'] : $wd_bwg_options->slideshow_enable_filmstrip,
|
| 1758 |
+
'slideshow_filmstrip_height' => (!$use_option_defaults && isset($params['slideshow_filmstrip_height'])) ? $params['slideshow_filmstrip_height'] : $wd_bwg_options->slideshow_filmstrip_height,
|
| 1759 |
+
'slideshow_enable_title' => (!$use_option_defaults && isset($params['slideshow_enable_title'])) ? $params['slideshow_enable_title'] : $wd_bwg_options->slideshow_enable_title,
|
| 1760 |
+
'slideshow_title_full_width' => (!$use_option_defaults && isset($params['slideshow_title_full_width'])) ? $params['slideshow_title_full_width'] : $wd_bwg_options->slideshow_title_full_width,
|
| 1761 |
+
'slideshow_title_position' => (!$use_option_defaults && isset($params['slideshow_title_position'])) ? $params['slideshow_title_position'] : $wd_bwg_options->slideshow_title_position,
|
| 1762 |
+
'slideshow_enable_description' => (!$use_option_defaults && isset($params['slideshow_enable_description'])) ? $params['slideshow_enable_description'] : $wd_bwg_options->slideshow_enable_description,
|
| 1763 |
+
'slideshow_description_position' => (!$use_option_defaults && isset($params['slideshow_description_position'])) ? $params['slideshow_description_position'] : $wd_bwg_options->slideshow_description_position,
|
| 1764 |
+
'enable_slideshow_music' => (!$use_option_defaults && isset($params['enable_slideshow_music'])) ? $params['enable_slideshow_music'] : $wd_bwg_options->slideshow_enable_music,
|
| 1765 |
+
'slideshow_music_url' => (!$use_option_defaults && isset($params['slideshow_music_url'])) ? $params['slideshow_music_url'] : $wd_bwg_options->slideshow_audio_url,
|
| 1766 |
+
'slideshow_effect_duration' => (!$use_option_defaults && isset($params['slideshow_effect_duration'])) ? $params['slideshow_effect_duration'] : $wd_bwg_options->slideshow_effect_duration,
|
| 1767 |
+
);
|
| 1768 |
+
}
|
| 1769 |
+
break;
|
| 1770 |
+
case 'image_browser': {
|
| 1771 |
+
$default = array(
|
| 1772 |
+
'gallery_id' => $params['gallery_id'],
|
| 1773 |
+
'image_browser_width' => (!$use_option_defaults && isset($params['image_browser_width'])) ? $params['image_browser_width'] : $wd_bwg_options->image_browser_width,
|
| 1774 |
+
'image_browser_title_enable' => (!$use_option_defaults && isset($params['image_browser_title_enable'])) ? $params['image_browser_title_enable'] : $wd_bwg_options->image_browser_title_enable,
|
| 1775 |
+
'image_browser_description_enable' => (!$use_option_defaults && isset($params['image_browser_description_enable'])) ? $params['image_browser_description_enable'] : $wd_bwg_options->image_browser_description_enable,
|
| 1776 |
+
);
|
| 1777 |
+
}
|
| 1778 |
break;
|
| 1779 |
+
case 'album_compact_preview': {
|
| 1780 |
+
$default = array(
|
| 1781 |
+
'album_id' => $params['album_id'],
|
| 1782 |
+
'compuct_album_column_number' => (!$use_option_defaults && isset($params['compuct_album_column_number'])) ? $params['compuct_album_column_number'] : $wd_bwg_options->album_column_number,
|
| 1783 |
+
'compuct_albums_per_page' => (!$use_option_defaults && isset($params['compuct_albums_per_page'])) ? $params['compuct_albums_per_page'] : $wd_bwg_options->albums_per_page,
|
| 1784 |
+
'compuct_album_title' => (!$use_option_defaults && isset($params['compuct_album_title'])) ? $params['compuct_album_title'] : $wd_bwg_options->album_title_show_hover,
|
| 1785 |
+
'compuct_album_view_type' => (!$use_option_defaults && isset($params['compuct_album_view_type'])) ? $params['compuct_album_view_type'] : $wd_bwg_options->album_view_type,
|
| 1786 |
+
'compuct_album_thumb_width' => (!$use_option_defaults && isset($params['compuct_album_thumb_width'])) ? $params['compuct_album_thumb_width'] : $wd_bwg_options->album_thumb_width,
|
| 1787 |
+
'compuct_album_thumb_height' => (!$use_option_defaults && isset($params['compuct_album_thumb_height'])) ? $params['compuct_album_thumb_height'] : $wd_bwg_options->album_thumb_height,
|
| 1788 |
+
'compuct_album_image_column_number' => (!$use_option_defaults && isset($params['compuct_album_image_column_number'])) ? $params['compuct_album_image_column_number'] : $wd_bwg_options->image_column_number,
|
| 1789 |
+
'compuct_album_images_per_page' => (!$use_option_defaults && isset($params['compuct_album_images_per_page'])) ? $params['compuct_album_images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1790 |
+
'compuct_album_image_title' => (!$use_option_defaults && isset($params['compuct_album_image_title'])) ? $params['compuct_album_image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1791 |
+
'compuct_album_image_thumb_width' => (!$use_option_defaults && isset($params['compuct_album_image_thumb_width'])) ? $params['compuct_album_image_thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1792 |
+
'compuct_album_image_thumb_height' => (!$use_option_defaults && isset($params['compuct_album_image_thumb_height'])) ? $params['compuct_album_image_thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1793 |
+
'compuct_album_enable_page' => (!$use_option_defaults && isset($params['compuct_album_enable_page'])) ? $params['compuct_album_enable_page'] : $wd_bwg_options->album_enable_page,
|
| 1794 |
+
'compuct_album_load_more_image_count' => (!$use_option_defaults && isset($params['compuct_album_load_more_image_count'])) ? $params['compuct_album_load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1795 |
+
'compuct_albums_per_page_load_more' => (!$use_option_defaults && isset($params['compuct_albums_per_page_load_more'])) ? $params['compuct_albums_per_page_load_more'] : $wd_bwg_options->albums_per_page,
|
| 1796 |
+
'compuct_album_mosaic_hor_ver' => (!$use_option_defaults && isset($params['compuct_album_mosaic_hor_ver'])) ? $params['compuct_album_mosaic_hor_ver'] : $wd_bwg_options->mosaic,
|
| 1797 |
+
'compuct_album_resizable_mosaic' => (!$use_option_defaults && isset($params['compuct_album_resizable_mosaic'])) ? $params['compuct_album_resizable_mosaic'] : $wd_bwg_options->resizable_mosaic,
|
| 1798 |
+
'compuct_album_mosaic_total_width' => (!$use_option_defaults && isset($params['compuct_album_mosaic_total_width'])) ? $params['compuct_album_mosaic_total_width'] : $wd_bwg_options->mosaic_total_width,
|
| 1799 |
+
'show_album_name' => (!$use_option_defaults && isset($params['show_album_name'])) ? $params['show_album_name'] : $wd_bwg_options->show_album_name,
|
| 1800 |
+
);
|
| 1801 |
+
}
|
|
|
|
|
|
|
|
|
|
| 1802 |
break;
|
| 1803 |
+
case 'album_masonry_preview': {
|
| 1804 |
+
$default = array(
|
| 1805 |
+
'album_id' => $params['album_id'],
|
| 1806 |
+
'masonry_album_column_number' => (!$use_option_defaults && isset($params['masonry_album_column_number'])) ? $params['masonry_album_column_number'] : $wd_bwg_options->album_column_number,
|
| 1807 |
+
'masonry_albums_per_page' => (!$use_option_defaults && isset($params['masonry_albums_per_page'])) ? $params['masonry_albums_per_page'] : $wd_bwg_options->albums_per_page,
|
| 1808 |
+
'masonry_album_title' => (!$use_option_defaults && isset($params['masonry_album_title'])) ? $params['masonry_album_title'] : $wd_bwg_options->album_title_show_hover,
|
| 1809 |
+
'masonry_album_thumb_width' => (!$use_option_defaults && isset($params['masonry_album_thumb_width'])) ? $params['masonry_album_thumb_width'] : $wd_bwg_options->album_thumb_width,
|
| 1810 |
+
'masonry_album_thumb_height' => (!$use_option_defaults && isset($params['masonry_album_thumb_height'])) ? $params['masonry_album_thumb_height'] : $wd_bwg_options->album_thumb_height,
|
| 1811 |
+
'masonry_album_image_column_number' => (!$use_option_defaults && isset($params['masonry_album_image_column_number'])) ? $params['masonry_album_image_column_number'] : $wd_bwg_options->image_column_number,
|
| 1812 |
+
'masonry_album_images_per_page' => (!$use_option_defaults && isset($params['masonry_album_images_per_page'])) ? $params['masonry_album_images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1813 |
+
'masonry_album_image_title' => (!$use_option_defaults && isset($params['masonry_album_image_title'])) ? $params['masonry_album_image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1814 |
+
'masonry_album_image_thumb_width' => (!$use_option_defaults && isset($params['masonry_album_image_thumb_width'])) ? $params['masonry_album_image_thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1815 |
+
'masonry_album_image_thumb_height' => (!$use_option_defaults && isset($params['masonry_album_image_thumb_height'])) ? $params['masonry_album_image_thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1816 |
+
'masonry_album_enable_page' => (!$use_option_defaults && isset($params['masonry_album_enable_page'])) ? $params['masonry_album_enable_page'] : $wd_bwg_options->show_album_name,
|
| 1817 |
+
'masonry_album_load_more_image_count' => (!$use_option_defaults && isset($params['masonry_album_load_more_image_count'])) ? $params['masonry_album_load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1818 |
+
'masonry_albums_per_page_load_more' => (!$use_option_defaults && isset($params['masonry_albums_per_page_load_more'])) ? $params['masonry_albums_per_page_load_more'] : $wd_bwg_options->albums_per_page,
|
| 1819 |
+
'show_album_name' => (!$use_option_defaults && isset($params['show_album_name'])) ? $params['show_album_name'] : $wd_bwg_options->show_album_name,
|
| 1820 |
+
);
|
| 1821 |
+
}
|
|
|
|
| 1822 |
break;
|
| 1823 |
+
case 'album_extended_preview': {
|
| 1824 |
+
$default = array(
|
| 1825 |
+
'album_id' => $params['album_id'],
|
| 1826 |
+
'extended_album_image_column_number' => (!$use_option_defaults && isset($params['extended_album_image_column_number'])) ? $params['extended_album_image_column_number'] : $wd_bwg_options->album_column_number,
|
| 1827 |
+
'extended_album_images_per_page' => (!$use_option_defaults && isset($params['extended_album_images_per_page'])) ? $params['extended_album_images_per_page'] : $wd_bwg_options->images_per_page,
|
| 1828 |
+
'extended_albums_per_page' => (!$use_option_defaults && isset($params['extended_albums_per_page'])) ? $params['extended_albums_per_page'] : $wd_bwg_options->albums_per_page,
|
| 1829 |
+
'extended_album_height' => (!$use_option_defaults && isset($params['extended_album_height'])) ? $params['extended_album_height'] : $wd_bwg_options->extended_album_height,
|
| 1830 |
+
'extended_album_description_enable' => (!$use_option_defaults && isset($params['extended_album_description_enable'])) ? $params['extended_album_description_enable'] : $wd_bwg_options->extended_album_description_enable,
|
| 1831 |
+
'extended_album_view_type' => (!$use_option_defaults && isset($params['extended_album_view_type'])) ? $params['extended_album_view_type'] : $wd_bwg_options->album_view_type,
|
| 1832 |
+
'extended_album_thumb_width' => (!$use_option_defaults && isset($params['extended_album_thumb_width'])) ? $params['extended_album_thumb_width'] : $wd_bwg_options->album_thumb_width,
|
| 1833 |
+
'extended_album_thumb_height' => (!$use_option_defaults && isset($params['extended_album_thumb_height'])) ? $params['extended_album_thumb_height'] : $wd_bwg_options->album_thumb_height,
|
| 1834 |
+
'extended_album_image_title' => (!$use_option_defaults && isset($params['extended_album_image_title'])) ? $params['extended_album_image_title'] : $wd_bwg_options->image_title_show_hover,
|
| 1835 |
+
'extended_album_image_thumb_width' => (!$use_option_defaults && isset($params['extended_album_image_thumb_width'])) ? $params['extended_album_image_thumb_width'] : $wd_bwg_options->thumb_width,
|
| 1836 |
+
'extended_album_image_thumb_height' => (!$use_option_defaults && isset($params['extended_album_image_thumb_height'])) ? $params['extended_album_image_thumb_height'] : $wd_bwg_options->thumb_height,
|
| 1837 |
+
'extended_album_enable_page' => (!$use_option_defaults && isset($params['extended_album_enable_page'])) ? $params['extended_album_enable_page'] : $wd_bwg_options->show_album_name,
|
| 1838 |
+
'extended_album_load_more_image_count' => (!$use_option_defaults && isset($params['extended_album_load_more_image_count'])) ? $params['extended_album_load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1839 |
+
'extended_albums_per_page_load_more' => (!$use_option_defaults && isset($params['extended_albums_per_page_load_more'])) ? $params['extended_albums_per_page_load_more'] : $wd_bwg_options->albums_per_page,
|
| 1840 |
+
'show_album_name' => (!$use_option_defaults && isset($params['show_album_name'])) ? $params['show_album_name'] : $wd_bwg_options->show_album_name,
|
| 1841 |
+
);
|
| 1842 |
+
}
|
| 1843 |
break;
|
| 1844 |
+
case 'blog_style': {
|
| 1845 |
+
$default = array(
|
| 1846 |
+
'gallery_id' => $params['gallery_id'],
|
| 1847 |
+
'blog_style_width' => (!$use_option_defaults && isset($params['blog_style_width'])) ? $params['blog_style_width'] : $wd_bwg_options->image_browser_width,
|
| 1848 |
+
'blog_style_title_enable' => (!$use_option_defaults && isset($params['blog_style_title_enable'])) ? $params['blog_style_title_enable'] : $wd_bwg_options->blog_style_title_enable,
|
| 1849 |
+
'blog_style_images_per_page' => (!$use_option_defaults && isset($params['blog_style_images_per_page'])) ? $params['blog_style_images_per_page'] : $wd_bwg_options->blog_style_images_per_page,
|
| 1850 |
+
'blog_style_enable_page' => (!$use_option_defaults && isset($params['blog_style_enable_page'])) ? $params['blog_style_enable_page'] : $wd_bwg_options->blog_style_enable_page,
|
| 1851 |
+
'blog_style_load_more_image_count' => (!$use_option_defaults && isset($params['blog_style_load_more_image_count'])) ? $params['blog_style_load_more_image_count'] : $wd_bwg_options->images_per_page,
|
| 1852 |
+
'blog_style_description_enable' => (!$use_option_defaults && isset($params['blog_style_description_enable'])) ? $params['blog_style_description_enable'] : $wd_bwg_options->blog_style_description_enable,
|
| 1853 |
+
'showthumbs_name' => (!$use_option_defaults && isset($params['showthumbs_name'])) ? $params['showthumbs_name'] : $wd_bwg_options->showthumbs_name,
|
| 1854 |
+
);
|
| 1855 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1856 |
break;
|
| 1857 |
+
case 'carousel': {
|
| 1858 |
+
$default = array(
|
| 1859 |
+
'gallery_id' => $params['gallery_id'],
|
| 1860 |
+
'carousel_interval' => (!$use_option_defaults && isset($params['carousel_interval'])) ? $params['carousel_interval'] : $wd_bwg_options->carousel_interval,
|
| 1861 |
+
'carousel_width' => (!$use_option_defaults && isset($params['carousel_width'])) ? $params['carousel_width'] : $wd_bwg_options->carousel_width,
|
| 1862 |
+
'carousel_height' => (!$use_option_defaults && isset($params['carousel_height'])) ? $params['carousel_height'] : $wd_bwg_options->carousel_height,
|
| 1863 |
+
'carousel_image_column_number' => (!$use_option_defaults && isset($params['carousel_image_column_number'])) ? $params['carousel_image_column_number'] : $wd_bwg_options->carousel_image_column_number,
|
| 1864 |
+
'carousel_image_par' => (!$use_option_defaults && isset($params['carousel_image_par'])) ? $params['carousel_image_par'] : $wd_bwg_options->carousel_image_par,
|
| 1865 |
+
'carousel_enable_title' => (!$use_option_defaults && isset($params['carousel_enable_title'])) ? $params['carousel_enable_title'] : $wd_bwg_options->carousel_enable_title,
|
| 1866 |
+
'carousel_enable_autoplay' => (!$use_option_defaults && isset($params['carousel_enable_autoplay'])) ? $params['carousel_enable_autoplay'] : $wd_bwg_options->carousel_enable_autoplay,
|
| 1867 |
+
'carousel_r_width' => (!$use_option_defaults && isset($params['carousel_r_width'])) ? $params['carousel_r_width'] : $wd_bwg_options->carousel_r_width,
|
| 1868 |
+
'carousel_fit_containerWidth' => (!$use_option_defaults && isset($params['carousel_fit_containerWidth'])) ? $params['carousel_fit_containerWidth'] : $wd_bwg_options->carousel_fit_containerWidth,
|
| 1869 |
+
'carousel_prev_next_butt' => (!$use_option_defaults && isset($params['carousel_prev_next_butt'])) ? $params['carousel_prev_next_butt'] : $wd_bwg_options->carousel_prev_next_butt,
|
| 1870 |
+
'carousel_play_pause_butt' => (!$use_option_defaults && isset($params['carousel_play_pause_butt'])) ? $params['carousel_play_pause_butt'] : $wd_bwg_options->carousel_play_pause_butt,
|
| 1871 |
+
);
|
| 1872 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1873 |
break;
|
| 1874 |
+
}
|
| 1875 |
+
|
| 1876 |
+
$defaults = array_merge($default, $everyone_option);
|
| 1877 |
+
$defaults_merge = array_merge($params, $defaults);
|
| 1878 |
+
return $defaults_merge;
|
| 1879 |
+
}
|
| 1880 |
+
|
| 1881 |
+
/**
|
| 1882 |
+
* Get font families.
|
| 1883 |
+
*
|
| 1884 |
+
* @return array
|
| 1885 |
+
*/
|
| 1886 |
+
public function get_fonts($font = FALSE) {
|
| 1887 |
+
$fonts = array(
|
| 1888 |
+
'arial' => 'Arial',
|
| 1889 |
+
'Lucida grande' => 'Lucida grande',
|
| 1890 |
+
'segoe ui' => 'Segoe ui',
|
| 1891 |
+
'tahoma' => 'Tahoma',
|
| 1892 |
+
'trebuchet ms' => 'Trebuchet ms',
|
| 1893 |
+
'verdana' => 'Verdana',
|
| 1894 |
+
'cursive' =>'Cursive',
|
| 1895 |
+
'fantasy' => 'Fantasy',
|
| 1896 |
+
'monospace' => 'Monospace',
|
| 1897 |
+
'serif' => 'Serif',
|
| 1898 |
+
);
|
| 1899 |
+
|
| 1900 |
+
if ( $font === FALSE ) {
|
| 1901 |
+
return $fonts;
|
| 1902 |
+
}
|
| 1903 |
+
else {
|
| 1904 |
+
if ( in_array($font, $fonts ) ) {
|
| 1905 |
+
return $font;
|
| 1906 |
}
|
| 1907 |
+
else {
|
| 1908 |
+
return 'arial';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1909 |
}
|
|
|
|
| 1910 |
}
|
|
|
|
|
|
|
| 1911 |
}
|
| 1912 |
}
|
| 1913 |
|
frontend/controllers/BWGControllerAlbum_compact_preview.php
CHANGED
|
@@ -1,23 +1,9 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
class BWGControllerAlbum_compact_preview {
|
| 4 |
-
|
| 5 |
-
// Events //
|
| 6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 8 |
-
// Constants //
|
| 9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 11 |
-
// Variables //
|
| 12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 14 |
-
// Constructor & Destructor //
|
| 15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 16 |
public function __construct() {
|
| 17 |
}
|
| 18 |
-
|
| 19 |
-
// Public Methods //
|
| 20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 21 |
public function execute($params = array(), $from_shortcode = 0, $bwg = 0) {
|
| 22 |
$this->display($params, $from_shortcode, $bwg);
|
| 23 |
}
|
|
@@ -31,13 +17,4 @@ class BWGControllerAlbum_compact_preview {
|
|
| 31 |
|
| 32 |
$view->display($params, $from_shortcode, $bwg);
|
| 33 |
}
|
| 34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 35 |
-
// Getters & Setters //
|
| 36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 38 |
-
// Private Methods //
|
| 39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 41 |
-
// Listeners //
|
| 42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 43 |
}
|
| 1 |
<?php
|
|
|
|
| 2 |
class BWGControllerAlbum_compact_preview {
|
| 3 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
public function __construct() {
|
| 5 |
}
|
| 6 |
+
|
|
|
|
|
|
|
| 7 |
public function execute($params = array(), $from_shortcode = 0, $bwg = 0) {
|
| 8 |
$this->display($params, $from_shortcode, $bwg);
|
| 9 |
}
|
| 17 |
|
| 18 |
$view->display($params, $from_shortcode, $bwg);
|
| 19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
frontend/controllers/BWGControllerThumbnails.php
CHANGED
|
@@ -5,7 +5,7 @@ class BWGControllerThumbnails {
|
|
| 5 |
}
|
| 6 |
|
| 7 |
public function execute($params = array(), $from_shortcode = 0, $bwg = 0) {
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 5 |
}
|
| 6 |
|
| 7 |
public function execute($params = array(), $from_shortcode = 0, $bwg = 0) {
|
| 8 |
+
$this->display($params, $from_shortcode, $bwg);
|
| 9 |
}
|
| 10 |
|
| 11 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
|
@@ -2,157 +2,48 @@
|
|
| 2 |
class BWGViewAlbum_compact_preview {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
|
|
|
| 5 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
}
|
| 13 |
-
else {
|
| 14 |
-
$album_view_type = $params['compuct_album_view_type'];
|
| 15 |
-
}
|
| 16 |
-
if (!isset($params['popup_fullscreen'])) {
|
| 17 |
-
$params['popup_fullscreen'] = 0;
|
| 18 |
-
}
|
| 19 |
-
if (!isset($params['popup_autoplay'])) {
|
| 20 |
-
$params['popup_autoplay'] = 0;
|
| 21 |
-
}
|
| 22 |
-
if (!isset($params['popup_enable_pinterest'])) {
|
| 23 |
-
$params['popup_enable_pinterest'] = 0;
|
| 24 |
-
}
|
| 25 |
-
if (!isset($params['popup_enable_tumblr'])) {
|
| 26 |
-
$params['popup_enable_tumblr'] = 0;
|
| 27 |
-
}
|
| 28 |
-
if (!isset($params['show_search_box'])) {
|
| 29 |
-
$params['show_search_box'] = 0;
|
| 30 |
-
}
|
| 31 |
-
if (!isset($params['search_box_width'])) {
|
| 32 |
-
$params['search_box_width'] = 180;
|
| 33 |
-
}
|
| 34 |
-
if (!isset($params['popup_enable_info'])) {
|
| 35 |
-
$params['popup_enable_info'] = 1;
|
| 36 |
-
}
|
| 37 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 38 |
-
$params['popup_info_always_show'] = 0;
|
| 39 |
-
}
|
| 40 |
-
if (!isset($params['popup_info_full_width'])) {
|
| 41 |
-
$params['popup_info_full_width'] = 0;
|
| 42 |
-
}
|
| 43 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 44 |
-
$params['popup_enable_rate'] = 0;
|
| 45 |
-
}
|
| 46 |
-
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 47 |
-
$params['thumb_click_action'] = 'open_lightbox';
|
| 48 |
-
}
|
| 49 |
-
if (!isset($params['thumb_link_target'])) {
|
| 50 |
-
$params['thumb_link_target'] = 1;
|
| 51 |
-
}
|
| 52 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 53 |
-
$params['popup_hit_counter'] = 0;
|
| 54 |
-
}
|
| 55 |
-
if (!isset($params['order_by'])) {
|
| 56 |
-
$params['order_by'] = 'ASC';
|
| 57 |
-
}
|
| 58 |
-
if (!isset($params['show_sort_images'])) {
|
| 59 |
-
$params['show_sort_images'] = 0;
|
| 60 |
-
}
|
| 61 |
-
if (!isset($params['compuct_album_enable_page'])) {
|
| 62 |
-
$params['compuct_album_enable_page'] = 1;
|
| 63 |
-
}
|
| 64 |
-
if (!isset($params['show_tag_box'])) {
|
| 65 |
-
$params['show_tag_box'] = 0;
|
| 66 |
-
}
|
| 67 |
-
if (!isset($params['show_gallery_description'])) {
|
| 68 |
-
$params['show_gallery_description'] = 0;
|
| 69 |
-
}
|
| 70 |
-
global $wd_bwg_options;
|
| 71 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
}
|
| 75 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
| 76 |
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
|
| 77 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
| 78 |
-
$
|
| 79 |
-
|
| 80 |
-
$play_icon = $wd_bwg_options->play_icon;
|
| 81 |
-
if ($from === "widget") {
|
| 82 |
-
$params['album_id'] = $params['id'];
|
| 83 |
-
$params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
|
| 84 |
-
if ($params['show'] == 'last') {
|
| 85 |
-
$sort_direction = 'DESC';
|
| 86 |
-
}
|
| 87 |
-
$params['compuct_albums_per_page'] = $params['count'];
|
| 88 |
-
$params['compuct_album_column_number'] = $wd_bwg_options->album_column_number;
|
| 89 |
-
$params['compuct_album_image_column_number'] = $wd_bwg_options->image_column_number;
|
| 90 |
-
$params['compuct_album_thumb_width'] = $params['width'];
|
| 91 |
-
$params['compuct_album_thumb_height'] = $params['height'];
|
| 92 |
-
$params['compuct_album_image_thumb_width'] = $params['width'];
|
| 93 |
-
$params['compuct_album_image_thumb_height'] = $params['height'];
|
| 94 |
-
$params['compuct_album_title'] = $wd_bwg_options->album_title_show_hover;
|
| 95 |
-
$params['compuct_album_enable_page'] = 0;
|
| 96 |
-
$params['compuct_album_image_title'] = $wd_bwg_options->image_title_show_hover;
|
| 97 |
-
$params['popup_width'] = $wd_bwg_options->popup_width;
|
| 98 |
-
$params['popup_height'] = $wd_bwg_options->popup_height;
|
| 99 |
-
$params['popup_effect'] = $wd_bwg_options->popup_type;
|
| 100 |
-
$params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
|
| 101 |
-
$params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
|
| 102 |
-
$params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
|
| 103 |
-
$params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
|
| 104 |
-
$params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
|
| 105 |
-
$params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
|
| 106 |
-
$params['popup_info_full_width'] = $wd_bwg_options->popup_info_full_width;
|
| 107 |
-
$params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
|
| 108 |
-
$params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
|
| 109 |
-
$params['popup_interval'] = $wd_bwg_options->popup_interval;
|
| 110 |
-
$params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
|
| 111 |
-
$params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
|
| 112 |
-
$params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
|
| 113 |
-
$params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
|
| 114 |
-
$params['popup_enable_pinterest'] = $wd_bwg_options->popup_enable_pinterest;
|
| 115 |
-
$params['popup_enable_tumblr'] = $wd_bwg_options->popup_enable_tumblr;
|
| 116 |
-
$params['watermark_type'] = $wd_bwg_options->watermark_type;
|
| 117 |
-
$params['watermark_link'] = urlencode($wd_bwg_options->watermark_link);
|
| 118 |
-
$params['watermark_opacity'] = $wd_bwg_options->watermark_opacity;
|
| 119 |
-
$params['watermark_position'] = $wd_bwg_options->watermark_position;
|
| 120 |
-
$params['watermark_text'] = $wd_bwg_options->watermark_text;
|
| 121 |
-
$params['watermark_font_size'] = $wd_bwg_options->watermark_font_size;
|
| 122 |
-
$params['watermark_font'] = $wd_bwg_options->watermark_font;
|
| 123 |
-
$params['watermark_color'] = $wd_bwg_options->watermark_color;
|
| 124 |
-
$params['watermark_url'] = urlencode($wd_bwg_options->watermark_url);
|
| 125 |
-
$params['watermark_width'] = $wd_bwg_options->watermark_width;
|
| 126 |
-
$params['watermark_height'] = $wd_bwg_options->watermark_height;
|
| 127 |
-
$params['popup_effect_duration'] = isset($wd_bwg_options->popup_effect_duration) ? $wd_bwg_options->popup_effect_duration : 1;
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
| 131 |
if (!$theme_row) {
|
| 132 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 133 |
return;
|
| 134 |
}
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
|
|
|
|
|
|
| 156 |
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
| 157 |
$album_row = WDWLibrary::get_album_row_data($album_gallery_id, FALSE);
|
| 158 |
if (!$album_gallery_id || ($type == 'album' && !$album_row)) {
|
|
@@ -160,64 +51,63 @@ class BWGViewAlbum_compact_preview {
|
|
| 160 |
return;
|
| 161 |
}
|
| 162 |
if ($type == 'gallery') {
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
}
|
| 190 |
else {
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
$album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
|
| 204 |
}
|
| 205 |
|
| 206 |
if ($type == 'gallery' ) {
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
else {
|
| 219 |
-
|
| 220 |
-
|
| 221 |
}
|
| 222 |
|
| 223 |
$bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
|
|
@@ -234,8 +124,8 @@ class BWGViewAlbum_compact_preview {
|
|
| 234 |
'image_width' => $params['popup_width'],
|
| 235 |
'image_height' => $params['popup_height'],
|
| 236 |
'image_effect' => $params['popup_effect'],
|
| 237 |
-
'wd_sor' => $
|
| 238 |
-
'wd_ord' => $
|
| 239 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 240 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 241 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
|
@@ -253,7 +143,7 @@ class BWGViewAlbum_compact_preview {
|
|
| 253 |
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
| 254 |
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
| 255 |
'watermark_type' => $params['watermark_type'],
|
| 256 |
-
'slideshow_effect_duration' =>
|
| 257 |
);
|
| 258 |
if ($params['watermark_type'] != 'none') {
|
| 259 |
$params_array['watermark_link'] = $params['watermark_link'];
|
|
@@ -273,7 +163,6 @@ class BWGViewAlbum_compact_preview {
|
|
| 273 |
}
|
| 274 |
$params_array_hash = $params_array;
|
| 275 |
$tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
|
| 276 |
-
$image_right_click = $wd_bwg_options->image_right_click;
|
| 277 |
|
| 278 |
$inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type);
|
| 279 |
if ($wd_bwg_options->use_inline_stiles_and_scripts) {
|
| 2 |
class BWGViewAlbum_compact_preview {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
| 5 |
+
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
|
| 8 |
+
$theme_id = $params['theme_id'];
|
| 9 |
+
$order_by = $params['order_by'];
|
| 10 |
+
$sort_by = $params['sort_by'];
|
| 11 |
+
$album_view_type = $params['compuct_album_view_type'];
|
| 12 |
+
$image_right_click = isset($wd_bwg_options->image_right_click) ? $wd_bwg_options->image_right_click : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 14 |
+
$play_icon = isset($wd_bwg_options->play_icon) ? $wd_bwg_options->play_icon : 0;
|
| 15 |
+
|
|
|
|
| 16 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
| 17 |
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
|
| 18 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
| 19 |
+
$theme_row = WDWLibrary::get_theme_row_data($theme_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
if (!$theme_row) {
|
| 21 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 22 |
return;
|
| 23 |
}
|
| 24 |
+
|
| 25 |
+
if (!isset($theme_row->album_extended_gal_title_font_color)) {
|
| 26 |
+
$theme_row->album_extended_gal_title_font_color = 'CCCCCC';
|
| 27 |
+
}
|
| 28 |
+
if (!isset($theme_row->album_extended_gal_title_font_style)) {
|
| 29 |
+
$theme_row->album_extended_gal_title_font_style = 'segoe ui';
|
| 30 |
+
}
|
| 31 |
+
if (!isset($theme_row->album_extended_gal_title_font_size)) {
|
| 32 |
+
$theme_row->album_extended_gal_title_font_size = 16;
|
| 33 |
+
}
|
| 34 |
+
if (!isset($theme_row->album_extended_gal_title_font_weight)) {
|
| 35 |
+
$theme_row->album_extended_gal_title_font_weight = 'bold';
|
| 36 |
+
}
|
| 37 |
+
if (!isset($theme_row->album_extended_gal_title_margin)) {
|
| 38 |
+
$theme_row->album_extended_gal_title_margin = '2px';
|
| 39 |
+
}
|
| 40 |
+
if (!isset($theme_row->album_extended_gal_title_shadow)) {
|
| 41 |
+
$theme_row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
|
| 42 |
+
}
|
| 43 |
+
if (!isset($theme_row->album_extended_gal_title_align)) {
|
| 44 |
+
$theme_row->album_extended_gal_title_align = 'center';
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
| 48 |
$album_row = WDWLibrary::get_album_row_data($album_gallery_id, FALSE);
|
| 49 |
if (!$album_gallery_id || ($type == 'album' && !$album_row)) {
|
| 51 |
return;
|
| 52 |
}
|
| 53 |
if ($type == 'gallery') {
|
| 54 |
+
$items_per_page = $params['compuct_album_images_per_page'];
|
| 55 |
+
$items_per_page_arr = array('images_per_page' => $params['compuct_album_images_per_page'], 'load_more_image_count' => $params['compuct_album_images_per_page']);
|
| 56 |
+
$items_col_num = $params['compuct_album_image_column_number'];
|
| 57 |
+
if (isset($_POST['sortImagesByValue_' . $bwg])) {
|
| 58 |
+
$sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
|
| 59 |
+
if ($sort_by == 'random') {
|
| 60 |
+
$params['sort_by'] = 'RAND()';
|
| 61 |
+
}
|
| 62 |
+
else if ($sort_by == 'default') {
|
| 63 |
+
$params['sort_by'] = $params['sort_by'];
|
| 64 |
+
}
|
| 65 |
+
else {
|
| 66 |
+
$params['sort_by'] = $sort_by;
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
$image_rows = WDWLibrary::get_image_rows_data($album_gallery_id, $bwg, 'album_compact', 'bwg_tag_id_bwg_album_compact_' . $bwg, '', $items_per_page, $params['compuct_album_images_per_page'], $params['sort_by'], $order_by);
|
| 71 |
+
$gallery_row = WDWLibrary::get_gallery_row_data($album_gallery_id, ($from === "widget" ? "compact" : ""));
|
| 72 |
+
$page_nav = $image_rows['page_nav'];
|
| 73 |
+
$image_rows = $image_rows['images'];
|
| 74 |
+
$images_count = count($image_rows);
|
| 75 |
+
if (!$images_count) {
|
| 76 |
+
echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
|
| 77 |
+
}
|
| 78 |
+
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
| 79 |
+
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
| 80 |
}
|
| 81 |
else {
|
| 82 |
+
$items_per_page = $params['compuct_albums_per_page'];
|
| 83 |
+
$items_per_page_arr = array('images_per_page' => $params['compuct_albums_per_page'], 'load_more_image_count' => $params['compuct_albums_per_page']);
|
| 84 |
+
$items_col_num = $params['compuct_album_column_number'];
|
| 85 |
+
$album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, $sort_by, $bwg, $order_by);
|
| 86 |
+
$page_nav = $album_galleries_row['page_nav'];
|
| 87 |
+
$album_galleries_row = $album_galleries_row['rows'];
|
| 88 |
+
if (!$album_galleries_row) {
|
| 89 |
+
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'wd_error');
|
| 90 |
+
return;
|
| 91 |
+
}
|
| 92 |
+
$album_gallery_div_id = 'bwg_album_compact_' . $bwg;
|
| 93 |
+
$album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
if ($type == 'gallery' ) {
|
| 97 |
+
if($album_view_type == 'masonry') {
|
| 98 |
+
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->masonry_thumb_align . '; width:100%;';
|
| 99 |
+
$form_child_div_id = 'bwg_masonry_thumbnails_div_' . $bwg;
|
| 100 |
+
$album_gallery_div_id = 'bwg_masonry_thumbnails_' . $bwg;
|
| 101 |
+
$album_gallery_div_class = 'bwg_masonry_thumbnails_' . $bwg;
|
| 102 |
+
}
|
| 103 |
+
else {
|
| 104 |
+
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->thumb_align . '; width:100%;';
|
| 105 |
+
$form_child_div_id = '';
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
else {
|
| 109 |
+
$form_child_div_id = '';
|
| 110 |
+
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->album_compact_thumb_align . '; width:100%;';
|
| 111 |
}
|
| 112 |
|
| 113 |
$bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
|
| 124 |
'image_width' => $params['popup_width'],
|
| 125 |
'image_height' => $params['popup_height'],
|
| 126 |
'image_effect' => $params['popup_effect'],
|
| 127 |
+
'wd_sor' => $sort_by,
|
| 128 |
+
'wd_ord' => $order_by,
|
| 129 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 130 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 131 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
| 143 |
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
| 144 |
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
| 145 |
'watermark_type' => $params['watermark_type'],
|
| 146 |
+
'slideshow_effect_duration' => $params['popup_effect_duration']
|
| 147 |
);
|
| 148 |
if ($params['watermark_type'] != 'none') {
|
| 149 |
$params_array['watermark_link'] = $params['watermark_link'];
|
| 163 |
}
|
| 164 |
$params_array_hash = $params_array;
|
| 165 |
$tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
|
|
|
|
| 166 |
|
| 167 |
$inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type);
|
| 168 |
if ($wd_bwg_options->use_inline_stiles_and_scripts) {
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
|
@@ -2,104 +2,108 @@
|
|
| 2 |
class BWGViewAlbum_extended_preview {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
| 5 |
-
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 6 |
global $wd_bwg_options;
|
|
|
|
|
|
|
| 7 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 8 |
-
$play_icon = $wd_bwg_options->play_icon;
|
| 9 |
|
| 10 |
-
if (!isset($params['extended_album_image_title'])) {
|
| 11 |
-
$params['extended_album_image_title'] = 'none';
|
| 12 |
-
}
|
| 13 |
-
if (!isset($params['extended_album_view_type'])) {
|
| 14 |
-
$album_view_type = 'thumbnail';
|
| 15 |
-
}
|
| 16 |
-
else {
|
| 17 |
-
|
| 18 |
-
}
|
| 19 |
-
if (!isset($params['popup_fullscreen'])) {
|
| 20 |
-
$params['popup_fullscreen'] = 0;
|
| 21 |
-
}
|
| 22 |
-
if (!isset($params['popup_autoplay'])) {
|
| 23 |
-
$params['popup_autoplay'] = 0;
|
| 24 |
-
}
|
| 25 |
-
if (!isset($params['popup_enable_pinterest'])) {
|
| 26 |
-
$params['popup_enable_pinterest'] = 0;
|
| 27 |
-
}
|
| 28 |
-
if (!isset($params['popup_enable_tumblr'])) {
|
| 29 |
-
$params['popup_enable_tumblr'] = 0;
|
| 30 |
-
}
|
| 31 |
-
if (!isset($params['show_search_box'])) {
|
| 32 |
-
$params['show_search_box'] = 0;
|
| 33 |
-
}
|
| 34 |
-
if (!isset($params['search_box_width'])) {
|
| 35 |
-
$params['search_box_width'] = 180;
|
| 36 |
-
}
|
| 37 |
-
if (!isset($params['popup_enable_info'])) {
|
| 38 |
-
$params['popup_enable_info'] = 1;
|
| 39 |
-
}
|
| 40 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 41 |
-
$params['popup_info_always_show'] = 0;
|
| 42 |
-
}
|
| 43 |
-
if (!isset($params['popup_info_full_width'])) {
|
| 44 |
-
$params['popup_info_full_width'] = 0;
|
| 45 |
-
}
|
| 46 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 47 |
-
$params['popup_enable_rate'] = 0;
|
| 48 |
-
}
|
| 49 |
-
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 50 |
-
$params['thumb_click_action'] = 'open_lightbox';
|
| 51 |
-
}
|
| 52 |
-
if (!isset($params['thumb_link_target'])) {
|
| 53 |
-
$params['thumb_link_target'] = 1;
|
| 54 |
-
}
|
| 55 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 56 |
-
$params['popup_hit_counter'] = 0;
|
| 57 |
-
}
|
| 58 |
-
if (!isset($params['order_by'])) {
|
| 59 |
-
$params['order_by'] = 'ASC';
|
| 60 |
-
}
|
| 61 |
-
if (!isset($params['show_sort_images'])) {
|
| 62 |
-
$params['show_sort_images'] = 0;
|
| 63 |
-
}
|
| 64 |
-
if (!isset($params['show_tag_box'])) {
|
| 65 |
-
$params['show_tag_box'] = 0;
|
| 66 |
-
}
|
| 67 |
-
if (!isset($params['extended_album_enable_page'])) {
|
| 68 |
-
$params['extended_album_enable_page'] = 1;
|
| 69 |
-
}
|
| 70 |
-
if (!isset($params['show_gallery_description'])) {
|
| 71 |
-
$params['show_gallery_description'] = 0;
|
| 72 |
-
}
|
| 73 |
-
if (!isset($params['show_album_name'])) {
|
| 74 |
-
$params['show_album_name'] = $wd_bwg_options->show_album_name;
|
| 75 |
-
}
|
| 76 |
-
$
|
|
|
|
| 77 |
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
| 78 |
if (!$theme_row) {
|
| 79 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 80 |
return;
|
| 81 |
}
|
|
|
|
| 82 |
if (!isset($theme_row->album_extended_gal_title_font_color)) {
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
|
|
|
| 103 |
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : 'album');
|
| 104 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
| 105 |
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
|
@@ -108,44 +112,44 @@ class BWGViewAlbum_extended_preview {
|
|
| 108 |
return;
|
| 109 |
}
|
| 110 |
if ($type == 'gallery') {
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
}
|
| 136 |
else {
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
}
|
| 150 |
|
| 151 |
if ($type == 'gallery' ) {
|
|
@@ -523,7 +527,7 @@ class BWGViewAlbum_extended_preview {
|
|
| 523 |
}
|
| 524 |
?>
|
| 525 |
<script>
|
| 526 |
-
jQuery(".bwg_description_more_<?php echo $bwg; ?>").click
|
| 527 |
if (jQuery(this).hasClass("bwg_more")) {
|
| 528 |
jQuery(this).parent().find(".bwg_description_full_<?php echo $bwg; ?>").show();
|
| 529 |
jQuery(this).attr("class", "bwg_description_more_<?php echo $bwg; ?> bwg_hide");
|
| 2 |
class BWGViewAlbum_extended_preview {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
|
|
|
| 5 |
global $wd_bwg_options;
|
| 6 |
+
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
+
|
| 8 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 9 |
+
$play_icon = isset($wd_bwg_options->play_icon) ? $wd_bwg_options->play_icon : 0;
|
| 10 |
|
| 11 |
+
// if (!isset($params['extended_album_image_title'])) {
|
| 12 |
+
// $params['extended_album_image_title'] = 'none';
|
| 13 |
+
// }
|
| 14 |
+
// if (!isset($params['extended_album_view_type'])) {
|
| 15 |
+
// $album_view_type = 'thumbnail';
|
| 16 |
+
// }
|
| 17 |
+
// else {
|
| 18 |
+
//
|
| 19 |
+
// }
|
| 20 |
+
// if (!isset($params['popup_fullscreen'])) {
|
| 21 |
+
// $params['popup_fullscreen'] = 0;
|
| 22 |
+
// }
|
| 23 |
+
// if (!isset($params['popup_autoplay'])) {
|
| 24 |
+
// $params['popup_autoplay'] = 0;
|
| 25 |
+
// }
|
| 26 |
+
// if (!isset($params['popup_enable_pinterest'])) {
|
| 27 |
+
// $params['popup_enable_pinterest'] = 0;
|
| 28 |
+
// }
|
| 29 |
+
// if (!isset($params['popup_enable_tumblr'])) {
|
| 30 |
+
// $params['popup_enable_tumblr'] = 0;
|
| 31 |
+
// }
|
| 32 |
+
// if (!isset($params['show_search_box'])) {
|
| 33 |
+
// $params['show_search_box'] = 0;
|
| 34 |
+
// }
|
| 35 |
+
// if (!isset($params['search_box_width'])) {
|
| 36 |
+
// $params['search_box_width'] = 180;
|
| 37 |
+
// }
|
| 38 |
+
// if (!isset($params['popup_enable_info'])) {
|
| 39 |
+
// $params['popup_enable_info'] = 1;
|
| 40 |
+
// }
|
| 41 |
+
// if (!isset($params['popup_info_always_show'])) {
|
| 42 |
+
// $params['popup_info_always_show'] = 0;
|
| 43 |
+
// }
|
| 44 |
+
// if (!isset($params['popup_info_full_width'])) {
|
| 45 |
+
// $params['popup_info_full_width'] = 0;
|
| 46 |
+
// }
|
| 47 |
+
// if (!isset($params['popup_enable_rate'])) {
|
| 48 |
+
// $params['popup_enable_rate'] = 0;
|
| 49 |
+
// }
|
| 50 |
+
// if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 51 |
+
// $params['thumb_click_action'] = 'open_lightbox';
|
| 52 |
+
// }
|
| 53 |
+
// if (!isset($params['thumb_link_target'])) {
|
| 54 |
+
// $params['thumb_link_target'] = 1;
|
| 55 |
+
// }
|
| 56 |
+
// if (!isset($params['popup_hit_counter'])) {
|
| 57 |
+
// $params['popup_hit_counter'] = 0;
|
| 58 |
+
// }
|
| 59 |
+
// if (!isset($params['order_by'])) {
|
| 60 |
+
// $params['order_by'] = 'ASC';
|
| 61 |
+
// }
|
| 62 |
+
// if (!isset($params['show_sort_images'])) {
|
| 63 |
+
// $params['show_sort_images'] = 0;
|
| 64 |
+
// }
|
| 65 |
+
// if (!isset($params['show_tag_box'])) {
|
| 66 |
+
// $params['show_tag_box'] = 0;
|
| 67 |
+
// }
|
| 68 |
+
// if (!isset($params['extended_album_enable_page'])) {
|
| 69 |
+
// $params['extended_album_enable_page'] = 1;
|
| 70 |
+
// }
|
| 71 |
+
// if (!isset($params['show_gallery_description'])) {
|
| 72 |
+
// $params['show_gallery_description'] = 0;
|
| 73 |
+
// }
|
| 74 |
+
// if (!isset($params['show_album_name'])) {
|
| 75 |
+
// $params['show_album_name'] = $wd_bwg_options->show_album_name;
|
| 76 |
+
// }
|
| 77 |
+
// $order_by = $params['order_by'];
|
| 78 |
+
$album_view_type = $params['extended_album_view_type'];
|
| 79 |
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
| 80 |
if (!$theme_row) {
|
| 81 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 82 |
return;
|
| 83 |
}
|
| 84 |
+
|
| 85 |
if (!isset($theme_row->album_extended_gal_title_font_color)) {
|
| 86 |
+
$theme_row->album_extended_gal_title_font_color = 'CCCCCC';
|
| 87 |
+
}
|
| 88 |
+
if (!isset($theme_row->album_extended_gal_title_font_style)) {
|
| 89 |
+
$theme_row->album_extended_gal_title_font_style = 'segoe ui';
|
| 90 |
+
}
|
| 91 |
+
if (!isset($theme_row->album_extended_gal_title_font_size)) {
|
| 92 |
+
$theme_row->album_extended_gal_title_font_size = 16;
|
| 93 |
+
}
|
| 94 |
+
if (!isset($theme_row->album_extended_gal_title_font_weight)) {
|
| 95 |
+
$theme_row->album_extended_gal_title_font_weight = 'bold';
|
| 96 |
+
}
|
| 97 |
+
if (!isset($theme_row->album_extended_gal_title_margin)) {
|
| 98 |
+
$theme_row->album_extended_gal_title_margin = '2px';
|
| 99 |
+
}
|
| 100 |
+
if (!isset($theme_row->album_extended_gal_title_shadow)) {
|
| 101 |
+
$theme_row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
|
| 102 |
+
}
|
| 103 |
+
if (!isset($theme_row->album_extended_gal_title_align)) {
|
| 104 |
+
$theme_row->album_extended_gal_title_align = 'center';
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : 'album');
|
| 108 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
| 109 |
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
| 112 |
return;
|
| 113 |
}
|
| 114 |
if ($type == 'gallery') {
|
| 115 |
+
$items_per_page = $params['extended_album_images_per_page'];
|
| 116 |
+
$items_per_page_arr = array('images_per_page' => $params['extended_album_images_per_page'], 'load_more_image_count' => $params['extended_album_images_per_page']);
|
| 117 |
+
$items_col_num = $params['extended_album_image_column_number'];
|
| 118 |
+
if (isset($_POST['sortImagesByValue_' . $bwg])) {
|
| 119 |
+
$sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
|
| 120 |
+
if ($sort_by == 'random') {
|
| 121 |
+
$params['sort_by'] = 'RAND()';
|
| 122 |
+
}
|
| 123 |
+
else if ($sort_by == 'default') {
|
| 124 |
+
$params['sort_by'] = $params['sort_by'];
|
| 125 |
+
}
|
| 126 |
+
else {
|
| 127 |
+
$params['sort_by'] = $sort_by;
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
$image_rows = WDWLibrary::get_image_rows_data($album_gallery_id, $bwg, 'album_extended', 'bwg_tag_id_bwg_album_extended_' . $bwg, '', $items_per_page, $params['extended_album_images_per_page'], $params['sort_by'], $params['order_by']);
|
| 131 |
+
$page_nav = $image_rows['page_nav'];
|
| 132 |
+
$image_rows = $image_rows['images'];
|
| 133 |
+
$images_count = count($image_rows);
|
| 134 |
+
if (!$images_count) {
|
| 135 |
+
echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
|
| 136 |
+
}
|
| 137 |
+
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
| 138 |
+
$album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
|
| 139 |
}
|
| 140 |
else {
|
| 141 |
+
$items_per_page = $params['extended_albums_per_page'];
|
| 142 |
+
$items_per_page_arr = array('images_per_page' => $params['extended_albums_per_page'], 'load_more_image_count' => $params['extended_albums_per_page']);
|
| 143 |
+
$items_col_num = 1;
|
| 144 |
+
$album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, 'ASC');
|
| 145 |
+
$page_nav = $album_galleries_row['page_nav'];
|
| 146 |
+
$album_galleries_row = $album_galleries_row['rows'];
|
| 147 |
+
if (!$album_galleries_row) {
|
| 148 |
+
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'wd_error');
|
| 149 |
+
return;
|
| 150 |
+
}
|
| 151 |
+
$album_gallery_div_id = 'bwg_album_extended_' . $bwg;
|
| 152 |
+
$album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
|
| 153 |
}
|
| 154 |
|
| 155 |
if ($type == 'gallery' ) {
|
| 527 |
}
|
| 528 |
?>
|
| 529 |
<script>
|
| 530 |
+
jQuery(".bwg_description_more_<?php echo $bwg; ?>").on('click',function () {
|
| 531 |
if (jQuery(this).hasClass("bwg_more")) {
|
| 532 |
jQuery(this).parent().find(".bwg_description_full_<?php echo $bwg; ?>").show();
|
| 533 |
jQuery(this).attr("class", "bwg_description_more_<?php echo $bwg; ?> bwg_hide");
|
frontend/views/BWGViewGalleryBox.php
CHANGED
|
@@ -57,7 +57,7 @@ class BWGViewGalleryBox {
|
|
| 57 |
$watermark_type = (isset($_GET['watermark_type']) ? esc_html($_GET['watermark_type']) : 'none');
|
| 58 |
$watermark_text = (isset($_GET['watermark_text']) ? esc_html($_GET['watermark_text']) : '');
|
| 59 |
$watermark_font_size = (isset($_GET['watermark_font_size']) ? esc_html($_GET['watermark_font_size']) : 12);
|
| 60 |
-
$watermark_font = (isset($_GET['watermark_font']) ? esc_html($_GET['watermark_font']) : 'Arial');
|
| 61 |
$watermark_color = (isset($_GET['watermark_color']) ? esc_html($_GET['watermark_color']) : 'FFFFFF');
|
| 62 |
$watermark_opacity = (isset($_GET['watermark_opacity']) ? esc_html($_GET['watermark_opacity']) : 30);
|
| 63 |
$watermark_position = explode('-', (isset($_GET['watermark_position']) ? esc_html($_GET['watermark_position']) : 'bottom-right'));
|
| 57 |
$watermark_type = (isset($_GET['watermark_type']) ? esc_html($_GET['watermark_type']) : 'none');
|
| 58 |
$watermark_text = (isset($_GET['watermark_text']) ? esc_html($_GET['watermark_text']) : '');
|
| 59 |
$watermark_font_size = (isset($_GET['watermark_font_size']) ? esc_html($_GET['watermark_font_size']) : 12);
|
| 60 |
+
$watermark_font = (isset($_GET['watermark_font']) ? WDWLibrary::get_fonts(esc_html($_GET['watermark_font'])) : 'Arial');
|
| 61 |
$watermark_color = (isset($_GET['watermark_color']) ? esc_html($_GET['watermark_color']) : 'FFFFFF');
|
| 62 |
$watermark_opacity = (isset($_GET['watermark_opacity']) ? esc_html($_GET['watermark_opacity']) : 30);
|
| 63 |
$watermark_position = explode('-', (isset($_GET['watermark_position']) ? esc_html($_GET['watermark_position']) : 'bottom-right'));
|
frontend/views/BWGViewImage_browser.php
CHANGED
|
@@ -5,64 +5,19 @@ class BWGViewImage_browser {
|
|
| 5 |
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
$order_by = 'asc';
|
| 11 |
-
}
|
| 12 |
-
else {
|
| 13 |
-
$order_by = $params['order_by'];
|
| 14 |
-
}
|
| 15 |
-
if (!isset($params['popup_enable_pinterest'])) {
|
| 16 |
-
$params['popup_enable_pinterest'] = 0;
|
| 17 |
-
}
|
| 18 |
-
if (!isset($params['popup_enable_tumblr'])) {
|
| 19 |
-
$params['popup_enable_tumblr'] = 0;
|
| 20 |
-
}
|
| 21 |
-
if (!isset($params['show_search_box'])) {
|
| 22 |
-
$params['show_search_box'] = 0;
|
| 23 |
-
}
|
| 24 |
-
if (!isset($params['search_box_width'])) {
|
| 25 |
-
$params['search_box_width'] = 180;
|
| 26 |
-
}
|
| 27 |
-
if (!isset($params['popup_enable_info'])) {
|
| 28 |
-
$params['popup_enable_info'] = 1;
|
| 29 |
-
}
|
| 30 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 31 |
-
$params['popup_info_always_show'] = 0;
|
| 32 |
-
}
|
| 33 |
-
if (!isset($params['popup_info_full_width'])) {
|
| 34 |
-
$params['popup_info_full_width'] = 0;
|
| 35 |
-
}
|
| 36 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 37 |
-
$params['popup_enable_rate'] = 0;
|
| 38 |
-
}
|
| 39 |
-
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 40 |
-
$params['thumb_click_action'] = 'open_lightbox';
|
| 41 |
-
}
|
| 42 |
-
if (!isset($params['thumb_link_target'])) {
|
| 43 |
-
$params['thumb_link_target'] = 1;
|
| 44 |
-
}
|
| 45 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 46 |
-
$params['popup_hit_counter'] = 0;
|
| 47 |
-
}
|
| 48 |
-
if (!isset($params['tag'])) {
|
| 49 |
-
$params['tag'] = 0;
|
| 50 |
-
}
|
| 51 |
-
if (!isset($params['show_gallery_description'])) {
|
| 52 |
-
$params['show_gallery_description'] = 0;
|
| 53 |
-
}
|
| 54 |
-
if (!isset($params['showthumbs_name'])) {
|
| 55 |
-
$params['showthumbs_name'] = $wd_bwg_options->showthumbs_name;
|
| 56 |
-
}
|
| 57 |
if (!$theme_row) {
|
| 58 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 59 |
return;
|
| 60 |
}
|
|
|
|
| 61 |
$gallery_row = WDWLibrary::get_gallery_row_data($params['gallery_id']);
|
| 62 |
if (!$gallery_row && $params["tag"] == 0) {
|
| 63 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
|
| 64 |
return;
|
| 65 |
}
|
|
|
|
| 66 |
$image_rows = WDWLibrary::get_image_rows_data($params['gallery_id'], $bwg, 'image_browser', '', $params['tag'], 1, 1, $params['sort_by'], $params['order_by']);
|
| 67 |
$page_nav = $image_rows['page_nav'];
|
| 68 |
$image_rows = $image_rows['images'];
|
|
@@ -78,13 +33,8 @@ class BWGViewImage_browser {
|
|
| 78 |
$image_title = $params['image_browser_title_enable'];
|
| 79 |
$enable_image_description = $params['image_browser_description_enable'];
|
| 80 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 81 |
-
$image_right_click = $wd_bwg_options->image_right_click;
|
| 82 |
-
|
| 83 |
-
$params['popup_fullscreen'] = 0;
|
| 84 |
-
}
|
| 85 |
-
if (!isset($params['popup_autoplay'])) {
|
| 86 |
-
$params['popup_autoplay'] = 0;
|
| 87 |
-
}
|
| 88 |
$params_array = array(
|
| 89 |
'action' => 'GalleryBox',
|
| 90 |
'current_view' => $bwg,
|
|
@@ -96,7 +46,7 @@ class BWGViewImage_browser {
|
|
| 96 |
'image_height' => $params['popup_height'],
|
| 97 |
'image_effect' => $params['popup_effect'],
|
| 98 |
'wd_sor' => $params['sort_by'],
|
| 99 |
-
'wd_ord' => $order_by,
|
| 100 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 101 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 102 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
|
@@ -129,12 +79,12 @@ class BWGViewImage_browser {
|
|
| 129 |
$show_watermark = FALSE;
|
| 130 |
}
|
| 131 |
if ($params['watermark_type'] != 'none') {
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
}
|
| 139 |
if ($params['watermark_type'] == 'text') {
|
| 140 |
$show_watermark = TRUE;
|
|
@@ -157,9 +107,9 @@ class BWGViewImage_browser {
|
|
| 157 |
$watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . $bwg . '" src="' . urldecode($params_array['watermark_url']) . '" />';
|
| 158 |
$watermark_a = '';
|
| 159 |
$watermark_div = 'class="bwg_image_browser_watermark_' . $bwg . '"';
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
}
|
| 164 |
$image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
|
| 165 |
if (!isset($theme_row->image_browser_gal_title_font_color)) {
|
|
@@ -311,7 +261,6 @@ class BWGViewImage_browser {
|
|
| 311 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
|
| 312 |
?>
|
| 313 |
</a>
|
| 314 |
-
|
| 315 |
<?php
|
| 316 |
}
|
| 317 |
}
|
|
@@ -391,7 +340,7 @@ class BWGViewImage_browser {
|
|
| 391 |
</div>
|
| 392 |
</div>
|
| 393 |
<script>
|
| 394 |
-
jQuery(window).load
|
| 395 |
<?php
|
| 396 |
if ($image_right_click) {
|
| 397 |
?>
|
| 5 |
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
| 8 |
+
|
| 9 |
+
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
if (!$theme_row) {
|
| 11 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 12 |
return;
|
| 13 |
}
|
| 14 |
+
|
| 15 |
$gallery_row = WDWLibrary::get_gallery_row_data($params['gallery_id']);
|
| 16 |
if (!$gallery_row && $params["tag"] == 0) {
|
| 17 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
|
| 18 |
return;
|
| 19 |
}
|
| 20 |
+
|
| 21 |
$image_rows = WDWLibrary::get_image_rows_data($params['gallery_id'], $bwg, 'image_browser', '', $params['tag'], 1, 1, $params['sort_by'], $params['order_by']);
|
| 22 |
$page_nav = $image_rows['page_nav'];
|
| 23 |
$image_rows = $image_rows['images'];
|
| 33 |
$image_title = $params['image_browser_title_enable'];
|
| 34 |
$enable_image_description = $params['image_browser_description_enable'];
|
| 35 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 36 |
+
$image_right_click = isset($wd_bwg_options->image_right_click) ? $wd_bwg_options->image_right_click : 0;
|
| 37 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
$params_array = array(
|
| 39 |
'action' => 'GalleryBox',
|
| 40 |
'current_view' => $bwg,
|
| 46 |
'image_height' => $params['popup_height'],
|
| 47 |
'image_effect' => $params['popup_effect'],
|
| 48 |
'wd_sor' => $params['sort_by'],
|
| 49 |
+
'wd_ord' => $params['order_by'],
|
| 50 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 51 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 52 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
| 79 |
$show_watermark = FALSE;
|
| 80 |
}
|
| 81 |
if ($params['watermark_type'] != 'none') {
|
| 82 |
+
$params_array['watermark_link'] = $params['watermark_link'];
|
| 83 |
+
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
| 84 |
+
$params_array['watermark_position'] = $params['watermark_position'];
|
| 85 |
+
$position = explode('-', $params_array['watermark_position']);
|
| 86 |
+
$vertical_align = $position[0];
|
| 87 |
+
$text_align = $position[1];
|
| 88 |
}
|
| 89 |
if ($params['watermark_type'] == 'text') {
|
| 90 |
$show_watermark = TRUE;
|
| 107 |
$watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . $bwg . '" src="' . urldecode($params_array['watermark_url']) . '" />';
|
| 108 |
$watermark_a = '';
|
| 109 |
$watermark_div = 'class="bwg_image_browser_watermark_' . $bwg . '"';
|
| 110 |
+
$params_array['watermark_font'] = '';
|
| 111 |
+
$params_array['watermark_color'] = '';
|
| 112 |
+
$params_array['watermark_font_size'] = '';
|
| 113 |
}
|
| 114 |
$image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
|
| 115 |
if (!isset($theme_row->image_browser_gal_title_font_color)) {
|
| 261 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
|
| 262 |
?>
|
| 263 |
</a>
|
|
|
|
| 264 |
<?php
|
| 265 |
}
|
| 266 |
}
|
| 340 |
</div>
|
| 341 |
</div>
|
| 342 |
<script>
|
| 343 |
+
jQuery(window).on('load', function () {
|
| 344 |
<?php
|
| 345 |
if ($image_right_click) {
|
| 346 |
?>
|
frontend/views/BWGViewSlideshow.php
CHANGED
|
@@ -1,228 +1,57 @@
|
|
| 1 |
<?php
|
| 2 |
class BWGViewSlideshow {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
|
|
|
|
|
|
| 4 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 5 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
| 6 |
$current_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
| 7 |
-
global $WD_BWG_UPLOAD_DIR;
|
| 8 |
-
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
| 9 |
-
global $wd_bwg_options;
|
| 10 |
-
if (!isset($params['order_by'])) {
|
| 11 |
-
$order_by = 'asc';
|
| 12 |
-
}
|
| 13 |
-
else {
|
| 14 |
-
$order_by = $params['order_by'];
|
| 15 |
-
}
|
| 16 |
-
if (!isset($params['slideshow_title_full_width'])) {
|
| 17 |
-
$params['slideshow_title_full_width'] = 0;
|
| 18 |
-
}
|
| 19 |
-
if (!isset($params['tag'])) {
|
| 20 |
-
$params['tag'] = 0;
|
| 21 |
-
}
|
| 22 |
-
if (!isset($params['popup_enable_pinterest'])) {
|
| 23 |
-
$params['popup_enable_pinterest'] = 0;
|
| 24 |
-
}
|
| 25 |
-
if (!isset($params['popup_enable_tumblr'])) {
|
| 26 |
-
$params['popup_enable_tumblr'] = 0;
|
| 27 |
-
}
|
| 28 |
-
if (!isset($params['show_search_box'])) {
|
| 29 |
-
$params['show_search_box'] = 0;
|
| 30 |
-
}
|
| 31 |
-
if (!isset($params['search_box_width'])) {
|
| 32 |
-
$params['search_box_width'] = 180;
|
| 33 |
-
}
|
| 34 |
-
if (!isset($params['popup_enable_info'])) {
|
| 35 |
-
$params['popup_enable_info'] = 1;
|
| 36 |
-
}
|
| 37 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 38 |
-
$params['popup_info_always_show'] = 0;
|
| 39 |
-
}
|
| 40 |
-
if (!isset($params['popup_info_full_width'])) {
|
| 41 |
-
$params['popup_info_full_width'] = 0;
|
| 42 |
-
}
|
| 43 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 44 |
-
$params['popup_enable_rate'] = 0;
|
| 45 |
-
}
|
| 46 |
-
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 47 |
-
$params['thumb_click_action'] = 'do_nothing';
|
| 48 |
-
}
|
| 49 |
-
if (!isset($params['thumb_link_target'])) {
|
| 50 |
-
$params['thumb_link_target'] = 1;
|
| 51 |
-
}
|
| 52 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 53 |
-
$params['popup_hit_counter'] = 0;
|
| 54 |
-
}
|
| 55 |
-
if (!isset($params['popup_fullscreen'])) {
|
| 56 |
-
$params['popup_fullscreen'] = $wd_bwg_options->popup_fullscreen;
|
| 57 |
-
}
|
| 58 |
-
if (!isset($params['popup_enable_google'])) {
|
| 59 |
-
$params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
|
| 60 |
-
}
|
| 61 |
-
if(!isset($params['popup_enable_twitter'])) {
|
| 62 |
-
$params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
|
| 63 |
-
}
|
| 64 |
-
if (!isset($params['popup_enable_facebook'])) {
|
| 65 |
-
$params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
|
| 66 |
-
}
|
| 67 |
-
if (!isset($params['popup_interval'])) {
|
| 68 |
-
$params['popup_interval'] = $wd_bwg_options->popup_interval;
|
| 69 |
-
}
|
| 70 |
-
if (!isset($params['popup_enable_comment'])) {
|
| 71 |
-
$params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
|
| 72 |
-
}
|
| 73 |
-
if (!isset($params['popup_enable_filmstrip'])) {
|
| 74 |
-
$params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
|
| 75 |
-
}
|
| 76 |
-
if (!isset($params['popup_filmstrip_height'])) {
|
| 77 |
-
$params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
|
| 78 |
-
}
|
| 79 |
-
if (!isset($params['popup_enable_ctrl_btn'])) {
|
| 80 |
-
$params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
|
| 81 |
-
}
|
| 82 |
-
if (!isset($params['popup_enable_fullscreen'])) {
|
| 83 |
-
$params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
|
| 84 |
-
}
|
| 85 |
-
if (!isset($params['popup_enable_info'])) {
|
| 86 |
-
$params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
|
| 87 |
-
}
|
| 88 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 89 |
-
$params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
|
| 90 |
-
}
|
| 91 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 92 |
-
$params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
|
| 93 |
-
}
|
| 94 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 95 |
-
$params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
|
| 96 |
-
}
|
| 97 |
-
if (!isset($params['popup_effect'])) {
|
| 98 |
-
$params['popup_effect'] = $wd_bwg_options->popup_type;
|
| 99 |
-
}
|
| 100 |
-
if (!isset($params['popup_width'])) {
|
| 101 |
-
$params['popup_width'] = $wd_bwg_options->popup_width;
|
| 102 |
-
}
|
| 103 |
-
if (!isset($params['popup_height'])) {
|
| 104 |
-
$params['popup_height'] = $wd_bwg_options->popup_height;
|
| 105 |
-
}
|
| 106 |
-
if (!isset($params['popup_autoplay'])) {
|
| 107 |
-
$params['popup_autoplay'] = $wd_bwg_options->popup_autoplay;
|
| 108 |
-
}
|
| 109 |
-
if (!isset($params['watermark_type'])) {
|
| 110 |
-
$params['watermark_type'] = $wd_bwg_options->watermark_type;
|
| 111 |
-
}
|
| 112 |
-
if (!isset($params['watermark_link'])) {
|
| 113 |
-
$params['watermark_link'] = urlencode($wd_bwg_options->watermark_link);
|
| 114 |
-
}
|
| 115 |
-
if (!isset($params['watermark_opacity'])) {
|
| 116 |
-
$params['watermark_opacity'] = $wd_bwg_options->watermark_opacity;
|
| 117 |
-
}
|
| 118 |
-
if (!isset($params['watermark_position'])) {
|
| 119 |
-
$params['watermark_position'] = $wd_bwg_options->watermark_position;
|
| 120 |
-
}
|
| 121 |
-
if (!isset($params['watermark_url'])) {
|
| 122 |
-
$params['watermark_url'] = urlencode($wd_bwg_options->watermark_url);
|
| 123 |
-
}
|
| 124 |
-
if (!isset($params['watermark_width'])) {
|
| 125 |
-
$params['watermark_width'] = $wd_bwg_options->watermark_width;
|
| 126 |
-
}
|
| 127 |
-
if (!isset($params['watermark_height'])) {
|
| 128 |
-
$params['watermark_height'] = $wd_bwg_options->watermark_height;
|
| 129 |
-
}
|
| 130 |
-
if (!isset($params['watermark_text'])) {
|
| 131 |
-
$params['watermark_text'] = urlencode($wd_bwg_options->watermark_text);
|
| 132 |
-
}
|
| 133 |
-
if (!isset($params['watermark_font_size'])) {
|
| 134 |
-
$params['watermark_font_size'] = $wd_bwg_options->watermark_font_size;
|
| 135 |
-
}
|
| 136 |
-
if (!isset($params['watermark_font'])) {
|
| 137 |
-
$params['watermark_font'] = $wd_bwg_options->watermark_font;
|
| 138 |
-
}
|
| 139 |
-
if (!isset($params['watermark_color'])) {
|
| 140 |
-
$params['watermark_color'] = $wd_bwg_options->watermark_color;
|
| 141 |
-
}
|
| 142 |
-
$image_right_click = $wd_bwg_options->image_right_click;
|
| 143 |
-
if (!$from) {
|
| 144 |
-
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
| 145 |
-
$theme_row = WDWLibrary::get_theme_row_data($theme_id);
|
| 146 |
-
if (!$theme_row) {
|
| 147 |
-
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 148 |
-
return;
|
| 149 |
-
}
|
| 150 |
-
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
| 151 |
-
$sort_by = (isset($params['sort_by']) ? esc_html($params['sort_by']) : 'order');
|
| 152 |
-
$slideshow_effect = (isset($params['slideshow_effect']) ? esc_html($params['slideshow_effect']) : 'fade');
|
| 153 |
-
$enable_slideshow_autoplay = (isset($params['enable_slideshow_autoplay']) ? esc_html($params['enable_slideshow_autoplay']) : 0);
|
| 154 |
-
$enable_slideshow_shuffle = (isset($params['enable_slideshow_shuffle']) ? esc_html($params['enable_slideshow_shuffle']) : 0);
|
| 155 |
-
$enable_slideshow_ctrl = (isset($params['enable_slideshow_ctrl']) ? esc_html($params['enable_slideshow_ctrl']) : 0);
|
| 156 |
-
$enable_slideshow_filmstrip = FALSE;
|
| 157 |
-
$slideshow_filmstrip_height = 0;
|
| 158 |
-
$slideshow_filmstrip_width = 0;
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
$watermark_font = (isset($params['watermark_font']) ? esc_html($params['watermark_font']) : 'Arial');
|
| 175 |
-
$watermark_color = (isset($params['watermark_color']) ? esc_html($params['watermark_color']) : 'FFFFFF');
|
| 176 |
-
$watermark_opacity = (isset($params['watermark_opacity']) ? esc_html($params['watermark_opacity']) : 30);
|
| 177 |
-
$watermark_position = explode('-', (isset($params['watermark_position']) ? esc_html($params['watermark_position']) : 'bottom-right'));
|
| 178 |
-
$watermark_link = (isset($params['watermark_link']) ? esc_html($params['watermark_link']) : '');
|
| 179 |
-
$watermark_url = (isset($params['watermark_url']) ? esc_html($params['watermark_url']) : '');
|
| 180 |
-
$watermark_width = (isset($params['watermark_width']) ? esc_html($params['watermark_width']) : 90);
|
| 181 |
-
$watermark_height = (isset($params['watermark_height']) ? esc_html($params['watermark_height']) : 90);
|
| 182 |
-
$slideshow_effect_duration = (isset($params['slideshow_effect_duration']) ? esc_html($params['slideshow_effect_duration']) : 1);
|
| 183 |
-
}
|
| 184 |
-
else {
|
| 185 |
-
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 0);
|
| 186 |
-
$theme_row = WDWLibrary::get_theme_row_data($theme_id);
|
| 187 |
-
if (!$theme_row) {
|
| 188 |
-
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 189 |
-
return;
|
| 190 |
-
}
|
| 191 |
-
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
| 192 |
-
$sort_by = 'order';
|
| 193 |
-
$slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade');
|
| 194 |
-
$enable_slideshow_autoplay = (isset($params['enable_autoplay']) ? esc_html($params['enable_autoplay']) : $wd_bwg_options->slideshow_enable_autoplay);
|
| 195 |
-
$enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0);
|
| 196 |
-
$enable_slideshow_ctrl = (isset($params['enable_ctrl_btn']) ? esc_html($params['enable_ctrl_btn']) : $wd_bwg_options->slideshow_enable_ctrl);
|
| 197 |
-
$enable_slideshow_filmstrip = FALSE;
|
| 198 |
-
$slideshow_filmstrip_height = 0;
|
| 199 |
-
$slideshow_filmstrip_width = 0;
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
$watermark_font = $wd_bwg_options->watermark_font;
|
| 217 |
-
$watermark_color = $wd_bwg_options->watermark_color;
|
| 218 |
-
$watermark_opacity = $wd_bwg_options->watermark_opacity;
|
| 219 |
-
$watermark_position = explode('-', $wd_bwg_options->watermark_position);
|
| 220 |
-
$watermark_link = urlencode($wd_bwg_options->watermark_link);
|
| 221 |
-
$watermark_url = urlencode($wd_bwg_options->watermark_url);
|
| 222 |
-
$watermark_width = $wd_bwg_options->watermark_width;
|
| 223 |
-
$watermark_height = $wd_bwg_options->watermark_height;
|
| 224 |
-
}
|
| 225 |
-
$gallery_row = WDWLibrary::get_gallery_row_data($gallery_id);
|
| 226 |
if (!$gallery_row && $params["tag"] == 0) {
|
| 227 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
|
| 228 |
return;
|
|
@@ -603,7 +432,7 @@ class BWGViewSlideshow {
|
|
| 603 |
/* For images.*/
|
| 604 |
var bwg_current_image_span = jQuery(this).find("img");
|
| 605 |
if (bwg_current_image_span.length) {
|
| 606 |
-
bwg_current_image_span.load
|
| 607 |
var width = bwg_current_image_span.width();
|
| 608 |
var height = bwg_current_image_span.height();
|
| 609 |
bwg_change_each_watermark_container_<?php echo $bwg; ?>(width, height);
|
|
@@ -1254,7 +1083,7 @@ class BWGViewSlideshow {
|
|
| 1254 |
}
|
| 1255 |
return false;
|
| 1256 |
});
|
| 1257 |
-
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").click
|
| 1258 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
| 1259 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
|
| 1260 |
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
|
@@ -1272,7 +1101,7 @@ class BWGViewSlideshow {
|
|
| 1272 |
}
|
| 1273 |
}, 500);
|
| 1274 |
});
|
| 1275 |
-
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").click
|
| 1276 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
| 1277 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
|
| 1278 |
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
|
@@ -1293,7 +1122,7 @@ class BWGViewSlideshow {
|
|
| 1293 |
/* Set filmstrip initial position.*/
|
| 1294 |
bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
|
| 1295 |
/* Play/pause.*/
|
| 1296 |
-
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").click
|
| 1297 |
if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
|
| 1298 |
bwg_play_<?php echo $bwg; ?>();
|
| 1299 |
jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
|
| 1 |
<?php
|
| 2 |
class BWGViewSlideshow {
|
| 3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
| 4 |
+
global $WD_BWG_UPLOAD_DIR;
|
| 5 |
+
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
| 8 |
$current_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
$theme_id = $params['theme_id'];
|
| 11 |
+
$gallery_id = $params['gallery_id'];
|
| 12 |
+
$order_by = $params['order_by'];
|
| 13 |
+
$sort_by = $params['sort_by'];
|
| 14 |
+
$slideshow_effect = $params['slideshow_effect'];
|
| 15 |
+
$enable_slideshow_autoplay = $params['enable_slideshow_autoplay'];
|
| 16 |
+
$enable_slideshow_shuffle = $params['enable_slideshow_shuffle'];
|
| 17 |
+
$enable_slideshow_ctrl = $params['enable_slideshow_ctrl'];
|
| 18 |
+
$enable_slideshow_filmstrip = FALSE;
|
| 19 |
+
$slideshow_filmstrip_height = 0;
|
| 20 |
+
$slideshow_filmstrip_width = 0;
|
| 21 |
|
| 22 |
+
$enable_image_title = $params['slideshow_enable_title'];
|
| 23 |
+
$slideshow_title_position = explode('-', $params['slideshow_title_position']);
|
| 24 |
+
$enable_image_description = $params['slideshow_enable_description'];
|
| 25 |
+
$slideshow_description_position = explode('-', $params['slideshow_description_position']);
|
| 26 |
+
$enable_slideshow_music = $params['enable_slideshow_music'];
|
| 27 |
+
$slideshow_music_url = $params['slideshow_music_url'];
|
| 28 |
|
| 29 |
+
$image_width = $params['slideshow_width'];
|
| 30 |
+
$image_height = $params['slideshow_height'];
|
| 31 |
+
$slideshow_interval = $params['slideshow_interval'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
$watermark_type = $params['watermark_type'];
|
| 34 |
+
$watermark_text = $params['watermark_text'];
|
| 35 |
+
$watermark_font_size = $params['watermark_font_size'];
|
| 36 |
+
$watermark_font = $params['watermark_font'];
|
| 37 |
+
$watermark_color = $params['watermark_color'];
|
| 38 |
+
$watermark_opacity = $params['watermark_opacity'];
|
| 39 |
+
$watermark_position = explode('-', $params['watermark_position']);
|
| 40 |
+
$watermark_link = $params['watermark_link'];
|
| 41 |
+
$watermark_url = $params['watermark_url'];
|
| 42 |
+
$watermark_width = $params['watermark_width'];
|
| 43 |
+
$watermark_height = $params['watermark_height'];
|
| 44 |
+
$slideshow_effect_duration = $params['slideshow_effect_duration'];
|
| 45 |
+
|
| 46 |
+
$image_right_click = isset($wd_bwg_options->image_right_click) ? $wd_bwg_options->image_right_click : 0;
|
| 47 |
|
| 48 |
+
$theme_row = WDWLibrary::get_theme_row_data($theme_id);
|
| 49 |
+
if (!$theme_row) {
|
| 50 |
+
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 51 |
+
return;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
$gallery_row = WDWLibrary::get_gallery_row_data($gallery_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
if (!$gallery_row && $params["tag"] == 0) {
|
| 56 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
|
| 57 |
return;
|
| 432 |
/* For images.*/
|
| 433 |
var bwg_current_image_span = jQuery(this).find("img");
|
| 434 |
if (bwg_current_image_span.length) {
|
| 435 |
+
bwg_current_image_span.on('load', function () {
|
| 436 |
var width = bwg_current_image_span.width();
|
| 437 |
var height = bwg_current_image_span.height();
|
| 438 |
bwg_change_each_watermark_container_<?php echo $bwg; ?>(width, height);
|
| 1083 |
}
|
| 1084 |
return false;
|
| 1085 |
});
|
| 1086 |
+
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").on('click', function () {
|
| 1087 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
| 1088 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
|
| 1089 |
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
| 1101 |
}
|
| 1102 |
}, 500);
|
| 1103 |
});
|
| 1104 |
+
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").on('click', function () {
|
| 1105 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
| 1106 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
|
| 1107 |
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
| 1122 |
/* Set filmstrip initial position.*/
|
| 1123 |
bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
|
| 1124 |
/* Play/pause.*/
|
| 1125 |
+
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").on('click', function () {
|
| 1126 |
if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
|
| 1127 |
bwg_play_<?php echo $bwg; ?>();
|
| 1128 |
jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
|
frontend/views/BWGViewThumbnails.php
CHANGED
|
@@ -4,137 +4,24 @@ class BWGViewThumbnails {
|
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
| 5 |
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
}
|
| 11 |
-
if (!isset($params['popup_fullscreen'])) {
|
| 12 |
-
$params['popup_fullscreen'] = 0;
|
| 13 |
-
}
|
| 14 |
-
if (!isset($params['popup_autoplay'])) {
|
| 15 |
-
$params['popup_autoplay'] = 0;
|
| 16 |
-
}
|
| 17 |
-
if (!isset($params['order_by'])) {
|
| 18 |
-
$params['order_by'] = 'asc';
|
| 19 |
-
}
|
| 20 |
-
if (!isset($params['popup_enable_pinterest'])) {
|
| 21 |
-
$params['popup_enable_pinterest'] = 0;
|
| 22 |
-
}
|
| 23 |
-
if (!isset($params['popup_enable_tumblr'])) {
|
| 24 |
-
$params['popup_enable_tumblr'] = 0;
|
| 25 |
-
}
|
| 26 |
-
if (!isset($params['show_search_box'])) {
|
| 27 |
-
$params['show_search_box'] = 0;
|
| 28 |
-
}
|
| 29 |
-
if (!isset($params['search_box_width'])) {
|
| 30 |
-
$params['search_box_width'] = 180;
|
| 31 |
-
}
|
| 32 |
-
if (!isset($params['popup_enable_info'])) {
|
| 33 |
-
$params['popup_enable_info'] = 1;
|
| 34 |
-
}
|
| 35 |
-
if (!isset($params['popup_info_always_show'])) {
|
| 36 |
-
$params['popup_info_always_show'] = 0;
|
| 37 |
-
}
|
| 38 |
-
if (!isset($params['popup_info_full_width'])) {
|
| 39 |
-
$params['popup_info_full_width'] = 0;
|
| 40 |
-
}
|
| 41 |
-
if (!isset($params['popup_enable_rate'])) {
|
| 42 |
-
$params['popup_enable_rate'] = 0;
|
| 43 |
-
}
|
| 44 |
-
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
| 45 |
-
$params['thumb_click_action'] = 'open_lightbox';
|
| 46 |
-
}
|
| 47 |
-
if (!isset($params['thumb_link_target'])) {
|
| 48 |
-
$params['thumb_link_target'] = 1;
|
| 49 |
-
}
|
| 50 |
-
if (!isset($params['popup_hit_counter'])) {
|
| 51 |
-
$params['popup_hit_counter'] = 0;
|
| 52 |
-
}
|
| 53 |
-
if (!isset($params['show_sort_images'])) {
|
| 54 |
-
$params['show_sort_images'] = 0;
|
| 55 |
-
}
|
| 56 |
-
if (!isset($params['image_enable_page'])) {
|
| 57 |
-
$params['image_enable_page'] = 1;
|
| 58 |
-
}
|
| 59 |
-
if (!isset($params['show_tag_box'])) {
|
| 60 |
-
$params['show_tag_box'] = 0;
|
| 61 |
-
}
|
| 62 |
-
if (!isset($params['tag'])) {
|
| 63 |
-
$params['tag'] = 0;
|
| 64 |
-
}
|
| 65 |
-
if (!isset($params['show_gallery_description'])) {
|
| 66 |
-
$params['show_gallery_description'] = 0;
|
| 67 |
-
}
|
| 68 |
-
if (!isset($params['showthumbs_name'])) {
|
| 69 |
-
$params['showthumbs_name'] = $wd_bwg_options->showthumbs_name;
|
| 70 |
-
}
|
| 71 |
-
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
| 72 |
-
$sort_direction = $params['order_by'];
|
| 73 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 74 |
-
$play_icon = $wd_bwg_options->play_icon;
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
$sort_direction = 'DESC';
|
| 81 |
-
}
|
| 82 |
-
elseif ($params['show'] == 'first') {
|
| 83 |
-
$sort_direction = 'ASC';
|
| 84 |
-
}
|
| 85 |
-
$params['image_enable_page'] = 0;
|
| 86 |
-
$params['image_title'] = $wd_bwg_options->image_title_show_hover;
|
| 87 |
-
$params['thumb_height'] = $params['height'];
|
| 88 |
-
$params['thumb_width'] = $params['width'];
|
| 89 |
-
$params['image_column_number'] = $params['count'];
|
| 90 |
-
$params['popup_fullscreen'] = $wd_bwg_options->popup_fullscreen;
|
| 91 |
-
$params['popup_autoplay'] = $wd_bwg_options->popup_autoplay;
|
| 92 |
-
$params['popup_width'] = $wd_bwg_options->popup_width;
|
| 93 |
-
$params['popup_height'] = $wd_bwg_options->popup_height;
|
| 94 |
-
$params['popup_effect'] = $wd_bwg_options->popup_type;
|
| 95 |
-
$params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
|
| 96 |
-
$params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
|
| 97 |
-
$params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
|
| 98 |
-
$params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
|
| 99 |
-
$params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
|
| 100 |
-
$params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
|
| 101 |
-
$params['popup_info_full_width'] = $wd_bwg_options->popup_info_full_width;
|
| 102 |
-
$params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
|
| 103 |
-
$params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
|
| 104 |
-
$params['popup_interval'] = $wd_bwg_options->popup_interval;
|
| 105 |
-
$params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
|
| 106 |
-
$params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
|
| 107 |
-
$params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
|
| 108 |
-
$params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
|
| 109 |
-
$params['popup_enable_pinterest'] = $wd_bwg_options->popup_enable_pinterest;
|
| 110 |
-
$params['popup_enable_tumblr'] = $wd_bwg_options->popup_enable_tumblr;
|
| 111 |
-
$params['watermark_type'] = $wd_bwg_options->watermark_type;
|
| 112 |
-
$params['watermark_link'] = urlencode($wd_bwg_options->watermark_link);
|
| 113 |
-
$params['watermark_opacity'] = $wd_bwg_options->watermark_opacity;
|
| 114 |
-
$params['watermark_position'] = $wd_bwg_options->watermark_position;
|
| 115 |
-
$params['watermark_text'] = $wd_bwg_options->watermark_text;
|
| 116 |
-
$params['watermark_font_size'] = $wd_bwg_options->watermark_font_size;
|
| 117 |
-
$params['watermark_font'] = $wd_bwg_options->watermark_font;
|
| 118 |
-
$params['watermark_color'] = $wd_bwg_options->watermark_color;
|
| 119 |
-
$params['watermark_url'] = urlencode($wd_bwg_options->watermark_url);
|
| 120 |
-
$params['watermark_width'] = $wd_bwg_options->watermark_width;
|
| 121 |
-
$params['watermark_height'] = $wd_bwg_options->watermark_height;
|
| 122 |
-
$params['thumb_click_action'] = $wd_bwg_options->thumb_click_action;
|
| 123 |
-
$params['thumb_link_target'] = $wd_bwg_options->thumb_link_target;
|
| 124 |
-
$params['popup_effect_duration'] = isset($wd_bwg_options->popup_effect_duration) ? $wd_bwg_options->popup_effect_duration : 1;
|
| 125 |
-
}
|
| 126 |
-
if (isset($_POST['sortImagesByValue_' . $bwg])) {
|
| 127 |
-
$sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
|
| 128 |
-
if ($sort_by == 'random') {
|
| 129 |
-
$params['sort_by'] = 'RAND()';
|
| 130 |
-
}
|
| 131 |
-
else if ($sort_by == 'default') {
|
| 132 |
-
$params['sort_by'] = $params['sort_by'];
|
| 133 |
-
}
|
| 134 |
-
else {
|
| 135 |
-
$params['sort_by'] = $sort_by;
|
| 136 |
-
}
|
| 137 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
| 139 |
if (!$theme_row) {
|
| 140 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
|
@@ -174,7 +61,7 @@ class BWGViewThumbnails {
|
|
| 174 |
}
|
| 175 |
$params['load_more_image_count'] = (isset($params['load_more_image_count']) && ($params['image_enable_page'] == 2)) ? $params['load_more_image_count'] : $params['images_per_page'];
|
| 176 |
$items_per_page = array('images_per_page' => $params['images_per_page'], 'load_more_image_count' => $params['load_more_image_count']);
|
| 177 |
-
$image_rows = WDWLibrary::get_image_rows_data($params['gallery_id'], $bwg, $type, 'bwg_tag_id_bwg_standart_thumbnails_' . $bwg, $params['tag'], $params['images_per_page'], $params['load_more_image_count'], $params['sort_by'], $
|
| 178 |
if ($params['image_enable_page'] && $params['images_per_page']) {
|
| 179 |
$page_nav = $image_rows['page_nav'];
|
| 180 |
}
|
|
@@ -189,9 +76,7 @@ class BWGViewThumbnails {
|
|
| 189 |
}
|
| 190 |
}
|
| 191 |
$tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
$inline_style = $this->inline_styles($bwg, $theme_row, $params);
|
| 195 |
if ($wd_bwg_options->use_inline_stiles_and_scripts) {
|
| 196 |
wp_enqueue_style('bwg_frontend');
|
| 197 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
|
@@ -387,7 +272,7 @@ class BWGViewThumbnails {
|
|
| 387 |
'image_height' => $params['popup_height'],
|
| 388 |
'image_effect' => $params['popup_effect'],
|
| 389 |
'wd_sor' => (isset($params['type']) ? 'date' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
|
| 390 |
-
'wd_ord' => $
|
| 391 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 392 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 393 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
| 4 |
global $WD_BWG_UPLOAD_DIR;
|
| 5 |
global $wd_bwg_options;
|
| 6 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
| 7 |
+
|
| 8 |
+
$order_by = $params['order_by'];
|
| 9 |
+
$image_right_click = isset($wd_bwg_options->image_right_click) ? $wd_bwg_options->image_right_click : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
$placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
|
| 11 |
+
$play_icon = isset($wd_bwg_options->play_icon) ? $wd_bwg_options->play_icon : 0;
|
| 12 |
+
|
| 13 |
+
if (isset($_POST['sortImagesByValue_' . $bwg])) {
|
| 14 |
+
$sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
|
| 15 |
+
if ($sort_by == 'random') {
|
| 16 |
+
$params['sort_by'] = 'RAND()';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
}
|
| 18 |
+
else if ($sort_by == 'default') {
|
| 19 |
+
$params['sort_by'] = $params['sort_by'];
|
| 20 |
+
}
|
| 21 |
+
else {
|
| 22 |
+
$params['sort_by'] = $sort_by;
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
$theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
|
| 26 |
if (!$theme_row) {
|
| 27 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
|
| 61 |
}
|
| 62 |
$params['load_more_image_count'] = (isset($params['load_more_image_count']) && ($params['image_enable_page'] == 2)) ? $params['load_more_image_count'] : $params['images_per_page'];
|
| 63 |
$items_per_page = array('images_per_page' => $params['images_per_page'], 'load_more_image_count' => $params['load_more_image_count']);
|
| 64 |
+
$image_rows = WDWLibrary::get_image_rows_data($params['gallery_id'], $bwg, $type, 'bwg_tag_id_bwg_standart_thumbnails_' . $bwg, $params['tag'], $params['images_per_page'], $params['load_more_image_count'], $params['sort_by'], $order_by);
|
| 65 |
if ($params['image_enable_page'] && $params['images_per_page']) {
|
| 66 |
$page_nav = $image_rows['page_nav'];
|
| 67 |
}
|
| 76 |
}
|
| 77 |
}
|
| 78 |
$tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
|
| 79 |
+
$inline_style = $this->inline_styles($bwg, $theme_row, $params);
|
|
|
|
|
|
|
| 80 |
if ($wd_bwg_options->use_inline_stiles_and_scripts) {
|
| 81 |
wp_enqueue_style('bwg_frontend');
|
| 82 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
| 272 |
'image_height' => $params['popup_height'],
|
| 273 |
'image_effect' => $params['popup_effect'],
|
| 274 |
'wd_sor' => (isset($params['type']) ? 'date' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
|
| 275 |
+
'wd_ord' => $order_by,
|
| 276 |
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
| 277 |
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
| 278 |
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
js/bwg_frontend.js
CHANGED
|
@@ -47,94 +47,92 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
| 47 |
post_data["bwg_tag_id_" + id] = jQuery("#bwg_tag_id_" + id).val();
|
| 48 |
// Loading.
|
| 49 |
jQuery("#ajax_loading_" + current_view).css('display', '');
|
| 50 |
-
jQuery.
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
// event.preventDefault();
|
| 134 |
-
// }
|
| 135 |
-
// else {
|
| 136 |
-
// event.returnValue = false;
|
| 137 |
-
// }
|
| 138 |
return false;
|
| 139 |
}
|
| 140 |
|
| 47 |
post_data["bwg_tag_id_" + id] = jQuery("#bwg_tag_id_" + id).val();
|
| 48 |
// Loading.
|
| 49 |
jQuery("#ajax_loading_" + current_view).css('display', '');
|
| 50 |
+
jQuery.ajax({
|
| 51 |
+
type: "POST",
|
| 52 |
+
url: window.location,
|
| 53 |
+
data: post_data,
|
| 54 |
+
success: function (data) {
|
| 55 |
+
masonry_loaded = jQuery(data).find('#' + form_id).find(".bwg_masonry_thumb_spun_" + current_view + " img").length;
|
| 56 |
+
mosaic_loaded = jQuery(data).find('#' + form_id).find(".bwg_mosaic_thumb_spun_" + current_view + " img").length;
|
| 57 |
+
if (load_more) {
|
| 58 |
+
var strr = jQuery(data).find('#' + id).html();
|
| 59 |
+
jQuery('#' + id).append(strr);
|
| 60 |
|
| 61 |
+
jQuery("div[id^='bwg_container1_'] form").each(function () {
|
| 62 |
+
if (jQuery(this).data("current") == current_view) {
|
| 63 |
+
var str = jQuery(data).find('.bwg_nav_cont_' + current_view).html();
|
| 64 |
+
jQuery('.bwg_nav_cont_' + current_view).html(str);
|
| 65 |
+
}
|
| 66 |
+
else {
|
| 67 |
+
var str = jQuery(this).find('span[class^="bwg_nav_cont_"]').html();
|
| 68 |
+
jQuery(this).find('span[class^="bwg_nav_cont_"]').html(str);
|
| 69 |
+
}
|
| 70 |
+
});
|
| 71 |
+
}
|
| 72 |
+
else {
|
| 73 |
+
var str = jQuery(data).find('#' + form_id).html();
|
| 74 |
+
jQuery('#' + form_id).html(str);
|
| 75 |
+
}
|
| 76 |
+
// There are no images.
|
| 77 |
+
if (jQuery("#bwg_search_input_" + current_view).length > 0 && album_gallery_id == 0) { // Search box exists and not album view.
|
| 78 |
+
var bwg_images_count = jQuery('#bwg_images_count_' + current_view).val();
|
| 79 |
+
if (bwg_images_count == 0) {
|
| 80 |
+
var cont = jQuery("#" + id).parent().html();
|
| 81 |
+
var error_msg = '<div style="width:95%"><div class="wd_error"><p><strong>' + bwg_objectL10n.bwg_search_result + '</strong></p></div></div>';
|
| 82 |
+
jQuery("#" + id).parent().html(error_msg + cont)
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
},
|
| 86 |
+
beforeSend: function(){
|
| 87 |
+
},
|
| 88 |
+
complete:function(){
|
| 89 |
+
jQuery("div[id^='bwg_container1_'] img").each(function () {
|
| 90 |
+
if (jQuery(this).attr("data-lazy-src") != '') {
|
| 91 |
+
jQuery(this).attr("src", jQuery(this).attr("data-lazy-src"));
|
| 92 |
+
}
|
| 93 |
+
else if (jQuery(this).attr("data-src") != '') {
|
| 94 |
+
jQuery(this).attr("src", jQuery(this).attr("data-src"));
|
| 95 |
+
}
|
| 96 |
+
});
|
| 97 |
+
jQuery(".blog_style_image_buttons_conteiner_" + current_view).find(jQuery(".bwg_blog_style_img_" + current_view)).on('load', function(){
|
| 98 |
+
jQuery(".bwg_blog_style_img_" + current_view).closest(jQuery(".blog_style_image_buttons_conteiner_" + current_view)).show();
|
| 99 |
+
});
|
| 100 |
+
jQuery("#ajax_loading_" + current_view).css('display', 'none');
|
| 101 |
+
jQuery("#bwg_tags_id_" + id).val(jQuery("#bwg_tag_id_" + id).val());
|
| 102 |
|
| 103 |
+
if (jQuery(".pagination-links_" + current_view).length) {
|
| 104 |
+
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
| 105 |
+
}
|
| 106 |
+
/* For all*/
|
| 107 |
+
window["bwg_document_ready_" + current_view]();
|
| 108 |
+
/* For masonry view.*/
|
| 109 |
+
if (id == "bwg_masonry_thumbnails_" + current_view || id == "bwg_album_masonry_" + current_view) {
|
| 110 |
+
window["bwg_masonry_ajax_"+ current_view](masonry_loaded);
|
| 111 |
+
}
|
| 112 |
+
/* For mosaic view.*/
|
| 113 |
+
if (id == "bwg_mosaic_thumbnails_" + current_view) {
|
| 114 |
+
window["bwg_mosaic_ajax_" + current_view](mosaic_loaded);
|
| 115 |
+
}
|
| 116 |
+
/* For Blog style view.*/
|
| 117 |
+
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
|
| 118 |
+
jQuery(this).width(jQuery(this).parent().width());
|
| 119 |
+
jQuery(this).height(jQuery(this).width() * 0.5625);
|
| 120 |
+
});
|
| 121 |
+
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_instapost_" + current_view).each(function (e) {
|
| 122 |
+
jQuery(this).width(jQuery(this).parent().width());
|
| 123 |
+
/* 16 is 2*padding inside iframe */
|
| 124 |
+
/* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
|
| 125 |
+
jQuery(this).height((jQuery(this).width() - 16) * jQuery(this).attr('data-height') / jQuery(this).attr('data-width') + 96);
|
| 126 |
+
});
|
| 127 |
+
/* For Image browser view.*/
|
| 128 |
+
jQuery('#bwg_embed_frame_16x9_' + current_view).width(jQuery('#bwg_embed_frame_16x9_' + current_view).parent().width());
|
| 129 |
+
jQuery('#bwg_embed_frame_16x9_' + current_view).height(jQuery('#bwg_embed_frame_16x9_' + current_view).width() * 0.5625);
|
| 130 |
+
jQuery('#bwg_embed_frame_instapost_' + current_view).width(jQuery('#bwg_embed_frame_16x9_' + current_view).parent().width());
|
| 131 |
+
/* 16 is 2*padding inside iframe */
|
| 132 |
+
/* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
|
| 133 |
+
jQuery('.bwg_embed_frame_instapost_' + current_view).height((jQuery('.bwg_embed_frame_instapost_' + current_view).width() - 16) * jQuery('.bwg_embed_frame_instapost_' + current_view).attr('data-height') / jQuery('.bwg_embed_frame_instapost_' + current_view).attr('data-width') + 96);
|
| 134 |
+
}
|
| 135 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
return false;
|
| 137 |
}
|
| 138 |
|
js/bwg_gallery_box.js
CHANGED
|
@@ -118,55 +118,48 @@ function spider_ajax_save(form_id) {
|
|
| 118 |
jQuery("#loading_div").css('height', jQuery(".bwg_comments").css('height'));
|
| 119 |
document.getElementById("opacity_div").style.display = '';
|
| 120 |
document.getElementById("loading_div").style.display = 'table-cell';
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
// else {
|
| 142 |
-
// event.returnValue = false;
|
| 143 |
-
// }
|
| 144 |
-
return false;
|
| 145 |
}
|
| 146 |
|
| 147 |
// Submit rating.
|
| 148 |
function spider_rate_ajax_save(form_id) {
|
| 149 |
var post_data = {};
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
// event.returnValue = false;
|
| 168 |
-
// }
|
| 169 |
-
return false;
|
| 170 |
}
|
| 171 |
|
| 172 |
// Set value by ID.
|
| 118 |
jQuery("#loading_div").css('height', jQuery(".bwg_comments").css('height'));
|
| 119 |
document.getElementById("opacity_div").style.display = '';
|
| 120 |
document.getElementById("loading_div").style.display = 'table-cell';
|
| 121 |
+
jQuery.ajax({
|
| 122 |
+
type: "POST",
|
| 123 |
+
url: jQuery('#' + form_id).attr('action'),
|
| 124 |
+
data: post_data,
|
| 125 |
+
success: function (data) {
|
| 126 |
+
var str = jQuery(data).find('.bwg_comments').html();
|
| 127 |
+
jQuery('.bwg_comments').html(str);
|
| 128 |
+
},
|
| 129 |
+
beforeSend: function(){
|
| 130 |
+
},
|
| 131 |
+
complete:function(){
|
| 132 |
+
document.getElementById("opacity_div").style.display = 'none';
|
| 133 |
+
document.getElementById("loading_div").style.display = 'none';
|
| 134 |
+
// Update scrollbar.
|
| 135 |
+
jQuery(".bwg_comments").mCustomScrollbar({scrollInertia: 150});
|
| 136 |
+
// Bind comment container close function to close button.
|
| 137 |
+
jQuery(".bwg_comments_close_btn").on("click", bwg_comment);
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
}
|
| 142 |
|
| 143 |
// Submit rating.
|
| 144 |
function spider_rate_ajax_save(form_id) {
|
| 145 |
var post_data = {};
|
| 146 |
+
post_data["image_id"] = jQuery("#" + form_id + " input[name='image_id']").val();
|
| 147 |
+
post_data["rate"] = jQuery("#" + form_id + " input[name='score']").val();
|
| 148 |
+
post_data["ajax_task"] = jQuery("#rate_ajax_task").val();
|
| 149 |
+
jQuery.ajax({
|
| 150 |
+
type: "POST",
|
| 151 |
+
url: jQuery('#' + form_id).attr('action'),
|
| 152 |
+
data: post_data,
|
| 153 |
+
success: function (data) {
|
| 154 |
+
var str = jQuery(data).find('#' + form_id).html();
|
| 155 |
+
jQuery('#' + form_id).html(str);
|
| 156 |
+
},
|
| 157 |
+
beforeSend: function(){
|
| 158 |
+
},
|
| 159 |
+
complete:function(){
|
| 160 |
+
}
|
| 161 |
+
});
|
| 162 |
+
return false;
|
|
|
|
|
|
|
|
|
|
| 163 |
}
|
| 164 |
|
| 165 |
// Set value by ID.
|
photo-gallery.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Plugin Name: Photo Gallery
|
| 5 |
* Plugin URI: https://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.3.
|
| 8 |
* Author: Photo Gallery Team
|
| 9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
| 10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -1504,7 +1504,7 @@ function bwg_activate() {
|
|
| 1504 |
}
|
| 1505 |
|
| 1506 |
$version = get_option('wd_bwg_version');
|
| 1507 |
-
$new_version = '1.3.
|
| 1508 |
if ($version && version_compare($version, $new_version, '<')) {
|
| 1509 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
| 1510 |
bwg_update($version);
|
|
@@ -1556,7 +1556,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
| 1556 |
|
| 1557 |
function bwg_update_hook() {
|
| 1558 |
$version = get_option('wd_bwg_version');
|
| 1559 |
-
$new_version = '1.3.
|
| 1560 |
if ($version && version_compare($version, $new_version, '<')) {
|
| 1561 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
| 1562 |
bwg_update($version);
|
| 4 |
* Plugin Name: Photo Gallery
|
| 5 |
* Plugin URI: https://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.3.62
|
| 8 |
* Author: Photo Gallery Team
|
| 9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
| 10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
| 1504 |
}
|
| 1505 |
|
| 1506 |
$version = get_option('wd_bwg_version');
|
| 1507 |
+
$new_version = '1.3.62';
|
| 1508 |
if ($version && version_compare($version, $new_version, '<')) {
|
| 1509 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
| 1510 |
bwg_update($version);
|
| 1556 |
|
| 1557 |
function bwg_update_hook() {
|
| 1558 |
$version = get_option('wd_bwg_version');
|
| 1559 |
+
$new_version = '1.3.62';
|
| 1560 |
if ($version && version_compare($version, $new_version, '<')) {
|
| 1561 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
| 1562 |
bwg_update($version);
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
|
| 4 |
Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
|
| 5 |
Requires at least: 3.4
|
| 6 |
Tested up to: 4.9
|
| 7 |
-
Stable tag: 1.3.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -187,6 +187,10 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
|
|
| 187 |
|
| 188 |
== Changelog ==
|
| 189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
= 1.3.61 =
|
| 191 |
* Added: Support forum and Review links.
|
| 192 |
|
| 4 |
Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
|
| 5 |
Requires at least: 3.4
|
| 6 |
Tested up to: 4.9
|
| 7 |
+
Stable tag: 1.3.62
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 187 |
|
| 188 |
== Changelog ==
|
| 189 |
|
| 190 |
+
= 1.3.62 =
|
| 191 |
+
* Fixed: Options variable problem.
|
| 192 |
+
* Fixed: Vulnerable GET variable.
|
| 193 |
+
|
| 194 |
= 1.3.61 =
|
| 195 |
* Added: Support forum and Review links.
|
| 196 |
|
