model = $model; } //////////////////////////////////////////////////////////////////////////////////////// // Public Methods // //////////////////////////////////////////////////////////////////////////////////////// public function display() { global $WD_BWG_UPLOAD_DIR; require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php'); $tag = (isset($_GET['tag']) ? esc_html($_GET['tag']) : 0); $gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int'); $bwg = (isset($_GET['current_view']) ? esc_html($_GET['current_view']) : 0); $current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int'); $theme_id = (isset($_GET['theme_id']) ? esc_html($_GET['theme_id']) : 1); $thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120); $thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90); $open_with_fullscreen = WDWLibrary::esc_script('get', 'open_with_fullscreen', 0, 'int'); $open_with_autoplay = WDWLibrary::esc_script('get', 'open_with_autoplay', 0, 'int'); $image_width = WDWLibrary::esc_script('get', 'image_width', 800, 'int'); $image_height = WDWLibrary::esc_script('get', 'image_height', 500, 'int'); $image_effect = WDWLibrary::esc_script('get', 'image_effect', 'fade'); $sort_by = (isset($_GET['wd_sor']) ? esc_html($_GET['wd_sor']) : 'order'); $order_by = (isset($_GET['wd_ord']) ? esc_html($_GET['wd_ord']) : 'asc'); $enable_image_filmstrip = FALSE; $enable_image_fullscreen = (isset($_GET['enable_image_fullscreen']) ? esc_html($_GET['enable_image_fullscreen']) : 0); $popup_enable_info = (isset($_GET['popup_enable_info']) ? esc_html($_GET['popup_enable_info']) : 1); $popup_info_always_show = (isset($_GET['popup_info_always_show']) ? esc_html($_GET['popup_info_always_show']) : 0); $popup_info_full_width = (isset($_GET['popup_info_full_width']) ? esc_html($_GET['popup_info_full_width']) : 0); $popup_enable_rate = WDWLibrary::esc_script('get', 'popup_enable_rate', 0, 'int'); $popup_hit_counter = (isset($_GET['popup_hit_counter']) ? esc_html($_GET['popup_hit_counter']) : 0); $slideshow_effect_duration = (isset($_GET['slideshow_effect_duration']) ? (int) $_GET['slideshow_effect_duration'] : 1); $slideshow_interval = (isset($_GET['slideshow_interval']) ? (int) $_GET['slideshow_interval'] : 5); $enable_image_ctrl_btn = (isset($_GET['enable_image_ctrl_btn']) ? esc_html($_GET['enable_image_ctrl_btn']) : 0); $enable_comment_social = FALSE; $enable_image_facebook = FALSE; $enable_image_twitter = FALSE; $enable_image_google = FALSE; $enable_image_pinterest = FALSE; $enable_image_tumblr = FALSE; $watermark_type = (isset($_GET['watermark_type']) ? esc_html($_GET['watermark_type']) : 'none'); $watermark_text = (isset($_GET['watermark_text']) ? esc_html($_GET['watermark_text']) : ''); $watermark_font_size = (isset($_GET['watermark_font_size']) ? esc_html($_GET['watermark_font_size']) : 12); $watermark_font = (isset($_GET['watermark_font']) ? esc_html($_GET['watermark_font']) : 'Arial'); $watermark_color = (isset($_GET['watermark_color']) ? esc_html($_GET['watermark_color']) : 'FFFFFF'); $watermark_opacity = (isset($_GET['watermark_opacity']) ? esc_html($_GET['watermark_opacity']) : 30); $watermark_position = explode('-', (isset($_GET['watermark_position']) ? esc_html($_GET['watermark_position']) : 'bottom-right')); $watermark_link = (isset($_GET['watermark_link']) ? esc_html($_GET['watermark_link']) : ''); $watermark_url = (isset($_GET['watermark_url']) ? esc_html($_GET['watermark_url']) : ''); $watermark_width = (isset($_GET['watermark_width']) ? esc_html($_GET['watermark_width']) : 90); $watermark_height = (isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90); $theme_row = WDWLibrary::get_theme_row_data($theme_id); $option_row = WDWLibrary::get_options_row_data(); $image_right_click = $option_row->image_right_click; $image_filmstrip_height = 0; $image_filmstrip_width = 0; $image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $sort_by, $order_by, $tag); $image_id = (isset($_POST['image_id']) ? (int) $_POST['image_id'] : $current_image_id); $filmstrip_thumb_margin = $theme_row->lightbox_filmstrip_thumb_margin; $margins_split = explode(" ", $filmstrip_thumb_margin); $filmstrip_thumb_margin_right = 0; $filmstrip_thumb_margin_left = 0; if (isset($margins_split[1])) { $filmstrip_thumb_margin_right = (int) $margins_split[1]; if (isset($margins_split[3])) { $filmstrip_thumb_margin_left = (int) $margins_split[3]; } else { $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right; } } elseif (isset($margins_split[0])) { $filmstrip_thumb_margin_right = (int) $margins_split[0]; $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right; } $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left; $rgb_bwg_image_info_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_info_bg_color); $rgb_bwg_image_hit_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_hit_bg_color); $rgb_lightbox_ctrl_cont_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color); $lightbox_bg_transparent = (isset($theme_row->lightbox_bg_transparent)) ? $theme_row->lightbox_bg_transparent : 100; $lightbox_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_bg_color); $current_filename = ''; ?>
show_image_counts) { ?> / popup_enable_fullsize_image) { ?> popup_enable_download) { $style = 'none'; $current_image_arr = explode('/', $current_image_url); if (!$is_embed) { $download_href = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url; $style = 'inline-block'; } elseif (preg_match('/FLICKR/', $current_filetype) == 1) { $download_href = $current_filename; $style = 'inline-block'; } elseif (preg_match('/INSTAGRAM/', $current_filetype) == 1) { $download_href = substr_replace($current_thumb_url, 'l', -1); $style = 'inline-block'; } ?>
>
$image_row) { $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false; $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false; if ($image_row->id == $current_image_id) { $current_key = $key; ?> <?php echo $image_row->alt; ?> resolution); if (is_array($image_resolution)) { $instagram_post_width = $image_resolution[0]; $instagram_post_height = explode(' ', $image_resolution[1]); $instagram_post_height = $instagram_post_height[0]; } WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class' => "bwg_embed_frame", 'data-width' => $instagram_post_width, 'data-height' => $instagram_post_height, 'frameborder' => "0", 'style' => "width:" . $post_width . "px; height:" . $post_height . "px; vertical-align:middle; display:inline-block; position:relative;")); } else{ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"bwg_embed_frame", 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;")); } ?>
enable_loop == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>> enable_loop == 0 && $current_key == count($image_rows) - 1) ? 'style="display: none;"' : ''; ?>>