Version Description
New: Instagram slideshow is supported in popup
New: UX of feeds and themes admin screen, it is now similar to posts list screen
New: Inline actions for feeds and themes in admin list view
Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching
Improved: Popup is faster now and less data is being sent via AJAX
Download this release
Release Info
Developer | webdorado |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.2.16 |
Comparing to | |
See all releases |
Code changes from version 1.2.15 to 1.2.16
- admin/controllers/WDIControllerFeeds_wdi.php +117 -36
- admin/models/WDIModelFeeds_wdi.php +33 -11
- admin/views/WDIViewFeeds_wdi.php +256 -239
- admin/views/WDIViewLicensing_wdi.php +2 -2
- admin/views/WDIViewSettings_wdi.php +1 -1
- admin/views/WDIViewThemes_wdi.php +2 -2
- changelog.txt +7 -0
- css/default_theme.css +1 -0
- css/wdi_backend.css +2 -20
- css/wdi_backend.min.css +1 -1
- css/wdi_frontend.css +47 -0
- css/wdi_frontend.min.css +1 -1
- framework/WDILibrary.php +143 -28
- framework/WDILibraryEmbed.php +28 -10
- frontend/shortcode.php +1 -1
- frontend/views/WDIViewGalleryBox.php +188 -1122
- frontend/views/WDIViewImageBrowser_view.php +31 -182
- frontend/views/WDIViewThumbnails_view.php +18 -213
- js/gallerybox/wdi_gallery_box.js +1067 -540
- js/gallerybox/wdi_gallery_box.min.js +1 -1
- js/wdi_admin.js +16 -2
- js/wdi_admin.min.js +1 -1
- js/wdi_frontend.js +7 -2
- js/wdi_frontend.min.js +1 -1
- readme.txt +41 -34
- wd-instagram-feed.php +9 -7
- wd/includes/deactivate.php +1 -1
admin/controllers/WDIControllerFeeds_wdi.php
CHANGED
@@ -24,12 +24,32 @@ class WDIControllerFeeds_wdi {
|
|
24 |
$id = WDILibrary::get('current_id', 0);
|
25 |
$message = WDILibrary::get('message');
|
26 |
echo WDILibrary::message_id($message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
if (method_exists($this, $task)) {
|
|
|
28 |
check_admin_referer('nonce_wd', 'nonce_wd');
|
|
|
29 |
$this->$task($id);
|
30 |
}
|
31 |
else {
|
32 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
}
|
35 |
|
@@ -230,28 +250,40 @@ class WDIControllerFeeds_wdi {
|
|
230 |
$settings = $this->check_settings($settings);
|
231 |
global $wpdb;
|
232 |
$action = $_POST['add_or_edit'];
|
233 |
-
|
234 |
-
|
235 |
if($action==''){
|
236 |
$wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
|
237 |
if($wpdb->insert_id == false){
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
}
|
243 |
}else{
|
244 |
$msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
|
245 |
if($msg == false){
|
246 |
-
|
247 |
-
$this->edit();
|
248 |
}else{
|
249 |
-
|
250 |
-
$this->edit();
|
251 |
}
|
252 |
-
|
253 |
}
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
|
257 |
private function cancel(){
|
@@ -288,16 +320,43 @@ class WDIControllerFeeds_wdi {
|
|
288 |
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
private function duplicate_all($id) {
|
292 |
global $wpdb;
|
|
|
|
|
|
|
293 |
$feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
|
294 |
foreach ($feed_ids_col as $slider_id) {
|
295 |
if (isset($_POST['check_' . $slider_id])) {
|
|
|
|
|
|
|
296 |
$this->duplicate_tabels($slider_id);
|
297 |
}
|
298 |
}
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
}
|
302 |
|
303 |
private function duplicate_tabels($feed_id) {
|
@@ -339,24 +398,33 @@ class WDIControllerFeeds_wdi {
|
|
339 |
}
|
340 |
}
|
341 |
if ($flag) {
|
342 |
-
|
343 |
}
|
344 |
else {
|
345 |
-
|
346 |
}
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
348 |
}
|
349 |
|
350 |
private function publish($id) {
|
351 |
global $wpdb;
|
|
|
|
|
352 |
$save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $id));
|
353 |
if ($save !== FALSE) {
|
354 |
-
|
355 |
-
}
|
356 |
-
else {
|
357 |
-
echo WDILibrary::message(__('Error. Please install plugin again.', "wd-instagram-feed"), 'error');
|
358 |
}
|
359 |
-
|
|
|
|
|
|
|
|
|
|
|
360 |
}
|
361 |
|
362 |
private function publish_all() {
|
@@ -376,24 +444,32 @@ class WDIControllerFeeds_wdi {
|
|
376 |
}
|
377 |
}
|
378 |
if ($flag) {
|
379 |
-
|
380 |
}
|
381 |
else {
|
382 |
-
|
383 |
}
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
385 |
}
|
386 |
|
387 |
private function unpublish($id) {
|
388 |
global $wpdb;
|
|
|
389 |
$save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $id));
|
390 |
-
if
|
391 |
-
|
392 |
}
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
|
|
|
|
397 |
}
|
398 |
|
399 |
private function unpublish_all() {
|
@@ -413,12 +489,17 @@ class WDIControllerFeeds_wdi {
|
|
413 |
}
|
414 |
}
|
415 |
if ($flag) {
|
416 |
-
|
417 |
}
|
418 |
else {
|
419 |
-
|
420 |
}
|
421 |
-
|
|
|
|
|
|
|
|
|
|
|
422 |
}
|
423 |
|
424 |
private function check_settings($settings){
|
24 |
$id = WDILibrary::get('current_id', 0);
|
25 |
$message = WDILibrary::get('message');
|
26 |
echo WDILibrary::message_id($message);
|
27 |
+
$get_method_tasks = array(
|
28 |
+
"add",
|
29 |
+
"edit",
|
30 |
+
"display"
|
31 |
+
);
|
32 |
+
$get_task = "";
|
33 |
+
if(isset($_GET["task"])){
|
34 |
+
$get_task = $_GET["task"];
|
35 |
+
}
|
36 |
if (method_exists($this, $task)) {
|
37 |
+
if(!in_array($get_task , $get_method_tasks)){
|
38 |
check_admin_referer('nonce_wd', 'nonce_wd');
|
39 |
+
}
|
40 |
$this->$task($id);
|
41 |
}
|
42 |
else {
|
43 |
+
if(isset($_POST['search_value']) && !empty($_POST['search_value'])){
|
44 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
45 |
+
'page' => WDILibrary::get('page'),
|
46 |
+
'task' => 'display',
|
47 |
+
'search' => $_POST['search_value'],
|
48 |
+
), admin_url('admin.php')));
|
49 |
+
}else{
|
50 |
+
$this->display();
|
51 |
+
}
|
52 |
+
|
53 |
}
|
54 |
}
|
55 |
|
250 |
$settings = $this->check_settings($settings);
|
251 |
global $wpdb;
|
252 |
$action = $_POST['add_or_edit'];
|
253 |
+
|
|
|
254 |
if($action==''){
|
255 |
$wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
|
256 |
if($wpdb->insert_id == false){
|
257 |
+
$message = 24;
|
258 |
+
}else{
|
259 |
+
$message = 23;
|
260 |
+
}
|
|
|
261 |
}else{
|
262 |
$msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
|
263 |
if($msg == false){
|
264 |
+
$message = 24;
|
|
|
265 |
}else{
|
266 |
+
$message = 23;
|
|
|
267 |
}
|
|
|
268 |
}
|
269 |
+
$wdi_current_task = 'edit';
|
270 |
+
if(!empty($action)){
|
271 |
+
$wdi_current_id = $action;
|
272 |
+
}elseif ($wpdb->insert_id != false){
|
273 |
+
$wdi_current_id = $wpdb->insert_id;
|
274 |
+
}else{
|
275 |
+
$wdi_current_task = "display";
|
276 |
+
$wdi_current_id = 0;
|
277 |
+
}
|
278 |
+
|
279 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
280 |
+
'page' => WDILibrary::get('page'),
|
281 |
+
'task' => $wdi_current_task,
|
282 |
+
'current_id' => $wdi_current_id,
|
283 |
+
'message' =>$message,
|
284 |
+
), admin_url('admin.php')));
|
285 |
+
|
286 |
+
|
287 |
}
|
288 |
|
289 |
private function cancel(){
|
320 |
|
321 |
}
|
322 |
|
323 |
+
private function duplicate($id) {
|
324 |
+
$message = 20;
|
325 |
+
$duplicated = $this->duplicate_tabels($id);
|
326 |
+
if($duplicated){
|
327 |
+
$message = 18;
|
328 |
+
}
|
329 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
330 |
+
'page' => WDILibrary::get('page'),
|
331 |
+
'task' => 'display',
|
332 |
+
'message' => $message,
|
333 |
+
), admin_url('admin.php')));
|
334 |
+
|
335 |
+
}
|
336 |
private function duplicate_all($id) {
|
337 |
global $wpdb;
|
338 |
+
$message = 19;
|
339 |
+
$flag = false;
|
340 |
+
|
341 |
$feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
|
342 |
foreach ($feed_ids_col as $slider_id) {
|
343 |
if (isset($_POST['check_' . $slider_id])) {
|
344 |
+
if(!$flag){
|
345 |
+
$flag = true;
|
346 |
+
}
|
347 |
$this->duplicate_tabels($slider_id);
|
348 |
}
|
349 |
}
|
350 |
+
if(!$flag){
|
351 |
+
$message = 6;
|
352 |
+
}
|
353 |
+
|
354 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
355 |
+
'page' => WDILibrary::get('page'),
|
356 |
+
'task' => 'display',
|
357 |
+
'message' => $message,
|
358 |
+
), admin_url('admin.php')));
|
359 |
+
|
360 |
}
|
361 |
|
362 |
private function duplicate_tabels($feed_id) {
|
398 |
}
|
399 |
}
|
400 |
if ($flag) {
|
401 |
+
$message = 5;
|
402 |
}
|
403 |
else {
|
404 |
+
$message = 6;
|
405 |
}
|
406 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
407 |
+
'page' => WDILibrary::get('page'),
|
408 |
+
'task' => 'display',
|
409 |
+
'message' => $message,
|
410 |
+
), admin_url('admin.php')));
|
411 |
+
|
412 |
}
|
413 |
|
414 |
private function publish($id) {
|
415 |
global $wpdb;
|
416 |
+
$message = 20;
|
417 |
+
|
418 |
$save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $id));
|
419 |
if ($save !== FALSE) {
|
420 |
+
$message = 9;
|
|
|
|
|
|
|
421 |
}
|
422 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
423 |
+
'page' => WDILibrary::get('page'),
|
424 |
+
'task' => 'display',
|
425 |
+
'message' => $message,
|
426 |
+
), admin_url('admin.php')));
|
427 |
+
|
428 |
}
|
429 |
|
430 |
private function publish_all() {
|
444 |
}
|
445 |
}
|
446 |
if ($flag) {
|
447 |
+
$message = 10;
|
448 |
}
|
449 |
else {
|
450 |
+
$message = 6;
|
451 |
}
|
452 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
453 |
+
'page' => WDILibrary::get('page'),
|
454 |
+
'task' => 'display',
|
455 |
+
'message' => $message,
|
456 |
+
), admin_url('admin.php')));
|
457 |
+
|
458 |
}
|
459 |
|
460 |
private function unpublish($id) {
|
461 |
global $wpdb;
|
462 |
+
$message = 20;
|
463 |
$save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $id));
|
464 |
+
if($save !== FALSE){
|
465 |
+
$message = 11;
|
466 |
}
|
467 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
468 |
+
'page' => WDILibrary::get('page'),
|
469 |
+
'task' => 'display',
|
470 |
+
'message' => $message,
|
471 |
+
), admin_url('admin.php')));
|
472 |
+
|
473 |
}
|
474 |
|
475 |
private function unpublish_all() {
|
489 |
}
|
490 |
}
|
491 |
if ($flag) {
|
492 |
+
$message = 12;
|
493 |
}
|
494 |
else {
|
495 |
+
$message = 6;
|
496 |
}
|
497 |
+
WDILibrary::wdi_spider_redirect(add_query_arg(array(
|
498 |
+
'page' => WDILibrary::get('page'),
|
499 |
+
'task' => 'display',
|
500 |
+
'message' => $message,
|
501 |
+
), admin_url('admin.php')));
|
502 |
+
|
503 |
}
|
504 |
|
505 |
private function check_settings($settings){
|
admin/models/WDIModelFeeds_wdi.php
CHANGED
@@ -13,7 +13,19 @@ class WDIModelFeeds_wdi {
|
|
13 |
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
// Constructor & Destructor //
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
16 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
@@ -31,18 +43,23 @@ class WDIModelFeeds_wdi {
|
|
31 |
|
32 |
public function get_rows_data() {
|
33 |
global $wpdb;
|
34 |
-
|
35 |
-
$
|
|
|
|
|
36 |
$order_by_arr = array('id', 'feed_name', 'published');
|
37 |
-
$order_by = ((isset($
|
|
|
38 |
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
39 |
-
if (isset($
|
40 |
-
$limit = ((int) $
|
41 |
}
|
42 |
else {
|
43 |
$limit = 0;
|
44 |
}
|
45 |
-
|
|
|
|
|
46 |
$rows = $wpdb->get_results($query);
|
47 |
return $rows;
|
48 |
}
|
@@ -56,11 +73,11 @@ class WDIModelFeeds_wdi {
|
|
56 |
|
57 |
public function page_nav() {
|
58 |
global $wpdb;
|
59 |
-
$where = ((isset($
|
60 |
$total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_FEED_TABLE. ' ' . $where);
|
61 |
$page_nav['total'] = $total;
|
62 |
-
if (isset($
|
63 |
-
$limit = ((int) $
|
64 |
}
|
65 |
else {
|
66 |
$limit = 0;
|
@@ -278,9 +295,14 @@ private function check_settings($settings){
|
|
278 |
public function get_instagram_preview_post() {
|
279 |
global $wpdb;
|
280 |
$post_type = 'wdi_instagram';
|
281 |
-
$
|
|
|
|
|
|
|
|
|
|
|
282 |
if ( !empty($row[0]) ) {
|
283 |
-
return $row[0]->
|
284 |
}
|
285 |
else {
|
286 |
$post_params = array(
|
13 |
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
// Constructor & Destructor //
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
private $page_number = null;
|
17 |
+
private $search_text = "";
|
18 |
public function __construct() {
|
19 |
+
if(isset($_GET['paged'])){
|
20 |
+
$this->page_number = $_GET['paged'];
|
21 |
+
}elseif (isset($_POST['page_number'])){
|
22 |
+
$this->page_number = $_POST['page_number'];
|
23 |
+
}
|
24 |
+
if(isset($_POST['search_value'])){
|
25 |
+
$this->search_text = $_POST['search_value'];
|
26 |
+
}elseif (isset($_GET['search'])){
|
27 |
+
$this->search_text = $_GET['search'];
|
28 |
+
}
|
29 |
}
|
30 |
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
// Public Methods //
|
43 |
|
44 |
public function get_rows_data() {
|
45 |
global $wpdb;
|
46 |
+
|
47 |
+
$where = ((!empty($this->search_text)) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
|
48 |
+
$asc_or_desc = ((isset($_GET['order']) && esc_html($_GET['order']) == 'asc') ? 'asc' : 'desc');
|
49 |
+
|
50 |
$order_by_arr = array('id', 'feed_name', 'published');
|
51 |
+
$order_by = ((isset($_GET['order_by']) && in_array(esc_html($_GET['order_by']), $order_by_arr)) ? esc_html($_GET['order_by']) : 'id');
|
52 |
+
//$order_by = "feed_name";
|
53 |
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
54 |
+
if (isset($this->page_number) && $this->page_number) {
|
55 |
+
$limit = ((int) $this->page_number - 1) * 20;
|
56 |
}
|
57 |
else {
|
58 |
$limit = 0;
|
59 |
}
|
60 |
+
|
61 |
+
$query_limit = " LIMIT " . $limit . ",20";
|
62 |
+
$query = "SELECT * FROM " . $wpdb->prefix . WDI_FEED_TABLE .' '. $where . $order_by.$query_limit;
|
63 |
$rows = $wpdb->get_results($query);
|
64 |
return $rows;
|
65 |
}
|
73 |
|
74 |
public function page_nav() {
|
75 |
global $wpdb;
|
76 |
+
$where = ((isset($this->search_text) && !empty($this->search_text) && (esc_html(stripslashes($this->search_text)) != '')) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
|
77 |
$total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_FEED_TABLE. ' ' . $where);
|
78 |
$page_nav['total'] = $total;
|
79 |
+
if (isset($this->page_number) && $this->page_number) {
|
80 |
+
$limit = ((int) $this->page_number - 1) * 20;
|
81 |
}
|
82 |
else {
|
83 |
$limit = 0;
|
295 |
public function get_instagram_preview_post() {
|
296 |
global $wpdb;
|
297 |
$post_type = 'wdi_instagram';
|
298 |
+
$args = array(
|
299 |
+
'post_type' => $post_type,
|
300 |
+
'post_status' => 'private'
|
301 |
+
);
|
302 |
+
$row = get_posts($args);
|
303 |
+
|
304 |
if ( !empty($row[0]) ) {
|
305 |
+
return get_permalink($row[0]->ID);
|
306 |
}
|
307 |
else {
|
308 |
$post_params = array(
|
admin/views/WDIViewFeeds_wdi.php
CHANGED
@@ -29,182 +29,200 @@ class WDIViewFeeds_wdi
|
|
29 |
global $wdi_options;
|
30 |
$rows_data = $this->model->get_rows_data();
|
31 |
$page_nav = $this->model->page_nav();
|
32 |
-
$search_value =
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
$ids_string = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
?>
|
39 |
-
<div class="
|
40 |
-
<
|
41 |
-
|
42 |
-
<
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
47 |
-
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
48 |
-
<?php _e("Support Forum", "gmwd"); ?>
|
49 |
-
</a>
|
50 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
51 |
-
<?php _e("UPGRADE TO PAID VERSION", "wd-instagram-feed"); ?>
|
52 |
-
</a>
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
<form class="wrap" id="sliders_form" method="post" action="admin.php?page=wdi_feeds"
|
56 |
-
style="float: left; width: 99%;">
|
57 |
-
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
58 |
-
<input type="hidden" id="wdi_access_token" name="access_token"
|
59 |
-
value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
|
60 |
-
<span class="slider-icon"></span>
|
61 |
-
<h2>
|
62 |
-
<?php _e('Feeds', "wd-instagram-feed"); ?>
|
63 |
-
<a href="" class="add-new-h2" onclick="wdi_spider_set_input_value('task', 'add');
|
64 |
-
if(document.getElementById('wdi_access_token').value!=''){
|
65 |
-
wdi_spider_form_submit(event, 'sliders_form');
|
66 |
-
}"><?php _e('Add new', "wd-instagram-feed"); ?></a>
|
67 |
-
</h2>
|
68 |
-
<div class="buttons_div">
|
69 |
-
<span class="button-secondary non_selectable" onclick="wdi_spider_check_all_items()">
|
70 |
-
<input type="checkbox" id="check_all_items" name="check_all_items"
|
71 |
-
onclick="wdi_spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;"/>
|
72 |
-
<span style="vertical-align: middle;"><?php _e('Select All', "wd-instagram-feed"); ?></span>
|
73 |
</span>
|
74 |
-
<
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
wdi_spider_set_input_value('task', 'delete_all');
|
84 |
-
} else {
|
85 |
-
return false;
|
86 |
-
}" value="<?php esc_attr_e('Delete', "wd-instagram-feed"); ?>"/>
|
87 |
</div>
|
88 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
<?php
|
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 |
echo $order_class;
|
124 |
-
|
125 |
-
<a onclick="wdi_spider_set_input_value('task', '');
|
126 |
-
wdi_spider_set_input_value('order_by', 'published');
|
127 |
-
wdi_spider_set_input_value('asc_or_desc', '<?php echo((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
128 |
-
wdi_spider_form_submit(event, 'sliders_form')" href="">
|
129 |
-
<span><?php _e('Published', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
|
130 |
-
</a>
|
131 |
-
</th>
|
132 |
-
<th class="table_big_col"><?php _e('Edit', "wd-instagram-feed"); ?></th>
|
133 |
-
<th class="table_big_col"><?php _e('Delete', "wd-instagram-feed"); ?></th>
|
134 |
-
</thead>
|
135 |
-
<tbody id="tbody_arr">
|
136 |
-
<?php
|
137 |
-
if ($rows_data) {
|
138 |
-
foreach ($rows_data as $row_data) {
|
139 |
-
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
140 |
-
$published_image = (($row_data->published) ? 'publish' : 'unpublish');
|
141 |
-
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
142 |
-
$prev_img_url = $this->model->get_slider_prev_img($row_data->id);
|
143 |
-
?>
|
144 |
-
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
145 |
-
<td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
|
146 |
-
name="check_<?php echo $row_data->id; ?>"
|
147 |
-
onclick="wdi_spider_check_all(this)" type="checkbox"/>
|
148 |
-
</td>
|
149 |
-
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
150 |
-
<td class="table_big_col">
|
151 |
-
<img title="<?php echo $row_data->feed_name; ?>"
|
152 |
-
style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
|
153 |
-
src="<?php echo $prev_img_url . '?date=' . date('Y-m-y H:i:s'); ?>">
|
154 |
-
</td>
|
155 |
-
<td>
|
156 |
-
<a onclick="wdi_spider_set_input_value('task', 'edit');
|
157 |
-
wdi_spider_set_input_value('page_number', '1');
|
158 |
-
wdi_spider_set_input_value('search_value', '');
|
159 |
-
wdi_spider_set_input_value('search_or_not', '');
|
160 |
-
wdi_spider_set_input_value('asc_or_desc', 'asc');
|
161 |
-
wdi_spider_set_input_value('order_by', 'order');
|
162 |
-
wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
163 |
-
wdi_spider_form_submit(event, 'sliders_form')" href=""
|
164 |
-
title="Edit"><?php echo $row_data->feed_name; ?>
|
165 |
-
</a>
|
166 |
-
</td>
|
167 |
-
<td class="table_big_col" style="padding-left: 0; padding-right: 0;">
|
168 |
-
<input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
|
169 |
-
onclick="wdi_spider_select_value(this)" size="11" readonly="readonly"
|
170 |
-
style="padding-left: 1px; padding-right: 1px;"/>
|
171 |
-
</td>
|
172 |
-
<td class="table_large_col" style="padding-left: 0; padding-right: 0;">
|
173 |
-
<input type="text" value="<?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?>"
|
174 |
-
onclick="wdi_spider_select_value(this)" size="23" readonly="readonly"
|
175 |
-
style="padding-left: 1px; padding-right: 1px;"/>
|
176 |
-
</td>
|
177 |
-
<td class="table_big_col"><a
|
178 |
-
onclick="wdi_spider_set_input_value('task', '<?php echo $published; ?>');wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');wdi_spider_form_submit(event, 'sliders_form')"
|
179 |
-
href=""><img src="<?php echo WDI_URL . '/images/' . $published_image . '.png'; ?>"></img></a></td>
|
180 |
-
<td class="table_big_col"><a onclick="wdi_spider_set_input_value('task', 'edit');
|
181 |
-
wdi_spider_set_input_value('page_number', '1');
|
182 |
-
wdi_spider_set_input_value('search_value', '');
|
183 |
-
wdi_spider_set_input_value('search_or_not', '');
|
184 |
-
wdi_spider_set_input_value('asc_or_desc', 'asc');
|
185 |
-
wdi_spider_set_input_value('order_by', 'order');
|
186 |
-
wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
187 |
-
wdi_spider_form_submit(event, 'sliders_form')" href="">Edit</a></td>
|
188 |
-
<td class="table_big_col"><a
|
189 |
-
onclick="if (confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){
|
190 |
-
wdi_spider_set_input_value('task', 'delete');
|
191 |
-
wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
192 |
-
wdi_spider_form_submit(event, 'sliders_form');
|
193 |
-
}" href="">Delete</a></td>
|
194 |
-
</tr>
|
195 |
<?php
|
196 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
-
|
199 |
-
|
200 |
-
</
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
</
|
208 |
<?php
|
209 |
}
|
210 |
|
@@ -255,7 +273,7 @@ class WDIViewFeeds_wdi
|
|
255 |
"elements" => array(
|
256 |
array(
|
257 |
//'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
258 |
-
'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in
|
259 |
'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Usernames and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s', __('Add usernames or hashtags to your feed. Hashtags must start with #, usernames shouldn\'t start with @.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
260 |
),
|
261 |
array(
|
@@ -273,8 +291,7 @@ class WDIViewFeeds_wdi
|
|
273 |
"section_name"=>"wdi_layout",
|
274 |
"elements" => array(
|
275 |
array(
|
276 |
-
'feed_display_view' => array('name' => 'feed_display_view', 'title' => __('New Media Loading', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('pagination' => __('Pagination', "wd-instagram-feed"), 'load_more_btn' => __('Load More Button', "wd-instagram-feed"), 'infinite_scroll' => __('Infinite Scroll', "wd-instagram-feed"), 'none' => __('None', "wd-instagram-feed")),'disabled_options' => array('infinite_scroll'),'disabled' => array('text' => __("Infinite Scroll option is available only in
|
277 |
-
|
278 |
'number_of_columns' => array('name' => 'number_of_columns', 'title' => __('Number of Columns', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
|
279 |
'number_of_photos' => array('name' => 'number_of_photos', 'title' => __('Number of Images/Videos', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images/videos to show when feed is loaded first time', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
280 |
'load_more_number' => array('name' => 'load_more_number', 'title' => __('Number of New Media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of new media added to the feed, when user clicks on load more button or triggers infinite scroll', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
@@ -294,7 +311,7 @@ class WDIViewFeeds_wdi
|
|
294 |
"section_name"=>"wdi_advanced",
|
295 |
"elements" => array(
|
296 |
array(
|
297 |
-
'theme_id' => array('switched' => 'off', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Changing Theme is available only in
|
298 |
'feed_resolution' => array('name' => 'feed_resolution', 'title' => __('Feed Media Resolution', "wd-instagram-feed"), 'type' => 'select', 'label' => array('text' => '', 'place' => 'after'), 'valid_options' => array('optimal' => 'Optimal', 'standard' => 'Standard (640 pixels)', 'low' => 'Low (320 pixels)', 'thumbnail' => 'Thumbnail (150 pixels)'), 'tooltip' => 'If set optimal, loaded media size is calculated according to container size. Fast loading and no stretched images.', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
299 |
'thumb_user' => array('name' => 'thumb_user', 'title' => __('Featured Image', "wd-instagram-feed"), 'valid_options' => array(), 'type' => 'select', 'tooltip' => __('Select featured image for header section', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
300 |
'display_header' => array('name' => 'display_header', 'title' => __('Show Feed Header', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Header includes feed title and featured image', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
@@ -302,10 +319,10 @@ class WDIViewFeeds_wdi
|
|
302 |
'follow_on_instagram_btn' => array('name' => 'follow_on_instagram_btn', 'title' => __('Show "Follow On Instagram" button', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
303 |
'display_user_post_follow_number' => array('name' => 'display_user_post_follow_number', 'title' => __('Show User Posts and Followers count', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
304 |
'display_user_info' => array('name' => 'display_user_info', 'title' => __('Show User Bio', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('User bio will be displayed if feed has only one user', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
305 |
-
'show_description' => array('switched' => 'off', 'name' => 'show_description', 'title' => __('Show Media Caption', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
306 |
-
'show_likes' => array('switched' => 'off', 'name' => 'show_likes', 'title' => __('Show Number of Likes', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
307 |
-
'show_comments' => array('switched' => 'off', 'name' => 'show_comments', 'title' => __('Show Number of Comments', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
308 |
-
'show_username_on_thumb' => array('switched' => 'off', 'name' => 'show_username_on_thumb', 'title' => __('Show Username On Image Thumb', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
309 |
'show_full_description' => array('name' => 'show_full_description', 'title' => __('Show Full Description', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Discription will be shown no matter how long it is', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'masonry'))),
|
310 |
)
|
311 |
)
|
@@ -323,7 +340,7 @@ class WDIViewFeeds_wdi
|
|
323 |
'popup_fullscreen' => array('name' => 'popup_fullscreen', 'title' => __('Full width lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
|
324 |
'popup_width' => array('name' => 'popup_width', 'title' => __('Lightbox Width', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
325 |
'popup_height' => array('name' => 'popup_height', 'title' => __('Lightbox Height', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
326 |
-
'popup_type' => array('name' => 'popup_type', 'title' => __('Lightbox Effect', "wd-instagram-feed"), 'valid_options' => array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blinde Vertical', 'random' => 'Random'), 'disabled_options' => array('cubeH', 'cubeV', 'sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV', 'random'), 'disabled' => array('text' => __("Effects are available only in
|
327 |
),
|
328 |
array(
|
329 |
'popup_autoplay' => array('name' => 'popup_autoplay', 'title' => __('Lightbox autoplay', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_interval'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
@@ -338,22 +355,22 @@ class WDIViewFeeds_wdi
|
|
338 |
"section_name"=>"wdi_lightbox_advanced",
|
339 |
"elements" => array(
|
340 |
array(
|
341 |
-
'popup_enable_filmstrip' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
342 |
'popup_filmstrip_height' => array('name' => 'popup_filmstrip_height', 'title' => __('Filmstrip Thumbnail Size', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
343 |
'autohide_lightbox_navigation' => array('name' => 'autohide_lightbox_navigation', 'title' => __('Show Next / Previous Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('On Hover', "wd-instagram-feed"), '0' => __('Always', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
344 |
-
'popup_info_always_show' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_always_show', 'title' => __('Caption Displayed by Default', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
345 |
-
'popup_info_full_width' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_full_width', 'title' => __('Full Width Caption', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
346 |
'enable_loop' => array('name' => 'enable_loop', 'title' => __('Enable Loop', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
347 |
'popup_image_right_click' => array('name' => 'popup_image_right_click', 'title' => __('Right Click Protection', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => __('Protect lightbox images from downloading', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
348 |
),
|
349 |
array(
|
350 |
'popup_enable_ctrl_btn' => array('name' => 'popup_enable_ctrl_btn', 'title' => __('Enable Control Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_enable_info,popup_enable_fullscreen,popup_enable_info,popup_enable_comment,popup_enable_download,popup_enable_share_buttons,popup_enable_fullsize_image'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
351 |
-
'popup_enable_info' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_enable_info', 'title' => __('Enable Caption Control', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
352 |
'popup_enable_fullscreen' => array('name' => 'popup_enable_fullscreen', 'title' => __('Show Fullscreen Control Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
353 |
-
'popup_enable_comment' => array('switched' => 'off', 'disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
354 |
'popup_enable_fullsize_image' => array('name' => 'popup_enable_fullsize_image', 'title' => __('Add Link to Instagram Post', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
355 |
'popup_enable_download' => array('name' => 'popup_enable_download', 'title' => __('Enable Download Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
356 |
-
'popup_enable_share_buttons' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in
|
357 |
'popup_enable_facebook' => array('status' => 'disabled', 'name' => 'popup_enable_facebook', 'title' => __('Enable Facebook button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
358 |
'popup_enable_twitter' => array('status' => 'disabled', 'name' => 'popup_enable_twitter', 'title' => __('Enable Twitter button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
359 |
'popup_enable_google' => array('status' => 'disabled', 'name' => 'popup_enable_google', 'title' => __('Enable Google+ button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
@@ -366,7 +383,7 @@ class WDIViewFeeds_wdi
|
|
366 |
),
|
367 |
"conditional_filters" => array(
|
368 |
"" => array(
|
369 |
-
"title" => __("This is free version, Conditional filters are available only in
|
370 |
"type" => "full",
|
371 |
"column" => "one",
|
372 |
"visibility" =>"show",
|
@@ -418,7 +435,7 @@ public function genarateFeedViews()
|
|
418 |
<label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png', __FILE__); ?>"></label>
|
419 |
</div>
|
420 |
|
421 |
-
<div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In
|
422 |
<div style="text-align:center;padding:2px;"><input type="radio" disabled id="masonry" name="feed_type"
|
423 |
value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label>
|
424 |
</div>
|
@@ -426,7 +443,7 @@ public function genarateFeedViews()
|
|
426 |
src="<?php echo plugins_url('../../images/feed_views/masonry.png', __FILE__); ?>"></label>
|
427 |
</div>
|
428 |
|
429 |
-
<div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In
|
430 |
<div style="text-align:center;padding:2px;"><input disabled type="radio" id="blog_style" name="feed_type"
|
431 |
value="blog_style"><label for="blog_style"
|
432 |
class="wdi_pro_only">Blog
|
@@ -451,40 +468,40 @@ public function genarateFeedViews()
|
|
451 |
public function generateTabs()
|
452 |
{
|
453 |
?>
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
</div>
|
459 |
-
<div class="wdi_feed_tabs" id="wdi_lightbox_settings" onclick="wdi_controller.switchFeedTabs('lightbox_settings');">
|
460 |
-
<span class="dashicons dashicons-before dashicons-admin-page"></span>
|
461 |
-
<span class="wdi_feed_tab_title"><?php _e('Lightbox Settings', "wd-instagram-feed") ?></span>
|
462 |
-
</div>
|
463 |
-
<div class="wdi_feed_tabs" id="wdi_conditional_filters" onclick="wdi_controller.switchFeedTabs('conditional_filters');">
|
464 |
-
<span class="dashicons dashicons-before dashicons-filter"></span>
|
465 |
-
<span class="wdi_feed_tab_title"><?php _e('Conditional Filters', "wd-instagram-feed") ?></span>
|
466 |
-
</div>
|
467 |
-
<div class="wdi_feed_tabs" id="wdi_how_to_publish" onclick="wdi_controller.switchFeedTabs('how_to_publish');">
|
468 |
-
<span class="dashicons dashicons-before dashicons-editor-help"></span>
|
469 |
-
<span class="wdi_feed_tab_title"><?php _e('How To Publish Feed', "wd-instagram-feed") ?></span>
|
470 |
-
</div>
|
471 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
<?php
|
473 |
}
|
474 |
|
475 |
public function generateForm($current_id = ''){
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
|
485 |
$formInfo = $this->getFormElements($current_id);
|
486 |
$tabs = $formInfo['tabs'];
|
487 |
-
|
488 |
|
489 |
global $wdi_options;
|
490 |
//for edit
|
@@ -496,41 +513,41 @@ public function genarateFeedViews()
|
|
496 |
else {
|
497 |
$feed_row = '';
|
498 |
}
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
|
504 |
?>
|
505 |
-
|
506 |
<span class="wdi_help_bar_text">
|
507 |
<?php _e('Here You Can Change Feed Parameters.', "wd-instagram-feed"); ?>
|
508 |
-
|
509 |
-
|
510 |
</span>
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
</div>
|
520 |
</div>
|
|
|
521 |
<div class="wrap">
|
522 |
<h2 class="wdi-h2-message"></h2>
|
523 |
<form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
|
|
530 |
</div>
|
531 |
-
|
532 |
-
|
533 |
-
<?php $this->genarateFeedViews(); ?>
|
534 |
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
535 |
<input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
|
536 |
<input type="hidden" id="task" name='task'>
|
@@ -548,8 +565,8 @@ public function genarateFeedViews()
|
|
548 |
<input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
|
549 |
<div class="form-table">
|
550 |
<?php foreach ($tabs as $key => $tab) { ?>
|
551 |
-
|
552 |
-
|
553 |
$section_class = "wdi_section_open";
|
554 |
if(isset($section["visibility"]) && $section["visibility"]==="show"){
|
555 |
$section_class = "wdi_section_close";
|
@@ -611,7 +628,7 @@ public function genarateFeedViews()
|
|
611 |
</div><?php
|
612 |
}
|
613 |
?>
|
614 |
-
|
615 |
</form>
|
616 |
</div>
|
617 |
</div>
|
29 |
global $wdi_options;
|
30 |
$rows_data = $this->model->get_rows_data();
|
31 |
$page_nav = $this->model->page_nav();
|
32 |
+
$search_value = "";
|
33 |
+
if(isset($_POST['search_value'])){
|
34 |
+
$search_value =esc_html(stripslashes($_POST['search_value']));
|
35 |
+
}elseif (isset($_GET["search"])){
|
36 |
+
$search_value =esc_html(stripslashes($_GET["search"]));
|
37 |
+
}
|
38 |
+
|
39 |
+
$asc_or_desc = ((isset($_GET['order'])) ? esc_html(stripslashes($_GET['order'])) : 'asc');
|
40 |
+
$order_by = (isset($_GET['order_by']) ? esc_html(stripslashes($_GET['order_by'])) : 'id');
|
41 |
+
if($order_by==="feed_name"){
|
42 |
+
$wdi_sort = " sorted ";
|
43 |
+
}else{
|
44 |
+
$wdi_sort = " sortable ";
|
45 |
+
}
|
46 |
+
$order_class = 'manage-column column-title '.$wdi_sort . $asc_or_desc;
|
47 |
$ids_string = '';
|
48 |
+
$wdi_button_array = array(
|
49 |
+
'publish_all' => __('Publish', 'wdi'),
|
50 |
+
'unpublish_all' => __('Unpublish', 'wdi'),
|
51 |
+
'duplicate_all' => __('Duplicate', 'wdi'),
|
52 |
+
'delete_all' => __('Delete', 'wdi'),
|
53 |
+
);
|
54 |
?>
|
55 |
+
<div class="wrap">
|
56 |
+
<h2 class="wdi_page_title"></h2>
|
57 |
+
<div class="update-nag wdi_help_bar_wrap">
|
58 |
+
<span class="wdi_help_bar_text">
|
59 |
+
<?php _e('This section allows you to create, edit and delete Feeds.', "wd-instagram-feed"); ?>
|
60 |
+
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
61 |
+
href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</span>
|
63 |
+
<div class="wdi_hb_buy_pro">
|
64 |
+
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
65 |
+
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
66 |
+
<?php _e("Support Forum", "gmwd"); ?>
|
67 |
+
</a>
|
68 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
69 |
+
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
70 |
+
</a>
|
71 |
+
</div>
|
|
|
|
|
|
|
|
|
72 |
</div>
|
73 |
+
<form class="wrap" id="sliders_form" method="post" action="admin.php?page=wdi_feeds"
|
74 |
+
style="float: left; width: 99%;">
|
75 |
+
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
76 |
+
<input type="hidden" id="wdi_access_token" name="access_token"
|
77 |
+
value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
|
78 |
+
|
79 |
+
<h1 class="wp-heading-inline"><?php _e('Feeds', "wd-instagram-feed"); ?></h1>
|
80 |
<?php
|
81 |
+
$add_page_data = array(
|
82 |
+
'task' => 'add'
|
83 |
+
);
|
84 |
?>
|
85 |
+
<a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', "wd-instagram-feed"); ?></a>
|
86 |
+
<div class="tablenav top">
|
87 |
+
<?php
|
88 |
+
WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'sliders_form');
|
89 |
+
?>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div class="tablenav top">
|
93 |
+
<div class="alignleft actions bulkactions">
|
94 |
+
<select class="bulk_action">
|
95 |
+
<option value=""><?php _e('Bulk Actions', 'wd-instagram-feed'); ?></option>
|
96 |
+
<?php
|
97 |
+
foreach ($wdi_button_array as $key => $value) {
|
98 |
+
?>
|
99 |
+
<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
</select>
|
104 |
+
<input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
|
105 |
+
</div>
|
106 |
+
<?php
|
107 |
+
WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'sliders_form');
|
108 |
+
?>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<table class="wp-list-table widefat fixed pages media">
|
112 |
+
<thead>
|
113 |
+
<td class="manage-column column-cb check-column"><input id="check_all" type="checkbox" onclick="wdi_spider_check_all(this)"/></td>
|
114 |
+
|
115 |
+
<th class="column-primary table_large_col <?php
|
116 |
echo $order_class;
|
117 |
+
?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
<?php
|
119 |
+
if($asc_or_desc==="asc"){
|
120 |
+
$wdi_order = 'desc';
|
121 |
+
}else{
|
122 |
+
$wdi_order = 'asc';
|
123 |
+
}
|
124 |
+
?>
|
125 |
+
<a href="<?php echo WDILibrary::get_page_link(array('order_by'=>'feed_name', 'order'=>$wdi_order));?>">
|
126 |
+
<span><?php _e('Title', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
|
127 |
+
</a>
|
128 |
+
</th>
|
129 |
+
<th class="table_big_col"><?php _e('Shortcode', "wd-instagram-feed"); ?></th>
|
130 |
+
<th class="table_large_col"><?php _e('PHP function', "wd-instagram-feed"); ?></th>
|
131 |
+
</thead>
|
132 |
+
<tbody id="tbody_arr">
|
133 |
+
<?php
|
134 |
+
if ($rows_data) {
|
135 |
+
$instagram_preview_post = $this->model->get_instagram_preview_post();
|
136 |
+
|
137 |
+
foreach ($rows_data as $row_data) {
|
138 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
139 |
+
$published_image = (($row_data->published) ? 'publish' : 'unpublish');
|
140 |
+
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
141 |
+
$prev_img_url = $this->model->get_slider_prev_img($row_data->id);
|
142 |
+
$edit_page_data = array(
|
143 |
+
'task' => 'edit',
|
144 |
+
'current_id' => $row_data->id,
|
145 |
+
);
|
146 |
+
$wdi_nonce_wd = wp_create_nonce('nonce_wd');
|
147 |
+
?>
|
148 |
+
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
149 |
+
<th class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
|
150 |
+
name="check_<?php echo $row_data->id; ?>"
|
151 |
+
onclick="wdi_spider_check_all(this)" type="checkbox"/>
|
152 |
+
</th>
|
153 |
+
<td class="column-primary column-title" data-colname="Name">
|
154 |
+
<strong>
|
155 |
+
<a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
|
156 |
+
title="Edit">
|
157 |
+
<span class="media-icon image-icon">
|
158 |
+
<img title="<?php echo $row_data->feed_name; ?>"
|
159 |
+
style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
|
160 |
+
src="<?php echo $prev_img_url . '?date=' . date('Y-m-y H:i:s'); ?>">
|
161 |
+
</span>
|
162 |
+
<?php echo $row_data->feed_name; ?>
|
163 |
+
</a>
|
164 |
+
<?php
|
165 |
+
if ( !$row_data->published ) {
|
166 |
+
?>
|
167 |
+
—
|
168 |
+
<span class="post-state"><?php _e('Unpublished', "wd-instagram-feed"); ?></span>
|
169 |
+
<?php
|
170 |
+
}
|
171 |
+
|
172 |
+
?>
|
173 |
+
</strong>
|
174 |
+
<div class="row-actions">
|
175 |
+
<span>
|
176 |
+
<a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
|
177 |
+
title="Edit"><?php _e('Edit', "wd-instagram-feed"); ?>
|
178 |
+
</a>
|
179 |
+
|
|
180 |
+
</span>
|
181 |
+
<span>
|
182 |
+
<a href="<?php echo WDILibrary::get_page_link(array('task'=>'duplicate','current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>"><?php _e('Duplicate', "wd-instagram-feed"); ?></a>
|
183 |
+
|
|
184 |
+
</span>
|
185 |
+
<span>
|
186 |
+
<a href="<?php echo WDILibrary::get_page_link(array('task'=>$published,'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>" ><?php echo ( $row_data->published ? __('Unpublish', "wd-instagram-feed") : __('Publish', "wd-instagram-feed")); ?></a>
|
187 |
+
|
|
188 |
+
</span>
|
189 |
+
<span class="trash">
|
190 |
+
<a onclick="if (!confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){return false;}" href="<?php echo WDILibrary::get_page_link(array('task'=>"delete",'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>">Delete</a>
|
191 |
+
|
|
192 |
+
</span>
|
193 |
+
<span>
|
194 |
+
<a href="<?php echo add_query_arg( array('feed_id' => $row_data->id), $instagram_preview_post); ?>" target="_blank"><?php _e('Preview', "wd-instagram-feed"); ?></a>
|
195 |
+
</span>
|
196 |
+
</div>
|
197 |
+
<button class="toggle-row" type="button">
|
198 |
+
<span class="screen-reader-text"><?php _e('Show more details', "wd-instagram-feed"); ?></span>
|
199 |
+
</button>
|
200 |
+
</td>
|
201 |
+
<td class="table_big_col" data-colname="Shortcode" >
|
202 |
+
<input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
|
203 |
+
onclick="wdi_spider_select_value(this)" size="12" readonly="readonly"
|
204 |
+
style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
|
205 |
+
</td>
|
206 |
+
<td class="table_large_col" data-colname="PHP function" >
|
207 |
+
<input type="text" value="<?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?>"
|
208 |
+
onclick="wdi_spider_select_value(this)" size="30" readonly="readonly"
|
209 |
+
style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
|
210 |
+
</td>
|
211 |
+
</tr>
|
212 |
+
<?php
|
213 |
+
$ids_string .= $row_data->id . ',';
|
214 |
+
}
|
215 |
}
|
216 |
+
?>
|
217 |
+
</tbody>
|
218 |
+
</table>
|
219 |
+
<input id="task" name="task" type="hidden" value=""/>
|
220 |
+
<input id="current_id" name="current_id" type="hidden" value=""/>
|
221 |
+
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
222 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
|
223 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
|
224 |
+
</form>
|
225 |
+
</div>
|
226 |
<?php
|
227 |
}
|
228 |
|
273 |
"elements" => array(
|
274 |
array(
|
275 |
//'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
276 |
+
'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in premium version", "wd-instagram-feed")), 'name' => 'liked_feed', 'title' => __('Feed Media', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array('liked' => 'feed_users,thumb_user'), 'tooltip' => __('Display media of User/Hashtag or the media I liked', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
277 |
'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Usernames and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s', __('Add usernames or hashtags to your feed. Hashtags must start with #, usernames shouldn\'t start with @.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
278 |
),
|
279 |
array(
|
291 |
"section_name"=>"wdi_layout",
|
292 |
"elements" => array(
|
293 |
array(
|
294 |
+
'feed_display_view' => array('name' => 'feed_display_view', 'title' => __('New Media Loading', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('pagination' => __('Pagination', "wd-instagram-feed"), 'load_more_btn' => __('Load More Button', "wd-instagram-feed"), 'infinite_scroll' => __('Infinite Scroll', "wd-instagram-feed"), 'none' => __('None', "wd-instagram-feed")),'disabled_options' => array('infinite_scroll'),'disabled' => array('text' => __("Infinite Scroll option is available only in premium version", "wd-instagram-feed")), 'break' => 'true', 'hide_ids' => array('pagination' => 'number_of_photos,load_more_number,resort_after_load_more', 'load_more_btn' => 'pagination_per_page_number,pagination_preload_number', 'infinite_scroll' => 'pagination_per_page_number,pagination_preload_number', 'none' => 'pagination_preload_number,pagination_per_page_number,load_more_number,resort_after_load_more'), 'tooltip' => __('How to load and display new images/videos', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
|
|
295 |
'number_of_columns' => array('name' => 'number_of_columns', 'title' => __('Number of Columns', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
|
296 |
'number_of_photos' => array('name' => 'number_of_photos', 'title' => __('Number of Images/Videos', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images/videos to show when feed is loaded first time', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
297 |
'load_more_number' => array('name' => 'load_more_number', 'title' => __('Number of New Media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of new media added to the feed, when user clicks on load more button or triggers infinite scroll', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
311 |
"section_name"=>"wdi_advanced",
|
312 |
"elements" => array(
|
313 |
array(
|
314 |
+
'theme_id' => array('switched' => 'off', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Changing Theme is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'theme_id', 'title' => __('Theme', "wd-instagram-feed"), 'valid_options' => $themes, 'type' => 'select', 'tooltip' => __('Styling theme of the feed. You can create themes in themes menu', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
315 |
'feed_resolution' => array('name' => 'feed_resolution', 'title' => __('Feed Media Resolution', "wd-instagram-feed"), 'type' => 'select', 'label' => array('text' => '', 'place' => 'after'), 'valid_options' => array('optimal' => 'Optimal', 'standard' => 'Standard (640 pixels)', 'low' => 'Low (320 pixels)', 'thumbnail' => 'Thumbnail (150 pixels)'), 'tooltip' => 'If set optimal, loaded media size is calculated according to container size. Fast loading and no stretched images.', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
316 |
'thumb_user' => array('name' => 'thumb_user', 'title' => __('Featured Image', "wd-instagram-feed"), 'valid_options' => array(), 'type' => 'select', 'tooltip' => __('Select featured image for header section', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
317 |
'display_header' => array('name' => 'display_header', 'title' => __('Show Feed Header', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Header includes feed title and featured image', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
319 |
'follow_on_instagram_btn' => array('name' => 'follow_on_instagram_btn', 'title' => __('Show "Follow On Instagram" button', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
320 |
'display_user_post_follow_number' => array('name' => 'display_user_post_follow_number', 'title' => __('Show User Posts and Followers count', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
321 |
'display_user_info' => array('name' => 'display_user_info', 'title' => __('Show User Bio', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('User bio will be displayed if feed has only one user', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
322 |
+
'show_description' => array('switched' => 'off', 'name' => 'show_description', 'title' => __('Show Media Caption', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
323 |
+
'show_likes' => array('switched' => 'off', 'name' => 'show_likes', 'title' => __('Show Number of Likes', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
324 |
+
'show_comments' => array('switched' => 'off', 'name' => 'show_comments', 'title' => __('Show Number of Comments', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
|
325 |
+
'show_username_on_thumb' => array('switched' => 'off', 'name' => 'show_username_on_thumb', 'title' => __('Show Username On Image Thumb', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
|
326 |
'show_full_description' => array('name' => 'show_full_description', 'title' => __('Show Full Description', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Discription will be shown no matter how long it is', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'masonry'))),
|
327 |
)
|
328 |
)
|
340 |
'popup_fullscreen' => array('name' => 'popup_fullscreen', 'title' => __('Full width lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
|
341 |
'popup_width' => array('name' => 'popup_width', 'title' => __('Lightbox Width', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
342 |
'popup_height' => array('name' => 'popup_height', 'title' => __('Lightbox Height', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
343 |
+
'popup_type' => array('name' => 'popup_type', 'title' => __('Lightbox Effect', "wd-instagram-feed"), 'valid_options' => array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blinde Vertical', 'random' => 'Random'), 'disabled_options' => array('cubeH', 'cubeV', 'sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV', 'random'), 'disabled' => array('text' => __("Effects are available only in premium version", "wd-instagram-feed")), 'type' => 'select', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
344 |
),
|
345 |
array(
|
346 |
'popup_autoplay' => array('name' => 'popup_autoplay', 'title' => __('Lightbox autoplay', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_interval'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
355 |
"section_name"=>"wdi_lightbox_advanced",
|
356 |
"elements" => array(
|
357 |
array(
|
358 |
+
'popup_enable_filmstrip' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_filmstrip', 'title' => __('Enable Filmstrip', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_filmstrip_height'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
359 |
'popup_filmstrip_height' => array('name' => 'popup_filmstrip_height', 'title' => __('Filmstrip Thumbnail Size', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
360 |
'autohide_lightbox_navigation' => array('name' => 'autohide_lightbox_navigation', 'title' => __('Show Next / Previous Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('On Hover', "wd-instagram-feed"), '0' => __('Always', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
361 |
+
'popup_info_always_show' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_always_show', 'title' => __('Caption Displayed by Default', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
362 |
+
'popup_info_full_width' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_full_width', 'title' => __('Full Width Caption', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
363 |
'enable_loop' => array('name' => 'enable_loop', 'title' => __('Enable Loop', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
364 |
'popup_image_right_click' => array('name' => 'popup_image_right_click', 'title' => __('Right Click Protection', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => __('Protect lightbox images from downloading', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
365 |
),
|
366 |
array(
|
367 |
'popup_enable_ctrl_btn' => array('name' => 'popup_enable_ctrl_btn', 'title' => __('Enable Control Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_enable_info,popup_enable_fullscreen,popup_enable_info,popup_enable_comment,popup_enable_download,popup_enable_share_buttons,popup_enable_fullsize_image'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
368 |
+
'popup_enable_info' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_enable_info', 'title' => __('Enable Caption Control', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => 'Yes', '0' => 'No'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
369 |
'popup_enable_fullscreen' => array('name' => 'popup_enable_fullscreen', 'title' => __('Show Fullscreen Control Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
370 |
+
'popup_enable_comment' => array('switched' => 'off', 'disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_comment', 'title' => __('Enable Comments Control', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
371 |
'popup_enable_fullsize_image' => array('name' => 'popup_enable_fullsize_image', 'title' => __('Add Link to Instagram Post', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
372 |
'popup_enable_download' => array('name' => 'popup_enable_download', 'title' => __('Enable Download Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
373 |
+
'popup_enable_share_buttons' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_share_buttons', 'title' => __('Show Share Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
374 |
'popup_enable_facebook' => array('status' => 'disabled', 'name' => 'popup_enable_facebook', 'title' => __('Enable Facebook button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
375 |
'popup_enable_twitter' => array('status' => 'disabled', 'name' => 'popup_enable_twitter', 'title' => __('Enable Twitter button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
376 |
'popup_enable_google' => array('status' => 'disabled', 'name' => 'popup_enable_google', 'title' => __('Enable Google+ button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
|
383 |
),
|
384 |
"conditional_filters" => array(
|
385 |
"" => array(
|
386 |
+
"title" => __("This is free version, Conditional filters are available only in premium version", "wd-instagram-feed"),
|
387 |
"type" => "full",
|
388 |
"column" => "one",
|
389 |
"visibility" =>"show",
|
435 |
<label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png', __FILE__); ?>"></label>
|
436 |
</div>
|
437 |
|
438 |
+
<div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
|
439 |
<div style="text-align:center;padding:2px;"><input type="radio" disabled id="masonry" name="feed_type"
|
440 |
value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label>
|
441 |
</div>
|
443 |
src="<?php echo plugins_url('../../images/feed_views/masonry.png', __FILE__); ?>"></label>
|
444 |
</div>
|
445 |
|
446 |
+
<div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
|
447 |
<div style="text-align:center;padding:2px;"><input disabled type="radio" id="blog_style" name="feed_type"
|
448 |
value="blog_style"><label for="blog_style"
|
449 |
class="wdi_pro_only">Blog
|
468 |
public function generateTabs()
|
469 |
{
|
470 |
?>
|
471 |
+
<div id="wdi_feed_tabs">
|
472 |
+
<div class="wdi_feed_tabs" id="wdi_feed_settings" onclick="wdi_controller.switchFeedTabs('feed_settings');">
|
473 |
+
<span class="dashicons dashicons-before dashicons-admin-generic"></span>
|
474 |
+
<span class="wdi_feed_tab_title"><?php _e('Feed Settings', "wd-instagram-feed") ?></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
</div>
|
476 |
+
<div class="wdi_feed_tabs" id="wdi_lightbox_settings" onclick="wdi_controller.switchFeedTabs('lightbox_settings');">
|
477 |
+
<span class="dashicons dashicons-before dashicons-admin-page"></span>
|
478 |
+
<span class="wdi_feed_tab_title"><?php _e('Lightbox Settings', "wd-instagram-feed") ?></span>
|
479 |
+
</div>
|
480 |
+
<div class="wdi_feed_tabs" id="wdi_conditional_filters" onclick="wdi_controller.switchFeedTabs('conditional_filters');">
|
481 |
+
<span class="dashicons dashicons-before dashicons-filter"></span>
|
482 |
+
<span class="wdi_feed_tab_title"><?php _e('Conditional Filters', "wd-instagram-feed") ?></span>
|
483 |
+
</div>
|
484 |
+
<div class="wdi_feed_tabs" id="wdi_how_to_publish" onclick="wdi_controller.switchFeedTabs('how_to_publish');">
|
485 |
+
<span class="dashicons dashicons-before dashicons-editor-help"></span>
|
486 |
+
<span class="wdi_feed_tab_title"><?php _e('How To Publish Feed', "wd-instagram-feed") ?></span>
|
487 |
+
</div>
|
488 |
+
</div>
|
489 |
<?php
|
490 |
}
|
491 |
|
492 |
public function generateForm($current_id = ''){
|
493 |
+
if ( $current_id==="" ) {
|
494 |
+
$wdi_preview_btn = false;
|
495 |
+
$save_btn_name = __('Publish', "wd-instagram-feed");
|
496 |
+
}
|
497 |
+
else {
|
498 |
+
$wdi_preview_btn = true;
|
499 |
+
$save_btn_name = __('Update', "wd-instagram-feed");
|
500 |
+
}
|
501 |
|
502 |
$formInfo = $this->getFormElements($current_id);
|
503 |
$tabs = $formInfo['tabs'];
|
504 |
+
$wdi_preview_link = $this->model->get_instagram_preview_post();
|
505 |
|
506 |
global $wdi_options;
|
507 |
//for edit
|
513 |
else {
|
514 |
$feed_row = '';
|
515 |
}
|
516 |
+
$feed_row_id = "";
|
517 |
+
if(isset($feed_row["id"])){
|
518 |
+
$feed_row_id = $feed_row["id"];
|
519 |
+
}
|
520 |
|
521 |
?>
|
522 |
+
<div class="update-nag wdi_help_bar_wrap">
|
523 |
<span class="wdi_help_bar_text">
|
524 |
<?php _e('Here You Can Change Feed Parameters.', "wd-instagram-feed"); ?>
|
525 |
+
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
526 |
+
href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
527 |
</span>
|
528 |
+
<div class="wdi_hb_buy_pro">
|
529 |
+
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
530 |
+
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
531 |
+
<?php _e("Support Forum", "gmwd"); ?>
|
532 |
+
</a>
|
533 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
534 |
+
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
535 |
+
</a>
|
|
|
536 |
</div>
|
537 |
+
</div>
|
538 |
<div class="wrap">
|
539 |
<h2 class="wdi-h2-message"></h2>
|
540 |
<form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
|
541 |
+
<div class="wdi-page-header">
|
542 |
+
<h1 class="wp-heading-inline"><?php echo __('Feed Title', "wd-instagram-feed")?></h1>
|
543 |
+
<input id="WDI_feed_name" class="WDI_title_input" name="wdi_feed_settings[feed_name]" type="text" value="<?php echo ($edit == true && isset($feed_row['feed_name'])) ? $feed_row['feed_name'] : "Sample Feed";?>">
|
544 |
+
<div class="wdi_buttons">
|
545 |
+
<div id="wdi_save_feed_apply" class="button button-primary"><?php echo $save_btn_name;?></div>
|
546 |
+
<button class="button preview-button button-large"<?php if (!$wdi_preview_btn) echo ' disabled="disabled"' ?> <?php echo ($wdi_preview_btn) ? 'onclick="window.open(\''. add_query_arg( array('feed_id' => $feed_row_id), $wdi_preview_link ) .'\', \'_blank\'); return false;"' : ''; ?>><?php echo __('Preview', "wd-instagram-feed");?></button>
|
547 |
+
</div>
|
548 |
</div>
|
549 |
+
<?php $this->generateTabs(); ?>
|
550 |
+
<?php $this->genarateFeedViews(); ?>
|
|
|
551 |
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
552 |
<input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
|
553 |
<input type="hidden" id="task" name='task'>
|
565 |
<input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
|
566 |
<div class="form-table">
|
567 |
<?php foreach ($tabs as $key => $tab) { ?>
|
568 |
+
<div id="<?php echo $key; ?>_tab" class="wdi_tab" style="<?php echo $key == "feed_settings" ? "display:block;" : ""; ?>">
|
569 |
+
<?php foreach ($tab as $key => $section) {
|
570 |
$section_class = "wdi_section_open";
|
571 |
if(isset($section["visibility"]) && $section["visibility"]==="show"){
|
572 |
$section_class = "wdi_section_close";
|
628 |
</div><?php
|
629 |
}
|
630 |
?>
|
631 |
+
</div>
|
632 |
</form>
|
633 |
</div>
|
634 |
</div>
|
admin/views/WDIViewLicensing_wdi.php
CHANGED
@@ -27,7 +27,7 @@ class WDIViewLicensing_wdi {
|
|
27 |
<div class="update-nag wdi_help_bar_wrap">
|
28 |
<div class="wdi_hb_buy_pro">
|
29 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
30 |
-
<?php _e("UPGRADE TO
|
31 |
</a>
|
32 |
</div>
|
33 |
</div>
|
@@ -91,7 +91,7 @@ class WDIViewLicensing_wdi {
|
|
91 |
<span> <?php _e('Only Bug Fixes',"wd-instagram-feed"); ?> </span>
|
92 |
</div>
|
93 |
<div id="featurs_table3">
|
94 |
-
<span><?php _e("
|
95 |
|
96 |
<span class="yes"></span>
|
97 |
<span class="yes"></span>
|
27 |
<div class="update-nag wdi_help_bar_wrap">
|
28 |
<div class="wdi_hb_buy_pro">
|
29 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
30 |
+
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
31 |
</a>
|
32 |
</div>
|
33 |
</div>
|
91 |
<span> <?php _e('Only Bug Fixes',"wd-instagram-feed"); ?> </span>
|
92 |
</div>
|
93 |
<div id="featurs_table3">
|
94 |
+
<span><?php _e("PREMIUM Version", 'wd-instagram-feed'); ?></span>
|
95 |
|
96 |
<span class="yes"></span>
|
97 |
<span class="yes"></span>
|
admin/views/WDIViewSettings_wdi.php
CHANGED
@@ -56,7 +56,7 @@ private $model;
|
|
56 |
<?php _e("Support Forum", "gmwd"); ?>
|
57 |
</a>
|
58 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
59 |
-
<?php _e("UPGRADE TO
|
60 |
</a>
|
61 |
</div>
|
62 |
</div>
|
56 |
<?php _e("Support Forum", "gmwd"); ?>
|
57 |
</a>
|
58 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
59 |
+
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
60 |
</a>
|
61 |
</div>
|
62 |
</div>
|
admin/views/WDIViewThemes_wdi.php
CHANGED
@@ -36,13 +36,13 @@ class WDIViewThemes_wdi {
|
|
36 |
<?php _e("Support Forum", "gmwd"); ?>
|
37 |
</a>
|
38 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
39 |
-
<?php _e("UPGRADE TO
|
40 |
</a>
|
41 |
</div>
|
42 |
</div>
|
43 |
|
44 |
|
45 |
-
<div class="wdi_pro_notice"> <?php _e("This is free version, Customizing themes is available only in
|
46 |
|
47 |
|
48 |
<?php
|
36 |
<?php _e("Support Forum", "gmwd"); ?>
|
37 |
</a>
|
38 |
<a class="wdi_update_pro_link" target="_blank" href="https://web-dorado.com/files/fromInstagramFeedWD.php">
|
39 |
+
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
40 |
</a>
|
41 |
</div>
|
42 |
</div>
|
43 |
|
44 |
|
45 |
+
<div class="wdi_pro_notice"> <?php _e("This is free version, Customizing themes is available only in premium version","wd-instagram-feed"); ?> </div>
|
46 |
|
47 |
|
48 |
<?php
|
changelog.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 1.2.15 =
|
2 |
Added: "How to publish feed" tab in feeds editor screen
|
3 |
Added: Closeable metaboxes in feeds editor screen
|
1 |
+
= 1.2.16 =
|
2 |
+
New: Instagram slideshow is supported in popup
|
3 |
+
New: UX of feeds and themes admin screen, it is now similar to posts list screen
|
4 |
+
New: Inline actions for feeds and themes in admin list view
|
5 |
+
Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching.
|
6 |
+
Improved: Popup is faster now and less data is being sent via AJAX
|
7 |
+
|
8 |
= 1.2.15 =
|
9 |
Added: "How to publish feed" tab in feeds editor screen
|
10 |
Added: Closeable metaboxes in feeds editor screen
|
css/default_theme.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wdi_feed_theme_1 .wdi_feed_wrapper{width:100%;background-color:#FFFFFF;text-align:left}.wdi_feed_theme_1 .wdi_feed_header{margin:0px;padding:5px;border:0px solid #DDDDDD;text-align:left}.wdi_feed_theme_1 .wdi_header_text{font-size:18px;font-style:normal;padding:5px;color:#0f4973;font-weight:400;line-height:40px}.wdi_feed_theme_1 .wdi_single_user{padding-top:5px;padding-bottom:5px;padding-left:5px;padding-right:5px}.wdi_feed_theme_1 .wdi_header_hashtag h3{margin-top:11px}.wdi_feed_theme_1 .wdi_header_user_text h3{font-size:18px;font-style:normal;line-height:18px;color:#0f4973;}.wdi_feed_theme_1 .wdi_user_img_wrap img{height:40px;width:40px;border-radius:40px}.wdi_feed_theme_1 .wdi_media_info{margin-left:50px;line-height:18px;color:#0f4973}.wdi_feed_theme_1 .wdi_bio{color:#0f4973;font-size:14px}.wdi_feed_theme_1 .wdi_follow_btn{border-radius:3px;font-size:18px;background-color:#ffffff;border-color:#0f4973;color:#0f4973;margin-left:10px;padding:0 25px}.wdi_feed_theme_1 .wdi_follow_btn:hover{border-color:#0f4973;color:#0f4973;background-color:#ffffff}.wdi_feed_theme_1 .wdi_filter_overlay{width:40px;height:40px;border-radius:40px;background-color:#125688}.wdi_feed_theme_1 .wdi_filter_icon span{width:40px;height:40px}.wdi_feed_theme_1 .wdi_load_more_text{color:#1e73be;font-size:14px}.wdi_feed_theme_1 .wdi_load_more_text img{height:90px;width:90px}.wdi_feed_theme_1 .wdi_load_more_wrap:hover{background-color:transparent}.wdi_feed_theme_1 .wdi_pagination{text-align:center;color:#0f4973;font-size:18px}.wdi_feed_theme_1 .wdi_pagination_ctrl{margin:15px}.wdi_feed_theme_1 .wdi_pagination_ctrl:hover{color:#25292c}.wdi_feed_theme_1 .wdi_filter_active_col{color:#429fff;border-color:#429fff}.wdi_feed_thumbnail_1 .wdi_feed_container{width:100%;background-color:#FFFFFF;border-bottom:5px solid #FFFFFF;}.wdi_feed_thumbnail_1 .wdi_header_img_wrap{height:40px;width:40px;border-radius:0px}.wdi_feed_thumbnail_1 .wdi_photo_wrap{padding:5px;width:calc(100% - 2 *5px)}.wdi_feed_thumbnail_1 .wdi_photo_wrap_inner{border:5px solid #ffffff;background-color:#FFFFFF}.wdi_feed_thumbnail_1 .wdi_photo_img{border-radius:0px}.wdi_feed_thumbnail_1 .wdi_photo_meta{background-color:#FFFFFF}.wdi_feed_thumbnail_1 .wdi_thumb_likes{width:50%;float:left;font-size:13px;;color:#8a8d8e}.wdi_feed_thumbnail_1 .wdi_thumb_comments{width:50%;float:left;font-size:13px;;color:#8a8d8e}.wdi_feed_thumbnail_1 .wdi_photo_title{font-size:14px;color:#125688}.wdi_feed_thumbnail_1 .wdi_photo_title:hover{color:#8e8e8e}.wdi_feed_thumbnail_1 .wdi_load_more_spinner{color:#1e73be;font-size:18.2px}.wdi_feed_thumbnail_1 .wdi_load_more,.wdi_feed_thumbnail_1 .wdi_spinner{background-color:#FFFFFF;text-align:center}.wdi_feed_thumbnail_1 .wdi_load_more_wrap,.wdi_feed_thumbnail_1 .wdi_spinner_wrap{padding:4px;background-color:#ffffff;border-radius:500px;height:90px;width:90px;border:1px solid #0f4973;}.wdi_feed_thumbnail_1 .wdi_photo_overlay:hover{background-color:rgba(18,86,136,0.5)}.wdi_feed_thumbnail_1 .wdi_photo_overlay i{font-size:25px}.wdi_feed_thumbnail_1 .wdi_photo_overlay:hover i{color:#FFFFFF}.wdi_feed_thumbnail_1 .wdi_photo_img:hover img{-webkit-transform:translateX(-50%) translateY(-50%) none;-moz-transform:translateX(-50%) translateY(-50%) none;-ms-transform:translateX(-50%) translateY(-50%) none;-o-transform:translateX(-50%) translateY(-50%) none;transform:translateX(-50%) translateY(-50%) none}.wdi_feed_thumbnail_1 .wdi_filter_active_bg{background-color:#429fff}.wdi_feed_thumbnail_1 .wdi_media_user{color:#FFFFFF;;background-color:#429FFF;}.wdi_feed_masonry_1 .wdi_feed_container{width:100%;background-color:#FFFFFF;border-bottom:5px solid #FFFFFF;}.wdi_feed_masonry_1 .wdi_header_img_wrap,.wdi_feed_masonry_1 .wdi_users_img_wrap{height:40px;width:40px;border-radius:0px}.wdi_feed_masonry_1 .wdi_photo_wrap{padding:5px}.wdi_feed_masonry_1 .wdi_photo_wrap_inner{border:0px solid gray;background-color:#FFFFFF}.wdi_feed_masonry_1 .wdi_photo_img{border-radius:0px}.wdi_feed_masonry_1 .wdi_photo_meta{background-color:#FFFFFF}.wdi_feed_masonry_1 .wdi_thumb_likes{width:50%;float:left;font-size:13px;;color:#8a8d8e}.wdi_feed_masonry_1 .wdi_thumb_comments{width:50%;float:left;font-size:13px;;color:#8a8d8e}.wdi_feed_masonry_1 .wdi_photo_title{font-size:14px;color:#125688}.wdi_feed_masonry_1 .wdi_photo_title:hover{color:#8e8e8e}.wdi_feed_masonry_1 .wdi_load_more_spinner{color:#1e73be;font-size:21px}.wdi_feed_masonry_1 .wdi_load_more,.wdi_feed_masonry_1 .wdi_spinner{background-color:#FFFFFF;text-align:center}.wdi_feed_masonry_1 .wdi_load_more_wrap,.wdi_feed_masonry_1 .wdi_spinner_wrap{padding:4px;background-color:#ffffff;border-radius:500px;height:90px;width:90px;border:1px solid #0f4973;}.wdi_feed_masonry_1 .wdi_photo_overlay:hover{background-color:rgba(18,86,136,0.5)}.wdi_feed_masonry_1 .wdi_photo_overlay i{font-size:25px}.wdi_feed_masonry_1 .wdi_photo_overlay:hover i{color:#FFFFFF}.wdi_feed_masonry_1 .wdi_photo_img:hover img{transform:none}.wdi_feed_masonry_1 .wdi_filter_active_bg{background-color:#429fff}.wdi_feed_masonry_1 .wdi_media_user{color:#FFFFFF;;background-color:#429FFF;}.wdi_feed_blog_1 .wdi_feed_container{width:100%;background-color:#FFFFFF}.wdi_feed_blog_1 .wdi_header_img_wrap,.wdi_feed_blog_1 .wdi_users_img_wrap{height:40px;width:40px;border-radius:0px}.wdi_feed_blog_1 .wdi_photo_wrap{padding:5px}.wdi_feed_blog_1 .wdi_photo_wrap_inner{border:0px solid gray;background-color:#FFFFFF}.wdi_feed_blog_1 .wdi_photo_img{border-radius:0px}.wdi_feed_blog_1 .wdi_photo_meta{background-color:#FFFFFF}.wdi_feed_blog_1 .wdi_thumb_likes{width:50%;float:left;font-size:20px;;color:#8a8d8e}.wdi_feed_blog_1 .wdi_thumb_comments{width:50%;float:left;font-size:20px;;color:#8a8d8e}.wdi_feed_blog_1 .wdi_photo_title{font-size:16px;color:#125688}.wdi_feed_blog_1 .wdi_photo_title:hover{color:#8e8e8e}.wdi_feed_blog_1 .wdi_load_more_spinner{color:#1e73be;font-size:21px}.wdi_feed_blog_1 .wdi_load_more,.wdi_feed_blog_1 .wdi_spinner{background-color:#FFFFFF;text-align:center}.wdi_feed_blog_1 .wdi_load_more_wrap,.wdi_feed_blog_1 .wdi_spinner_wrap{padding:4px;background-color:#ffffff;border-radius:500px;height:90px;width:90px;border:1px solid #0f4973;}.wdi_feed_browser_1 .wdi_feed_container{width:100%;background-color:#FFFFFF;border-bottom:5px solid #FFFFFF;}.wdi_feed_browser_1 .wdi_header_img_wrap,.wdi_feed_browser_1 .wdi_users_img_wrap{height:40px;width:40px;border-radius:0px}.wdi_feed_browser_1 .wdi_photo_wrap{padding:5px}.wdi_feed_browser_1 .wdi_photo_wrap_inner{border:0px solid gray;background-color:#FFFFFF}.wdi_feed_browser_1 .wdi_photo_img{border-radius:0px}.wdi_feed_browser_1 .wdi_photo_meta{background-color:#FFFFFF}.wdi_feed_browser_1 .wdi_thumb_likes{width:50%;float:left;font-size:20px;;color:#8a8d8e}.wdi_feed_browser_1 .wdi_thumb_comments{width:50%;float:left;font-size:20px;;color:#8a8d8e}.wdi_feed_browser_1 .wdi_photo_title{font-size:16px;color:#125688}.wdi_feed_browser_1 .wdi_photo_title:hover{color:#8e8e8e}.wdi_feed_browser_1 .wdi_load_more{background-color:#FFFFFF;text-align:center}.wdi_feed_browser_1 .wdi_load_more_wrap{padding:4px;background-color:#ffffff;border-radius:500px;height:90px;width:90px;border:1px solid #0f4973;}.wdi_spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wdi_feed_theme_1 .wdi_spider_popup_overlay{background-color:#25292c;opacity:0.9}.wdi_lightbox_theme_1.wdi_spider_popup_wrap{background-color:#ffffff;display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.wdi_lightbox_theme_1 .wdi_ctrl_btn{color:#FFFFFF;font-size:20px;margin:10px 7px;opacity:1.00;filter:Alpha(opacity=100)}.wdi_lightbox_theme_1 .wdi_toggle_btn{color:#FFFFFF;font-size:14px;margin:0;opacity:1.00;filter:Alpha(opacity=100);padding:0}.wdi_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.wdi_lightbox_theme_1 .wdi_ctrl_btn_container{background-color:rgba(42,91,131,0.80);bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;height:40px;position:absolute;text-align:center;width:100%;z-index:10150}.wdi_lightbox_theme_1 .wdi_toggle_container{background:none repeat scroll 0 0 #2a5b83;border-top-left-radius:4px;border-top-right-radius:4px;border-radius:4px;bottom:40px;cursor:pointer;left:50%;line-height:0;margin-left:-50px;opacity:0.80;filter:Alpha(opacity=80);position:absolute;text-align:center;width:100px;z-index:10150}.wdi_lightbox_theme_1 .wdi_close_btn{opacity:1.00;filter:Alpha(opacity=100)}.wdi_lightbox_theme_1 .wdi_spider_popup_close{background-color:#2a5b83;border-radius:16px;border:2px none #FFFFFF;box-shadow:none;color:#FFFFFF;height:20px;font-size:15px;right:-10px;top:-10px;width:20px}.wdi_lightbox_theme_1 .wdi_spider_popup_close_fullscreen{color:#000000;font-size:15px;right:15px}.wdi_spider_popup_close span,#wdi_spider_popup_left-ico span,#wdi_spider_popup_right-ico span{display:table-cell;text-align:center;vertical-align:middle}.wdi_lightbox_theme_1 #wdi_spider_popup_left-ico,.wdi_lightbox_theme_1 #wdi_spider_popup_right-ico{background-color:#2a5b83;border-radius:20px;border:0px none #FFFFFF;box-shadow:none;color:#FFFFFF;height:40px;font-size:20px;width:40px;opacity:0.80;filter:Alpha(opacity=80)}.wdi_lightbox_theme_1 .wdi_ctrl_btn:hover,.wdi_lightbox_theme_1 .wdi_toggle_btn:hover,.wdi_lightbox_theme_1 #wdi_spider_popup_left-ico:hover,.wdi_lightbox_theme_1 #wdi_spider_popup_right-ico:hover{color:#25292c;cursor:pointer}.wdi_lightbox_theme_1 .wdi_spider_popup_close:hover,.wdi_lightbox_theme_1 .wdi_spider_popup_close_fullscreen:hover{color:#000000;cursor:pointer}.wdi_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.wdi_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.wdi_embed_frame{text-align:center}.wdi_comment_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.wdi_lightbox_theme_1 .wdi_comment_container{-moz-box-sizing:border-box;background-color:#ffffff;color:#000000;font-size:12px;font-family:segoe ui;height:100%;overflow:hidden;position:absolute;right:-400px;top:0;width:400px;z-index:10103}.wdi_lightbox_theme_1 .wdi_comments{bottom:0;font-size:12px;font-family:segoe ui;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.wdi_comments p,.wdi_comment_body_p{margin:5px !important;text-align:left;word-wrap:break-word;word-break:break-word}.wdi_no_comment{text-align:center !important}.wdi_lightbox_theme_1 .wdi_comments input[type="submit"]{background:none repeat scroll 0 0 #616161;border:1px none #666666;border-radius:3px;color:#000000;cursor:pointer;padding:3px 10px}.wdi_lightbox_theme_1 .wdi_comments input[type="text"],.wdi_lightbox_theme_1 .wdi_comments textarea{background:none repeat scroll 0 0 #333333;border:1px none #666666;border-radius:0px;color:#000000;padding:2px;width:100%}.wdi_comments textarea{resize:vertical}.wdi_lightbox_theme_1 .wdi_comment_header_p{border-top:1px solid #125688}.wdi_lightbox_theme_1 .wdi_comment_header{margin-top:2px;display:inline-block;color:#000000;font-size:14px}.wdi_lightbox_theme_1 .wdi_comment_date{color:#000000;float:right;font-size:10px}.wdi_lightbox_theme_1 .wdi_comment_body{color:#000000;font-size:12px}.wdi_comment_delete_btn{color:#FFFFFF;cursor:pointer;float:right;font-size:14px;margin:2px}.wdi_lightbox_theme_1 .wdi_comments_close{cursor:pointer;line-height:0;position:absolute;font-size:13px;text-align:left;margin:5px;left:0;top:0;background-color:#ffffff;z-index:10202}.wdi_comments_close i{z-index:10201}.wdi_comment_textarea::-webkit-scrollbar{width:4px}.wdi_comment_textarea::-webkit-scrollbar-track{}.wdi_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.55);border-radius:2px}.wdi_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#D9D9D9}.wdi_ctrl_btn_container a,.wdi_ctrl_btn_container a:hover{text-decoration:none}.wdi_facebook:hover{color:#3B5998 !important;cursor:pointer}.wdi_twitter:hover{color:#4099FB !important;cursor:pointer}.wdi_google:hover{color:#DD4B39 !important;cursor:pointer}.wdi_pinterest:hover{color:#cb2027 !important;cursor:pointer}.wdi_tumblr:hover{color:#2F5070 !important;cursor:pointer}.wdi_linkedin:hover{color:#0077B5 !important;cursor:pointer}.wdi_lightbox_theme_1 .wdi_facebook,.wdi_lightbox_theme_1 .wdi_twitter,.wdi_lightbox_theme_1 .wdi_google,.wdi_lightbox_theme_1 .wdi_pinterest,.wdi_lightbox_theme_1 .wdi_tumblr,.wdi_lightbox_theme_1 .wdi_linkedin{color:#ffffff !important}.wdi_lightbox_theme_1 .wdi_thumb_active{opacity:1;filter:Alpha(opacity=100);border:0px solid #FFFFFF}.wdi_lightbox_theme_1 .wdi_thumb_deactive{opacity:0.70;filter:Alpha(opacity=70)}.wdi_lightbox_theme_1 .wdi_filmstrip_thumbnail_img{display:block;opacity:1;filter:Alpha(opacity=100)}.wdi_lightbox_theme_1 .wdi_filmstrip_left i,.wdi_lightbox_theme_1 .wdi_filmstrip_right i{color:#FFFFFF;font-size:20px}.wdi_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wdi_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.wdi_slide_bg{margin:0 auto;width:inherit;height:inherit}.wdi_slider{height:inherit;width:inherit}.wdi_popup_image_spun{height:inherit;display:table-cell;filter:Alpha(opacity=100);opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.wdi_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;filter:Alpha(opacity=0);opacity:0;position:absolute;vertical-align:middle;z-index:1}.wdi_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.wdi_gridlet{opacity:1;filter:Alpha(opacity=100);position:absolute}.wdi_lightbox_theme_1 .wdi_image_info_spun{text-align:right;vertical-align:top}.wdi_lightbox_theme_1 .wdi_image_title,.wdi_lightbox_theme_1 .wdi_image_title *{color:#FFFFFF !important;font-family:segoe ui;font-size:13px;font-weight:bold}.wdi_lightbox_theme_1 .wdi_image_description,.wdi_lightbox_theme_1 .wdi_image_description *{color:#FFFFFF !important;font-family:segoe ui;font-size:14px;font-weight:normal}.wdi_title{display:inline-table}.wdi_title:hover{cursor:pointer}.wdi_title .wdi_users_img_wrap{width:50px;display:table-cell;vertical-align:middle;float:right;padding-left:10px;overflow:hidden}.wdi_title .wdi_users_img_wrap img{width:100%}.wdi_title .wdi_header_text{display:table-cell;vertical-align:middle;word-break:break-all}.wdi_lightbox_theme_1 .wdi_share_btns{position:absolute;top:-115%;width:150px;border-radius:3px;left:-150%;margin:0;z-index:200000;background-color:rgba(42,91,131,0.80)}.wdi_share_btns_container{position:relative;display:inline-block}.wdi_lightbox_theme_1 .wdi_share_popup_btn{color:#FFFFFF;padding:3px;opacity:1.00;filter:Alpha(opacity=100);font-size:20px}.wdi_lightbox_theme_1 .wdi_share_caret{font-size:15px;color:#2a5b83;opacity:0.80;position:absolute;top:-25px;left:13px}.wdi_share_toggler{display:block !important}.wdi_facebook_btn:hover{color:#45619D}.wdi_facebook_btn:hover{color:#4099FB}.wdi_lightbox_theme_1 .wdi_comment_header a,.wdi_lightbox_theme_1 .wdi_comment_header a:visited{color:#125688 !important}.wdi_lightbox_theme_1 .wdi_comm_text_link,.wdi_lightbox_theme_1 a.wdi_comm_text_link:visited{color:#125688!important}.wdi_lightbox_theme_1 .wdi_comment_header a:hover,.wdi_lightbox_theme_1 a.wdi_comm_text_link:hover{text-decoration:none;color:#002160!important}.wdi_lightbox_theme_1 .wdi_load_more_comments{display:inline-block;color:#125688;background-color:#ffffff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;font-family:'Verdana',sans-serif;text-transform:capitalize;font-size:17px}.wdi_lightbox_theme_1 .wdi_load_more_comments:hover{color:#000000;cursor:pointer}.wdi_popup_image{vertical-align:middle;display:inline-block}.wdi_popup_embed{vertical-align:middle;text-align:center;display:inline-block}.wdi_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.wdi_lightbox_theme_1 .wdi_filmstrip_container{display:table;position:absolute;z-index:10105;top:0}.wdi_filmstrip{overflow:hidden;position:absolute;z-index:10106}.wdi_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.wdi_lightbox_theme_1 .wdi_filmstrip_thumbnail{position:relative;background:none;border:1px solid #25292c;border-radius:0px;cursor:pointer;float:left;margin:0 1px;overflow:hidden}.wdi_lightbox_theme_1 .wdi_filmstrip_left{background-color:#3B3B3B;cursor:pointer;display:table-cell;vertical-align:middle;z-index:10106}.wdi_lightbox_theme_1 .wdi_filmstrip_right{background-color:#3B3B3B;cursor:pointer;right:0;display:table-cell;vertical-align:middle;z-index:10106}.wdi_lightbox_theme_1 .wdi_image_info{background:rgba(59,59,59,0.80);border:1px none #3b3b3b;border-radius:5px;padding:5px;overflow:auto}@media (max-width:480px){.wdi_image_count_container{display:none}.wdi_image_title,.wdi_image_title *{font-size:12px}.wdi_image_description,.wdi_image_description *{font-size:10px}}.wdi_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}
|
css/wdi_backend.css
CHANGED
@@ -706,10 +706,6 @@ border: 1px solid rgb(185, 185, 185);
|
|
706 |
margin-left: -400px !important;
|
707 |
}
|
708 |
|
709 |
-
.wrap * {
|
710 |
-
font-size: 12px;
|
711 |
-
font-family: sans-serif;
|
712 |
-
}
|
713 |
|
714 |
.input_th {
|
715 |
margin-left: 0px !important;
|
@@ -772,25 +768,13 @@ border: 1px solid rgb(185, 185, 185);
|
|
772 |
vertical-align: top;
|
773 |
}
|
774 |
|
775 |
-
|
776 |
-
text-align: center !important;
|
777 |
-
width: 45px;
|
778 |
-
}
|
779 |
|
780 |
.table_medium_col {
|
781 |
text-align: center !important;
|
782 |
width: 70px;
|
783 |
}
|
784 |
|
785 |
-
.table_big_col {
|
786 |
-
text-align: center !important;
|
787 |
-
width: 80px;
|
788 |
-
}
|
789 |
-
|
790 |
-
.table_large_col {
|
791 |
-
text-align: center !important;
|
792 |
-
width: 140px;
|
793 |
-
}
|
794 |
|
795 |
.table_medium_col_uncenter {
|
796 |
width: 80px;
|
@@ -1189,9 +1173,6 @@ border: 1px solid rgb(185, 185, 185);
|
|
1189 |
z-index: 99998;
|
1190 |
}
|
1191 |
|
1192 |
-
.widefat .check-column {
|
1193 |
-
text-align: center;
|
1194 |
-
}
|
1195 |
|
1196 |
.wds_tabs {
|
1197 |
clear: both;
|
@@ -1577,6 +1558,7 @@ border: 1px solid rgb(185, 185, 185);
|
|
1577 |
flex-direction: column;
|
1578 |
margin: 5px;
|
1579 |
min-width: 250px;
|
|
|
1580 |
padding: 20px 10px;
|
1581 |
text-align: center;
|
1582 |
}
|
706 |
margin-left: -400px !important;
|
707 |
}
|
708 |
|
|
|
|
|
|
|
|
|
709 |
|
710 |
.input_th {
|
711 |
margin-left: 0px !important;
|
768 |
vertical-align: top;
|
769 |
}
|
770 |
|
771 |
+
|
|
|
|
|
|
|
772 |
|
773 |
.table_medium_col {
|
774 |
text-align: center !important;
|
775 |
width: 70px;
|
776 |
}
|
777 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
|
779 |
.table_medium_col_uncenter {
|
780 |
width: 80px;
|
1173 |
z-index: 99998;
|
1174 |
}
|
1175 |
|
|
|
|
|
|
|
1176 |
|
1177 |
.wds_tabs {
|
1178 |
clear: both;
|
1558 |
flex-direction: column;
|
1559 |
margin: 5px;
|
1560 |
min-width: 250px;
|
1561 |
+
max-width: calc(25% - 20px);
|
1562 |
padding: 20px 10px;
|
1563 |
text-align: center;
|
1564 |
}
|
css/wdi_backend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:calc(100% - 22px)}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.wrap *{font-size:12px;font-family:sans-serif}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_small_col{text-align:center !important;width:45px}.table_medium_col{text-align:center !important;width:70px}.table_big_col{text-align:center !important;width:80px}.table_large_col{text-align:center !important;width:140px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.widefat .check-column{text-align:center}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}
|
1 |
+
.wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:calc(100% - 22px)}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center !important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}
|
css/wdi_frontend.css
CHANGED
@@ -893,3 +893,50 @@ div[id^="wdi_container"] p {
|
|
893 |
.wdi_image_container img{
|
894 |
display:inline;
|
895 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
.wdi_image_container img{
|
894 |
display:inline;
|
895 |
}
|
896 |
+
|
897 |
+
|
898 |
+
/*Carousel*/
|
899 |
+
.wdi_carousel_btn_container {
|
900 |
+
height: 20px;
|
901 |
+
position: absolute;
|
902 |
+
width: 100%;
|
903 |
+
bottom: 40px;
|
904 |
+
z-index: 10150;
|
905 |
+
font-size: 0;
|
906 |
+
}
|
907 |
+
.wdi_carousel_btn_container span {
|
908 |
+
background:rgba(255, 255, 255, 0.5);
|
909 |
+
width: 10px;
|
910 |
+
height: 10px;
|
911 |
+
display: inline-block;
|
912 |
+
border-radius: 5px;
|
913 |
+
cursor: pointer;
|
914 |
+
margin-right: 9px;
|
915 |
+
position:relative;
|
916 |
+
left:0;
|
917 |
+
transition:left .3s;
|
918 |
+
-webkit-transition:left .3s;
|
919 |
+
-moz-transition:left .3s;
|
920 |
+
}
|
921 |
+
.wdi_carousel_btn_container span.active {
|
922 |
+
background: #ffffff;
|
923 |
+
}
|
924 |
+
.wdi_carousel_btn_container span.small {
|
925 |
+
width: 7px;
|
926 |
+
height: 7px;
|
927 |
+
margin-right: 12px;
|
928 |
+
top: -2px;
|
929 |
+
}
|
930 |
+
.wdi_carousel_btn_content {
|
931 |
+
display: inline-block;
|
932 |
+
/*width: 250px;*/
|
933 |
+
overflow: hidden;
|
934 |
+
white-space: nowrap;
|
935 |
+
position:relative;
|
936 |
+
padding: 8px 9px;
|
937 |
+
background: rgba(0, 0, 0, 0.17);
|
938 |
+
border-radius: 21px;
|
939 |
+
}
|
940 |
+
.wdi_image_container .carousel_media:not(.active){
|
941 |
+
display:none;
|
942 |
+
}
|
css/wdi_frontend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wdi_clear{clear:both}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.wdi_feed_main_container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_follow_button:hover{cursor:pointer}.wdi_hidden{display:none !important}.wdi_hover_off:hover{background-color:transparent !important}.wdi_cursor_off:hover{cursor:auto !important}.wdi_filter_active span{color:white}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{position:absolute;width:50px;height:50px;left:0;right:0;bottom:-50px;margin:auto;z-index:100}.wdi_feed_main_container{width:100%;position:relative}.wdi_feed_main_container .wdi_img{margin:0}.wdi_feed_main_container .wdi_follow_btn{display:inline-block;background:0;border-style:solid;border-width:1px;font-weight:500;outline:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-appearance:none;vertical-align:text-bottom}.wdi_feed_main_container .wdi_follow_btn:hover{cursor:pointer}.wdi_feed_main_container .wdi_pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_feed_main_container .wdi_pagination_ctrl{display:inline-block}.wdi_feed_main_container .wdi_pagination_ctrl:hover{cursor:pointer}.wdi_feed_main_container .wdi_filter_icon span{display:block;font-size:25px;color:white}.wdi_feed_main_container .wdi_filter_icon span::before{width:20px;height:20px;position:absolute;opacity:1;right:0;left:0;top:0;bottom:0;margin:auto}.wdi_photo_img{position:relative;overflow:hidden}.wdi_photo_overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent;transition:all .1s ease}.wdi_thumb_icon i{display:none;transition:all .1s ease}.wdi_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .fa{font-family:FontAwesome !important;font-style:normal;width:auto}.wdi_media_info .fa:before{margin-right:6px}.wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay{cursor:pointer;background-color:rgba(0,0,0,0.5);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}div[id^="wdi_container"] p{padding:0 !important;margin:0 !important}.wdi_spider_popup_loading,.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_ajax_loading{border:none !important;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay,.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.wdi_spider_popup_close,.wdi_spider_popup_close_fullscreen{-moz-box-sizing:content-box !important;box-sizing:content-box !important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}#wdi_spider_popup_left{left:0}#wdi_spider_popup_right{right:0}#wdi_spider_popup_left:hover,#wdi_spider_popup_right:hover{visibility:visible}#wdi_spider_popup_left:hover span{left:20px}#wdi_spider_popup_right:hover span{left:auto;right:20px}#wdi_spider_popup_left,#wdi_spider_popup_right{background:transparent url("../images/blank.gif") repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#wdi_spider_popup_left-ico,#wdi_spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;left:-9999px;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.wdi_image_info_container1{height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.wdi_image_info{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.wdi_photo_wrap_inner{text-align:center}.wdi_feed_item[wdi_type="slideshow"] .fa-clone{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wdi_js_error_no_animate,.wdi_token_error{text-align:center;font-size:14px}.wdi_js_error{text-align:center;-webkit-animation-name:wdi_js_error;-moz-animation-name:wdi_js_error;-o-animation-name:wdi_js_error;animation-name:wdi_js_error;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:20s;-moz-animation-delay:20s;-o-animation-delay:20s;animation-delay:20s;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;color:#c00;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);font-size:12px}@keyframes wdi_js_error{from{visibility:hidden;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0)}to{visibility:visible;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.wdi_layout_th .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_th .wdi_feed_wrapper{margin:0 auto}.wdi_layout_th .wdi_header_wrapper{display:inline-table}.wdi_layout_th .wdi_header_img_wrap,.wdi_users_img_wrap{overflow:hidden}.wdi_layout_th .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_single_user{display:inline-block;float:left}.wdi_layout_th .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_th .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_th .wdi_followers,.wdi_layout_th .wdi_posts{display:inline-block}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_th .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_th .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_th .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_th .wdi_bio{float:left}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_th .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_th .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_th .wdi_photo_wrap{position:relative;display:inline-block;overflow:hidden;box-sizing:content-box}.wdi_layout_th .wdi_photo_wrap:after{padding-top:100%;display:block;content:""}.wdi_layout_th .wdi_photo_wrap_inner{position:absolute;top:0;bottom:0;left:0;right:0}.wdi_layout_th .wdi_photo_img{width:100%;height:100%}.wdi_layout_th .wdi_img{display:block;position:absolute;top:50%;left:50%;max-width:none;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.wdi_layout_th .wdi_shape_portrait .wdi_img,.wdi_layout_th .wdi_shape_square .wdi_img{width:100%;height:auto}.wdi_layout_th .wdi_shape_landscape .wdi_img{height:100% !important;width:auto}.wdi_layout_th .wdi_feed_item{display:inline-block;vertical-align:top;overflow:hidden}.wdi_layout_th .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_th .wdi_thumb_comments i,.wdi_layout_th .wdi_thumb_likes i{width:100%}.wdi_layout_th .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_th .wdi_photo_title:hover{cursor:pointer}@-moz-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-o-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-ms-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.wdi_layout_th .wdi_load_more_spinner{display:table-cell;vertical-align:middle;-webkit-animation:wdi_rotate 1.5s infinite;-moz-animation:wdi_rotate 1.5s infinite;-o-animation:wdi_rotate 1.5s infinite;animation:wdi_rotate 1.5s infinite}.wdi_layout_th .wdi_load_more,.wdi_layout_th .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_th .wdi_load_more_wrap,.wdi_layout_th .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_th .wdi_load_more_wrap_inner,.wdi_layout_th .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_th .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_load_more_text img{float:left}.wdi_layout_th .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{opacity:1}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_ib .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ib .wdi_feed_wrapper{margin:0 auto}.wdi_layout_ib .wdi_header_wrapper{display:inline-table}.wdi_layout_ib .wdi_header_img_wrap,.wdi_layout_ib .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ib .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_single_user{display:inline-block;float:left}.wdi_layout_ib .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ib .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ib .wdi_followers,.wdi_layout_ib .wdi_posts{display:inline-block}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ib .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ib .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ib .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ib .wdi_bio{float:left}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ib .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ib .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ib .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ib .wdi_img{width:100%;display:block}.wdi_layout_ib .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_ib .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ib .wdi_thumb_comments i,.wdi_layout_ib .wdi_thumb_likes i{width:100%}.wdi_layout_ib .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ib .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more{padding:10px;transition:all .2s ease}.wdi_layout_ib .wdi_load_more_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ib .wdi_load_more_wrap_inner{display:table-row;text-align:center}.wdi_layout_ib .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_load_more_text img{float:left}.wdi_layout_ib .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ib .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more_container{display:inline-block}.wdi_embed_frame video{display:inline-block}.wdi_image_container img{display:inline}
|
1 |
+
.wdi_clear{clear:both}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.wdi_feed_main_container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_follow_button:hover{cursor:pointer}.wdi_hidden{display:none !important}.wdi_hover_off:hover{background-color:transparent !important}.wdi_cursor_off:hover{cursor:auto !important}.wdi_filter_active span{color:white}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{position:absolute;width:50px;height:50px;left:0;right:0;bottom:-50px;margin:auto;z-index:100}.wdi_feed_main_container{width:100%;position:relative}.wdi_feed_main_container .wdi_img{margin:0}.wdi_feed_main_container .wdi_follow_btn{display:inline-block;background:0;border-style:solid;border-width:1px;font-weight:500;outline:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-appearance:none;vertical-align:text-bottom}.wdi_feed_main_container .wdi_follow_btn:hover{cursor:pointer}.wdi_feed_main_container .wdi_pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_feed_main_container .wdi_pagination_ctrl{display:inline-block}.wdi_feed_main_container .wdi_pagination_ctrl:hover{cursor:pointer}.wdi_feed_main_container .wdi_filter_icon span{display:block;font-size:25px;color:white}.wdi_feed_main_container .wdi_filter_icon span::before{width:20px;height:20px;position:absolute;opacity:1;right:0;left:0;top:0;bottom:0;margin:auto}.wdi_photo_img{position:relative;overflow:hidden}.wdi_photo_overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent;transition:all .1s ease}.wdi_thumb_icon i{display:none;transition:all .1s ease}.wdi_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .fa{font-family:FontAwesome !important;font-style:normal;width:auto}.wdi_media_info .fa:before{margin-right:6px}.wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay{cursor:pointer;background-color:rgba(0,0,0,0.5);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}div[id^="wdi_container"] p{padding:0 !important;margin:0 !important}.wdi_spider_popup_loading,.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_ajax_loading{border:none !important;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay,.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.wdi_spider_popup_close,.wdi_spider_popup_close_fullscreen{-moz-box-sizing:content-box !important;box-sizing:content-box !important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}#wdi_spider_popup_left{left:0}#wdi_spider_popup_right{right:0}#wdi_spider_popup_left:hover,#wdi_spider_popup_right:hover{visibility:visible}#wdi_spider_popup_left:hover span{left:20px}#wdi_spider_popup_right:hover span{left:auto;right:20px}#wdi_spider_popup_left,#wdi_spider_popup_right{background:transparent url("../images/blank.gif") repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#wdi_spider_popup_left-ico,#wdi_spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;left:-9999px;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.wdi_image_info_container1{height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.wdi_image_info{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.wdi_photo_wrap_inner{text-align:center}.wdi_feed_item[wdi_type="slideshow"] .fa-clone{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wdi_js_error_no_animate,.wdi_token_error{text-align:center;font-size:14px}.wdi_js_error{text-align:center;-webkit-animation-name:wdi_js_error;-moz-animation-name:wdi_js_error;-o-animation-name:wdi_js_error;animation-name:wdi_js_error;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:20s;-moz-animation-delay:20s;-o-animation-delay:20s;animation-delay:20s;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;color:#c00;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);font-size:12px}@keyframes wdi_js_error{from{visibility:hidden;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0)}to{visibility:visible;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.wdi_layout_th .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_th .wdi_feed_wrapper{margin:0 auto}.wdi_layout_th .wdi_header_wrapper{display:inline-table}.wdi_layout_th .wdi_header_img_wrap,.wdi_users_img_wrap{overflow:hidden}.wdi_layout_th .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_single_user{display:inline-block;float:left}.wdi_layout_th .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_th .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_th .wdi_followers,.wdi_layout_th .wdi_posts{display:inline-block}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_th .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_th .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_th .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_th .wdi_bio{float:left}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_th .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_th .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_th .wdi_photo_wrap{position:relative;display:inline-block;overflow:hidden;box-sizing:content-box}.wdi_layout_th .wdi_photo_wrap:after{padding-top:100%;display:block;content:""}.wdi_layout_th .wdi_photo_wrap_inner{position:absolute;top:0;bottom:0;left:0;right:0}.wdi_layout_th .wdi_photo_img{width:100%;height:100%}.wdi_layout_th .wdi_img{display:block;position:absolute;top:50%;left:50%;max-width:none;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.wdi_layout_th .wdi_shape_portrait .wdi_img,.wdi_layout_th .wdi_shape_square .wdi_img{width:100%;height:auto}.wdi_layout_th .wdi_shape_landscape .wdi_img{height:100% !important;width:auto}.wdi_layout_th .wdi_feed_item{display:inline-block;vertical-align:top;overflow:hidden}.wdi_layout_th .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_th .wdi_thumb_comments i,.wdi_layout_th .wdi_thumb_likes i{width:100%}.wdi_layout_th .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_th .wdi_photo_title:hover{cursor:pointer}@-moz-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-o-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-ms-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.wdi_layout_th .wdi_load_more_spinner{display:table-cell;vertical-align:middle;-webkit-animation:wdi_rotate 1.5s infinite;-moz-animation:wdi_rotate 1.5s infinite;-o-animation:wdi_rotate 1.5s infinite;animation:wdi_rotate 1.5s infinite}.wdi_layout_th .wdi_load_more,.wdi_layout_th .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_th .wdi_load_more_wrap,.wdi_layout_th .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_th .wdi_load_more_wrap_inner,.wdi_layout_th .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_th .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_load_more_text img{float:left}.wdi_layout_th .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{opacity:1}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_ib .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ib .wdi_feed_wrapper{margin:0 auto}.wdi_layout_ib .wdi_header_wrapper{display:inline-table}.wdi_layout_ib .wdi_header_img_wrap,.wdi_layout_ib .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ib .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_single_user{display:inline-block;float:left}.wdi_layout_ib .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ib .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ib .wdi_followers,.wdi_layout_ib .wdi_posts{display:inline-block}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ib .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ib .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ib .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ib .wdi_bio{float:left}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ib .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ib .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ib .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ib .wdi_img{width:100%;display:block}.wdi_layout_ib .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_ib .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ib .wdi_thumb_comments i,.wdi_layout_ib .wdi_thumb_likes i{width:100%}.wdi_layout_ib .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ib .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more{padding:10px;transition:all .2s ease}.wdi_layout_ib .wdi_load_more_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ib .wdi_load_more_wrap_inner{display:table-row;text-align:center}.wdi_layout_ib .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_load_more_text img{float:left}.wdi_layout_ib .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ib .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more_container{display:inline-block}.wdi_embed_frame video{display:inline-block}.wdi_image_container img{display:inline}.wdi_carousel_btn_container{height:20px;position:absolute;width:100%;bottom:40px;z-index:10150;font-size:0}.wdi_carousel_btn_container span{background:rgba(255,255,255,0.5);width:10px;height:10px;display:inline-block;border-radius:5px;cursor:pointer;margin-right:9px;position:relative;left:0;transition:left .3s;-webkit-transition:left .3s;-moz-transition:left .3s}.wdi_carousel_btn_container span.active{background:#fff}.wdi_carousel_btn_container span.small{width:7px;height:7px;margin-right:12px;top:-2px}.wdi_carousel_btn_content{display:inline-block;overflow:hidden;white-space:nowrap;position:relative;padding:8px 9px;background:rgba(0,0,0,0.17);border-radius:21px}.wdi_image_container .carousel_media:not(.active){display:none}
|
framework/WDILibrary.php
CHANGED
@@ -144,23 +144,63 @@ class WDILibrary {
|
|
144 |
break;
|
145 |
|
146 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
|
149 |
}
|
150 |
}
|
151 |
|
|
|
152 |
public static function message($message, $type) {
|
153 |
return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
|
154 |
}
|
155 |
|
156 |
public static function search($search_by, $search_value, $form_id) {
|
157 |
?>
|
158 |
-
<div class="
|
159 |
<script>
|
160 |
function wdi_spider_search() {
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
164 |
}
|
165 |
function wdi_spider_reset() {
|
166 |
if (document.getElementById("search_value")) {
|
@@ -180,14 +220,10 @@ class WDILibrary {
|
|
180 |
return true;
|
181 |
}
|
182 |
</script>
|
183 |
-
|
184 |
-
<
|
185 |
-
<input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
186 |
-
</div>
|
187 |
-
<div class="alignleft actions">
|
188 |
<input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
|
189 |
-
|
190 |
-
</div>
|
191 |
</div>
|
192 |
<?php
|
193 |
}
|
@@ -234,7 +270,7 @@ class WDILibrary {
|
|
234 |
?>
|
235 |
<script type="text/javascript">
|
236 |
var items_county = <?php echo $items_county; ?>;
|
237 |
-
function wdi_spider_page(x, y) {
|
238 |
switch (y) {
|
239 |
case 1:
|
240 |
if (x >= items_county) {
|
@@ -263,19 +299,34 @@ class WDILibrary {
|
|
263 |
}
|
264 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
265 |
}
|
266 |
-
function check_enter_key(e) {
|
267 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
268 |
-
if (key_code == 13) {
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
}
|
277 |
return true;
|
278 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
</script>
|
280 |
<div class="tablenav-pages">
|
281 |
<span class="displaying-num">
|
@@ -286,18 +337,22 @@ class WDILibrary {
|
|
286 |
?>
|
287 |
</span>
|
288 |
<?php
|
|
|
|
|
289 |
if ($count_items > $items_per_page) {
|
290 |
$first_page = "first-page";
|
291 |
$prev_page = "prev-page";
|
292 |
$next_page = "next-page";
|
293 |
$last_page = "last-page";
|
294 |
if ($page_number == 1) {
|
|
|
295 |
$first_page = "first-page disabled";
|
296 |
$prev_page = "prev-page disabled";
|
297 |
$next_page = "next-page";
|
298 |
$last_page = "last-page";
|
299 |
}
|
300 |
if ($page_number >= $items_county) {
|
|
|
301 |
$first_page = "first-page ";
|
302 |
$prev_page = "prev-page";
|
303 |
$next_page = "next-page disabled";
|
@@ -305,18 +360,28 @@ class WDILibrary {
|
|
305 |
}
|
306 |
?>
|
307 |
<span class="pagination-links">
|
308 |
-
|
309 |
-
<a class="<?php echo $
|
|
|
|
|
|
|
|
|
|
|
310 |
<span class="paging-input">
|
311 |
<span class="total-pages">
|
312 |
-
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
313 |
</span> of
|
314 |
<span class="total-pages">
|
315 |
<?php echo $items_county; ?>
|
316 |
</span>
|
317 |
</span>
|
318 |
-
|
319 |
-
<a class="<?php echo $
|
|
|
|
|
|
|
|
|
|
|
320 |
<?php
|
321 |
}
|
322 |
?>
|
@@ -326,7 +391,50 @@ class WDILibrary {
|
|
326 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
327 |
<?php
|
328 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
public static function ajax_search($search_by, $search_value, $form_id) {
|
331 |
?>
|
332 |
<div class="alignleft actions" style="clear:both;">
|
@@ -458,7 +566,7 @@ class WDILibrary {
|
|
458 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
459 |
<span class="paging-input">
|
460 |
<span class="total-pages">
|
461 |
-
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event
|
462 |
</span> of
|
463 |
<span class="total-pages">
|
464 |
<?php echo $items_county; ?>
|
@@ -720,7 +828,7 @@ class WDILibrary {
|
|
720 |
<i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search fa fa-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
|
721 |
</span>
|
722 |
<span class="wdi_search_input_container">
|
723 |
-
<input id="wdi_search_input_<?php echo $current_view; ?>" class="wdi_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event)" name="wdi_search_<?php echo $current_view; ?>" value="<?php echo $wdi_search; ?>" >
|
724 |
<input id="wdi_images_count_<?php echo $current_view; ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
|
725 |
</span>
|
726 |
</div>
|
@@ -952,6 +1060,13 @@ class WDILibrary {
|
|
952 |
}
|
953 |
}
|
954 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
////////////////////////////////////////////////////////////////////////////////////////
|
956 |
// Private Methods //
|
957 |
////////////////////////////////////////////////////////////////////////////////////////
|
144 |
break;
|
145 |
|
146 |
}
|
147 |
+
case 18: {
|
148 |
+
$message = 'Item successfully duplicated.';
|
149 |
+
$type = 'updated';
|
150 |
+
break;
|
151 |
+
|
152 |
+
}
|
153 |
+
case 19: {
|
154 |
+
$message = 'Items successfully Duplicated.';
|
155 |
+
$type = 'updated';
|
156 |
+
break;
|
157 |
+
|
158 |
+
}
|
159 |
+
case 20: {
|
160 |
+
$message = 'Failed.';
|
161 |
+
$type = 'error';
|
162 |
+
break;
|
163 |
+
}
|
164 |
+
case 21: {
|
165 |
+
$message = 'You cannot delete default theme.';
|
166 |
+
$type = 'error';
|
167 |
+
break;
|
168 |
+
}
|
169 |
+
case 22: {
|
170 |
+
$message = 'Cannot Write on database. Check database permissions.';
|
171 |
+
$type = 'error';
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
case 23: {
|
175 |
+
$message = 'Changes have been successfully applied.';
|
176 |
+
$type = 'updated';
|
177 |
+
break;
|
178 |
+
}
|
179 |
+
case 24: {
|
180 |
+
$message = 'You have not made new changes.';
|
181 |
+
$type = 'updated';
|
182 |
+
break;
|
183 |
+
}
|
184 |
}
|
185 |
return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
|
186 |
}
|
187 |
}
|
188 |
|
189 |
+
|
190 |
public static function message($message, $type) {
|
191 |
return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
|
192 |
}
|
193 |
|
194 |
public static function search($search_by, $search_value, $form_id) {
|
195 |
?>
|
196 |
+
<div class="alignright" style="clear:both;">
|
197 |
<script>
|
198 |
function wdi_spider_search() {
|
199 |
+
var wdi_form = jQuery('#<?php echo $form_id; ?>');
|
200 |
+
var wdi_search_text = jQuery("#search_value").val();
|
201 |
+
var wdi_new_url = wdiChangeParamByName(window.location.href, "search", wdi_search_text);
|
202 |
+
wdi_form.attr("action", wdi_new_url);
|
203 |
+
wdi_form.submit();
|
204 |
}
|
205 |
function wdi_spider_reset() {
|
206 |
if (document.getElementById("search_value")) {
|
220 |
return true;
|
221 |
}
|
222 |
</script>
|
223 |
+
<p class="search-box">
|
224 |
+
<input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
|
|
|
|
|
|
225 |
<input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
|
226 |
+
</p>
|
|
|
227 |
</div>
|
228 |
<?php
|
229 |
}
|
270 |
?>
|
271 |
<script type="text/javascript">
|
272 |
var items_county = <?php echo $items_county; ?>;
|
273 |
+
function wdi_spider_page(x, y) {
|
274 |
switch (y) {
|
275 |
case 1:
|
276 |
if (x >= items_county) {
|
299 |
}
|
300 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
301 |
}
|
302 |
+
function check_enter_key(e , _this) {
|
303 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
304 |
+
if (key_code == 13) {
|
305 |
+
var wdi_form = jQuery('#<?php echo $form_id; ?>');
|
306 |
+
/*Enter keycode*/
|
307 |
+
var to_page = jQuery(_this).val();
|
308 |
+
//console.log(to_page);
|
309 |
+
var wdi_new_url = wdiChangeParamByName(window.location.href, "paged", to_page);
|
310 |
+
wdi_form.attr("action", wdi_new_url);
|
311 |
+
wdi_form.submit();
|
312 |
}
|
313 |
return true;
|
314 |
}
|
315 |
+
function wdiChangeParamByName(url, paramName, paramValue){
|
316 |
+
var pattern = new RegExp('(\\?|\\&)('+paramName+'=).*?(&|$)');
|
317 |
+
var newUrl=url;
|
318 |
+
if(url.search(pattern)>=0){
|
319 |
+
if(paramValue===""){
|
320 |
+
newUrl = url.replace(pattern,'');
|
321 |
+
}else {
|
322 |
+
newUrl = url.replace(pattern,'$1$2' + paramValue + '$3');
|
323 |
+
}
|
324 |
+
}
|
325 |
+
else{
|
326 |
+
newUrl = newUrl + (newUrl.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue
|
327 |
+
}
|
328 |
+
return newUrl
|
329 |
+
}
|
330 |
</script>
|
331 |
<div class="tablenav-pages">
|
332 |
<span class="displaying-num">
|
337 |
?>
|
338 |
</span>
|
339 |
<?php
|
340 |
+
$next_last_page = true;
|
341 |
+
$first_prev_page = true;
|
342 |
if ($count_items > $items_per_page) {
|
343 |
$first_page = "first-page";
|
344 |
$prev_page = "prev-page";
|
345 |
$next_page = "next-page";
|
346 |
$last_page = "last-page";
|
347 |
if ($page_number == 1) {
|
348 |
+
$first_prev_page = false;
|
349 |
$first_page = "first-page disabled";
|
350 |
$prev_page = "prev-page disabled";
|
351 |
$next_page = "next-page";
|
352 |
$last_page = "last-page";
|
353 |
}
|
354 |
if ($page_number >= $items_county) {
|
355 |
+
$next_last_page = false;
|
356 |
$first_page = "first-page ";
|
357 |
$prev_page = "prev-page";
|
358 |
$next_page = "next-page disabled";
|
360 |
}
|
361 |
?>
|
362 |
<span class="pagination-links">
|
363 |
+
<?php if($first_prev_page):?>
|
364 |
+
<a class="<?php echo $first_page; ?>" title="Go to the first page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-2);?>">«</a>
|
365 |
+
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-1);?>">‹</a>
|
366 |
+
<?php else:?>
|
367 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">«</span>
|
368 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
|
369 |
+
<?php endif;?>
|
370 |
<span class="paging-input">
|
371 |
<span class="total-pages">
|
372 |
+
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event ,this)" title="Go to the page" type="text" size="1" />
|
373 |
</span> of
|
374 |
<span class="total-pages">
|
375 |
<?php echo $items_county; ?>
|
376 |
</span>
|
377 |
</span>
|
378 |
+
<?php if($next_last_page):?>
|
379 |
+
<a class="<?php echo $next_page ?>" title="Go to the next page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,1);?>">›</a>
|
380 |
+
<a class="<?php echo $last_page ?>" title="Go to the last page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,2);?>">»</a>
|
381 |
+
<?php else:?>
|
382 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">›</span>
|
383 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">»</span>
|
384 |
+
<?php endif;?>
|
385 |
<?php
|
386 |
}
|
387 |
?>
|
391 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
392 |
<?php
|
393 |
}
|
394 |
+
public static function get_pagination_page($items_county, $x, $y){
|
395 |
+
switch ($y) {
|
396 |
+
case 1:
|
397 |
+
if ($x >= $items_county) {
|
398 |
+
$page_number = $items_county;
|
399 |
+
}
|
400 |
+
else {
|
401 |
+
$page_number = $x + 1;
|
402 |
+
}
|
403 |
+
break;
|
404 |
+
case 2:
|
405 |
+
$page_number = $items_county;
|
406 |
+
break;
|
407 |
+
case -1:
|
408 |
+
if ($x == 1) {
|
409 |
+
$page_number = 1;
|
410 |
+
}
|
411 |
+
else {
|
412 |
+
$page_number = $x - 1;
|
413 |
+
}
|
414 |
+
break;
|
415 |
+
case -2:
|
416 |
+
$page_number = 1;
|
417 |
+
break;
|
418 |
+
default:
|
419 |
+
$page_number = 1;
|
420 |
+
}
|
421 |
+
|
422 |
+
$page_link_data = array(
|
423 |
+
"paged" => $page_number
|
424 |
+
);
|
425 |
|
426 |
+
if(isset($_GET["search"]) && !empty($_GET["search"])){
|
427 |
+
$page_link_data['search'] = $_GET["search"];
|
428 |
+
}
|
429 |
+
if(isset($_GET["order_by"]) && !empty($_GET["order_by"])){
|
430 |
+
$page_link_data['order_by'] = $_GET["order_by"];
|
431 |
+
}
|
432 |
+
if(isset($_GET["order"]) && !empty($_GET["order"])){
|
433 |
+
$page_link_data['order'] = $_GET["order"];
|
434 |
+
}
|
435 |
+
return self::get_page_link(array($page_link_data));
|
436 |
+
|
437 |
+
}
|
438 |
public static function ajax_search($search_by, $search_value, $form_id) {
|
439 |
?>
|
440 |
<div class="alignleft actions" style="clear:both;">
|
566 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
567 |
<span class="paging-input">
|
568 |
<span class="total-pages">
|
569 |
+
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
570 |
</span> of
|
571 |
<span class="total-pages">
|
572 |
<?php echo $items_county; ?>
|
828 |
<i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search fa fa-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
|
829 |
</span>
|
830 |
<span class="wdi_search_input_container">
|
831 |
+
<input id="wdi_search_input_<?php echo $current_view; ?>" class="wdi_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event ,this)" name="wdi_search_<?php echo $current_view; ?>" value="<?php echo $wdi_search; ?>" >
|
832 |
<input id="wdi_images_count_<?php echo $current_view; ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
|
833 |
</span>
|
834 |
</div>
|
1060 |
}
|
1061 |
}
|
1062 |
|
1063 |
+
|
1064 |
+
public static function get_page_link($data){
|
1065 |
+
$page = WDILibrary::get('page');
|
1066 |
+
$url = add_query_arg(array( 'page' => $page, $data ), admin_url('admin.php'));
|
1067 |
+
return $url;
|
1068 |
+
}
|
1069 |
+
|
1070 |
////////////////////////////////////////////////////////////////////////////////////////
|
1071 |
// Private Methods //
|
1072 |
////////////////////////////////////////////////////////////////////////////////////////
|
framework/WDILibraryEmbed.php
CHANGED
@@ -378,7 +378,7 @@ class WDILibraryEmbed {
|
|
378 |
*
|
379 |
*/
|
380 |
|
381 |
-
public static function display_embed($embed_type, $embed_id='', $attrs = array()) {
|
382 |
$html_to_insert = '';
|
383 |
|
384 |
switch ($embed_type) {
|
@@ -466,15 +466,33 @@ class WDILibraryEmbed {
|
|
466 |
}
|
467 |
}
|
468 |
$oembed_instagram_html .= " >";
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
$oembed_instagram_html .="</div>";
|
479 |
$html_to_insert .= $oembed_instagram_html;
|
480 |
break;
|
378 |
*
|
379 |
*/
|
380 |
|
381 |
+
public static function display_embed($embed_type, $embed_id='', $attrs = array(), $carousel_media = null) {
|
382 |
$html_to_insert = '';
|
383 |
|
384 |
switch ($embed_type) {
|
466 |
}
|
467 |
}
|
468 |
$oembed_instagram_html .= " >";
|
469 |
+
if(!is_null($carousel_media) && count($carousel_media)){
|
470 |
+
foreach($carousel_media as $key => $media){
|
471 |
+
if($media["type"] == "image"){
|
472 |
+
$oembed_instagram_html .= '<img src="'.$media["images"]["standard_resolution"]["url"].'"'.
|
473 |
+
' style="'.
|
474 |
+
'max-width:'.'100%'." !important".
|
475 |
+
'; max-height:'.'100%'." !important".
|
476 |
+
'; width:'.'auto !important'.
|
477 |
+
'; height:'. 'auto !important' .
|
478 |
+
';" data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">';
|
479 |
+
} elseif($media["type"] == "video"){
|
480 |
+
$oembed_instagram_html .= '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">'.
|
481 |
+
'<source src="'. $media["videos"]["standard_resolution"]["url"] .
|
482 |
+
'" type="video/mp4"> Your browser does not support the video tag. </video>';
|
483 |
+
}
|
484 |
+
}
|
485 |
+
} else {
|
486 |
+
if($embed_id!=''){
|
487 |
+
$oembed_instagram_html .= '<img src="//instagram.com/p/'.$embed_id.'/media/?size=l"'.
|
488 |
+
' style="'.
|
489 |
+
'max-width:'.'100%'." !important".
|
490 |
+
'; max-height:'.'100%'." !important".
|
491 |
+
'; width:'.'auto !important'.
|
492 |
+
'; height:'. 'auto !important' .
|
493 |
+
';">';
|
494 |
+
}
|
495 |
+
}
|
496 |
$oembed_instagram_html .="</div>";
|
497 |
$html_to_insert .= $oembed_instagram_html;
|
498 |
break;
|
frontend/shortcode.php
CHANGED
@@ -38,7 +38,7 @@ function wdi_feed($atts, $widget_params = '')
|
|
38 |
|
39 |
|
40 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
41 |
-
if(isset($_GET["feed_id"]) && $post->post_type === "wdi_instagram"){
|
42 |
$atts["id"] = $_GET["feed_id"];
|
43 |
}
|
44 |
$attributes = shortcode_atts(array(
|
38 |
|
39 |
|
40 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
41 |
+
if(isset($_GET["feed_id"]) && $post->post_type === "wdi_instagram" && $widget_params === ""){
|
42 |
$atts["id"] = $_GET["feed_id"];
|
43 |
}
|
44 |
$attributes = shortcode_atts(array(
|
frontend/views/WDIViewGalleryBox.php
CHANGED
@@ -42,8 +42,13 @@ class WDIViewGalleryBox {
|
|
42 |
$gallery_id = (isset($current_feed['id']) ? esc_html($current_feed['id']) : 0);
|
43 |
$wdi = (isset($_POST['feed_counter']) ? esc_html($_POST['feed_counter']) : 0);
|
44 |
$current_image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : 0);
|
|
|
45 |
$theme_id = (isset($current_feed['theme_id']) ? esc_html($current_feed['theme_id']) : 1);
|
46 |
|
|
|
|
|
|
|
|
|
47 |
$thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 90);/*watch later*/
|
48 |
$thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);/*watch later*/
|
49 |
|
@@ -86,7 +91,6 @@ class WDIViewGalleryBox {
|
|
86 |
$image_right_click = (isset($current_feed['popup_image_right_click']) ? esc_html($current_feed['popup_image_right_click']) : 1);
|
87 |
|
88 |
//$option_row = $this->model->get_option_row_data();
|
89 |
-
|
90 |
// $image_right_click = 0; //$option_row->image_right_click;/*watch later havent this options*/
|
91 |
$comment_moderation = 0;//$option_row->comment_moderation;/*watch later havent this options*/
|
92 |
|
@@ -111,19 +115,12 @@ class WDIViewGalleryBox {
|
|
111 |
$image_filmstrip_width = 0;
|
112 |
}
|
113 |
|
114 |
-
if ($tag_id != 0) {
|
115 |
-
//$image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by, $order_by);
|
116 |
-
}
|
117 |
-
else {
|
118 |
-
// $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
|
119 |
-
}
|
120 |
-
|
121 |
|
122 |
$json = (($_POST['image_rows']));
|
123 |
str_replace('"',""", $json);
|
124 |
|
125 |
$image_rows = json_decode(stripslashes($json));
|
126 |
-
$image_rows_count =
|
127 |
$image_rows = WDILibrary::arrayToObject($image_rows);
|
128 |
|
129 |
/////////////////////////////////Parametes for deprecated content////////////////////
|
@@ -215,726 +212,116 @@ class WDIViewGalleryBox {
|
|
215 |
}
|
216 |
|
217 |
?>
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
box-sizing: border-box;
|
224 |
-
}
|
225 |
-
.wdi_spider_popup_overlay{
|
226 |
-
background-color: <?php echo $theme_row->lightbox_overlay_bg_color; ?>;
|
227 |
-
opacity: <?php echo (intval($theme_row->lightbox_overlay_bg_transparent)/100); ?>;
|
228 |
-
}
|
229 |
-
.wdi_spider_popup_wrap {
|
230 |
-
background-color: <?php echo $theme_row->lightbox_bg_color; ?>;
|
231 |
-
display: inline-block;
|
232 |
-
left: 50%;
|
233 |
-
outline: medium none;
|
234 |
-
position: fixed;
|
235 |
-
text-align: center;
|
236 |
-
top: 50%;
|
237 |
-
z-index: 100000;
|
238 |
-
}
|
239 |
-
.wdi_popup_image {
|
240 |
-
max-width: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>px;
|
241 |
-
max-height: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>px;
|
242 |
-
vertical-align: middle;
|
243 |
-
display: inline-block;
|
244 |
-
}
|
245 |
-
.wdi_popup_embed {
|
246 |
-
width: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>px;
|
247 |
-
height: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>px;
|
248 |
-
vertical-align: middle;
|
249 |
-
text-align: center;
|
250 |
-
display: inline-block;
|
251 |
-
}
|
252 |
-
.wdi_ctrl_btn {
|
253 |
-
color: <?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
|
254 |
-
font-size: <?php echo $theme_row->lightbox_ctrl_btn_height; ?>px;
|
255 |
-
margin: <?php echo $theme_row->lightbox_ctrl_btn_margin_top; ?>px <?php echo $theme_row->lightbox_ctrl_btn_margin_left; ?>px;
|
256 |
-
opacity: <?php echo number_format($theme_row->lightbox_ctrl_btn_transparent / 100, 2, ".", ""); ?>;
|
257 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_btn_transparent; ?>);
|
258 |
-
}
|
259 |
-
.wdi_toggle_btn {
|
260 |
-
color: <?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
|
261 |
-
font-size: <?php echo $theme_row->lightbox_toggle_btn_height; ?>px;
|
262 |
-
margin: 0;
|
263 |
-
opacity: <?php echo number_format($theme_row->lightbox_ctrl_btn_transparent / 100, 2, ".", ""); ?>;
|
264 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_btn_transparent; ?>);
|
265 |
-
padding: 0;
|
266 |
-
}
|
267 |
-
.wdi_btn_container {
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
overflow: hidden;
|
271 |
-
position: absolute;
|
272 |
-
right: 0;
|
273 |
-
top: 0;
|
274 |
-
}
|
275 |
-
|
276 |
-
.wdi_ctrl_btn_container {
|
277 |
-
background-color: rgba(<?php echo $rgb_lightbox_ctrl_cont_bg_color['red']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['green']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>);
|
278 |
-
/*background: none repeat scroll 0 0 #<?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;*/
|
279 |
-
<?php
|
280 |
-
if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
281 |
-
?>
|
282 |
-
border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
283 |
-
border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
284 |
-
<?php
|
285 |
-
}
|
286 |
-
else {
|
287 |
-
?>
|
288 |
-
bottom: 0;
|
289 |
-
border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
290 |
-
border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
291 |
-
<?php
|
292 |
-
}?>
|
293 |
-
height: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
|
294 |
-
/*opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
|
295 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_cont_transparent; ?>);*/
|
296 |
-
position: absolute;
|
297 |
-
text-align: <?php echo $theme_row->lightbox_ctrl_btn_align; ?>;
|
298 |
-
width: 100%;
|
299 |
-
z-index: 10150;
|
300 |
-
}
|
301 |
-
.wdi_toggle_container {
|
302 |
-
background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;
|
303 |
-
<?php
|
304 |
-
if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
305 |
-
?>
|
306 |
-
border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
307 |
-
border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
308 |
-
/****/
|
309 |
-
border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
310 |
-
/****/
|
311 |
-
top: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
|
312 |
-
<?php
|
313 |
-
}
|
314 |
-
else {
|
315 |
-
?>
|
316 |
-
border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
317 |
-
border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
318 |
-
/****/
|
319 |
-
border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
|
320 |
-
/****/
|
321 |
-
bottom: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
|
322 |
-
<?php
|
323 |
-
}?>
|
324 |
-
cursor: pointer;
|
325 |
-
left: 50%;
|
326 |
-
line-height: 0;
|
327 |
-
margin-left: -<?php echo $theme_row->lightbox_toggle_btn_width / 2; ?>px;
|
328 |
-
opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
|
329 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_cont_transparent; ?>);
|
330 |
-
position: absolute;
|
331 |
-
text-align: center;
|
332 |
-
width: <?php echo $theme_row->lightbox_toggle_btn_width; ?>px;
|
333 |
-
z-index: 10150;
|
334 |
-
}
|
335 |
-
.wdi_close_btn {
|
336 |
-
opacity: <?php echo number_format($theme_row->lightbox_close_btn_transparent / 100, 2, ".", ""); ?>;
|
337 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_close_btn_transparent; ?>);
|
338 |
-
}
|
339 |
-
.wdi_spider_popup_close {
|
340 |
-
background-color: <?php echo $theme_row->lightbox_close_btn_bg_color; ?>;
|
341 |
-
border-radius: <?php echo $theme_row->lightbox_close_btn_border_radius; ?>px;
|
342 |
-
border: <?php echo $theme_row->lightbox_close_btn_border_width; ?>px <?php echo $theme_row->lightbox_close_btn_border_style; ?> <?php echo $theme_row->lightbox_close_btn_border_color; ?>;
|
343 |
-
box-shadow: <?php echo $theme_row->lightbox_close_btn_box_shadow; ?>;
|
344 |
-
color: <?php echo $theme_row->lightbox_close_btn_color; ?>;
|
345 |
-
height: <?php echo $theme_row->lightbox_close_btn_height; ?>px;
|
346 |
-
font-size: <?php echo $theme_row->lightbox_close_btn_size; ?>px;
|
347 |
-
right: <?php echo $theme_row->lightbox_close_btn_right; ?>px;
|
348 |
-
top: <?php echo $theme_row->lightbox_close_btn_top; ?>px;
|
349 |
-
width: <?php echo $theme_row->lightbox_close_btn_width; ?>px;
|
350 |
-
}
|
351 |
-
.wdi_spider_popup_close_fullscreen {
|
352 |
-
color: <?php echo $theme_row->lightbox_close_btn_full_color; ?>;
|
353 |
-
font-size: <?php echo $theme_row->lightbox_close_btn_size; ?>px;
|
354 |
-
right: 15px;
|
355 |
-
}
|
356 |
-
.wdi_spider_popup_close span,
|
357 |
-
#wdi_spider_popup_left-ico span,
|
358 |
-
#wdi_spider_popup_right-ico span {
|
359 |
-
display: table-cell;
|
360 |
-
text-align: center;
|
361 |
-
vertical-align: middle;
|
362 |
-
}
|
363 |
-
#wdi_spider_popup_left-ico,
|
364 |
-
#wdi_spider_popup_right-ico {
|
365 |
-
background-color: <?php echo $theme_row->lightbox_rl_btn_bg_color; ?>;
|
366 |
-
border-radius: <?php echo $theme_row->lightbox_rl_btn_border_radius; ?>;
|
367 |
-
/***/
|
368 |
-
border-radius: <?php echo $theme_row->lightbox_rl_btn_border_radius; ?>px;
|
369 |
-
/***/
|
370 |
-
border: <?php echo $theme_row->lightbox_rl_btn_border_width; ?>px <?php echo $theme_row->lightbox_rl_btn_border_style; ?> <?php echo $theme_row->lightbox_rl_btn_border_color; ?>;
|
371 |
-
box-shadow: <?php echo $theme_row->lightbox_rl_btn_box_shadow; ?>;
|
372 |
-
color: <?php echo $theme_row->lightbox_rl_btn_color; ?>;
|
373 |
-
height: <?php echo $theme_row->lightbox_rl_btn_height; ?>px;
|
374 |
-
font-size: <?php echo $theme_row->lightbox_rl_btn_size; ?>px;
|
375 |
-
width: <?php echo $theme_row->lightbox_rl_btn_width; ?>px;
|
376 |
-
opacity: <?php echo number_format($theme_row->lightbox_rl_btn_transparent / 100, 2, ".", ""); ?>;
|
377 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_rl_btn_transparent; ?>);
|
378 |
-
}
|
379 |
-
<?php
|
380 |
-
if($option_row->autohide_lightbox_navigation){?>
|
381 |
-
#wdi_spider_popup_left-ico{
|
382 |
-
left: -9999px;
|
383 |
-
}
|
384 |
-
#wdi_spider_popup_right-ico{
|
385 |
-
left: -9999px;
|
386 |
-
}
|
387 |
-
<?php }
|
388 |
-
else { ?>
|
389 |
-
#wdi_spider_popup_left-ico {
|
390 |
-
left: 20px;
|
391 |
-
}
|
392 |
-
#wdi_spider_popup_right-ico {
|
393 |
-
left: auto;
|
394 |
-
right: 20px;
|
395 |
-
}
|
396 |
-
<?php } ?>
|
397 |
-
.wdi_ctrl_btn:hover,
|
398 |
-
.wdi_toggle_btn:hover,
|
399 |
-
|
400 |
-
#wdi_spider_popup_left-ico:hover,
|
401 |
-
#wdi_spider_popup_right-ico:hover {
|
402 |
-
color: <?php echo $theme_row->lightbox_close_rl_btn_hover_color; ?>;
|
403 |
-
cursor: pointer;
|
404 |
-
}
|
405 |
-
.wdi_spider_popup_close:hover,
|
406 |
-
.wdi_spider_popup_close_fullscreen:hover{
|
407 |
-
color: <?php echo $theme_row->lightbox_close_btn_hover_color;?>;
|
408 |
-
cursor: pointer;
|
409 |
-
}
|
410 |
-
.wdi_image_wrap {
|
411 |
-
height: inherit;
|
412 |
-
display: table;
|
413 |
-
position: absolute;
|
414 |
-
text-align: center;
|
415 |
-
width: inherit;
|
416 |
-
}
|
417 |
-
.wdi_image_wrap * {
|
418 |
-
-moz-user-select: none;
|
419 |
-
-khtml-user-select: none;
|
420 |
-
-webkit-user-select: none;
|
421 |
-
-ms-user-select: none;
|
422 |
-
user-select: none;
|
423 |
-
}
|
424 |
-
.wdi_embed_frame{
|
425 |
-
text-align:center;
|
426 |
-
}
|
427 |
-
.wdi_comment_wrap {
|
428 |
-
bottom: 0;
|
429 |
-
left: 0;
|
430 |
-
overflow: hidden;
|
431 |
-
position: absolute;
|
432 |
-
right: 0;
|
433 |
-
top: 0;
|
434 |
-
z-index: -1;
|
435 |
-
}
|
436 |
-
.wdi_comment_container {
|
437 |
-
-moz-box-sizing: border-box;
|
438 |
-
background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
|
439 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
440 |
-
font-size: <?php echo $theme_row->lightbox_comment_font_size; ?>px;
|
441 |
-
font-family: <?php echo $theme_row->lightbox_comment_font_style; ?>;
|
442 |
-
height: 100%;
|
443 |
-
overflow: hidden;
|
444 |
-
position: absolute;
|
445 |
-
<?php echo $theme_row->lightbox_comment_pos; ?>: -<?php echo $theme_row->lightbox_comment_width; ?>px;
|
446 |
-
top: 0;
|
447 |
-
width: <?php echo $theme_row->lightbox_comment_width; ?>px;
|
448 |
-
z-index: 10103;
|
449 |
-
}
|
450 |
-
|
451 |
-
.wdi_comments {
|
452 |
-
bottom: 0;
|
453 |
-
font-size: <?php echo $theme_row->lightbox_comment_font_size; ?>px;
|
454 |
-
font-family: <?php echo $theme_row->lightbox_comment_font_style; ?>;
|
455 |
-
height: 100%;
|
456 |
-
left: 0;
|
457 |
-
overflow-x: hidden;
|
458 |
-
overflow-y: auto;
|
459 |
-
position: absolute;
|
460 |
-
top: 0;
|
461 |
-
width: 100%;
|
462 |
-
z-index: 10101;
|
463 |
-
}
|
464 |
-
.wdi_comments p,
|
465 |
-
.wdi_comment_body_p {
|
466 |
-
margin: 5px !important;
|
467 |
-
text-align: left;
|
468 |
-
word-wrap: break-word;
|
469 |
-
word-break: break-word;
|
470 |
-
}
|
471 |
-
.wdi_no_comment{
|
472 |
-
text-align: center !important;
|
473 |
-
}
|
474 |
-
.wdi_comments input[type="submit"] {
|
475 |
-
background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_comment_button_bg_color; ?>;
|
476 |
-
border: <?php echo $theme_row->lightbox_comment_button_border_width; ?>px <?php echo $theme_row->lightbox_comment_button_border_style; ?> <?php echo $theme_row->lightbox_comment_button_border_color; ?>;
|
477 |
-
border-radius: <?php echo $theme_row->lightbox_comment_button_border_radius; ?>px;
|
478 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
479 |
-
cursor: pointer;
|
480 |
-
padding: <?php echo $theme_row->lightbox_comment_button_padding; ?>;
|
481 |
-
}
|
482 |
-
.wdi_comments input[type="text"],
|
483 |
-
.wdi_comments textarea {
|
484 |
-
background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_comment_input_bg_color; ?>;
|
485 |
-
border: <?php echo $theme_row->lightbox_comment_input_border_width; ?>px <?php echo $theme_row->lightbox_comment_input_border_style; ?> <?php echo $theme_row->lightbox_comment_input_border_color; ?>;
|
486 |
-
border-radius: <?php echo $theme_row->lightbox_comment_input_border_radius; ?>;
|
487 |
-
/***/
|
488 |
-
border-radius: <?php echo $theme_row->lightbox_comment_input_border_radius; ?>px;
|
489 |
-
/***/
|
490 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
491 |
-
padding: <?php echo $theme_row->lightbox_comment_input_padding; ?>;
|
492 |
-
width: 100%;
|
493 |
-
}
|
494 |
-
.wdi_comments textarea {
|
495 |
-
resize: vertical;
|
496 |
-
}
|
497 |
-
.wdi_comment_header_p {
|
498 |
-
border-top: <?php echo $theme_row->lightbox_comment_separator_width; ?>px <?php echo $theme_row->lightbox_comment_separator_style; ?> <?php echo $theme_row->lightbox_comment_separator_color; ?>;
|
499 |
-
}
|
500 |
-
.wdi_comment_header {
|
501 |
-
margin-top: 2px;
|
502 |
-
display: inline-block;
|
503 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
504 |
-
font-size: <?php echo $theme_row->lightbox_comment_author_font_size; ?>px;
|
505 |
-
}
|
506 |
-
.wdi_comment_date {
|
507 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
508 |
-
float: right;
|
509 |
-
font-size: <?php echo $theme_row->lightbox_comment_date_font_size; ?>px;
|
510 |
-
}
|
511 |
-
.wdi_comment_body {
|
512 |
-
color: <?php echo $theme_row->lightbox_comment_font_color; ?>;
|
513 |
-
font-size: <?php echo $theme_row->lightbox_comment_body_font_size; ?>px;
|
514 |
-
}
|
515 |
-
.wdi_comment_delete_btn {
|
516 |
-
color: #FFFFFF;
|
517 |
-
cursor: pointer;
|
518 |
-
float: right;
|
519 |
-
font-size: 14px;
|
520 |
-
margin: 2px;
|
521 |
-
}
|
522 |
|
|
|
|
|
|
|
|
|
523 |
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
.wdi_comment_textarea::-webkit-scrollbar-track {
|
543 |
-
}
|
544 |
-
.wdi_comment_textarea::-webkit-scrollbar-thumb {
|
545 |
-
background-color: rgba(255, 255, 255, 0.55);
|
546 |
-
border-radius: 2px;
|
547 |
-
}
|
548 |
-
.wdi_comment_textarea::-webkit-scrollbar-thumb:hover {
|
549 |
-
background-color: #D9D9D9;
|
550 |
-
}
|
551 |
-
.wdi_ctrl_btn_container a,
|
552 |
-
.wdi_ctrl_btn_container a:hover {
|
553 |
-
text-decoration: none;
|
554 |
-
}
|
555 |
|
556 |
-
.wdi_facebook:hover {
|
557 |
-
color: #3B5998 !important;
|
558 |
-
cursor: pointer;
|
559 |
-
}
|
560 |
-
.wdi_twitter:hover {
|
561 |
-
color: #4099FB !important;
|
562 |
-
cursor: pointer;
|
563 |
-
}
|
564 |
-
.wdi_google:hover {
|
565 |
-
color: #DD4B39 !important;
|
566 |
-
cursor: pointer;
|
567 |
-
}
|
568 |
-
.wdi_pinterest:hover {
|
569 |
-
color: #cb2027 !important;
|
570 |
-
cursor: pointer;
|
571 |
-
}
|
572 |
-
.wdi_tumblr:hover {
|
573 |
-
color: #2F5070 !important;
|
574 |
-
cursor: pointer;
|
575 |
-
}
|
576 |
-
.wdi_linkedin:hover {
|
577 |
-
color: #0077B5 !important;
|
578 |
-
cursor: pointer;
|
579 |
-
}
|
580 |
-
.wdi_facebook,
|
581 |
-
.wdi_twitter,
|
582 |
-
.wdi_google,
|
583 |
-
.wdi_pinterest,
|
584 |
-
.wdi_tumblr,
|
585 |
-
.wdi_linkedin {
|
586 |
-
color: <?php echo $theme_row->lightbox_comment_share_button_color; ?> !important;
|
587 |
-
}
|
588 |
-
.wdi_image_container {
|
589 |
-
display: table;
|
590 |
-
position: absolute;
|
591 |
-
text-align: center;
|
592 |
-
<?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : $image_filmstrip_width); ?>px;
|
593 |
-
vertical-align: middle;
|
594 |
-
width: 100%;
|
595 |
-
}
|
596 |
-
.wdi_filmstrip_container {
|
597 |
-
display: <?php echo ($filmstrip_direction == 'horizontal'? 'table' : 'block'); ?>;
|
598 |
-
height: <?php echo ($filmstrip_direction == 'horizontal'? $image_filmstrip_height : $image_height); ?>px;
|
599 |
-
position: absolute;
|
600 |
-
width: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width : $image_filmstrip_width); ?>px;
|
601 |
-
z-index: 10105;
|
602 |
-
<?php echo $theme_row->lightbox_filmstrip_pos; ?>: 0;
|
603 |
-
}
|
604 |
-
.wdi_filmstrip {
|
605 |
-
<?php echo $left_or_top; ?>: 20px;
|
606 |
-
overflow: hidden;
|
607 |
-
position: absolute;
|
608 |
-
<?php echo $width_or_height; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width - 40 : $image_height - 40); ?>px;
|
609 |
-
z-index: 10106;
|
610 |
-
}
|
611 |
-
.wdi_filmstrip_thumbnails {
|
612 |
-
height: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : ($image_filmstrip_height + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count); ?>px;
|
613 |
-
<?php echo $left_or_top; ?>: 0px;
|
614 |
-
margin: 0 auto;
|
615 |
-
overflow: hidden;
|
616 |
-
position: relative;
|
617 |
-
width: <?php echo ($filmstrip_direction == 'horizontal' ? ($image_filmstrip_width + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count : $image_filmstrip_width); ?>px;
|
618 |
-
}
|
619 |
-
.wdi_filmstrip_thumbnail {
|
620 |
-
position: relative;
|
621 |
-
background: none;
|
622 |
-
border: <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>px <?php echo $theme_row->lightbox_filmstrip_thumb_border_style; ?> <?php echo $theme_row->lightbox_filmstrip_thumb_border_color; ?>;
|
623 |
-
border-radius: <?php echo $theme_row->lightbox_filmstrip_thumb_border_radius; ?>;
|
624 |
-
/***/
|
625 |
-
border-radius: <?php echo $theme_row->lightbox_filmstrip_thumb_border_radius; ?>px;
|
626 |
-
/***/
|
627 |
-
cursor: pointer;
|
628 |
-
float: left;
|
629 |
-
height: <?php echo $image_filmstrip_height; ?>px;
|
630 |
-
margin: <?php echo $theme_row->lightbox_filmstrip_thumb_margin; ?>;
|
631 |
-
width: <?php echo $image_filmstrip_width; ?>px;
|
632 |
-
overflow: hidden;
|
633 |
-
}
|
634 |
-
.wdi_thumb_active {
|
635 |
-
opacity: 1;
|
636 |
-
filter: Alpha(opacity=100);
|
637 |
-
border: <?php echo $theme_row->lightbox_filmstrip_thumb_active_border_width; ?>px solid <?php echo $theme_row->lightbox_filmstrip_thumb_active_border_color; ?>;
|
638 |
-
}
|
639 |
-
.wdi_thumb_deactive {
|
640 |
-
opacity: <?php echo number_format($theme_row->lightbox_filmstrip_thumb_deactive_transparent / 100, 2, ".", ""); ?>;
|
641 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_filmstrip_thumb_deactive_transparent; ?>);
|
642 |
-
}
|
643 |
-
.wdi_filmstrip_thumbnail_img {
|
644 |
-
display: block;
|
645 |
-
opacity: 1;
|
646 |
-
filter: Alpha(opacity=100);
|
647 |
-
}
|
648 |
-
.wdi_filmstrip_left {
|
649 |
-
background-color: <?php echo $theme_row->lightbox_filmstrip_rl_bg_color; ?>;
|
650 |
-
cursor: pointer;
|
651 |
-
display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
|
652 |
-
vertical-align: middle;
|
653 |
-
<?php echo $width_or_height; ?>: 20px;
|
654 |
-
z-index: 10106;
|
655 |
-
<?php echo $left_or_top; ?>: 0;
|
656 |
-
<?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
|
657 |
-
<?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
|
658 |
-
}
|
659 |
-
.wdi_filmstrip_right {
|
660 |
-
background-color: <?php echo $theme_row->lightbox_filmstrip_rl_bg_color; ?>;
|
661 |
-
cursor: pointer;
|
662 |
-
<?php echo($filmstrip_direction == 'horizontal' ? 'right' : 'bottom') ?>: 0;
|
663 |
-
<?php echo $width_or_height; ?>: 20px;
|
664 |
-
display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
|
665 |
-
vertical-align: middle;
|
666 |
-
z-index: 10106;
|
667 |
-
<?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
|
668 |
-
<?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
|
669 |
-
}
|
670 |
-
.wdi_filmstrip_left i,
|
671 |
-
.wdi_filmstrip_right i {
|
672 |
-
color: <?php echo $theme_row->lightbox_filmstrip_rl_btn_color; ?>;
|
673 |
-
font-size: <?php echo $theme_row->lightbox_filmstrip_rl_btn_size; ?>px;
|
674 |
-
}
|
675 |
-
.wdi_none_selectable {
|
676 |
-
-webkit-touch-callout: none;
|
677 |
-
-webkit-user-select: none;
|
678 |
-
-khtml-user-select: none;
|
679 |
-
-moz-user-select: none;
|
680 |
-
-ms-user-select: none;
|
681 |
-
user-select: none;
|
682 |
-
}
|
683 |
-
.wdi_slide_container {
|
684 |
-
display: table-cell;
|
685 |
-
position: absolute;
|
686 |
-
vertical-align: middle;
|
687 |
-
width: 100%;
|
688 |
-
height: 100%;
|
689 |
-
}
|
690 |
-
.wdi_slide_bg {
|
691 |
-
margin: 0 auto;
|
692 |
-
width: inherit;
|
693 |
-
height: inherit;
|
694 |
-
}
|
695 |
-
.wdi_slider {
|
696 |
-
height: inherit;
|
697 |
-
width: inherit;
|
698 |
-
}
|
699 |
-
.wdi_popup_image_spun {
|
700 |
-
height: inherit;
|
701 |
-
display: table-cell;
|
702 |
-
filter: Alpha(opacity=100);
|
703 |
-
opacity: 1;
|
704 |
-
position: absolute;
|
705 |
-
vertical-align: middle;
|
706 |
-
width: inherit;
|
707 |
-
z-index: 2;
|
708 |
-
}
|
709 |
-
.wdi_popup_image_second_spun {
|
710 |
-
width: inherit;
|
711 |
-
height: inherit;
|
712 |
-
display: table-cell;
|
713 |
-
filter: Alpha(opacity=0);
|
714 |
-
opacity: 0;
|
715 |
-
position: absolute;
|
716 |
-
vertical-align: middle;
|
717 |
-
z-index: 1;
|
718 |
-
}
|
719 |
-
.wdi_grid {
|
720 |
-
display: none;
|
721 |
-
height: 100%;
|
722 |
-
overflow: hidden;
|
723 |
-
position: absolute;
|
724 |
-
width: 100%;
|
725 |
-
}
|
726 |
-
.wdi_gridlet {
|
727 |
-
opacity: 1;
|
728 |
-
filter: Alpha(opacity=100);
|
729 |
-
position: absolute;
|
730 |
-
}
|
731 |
-
.wdi_image_info_container1 {
|
732 |
-
display: <?php echo $popup_info_always_show ? 'table-cell' : 'none'; ?>;
|
733 |
-
}
|
734 |
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
}
|
739 |
|
|
|
|
|
|
|
|
|
740 |
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') ? 'bottom: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
746 |
-
<?php if($params_array['popup_info_full_width']) { ?>
|
747 |
-
width: 100%;
|
748 |
-
<?php } else { ?>
|
749 |
-
width: 33%;
|
750 |
-
margin: <?php echo $theme_row->lightbox_info_margin; ?>;
|
751 |
-
<?php } ?>
|
752 |
-
padding: <?php echo $theme_row->lightbox_info_padding; ?>;
|
753 |
-
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
754 |
-
overflow: auto;
|
755 |
-
}
|
756 |
-
.wdi_image_title,
|
757 |
-
.wdi_image_title * {
|
758 |
-
color: <?php echo $theme_row->lightbox_title_color; ?> !important;
|
759 |
-
font-family: <?php echo $theme_row->lightbox_title_font_style; ?>;
|
760 |
-
font-size: <?php echo $theme_row->lightbox_title_font_size; ?>px;
|
761 |
-
font-weight: <?php echo $theme_row->lightbox_title_font_weight; ?>;
|
762 |
-
}
|
763 |
-
.wdi_image_description,
|
764 |
-
.wdi_image_description * {
|
765 |
-
color: <?php echo $theme_row->lightbox_description_color; ?> !important;
|
766 |
-
font-family: <?php echo $theme_row->lightbox_description_font_style; ?>;
|
767 |
-
font-size: <?php echo $theme_row->lightbox_description_font_size; ?>px;
|
768 |
-
font-weight: <?php echo $theme_row->lightbox_description_font_weight; ?>;
|
769 |
-
}
|
770 |
-
.wdi_title{
|
771 |
-
display: inline-table;
|
772 |
-
}
|
773 |
-
.wdi_title:hover{
|
774 |
-
cursor: pointer;
|
775 |
-
}
|
776 |
-
.wdi_title .wdi_users_img_wrap{
|
777 |
-
width: 50px;
|
778 |
-
display: table-cell;
|
779 |
-
vertical-align: middle;
|
780 |
-
float: right;
|
781 |
-
padding-left: 10px;
|
782 |
-
overflow: hidden;
|
783 |
-
}
|
784 |
-
.wdi_title .wdi_users_img_wrap img{
|
785 |
-
width: 100%;
|
786 |
-
}
|
787 |
-
.wdi_title .wdi_header_text{
|
788 |
-
display: table-cell;
|
789 |
-
vertical-align: middle;
|
790 |
-
word-break: break-all;
|
791 |
-
}
|
792 |
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
left: -150%;
|
799 |
-
margin: 0;
|
800 |
-
z-index: 200000;
|
801 |
-
background-color: rgba(<?php echo $rgb_lightbox_ctrl_cont_bg_color['red']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['green']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>);
|
802 |
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
}
|
808 |
-
.wdi_share_popup_btn{
|
809 |
-
color: <?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
|
810 |
-
padding: 3px;
|
811 |
-
opacity: <?php echo number_format($theme_row->lightbox_ctrl_btn_transparent / 100, 2, ".", ""); ?>;
|
812 |
-
filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_btn_transparent; ?>);
|
813 |
-
font-size: <?php echo $theme_row->lightbox_ctrl_btn_height;?>px;
|
814 |
-
}
|
815 |
-
.wdi_share_caret{
|
816 |
-
font-size: 15px;
|
817 |
-
color: <?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;
|
818 |
-
opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
|
819 |
-
position: absolute;
|
820 |
-
top: -25px;
|
821 |
-
left: 13px;
|
822 |
-
}
|
823 |
-
.wdi_share_toggler{
|
824 |
-
display: block !important;
|
825 |
-
}
|
826 |
-
.wdi_facebook_btn:hover{
|
827 |
-
color: #45619D;
|
828 |
-
}
|
829 |
-
.wdi_facebook_btn:hover{
|
830 |
-
color: #4099FB;
|
831 |
-
}
|
832 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
833 |
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
.wdi_comm_text_link,a.wdi_comm_text_link:visited{
|
838 |
-
color: <?php echo $theme_row->lightbox_comment_author_font_color; ?>!important;
|
839 |
-
}
|
840 |
-
.wdi_comment_header a:hover,a.wdi_comm_text_link:hover{
|
841 |
-
text-decoration: none;
|
842 |
-
color: <?php echo $theme_row->lightbox_comment_author_font_color_hover; ?>!important;
|
843 |
-
}
|
844 |
-
.wdi_load_more_comments{
|
845 |
-
display: inline-block;
|
846 |
-
color: <?php echo $theme_row->lightbox_comment_load_more_color; ?>;
|
847 |
-
background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
|
848 |
-
-webkit-user-select: none; /* Chrome/Safari */
|
849 |
-
-moz-user-select: none; /* Firefox */
|
850 |
-
-ms-user-select: none; /* IE10+ */
|
851 |
-
/* Rules below not implemented in browsers yet */
|
852 |
-
-o-user-select: none;
|
853 |
-
user-select: none;
|
854 |
-
font-family: 'Verdana', sans-serif;
|
855 |
-
text-transform: capitalize;
|
856 |
-
font-size: 17px;
|
857 |
-
}
|
858 |
-
.wdi_load_more_comments:hover{
|
859 |
-
color: <?php echo $theme_row->lightbox_comment_load_more_color_hover;?>;
|
860 |
-
cursor: pointer;
|
861 |
-
}
|
862 |
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
}
|
875 |
-
}
|
876 |
-
.wdi_image_count_container {
|
877 |
-
left: 0;
|
878 |
-
line-height: 1;
|
879 |
-
position: absolute;
|
880 |
-
vertical-align: middle;
|
881 |
-
}
|
882 |
-
</style>
|
883 |
<script>
|
884 |
-
var wdi_data = [];
|
885 |
var event_stack = [];
|
886 |
<?php
|
887 |
$image_id_exist = FALSE;
|
888 |
foreach ($image_rows as $key => $image_row) {
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
$instaDesc = str_replace('#', ' #', $instaDesc);
|
916 |
-
?>
|
917 |
-
|
918 |
-
wdi_data["<?php echo $key; ?>"] = [];
|
919 |
-
wdi_data["<?php echo $key; ?>"]["number"] = <?php echo $key + 1; ?>;
|
920 |
-
wdi_data["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
|
921 |
-
wdi_data["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->alt); ?>";
|
922 |
-
wdi_data["<?php echo $key; ?>"]["description"] = "<?php echo $instaDesc; ?>";
|
923 |
-
wdi_data["<?php echo $key; ?>"]['username'] = "<?php echo $image_row->username;?>";
|
924 |
-
wdi_data["<?php echo $key; ?>"]['profile_picture'] = "<?php echo $image_row->profile_picture;?>";
|
925 |
-
|
926 |
-
wdi_data["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
|
927 |
-
wdi_data["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
|
928 |
-
wdi_data["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
|
929 |
-
wdi_data["<?php echo $key; ?>"]["comment_count"] = "<?php echo $image_row->comment_count; ?>";
|
930 |
-
wdi_data["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
|
931 |
-
wdi_data["<?php echo $key; ?>"]["filename"] = "<?php echo $image_row->filename; ?>";
|
932 |
-
wdi_data["<?php echo $key; ?>"]["avg_rating"] = "<?php echo $image_row->avg_rating; ?>";
|
933 |
-
wdi_data["<?php echo $key; ?>"]["rate"] = "<?php echo $image_row->rate; ?>";
|
934 |
-
wdi_data["<?php echo $key; ?>"]["rate_count"] = "<?php echo $image_row->rate_count; ?>";
|
935 |
-
wdi_data["<?php echo $key; ?>"]["hit_count"] = "<?php echo $image_row->hit_count; ?>";
|
936 |
-
wdi_data["<?php echo $key; ?>"]["comments_data"] = <?php echo isset($image_row->comments_data) ? json_encode($image_row->comments_data) : 'null'; ?>;
|
937 |
-
<?php
|
938 |
}
|
939 |
?>
|
940 |
|
@@ -947,11 +334,23 @@ class WDIViewGalleryBox {
|
|
947 |
}
|
948 |
?>
|
949 |
<div class="wdi_image_wrap">
|
950 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
if ($enable_image_ctrl_btn) {
|
952 |
$share_url = add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => $current_image_id), admin_url('admin-ajax.php')) . '#wdi' . $gallery_id . '/' . $current_image_id;
|
953 |
?>
|
954 |
-
<div class="wdi_btn_container">
|
955 |
<div class="wdi_ctrl_btn_container">
|
956 |
<?php
|
957 |
if ($option_row->show_image_counts) {
|
@@ -973,7 +372,7 @@ class WDIViewGalleryBox {
|
|
973 |
?>
|
974 |
<i title="<?php echo __('Fullscreen', "wd-instagram-feed"); ?>" class="wdi_ctrl_btn wdi_fullscreen fa fa-arrows-alt"></i>
|
975 |
<?php } if ($popup_enable_info) { ?>
|
976 |
-
|
977 |
<?php } if ($enable_comment_social) { ?>
|
978 |
<i title="<?php echo __('Show comments', "wd-instagram-feed"); ?>" class="wdi_ctrl_btn wdi_comment fa fa-comment"></i>
|
979 |
<?php } if ($popup_enable_rate) { ?>
|
@@ -1076,64 +475,17 @@ class WDIViewGalleryBox {
|
|
1076 |
<div class="wdi_toggle_container">
|
1077 |
<i class="wdi_toggle_btn fa <?php echo (($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'); ?>"></i>
|
1078 |
</div>
|
1079 |
-
|
|
|
1080 |
<?php
|
1081 |
}
|
1082 |
$current_pos = 0;
|
1083 |
|
1084 |
if ($enable_image_filmstrip) {
|
|
|
|
|
1085 |
?>
|
1086 |
-
|
1087 |
-
<div class="wdi_filmstrip_left"><i class="fa <?php echo ($filmstrip_direction == 'horizontal'? 'fa-angle-left' : 'fa-angle-up'); ?> "></i></div>
|
1088 |
-
<div class="wdi_filmstrip">
|
1089 |
-
<div class="wdi_filmstrip_thumbnails">
|
1090 |
-
<?php
|
1091 |
-
foreach ($image_rows as $key => $image_row) {
|
1092 |
-
if ($image_row->id == $current_image_id) {
|
1093 |
-
$current_pos = $key * (($filmstrip_direction == 'horizontal' ? $image_filmstrip_width : $image_filmstrip_height) + $filmstrip_thumb_margin_hor);
|
1094 |
-
$current_key = $key;
|
1095 |
-
}
|
1096 |
-
|
1097 |
-
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
1098 |
-
if (!$is_embed) {
|
1099 |
-
list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_WDI_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
1100 |
-
}
|
1101 |
-
else {
|
1102 |
-
if (isset($image_row->resolution) && $image_row->resolution!= '') {
|
1103 |
-
$resolution_arr = explode(" ",$image_row->resolution);
|
1104 |
-
$resolution_w = intval($resolution_arr[0]);
|
1105 |
-
$resolution_h = intval($resolution_arr[2]);
|
1106 |
-
if($resolution_w != 0 && $resolution_h != 0){
|
1107 |
-
$scale = $scale = max($image_filmstrip_width / $resolution_w, $image_filmstrip_height / $resolution_h);
|
1108 |
-
$image_thumb_width = $resolution_w * $scale;
|
1109 |
-
$image_thumb_height = $resolution_h * $scale;
|
1110 |
-
}
|
1111 |
-
else{
|
1112 |
-
$image_thumb_width = $image_filmstrip_width;
|
1113 |
-
$image_thumb_height = $image_filmstrip_height;
|
1114 |
-
}
|
1115 |
-
}
|
1116 |
-
else {
|
1117 |
-
$image_thumb_width = $image_filmstrip_width;
|
1118 |
-
$image_thumb_height = $image_filmstrip_height;
|
1119 |
-
}
|
1120 |
-
}
|
1121 |
-
$scale = max($image_filmstrip_width / $image_thumb_width, $image_filmstrip_height / $image_thumb_height);
|
1122 |
-
$image_thumb_width *= $scale;
|
1123 |
-
$image_thumb_height *= $scale;
|
1124 |
-
$thumb_left = ($image_filmstrip_width - $image_thumb_width) / 2;
|
1125 |
-
$thumb_top = ($image_filmstrip_height - $image_thumb_height) / 2;
|
1126 |
-
?>
|
1127 |
-
<div id="wdi_filmstrip_thumbnail_<?php echo $key; ?>" class="wdi_filmstrip_thumbnail <?php echo (($image_row->id == $current_image_id) ? 'wdi_thumb_active' : 'wdi_thumb_deactive'); ?>">
|
1128 |
-
<img style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" class="wdi_filmstrip_thumbnail_img" src="<?php echo ($is_embed ? "" : site_url() . '/' . $WD_WDI_UPLOAD_DIR) . $image_row->thumb_url; ?>" onclick="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" ontouchend="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" image_id="<?php echo $image_row->id; ?>" image_key="<?php echo $key; ?>" alt="<?php echo $image_row->alt; ?>" />
|
1129 |
-
</div>
|
1130 |
-
<?php
|
1131 |
-
}
|
1132 |
-
?>
|
1133 |
-
</div>
|
1134 |
-
</div>
|
1135 |
-
<div class="wdi_filmstrip_right"><i class="fa <?php echo ($filmstrip_direction == 'horizontal'? 'fa-angle-right' : 'fa-angle-down'); ?>"></i></div>
|
1136 |
-
</div>
|
1137 |
<?php
|
1138 |
}
|
1139 |
?>
|
@@ -1164,7 +516,7 @@ class WDIViewGalleryBox {
|
|
1164 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
1165 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
|
1166 |
if ($image_row->id == $current_image_id) {
|
1167 |
-
$current_key = $
|
1168 |
?>
|
1169 |
<span class="wdi_popup_image_spun" id="wdi_popup_image" image_id="<?php echo $image_row->id; ?>">
|
1170 |
<span class="wdi_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
|
@@ -1188,10 +540,10 @@ class WDIViewGalleryBox {
|
|
1188 |
else{
|
1189 |
$post_height =$post_width +88;
|
1190 |
}
|
1191 |
-
WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'style'=>"width:".$post_width."px; height:".$post_height."px; vertical-align:middle; display:inline-block; position:relative;"));
|
1192 |
}
|
1193 |
else{
|
1194 |
-
WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"));
|
1195 |
}
|
1196 |
?>
|
1197 |
</span>
|
@@ -1203,7 +555,7 @@ class WDIViewGalleryBox {
|
|
1203 |
</span>
|
1204 |
<span class="wdi_popup_image_second_spun">
|
1205 |
</span>
|
1206 |
-
<input type="hidden" id="wdi_current_image_key" value="<?php echo $
|
1207 |
<?php
|
1208 |
break;
|
1209 |
}
|
@@ -1213,7 +565,7 @@ class WDIViewGalleryBox {
|
|
1213 |
</div>
|
1214 |
</div>
|
1215 |
<a id="wdi_spider_popup_left" <?php echo ($option_row->enable_loop == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="wdi_spider_popup_left-ico"><span><i class="wdi_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
|
1216 |
-
<a id="wdi_spider_popup_right" <?php echo ($option_row->enable_loop == 0 && $current_key ==
|
1217 |
</div>
|
1218 |
</div>
|
1219 |
<?php if ($enable_comment_social) { ?>
|
@@ -1356,6 +708,7 @@ class WDIViewGalleryBox {
|
|
1356 |
if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
|
1357 |
comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
|
1358 |
}
|
|
|
1359 |
}, 800);
|
1360 |
}
|
1361 |
});
|
@@ -1414,345 +767,12 @@ class WDIViewGalleryBox {
|
|
1414 |
jQuery(".wdi_filmstrip_right").show();
|
1415 |
}
|
1416 |
}
|
1417 |
-
function wdi_testBrowser_cssTransitions() {
|
1418 |
-
return wdi_testDom('Transition');
|
1419 |
-
}
|
1420 |
-
function wdi_testBrowser_cssTransforms3d() {
|
1421 |
-
return wdi_testDom('Perspective');
|
1422 |
-
}
|
1423 |
-
function wdi_testDom(prop) {
|
1424 |
-
/* Browser vendor CSS prefixes.*/
|
1425 |
-
var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
|
1426 |
-
/* Browser vendor DOM prefixes.*/
|
1427 |
-
var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
|
1428 |
-
var i = domPrefixes.length;
|
1429 |
-
while (i--) {
|
1430 |
-
if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
|
1431 |
-
return true;
|
1432 |
-
}
|
1433 |
-
}
|
1434 |
-
return false;
|
1435 |
-
}
|
1436 |
-
function wdi_cube(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
|
1437 |
-
/* If browser does not support 3d transforms/CSS transitions.*/
|
1438 |
-
if (!wdi_testBrowser_cssTransitions()) {
|
1439 |
-
return wdi_fallback(current_image_class, next_image_class, direction);
|
1440 |
-
}
|
1441 |
-
if (!wdi_testBrowser_cssTransforms3d()) {
|
1442 |
-
return wdi_fallback3d(current_image_class, next_image_class, direction);
|
1443 |
-
}
|
1444 |
-
wdi_trans_in_progress = true;
|
1445 |
-
/* Set active thumbnail.*/
|
1446 |
-
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1447 |
-
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1448 |
-
jQuery(".wdi_slide_bg").css('perspective', 1000);
|
1449 |
-
jQuery(current_image_class).css({
|
1450 |
-
transform : 'translateZ(' + tz + 'px)',
|
1451 |
-
backfaceVisibility : 'hidden'
|
1452 |
-
});
|
1453 |
-
jQuery(next_image_class).css({
|
1454 |
-
opacity : 1,
|
1455 |
-
filter: 'Alpha(opacity=100)',
|
1456 |
-
backfaceVisibility : 'hidden',
|
1457 |
-
transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
|
1458 |
-
});
|
1459 |
-
jQuery(".wdi_slider").css({
|
1460 |
-
transform: 'translateZ(-' + tz + 'px)',
|
1461 |
-
transformStyle: 'preserve-3d'
|
1462 |
-
});
|
1463 |
-
/* Execution steps.*/
|
1464 |
-
setTimeout(function () {
|
1465 |
-
jQuery(".wdi_slider").css({
|
1466 |
-
transition: 'all ' + wdi_transition_duration + 'ms ease-in-out',
|
1467 |
-
transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
|
1468 |
-
});
|
1469 |
-
}, 20);
|
1470 |
-
/* After transition.*/
|
1471 |
-
jQuery(".wdi_slider").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wdi_after_trans));
|
1472 |
-
function wdi_after_trans() {
|
1473 |
-
jQuery(current_image_class).removeAttr('style');
|
1474 |
-
jQuery(next_image_class).removeAttr('style');
|
1475 |
-
jQuery(".wdi_slider").removeAttr('style');
|
1476 |
-
jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
|
1477 |
-
jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
|
1478 |
-
|
1479 |
-
wdi_trans_in_progress = false;
|
1480 |
-
jQuery(current_image_class).html('');
|
1481 |
-
if (typeof event_stack !== 'undefined') {
|
1482 |
-
if (event_stack.length > 0) {
|
1483 |
-
key = event_stack[0].split("-");
|
1484 |
-
event_stack.shift();
|
1485 |
-
wdi_change_image(key[0], key[1], wdi_data, true);
|
1486 |
-
}
|
1487 |
-
}
|
1488 |
-
wdi_change_watermark_container();
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
function wdi_cubeH(current_image_class, next_image_class, direction) {
|
1492 |
-
/* Set to half of image width.*/
|
1493 |
-
var dimension = jQuery(current_image_class).width() / 2;
|
1494 |
-
if (direction == 'right') {
|
1495 |
-
wdi_cube(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
|
1496 |
-
}
|
1497 |
-
else if (direction == 'left') {
|
1498 |
-
wdi_cube(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
|
1499 |
-
}
|
1500 |
-
}
|
1501 |
-
function wdi_cubeV(current_image_class, next_image_class, direction) {
|
1502 |
-
/* Set to half of image height.*/
|
1503 |
-
var dimension = jQuery(current_image_class).height() / 2;
|
1504 |
-
/* If next slide.*/
|
1505 |
-
if (direction == 'right') {
|
1506 |
-
wdi_cube(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction);
|
1507 |
-
}
|
1508 |
-
else if (direction == 'left') {
|
1509 |
-
wdi_cube(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction);
|
1510 |
-
}
|
1511 |
-
}
|
1512 |
-
/* For browsers that does not support transitions.*/
|
1513 |
-
function wdi_fallback(current_image_class, next_image_class, direction) {
|
1514 |
-
wdi_fade(current_image_class, next_image_class, direction);
|
1515 |
-
}
|
1516 |
-
/* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
|
1517 |
-
function wdi_fallback3d(current_image_class, next_image_class, direction) {
|
1518 |
-
wdi_sliceV(current_image_class, next_image_class, direction);
|
1519 |
-
}
|
1520 |
-
function wdi_none(current_image_class, next_image_class, direction) {
|
1521 |
-
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
1522 |
-
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
1523 |
-
/* Set active thumbnail.*/
|
1524 |
-
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1525 |
-
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1526 |
-
wdi_trans_in_progress = false;
|
1527 |
-
jQuery(current_image_class).html('');
|
1528 |
-
wdi_change_watermark_container();
|
1529 |
-
}
|
1530 |
-
function wdi_fade(current_image_class, next_image_class, direction) {
|
1531 |
-
/* Set active thumbnail.*/
|
1532 |
-
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1533 |
-
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1534 |
-
if (wdi_testBrowser_cssTransitions()) {
|
1535 |
-
jQuery(next_image_class).css('transition', 'opacity ' + wdi_transition_duration + 'ms linear');
|
1536 |
-
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
1537 |
-
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
1538 |
-
wdi_change_watermark_container();
|
1539 |
-
}
|
1540 |
-
else {
|
1541 |
-
jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, wdi_transition_duration);
|
1542 |
-
jQuery(next_image_class).animate({
|
1543 |
-
'opacity' : 1,
|
1544 |
-
'z-index': 2
|
1545 |
-
}, {
|
1546 |
-
duration: wdi_transition_duration,
|
1547 |
-
complete: function () {
|
1548 |
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
jQuery(current_image_class).fadeTo(wdi_transition_duration, 0);
|
1555 |
-
jQuery(next_image_class).fadeTo(wdi_transition_duration, 1);
|
1556 |
-
}
|
1557 |
-
}
|
1558 |
-
function wdi_grid(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
|
1559 |
-
/* If browser does not support CSS transitions.*/
|
1560 |
-
if (!wdi_testBrowser_cssTransitions()) {
|
1561 |
-
return wdi_fallback(current_image_class, next_image_class, direction);
|
1562 |
-
}
|
1563 |
-
wdi_trans_in_progress = true;
|
1564 |
-
/* Set active thumbnail.*/
|
1565 |
-
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1566 |
-
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1567 |
-
/* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
|
1568 |
-
var count = (wdi_transition_duration) / (cols + rows);
|
1569 |
-
/* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
|
1570 |
-
function wdi_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
|
1571 |
-
var delay = (c + r) * count;
|
1572 |
-
/* Return a gridlet elem with styles for specific transition.*/
|
1573 |
-
return jQuery('<span class="wdi_gridlet" />').css({
|
1574 |
-
display : "block",
|
1575 |
-
width : width,
|
1576 |
-
height : height,
|
1577 |
-
top : top,
|
1578 |
-
left : left,
|
1579 |
-
backgroundImage : 'url("' + src + '")',
|
1580 |
-
backgroundColor: jQuery(".wdi_spider_popup_wrap").css("background-color"),
|
1581 |
-
/*backgroundColor: 'rgba(0, 0, 0, 0)',*/
|
1582 |
-
backgroundRepeat: 'no-repeat',
|
1583 |
-
backgroundPosition : img_left + 'px ' + img_top + 'px',
|
1584 |
-
backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
|
1585 |
-
transition : 'all ' + wdi_transition_duration + 'ms ease-in-out ' + delay + 'ms',
|
1586 |
-
transform : 'none'
|
1587 |
-
});
|
1588 |
-
}
|
1589 |
-
/* Get the current slide's image.*/
|
1590 |
-
var cur_img = jQuery(current_image_class).find('img');
|
1591 |
-
/* Create a grid to hold the gridlets.*/
|
1592 |
-
var grid = jQuery('<span style="display: block;" />').addClass('wdi_grid');
|
1593 |
-
/* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
|
1594 |
-
jQuery(current_image_class).prepend(grid);
|
1595 |
-
/* Vars to calculate positioning/size of gridlets.*/
|
1596 |
-
var cont = jQuery(".wdi_slide_bg");
|
1597 |
-
var imgWidth = cur_img.width();
|
1598 |
-
var imgHeight = cur_img.height();
|
1599 |
-
var contWidth = cont.width(),
|
1600 |
-
contHeight = cont.height(),
|
1601 |
-
colWidth = Math.floor(contWidth / cols),
|
1602 |
-
rowHeight = Math.floor(contHeight / rows),
|
1603 |
-
colRemainder = contWidth - (cols * colWidth),
|
1604 |
-
colAdd = Math.ceil(colRemainder / cols),
|
1605 |
-
rowRemainder = contHeight - (rows * rowHeight),
|
1606 |
-
rowAdd = Math.ceil(rowRemainder / rows),
|
1607 |
-
leftDist = 0,
|
1608 |
-
img_leftDist = Math.ceil((jQuery(".wdi_slide_bg").width() - cur_img.width()) / 2);
|
1609 |
-
var imgSrc = typeof cur_img.attr('src')=='undefined' ? '' :cur_img.attr('src');
|
1610 |
-
/* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
|
1611 |
-
tx = tx === 'auto' ? contWidth : tx;
|
1612 |
-
tx = tx === 'min-auto' ? - contWidth : tx;
|
1613 |
-
ty = ty === 'auto' ? contHeight : ty;
|
1614 |
-
ty = ty === 'min-auto' ? - contHeight : ty;
|
1615 |
-
/* Loop through cols.*/
|
1616 |
-
for (var i = 0; i < cols; i++) {
|
1617 |
-
var topDist = 0,
|
1618 |
-
img_topDst = Math.floor((jQuery(".wdi_slide_bg").height() - cur_img.height()) / 2),
|
1619 |
-
newColWidth = colWidth;
|
1620 |
-
/* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
|
1621 |
-
if (colRemainder > 0) {
|
1622 |
-
var add = colRemainder >= colAdd ? colAdd : colRemainder;
|
1623 |
-
newColWidth += add;
|
1624 |
-
colRemainder -= add;
|
1625 |
-
}
|
1626 |
-
/* Nested loop to create row gridlets for each col.*/
|
1627 |
-
for (var j = 0; j < rows; j++) {
|
1628 |
-
var newRowHeight = rowHeight,
|
1629 |
-
newRowRemainder = rowRemainder;
|
1630 |
-
/* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
|
1631 |
-
if (newRowRemainder > 0) {
|
1632 |
-
add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
|
1633 |
-
newRowHeight += add;
|
1634 |
-
newRowRemainder -= add;
|
1635 |
-
}
|
1636 |
-
/* Create & append gridlet to grid.*/
|
1637 |
-
grid.append(wdi_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
|
1638 |
-
topDist += newRowHeight;
|
1639 |
-
img_topDst -= newRowHeight;
|
1640 |
-
}
|
1641 |
-
img_leftDist -= newColWidth;
|
1642 |
-
leftDist += newColWidth;
|
1643 |
-
}
|
1644 |
-
/* Set event listener on last gridlet to finish transitioning.*/
|
1645 |
-
var last_gridlet = grid.children().last();
|
1646 |
-
/* Show grid & hide the image it replaces.*/
|
1647 |
-
grid.show();
|
1648 |
-
cur_img.css('opacity', 0);
|
1649 |
-
/* Add identifying classes to corner gridlets (useful if applying border radius).*/
|
1650 |
-
grid.children().first().addClass('rs-top-left');
|
1651 |
-
grid.children().last().addClass('rs-bottom-right');
|
1652 |
-
grid.children().eq(rows - 1).addClass('rs-bottom-left');
|
1653 |
-
grid.children().eq(- rows).addClass('rs-top-right');
|
1654 |
-
/* Execution steps.*/
|
1655 |
-
setTimeout(function () {
|
1656 |
-
grid.children().css({
|
1657 |
-
opacity: op,
|
1658 |
-
transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
|
1659 |
-
});
|
1660 |
-
}, 1);
|
1661 |
-
jQuery(next_image_class).css('opacity', 1);
|
1662 |
-
/* After transition.*/
|
1663 |
-
jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wdi_after_trans));
|
1664 |
-
function wdi_after_trans() {
|
1665 |
-
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
1666 |
-
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
1667 |
-
cur_img.css('opacity', 1);
|
1668 |
-
grid.remove();
|
1669 |
-
wdi_trans_in_progress = false;
|
1670 |
-
jQuery(current_image_class).html('');
|
1671 |
-
if (typeof event_stack !== 'undefined') {
|
1672 |
-
if (event_stack.length > 0) {
|
1673 |
-
key = event_stack[0].split("-");
|
1674 |
-
event_stack.shift();
|
1675 |
-
wdi_change_image(key[0], key[1], wdi_data, true);
|
1676 |
-
}
|
1677 |
-
}
|
1678 |
-
wdi_change_watermark_container();
|
1679 |
-
}
|
1680 |
-
}
|
1681 |
-
function wdi_sliceH(current_image_class, next_image_class, direction) {
|
1682 |
-
if (direction == 'right') {
|
1683 |
-
var translateX = 'min-auto';
|
1684 |
-
}
|
1685 |
-
else if (direction == 'left') {
|
1686 |
-
var translateX = 'auto';
|
1687 |
-
}
|
1688 |
-
wdi_grid(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
|
1689 |
-
}
|
1690 |
-
function wdi_sliceV(current_image_class, next_image_class, direction) {
|
1691 |
-
if (direction == 'right') {
|
1692 |
-
var translateY = 'min-auto';
|
1693 |
-
}
|
1694 |
-
else if (direction == 'left') {
|
1695 |
-
var translateY = 'auto';
|
1696 |
-
}
|
1697 |
-
wdi_grid(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
|
1698 |
-
}
|
1699 |
-
function wdi_slideV(current_image_class, next_image_class, direction) {
|
1700 |
-
if (direction == 'right') {
|
1701 |
-
var translateY = 'auto';
|
1702 |
-
}
|
1703 |
-
else if (direction == 'left') {
|
1704 |
-
var translateY = 'min-auto';
|
1705 |
-
}
|
1706 |
-
wdi_grid(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction);
|
1707 |
-
}
|
1708 |
-
function wdi_slideH(current_image_class, next_image_class, direction) {
|
1709 |
-
if (direction == 'right') {
|
1710 |
-
var translateX = 'min-auto';
|
1711 |
-
}
|
1712 |
-
else if (direction == 'left') {
|
1713 |
-
var translateX = 'auto';
|
1714 |
-
}
|
1715 |
-
wdi_grid(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction);
|
1716 |
-
}
|
1717 |
-
function wdi_scaleOut(current_image_class, next_image_class, direction) {
|
1718 |
-
wdi_grid(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
|
1719 |
-
}
|
1720 |
-
function wdi_scaleIn(current_image_class, next_image_class, direction) {
|
1721 |
-
wdi_grid(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction);
|
1722 |
-
}
|
1723 |
-
function wdi_blockScale(current_image_class, next_image_class, direction) {
|
1724 |
-
wdi_grid(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction);
|
1725 |
-
}
|
1726 |
-
function wdi_kaleidoscope(current_image_class, next_image_class, direction) {
|
1727 |
-
wdi_grid(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction);
|
1728 |
-
}
|
1729 |
-
function wdi_fan(current_image_class, next_image_class, direction) {
|
1730 |
-
if (direction == 'right') {
|
1731 |
-
var rotate = 45;
|
1732 |
-
var translateX = 100;
|
1733 |
-
}
|
1734 |
-
else if (direction == 'left') {
|
1735 |
-
var rotate = -45;
|
1736 |
-
var translateX = -100;
|
1737 |
-
}
|
1738 |
-
wdi_grid(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
|
1739 |
-
}
|
1740 |
-
function wdi_blindV(current_image_class, next_image_class, direction) {
|
1741 |
-
wdi_grid(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class);
|
1742 |
-
}
|
1743 |
-
function wdi_blindH(current_image_class, next_image_class, direction) {
|
1744 |
-
wdi_grid(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
|
1745 |
-
}
|
1746 |
-
function wdi_random(current_image_class, next_image_class, direction) {
|
1747 |
-
var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV'];
|
1748 |
-
/* Pick a random transition from the anims array.*/
|
1749 |
-
this["wdi_" + anims[Math.floor(Math.random() * anims.length)]](current_image_class, next_image_class, direction);
|
1750 |
-
}
|
1751 |
-
function wdi_pause_stream(parent){
|
1752 |
-
jQuery(parent).find('video').each(function(){
|
1753 |
-
jQuery(this).get(0).pause();
|
1754 |
-
});
|
1755 |
-
}
|
1756 |
function wdi_change_image(current_key, key, wdi_data, from_effect) {
|
1757 |
wdi_pause_stream('#wdi_image_container');
|
1758 |
jQuery("#wdi_spider_popup_left").show();
|
@@ -1830,6 +850,27 @@ class WDIViewGalleryBox {
|
|
1830 |
'<div class="wdi_image_description"></div>'+
|
1831 |
'</div>');
|
1832 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1833 |
/* Change image title, description.*/
|
1834 |
jQuery(".wdi_image_title").html(jQuery('<span style="display: block;" />').append(wdi_title_div));
|
1835 |
jQuery(".wdi_image_description").html(jQuery('<span style="display: block;" />').html(wdi_data[key]["description"]).text());
|
@@ -1877,10 +918,10 @@ class WDIViewGalleryBox {
|
|
1877 |
post_width = cur_width;
|
1878 |
post_height = post_width +88 ;
|
1879 |
}
|
1880 |
-
innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:"+post_width+"px; height:"+post_height+"px; vertical-align:middle; display:inline-block; position:relative; top: "+0.5*(cur_height-post_height)+ "px; " });
|
1881 |
}
|
1882 |
else{
|
1883 |
-
innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;" });
|
1884 |
}
|
1885 |
innhtml += "</span>";
|
1886 |
}
|
@@ -2284,15 +1325,7 @@ class WDIViewGalleryBox {
|
|
2284 |
// console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
|
2285 |
}
|
2286 |
}
|
2287 |
-
|
2288 |
-
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
2289 |
-
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
2290 |
-
if (isMobile) {
|
2291 |
-
if (viewportmeta) {
|
2292 |
-
viewportmeta.content = 'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0';
|
2293 |
-
}
|
2294 |
-
}
|
2295 |
-
}
|
2296 |
jQuery(document).ready(function () {
|
2297 |
|
2298 |
|
@@ -2341,6 +1374,37 @@ class WDIViewGalleryBox {
|
|
2341 |
wdi_reset_zoom();
|
2342 |
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
2343 |
var wdi_click = isMobile ? 'touchend' : 'click';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2344 |
jQuery("#wdi_spider_popup_left").on(wdi_click, function () {
|
2345 |
wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), (parseInt(jQuery('#wdi_current_image_key').val()) + wdi_data.length - 1) % wdi_data.length, wdi_data);
|
2346 |
return false;
|
@@ -2507,6 +1571,7 @@ class WDIViewGalleryBox {
|
|
2507 |
|
2508 |
?>
|
2509 |
jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".wdi_ctrl_btn_container").height()}, 500);
|
|
|
2510 |
jQuery(".wdi_toggle_container").animate({
|
2511 |
<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
|
2512 |
}, {
|
@@ -2530,6 +1595,7 @@ class WDIViewGalleryBox {
|
|
2530 |
|
2531 |
?>
|
2532 |
jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
|
|
|
2533 |
jQuery(".wdi_toggle_container").animate({
|
2534 |
<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".wdi_ctrl_btn_container").height()
|
2535 |
}, {
|
42 |
$gallery_id = (isset($current_feed['id']) ? esc_html($current_feed['id']) : 0);
|
43 |
$wdi = (isset($_POST['feed_counter']) ? esc_html($_POST['feed_counter']) : 0);
|
44 |
$current_image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : 0);
|
45 |
+
$current_image_index = (isset($_POST['current_image_index']) ? esc_html($_POST['current_image_index']) : 0);
|
46 |
$theme_id = (isset($current_feed['theme_id']) ? esc_html($current_feed['theme_id']) : 1);
|
47 |
|
48 |
+
$carousel_media_row = (isset($_POST['carousel_media_row']) ? $_POST['carousel_media_row'] : "");
|
49 |
+
$carousel_media = json_decode(stripslashes($carousel_media_row), true);
|
50 |
+
$carousel_media = is_array($carousel_media) ? $carousel_media : array();
|
51 |
+
|
52 |
$thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 90);/*watch later*/
|
53 |
$thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);/*watch later*/
|
54 |
|
91 |
$image_right_click = (isset($current_feed['popup_image_right_click']) ? esc_html($current_feed['popup_image_right_click']) : 1);
|
92 |
|
93 |
//$option_row = $this->model->get_option_row_data();
|
|
|
94 |
// $image_right_click = 0; //$option_row->image_right_click;/*watch later havent this options*/
|
95 |
$comment_moderation = 0;//$option_row->comment_moderation;/*watch later havent this options*/
|
96 |
|
115 |
$image_filmstrip_width = 0;
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
$json = (($_POST['image_rows']));
|
120 |
str_replace('"',""", $json);
|
121 |
|
122 |
$image_rows = json_decode(stripslashes($json));
|
123 |
+
$image_rows_count = ($_POST['image_rows_count'] * 1);//parseint
|
124 |
$image_rows = WDILibrary::arrayToObject($image_rows);
|
125 |
|
126 |
/////////////////////////////////Parametes for deprecated content////////////////////
|
212 |
}
|
213 |
|
214 |
?>
|
215 |
+
<style>
|
216 |
+
.wdi_popup_image {
|
217 |
+
max-width: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>px;
|
218 |
+
max-height: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>px;
|
219 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
|
221 |
+
.wdi_popup_embed {
|
222 |
+
width: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>px;
|
223 |
+
height: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>px;
|
224 |
+
}
|
225 |
|
226 |
+
<?php
|
227 |
+
if($option_row->autohide_lightbox_navigation){?>
|
228 |
+
#wdi_spider_popup_left-ico{
|
229 |
+
left: -9999px;
|
230 |
+
}
|
231 |
+
#wdi_spider_popup_right-ico{
|
232 |
+
left: -9999px;
|
233 |
+
}
|
234 |
+
<?php }
|
235 |
+
else { ?>
|
236 |
+
#wdi_spider_popup_left-ico {
|
237 |
+
left: 20px;
|
238 |
+
}
|
239 |
+
#wdi_spider_popup_right-ico {
|
240 |
+
left: auto;
|
241 |
+
right: 20px;
|
242 |
+
}
|
243 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
+
.wdi_image_container {
|
247 |
+
<?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : $image_filmstrip_width); ?>px;
|
248 |
+
}
|
|
|
249 |
|
250 |
+
.wdi_filmstrip_container {
|
251 |
+
height: <?php echo ($filmstrip_direction == 'horizontal'? $image_filmstrip_height : $image_height); ?>px;
|
252 |
+
width: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width : $image_filmstrip_width); ?>px;
|
253 |
+
}
|
254 |
|
255 |
+
.wdi_filmstrip {
|
256 |
+
<?php echo $left_or_top; ?>: 20px;
|
257 |
+
<?php echo $width_or_height; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width - 40 : $image_height - 40); ?>px;
|
258 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
+
.wdi_filmstrip_thumbnails {
|
261 |
+
height: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : ($image_filmstrip_height + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count); ?>px;
|
262 |
+
<?php echo $left_or_top; ?>: 0px;
|
263 |
+
width: <?php echo ($filmstrip_direction == 'horizontal' ? ($image_filmstrip_width + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count : $image_filmstrip_width); ?>px;
|
264 |
+
}
|
|
|
|
|
|
|
|
|
265 |
|
266 |
+
.wdi_filmstrip_thumbnail {
|
267 |
+
height: <?php echo $image_filmstrip_height; ?>px;
|
268 |
+
width: <?php echo $image_filmstrip_width; ?>px;
|
269 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
+
.wdi_filmstrip_left {
|
272 |
+
<?php echo $width_or_height; ?>: 20px;
|
273 |
+
<?php echo $left_or_top; ?>: 0;
|
274 |
+
}
|
275 |
+
.wdi_filmstrip_right {
|
276 |
+
<?php echo $width_or_height; ?>: 20px;
|
277 |
+
}
|
278 |
|
279 |
+
.wdi_image_info_container1 {
|
280 |
+
display: <?php echo $popup_info_always_show ? 'table-cell' : 'none'; ?>;
|
281 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
|
283 |
+
.wdi_image_info {
|
284 |
+
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') ? 'bottom: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
285 |
+
<?php if($params_array['popup_info_full_width']) { ?>
|
286 |
+
width: 100%;
|
287 |
+
<?php } else { ?>
|
288 |
+
width: 33%;
|
289 |
+
margin: <?php echo $theme_row->lightbox_info_margin; ?>;
|
290 |
+
<?php } ?>
|
291 |
+
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
292 |
+
}
|
293 |
+
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
<script>
|
|
|
295 |
var event_stack = [];
|
296 |
<?php
|
297 |
$image_id_exist = FALSE;
|
298 |
foreach ($image_rows as $key => $image_row) {
|
299 |
+
if ($image_row->id == $image_id) {
|
300 |
+
$current_avg_rating = $image_row->avg_rating;
|
301 |
+
$current_rate = $image_row->rate;
|
302 |
+
$current_rate_count = $image_row->rate_count;
|
303 |
+
$current_image_key = $key;
|
304 |
+
}
|
305 |
+
if ($image_row->id == $current_image_id) {
|
306 |
+
$current_image_alt = $image_row->alt;
|
307 |
+
$current_image_user_name = $image_row->username;
|
308 |
+
$current_image_user_pic = $image_row->profile_picture;
|
309 |
+
$current_image_hit_count = $image_row->hit_count;
|
310 |
+
$current_image_description = str_replace('#',' #',str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description));
|
311 |
+
$current_image_url = $image_row->image_url;
|
312 |
+
$current_thumb_url = $image_row->thumb_url;
|
313 |
+
$current_filetype = $image_row->filetype;
|
314 |
+
$current_filename = $image_row->filename;
|
315 |
+
$image_id_exist = TRUE;
|
316 |
+
}
|
317 |
+
continue;
|
318 |
+
//sanitizing image description
|
319 |
+
$instaDesc = $image_row->description;//todo
|
320 |
+
$instaDesc = preg_replace('/\\\\/', esc_html('\'), $instaDesc);
|
321 |
+
|
322 |
+
/*last two are ZWSP and P-SEP*/
|
323 |
+
$instaDesc = str_replace(array("\r\n", "\n", "\r",'
', '
'), esc_html(''), str_replace('"','\"',$instaDesc));
|
324 |
+
$instaDesc = str_replace('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
}
|
326 |
?>
|
327 |
|
334 |
}
|
335 |
?>
|
336 |
<div class="wdi_image_wrap">
|
337 |
+
<?php if ($enable_image_ctrl_btn || (!is_null($carousel_media) && count($carousel_media))) { ?>
|
338 |
+
<div class="wdi_btn_container">
|
339 |
+
<?php if(!is_null($carousel_media) && count($carousel_media)){ ?>
|
340 |
+
<div class="wdi_carousel_btn_container">
|
341 |
+
<div class="wdi_carousel_btn_content">
|
342 |
+
<?php foreach($carousel_media as $key => $media){
|
343 |
+
$class = ($key == 0 ? "active" : ($key > 9 ? "small" : "")); ?>
|
344 |
+
<span class="<?php echo $class; ?>" data-id="<?php echo $key; ?>"></span>
|
345 |
+
<?php } ?>
|
346 |
+
</div>
|
347 |
+
</div>
|
348 |
+
<?php
|
349 |
+
}
|
350 |
+
|
351 |
if ($enable_image_ctrl_btn) {
|
352 |
$share_url = add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => $current_image_id), admin_url('admin-ajax.php')) . '#wdi' . $gallery_id . '/' . $current_image_id;
|
353 |
?>
|
|
|
354 |
<div class="wdi_ctrl_btn_container">
|
355 |
<?php
|
356 |
if ($option_row->show_image_counts) {
|
372 |
?>
|
373 |
<i title="<?php echo __('Fullscreen', "wd-instagram-feed"); ?>" class="wdi_ctrl_btn wdi_fullscreen fa fa-arrows-alt"></i>
|
374 |
<?php } if ($popup_enable_info) { ?>
|
375 |
+
<i title="<?php echo __('Show Caption', "wd-instagram-feed"); ?>" class="wdi_ctrl_btn wdi_info fa fa-info"></i>
|
376 |
<?php } if ($enable_comment_social) { ?>
|
377 |
<i title="<?php echo __('Show comments', "wd-instagram-feed"); ?>" class="wdi_ctrl_btn wdi_comment fa fa-comment"></i>
|
378 |
<?php } if ($popup_enable_rate) { ?>
|
475 |
<div class="wdi_toggle_container">
|
476 |
<i class="wdi_toggle_btn fa <?php echo (($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'); ?>"></i>
|
477 |
</div>
|
478 |
+
<?php } ?>
|
479 |
+
</div>
|
480 |
<?php
|
481 |
}
|
482 |
$current_pos = 0;
|
483 |
|
484 |
if ($enable_image_filmstrip) {
|
485 |
+
$current_pos = $current_image_index * (($filmstrip_direction == 'horizontal' ? $image_filmstrip_width : $image_filmstrip_height) + $filmstrip_thumb_margin_hor);
|
486 |
+
$current_key = $current_image_index;
|
487 |
?>
|
488 |
+
<div class="wdi_filmstrip_container"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
<?php
|
490 |
}
|
491 |
?>
|
516 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
517 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
|
518 |
if ($image_row->id == $current_image_id) {
|
519 |
+
$current_key = $current_image_index;
|
520 |
?>
|
521 |
<span class="wdi_popup_image_spun" id="wdi_popup_image" image_id="<?php echo $image_row->id; ?>">
|
522 |
<span class="wdi_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
|
540 |
else{
|
541 |
$post_height =$post_width +88;
|
542 |
}
|
543 |
+
WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'style'=>"width:".$post_width."px; height:".$post_height."px; vertical-align:middle; display:inline-block; position:relative;"), $carousel_media);
|
544 |
}
|
545 |
else{
|
546 |
+
WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"), $carousel_media);
|
547 |
}
|
548 |
?>
|
549 |
</span>
|
555 |
</span>
|
556 |
<span class="wdi_popup_image_second_spun">
|
557 |
</span>
|
558 |
+
<input type="hidden" id="wdi_current_image_key" value="<?php echo $current_image_index; ?>" />
|
559 |
<?php
|
560 |
break;
|
561 |
}
|
565 |
</div>
|
566 |
</div>
|
567 |
<a id="wdi_spider_popup_left" <?php echo ($option_row->enable_loop == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="wdi_spider_popup_left-ico"><span><i class="wdi_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
|
568 |
+
<a id="wdi_spider_popup_right" <?php echo ($option_row->enable_loop == 0 && $current_key == $image_rows_count - 1) ? 'style="display: none;"' : ''; ?>><span id="wdi_spider_popup_right-ico"><span><i class="wdi_next_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
|
569 |
</div>
|
570 |
</div>
|
571 |
<?php if ($enable_comment_social) { ?>
|
708 |
if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
|
709 |
comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
|
710 |
}
|
711 |
+
|
712 |
}, 800);
|
713 |
}
|
714 |
});
|
767 |
jQuery(".wdi_filmstrip_right").show();
|
768 |
}
|
769 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
|
771 |
+
|
772 |
+
|
773 |
+
|
774 |
+
|
775 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
function wdi_change_image(current_key, key, wdi_data, from_effect) {
|
777 |
wdi_pause_stream('#wdi_image_container');
|
778 |
jQuery("#wdi_spider_popup_left").show();
|
850 |
'<div class="wdi_image_description"></div>'+
|
851 |
'</div>');
|
852 |
|
853 |
+
/* Change carousel media dots*/
|
854 |
+
if (typeof wdi_data[key]['carousel_media'] != "undefined" && wdi_data[key]['carousel_media'] != null) {
|
855 |
+
if(jQuery(".wdi_carousel_btn_container").length){
|
856 |
+
jQuery(".wdi_carousel_btn_container").remove();
|
857 |
+
}
|
858 |
+
var carousel = "";
|
859 |
+
if(wdi_data[key]['carousel_media'].length){
|
860 |
+
carousel += '<div class="wdi_carousel_btn_container"><div class="wdi_carousel_btn_content">';
|
861 |
+
for(var i = 0; i < wdi_data[key]['carousel_media'].length; i++){
|
862 |
+
var attr_class = (i == 0 ? "active" : (i > 9 ? "small" : ""));
|
863 |
+
carousel += '<span class="' + attr_class + '" data-id="' + i + '"></span>';
|
864 |
+
}
|
865 |
+
carousel += '</div></div>';
|
866 |
+
}
|
867 |
+
jQuery(".wdi_btn_container").prepend(carousel);
|
868 |
+
} else {
|
869 |
+
if(jQuery(".wdi_carousel_btn_container").length){
|
870 |
+
jQuery(".wdi_carousel_btn_container").remove();
|
871 |
+
}
|
872 |
+
}
|
873 |
+
|
874 |
/* Change image title, description.*/
|
875 |
jQuery(".wdi_image_title").html(jQuery('<span style="display: block;" />').append(wdi_title_div));
|
876 |
jQuery(".wdi_image_description").html(jQuery('<span style="display: block;" />').html(wdi_data[key]["description"]).text());
|
918 |
post_width = cur_width;
|
919 |
post_height = post_width +88 ;
|
920 |
}
|
921 |
+
innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:"+post_width+"px; height:"+post_height+"px; vertical-align:middle; display:inline-block; position:relative; top: "+0.5*(cur_height-post_height)+ "px; " },wdi_data[key]['carousel_media']);
|
922 |
}
|
923 |
else{
|
924 |
+
innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;" },wdi_data[key]['carousel_media']);
|
925 |
}
|
926 |
innhtml += "</span>";
|
927 |
}
|
1325 |
// console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
|
1326 |
}
|
1327 |
}
|
1328 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1329 |
jQuery(document).ready(function () {
|
1330 |
|
1331 |
|
1374 |
wdi_reset_zoom();
|
1375 |
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
1376 |
var wdi_click = isMobile ? 'touchend' : 'click';
|
1377 |
+
|
1378 |
+
/*Carousel Media*/
|
1379 |
+
jQuery("body").on(wdi_click, ".wdi_carousel_btn_container span", function () {
|
1380 |
+
if(jQuery("video.carousel_media.active").length){
|
1381 |
+
jQuery("video.carousel_media.active").get(0).pause();
|
1382 |
+
}
|
1383 |
+
var id = jQuery(this).data("id");
|
1384 |
+
jQuery(this).closest(".wdi_carousel_btn_container").find("span").removeClass("active");
|
1385 |
+
jQuery(this).addClass("active");
|
1386 |
+
jQuery(this).closest(".wdi_image_wrap").find(".carousel_media").removeClass("active");
|
1387 |
+
jQuery(this).closest(".wdi_image_wrap").find(".carousel_media[data-id='" + id + "']").addClass("active");
|
1388 |
+
return false;
|
1389 |
+
});
|
1390 |
+
var left = 0;
|
1391 |
+
var step = 19;
|
1392 |
+
jQuery("body").on(wdi_click, ".wdi_carousel_btn_container span.small", function () {
|
1393 |
+
jQuery(".wdi_carousel_btn_content").css({"width":"122px","padding-left":step + "px"});
|
1394 |
+
var index = jQuery(this).index();
|
1395 |
+
if(!jQuery(this).next("span").length || jQuery(this).next("span.small").length){
|
1396 |
+
left = left - step;
|
1397 |
+
jQuery(".wdi_carousel_btn_container span").css("left", left + "px");
|
1398 |
+
jQuery(".wdi_carousel_btn_container span").eq(index - 5).addClass("small");
|
1399 |
+
} else {
|
1400 |
+
left = left + step;
|
1401 |
+
jQuery(".wdi_carousel_btn_container span").css("left", left + "px");
|
1402 |
+
jQuery(".wdi_carousel_btn_container span").eq(index + 5).addClass("small");
|
1403 |
+
}
|
1404 |
+
jQuery(this).removeClass("small");
|
1405 |
+
return false;
|
1406 |
+
});
|
1407 |
+
|
1408 |
jQuery("#wdi_spider_popup_left").on(wdi_click, function () {
|
1409 |
wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), (parseInt(jQuery('#wdi_current_image_key').val()) + wdi_data.length - 1) % wdi_data.length, wdi_data);
|
1410 |
return false;
|
1571 |
|
1572 |
?>
|
1573 |
jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".wdi_ctrl_btn_container").height()}, 500);
|
1574 |
+
jQuery(".wdi_carousel_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '40px'}, 500);
|
1575 |
jQuery(".wdi_toggle_container").animate({
|
1576 |
<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
|
1577 |
}, {
|
1595 |
|
1596 |
?>
|
1597 |
jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
|
1598 |
+
jQuery(".wdi_carousel_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".wdi_ctrl_btn_container").height() + 25}, 500);
|
1599 |
jQuery(".wdi_toggle_container").animate({
|
1600 |
<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".wdi_ctrl_btn_container").height()
|
1601 |
}, {
|
frontend/views/WDIViewImageBrowser_view.php
CHANGED
@@ -23,13 +23,15 @@ class WDIViewImageBrowser_view{
|
|
23 |
$this->pass_feed_data_to_js();
|
24 |
$feed_row = $this->model->get_feed_row();
|
25 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
|
|
26 |
$this->generate_feed_styles($feed_row);
|
27 |
$style = $this->model->theme_row;
|
28 |
-
|
29 |
$wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
|
30 |
|
31 |
?>
|
32 |
-
|
|
|
33 |
<?php wdi_feed_frontend_messages();?>
|
34 |
<div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_loading"></div>
|
35 |
<div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_overlay" onclick="wdi_spider_destroypopup(1000)"></div>
|
@@ -76,57 +78,37 @@ class WDIViewImageBrowser_view{
|
|
76 |
|
77 |
|
78 |
wp_localize_script("wdi_frontend", 'wdi_feed_'.$wdi_feed_counter,array('feed_row'=>$feed_row,'data'=>array(),'usersData'=>array(),'dataCount'=>0));
|
|
|
79 |
wp_localize_script("wdi_frontend", 'wdi_front',array('feed_counter'=>$wdi_feed_counter));
|
80 |
}
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$style = $this->model->theme_row;
|
83 |
$colNum = (100/$feed_row['number_of_columns']);
|
84 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
85 |
-
if($style['header_position'] == 'center'){
|
86 |
-
$headerfloatPos = 'left';
|
87 |
-
}else{
|
88 |
-
$headerfloatPos = $style['header_position'];
|
89 |
-
}
|
90 |
?>
|
91 |
<style type="text/css">
|
92 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
93 |
-
width: <?php echo $style['feed_container_width']?>;
|
94 |
-
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
95 |
-
border-bottom: 5px solid <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/;
|
96 |
-
}
|
97 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_wrapper{
|
98 |
-
width: <?php echo $style['feed_wrapper_width']?>; /*feed_wrapper_width,column number * image size*/
|
99 |
-
background-color: <?php echo $style['feed_wrapper_bg_color']?>;/*feed_wrapper_bg_color*/
|
100 |
-
text-align: <?php echo $style['header_position']?>;/*header_position*/
|
101 |
-
}
|
102 |
|
103 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header{
|
104 |
-
margin: <?php echo $style['header_margin']?>;/*header_margin*/
|
105 |
-
padding: <?php echo $style['header_padding']?>;/*header_padding*/
|
106 |
-
border: <?php echo $style['header_border_size']?> solid <?php echo $style['header_border_color']?>;/*header_border_size, header_border_color*/
|
107 |
-
text-align: <?php echo $style['header_position']?>;/*header_position*/
|
108 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
109 |
}
|
110 |
|
111 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_img_wrap,#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_users_img_wrap{
|
112 |
-
height: <?php echo $style['header_img_width']?>px;/*header_img_width*/
|
113 |
-
width: <?php echo $style['header_img_width']?>px;/*header_img_width*/
|
114 |
-
border-radius: <?php echo $style['header_border_radius']?>px;/*header_img_width*/
|
115 |
-
}
|
116 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_text{
|
117 |
-
font-size: <?php echo $style['header_text_font_size']?>;
|
118 |
-
font-style: <?php echo $style['header_text_font_style']?>;
|
119 |
-
padding: <?php echo $style['header_text_padding']?>;/*header_text_padding*/
|
120 |
-
color: <?php echo $style['header_text_color']?>;/*header_text_color*/
|
121 |
-
font-weight: <?php echo $style['header_font_weight']?>;/*header_font_weight*/
|
122 |
-
line-height: <?php echo $style['header_img_width']?>px;/*header_img_width*/
|
123 |
-
}
|
124 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_single_user{
|
125 |
-
padding-top: <?php echo $style['user_padding']?>;/*user_padding*/
|
126 |
-
padding-bottom: <?php echo $style['user_padding']?>;/*user_padding*/
|
127 |
-
padding-left: <?php echo $style['user_padding']?>;/*user_padding*/
|
128 |
-
padding-right: <?php echo $style['user_padding']?>;/*user_padding*/
|
129 |
-
}
|
130 |
<?php
|
131 |
|
132 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
@@ -139,155 +121,19 @@ class WDIViewImageBrowser_view{
|
|
139 |
padding-top: <?php echo $header_text_padding; ?>px;
|
140 |
|
141 |
}
|
|
|
142 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3 {
|
143 |
margin-top: <?php echo $header_text_padding ?>px;
|
144 |
}
|
145 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_hashtag h3{
|
146 |
-
margin-top: <?php echo (intval($style['user_img_width']) - intval($style['users_text_font_size']))/2?>px;
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3{
|
151 |
-
font-size: <?php echo $style['users_text_font_size']?>;
|
152 |
-
font-style: <?php echo $style['users_text_font_style']?>;
|
153 |
-
line-height: <?php echo $style['users_text_font_size']?>;
|
154 |
-
color: <?php echo $style['users_text_color']?>;/*header_text_color*/;
|
155 |
-
}
|
156 |
-
|
157 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_user_img_wrap img{
|
158 |
-
height: <?php echo $style['user_img_width']?>px;
|
159 |
-
width: <?php echo $style['user_img_width']?>px;
|
160 |
-
border-radius: <?php echo $style['user_border_radius']?>px;
|
161 |
-
}
|
162 |
-
|
163 |
-
|
164 |
|
165 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info{
|
166 |
-
/*display: inline-block;*/
|
167 |
-
margin-left: <?php echo intval($style['user_img_width']) + 10;?>px;
|
168 |
-
line-height: <?php echo $style['users_text_font_size']?>;
|
169 |
-
color: <?php echo $style['users_text_color']?>;/*header_text_color !mmm/ seperate*/
|
170 |
display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
|
171 |
}
|
172 |
|
173 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_bio{
|
174 |
-
color: <?php echo $style['users_text_color']?>;/*header_text_color*/
|
175 |
-
font-size: <?php echo $style['user_description_font_size']?>;/*header_text_color*/
|
176 |
-
}
|
177 |
-
|
178 |
-
|
179 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_follow_btn{
|
180 |
-
border-radius: <?php echo $style['follow_btn_border_radius']?>px;
|
181 |
-
font-size: <?php echo $style['follow_btn_font_size']?>px;
|
182 |
-
background-color: <?php echo $style['follow_btn_bg_color']?>;
|
183 |
-
border-color: <?php echo $style['follow_btn_border_color']?>;
|
184 |
-
color: <?php echo $style['follow_btn_text_color']?>;
|
185 |
-
margin-left: <?php echo $style['follow_btn_margin']?>px;
|
186 |
-
padding: 0 <?php echo $style['follow_btn_padding']?>px;
|
187 |
-
}
|
188 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_follow_btn:hover{
|
189 |
-
border-color: <?php echo $style['follow_btn_border_hover_color']?>;
|
190 |
-
color: <?php echo $style['follow_btn_text_hover_color']?>;
|
191 |
-
background-color: <?php echo $style['follow_btn_background_hover_color']?>;
|
192 |
-
}
|
193 |
-
|
194 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_overlay{
|
195 |
-
width: <?php echo $style['user_img_width'];?>px;/*user_img_width*/
|
196 |
-
height: <?php echo $style['user_img_width'];?>px;/*user_img_width*/
|
197 |
-
border-radius: <?php echo $style['user_border_radius']?>px;/*user_img_width*/
|
198 |
-
background-color: <?php echo $style['th_overlay_hover_color'];?>;
|
199 |
-
}
|
200 |
-
|
201 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_icon span{
|
202 |
-
width: <?php echo $style['user_img_width'];?>px;/*header_img_width*/
|
203 |
-
height: <?php echo $style['user_img_width'];?>px;/*header_img_width*/
|
204 |
-
}
|
205 |
-
|
206 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_wrap {
|
207 |
-
padding: <?php echo $style['image_browser_photo_wrap_padding']?>; /*photo_wrap_padding*/
|
208 |
-
|
209 |
-
}
|
210 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_wrap_inner{
|
211 |
-
border: <?php echo $style['image_browser_photo_wrap_border_size']?> solid <?php echo $style['image_browser_photo_wrap_border_color']?>;/*photo_wrap_border_size,photo_wrap_border_color*/
|
212 |
-
background-color: <?php echo $style['image_browser_photo_wrap_bg_color']?>;/*photo_wrap_bg_color*/
|
213 |
-
}
|
214 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_img{
|
215 |
-
border-radius: <?php echo $style['image_browser_photo_img_border_radius']?>;/*photo_img_border_radius*/
|
216 |
-
}
|
217 |
-
|
218 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
219 |
width: <?php echo $colNum.'%'?>;/*thumbnail_size*/
|
220 |
}
|
221 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_meta {
|
222 |
-
background-color: <?php echo $style['image_browser_photo_meta_bg_color']?>;/*photo_meta_bg_color*/
|
223 |
-
}
|
224 |
-
|
225 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_thumb_likes{
|
226 |
-
width: <?php echo ($style['image_browser_photo_meta_one_line']=='1')? '50%' : '100%' ?>;/*photo_meta_one_line==false else 100%*/
|
227 |
-
float: <?php echo ($style['image_browser_photo_meta_one_line']=='1')? 'left' : 'none'?>;/*photo_meta_one_line==true else float none*/
|
228 |
-
font-size: <?php echo $style['image_browser_like_comm_font_size']?>;/*photo_caption_font_size*/;
|
229 |
-
color: <?php echo $style['image_browser_like_text_color']?>;/*like_text_color*/
|
230 |
-
|
231 |
-
}
|
232 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_thumb_comments{
|
233 |
-
width: <?php echo ($style['image_browser_photo_meta_one_line']=='1')? '50%' : '100%' ?>;/*photo_meta_one_line==false else 100%*/
|
234 |
-
float: <?php echo ($style['image_browser_photo_meta_one_line']=='1')? 'left' : 'none'?>;/*photo_meta_one_line==true else float none*/
|
235 |
-
font-size: <?php echo $style['image_browser_like_comm_font_size']?>;/*photo_caption_font_size*/;
|
236 |
-
color: <?php echo $style['image_browser_comment_text_color']?>;/*comment_text_color*/
|
237 |
|
238 |
-
}
|
239 |
-
|
240 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_title {
|
241 |
-
font-size: <?php echo $style['image_browser_photo_caption_font_size']?>;/*photo_caption_font_size*/
|
242 |
-
color: <?php echo $style['image_browser_photo_caption_color']?>;/*photo_caption_color*/
|
243 |
-
}
|
244 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_title:hover{
|
245 |
-
color: <?php echo $style['image_browser_photo_caption_hover_color']?>;
|
246 |
-
}
|
247 |
-
|
248 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more{
|
249 |
-
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
250 |
-
text-align: <?php echo $style['load_more_position']?>;/*load_more_position*/
|
251 |
-
}
|
252 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_wrap{
|
253 |
-
padding: <?php echo $style['load_more_padding']?>;/*load_more_padding*/
|
254 |
-
background-color: <?php echo $style['load_more_bg_color']?>;/*load_more_bg_color*/
|
255 |
-
border-radius: <?php echo $style['load_more_border_radius']?>;/*load_more_border_radius*/
|
256 |
-
height: <?php echo $style['load_more_height']?>;/*load_more_height*/
|
257 |
-
width: <?php echo $style['load_more_width']?>;/*load_more_width*/
|
258 |
-
border: <?php echo $style['load_more_border_size']?> solid <?php echo $style['load_more_border_color']?>;/*load_more_border_size, load_more_border_color*/;
|
259 |
-
}
|
260 |
-
|
261 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_text{
|
262 |
-
color: <?php echo $style['load_more_text_color']?>;/*load_more_text_color*/
|
263 |
-
font-size: <?php echo $style['load_more_text_font_size']?>;/*load_more_text_font_size*/
|
264 |
-
}
|
265 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_text img{
|
266 |
-
height: <?php echo $style['load_more_height']?>;/*load_more_height*/
|
267 |
-
width: <?php echo $style['load_more_height']?>;/*load_more_height*/
|
268 |
-
}
|
269 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_wrap:hover{
|
270 |
-
background-color: <?php echo $style['load_more_wrap_hover_color']?>;/*load_more_wrap_hover_color*/
|
271 |
-
}
|
272 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination{
|
273 |
-
text-align: <?php echo $style['pagination_position']?>;/*load_more_position*/
|
274 |
-
color: <?php echo $style['pagination_ctrl_color']?>;/*pagination_ctrl_color*/
|
275 |
-
font-size: <?php echo $style['pagination_size']?>;/*pagination_size*/
|
276 |
-
}
|
277 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination_ctrl{
|
278 |
-
margin: <?php echo $style['pagination_ctrl_margin']?>;
|
279 |
-
}
|
280 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination_ctrl:hover{
|
281 |
-
color: <?php echo $style['pagination_ctrl_hover_color']?>;
|
282 |
-
}
|
283 |
-
|
284 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_active_bg{
|
285 |
-
background-color: <?php echo $style['active_filter_bg_color'];?>;
|
286 |
-
}
|
287 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_active_col{
|
288 |
-
color: <?php echo $style['active_filter_bg_color'];?>;
|
289 |
-
border-color: <?php echo $style['active_filter_bg_color'];?>;
|
290 |
-
}
|
291 |
<?php if($feed_row['disable_mobile_layout']=="0"){
|
292 |
?>
|
293 |
@media screen and (min-width: 800px) and (max-width:1024px){
|
@@ -298,6 +144,7 @@ class WDIViewImageBrowser_view{
|
|
298 |
vertical-align: top;
|
299 |
overflow: hidden;
|
300 |
}
|
|
|
301 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
302 |
width: 100%;
|
303 |
margin: 0 auto;
|
@@ -305,6 +152,7 @@ class WDIViewImageBrowser_view{
|
|
305 |
}
|
306 |
|
307 |
}
|
|
|
308 |
@media screen and (min-width: 480px) and (max-width:800px){
|
309 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
310 |
width: <?php echo ($colNum<50) ? '50%' : $colNum.'%'?>;/*thumbnail_size*/
|
@@ -312,12 +160,14 @@ class WDIViewImageBrowser_view{
|
|
312 |
display: inline-block;
|
313 |
overflow: hidden;
|
314 |
}
|
|
|
315 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
316 |
width: 100%;
|
317 |
margin: 0 auto;
|
318 |
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
319 |
}
|
320 |
}
|
|
|
321 |
@media screen and (max-width: 480px){
|
322 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
323 |
width: <?php echo ($colNum<100) ? '100%' : $colNum.'%'?>;/*thumbnail_size*/
|
@@ -325,12 +175,14 @@ class WDIViewImageBrowser_view{
|
|
325 |
display: inline-block;
|
326 |
overflow: hidden;
|
327 |
}
|
|
|
328 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
329 |
width: 100%;
|
330 |
margin: 0 auto;
|
331 |
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
332 |
}
|
333 |
}
|
|
|
334 |
<?php
|
335 |
}?>
|
336 |
</style>
|
@@ -338,9 +190,6 @@ class WDIViewImageBrowser_view{
|
|
338 |
}
|
339 |
|
340 |
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
}
|
|
|
346 |
?>
|
23 |
$this->pass_feed_data_to_js();
|
24 |
$feed_row = $this->model->get_feed_row();
|
25 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
26 |
+
$this->add_theme_styles();
|
27 |
$this->generate_feed_styles($feed_row);
|
28 |
$style = $this->model->theme_row;
|
29 |
+
$container_class = 'wdi_feed_theme_' . '1' . ' wdi_feed_browser_' . '1';
|
30 |
$wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
|
31 |
|
32 |
?>
|
33 |
+
|
34 |
+
<div id="wdi_feed_<?php echo $wdi_feed_counter?>" class="wdi_feed_main_container wdi_layout_ib <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
|
35 |
<?php wdi_feed_frontend_messages();?>
|
36 |
<div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_loading"></div>
|
37 |
<div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_overlay" onclick="wdi_spider_destroypopup(1000)"></div>
|
78 |
|
79 |
|
80 |
wp_localize_script("wdi_frontend", 'wdi_feed_'.$wdi_feed_counter,array('feed_row'=>$feed_row,'data'=>array(),'usersData'=>array(),'dataCount'=>0));
|
81 |
+
wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
|
82 |
wp_localize_script("wdi_frontend", 'wdi_front',array('feed_counter'=>$wdi_feed_counter));
|
83 |
}
|
84 |
+
|
85 |
+
|
86 |
+
private function add_theme_styles(){
|
87 |
+
wp_enqueue_style("wdi_default_theme",WDI_URL . '/css/default_theme.css',array(),WDI_VERSION);
|
88 |
+
/*THIS METHOD FOR PAID VERSION*/
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @param $generator WDI_generate_styles
|
93 |
+
* @return boolean
|
94 |
+
* */
|
95 |
+
private function load_theme_css_file($generator){
|
96 |
+
/*THIS METHOD FOR PAID VERSION*/
|
97 |
+
return false;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function generate_feed_styles($feed_row)
|
101 |
+
{
|
102 |
$style = $this->model->theme_row;
|
103 |
$colNum = (100/$feed_row['number_of_columns']);
|
104 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
|
|
|
|
|
|
|
|
|
|
105 |
?>
|
106 |
<style type="text/css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header{
|
|
|
|
|
|
|
|
|
109 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
<?php
|
113 |
|
114 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
121 |
padding-top: <?php echo $header_text_padding; ?>px;
|
122 |
|
123 |
}
|
124 |
+
|
125 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3 {
|
126 |
margin-top: <?php echo $header_text_padding ?>px;
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info{
|
|
|
|
|
|
|
|
|
130 |
display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
134 |
width: <?php echo $colNum.'%'?>;/*thumbnail_size*/
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
<?php if($feed_row['disable_mobile_layout']=="0"){
|
138 |
?>
|
139 |
@media screen and (min-width: 800px) and (max-width:1024px){
|
144 |
vertical-align: top;
|
145 |
overflow: hidden;
|
146 |
}
|
147 |
+
|
148 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
149 |
width: 100%;
|
150 |
margin: 0 auto;
|
152 |
}
|
153 |
|
154 |
}
|
155 |
+
|
156 |
@media screen and (min-width: 480px) and (max-width:800px){
|
157 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
158 |
width: <?php echo ($colNum<50) ? '50%' : $colNum.'%'?>;/*thumbnail_size*/
|
160 |
display: inline-block;
|
161 |
overflow: hidden;
|
162 |
}
|
163 |
+
|
164 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
165 |
width: 100%;
|
166 |
margin: 0 auto;
|
167 |
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
168 |
}
|
169 |
}
|
170 |
+
|
171 |
@media screen and (max-width: 480px){
|
172 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
|
173 |
width: <?php echo ($colNum<100) ? '100%' : $colNum.'%'?>;/*thumbnail_size*/
|
175 |
display: inline-block;
|
176 |
overflow: hidden;
|
177 |
}
|
178 |
+
|
179 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
180 |
width: 100%;
|
181 |
margin: 0 auto;
|
182 |
background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
|
183 |
}
|
184 |
}
|
185 |
+
|
186 |
<?php
|
187 |
}?>
|
188 |
</style>
|
190 |
}
|
191 |
|
192 |
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
+
|
195 |
?>
|
frontend/views/WDIViewThumbnails_view.php
CHANGED
@@ -28,14 +28,15 @@ class WDIViewThumbnails_view
|
|
28 |
$this->pass_feed_data_to_js();
|
29 |
$feed_row = $this->model->get_feed_row();
|
30 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
|
|
31 |
$this->generate_feed_styles($feed_row);
|
32 |
$style = $this->model->theme_row;
|
33 |
-
|
34 |
$wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
|
35 |
|
36 |
?>
|
37 |
|
38 |
-
<div id="wdi_feed_<?php echo $wdi_feed_counter ?>" class="wdi_feed_main_container wdi_layout_th" <?php echo $wdi_data_ajax; ?> >
|
39 |
<?php wdi_feed_frontend_messages();?>
|
40 |
<div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_loading"></div>
|
41 |
<div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_overlay"
|
@@ -127,64 +128,36 @@ class WDIViewThumbnails_view
|
|
127 |
|
128 |
|
129 |
wp_localize_script("wdi_frontend", 'wdi_feed_' . $wdi_feed_counter, array('feed_row' => $feed_row, 'data' => array(), 'usersData' => array(), 'dataCount' => 0));
|
|
|
130 |
wp_localize_script("wdi_frontend", 'wdi_front', array('feed_counter' => $wdi_feed_counter));
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
public function generate_feed_styles($feed_row)
|
134 |
{
|
135 |
$style = $this->model->theme_row;
|
136 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
137 |
$colNum = (100 / $feed_row['number_of_columns']);
|
138 |
-
if ($style['header_position'] == 'center') {
|
139 |
-
$headerfloatPos = 'left';
|
140 |
-
}
|
141 |
-
else {
|
142 |
-
$headerfloatPos = $style['header_position'];
|
143 |
-
}
|
144 |
?>
|
145 |
<style type="text/css">
|
146 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
|
147 |
-
width: <?php echo $style['feed_container_width']?>;
|
148 |
-
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
149 |
-
border-bottom: 5px solid <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/;
|
150 |
-
}
|
151 |
-
|
152 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_wrapper {
|
153 |
-
width: <?php echo $style['feed_wrapper_width']?>; /*feed_wrapper_width,column number * image size*/
|
154 |
-
background-color: <?php echo $style['feed_wrapper_bg_color']?>; /*feed_wrapper_bg_color*/
|
155 |
-
text-align: <?php echo $style['header_position']?>; /*header_position*/
|
156 |
-
}
|
157 |
|
158 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header {
|
159 |
-
margin: <?php echo $style['header_margin']?>; /*header_margin*/
|
160 |
-
padding: <?php echo $style['header_padding']?>; /*header_padding*/
|
161 |
-
border: <?php echo $style['header_border_size']?> solid <?php echo $style['header_border_color']?>; /*header_border_size, header_border_color*/
|
162 |
-
text-align: <?php echo $style['header_position']?>; /*header_position*/
|
163 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
164 |
}
|
165 |
|
166 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_img_wrap, .wdi_users_img_wrap {
|
167 |
-
height: <?php echo $style['header_img_width']?>px; /*header_img_width*/
|
168 |
-
width: <?php echo $style['header_img_width']?>px; /*header_img_width*/
|
169 |
-
border-radius: <?php echo $style['header_border_radius']?>px; /*header_img_width*/
|
170 |
-
}
|
171 |
-
|
172 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_text {
|
173 |
-
font-size: <?php echo $style['header_text_font_size']?>;
|
174 |
-
font-style: <?php echo $style['header_text_font_style']?>;
|
175 |
-
padding: <?php echo $style['header_text_padding']?>; /*header_text_padding*/
|
176 |
-
color: <?php echo $style['header_text_color']?>; /*header_text_color*/
|
177 |
-
font-weight: <?php echo $style['header_font_weight']?>; /*header_font_weight*/
|
178 |
-
line-height: <?php echo $style['header_img_width']?>px; /*header_img_width*/
|
179 |
-
}
|
180 |
-
|
181 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_single_user {
|
182 |
-
padding-top: <?php echo $style['user_padding']?>; /*user_padding*/
|
183 |
-
padding-bottom: <?php echo $style['user_padding']?>; /*user_padding*/
|
184 |
-
padding-left: <?php echo $style['user_padding']?>; /*user_padding*/
|
185 |
-
padding-right: <?php echo $style['user_padding']?>; /*user_padding*/
|
186 |
-
}
|
187 |
-
|
188 |
<?php
|
189 |
|
190 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
@@ -202,182 +175,14 @@ class WDIViewThumbnails_view
|
|
202 |
margin-top: <?php echo $header_text_padding ?>px;
|
203 |
}
|
204 |
|
205 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_hashtag h3 {
|
206 |
-
margin-top: <?php echo (intval($style['user_img_width']) - intval($style['users_text_font_size']))/2?>px;
|
207 |
-
}
|
208 |
-
|
209 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3 {
|
210 |
-
font-size: <?php echo $style['users_text_font_size']?>;
|
211 |
-
font-style: <?php echo $style['users_text_font_style']?>;
|
212 |
-
line-height: <?php echo $style['users_text_font_size']?>;
|
213 |
-
color: <?php echo $style['users_text_color']?>; /*header_text_color*/;
|
214 |
-
}
|
215 |
-
|
216 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_user_img_wrap img {
|
217 |
-
height: <?php echo $style['user_img_width']?>px;
|
218 |
-
width: <?php echo $style['user_img_width']?>px;
|
219 |
-
border-radius: <?php echo $style['user_border_radius']?>px;
|
220 |
-
}
|
221 |
-
|
222 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info {
|
223 |
-
/*display: inline-block;*/
|
224 |
-
margin-left: <?php echo intval($style['user_img_width']) + 10;?>px;
|
225 |
-
line-height: <?php echo $style['users_text_font_size']?>;
|
226 |
-
color: <?php echo $style['users_text_color']?>; /*header_text_color !mmm/ seperate*/
|
227 |
display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
|
228 |
}
|
229 |
|
230 |
-
|
231 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_bio {
|
232 |
-
color: <?php echo $style['users_text_color']?>; /*header_text_color*/
|
233 |
-
font-size: <?php echo $style['user_description_font_size']?>; /*header_text_color*/
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_follow_btn {
|
238 |
-
border-radius: <?php echo $style['follow_btn_border_radius']?>px;
|
239 |
-
font-size: <?php echo $style['follow_btn_font_size']?>px;
|
240 |
-
background-color: <?php echo $style['follow_btn_bg_color']?>;
|
241 |
-
border-color: <?php echo $style['follow_btn_border_color']?>;
|
242 |
-
color: <?php echo $style['follow_btn_text_color']?>;
|
243 |
-
margin-left: <?php echo $style['follow_btn_margin']?>px;
|
244 |
-
padding: 0 <?php echo $style['follow_btn_padding']?>px;
|
245 |
-
}
|
246 |
-
|
247 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_follow_btn:hover {
|
248 |
-
border-color: <?php echo $style['follow_btn_border_hover_color']?>;
|
249 |
-
color: <?php echo $style['follow_btn_text_hover_color']?>;
|
250 |
-
background-color: <?php echo $style['follow_btn_background_hover_color']?>;
|
251 |
-
}
|
252 |
-
|
253 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_overlay {
|
254 |
-
width: <?php echo $style['user_img_width'];?>px; /*user_img_width*/
|
255 |
-
height: <?php echo $style['user_img_width'];?>px; /*user_img_width*/
|
256 |
-
border-radius: <?php echo $style['user_border_radius']?>px; /*user_img_width*/
|
257 |
-
background-color: <?php echo $style['th_overlay_hover_color'];?>;
|
258 |
-
}
|
259 |
-
|
260 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_icon span {
|
261 |
-
width: <?php echo $style['user_img_width'];?>px; /*header_img_width*/
|
262 |
-
height: <?php echo $style['user_img_width'];?>px; /*header_img_width*/
|
263 |
-
}
|
264 |
-
|
265 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_wrap {
|
266 |
-
padding: <?php echo $style['th_photo_wrap_padding']?>; /*photo_wrap_padding*/
|
267 |
-
width: calc(100% - 2 *<?php echo $style['th_photo_wrap_padding']?>);
|
268 |
-
}
|
269 |
-
|
270 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_wrap_inner {
|
271 |
-
border: <?php echo $style['th_photo_wrap_border_size']?> solid <?php echo $style['th_photo_wrap_border_color']?>; /*photo_wrap_border_size,photo_wrap_border_color*/
|
272 |
-
background-color: <?php echo $style['th_photo_wrap_bg_color']?>; /*photo_wrap_bg_color*/
|
273 |
-
}
|
274 |
-
|
275 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_img {
|
276 |
-
border-radius: <?php echo $style['th_photo_img_border_radius']?>; /*photo_img_border_radius*/
|
277 |
-
}
|
278 |
-
|
279 |
-
|
280 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
281 |
width: <?php echo $colNum.'%'?>; /*thumbnail_size*/
|
282 |
}
|
283 |
|
284 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_meta {
|
285 |
-
background-color: <?php echo $style['th_photo_meta_bg_color']?>; /*photo_meta_bg_color*/
|
286 |
-
}
|
287 |
-
|
288 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_thumb_likes {
|
289 |
-
width: <?php echo ($style['th_photo_meta_one_line']=='1')? '50%' : '100%' ?>; /*photo_meta_one_line==false else 100%*/
|
290 |
-
float: <?php echo ($style['th_photo_meta_one_line']=='1')? 'left' : 'none'?>; /*photo_meta_one_line==true else float none*/
|
291 |
-
font-size: <?php echo $style['th_like_comm_font_size']?>; /*photo_caption_font_size*/;
|
292 |
-
color: <?php echo $style['th_like_text_color']?>; /*like_text_color*/
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_thumb_comments {
|
297 |
-
width: <?php echo ($style['th_photo_meta_one_line']=='1')? '50%' : '100%' ?>; /*photo_meta_one_line==false else 100%*/
|
298 |
-
float: <?php echo ($style['th_photo_meta_one_line']=='1')? 'left' : 'none'?>; /*photo_meta_one_line==true else float none*/
|
299 |
-
font-size: <?php echo $style['th_like_comm_font_size']?>; /*photo_caption_font_size*/;
|
300 |
-
color: <?php echo $style['th_comment_text_color']?>; /*comment_text_color*/
|
301 |
-
|
302 |
-
}
|
303 |
-
|
304 |
-
|
305 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_title {
|
306 |
-
font-size: <?php echo $style['th_photo_caption_font_size']?>; /*photo_caption_font_size*/
|
307 |
-
color: <?php echo $style['th_photo_caption_color']?>; /*photo_caption_color*/
|
308 |
-
}
|
309 |
-
|
310 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_title:hover {
|
311 |
-
color: <?php echo $style['th_photo_caption_hover_color']?>;
|
312 |
-
}
|
313 |
-
|
314 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_spinner {
|
315 |
-
color: <?php echo $style['load_more_text_color']?>; /*load_more_text_color*/
|
316 |
-
font-size: <?php echo intval($style['load_more_text_font_size'])*1.3?>px; /*load_more_text_font_size*/
|
317 |
-
}
|
318 |
-
|
319 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more,
|
320 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_spinner {
|
321 |
-
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
322 |
-
text-align: <?php echo $style['load_more_position']?>; /*load_more_position*/
|
323 |
-
}
|
324 |
-
|
325 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_wrap,
|
326 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_spinner_wrap {
|
327 |
-
padding: <?php echo $style['load_more_padding']?>; /*load_more_padding*/
|
328 |
-
background-color: <?php echo $style['load_more_bg_color']?>; /*load_more_bg_color*/
|
329 |
-
border-radius: <?php echo $style['load_more_border_radius']?>; /*load_more_border_radius*/
|
330 |
-
height: <?php echo $style['load_more_height']?>; /*load_more_height*/
|
331 |
-
width: <?php echo $style['load_more_width']?>; /*load_more_width*/
|
332 |
-
border: <?php echo $style['load_more_border_size']?> solid <?php echo $style['load_more_border_color']?>; /*load_more_border_size, load_more_border_color*/;
|
333 |
-
}
|
334 |
-
|
335 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_text {
|
336 |
-
color: <?php echo $style['load_more_text_color']?>; /*load_more_text_color*/
|
337 |
-
font-size: <?php echo $style['load_more_text_font_size']?>; /*load_more_text_font_size*/
|
338 |
-
}
|
339 |
-
|
340 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_text img {
|
341 |
-
height: <?php echo $style['load_more_height']?>; /*load_more_height*/
|
342 |
-
width: <?php echo $style['load_more_height']?>; /*load_more_height*/
|
343 |
-
}
|
344 |
-
|
345 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_load_more_wrap:hover {
|
346 |
-
background-color: <?php echo $style['load_more_wrap_hover_color']?>; /*load_more_wrap_hover_color*/
|
347 |
-
}
|
348 |
-
|
349 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination {
|
350 |
-
text-align: <?php echo $style['pagination_position']?>; /*load_more_position*/
|
351 |
-
color: <?php echo $style['pagination_ctrl_color']?>; /*pagination_ctrl_color*/
|
352 |
-
font-size: <?php echo $style['pagination_size']?>; /*pagination_size*/
|
353 |
-
}
|
354 |
-
|
355 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination_ctrl {
|
356 |
-
margin: <?php echo $style['pagination_ctrl_margin']?>;
|
357 |
-
}
|
358 |
-
|
359 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_pagination_ctrl:hover {
|
360 |
-
color: <?php echo $style['pagination_ctrl_hover_color']?>;
|
361 |
-
}
|
362 |
-
|
363 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_overlay:hover {
|
364 |
-
background-color: <?php echo $style['th_overlay_hover_color'];?>;
|
365 |
-
opacity: <?php echo (100 - intval($style['th_overlay_hover_transparent']))/100; ?>;
|
366 |
-
}
|
367 |
-
|
368 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_photo_overlay i {
|
369 |
-
font-size: <?php echo $style['th_overlay_hover_icon_font_size'];?>;
|
370 |
-
color: <?php echo $style['th_overlay_hover_icon_color'];?>;
|
371 |
-
}
|
372 |
-
|
373 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_active_bg {
|
374 |
-
background-color: <?php echo $style['active_filter_bg_color'];?>;
|
375 |
-
}
|
376 |
-
|
377 |
-
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_filter_active_col {
|
378 |
-
color: <?php echo $style['active_filter_bg_color'];?>;
|
379 |
-
border-color: <?php echo $style['active_filter_bg_color'];?>;
|
380 |
-
}
|
381 |
|
382 |
<?php if($feed_row['disable_mobile_layout']=="0"){
|
383 |
?>
|
28 |
$this->pass_feed_data_to_js();
|
29 |
$feed_row = $this->model->get_feed_row();
|
30 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
31 |
+
$this->add_theme_styles();
|
32 |
$this->generate_feed_styles($feed_row);
|
33 |
$style = $this->model->theme_row;
|
34 |
+
$container_class = 'wdi_feed_theme_' . '1' . ' wdi_feed_thumbnail_' . '1';
|
35 |
$wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
|
36 |
|
37 |
?>
|
38 |
|
39 |
+
<div id="wdi_feed_<?php echo $wdi_feed_counter ?>" class="wdi_feed_main_container wdi_layout_th <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
|
40 |
<?php wdi_feed_frontend_messages();?>
|
41 |
<div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_loading"></div>
|
42 |
<div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_overlay"
|
128 |
|
129 |
|
130 |
wp_localize_script("wdi_frontend", 'wdi_feed_' . $wdi_feed_counter, array('feed_row' => $feed_row, 'data' => array(), 'usersData' => array(), 'dataCount' => 0));
|
131 |
+
wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
|
132 |
wp_localize_script("wdi_frontend", 'wdi_front', array('feed_counter' => $wdi_feed_counter));
|
133 |
}
|
134 |
|
135 |
+
private function add_theme_styles(){
|
136 |
+
wp_enqueue_style("wdi_default_theme",WDI_URL . '/css/default_theme.css',array(),WDI_VERSION);
|
137 |
+
/*THIS METHOD FOR PAID VERSION*/
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @param $generator WDI_generate_styles
|
142 |
+
* @return boolean
|
143 |
+
* */
|
144 |
+
private function load_theme_css_file($generator){
|
145 |
+
/*THIS METHOD FOR PAID VERSION*/
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
public function generate_feed_styles($feed_row)
|
150 |
{
|
151 |
$style = $this->model->theme_row;
|
152 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
153 |
$colNum = (100 / $feed_row['number_of_columns']);
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
?>
|
155 |
<style type="text/css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header {
|
|
|
|
|
|
|
|
|
158 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
<?php
|
162 |
|
163 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
175 |
margin-top: <?php echo $header_text_padding ?>px;
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info {
|
|
|
|
|
|
|
|
|
179 |
display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
|
180 |
}
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
183 |
width: <?php echo $colNum.'%'?>; /*thumbnail_size*/
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
<?php if($feed_row['disable_mobile_layout']=="0"){
|
188 |
?>
|
js/gallerybox/wdi_gallery_box.js
CHANGED
@@ -1,146 +1,283 @@
|
|
1 |
var isPopUpOpened = false;
|
|
|
2 |
|
3 |
-
function wdi_spider_createpopup(url, current_view, width, height, duration, description, lifetime, currentFeed)
|
4 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
|
16 |
-
jQuery("html").attr("style", "overflow:hidden !important;");
|
17 |
-
jQuery("#wdi_spider_popup_loading_" + current_view).css({
|
18 |
-
display: "block"
|
19 |
-
});
|
20 |
-
jQuery("#wdi_spider_popup_overlay_" + current_view).css({
|
21 |
-
display: "block"
|
22 |
-
});
|
23 |
-
|
24 |
-
// jQuery.get(url, function(data) {
|
25 |
-
// ;
|
26 |
-
// var popup = jQuery(
|
27 |
-
// '<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap" style="' +
|
28 |
-
// ' width:' + width + 'px;' +
|
29 |
-
// ' height:' + height + 'px;' +
|
30 |
-
// ' margin-top:-' + height / 2 + 'px;' +
|
31 |
-
// ' margin-left: -' + width / 2 + 'px; ">' +
|
32 |
-
// data +
|
33 |
-
// '</div>')
|
34 |
-
// .hide()
|
35 |
-
// .appendTo("body");
|
36 |
-
|
37 |
-
// wdi_spider_showpopup(description, lifetime, popup, duration);
|
38 |
-
// }).success(function(jqXHR, textStatus, errorThrown) {
|
39 |
-
// jQuery("#wdi_spider_popup_loading_" + current_view).css({display: "none !important;"});
|
40 |
-
// });
|
41 |
-
///////////////////////////////////////
|
42 |
-
|
43 |
-
jQuery.ajax({
|
44 |
-
type: 'POST',
|
45 |
-
url: url,
|
46 |
-
dataType: 'text',
|
47 |
-
data: {
|
48 |
-
action: 'WDIGalleryBox',
|
49 |
-
image_rows: JSON.stringify(currentFeed.parsedData),
|
50 |
-
feed_id: currentFeed.feed_row['id'],
|
51 |
-
feed_counter: currentFeed.feed_row['wdi_feed_counter'],
|
52 |
-
},
|
53 |
-
success: function (response)
|
54 |
-
{
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
function wdi_spider_showpopup(description, lifetime, popup, duration)
|
77 |
{
|
78 |
-
|
79 |
-
|
80 |
|
81 |
-
|
82 |
}
|
83 |
|
84 |
function wdi_spider_hasalreadyreceivedpopup(description)
|
85 |
{
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
}
|
91 |
|
92 |
function wdi_spider_receivedpopup(description, lifetime)
|
93 |
{
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
}
|
98 |
|
99 |
function wdi_spider_isunsupporteduseragent()
|
100 |
{
|
101 |
-
|
102 |
}
|
103 |
|
104 |
function wdi_spider_destroypopup(duration)
|
105 |
{
|
106 |
|
107 |
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
-
setTimeout(function ()
|
120 |
-
{
|
121 |
-
jQuery(".wdi_spider_popup_wrap").remove();
|
122 |
-
jQuery(".wdi_spider_popup_loading").css({
|
123 |
-
display: "none"
|
124 |
-
});
|
125 |
-
jQuery(".wdi_spider_popup_overlay").css({
|
126 |
-
display: "none"
|
127 |
-
});
|
128 |
-
jQuery(document).off("keydown");
|
129 |
-
jQuery("html").attr("style", "");
|
130 |
-
}, 20);
|
131 |
-
}
|
132 |
-
isPopUpOpened = false;
|
133 |
-
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
134 |
-
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
135 |
-
if (isMobile && viewportmeta) {
|
136 |
-
viewportmeta.content = 'width=device-width, initial-scale=1';
|
137 |
-
}
|
138 |
-
var scrrr = jQuery(document).scrollTop();
|
139 |
-
window.location.hash = "";
|
140 |
-
jQuery(document).scrollTop(scrrr);
|
141 |
-
if(typeof wdi_playInterval != 'undefined'){
|
142 |
-
clearInterval(wdi_playInterval);
|
143 |
-
}
|
144 |
|
145 |
|
146 |
}
|
@@ -148,252 +285,252 @@ function wdi_spider_destroypopup(duration)
|
|
148 |
|
149 |
Object.size = function (obj)
|
150 |
{
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
};
|
158 |
|
159 |
function wdi_spider_ajax_save(form_id, image_id)
|
160 |
{
|
161 |
|
162 |
|
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 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
}
|
207 |
|
208 |
|
209 |
wdi_comments_manager = {
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
|
226 |
|
227 |
-
|
228 |
-
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
|
244 |
-
|
245 |
|
246 |
|
247 |
-
|
248 |
|
249 |
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
},
|
261 |
-
|
262 |
-
//function for dispaying comments
|
263 |
-
showComments: function (comments, count)
|
264 |
-
{
|
265 |
-
|
266 |
-
if (Object.size(comments) - this.commentCounter - count < 0 || count === undefined) {
|
267 |
-
count = Object.size(comments) - this.commentCounter;
|
268 |
-
}
|
269 |
-
var counter = this.commentCounter;
|
270 |
-
for (i = Object.size(comments) - counter - 1; i >= Object.size(comments) - counter - count; i--) {
|
271 |
-
this.commentCounter++;
|
272 |
-
var commentText = (comments[i]['text']);
|
273 |
-
commentText = this.filterCommentText(commentText);
|
274 |
-
var username = (comments[i]['from']['username']);
|
275 |
-
var profile_picture = (comments[i]['from']['profile_picture']);
|
276 |
-
var singleComment = jQuery('<div class="wdi_single_comment"></div>');
|
277 |
-
singleComment.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/' + username + '"><img style="height:25px;width:25px;border-radius:25px" src="' + profile_picture + '"> ' + username + '</a></span><span class="wdi_comment_date">' + wdi_front.convertUnixDate(comments[i]['created_time']) + '</span></p>'));
|
278 |
-
singleComment.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>' + commentText + '</p></span></div>'));
|
279 |
-
jQuery('#wdi_added_comments').prepend(singleComment);
|
280 |
-
}
|
281 |
-
|
282 |
-
this.updateScrollbar();
|
283 |
-
|
284 |
-
},
|
285 |
-
|
286 |
-
//function for updating scrollbar
|
287 |
-
updateScrollbar: function ()
|
288 |
-
{
|
289 |
-
var wdi_comments = jQuery('#wdi_comments');
|
290 |
-
var wdi_added_comments = jQuery('#wdi_added_comments');
|
291 |
-
//jQuery('#wdi_load_more_comments').remove();
|
292 |
-
jQuery('.wdi_comments').attr('class', 'wdi_comments');
|
293 |
-
jQuery('.wdi_comments').html('');
|
294 |
-
|
295 |
-
/*restore load more button*/
|
296 |
-
|
297 |
-
// if(jQuery('#wdi_load_more_comments').length===0){
|
298 |
-
// wdi_added_comments.prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">Load more</p>'));
|
299 |
-
// jQuery('#wdi_load_more_comments').on('click',function(){
|
300 |
-
// wdi_comments_manager.showComments(wdi_comments_manager.mediaComments, wdi_comments_manager.load_more_count);
|
301 |
-
// });
|
302 |
-
// }
|
303 |
|
304 |
-
|
305 |
-
jQuery('.wdi_comments').append(wdi_added_comments);
|
306 |
|
307 |
-
|
|
|
|
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
316 |
|
317 |
-
|
318 |
-
jQuery('.wdi_comments_close_btn').on('click', wdi_comment);
|
319 |
-
//binding click event for loading more commetn by ajax
|
320 |
|
|
|
321 |
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
|
|
326 |
|
327 |
-
|
328 |
-
success: function (response)
|
329 |
-
{
|
330 |
-
if (response == '' || response == undefined || response == null) {
|
331 |
-
errorMessage = 'Network Error, please try again later :(';
|
332 |
-
wdi_front.show_alert(errorMessage);
|
333 |
-
return;
|
334 |
-
}
|
335 |
-
if (response['meta']['code'] != 200) {
|
336 |
-
errorMessage = response['meta']['error_message'];
|
337 |
-
wdi_front.show_alert(errorMessage);
|
338 |
-
return;
|
339 |
-
}
|
340 |
|
341 |
-
|
|
|
|
|
|
|
|
|
|
|
342 |
|
|
|
|
|
343 |
|
344 |
-
|
345 |
-
var currentImage = wdi_data[wdi_comments_manager.currentKey];
|
346 |
-
currentImage['comments_data'] = response['data'];
|
347 |
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
|
|
|
|
362 |
{
|
363 |
-
jQuery(this).remove();
|
364 |
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
{
|
390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
-
|
|
|
393 |
}
|
394 |
-
commStr = commStr.substring(0, commStr.length - 1);
|
395 |
-
return commStr;
|
396 |
-
}
|
397 |
|
398 |
|
399 |
}
|
@@ -427,76 +564,76 @@ wdi_comments_manager = {
|
|
427 |
// Set value by ID.
|
428 |
function wdi_spider_set_input_value(input_id, input_value)
|
429 |
{
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
}
|
434 |
|
435 |
// Submit form by ID.
|
436 |
function wdi_spider_form_submit(event, form_id)
|
437 |
{
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
}
|
447 |
|
448 |
// Check if required field is empty.
|
449 |
function wdi_spider_check_required(id, name)
|
450 |
{
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
}
|
460 |
|
461 |
// Check Email.
|
462 |
function wdi_spider_check_email(id)
|
463 |
{
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
|
|
|
|
469 |
}
|
470 |
-
return false;
|
471 |
-
}
|
472 |
}
|
473 |
|
474 |
// Refresh captcha.
|
475 |
function wdi_captcha_refresh(id)
|
476 |
{
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
}
|
484 |
|
485 |
function wdi_play_pause($this)
|
486 |
{
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
|
|
498 |
}
|
499 |
-
}
|
500 |
|
501 |
|
502 |
}
|
@@ -509,77 +646,111 @@ function wdi_play_pause($this)
|
|
509 |
attrs: object with html attributes and values format e.g. {width:'100px', style:"display:inline;"}
|
510 |
*/
|
511 |
|
512 |
-
function wdi_spider_display_embed(embed_type, embed_id, attrs){
|
513 |
|
514 |
-
|
515 |
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
if(!(/src/i).test(attr)){
|
540 |
-
if(attr != '' && attrs[attr] != ''){
|
541 |
-
oembed_vimeo_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
542 |
-
}
|
543 |
-
}
|
544 |
-
}
|
545 |
-
oembed_vimeo_html += " ></iframe>";
|
546 |
-
html_to_insert += oembed_vimeo_html;
|
547 |
|
548 |
-
break;
|
549 |
-
case 'EMBED_OEMBED_FLICKR_IMAGE':
|
550 |
|
551 |
-
|
552 |
-
for (attr in attrs) {
|
553 |
-
if(!(/src/i).test(attr)){
|
554 |
-
if(attr != '' && attrs[attr] != ''){
|
555 |
-
oembed_flickr_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
556 |
-
}
|
557 |
-
}
|
558 |
-
}
|
559 |
-
oembed_flickr_html += " >";
|
560 |
-
if(embed_id!=''){
|
561 |
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
|
|
570 |
|
571 |
-
}
|
572 |
|
573 |
-
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
/* code...*/
|
579 |
-
break;
|
580 |
|
581 |
-
|
582 |
-
|
583 |
for (attr in attrs) {
|
584 |
if(!(/src/i).test(attr)){
|
585 |
if(attr != '' && attrs[attr] != ''){
|
@@ -588,138 +759,494 @@ function wdi_spider_display_embed(embed_type, embed_id, attrs){
|
|
588 |
}
|
589 |
}
|
590 |
oembed_instagram_html += " >";
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
|
606 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
|
|
|
608 |
|
609 |
-
|
610 |
|
611 |
-
|
612 |
|
613 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
}
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
oembed_instagram_html += '<img src="//instagram.com/p/'+embed_id+'/media/?size=l"'+
|
628 |
-
' style=" '+
|
629 |
-
'max-width:'+'100%'+" !important"+
|
630 |
-
'; max-height:'+'100%'+" !important"+
|
631 |
-
'; width:'+'auto'+
|
632 |
-
'; height:'+ 'auto' +
|
633 |
-
';">';
|
634 |
-
}
|
635 |
-
oembed_instagram_html +="</div>";
|
636 |
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
}
|
649 |
-
}
|
650 |
}
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
oembed_instagram_html += '<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+embed_id+'/embed/?enablejsapi=1"'+
|
656 |
-
' style="'+
|
657 |
-
'max-width:'+'100%'+" !important"+
|
658 |
-
'; max-height:'+'100%'+" !important"+
|
659 |
-
'; width:'+'100%'+
|
660 |
-
'; height:'+ '100%' +
|
661 |
-
'; margin:0'+
|
662 |
-
'; display:table-cell; vertical-align:middle;"'+
|
663 |
-
'frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen'+
|
664 |
-
'></iframe>';
|
665 |
-
}
|
666 |
|
667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
|
669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
|
671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
672 |
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
}
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
|
|
697 |
}
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
|
712 |
-
html_to_insert += oembed_imgur_html;
|
713 |
|
714 |
-
break;
|
715 |
-
default:
|
716 |
-
;
|
717 |
-
}
|
718 |
|
719 |
-
return html_to_insert;
|
720 |
|
721 |
-
}
|
722 |
-
/**
|
723 |
-
* @param from_popup: optional, true if from bulk embed popup, false(default) if from instagram gallery
|
724 |
-
* @return "ok" if adds instagram gallery, false if any error when adding instagram gallery
|
725 |
-
*/
|
1 |
var isPopUpOpened = false;
|
2 |
+
var wdi_data = [];
|
3 |
|
4 |
+
function wdi_spider_createpopup(url, current_view, width, height, duration, description, lifetime, currentFeed, image_id)
|
5 |
{
|
6 |
+
url = url.replace(/&/g, '&');
|
7 |
+
if (isPopUpOpened) {
|
8 |
+
return
|
9 |
+
}
|
10 |
+
;
|
11 |
+
isPopUpOpened = true;
|
12 |
+
if (wdi_spider_hasalreadyreceivedpopup(description) || wdi_spider_isunsupporteduseragent()) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
|
16 |
+
jQuery("html").attr("style", "overflow:hidden !important;");
|
17 |
+
jQuery("#wdi_spider_popup_loading_" + current_view).css({
|
18 |
+
display: "block"
|
19 |
+
});
|
20 |
+
jQuery("#wdi_spider_popup_overlay_" + current_view).css({
|
21 |
+
display: "block"
|
22 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
// jQuery.get(url, function(data) {
|
25 |
+
// ;
|
26 |
+
// var popup = jQuery(
|
27 |
+
// '<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap" style="' +
|
28 |
+
// ' width:' + width + 'px;' +
|
29 |
+
// ' height:' + height + 'px;' +
|
30 |
+
// ' margin-top:-' + height / 2 + 'px;' +
|
31 |
+
// ' margin-left: -' + width / 2 + 'px; ">' +
|
32 |
+
// data +
|
33 |
+
// '</div>')
|
34 |
+
// .hide()
|
35 |
+
// .appendTo("body");
|
36 |
+
|
37 |
+
// wdi_spider_showpopup(description, lifetime, popup, duration);
|
38 |
+
// }).success(function(jqXHR, textStatus, errorThrown) {
|
39 |
+
// jQuery("#wdi_spider_popup_loading_" + current_view).css({display: "none !important;"});
|
40 |
+
// });
|
41 |
+
///////////////////////////////////////
|
42 |
+
|
43 |
+
var current_image_index = 0;
|
44 |
+
var current_image_row;
|
45 |
+
for (var i = 0; i < currentFeed.parsedData.length; i++) {
|
46 |
+
if(currentFeed.parsedData[i].id === image_id){
|
47 |
+
current_image_index = i;
|
48 |
+
current_image_row = [currentFeed.parsedData[i]];
|
49 |
+
break;
|
50 |
+
}
|
51 |
}
|
52 |
+
|
53 |
+
jQuery.ajax({
|
54 |
+
type: 'POST',
|
55 |
+
url: url,
|
56 |
+
dataType: 'text',
|
57 |
+
data: {
|
58 |
+
action: 'WDIGalleryBox',
|
59 |
+
image_rows: JSON.stringify(current_image_row),
|
60 |
+
feed_id: currentFeed.feed_row['id'],
|
61 |
+
feed_counter: currentFeed.feed_row['wdi_feed_counter'],
|
62 |
+
current_image_index: current_image_index,
|
63 |
+
image_rows_count: currentFeed.parsedData.length,
|
64 |
+
carousel_media_row: JSON.stringify(current_image_row[0].carousel_media)
|
65 |
+
},
|
66 |
+
success: function (response) {
|
67 |
+
var popup = jQuery(
|
68 |
+
'<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_' + currentFeed.feed_row.theme_id + '" style="' +
|
69 |
+
'width:' + width + 'px;' +
|
70 |
+
'height:' + height + 'px;' +
|
71 |
+
'margin-top:-' + (height / 2) + 'px;' +
|
72 |
+
'margin-left: -' + (width / 2) + 'px; ">' +
|
73 |
+
response +
|
74 |
+
'</div>');
|
75 |
+
|
76 |
+
|
77 |
+
var constructor = new wdi_construct_popup(popup, currentFeed, currentFeed.parsedData, image_id);
|
78 |
+
constructor.construct();
|
79 |
+
|
80 |
+
popup.hide().appendTo("body");
|
81 |
+
wdi_spider_showpopup(description, lifetime, popup, duration);
|
82 |
+
jQuery("#wdi_spider_popup_loading_" + current_view).css({
|
83 |
+
display: "none !important;"
|
84 |
+
});
|
85 |
+
}
|
86 |
+
});
|
87 |
+
/////////////////////////////////////////
|
88 |
+
}
|
89 |
+
|
90 |
+
var wdi_construct_popup = function (popup, currentFeed, image_rows, current_image_id) {
|
91 |
+
|
92 |
+
this.theme_row = {};
|
93 |
+
this.construct = function () {
|
94 |
+
this.theme_row = window['wdi_theme_' + currentFeed.feed_row.theme_id];
|
95 |
+
if (currentFeed.feed_row.popup_enable_filmstrip && currentFeed.feed_row.popup_enable_filmstrip === "1") {
|
96 |
+
this.add_filmstrip();
|
97 |
+
}
|
98 |
+
this.set_wdi_data();
|
99 |
+
};
|
100 |
+
|
101 |
+
this.add_filmstrip = function () {
|
102 |
+
|
103 |
+
var filmstrip_direction = 'horizontal';
|
104 |
+
if (this.theme_row.lightbox_filmstrip_pos === 'right' || this.theme_row.lightbox_filmstrip_pos === 'left') {
|
105 |
+
filmstrip_direction = 'vertical';
|
106 |
+
}
|
107 |
+
|
108 |
+
var fa_class_name_1 = (filmstrip_direction === "horizontal") ? 'fa-angle-left' : 'fa-angle-up';
|
109 |
+
var fa_class_name_2 = (filmstrip_direction === "horizontal") ? 'fa-angle-right' : 'fa-angle-down';
|
110 |
+
|
111 |
+
// var thumb_width = 90;
|
112 |
+
// var thumb_height = 90;
|
113 |
+
|
114 |
+
var thumbnails_html = "";
|
115 |
+
|
116 |
+
var image_filmstrip_height,image_filmstrip_width;
|
117 |
+
if (filmstrip_direction === 'horizontal') {
|
118 |
+
image_filmstrip_width = image_filmstrip_height = (typeof currentFeed.feed_row['popup_filmstrip_height'] !== "undefined") ? (currentFeed.feed_row['popup_filmstrip_height']) : '20';
|
119 |
+
}
|
120 |
+
else {
|
121 |
+
image_filmstrip_width = image_filmstrip_height = (typeof currentFeed.feed_row['popup_filmstrip_height'] !== "undefined") ? (currentFeed.feed_row['popup_filmstrip_height']) : '50';
|
122 |
+
}
|
123 |
+
|
124 |
+
image_filmstrip_height = image_filmstrip_width = parseInt(image_filmstrip_width);
|
125 |
+
|
126 |
+
for (var i = 0; i < image_rows.length; i++) {
|
127 |
+
var image_row = image_rows[i];
|
128 |
+
|
129 |
+
var image_thumb_width,image_thumb_height,scale;
|
130 |
+
if (image_row.resolution && image_row.resolution !== '') {
|
131 |
+
var resolution_arr = image_row.resolution.split(" ");
|
132 |
+
var resolution_w = intval($resolution_arr[0]);
|
133 |
+
var resolution_h = intval($resolution_arr[2]);
|
134 |
+
if (resolution_w !== 0 && resolution_h !== 0) {
|
135 |
+
scale = Math.max(image_filmstrip_width / resolution_w, image_filmstrip_height / resolution_h);
|
136 |
+
image_thumb_width = resolution_w * scale;
|
137 |
+
image_thumb_height = resolution_h * scale;
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
image_thumb_width = image_filmstrip_width;
|
141 |
+
image_thumb_height = image_filmstrip_height;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
else {
|
145 |
+
image_thumb_width = image_filmstrip_width;
|
146 |
+
image_thumb_height = image_filmstrip_height;
|
147 |
+
}
|
148 |
+
|
149 |
+
scale = Math.max(image_filmstrip_width / image_thumb_width, image_filmstrip_height / image_thumb_height);
|
150 |
+
image_thumb_width *= scale;
|
151 |
+
image_thumb_height *= scale;
|
152 |
+
var thumb_left = (image_filmstrip_width - image_thumb_width) / 2;
|
153 |
+
var thumb_top = (image_filmstrip_height - image_thumb_height) / 2;
|
154 |
+
|
155 |
+
var class_name = "wdi_filmstrip_thumbnail " + ((parseInt(image_row.id) === parseInt(current_image_id)) ? 'wdi_thumb_active' : 'wdi_thumb_deactive');
|
156 |
+
|
157 |
+
var img_style = 'width:' + image_thumb_width + 'px;' +
|
158 |
+
'height:'+image_thumb_height+'px;' +
|
159 |
+
'margin-left:'+thumb_left+'px;' +
|
160 |
+
'margin-top:'+thumb_top+'px;';
|
161 |
+
var src = (typeof image_row.images[currentFeed.feedImageResolution]['url'] !== 'undefined') ? image_row.images[currentFeed.feedImageResolution]['url'] : image_row.thumb_url;
|
162 |
+
var onclick = 'wdi_change_image(parseInt(jQuery(\'#wdi_current_image_key\').val()), \'' + i + '\', wdi_data)';
|
163 |
+
var ontouchend = 'wdi_change_image(parseInt(jQuery(\'#wdi_current_image_key\').val()), \'' + i + '\', wdi_data)';
|
164 |
+
|
165 |
+
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
166 |
+
thumbnails_html += '<div id="wdi_filmstrip_thumbnail_' + i + '" class="' + class_name + '">' + img_html + '</div>';
|
167 |
+
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
+
var html = '' +
|
172 |
+
'<div class="wdi_filmstrip_left"><i class="fa ' + fa_class_name_1 + '"></i></div>' +
|
173 |
+
'<div class="wdi_filmstrip">' +
|
174 |
+
'<div class="wdi_filmstrip_thumbnails">' +
|
175 |
+
thumbnails_html +
|
176 |
+
'</div>' +
|
177 |
+
'</div>' +
|
178 |
+
'<div class="wdi_filmstrip_right"><i class="fa ' + fa_class_name_2 + '"></i></div>';
|
179 |
+
|
180 |
+
popup.find('.wdi_filmstrip_container').append(html);
|
181 |
+
};
|
182 |
+
|
183 |
+
this.set_wdi_data = function () {
|
184 |
+
|
185 |
+
wdi_data = [];
|
186 |
+
|
187 |
+
for (var i = 0; i < image_rows.length; i++) {
|
188 |
+
wdi_data[i] = [];
|
189 |
+
wdi_data[i]["number"] = i + 1;
|
190 |
+
wdi_data[i]["id"] = image_rows[i].id;
|
191 |
+
wdi_data[i]["alt"] = image_rows[i].alt;
|
192 |
+
wdi_data[i]["description"] = image_rows[i].description;
|
193 |
+
wdi_data[i]["username"] = image_rows[i].username;
|
194 |
+
wdi_data[i]["profile_picture"] = image_rows[i].profile_picture;
|
195 |
+
wdi_data[i]["image_url"] = image_rows[i].image_url;
|
196 |
+
wdi_data[i]["thumb_url"] = image_rows[i].thumb_url;
|
197 |
+
wdi_data[i]["date"] = image_rows[i].date;
|
198 |
+
wdi_data[i]["comment_count"] = image_rows[i].comment_count;
|
199 |
+
wdi_data[i]["filetype"] = image_rows[i].filetype;
|
200 |
+
wdi_data[i]["filename"] = image_rows[i].filename;
|
201 |
+
wdi_data[i]["avg_rating"] = image_rows[i].avg_rating;
|
202 |
+
wdi_data[i]["rate"] = image_rows[i].rate;
|
203 |
+
wdi_data[i]["rate_count"] = image_rows[i].rate_count;
|
204 |
+
wdi_data[i]["hit_count"] = image_rows[i].hit_count;
|
205 |
+
wdi_data[i]["comments_data"] = (typeof image_rows[i].comments_data !== "undefined") ? image_rows[i].comments_data : 'null';
|
206 |
+
wdi_data[i]["carousel_media"] = (typeof image_rows[i]['carousel_media'] !== "undefined") ? image_rows[i]['carousel_media'] : null;
|
207 |
+
}
|
208 |
+
|
209 |
+
};
|
210 |
+
|
211 |
}
|
212 |
|
213 |
function wdi_spider_showpopup(description, lifetime, popup, duration)
|
214 |
{
|
215 |
+
isPopUpOpened = true;
|
216 |
+
popup.show();
|
217 |
|
218 |
+
wdi_spider_receivedpopup(description, lifetime);
|
219 |
}
|
220 |
|
221 |
function wdi_spider_hasalreadyreceivedpopup(description)
|
222 |
{
|
223 |
+
if (document.cookie.indexOf(description) > -1) {
|
224 |
+
delete document.cookie[document.cookie.indexOf(description)];
|
225 |
+
}
|
226 |
+
return false;
|
227 |
}
|
228 |
|
229 |
function wdi_spider_receivedpopup(description, lifetime)
|
230 |
{
|
231 |
+
var date = new Date();
|
232 |
+
date.setDate(date.getDate() + lifetime);
|
233 |
+
document.cookie = description + "=true;expires=" + date.toUTCString() + ";path=/";
|
234 |
}
|
235 |
|
236 |
function wdi_spider_isunsupporteduseragent()
|
237 |
{
|
238 |
+
return (!window.XMLHttpRequest);
|
239 |
}
|
240 |
|
241 |
function wdi_spider_destroypopup(duration)
|
242 |
{
|
243 |
|
244 |
|
245 |
+
if (document.getElementById("wdi_spider_popup_wrap") != null) {
|
246 |
+
wdi_comments_manager.popup_destroyed();
|
247 |
|
248 |
+
if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen)) {
|
249 |
+
if (jQuery.fullscreen.isFullScreen()) {
|
250 |
+
jQuery.fullscreen.exit();
|
251 |
+
}
|
252 |
+
}
|
253 |
+
if (typeof enable_addthis != "undefined" && enable_addthis) {
|
254 |
+
jQuery(".at4-share-outer").hide();
|
255 |
+
}
|
256 |
+
setTimeout(function ()
|
257 |
+
{
|
258 |
+
jQuery(".wdi_spider_popup_wrap").remove();
|
259 |
+
jQuery(".wdi_spider_popup_loading").css({
|
260 |
+
display: "none"
|
261 |
+
});
|
262 |
+
jQuery(".wdi_spider_popup_overlay").css({
|
263 |
+
display: "none"
|
264 |
+
});
|
265 |
+
jQuery(document).off("keydown");
|
266 |
+
jQuery("html").attr("style", "");
|
267 |
+
}, 20);
|
268 |
}
|
269 |
+
isPopUpOpened = false;
|
270 |
+
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
271 |
+
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
272 |
+
if (isMobile && viewportmeta) {
|
273 |
+
viewportmeta.content = 'width=device-width, initial-scale=1';
|
274 |
+
}
|
275 |
+
var scrrr = jQuery(document).scrollTop();
|
276 |
+
window.location.hash = "";
|
277 |
+
jQuery(document).scrollTop(scrrr);
|
278 |
+
if(typeof wdi_playInterval != 'undefined'){
|
279 |
+
clearInterval(wdi_playInterval);
|
280 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
|
283 |
}
|
285 |
|
286 |
Object.size = function (obj)
|
287 |
{
|
288 |
+
var size = 0,
|
289 |
+
key;
|
290 |
+
for (key in obj) {
|
291 |
+
if (obj.hasOwnProperty(key)) size++;
|
292 |
+
}
|
293 |
+
return size;
|
294 |
};
|
295 |
|
296 |
function wdi_spider_ajax_save(form_id, image_id)
|
297 |
{
|
298 |
|
299 |
|
300 |
+
wdi_comments_manager.init(image_id);
|
301 |
+
|
302 |
+
|
303 |
+
// var post_data = {};
|
304 |
+
// post_wdi_data["wdi_name"] = jQuery("#wdi_name").val();
|
305 |
+
// post_wdi_data["wdi_comment"] = jQuery("#wdi_comment").val();
|
306 |
+
// post_wdi_data["wdi_email"] = jQuery("#wdi_email").val();
|
307 |
+
// post_wdi_data["wdi_captcha_input"] = jQuery("#wdi_captcha_input").val();
|
308 |
+
// post_wdi_data["ajax_task"] = jQuery("#ajax_task").val();
|
309 |
+
// post_wdi_data["image_id"] = jQuery("#image_id").val();
|
310 |
+
// post_wdi_data["comment_id"] = jQuery("#comment_id").val();
|
311 |
+
// // Loading.
|
312 |
+
// jQuery("#ajax_loading").css('height', jQuery(".wdi_comments").css('height'));
|
313 |
+
// jQuery("#opacity_div").css('width', jQuery(".wdi_comments").css('width'));
|
314 |
+
// jQuery("#opacity_div").css('height', jQuery(".wdi_comments").css('height'));
|
315 |
+
// jQuery("#loading_div").css('width', jQuery(".wdi_comments").css('width'));
|
316 |
+
// jQuery("#loading_div").css('height', jQuery(".wdi_comments").css('height'));
|
317 |
+
// document.getElementById("opacity_div").style.display = '';
|
318 |
+
// document.getElementById("loading_div").style.display = 'table-cell';
|
319 |
+
// jQuery.post(
|
320 |
+
// jQuery('#' + form_id).attr('action'),
|
321 |
+
// post_data,
|
322 |
+
|
323 |
+
// function (data) {
|
324 |
+
// var str = jQuery(data).find('.wdi_comments').html();
|
325 |
+
// jQuery('.wdi_comments').html(str);
|
326 |
+
// }
|
327 |
+
// ).success(function(jqXHR, textStatus, errorThrown) {
|
328 |
+
// document.getElementById("opacity_div").style.display = 'none';
|
329 |
+
// document.getElementById("loading_div").style.display = 'none';
|
330 |
+
// // Update scrollbar.
|
331 |
+
// jQuery(".wdi_comments").mCustomScrollbar({scrollInertia: 150});
|
332 |
+
// // Bind comment container close function to close button.
|
333 |
+
// jQuery(".wdi_comments_close_btn").click(wdi_comment);
|
334 |
+
// });
|
335 |
+
|
336 |
+
// if (event.preventDefault) {
|
337 |
+
// event.preventDefault();
|
338 |
+
// }
|
339 |
+
// else {
|
340 |
+
// event.returnValue = false;
|
341 |
+
// }
|
342 |
+
return false;
|
343 |
}
|
344 |
|
345 |
|
346 |
wdi_comments_manager = {
|
347 |
+
media_id: '',
|
348 |
+
mediaComments: [],
|
349 |
+
/*all comments*/
|
350 |
+
load_more_count: 10,
|
351 |
+
commentCounter: 0,
|
352 |
+
/* current comments counter*/
|
353 |
+
currentKey: -1,
|
354 |
+
/*iamge id*/
|
355 |
+
init: function (image_id)
|
356 |
+
{
|
357 |
|
358 |
|
359 |
+
/*initializing instagram object which will handle all instagram api requests*/
|
360 |
+
this.instagram = new WDIInstagram();
|
361 |
+
this.instagram.addToken(wdi_front.access_token);
|
362 |
|
363 |
|
364 |
+
if (this.currentKey != image_id) {
|
365 |
+
this.currentKey = image_id;
|
366 |
|
367 |
+
this.reset_comments();
|
368 |
+
} else {
|
369 |
+
/*open close*/
|
370 |
+
/*do nothing*/
|
371 |
+
}
|
372 |
+
},
|
373 |
+
reset_comments: function ()
|
374 |
+
{
|
375 |
+
jQuery('#wdi_load_more_comments').remove();
|
376 |
+
jQuery('#wdi_added_comments').html('');
|
377 |
+
//currentImage = wdi_data[this.currentKey];
|
378 |
+
this.commentCounter = 0;
|
379 |
+
this.media_id = wdi_data[this.currentKey]['id'];
|
380 |
|
381 |
+
this.getAjaxComments(this.currentKey);
|
382 |
|
383 |
|
384 |
+
//this.showComments(currentImage['comments_data']);
|
385 |
|
386 |
|
387 |
+
},
|
388 |
+
popup_destroyed: function ()
|
389 |
+
{
|
390 |
+
this.media_id = '';
|
391 |
+
this.mediaComments = [];
|
392 |
+
/*all comments*/
|
393 |
+
this.commentCounter = 0;
|
394 |
+
/* current comments counter**/
|
395 |
+
this.currentKey = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
|
397 |
+
},
|
|
|
398 |
|
399 |
+
//function for dispaying comments
|
400 |
+
showComments: function (comments, count)
|
401 |
+
{
|
402 |
|
403 |
+
if (Object.size(comments) - this.commentCounter - count < 0 || count === undefined) {
|
404 |
+
count = Object.size(comments) - this.commentCounter;
|
405 |
+
}
|
406 |
+
var counter = this.commentCounter;
|
407 |
+
for (i = Object.size(comments) - counter - 1; i >= Object.size(comments) - counter - count; i--) {
|
408 |
+
this.commentCounter++;
|
409 |
+
var commentText = (comments[i]['text']);
|
410 |
+
commentText = this.filterCommentText(commentText);
|
411 |
+
var username = (comments[i]['from']['username']);
|
412 |
+
var profile_picture = (comments[i]['from']['profile_picture']);
|
413 |
+
var singleComment = jQuery('<div class="wdi_single_comment"></div>');
|
414 |
+
singleComment.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/' + username + '"><img style="height:25px;width:25px;border-radius:25px" src="' + profile_picture + '"> ' + username + '</a></span><span class="wdi_comment_date">' + wdi_front.convertUnixDate(comments[i]['created_time']) + '</span></p>'));
|
415 |
+
singleComment.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>' + commentText + '</p></span></div>'));
|
416 |
+
jQuery('#wdi_added_comments').prepend(singleComment);
|
417 |
+
}
|
418 |
|
419 |
+
this.updateScrollbar();
|
|
|
|
|
420 |
|
421 |
+
},
|
422 |
|
423 |
+
//function for updating scrollbar
|
424 |
+
updateScrollbar: function ()
|
425 |
+
{
|
426 |
+
var wdi_comments = jQuery('#wdi_comments');
|
427 |
+
var wdi_added_comments = jQuery('#wdi_added_comments');
|
428 |
+
//jQuery('#wdi_load_more_comments').remove();
|
429 |
+
jQuery('.wdi_comments').attr('class', 'wdi_comments');
|
430 |
+
jQuery('.wdi_comments').html('');
|
431 |
|
432 |
+
/*restore load more button*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
+
// if(jQuery('#wdi_load_more_comments').length===0){
|
435 |
+
// wdi_added_comments.prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">Load more</p>'));
|
436 |
+
// jQuery('#wdi_load_more_comments').on('click',function(){
|
437 |
+
// wdi_comments_manager.showComments(wdi_comments_manager.mediaComments, wdi_comments_manager.load_more_count);
|
438 |
+
// });
|
439 |
+
// }
|
440 |
|
441 |
+
jQuery('.wdi_comments').append(wdi_comments);
|
442 |
+
jQuery('.wdi_comments').append(wdi_added_comments);
|
443 |
|
444 |
+
/* for free version */
|
|
|
|
|
445 |
|
446 |
+
/* if (typeof jQuery().mCustomScrollbar !== 'undefined') {
|
447 |
+
if (jQuery.isFunction(jQuery().mCustomScrollbar)) {
|
448 |
+
jQuery(".wdi_comments").mCustomScrollbar({
|
449 |
+
scrollInertia: 250
|
450 |
+
});
|
451 |
+
}
|
452 |
+
}*/
|
453 |
+
|
454 |
+
////
|
455 |
+
jQuery('.wdi_comments_close_btn').on('click', wdi_comment);
|
456 |
+
//binding click event for loading more commetn by ajax
|
457 |
+
|
458 |
+
|
459 |
+
},
|
460 |
+
//get recent media comments
|
461 |
+
getAjaxComments: function ()
|
462 |
{
|
|
|
463 |
|
464 |
+
this.instagram.getRecentMediaComments(this.media_id, {
|
465 |
+
success: function (response)
|
466 |
+
{
|
467 |
+
if (response == '' || response == undefined || response == null) {
|
468 |
+
errorMessage = 'Network Error, please try again later :(';
|
469 |
+
wdi_front.show_alert(errorMessage);
|
470 |
+
return;
|
471 |
+
}
|
472 |
+
if (response['meta']['code'] != 200) {
|
473 |
+
errorMessage = response['meta']['error_message'];
|
474 |
+
wdi_front.show_alert(errorMessage);
|
475 |
+
return;
|
476 |
+
}
|
477 |
+
|
478 |
+
wdi_comments_manager.mediaComments = response['data'];
|
479 |
+
|
480 |
+
|
481 |
+
//ttt
|
482 |
+
var currentImage = wdi_data[wdi_comments_manager.currentKey];
|
483 |
+
currentImage['comments_data'] = response['data'];
|
484 |
+
|
485 |
+
wdi_comments_manager.showComments(currentImage['comments_data'], wdi_comments_manager.load_more_count);
|
486 |
+
wdi_comments_manager.ajax_comments_ready(response['data']);
|
487 |
+
}
|
488 |
+
});
|
489 |
+
},
|
490 |
+
ajax_comments_ready: function (response)
|
491 |
+
{
|
492 |
+
|
493 |
+
this.createLoadMoreAndBindEvent();
|
494 |
+
},
|
495 |
+
createLoadMoreAndBindEvent: function ()
|
496 |
+
{
|
497 |
+
jQuery('#wdi_added_comments').prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>'));
|
498 |
+
jQuery('.wdi_comment_container #wdi_load_more_comments').on('click', function ()
|
499 |
{
|
500 |
+
jQuery(this).remove();
|
501 |
+
|
502 |
+
wdi_comments_manager.showComments(wdi_comments_manager.mediaComments, wdi_comments_manager.load_more_count);
|
503 |
+
wdi_comments_manager.createLoadMoreAndBindEvent();
|
504 |
+
});
|
505 |
+
},
|
506 |
+
/*
|
507 |
+
* Filtesrs comment text and makes it instagram like comments
|
508 |
+
*/
|
509 |
+
filterCommentText: function (comment)
|
510 |
+
{
|
511 |
+
var commentArray = comment.split(' ');
|
512 |
+
var commStr = '';
|
513 |
+
for (var i = 0; i < commentArray.length; i++) {
|
514 |
+
switch (commentArray[i][0]) {
|
515 |
+
case '@':
|
516 |
+
{
|
517 |
+
commStr += '<a target="blank" class="wdi_comm_text_link" href="//instagram.com/' + commentArray[i].substring(1, commentArray[i].length) + '">' + commentArray[i] + '</a> ';
|
518 |
+
break;
|
519 |
+
}
|
520 |
+
case '#':
|
521 |
+
{
|
522 |
+
commStr += '<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/' + commentArray[i].substring(1, commentArray[i].length) + '">' + commentArray[i] + '</a> ';
|
523 |
+
break;
|
524 |
+
}
|
525 |
+
default:
|
526 |
+
{
|
527 |
+
commStr += commentArray[i] + ' ';
|
528 |
+
}
|
529 |
+
}
|
530 |
}
|
531 |
+
commStr = commStr.substring(0, commStr.length - 1);
|
532 |
+
return commStr;
|
533 |
}
|
|
|
|
|
|
|
534 |
|
535 |
|
536 |
}
|
564 |
// Set value by ID.
|
565 |
function wdi_spider_set_input_value(input_id, input_value)
|
566 |
{
|
567 |
+
if (document.getElementById(input_id)) {
|
568 |
+
document.getElementById(input_id).value = input_value;
|
569 |
+
}
|
570 |
}
|
571 |
|
572 |
// Submit form by ID.
|
573 |
function wdi_spider_form_submit(event, form_id)
|
574 |
{
|
575 |
+
if (document.getElementById(form_id)) {
|
576 |
+
document.getElementById(form_id).submit();
|
577 |
+
}
|
578 |
+
if (event.preventDefault) {
|
579 |
+
event.preventDefault();
|
580 |
+
} else {
|
581 |
+
event.returnValue = false;
|
582 |
+
}
|
583 |
}
|
584 |
|
585 |
// Check if required field is empty.
|
586 |
function wdi_spider_check_required(id, name)
|
587 |
{
|
588 |
+
if (jQuery('#' + id).val() == '') {
|
589 |
+
wdi_front.show_alert(name + '* ' + wdi_objectL10n.wdi_field_required);
|
590 |
+
jQuery('#' + id).attr('style', 'border-color: #FF0000;');
|
591 |
+
jQuery('#' + id).focus();
|
592 |
+
return true;
|
593 |
+
} else {
|
594 |
+
return false;
|
595 |
+
}
|
596 |
}
|
597 |
|
598 |
// Check Email.
|
599 |
function wdi_spider_check_email(id)
|
600 |
{
|
601 |
+
if (jQuery('#' + id).val() != '') {
|
602 |
+
var email = jQuery('#' + id).val().replace(/^\s+|\s+$/g, '');
|
603 |
+
if (email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
|
604 |
+
wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation);
|
605 |
+
return true;
|
606 |
+
}
|
607 |
+
return false;
|
608 |
}
|
|
|
|
|
609 |
}
|
610 |
|
611 |
// Refresh captcha.
|
612 |
function wdi_captcha_refresh(id)
|
613 |
{
|
614 |
+
if (document.getElementById(id + "_img") && document.getElementById(id + "_input")) {
|
615 |
+
srcArr = document.getElementById(id + "_img").src.split("&r=");
|
616 |
+
document.getElementById(id + "_img").src = srcArr[0] + '&r=' + Math.floor(Math.random() * 100);
|
617 |
+
document.getElementById(id + "_img").style.display = "inline-block";
|
618 |
+
document.getElementById(id + "_input").value = "";
|
619 |
+
}
|
620 |
}
|
621 |
|
622 |
function wdi_play_pause($this)
|
623 |
{
|
624 |
+
var video = $this.get(0);
|
625 |
+
var regex = /firefox/i;
|
626 |
+
var firefox = false;
|
627 |
+
if (navigator.userAgent.match(regex)) {
|
628 |
+
firefox = true;
|
629 |
+
}
|
630 |
+
if (!firefox) {
|
631 |
+
if (!video.paused) {
|
632 |
+
video.pause();
|
633 |
+
} else {
|
634 |
+
video.play();
|
635 |
+
}
|
636 |
}
|
|
|
637 |
|
638 |
|
639 |
}
|
646 |
attrs: object with html attributes and values format e.g. {width:'100px', style:"display:inline;"}
|
647 |
*/
|
648 |
|
649 |
+
function wdi_spider_display_embed(embed_type, embed_id, attrs, carousel_media){
|
650 |
|
651 |
+
var html_to_insert = '';
|
652 |
|
653 |
+
switch(embed_type) {
|
654 |
+
case 'EMBED_OEMBED_YOUTUBE_VIDEO':
|
655 |
+
var oembed_youtube_html ='<iframe ';
|
656 |
+
if(embed_id!=''){
|
657 |
+
oembed_youtube_html += ' src="' + '//www.youtube.com/embed/'+embed_id + '?enablejsapi=1&wmode=transparent"';
|
658 |
+
}
|
659 |
+
for (attr in attrs) {
|
660 |
+
if(!(/src/i).test(attr)){
|
661 |
+
if(attr != '' && attrs[attr] != ''){
|
662 |
+
oembed_youtube_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
oembed_youtube_html += " ></iframe>";
|
667 |
+
html_to_insert += oembed_youtube_html;
|
668 |
+
|
669 |
+
break;
|
670 |
+
case 'EMBED_OEMBED_VIMEO_VIDEO':
|
671 |
+
var oembed_vimeo_html ='<iframe ';
|
672 |
+
if(embed_id!=''){
|
673 |
+
oembed_vimeo_html += ' src="' + '//player.vimeo.com/video/'+embed_id + '?enablejsapi=1"';
|
674 |
+
}
|
675 |
+
for (attr in attrs) {
|
676 |
+
if(!(/src/i).test(attr)){
|
677 |
+
if(attr != '' && attrs[attr] != ''){
|
678 |
+
oembed_vimeo_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
679 |
+
}
|
680 |
+
}
|
681 |
+
}
|
682 |
+
oembed_vimeo_html += " ></iframe>";
|
683 |
+
html_to_insert += oembed_vimeo_html;
|
684 |
+
|
685 |
+
break;
|
686 |
+
case 'EMBED_OEMBED_FLICKR_IMAGE':
|
687 |
+
|
688 |
+
var oembed_flickr_html ='<div ';
|
689 |
+
for (attr in attrs) {
|
690 |
+
if(!(/src/i).test(attr)){
|
691 |
+
if(attr != '' && attrs[attr] != ''){
|
692 |
+
oembed_flickr_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
693 |
+
}
|
694 |
+
}
|
695 |
+
}
|
696 |
+
oembed_flickr_html += " >";
|
697 |
+
if(embed_id!=''){
|
698 |
|
699 |
+
oembed_flickr_html += '<img src="'+embed_id+'"'+
|
700 |
+
' style="'+
|
701 |
+
'max-width:'+'100%'+" !important"+
|
702 |
+
'; max-height:'+'100%'+" !important"+
|
703 |
+
'; width:'+'auto !important'+
|
704 |
+
'; height:'+ 'auto !important' +
|
705 |
+
';">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
|
|
|
|
|
707 |
|
708 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
|
710 |
+
oembed_flickr_html +="</div>";
|
711 |
+
|
712 |
+
html_to_insert += oembed_flickr_html;
|
713 |
+
break;
|
714 |
+
case 'EMBED_OEMBED_FLICKR_VIDEO':
|
715 |
+
/* code...*/
|
716 |
+
break;
|
717 |
+
|
718 |
+
case 'EMBED_OEMBED_INSTAGRAM_VIDEO':
|
719 |
+
var oembed_instagram_html ='<div ';
|
720 |
+
for (attr in attrs) {
|
721 |
+
if(!(/src/i).test(attr)){
|
722 |
+
if(attr != '' && attrs[attr] != ''){
|
723 |
+
oembed_instagram_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
724 |
+
}
|
725 |
+
}
|
726 |
+
}
|
727 |
+
oembed_instagram_html += " >";
|
728 |
+
if(embed_id!=''){
|
729 |
+
|
730 |
+
/*oembed_instagram_html += '<iframe src="'+embed_id+'"'+
|
731 |
+
' style="'+
|
732 |
+
'max-width:'+'100%'+" !important"+
|
733 |
+
'; max-height:'+'100%'+" !important"+
|
734 |
+
'; width:'+'auto'+
|
735 |
+
'; height:'+ '100%' + " "+
|
736 |
+
'; margin:0;"'+
|
737 |
+
'frameborder="0" scrolling="no" allowtransparency="false"></iframe>';
|
738 |
+
*/
|
739 |
+
oembed_instagram_html += '<video onclick=\"wdi_play_pause(jQuery(this));\" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls>'+
|
740 |
+
'<source src="'+embed_id+
|
741 |
+
'" type="video/mp4"> Your browser does not support the video tag. </video>';
|
742 |
|
743 |
+
}
|
744 |
|
|
|
745 |
|
746 |
+
oembed_instagram_html +="</div>";
|
747 |
|
748 |
+
html_to_insert += oembed_instagram_html;
|
749 |
+
|
750 |
+
break;
|
|
|
|
|
751 |
|
752 |
+
case 'EMBED_OEMBED_INSTAGRAM_IMAGE':
|
753 |
+
var oembed_instagram_html ='<div ';
|
754 |
for (attr in attrs) {
|
755 |
if(!(/src/i).test(attr)){
|
756 |
if(attr != '' && attrs[attr] != ''){
|
759 |
}
|
760 |
}
|
761 |
oembed_instagram_html += " >";
|
762 |
+
if(carousel_media != null && carousel_media.length){
|
763 |
+
for(var i = 0; i < carousel_media.length; i++){
|
764 |
+
if(carousel_media[i]["type"] == "image"){
|
765 |
+
oembed_instagram_html += '<img src="'+carousel_media[i]["images"]["standard_resolution"]["url"]+'"'+
|
766 |
+
' style="'+
|
767 |
+
'max-width:'+'100%'+" !important"+
|
768 |
+
'; max-height:'+'100%'+" !important"+
|
769 |
+
'; width:'+'auto !important'+
|
770 |
+
'; height:'+ 'auto !important' +
|
771 |
+
';" data-id="' + i + '" class="carousel_media ' + (i == 0 ? "active" : "") + '">';
|
772 |
+
} else if(carousel_media[i]["type"] == "video"){
|
773 |
+
oembed_instagram_html += '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="' + i + '" class="carousel_media ' + (i == 0 ? "active" : "") + '">'+
|
774 |
+
'<source src="'+ carousel_media[i]["videos"]["standard_resolution"]["url"] +
|
775 |
+
'" type="video/mp4"> Your browser does not support the video tag. </video>';
|
776 |
+
}
|
777 |
+
}
|
778 |
+
} else {
|
779 |
+
if(embed_id!=''){
|
780 |
+
|
781 |
+
oembed_instagram_html += '<img src="//instagram.com/p/'+embed_id+'/media/?size=l"'+
|
782 |
+
' style=" '+
|
783 |
+
'max-width:'+'100%'+" !important"+
|
784 |
+
'; max-height:'+'100%'+" !important"+
|
785 |
+
'; width:'+'auto'+
|
786 |
+
'; height:'+ 'auto' +
|
787 |
+
';">';
|
788 |
+
}
|
789 |
+
}
|
790 |
+
oembed_instagram_html +="</div>";
|
791 |
|
792 |
+
html_to_insert += oembed_instagram_html;
|
793 |
+
break;
|
794 |
+
case 'EMBED_OEMBED_INSTAGRAM_POST':
|
795 |
+
var oembed_instagram_html ='<div ';
|
796 |
+
var id = '';
|
797 |
+
for (attr in attrs) {
|
798 |
+
if(!(/src/i).test(attr)){
|
799 |
+
if(attr != '' && attrs[attr] != ''){
|
800 |
+
oembed_instagram_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
801 |
+
if(attr == 'CLASS' || attr =='class' || attr =='Class'){
|
802 |
+
obj_class = attrs[attr];
|
803 |
+
}
|
804 |
+
}
|
805 |
+
}
|
806 |
+
}
|
807 |
+
oembed_instagram_html += " >";
|
808 |
+
if(embed_id!=''){
|
809 |
+
|
810 |
+
oembed_instagram_html += '<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+embed_id+'/embed/?enablejsapi=1"'+
|
811 |
+
' style="'+
|
812 |
+
'max-width:'+'100%'+" !important"+
|
813 |
+
'; max-height:'+'100%'+" !important"+
|
814 |
+
'; width:'+'100%'+
|
815 |
+
'; height:'+ '100%' +
|
816 |
+
'; margin:0'+
|
817 |
+
'; display:table-cell; vertical-align:middle;"'+
|
818 |
+
'frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen'+
|
819 |
+
'></iframe>';
|
820 |
+
}
|
821 |
|
822 |
+
oembed_instagram_html +="</div>";
|
823 |
|
824 |
+
html_to_insert += oembed_instagram_html;
|
825 |
|
826 |
+
break;
|
827 |
|
828 |
+
case 'EMBED_OEMBED_DAILYMOTION_VIDEO':
|
829 |
+
var oembed_dailymotion_html ='<iframe ';
|
830 |
+
if(embed_id!=''){
|
831 |
+
oembed_dailymotion_html += ' src="' + '//www.dailymotion.com/embed/video/'+embed_id + '?api=postMessage"';
|
832 |
+
}
|
833 |
+
for (attr in attrs) {
|
834 |
+
if(!(/src/i).test(attr)){
|
835 |
+
if(attr != '' && attrs[attr] != ''){
|
836 |
+
oembed_dailymotion_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
837 |
+
}
|
838 |
+
}
|
839 |
+
}
|
840 |
+
oembed_dailymotion_html += " ></iframe>";
|
841 |
+
html_to_insert += oembed_dailymotion_html;
|
842 |
+
|
843 |
+
break;
|
844 |
+
case 'EMBED_OEMBED_IMGUR':
|
845 |
+
/*not working yet*/
|
846 |
+
var oembed_imgur_html ='<div ';
|
847 |
+
for (attr in attrs) {
|
848 |
+
if(!(/src/i).test(attr)){
|
849 |
+
if(attr != '' && attrs[attr] != ''){
|
850 |
+
oembed_instagram_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
851 |
+
}
|
852 |
+
}
|
853 |
+
}
|
854 |
+
oembed_imgur_html += " >";
|
855 |
+
if(embed_id!=''){
|
856 |
+
|
857 |
+
oembed_imgur_html += '<img src="'+embed_id+'"'+
|
858 |
+
' style="'+
|
859 |
+
'max-width:'+'100%'+" !important"+
|
860 |
+
'; max-height:'+'100%'+" !important"+
|
861 |
+
'; width:'+'auto'+
|
862 |
+
'; height:'+ 'auto' + " !important"+
|
863 |
+
';">';
|
864 |
+
}
|
865 |
+
oembed_imgur_html +="</div>";
|
866 |
|
867 |
+
html_to_insert += oembed_imgur_html;
|
868 |
+
|
869 |
+
break;
|
870 |
+
default:
|
871 |
+
;
|
872 |
+
}
|
873 |
+
|
874 |
+
return html_to_insert;
|
875 |
+
|
876 |
+
}
|
877 |
+
/**
|
878 |
+
* @param from_popup: optional, true if from bulk embed popup, false(default) if from instagram gallery
|
879 |
+
* @return "ok" if adds instagram gallery, false if any error when adding instagram gallery
|
880 |
+
*/
|
881 |
+
/*------------------------------*/
|
882 |
+
|
883 |
+
function wdi_testBrowser_cssTransitions() {
|
884 |
+
return wdi_testDom('Transition');
|
885 |
+
}
|
886 |
+
function wdi_testBrowser_cssTransforms3d() {
|
887 |
+
return wdi_testDom('Perspective');
|
888 |
+
}
|
889 |
+
function wdi_testDom(prop) {
|
890 |
+
/* Browser vendor CSS prefixes.*/
|
891 |
+
var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
|
892 |
+
/* Browser vendor DOM prefixes.*/
|
893 |
+
var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
|
894 |
+
var i = domPrefixes.length;
|
895 |
+
while (i--) {
|
896 |
+
if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
|
897 |
+
return true;
|
898 |
}
|
899 |
+
}
|
900 |
+
return false;
|
901 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
|
903 |
+
function wdi_cube(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
|
904 |
+
/* If browser does not support 3d transforms/CSS transitions.*/
|
905 |
+
if (!wdi_testBrowser_cssTransitions()) {
|
906 |
+
return wdi_fallback(current_image_class, next_image_class, direction);
|
907 |
+
}
|
908 |
+
if (!wdi_testBrowser_cssTransforms3d()) {
|
909 |
+
return wdi_fallback3d(current_image_class, next_image_class, direction);
|
910 |
+
}
|
911 |
+
wdi_trans_in_progress = true;
|
912 |
+
/* Set active thumbnail.*/
|
913 |
+
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
914 |
+
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
915 |
+
jQuery(".wdi_slide_bg").css('perspective', 1000);
|
916 |
+
jQuery(current_image_class).css({
|
917 |
+
transform : 'translateZ(' + tz + 'px)',
|
918 |
+
backfaceVisibility : 'hidden'
|
919 |
+
});
|
920 |
+
jQuery(next_image_class).css({
|
921 |
+
opacity : 1,
|
922 |
+
filter: 'Alpha(opacity=100)',
|
923 |
+
backfaceVisibility : 'hidden',
|
924 |
+
transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
|
925 |
+
});
|
926 |
+
jQuery(".wdi_slider").css({
|
927 |
+
transform: 'translateZ(-' + tz + 'px)',
|
928 |
+
transformStyle: 'preserve-3d'
|
929 |
+
});
|
930 |
+
/* Execution steps.*/
|
931 |
+
setTimeout(function () {
|
932 |
+
jQuery(".wdi_slider").css({
|
933 |
+
transition: 'all ' + wdi_transition_duration + 'ms ease-in-out',
|
934 |
+
transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
|
935 |
+
});
|
936 |
+
}, 20);
|
937 |
+
/* After transition.*/
|
938 |
+
jQuery(".wdi_slider").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wdi_after_trans));
|
939 |
+
function wdi_after_trans() {
|
940 |
+
jQuery(current_image_class).removeAttr('style');
|
941 |
+
jQuery(next_image_class).removeAttr('style');
|
942 |
+
jQuery(".wdi_slider").removeAttr('style');
|
943 |
+
jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
|
944 |
+
jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
|
945 |
+
|
946 |
+
wdi_trans_in_progress = false;
|
947 |
+
jQuery(current_image_class).html('');
|
948 |
+
if (typeof event_stack !== 'undefined') {
|
949 |
+
if (event_stack.length > 0) {
|
950 |
+
key = event_stack[0].split("-");
|
951 |
+
event_stack.shift();
|
952 |
+
wdi_change_image(key[0], key[1], wdi_data, true);
|
953 |
}
|
|
|
954 |
}
|
955 |
+
wdi_change_watermark_container();
|
956 |
+
}
|
957 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
958 |
|
959 |
+
function wdi_cubeH(current_image_class, next_image_class, direction) {
|
960 |
+
/* Set to half of image width.*/
|
961 |
+
var dimension = jQuery(current_image_class).width() / 2;
|
962 |
+
if (direction == 'right') {
|
963 |
+
wdi_cube(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
|
964 |
+
}
|
965 |
+
else if (direction == 'left') {
|
966 |
+
wdi_cube(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
|
967 |
+
}
|
968 |
+
}
|
969 |
+
function wdi_cubeV(current_image_class, next_image_class, direction) {
|
970 |
+
/* Set to half of image height.*/
|
971 |
+
var dimension = jQuery(current_image_class).height() / 2;
|
972 |
+
/* If next slide.*/
|
973 |
+
if (direction == 'right') {
|
974 |
+
wdi_cube(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction);
|
975 |
+
}
|
976 |
+
else if (direction == 'left') {
|
977 |
+
wdi_cube(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction);
|
978 |
+
}
|
979 |
+
}
|
980 |
|
981 |
+
/* For browsers that does not support transitions.*/
|
982 |
+
function wdi_fallback(current_image_class, next_image_class, direction) {
|
983 |
+
wdi_fade(current_image_class, next_image_class, direction);
|
984 |
+
}
|
985 |
+
/* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
|
986 |
+
function wdi_fallback3d(current_image_class, next_image_class, direction) {
|
987 |
+
wdi_sliceV(current_image_class, next_image_class, direction);
|
988 |
+
}
|
989 |
+
function wdi_none(current_image_class, next_image_class, direction) {
|
990 |
+
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
991 |
+
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
992 |
+
/* Set active thumbnail.*/
|
993 |
+
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
994 |
+
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
995 |
+
wdi_trans_in_progress = false;
|
996 |
+
jQuery(current_image_class).html('');
|
997 |
+
wdi_change_watermark_container();
|
998 |
+
}
|
999 |
|
1000 |
+
function wdi_fade(current_image_class, next_image_class, direction) {
|
1001 |
+
/* Set active thumbnail.*/
|
1002 |
+
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1003 |
+
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1004 |
+
if (wdi_testBrowser_cssTransitions()) {
|
1005 |
+
jQuery(next_image_class).css('transition', 'opacity ' + wdi_transition_duration + 'ms linear');
|
1006 |
+
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
1007 |
+
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
1008 |
+
wdi_change_watermark_container();
|
1009 |
+
}
|
1010 |
+
else {
|
1011 |
+
jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, wdi_transition_duration);
|
1012 |
+
jQuery(next_image_class).animate({
|
1013 |
+
'opacity' : 1,
|
1014 |
+
'z-index': 2
|
1015 |
+
}, {
|
1016 |
+
duration: wdi_transition_duration,
|
1017 |
+
complete: function () {
|
1018 |
+
|
1019 |
+
wdi_trans_in_progress = false;
|
1020 |
+
jQuery(current_image_class).html('');
|
1021 |
+
wdi_change_watermark_container(); }
|
1022 |
+
});
|
1023 |
+
/* For IE.*/
|
1024 |
+
jQuery(current_image_class).fadeTo(wdi_transition_duration, 0);
|
1025 |
+
jQuery(next_image_class).fadeTo(wdi_transition_duration, 1);
|
1026 |
+
}
|
1027 |
+
}
|
1028 |
|
1029 |
+
function wdi_grid(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
|
1030 |
+
/* If browser does not support CSS transitions.*/
|
1031 |
+
if (!wdi_testBrowser_cssTransitions()) {
|
1032 |
+
return wdi_fallback(current_image_class, next_image_class, direction);
|
1033 |
+
}
|
1034 |
+
wdi_trans_in_progress = true;
|
1035 |
+
/* Set active thumbnail.*/
|
1036 |
+
jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
|
1037 |
+
jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
|
1038 |
+
/* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
|
1039 |
+
var count = (wdi_transition_duration) / (cols + rows);
|
1040 |
+
/* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
|
1041 |
+
function wdi_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
|
1042 |
+
var delay = (c + r) * count;
|
1043 |
+
/* Return a gridlet elem with styles for specific transition.*/
|
1044 |
+
return jQuery('<span class="wdi_gridlet" />').css({
|
1045 |
+
display : "block",
|
1046 |
+
width : width,
|
1047 |
+
height : height,
|
1048 |
+
top : top,
|
1049 |
+
left : left,
|
1050 |
+
backgroundImage : 'url("' + src + '")',
|
1051 |
+
backgroundColor: jQuery(".wdi_spider_popup_wrap").css("background-color"),
|
1052 |
+
/*backgroundColor: 'rgba(0, 0, 0, 0)',*/
|
1053 |
+
backgroundRepeat: 'no-repeat',
|
1054 |
+
backgroundPosition : img_left + 'px ' + img_top + 'px',
|
1055 |
+
backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
|
1056 |
+
transition : 'all ' + wdi_transition_duration + 'ms ease-in-out ' + delay + 'ms',
|
1057 |
+
transform : 'none'
|
1058 |
+
});
|
1059 |
+
}
|
1060 |
+
/* Get the current slide's image.*/
|
1061 |
+
var cur_img = jQuery(current_image_class).find('img');
|
1062 |
+
/* Create a grid to hold the gridlets.*/
|
1063 |
+
var grid = jQuery('<span style="display: block;" />').addClass('wdi_grid');
|
1064 |
+
/* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
|
1065 |
+
jQuery(current_image_class).prepend(grid);
|
1066 |
+
/* Vars to calculate positioning/size of gridlets.*/
|
1067 |
+
var cont = jQuery(".wdi_slide_bg");
|
1068 |
+
var imgWidth = cur_img.width();
|
1069 |
+
var imgHeight = cur_img.height();
|
1070 |
+
var contWidth = cont.width(),
|
1071 |
+
contHeight = cont.height(),
|
1072 |
+
colWidth = Math.floor(contWidth / cols),
|
1073 |
+
rowHeight = Math.floor(contHeight / rows),
|
1074 |
+
colRemainder = contWidth - (cols * colWidth),
|
1075 |
+
colAdd = Math.ceil(colRemainder / cols),
|
1076 |
+
rowRemainder = contHeight - (rows * rowHeight),
|
1077 |
+
rowAdd = Math.ceil(rowRemainder / rows),
|
1078 |
+
leftDist = 0,
|
1079 |
+
img_leftDist = Math.ceil((jQuery(".wdi_slide_bg").width() - cur_img.width()) / 2);
|
1080 |
+
var imgSrc = typeof cur_img.attr('src')=='undefined' ? '' :cur_img.attr('src');
|
1081 |
+
/* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
|
1082 |
+
tx = tx === 'auto' ? contWidth : tx;
|
1083 |
+
tx = tx === 'min-auto' ? - contWidth : tx;
|
1084 |
+
ty = ty === 'auto' ? contHeight : ty;
|
1085 |
+
ty = ty === 'min-auto' ? - contHeight : ty;
|
1086 |
+
/* Loop through cols.*/
|
1087 |
+
for (var i = 0; i < cols; i++) {
|
1088 |
+
var topDist = 0,
|
1089 |
+
img_topDst = Math.floor((jQuery(".wdi_slide_bg").height() - cur_img.height()) / 2),
|
1090 |
+
newColWidth = colWidth;
|
1091 |
+
/* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
|
1092 |
+
if (colRemainder > 0) {
|
1093 |
+
var add = colRemainder >= colAdd ? colAdd : colRemainder;
|
1094 |
+
newColWidth += add;
|
1095 |
+
colRemainder -= add;
|
1096 |
}
|
1097 |
+
/* Nested loop to create row gridlets for each col.*/
|
1098 |
+
for (var j = 0; j < rows; j++) {
|
1099 |
+
var newRowHeight = rowHeight,
|
1100 |
+
newRowRemainder = rowRemainder;
|
1101 |
+
/* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
|
1102 |
+
if (newRowRemainder > 0) {
|
1103 |
+
add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
|
1104 |
+
newRowHeight += add;
|
1105 |
+
newRowRemainder -= add;
|
1106 |
+
}
|
1107 |
+
/* Create & append gridlet to grid.*/
|
1108 |
+
grid.append(wdi_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
|
1109 |
+
topDist += newRowHeight;
|
1110 |
+
img_topDst -= newRowHeight;
|
1111 |
}
|
1112 |
+
img_leftDist -= newColWidth;
|
1113 |
+
leftDist += newColWidth;
|
1114 |
+
}
|
1115 |
+
/* Set event listener on last gridlet to finish transitioning.*/
|
1116 |
+
var last_gridlet = grid.children().last();
|
1117 |
+
/* Show grid & hide the image it replaces.*/
|
1118 |
+
grid.show();
|
1119 |
+
cur_img.css('opacity', 0);
|
1120 |
+
/* Add identifying classes to corner gridlets (useful if applying border radius).*/
|
1121 |
+
grid.children().first().addClass('rs-top-left');
|
1122 |
+
grid.children().last().addClass('rs-bottom-right');
|
1123 |
+
grid.children().eq(rows - 1).addClass('rs-bottom-left');
|
1124 |
+
grid.children().eq(- rows).addClass('rs-top-right');
|
1125 |
+
/* Execution steps.*/
|
1126 |
+
setTimeout(function () {
|
1127 |
+
grid.children().css({
|
1128 |
+
opacity: op,
|
1129 |
+
transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
|
1130 |
+
});
|
1131 |
+
}, 1);
|
1132 |
+
jQuery(next_image_class).css('opacity', 1);
|
1133 |
+
/* After transition.*/
|
1134 |
+
jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wdi_after_trans));
|
1135 |
+
function wdi_after_trans() {
|
1136 |
+
jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
|
1137 |
+
jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
|
1138 |
+
cur_img.css('opacity', 1);
|
1139 |
+
grid.remove();
|
1140 |
+
wdi_trans_in_progress = false;
|
1141 |
+
jQuery(current_image_class).html('');
|
1142 |
+
if (typeof event_stack !== 'undefined') {
|
1143 |
+
if (event_stack.length > 0) {
|
1144 |
+
key = event_stack[0].split("-");
|
1145 |
+
event_stack.shift();
|
1146 |
+
wdi_change_image(key[0], key[1], wdi_data, true);
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
wdi_change_watermark_container();
|
1150 |
+
}
|
1151 |
+
}
|
1152 |
+
function wdi_sliceH(current_image_class, next_image_class, direction) {
|
1153 |
+
if (direction == 'right') {
|
1154 |
+
var translateX = 'min-auto';
|
1155 |
+
}
|
1156 |
+
else if (direction == 'left') {
|
1157 |
+
var translateX = 'auto';
|
1158 |
+
}
|
1159 |
+
wdi_grid(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
|
1160 |
+
}
|
1161 |
+
function wdi_sliceV(current_image_class, next_image_class, direction) {
|
1162 |
+
if (direction == 'right') {
|
1163 |
+
var translateY = 'min-auto';
|
1164 |
+
}
|
1165 |
+
else if (direction == 'left') {
|
1166 |
+
var translateY = 'auto';
|
1167 |
+
}
|
1168 |
+
wdi_grid(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
|
1169 |
+
}
|
1170 |
+
function wdi_slideV(current_image_class, next_image_class, direction) {
|
1171 |
+
if (direction == 'right') {
|
1172 |
+
var translateY = 'auto';
|
1173 |
+
}
|
1174 |
+
else if (direction == 'left') {
|
1175 |
+
var translateY = 'min-auto';
|
1176 |
+
}
|
1177 |
+
wdi_grid(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction);
|
1178 |
+
}
|
1179 |
+
function wdi_slideH(current_image_class, next_image_class, direction) {
|
1180 |
+
if (direction == 'right') {
|
1181 |
+
var translateX = 'min-auto';
|
1182 |
+
}
|
1183 |
+
else if (direction == 'left') {
|
1184 |
+
var translateX = 'auto';
|
1185 |
+
}
|
1186 |
+
wdi_grid(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction);
|
1187 |
+
}
|
1188 |
+
function wdi_scaleOut(current_image_class, next_image_class, direction) {
|
1189 |
+
wdi_grid(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
|
1190 |
+
}
|
1191 |
+
function wdi_scaleIn(current_image_class, next_image_class, direction) {
|
1192 |
+
wdi_grid(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction);
|
1193 |
+
}
|
1194 |
+
function wdi_blockScale(current_image_class, next_image_class, direction) {
|
1195 |
+
wdi_grid(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction);
|
1196 |
+
}
|
1197 |
+
function wdi_kaleidoscope(current_image_class, next_image_class, direction) {
|
1198 |
+
wdi_grid(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction);
|
1199 |
+
}
|
1200 |
+
function wdi_fan(current_image_class, next_image_class, direction) {
|
1201 |
+
if (direction == 'right') {
|
1202 |
+
var rotate = 45;
|
1203 |
+
var translateX = 100;
|
1204 |
+
}
|
1205 |
+
else if (direction == 'left') {
|
1206 |
+
var rotate = -45;
|
1207 |
+
var translateX = -100;
|
1208 |
+
}
|
1209 |
+
wdi_grid(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
|
1210 |
+
}
|
1211 |
+
function wdi_blindV(current_image_class, next_image_class, direction) {
|
1212 |
+
wdi_grid(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class);
|
1213 |
+
}
|
1214 |
+
function wdi_blindH(current_image_class, next_image_class, direction) {
|
1215 |
+
wdi_grid(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
|
1216 |
+
}
|
1217 |
+
function wdi_random(current_image_class, next_image_class, direction) {
|
1218 |
+
var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV'];
|
1219 |
+
/* Pick a random transition from the anims array.*/
|
1220 |
+
this["wdi_" + anims[Math.floor(Math.random() * anims.length)]](current_image_class, next_image_class, direction);
|
1221 |
+
}
|
1222 |
+
function wdi_pause_stream(parent){
|
1223 |
+
jQuery(parent).find('video').each(function(){
|
1224 |
+
jQuery(this).get(0).pause();
|
1225 |
+
});
|
1226 |
+
}
|
1227 |
+
function wdi_reset_zoom() {
|
1228 |
+
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
1229 |
+
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
1230 |
+
if (isMobile) {
|
1231 |
+
if (viewportmeta) {
|
1232 |
+
viewportmeta.content = 'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0';
|
1233 |
+
}
|
1234 |
+
}
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
|
1238 |
+
|
1239 |
+
|
1240 |
+
|
1241 |
+
|
1242 |
+
|
1243 |
+
|
1244 |
+
|
1245 |
+
|
1246 |
+
|
1247 |
+
|
1248 |
+
|
1249 |
|
|
|
1250 |
|
|
|
|
|
|
|
|
|
1251 |
|
|
|
1252 |
|
|
|
|
|
|
|
|
|
|
js/gallerybox/wdi_gallery_box.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var isPopUpOpened=false;function wdi_spider_createpopup(d,c,f,b,h,g,a,e){d=d.replace(/&/g,"&");if(isPopUpOpened){return}isPopUpOpened=true;if(wdi_spider_hasalreadyreceivedpopup(g)||wdi_spider_isunsupporteduseragent()){return}jQuery("html").attr("style","overflow:hidden !important;");jQuery("#wdi_spider_popup_loading_"+c).css({display:"block"});jQuery("#wdi_spider_popup_overlay_"+c).css({display:"block"});jQuery.ajax({type:"POST",url:d,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(e.parsedData),feed_id:e.feed_row.id,feed_counter:e.feed_row.wdi_feed_counter},success:function(k){var j=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap" style=" width:'+f+"px; height:"+b+"px; margin-top:-"+b/2+"px; margin-left: -"+f/2+'px; ">'+k+"</div>").hide().appendTo("body");wdi_spider_showpopup(g,a,j,h);jQuery("#wdi_spider_popup_loading_"+c).css({display:"none !important;"})}})}function wdi_spider_showpopup(c,a,b,d){isPopUpOpened=true;b.show();wdi_spider_receivedpopup(c,a)}function wdi_spider_hasalreadyreceivedpopup(a){if(document.cookie.indexOf(a)>-1){delete document.cookie[document.cookie.indexOf(a)]}return false}function wdi_spider_receivedpopup(c,a){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"=true;expires="+b.toUTCString()+";path=/"}function wdi_spider_isunsupporteduseragent(){return(!window.XMLHttpRequest)}function wdi_spider_destroypopup(d){if(document.getElementById("wdi_spider_popup_wrap")!=null){wdi_comments_manager.popup_destroyed();if(typeof jQuery().fullscreen!=="undefined"&&jQuery.isFunction(jQuery().fullscreen)){if(jQuery.fullscreen.isFullScreen()){jQuery.fullscreen.exit()}}if(typeof enable_addthis!="undefined"&&enable_addthis){jQuery(".at4-share-outer").hide()}setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove();jQuery(".wdi_spider_popup_loading").css({display:"none"});jQuery(".wdi_spider_popup_overlay").css({display:"none"});jQuery(document).off("keydown");jQuery("html").attr("style","")},20)}isPopUpOpened=false;var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var c=document.querySelector('meta[name="viewport"]');if(a&&c){c.content="width=device-width, initial-scale=1"}var b=jQuery(document).scrollTop();window.location.hash="";jQuery(document).scrollTop(b);if(typeof wdi_playInterval!="undefined"){clearInterval(wdi_playInterval)}}Object.size=function(c){var b=0,a;for(a in c){if(c.hasOwnProperty(a)){b++}}return b};function wdi_spider_ajax_save(a,b){wdi_comments_manager.init(b);return false}wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(a){this.instagram=new WDIInstagram();this.instagram.addToken(wdi_front.access_token);if(this.currentKey!=a){this.currentKey=a;this.reset_comments()}else{}},reset_comments:function(){jQuery("#wdi_load_more_comments").remove();jQuery("#wdi_added_comments").html("");this.commentCounter=0;this.media_id=wdi_data[this.currentKey]["id"];this.getAjaxComments(this.currentKey)},popup_destroyed:function(){this.media_id="";this.mediaComments=[];this.commentCounter=0;this.currentKey=-1},showComments:function(f,e){if(Object.size(f)-this.commentCounter-e<0||e===undefined){e=Object.size(f)-this.commentCounter}var b=this.commentCounter;for(i=Object.size(f)-b-1;i>=Object.size(f)-b-e;i--){this.commentCounter++;var d=(f[i]["text"]);d=this.filterCommentText(d);var g=(f[i]["from"]["username"]);var c=(f[i]["from"]["profile_picture"]);var a=jQuery('<div class="wdi_single_comment"></div>');a.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+g+'"><img style="height:25px;width:25px;border-radius:25px" src="'+c+'"> '+g+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(f[i]["created_time"])+"</span></p>"));a.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+d+"</p></span></div>"));jQuery("#wdi_added_comments").prepend(a)}this.updateScrollbar()},updateScrollbar:function(){var b=jQuery("#wdi_comments");var a=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments");jQuery(".wdi_comments").html("");jQuery(".wdi_comments").append(b);jQuery(".wdi_comments").append(a);jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){this.instagram.getRecentMediaComments(this.media_id,{success:function(a){if(a==""||a==undefined||a==null){errorMessage="Network Error, please try again later :(";wdi_front.show_alert(errorMessage);return}if(a.meta["code"]!=200){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage);return}wdi_comments_manager.mediaComments=a.data;var b=wdi_data[wdi_comments_manager.currentKey];b.comments_data=a.data;wdi_comments_manager.showComments(b.comments_data,wdi_comments_manager.load_more_count);wdi_comments_manager.ajax_comments_ready(a.data)}})},ajax_comments_ready:function(a){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>'));jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove();wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count);wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(d){var c=d.split(" ");var b="";for(var a=0;a<c.length;a++){switch(c[a][0]){case"@":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;case"#":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;default:b+=c[a]+" "}}b=b.substring(0,b.length-1);return b}};function wdi_spider_set_input_value(b,a){if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_spider_check_required(b,a){if(jQuery("#"+b).val()==""){wdi_front.show_alert(a+"* "+wdi_objectL10n.wdi_field_required);jQuery("#"+b).attr("style","border-color: #FF0000;");jQuery("#"+b).focus();return true}else{return false}}function wdi_spider_check_email(b){if(jQuery("#"+b).val()!=""){var a=jQuery("#"+b).val().replace(/^\s+|\s+$/g,"");if(a.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)==-1){wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation);return true}return false}}function wdi_captcha_refresh(a){if(document.getElementById(a+"_img")&&document.getElementById(a+"_input")){srcArr=document.getElementById(a+"_img").src.split("&r=");document.getElementById(a+"_img").src=srcArr[0]+"&r="+Math.floor(Math.random()*100);document.getElementById(a+"_img").style.display="inline-block";document.getElementById(a+"_input").value=""}}function wdi_play_pause(d){var c=d.get(0);var b=/firefox/i;var a=false;if(navigator.userAgent.match(b)){a=true}if(!a){if(!c.paused){c.pause()}else{c.play()}}}function wdi_spider_display_embed(k,l,g){var b="";switch(k){case"EMBED_OEMBED_YOUTUBE_VIDEO":var h="<iframe ";if(l!=""){h+=' src="//www.youtube.com/embed/'+l+'?enablejsapi=1&wmode=transparent"'}for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){h+=" "+attr+'="'+g[attr]+'"'}}}h+=" ></iframe>";b+=h;break;case"EMBED_OEMBED_VIMEO_VIDEO":var e="<iframe ";if(l!=""){e+=' src="//player.vimeo.com/video/'+l+'?enablejsapi=1"'}for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){e+=" "+attr+'="'+g[attr]+'"'}}}e+=" ></iframe>";b+=e;break;case"EMBED_OEMBED_FLICKR_IMAGE":var c="<div ";for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){c+=" "+attr+'="'+g[attr]+'"'}}}c+=" >";if(l!=""){c+='<img src="'+l+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'}c+="</div>";b+=c;break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var d="<div ";for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){d+=" "+attr+'="'+g[attr]+'"'}}}d+=" >";if(l!=""){d+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+l+'" type="video/mp4"> Your browser does not support the video tag. </video>'}d+="</div>";b+=d;break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var d="<div ";for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){d+=" "+attr+'="'+g[attr]+'"'}}}d+=" >";if(l!=""){d+='<img src="//instagram.com/p/'+l+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'}d+="</div>";b+=d;break;case"EMBED_OEMBED_INSTAGRAM_POST":var d="<div ";var a="";for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){d+=" "+attr+'="'+g[attr]+'"';if(attr=="CLASS"||attr=="class"||attr=="Class"){obj_class=g[attr]}}}}d+=" >";if(l!=""){d+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+l+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'}d+="</div>";b+=d;break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var j="<iframe ";if(l!=""){j+=' src="//www.dailymotion.com/embed/video/'+l+'?api=postMessage"'}for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){j+=" "+attr+'="'+g[attr]+'"'}}}j+=" ></iframe>";b+=j;break;case"EMBED_OEMBED_IMGUR":var f="<div ";for(attr in g){if(!(/src/i).test(attr)){if(attr!=""&&g[attr]!=""){d+=" "+attr+'="'+g[attr]+'"'}}}f+=" >";if(l!=""){f+='<img src="'+l+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'}f+="</div>";b+=f;break;default:}return b};
|
1 |
+
var isPopUpOpened=false;var wdi_data=[];function wdi_spider_createpopup(a,k,b,m,e,l,f,j,h){a=a.replace(/&/g,"&");if(isPopUpOpened){return}isPopUpOpened=true;if(wdi_spider_hasalreadyreceivedpopup(l)||wdi_spider_isunsupporteduseragent()){return}jQuery("html").attr("style","overflow:hidden !important;");jQuery("#wdi_spider_popup_loading_"+k).css({display:"block"});jQuery("#wdi_spider_popup_overlay_"+k).css({display:"block"});var d=0;var c;for(var g=0;g<j.parsedData.length;g++){if(j.parsedData[g].id===h){d=g;c=[j.parsedData[g]];break}}jQuery.ajax({type:"POST",url:a,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(c),feed_id:j.feed_row.id,feed_counter:j.feed_row.wdi_feed_counter,current_image_index:d,image_rows_count:j.parsedData.length,carousel_media_row:JSON.stringify(c[0].carousel_media)},success:function(o){var n=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+j.feed_row.theme_id+'" style="width:'+b+"px;height:"+m+"px;margin-top:-"+(m/2)+"px;margin-left: -"+(b/2)+'px; ">'+o+"</div>");var p=new wdi_construct_popup(n,j,j.parsedData,h);p.construct();n.hide().appendTo("body");wdi_spider_showpopup(l,f,n,e);jQuery("#wdi_spider_popup_loading_"+k).css({display:"none !important;"})}})}var wdi_construct_popup=function(a,b,c,d){this.theme_row={};this.construct=function(){this.theme_row=window["wdi_theme_"+b.feed_row.theme_id];if(b.feed_row.popup_enable_filmstrip&&b.feed_row.popup_enable_filmstrip==="1"){this.add_filmstrip()}this.set_wdi_data()};this.add_filmstrip=function(){var l="horizontal";if(this.theme_row.lightbox_filmstrip_pos==="right"||this.theme_row.lightbox_filmstrip_pos==="left"){l="vertical"}var y=(l==="horizontal")?"fa-angle-left":"fa-angle-up";var x=(l==="horizontal")?"fa-angle-right":"fa-angle-down";var h="";var q,f;if(l==="horizontal"){f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"20"}else{f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"50"}q=f=parseInt(f);for(var w=0;w<c.length;w++){var e=c[w];var s,k,A;if(e.resolution&&e.resolution!==""){var n=e.resolution.split(" ");var p=intval($resolution_arr[0]);var z=intval($resolution_arr[2]);if(p!==0&&z!==0){A=Math.max(f/p,q/z);s=p*A;k=z*A}else{s=f;k=q}}else{s=f;k=q}A=Math.max(f/s,q/k);s*=A;k*=A;var g=(f-s)/2;var j=(q-k)/2;var u="wdi_filmstrip_thumbnail "+((parseInt(e.id)===parseInt(d))?"wdi_thumb_active":"wdi_thumb_deactive");var t="width:"+s+"px;height:"+k+"px;margin-left:"+g+"px;margin-top:"+j+"px;";var m=(typeof e.images[b.feedImageResolution]["url"]!=="undefined")?e.images[b.feedImageResolution]["url"]:e.thumb_url;var B="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var v="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var r='<img style="'+t+'" class="wdi_filmstrip_thumbnail_img" src="'+m+'" onclick="'+B+'" ontouchend="'+v+'" image_id="'+e.id+'" image_key="'+w+'" alt="'+e.alt+'" />';h+='<div id="wdi_filmstrip_thumbnail_'+w+'" class="'+u+'">'+r+"</div>"}var o='<div class="wdi_filmstrip_left"><i class="fa '+y+'"></i></div><div class="wdi_filmstrip"><div class="wdi_filmstrip_thumbnails">'+h+'</div></div><div class="wdi_filmstrip_right"><i class="fa '+x+'"></i></div>';a.find(".wdi_filmstrip_container").append(o)};this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<c.length;e++){wdi_data[e]=[];wdi_data[e]["number"]=e+1;wdi_data[e]["id"]=c[e].id;wdi_data[e]["alt"]=c[e].alt;wdi_data[e]["description"]=c[e].description;wdi_data[e]["username"]=c[e].username;wdi_data[e]["profile_picture"]=c[e].profile_picture;wdi_data[e]["image_url"]=c[e].image_url;wdi_data[e]["thumb_url"]=c[e].thumb_url;wdi_data[e]["date"]=c[e].date;wdi_data[e]["comment_count"]=c[e].comment_count;wdi_data[e]["filetype"]=c[e].filetype;wdi_data[e]["filename"]=c[e].filename;wdi_data[e]["avg_rating"]=c[e].avg_rating;wdi_data[e]["rate"]=c[e].rate;wdi_data[e]["rate_count"]=c[e].rate_count;wdi_data[e]["hit_count"]=c[e].hit_count;wdi_data[e]["comments_data"]=(typeof c[e].comments_data!=="undefined")?c[e].comments_data:"null";wdi_data[e]["carousel_media"]=(typeof c[e]["carousel_media"]!=="undefined")?c[e]["carousel_media"]:null}}};function wdi_spider_showpopup(c,a,b,d){isPopUpOpened=true;b.show();wdi_spider_receivedpopup(c,a)}function wdi_spider_hasalreadyreceivedpopup(a){if(document.cookie.indexOf(a)>-1){delete document.cookie[document.cookie.indexOf(a)]}return false}function wdi_spider_receivedpopup(c,a){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"=true;expires="+b.toUTCString()+";path=/"}function wdi_spider_isunsupporteduseragent(){return(!window.XMLHttpRequest)}function wdi_spider_destroypopup(d){if(document.getElementById("wdi_spider_popup_wrap")!=null){wdi_comments_manager.popup_destroyed();if(typeof jQuery().fullscreen!=="undefined"&&jQuery.isFunction(jQuery().fullscreen)){if(jQuery.fullscreen.isFullScreen()){jQuery.fullscreen.exit()}}if(typeof enable_addthis!="undefined"&&enable_addthis){jQuery(".at4-share-outer").hide()}setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove();jQuery(".wdi_spider_popup_loading").css({display:"none"});jQuery(".wdi_spider_popup_overlay").css({display:"none"});jQuery(document).off("keydown");jQuery("html").attr("style","")},20)}isPopUpOpened=false;var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var c=document.querySelector('meta[name="viewport"]');if(a&&c){c.content="width=device-width, initial-scale=1"}var b=jQuery(document).scrollTop();window.location.hash="";jQuery(document).scrollTop(b);if(typeof wdi_playInterval!="undefined"){clearInterval(wdi_playInterval)}}Object.size=function(c){var b=0,a;for(a in c){if(c.hasOwnProperty(a)){b++}}return b};function wdi_spider_ajax_save(a,b){wdi_comments_manager.init(b);return false}wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(a){this.instagram=new WDIInstagram();this.instagram.addToken(wdi_front.access_token);if(this.currentKey!=a){this.currentKey=a;this.reset_comments()}else{}},reset_comments:function(){jQuery("#wdi_load_more_comments").remove();jQuery("#wdi_added_comments").html("");this.commentCounter=0;this.media_id=wdi_data[this.currentKey]["id"];this.getAjaxComments(this.currentKey)},popup_destroyed:function(){this.media_id="";this.mediaComments=[];this.commentCounter=0;this.currentKey=-1},showComments:function(f,e){if(Object.size(f)-this.commentCounter-e<0||e===undefined){e=Object.size(f)-this.commentCounter}var b=this.commentCounter;for(i=Object.size(f)-b-1;i>=Object.size(f)-b-e;i--){this.commentCounter++;var d=(f[i]["text"]);d=this.filterCommentText(d);var g=(f[i]["from"]["username"]);var c=(f[i]["from"]["profile_picture"]);var a=jQuery('<div class="wdi_single_comment"></div>');a.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+g+'"><img style="height:25px;width:25px;border-radius:25px" src="'+c+'"> '+g+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(f[i]["created_time"])+"</span></p>"));a.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+d+"</p></span></div>"));jQuery("#wdi_added_comments").prepend(a)}this.updateScrollbar()},updateScrollbar:function(){var b=jQuery("#wdi_comments");var a=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments");jQuery(".wdi_comments").html("");jQuery(".wdi_comments").append(b);jQuery(".wdi_comments").append(a);jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){this.instagram.getRecentMediaComments(this.media_id,{success:function(a){if(a==""||a==undefined||a==null){errorMessage="Network Error, please try again later :(";wdi_front.show_alert(errorMessage);return}if(a.meta["code"]!=200){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage);return}wdi_comments_manager.mediaComments=a.data;var b=wdi_data[wdi_comments_manager.currentKey];b.comments_data=a.data;wdi_comments_manager.showComments(b.comments_data,wdi_comments_manager.load_more_count);wdi_comments_manager.ajax_comments_ready(a.data)}})},ajax_comments_ready:function(a){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>'));jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove();wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count);wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(d){var c=d.split(" ");var b="";for(var a=0;a<c.length;a++){switch(c[a][0]){case"@":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;case"#":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;default:b+=c[a]+" "}}b=b.substring(0,b.length-1);return b}};function wdi_spider_set_input_value(b,a){if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_spider_check_required(b,a){if(jQuery("#"+b).val()==""){wdi_front.show_alert(a+"* "+wdi_objectL10n.wdi_field_required);jQuery("#"+b).attr("style","border-color: #FF0000;");jQuery("#"+b).focus();return true}else{return false}}function wdi_spider_check_email(b){if(jQuery("#"+b).val()!=""){var a=jQuery("#"+b).val().replace(/^\s+|\s+$/g,"");if(a.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)==-1){wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation);return true}return false}}function wdi_captcha_refresh(a){if(document.getElementById(a+"_img")&&document.getElementById(a+"_input")){srcArr=document.getElementById(a+"_img").src.split("&r=");document.getElementById(a+"_img").src=srcArr[0]+"&r="+Math.floor(Math.random()*100);document.getElementById(a+"_img").style.display="inline-block";document.getElementById(a+"_input").value=""}}function wdi_play_pause(d){var c=d.get(0);var b=/firefox/i;var a=false;if(navigator.userAgent.match(b)){a=true}if(!a){if(!c.paused){c.pause()}else{c.play()}}}function wdi_spider_display_embed(m,n,j,g){var b="";switch(m){case"EMBED_OEMBED_YOUTUBE_VIDEO":var k="<iframe ";if(n!=""){k+=' src="//www.youtube.com/embed/'+n+'?enablejsapi=1&wmode=transparent"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){k+=" "+attr+'="'+j[attr]+'"'}}}k+=" ></iframe>";b+=k;break;case"EMBED_OEMBED_VIMEO_VIDEO":var f="<iframe ";if(n!=""){f+=' src="//player.vimeo.com/video/'+n+'?enablejsapi=1"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){f+=" "+attr+'="'+j[attr]+'"'}}}f+=" ></iframe>";b+=f;break;case"EMBED_OEMBED_FLICKR_IMAGE":var d="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){d+=" "+attr+'="'+j[attr]+'"'}}}d+=" >";if(n!=""){d+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'}d+="</div>";b+=d;break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(n!=""){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+n+'" type="video/mp4"> Your browser does not support the video tag. </video>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(g!=null&&g.length){for(var c=0;c<g.length;c++){if(g[c]["type"]=="image"){e+='<img src="'+g[c]["images"]["standard_resolution"]["url"]+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;" data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'">'}else{if(g[c]["type"]=="video"){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'"><source src="'+g[c]["videos"]["standard_resolution"]["url"]+'" type="video/mp4"> Your browser does not support the video tag. </video>'}}}}else{if(n!=""){e+='<img src="//instagram.com/p/'+n+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'}}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_POST":var e="<div ";var a="";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"';if(attr=="CLASS"||attr=="class"||attr=="Class"){obj_class=j[attr]}}}}e+=" >";if(n!=""){e+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+n+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var l="<iframe ";if(n!=""){l+=' src="//www.dailymotion.com/embed/video/'+n+'?api=postMessage"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){l+=" "+attr+'="'+j[attr]+'"'}}}l+=" ></iframe>";b+=l;break;case"EMBED_OEMBED_IMGUR":var h="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}h+=" >";if(n!=""){h+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'}h+="</div>";b+=h;break;default:}return b}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(d){var a=["","-webkit-","-moz-","-ms-","-o-","-khtml-"];var c=["","Webkit","Moz","ms","O","Khtml"];var b=c.length;while(b--){if(typeof document.body.style[c[b]+d]!=="undefined"){return true}}return false}function wdi_cube(c,d,b,a,k,l,h,j,e,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(j,e,g)}if(!wdi_testBrowser_cssTransforms3d()){return wdi_fallback3d(j,e,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");jQuery(".wdi_slide_bg").css("perspective",1000);jQuery(j).css({transform:"translateZ("+c+"px)",backfaceVisibility:"hidden"});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+b+"px) translateX("+d+"px) rotateY("+k+"deg) rotateX("+a+"deg)"});jQuery(".wdi_slider").css({transform:"translateZ(-"+c+"px)",transformStyle:"preserve-3d"});setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+c+"px) rotateX("+l+"deg) rotateY("+h+"deg)"})},20);jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(f));function f(){jQuery(j).removeAttr("style");jQuery(e).removeAttr("style");jQuery(".wdi_slider").removeAttr("style");jQuery(j).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2});wdi_trans_in_progress=false;jQuery(j).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_cubeH(b,a,d){var c=jQuery(b).width()/2;if(d=="right"){wdi_cube(c,c,0,0,90,0,-90,b,a,d)}else{if(d=="left"){wdi_cube(c,-c,0,0,-90,0,90,b,a,d)}}}function wdi_cubeV(b,a,d){var c=jQuery(b).height()/2;if(d=="right"){wdi_cube(c,0,-c,90,0,-90,0,b,a,d)}else{if(d=="left"){wdi_cube(c,0,c,-90,0,90,0,b,a,d)}}}function wdi_fallback(b,a,c){wdi_fade(b,a,c)}function wdi_fallback3d(b,a,c){wdi_sliceV(b,a,c)}function wdi_none(b,a,c){jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}function wdi_fade(b,a,c){jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");if(wdi_testBrowser_cssTransitions()){jQuery(a).css("transition","opacity "+wdi_transition_duration+"ms linear");jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});wdi_change_watermark_container()}else{jQuery(b).animate({opacity:0,"z-index":1},wdi_transition_duration);jQuery(a).animate({opacity:1,"z-index":2},{duration:wdi_transition_duration,complete:function(){wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}});jQuery(b).fadeTo(wdi_transition_duration,0);jQuery(a).fadeTo(wdi_transition_duration,1)}}function wdi_grid(k,L,w,I,H,o,u,A,M,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(A,M,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");var F=(wdi_transition_duration)/(k+L);function x(P,Y,V,R,Q,X,O,W,U,T,j){var S=(T+j)*F;return jQuery('<span class="wdi_gridlet" />').css({display:"block",width:P,height:Y,top:V,left:Q,backgroundImage:'url("'+O+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:X+"px "+R+"px",backgroundSize:W+"px "+U+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+S+"ms",transform:"none"})}var v=jQuery(A).find("img");var D=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(A).prepend(D);var z=jQuery(".wdi_slide_bg");var n=v.width();var b=v.height();var C=z.width(),h=z.height(),q=Math.floor(C/k),e=Math.floor(h/L),d=C-(k*q),G=Math.ceil(d/k),p=h-(L*e),f=Math.ceil(p/L),t=0,y=Math.ceil((jQuery(".wdi_slide_bg").width()-v.width())/2);var E=typeof v.attr("src")=="undefined"?"":v.attr("src");I=I==="auto"?C:I;I=I==="min-auto"?-C:I;H=H==="auto"?h:H;H=H==="min-auto"?-h:H;for(var K=0;K<k;K++){var N=0,m=Math.floor((jQuery(".wdi_slide_bg").height()-v.height())/2),B=q;if(d>0){var c=d>=G?G:d;B+=c;d-=c}for(var J=0;J<L;J++){var r=e,s=p;if(s>0){c=s>=f?f:p;r+=c;s-=c}D.append(x(B,r,N,m,t,y,E,n,b,K,J));N+=r;m-=r}y-=B;t+=B}var a=D.children().last();D.show();v.css("opacity",0);D.children().first().addClass("rs-top-left");D.children().last().addClass("rs-bottom-right");D.children().eq(L-1).addClass("rs-bottom-left");D.children().eq(-L).addClass("rs-top-right");setTimeout(function(){D.children().css({opacity:u,transform:"rotate("+w+"deg) translateX("+I+"px) translateY("+H+"px) scale("+o+")"})},1);jQuery(M).css("opacity",1);jQuery(a).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(l));function l(){jQuery(A).css({opacity:0,"z-index":1});jQuery(M).css({opacity:1,"z-index":2});v.css("opacity",1);D.remove();wdi_trans_in_progress=false;jQuery(A).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_sliceH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,8,0,d,0,1,0,b,a,c)}function wdi_sliceV(b,a,d){if(d=="right"){var c="min-auto"}else{if(d=="left"){var c="auto"}}wdi_grid(10,1,0,0,c,1,0,b,a,d)}function wdi_slideV(b,a,d){if(d=="right"){var c="auto"}else{if(d=="left"){var c="min-auto"}}wdi_grid(1,1,0,0,c,1,1,b,a,d)}function wdi_slideH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,1,0,d,0,1,1,b,a,c)}function wdi_scaleOut(b,a,c){wdi_grid(1,1,0,0,0,1.5,0,b,a,c)}function wdi_scaleIn(b,a,c){wdi_grid(1,1,0,0,0,0.5,0,b,a,c)}function wdi_blockScale(b,a,c){wdi_grid(8,6,0,0,0,0.6,0,b,a,c)}function wdi_kaleidoscope(b,a,c){wdi_grid(10,8,0,0,0,1,0,b,a,c)}function wdi_fan(b,a,d){if(d=="right"){var c=45;var e=100}else{if(d=="left"){var c=-45;var e=-100}}wdi_grid(1,10,c,e,0,1,0,b,a,d)}function wdi_blindV(b,a,c){wdi_grid(1,8,0,0,0,0.7,0,b,a)}function wdi_blindH(b,a,c){wdi_grid(10,1,0,0,0,0.7,0,b,a)}function wdi_random(c,b,d){var a=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["wdi_"+a[Math.floor(Math.random()*a.length)]](c,b,d)}function wdi_pause_stream(a){jQuery(a).find("video").each(function(){jQuery(this).get(0).pause()})}function wdi_reset_zoom(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var b=document.querySelector('meta[name="viewport"]');if(a){if(b){b.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0"}}};
|
js/wdi_admin.js
CHANGED
@@ -197,7 +197,6 @@ wdi_controller.switchFeedTabs = function(tabname, section) {
|
|
197 |
//showing only requested display_type tab elements
|
198 |
jQuery('.display_type[tab="' + tabname + '"]').css('display', 'block');
|
199 |
|
200 |
-
jQuery('.display_type[tab="' + tabname + '"]').css('display', 'block');
|
201 |
if(!jQuery('.display_type[tab="' + tabname + '"]').length){
|
202 |
jQuery('.display_type_content').hide();
|
203 |
} else {
|
@@ -1414,7 +1413,22 @@ function wdi_spider_form_submit(event, form_id) {
|
|
1414 |
}
|
1415 |
}
|
1416 |
|
1417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
|
1419 |
// Check all items.
|
1420 |
function wdi_spider_check_all_items() {
|
197 |
//showing only requested display_type tab elements
|
198 |
jQuery('.display_type[tab="' + tabname + '"]').css('display', 'block');
|
199 |
|
|
|
200 |
if(!jQuery('.display_type[tab="' + tabname + '"]').length){
|
201 |
jQuery('.display_type_content').hide();
|
202 |
} else {
|
1413 |
}
|
1414 |
}
|
1415 |
|
1416 |
+
function wdi_bulk_actions(that) {
|
1417 |
+
var action = jQuery(that).val();
|
1418 |
+
if (action != '') {
|
1419 |
+
if (action == 'delete_all') {
|
1420 |
+
if (!confirm(wdi_messages.do_you_want_to_delete_selected_items)) {
|
1421 |
+
return false;
|
1422 |
+
}
|
1423 |
+
}
|
1424 |
+
wdi_spider_set_input_value('task', action);
|
1425 |
+
jQuery('#sliders_form').submit();
|
1426 |
+
}
|
1427 |
+
else {
|
1428 |
+
return false;
|
1429 |
+
}
|
1430 |
+
return true;
|
1431 |
+
}
|
1432 |
|
1433 |
// Check all items.
|
1434 |
function wdi_spider_check_all_items() {
|
js/wdi_admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.searchForUsersByName(f,{success:function(m){var l=g.isValidResponse(m),k=g.findUser(f,m),n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}jQuery("#wdi_feed_thumb").attr("value",n);jQuery("#wdi_save_feed").submit()}})}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":this.instagram.searchForUsersByName(b,{success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=g.findUser(b,k);if(j.valid&&g.hasData(k)&&h){g.addUser(h);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
|
1 |
+
jQuery(document).ready(function(){wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.searchForUsersByName(f,{success:function(m){var l=g.isValidResponse(m),k=g.findUser(f,m),n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}jQuery("#wdi_feed_thumb").attr("value",n);jQuery("#wdi_save_feed").submit()}})}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":this.instagram.searchForUsersByName(b,{success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=g.findUser(b,k);if(j.valid&&g.hasData(k)&&h){g.addUser(h);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_bulk_actions(a){var b=jQuery(a).val();if(b!=""){if(b=="delete_all"){if(!confirm(wdi_messages.do_you_want_to_delete_selected_items)){return false}}wdi_spider_set_input_value("task",b);jQuery("#sliders_form").submit()}else{return false}return true}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
|
js/wdi_frontend.js
CHANGED
@@ -229,7 +229,7 @@ wdi_front.globalInit = function ()
|
|
229 |
//initializing function for lightbox
|
230 |
currentFeed.galleryBox = function (image_id)
|
231 |
{
|
232 |
-
wdi_spider_createpopup(wdi_url.ajax_url + '?gallery_id=' + this.feed_row['id'] + '&image_id=' + image_id, this.feed_row.wdi_feed_counter, this.feed_row['lightbox_width'], this.feed_row['lightbox_height'], 1, 'testpopup', 5, this);
|
233 |
}
|
234 |
//calling responive javascript
|
235 |
wdi_responsive.columnControl(currentFeed);
|
@@ -329,12 +329,15 @@ wdi_front.getFeedItemResolution = function (currentFeed) {
|
|
329 |
return {"image": "standard_resolution", "video": "standard_resolution"};
|
330 |
}
|
331 |
|
|
|
332 |
var container = jQuery("#wdi_feed_" + currentFeed.feed_row.wdi_feed_counter).find('.wdi_feed_wrapper');
|
333 |
container.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');
|
334 |
|
335 |
wdi_responsive.columnControl(currentFeed, 1);
|
336 |
var attr = container.attr('wdi-res').split('wdi_col_');
|
337 |
container.find('#wdi_feed_item_example').remove();
|
|
|
|
|
338 |
if(attr.length !== 2){
|
339 |
return defaultResolution;
|
340 |
}
|
@@ -2825,7 +2828,9 @@ wdi_front.parseLighboxData = function (currentFeed, filterFlag)
|
|
2825 |
'username': data[i]['user']['username'],
|
2826 |
'profile_picture': data[i]['user']['profile_picture'],
|
2827 |
'thumb_url': data[i]['link'] + 'media/?size=t',
|
2828 |
-
'comments_data': data[i]['comments']['data']
|
|
|
|
|
2829 |
}
|
2830 |
popupData.push(obj);
|
2831 |
}
|
229 |
//initializing function for lightbox
|
230 |
currentFeed.galleryBox = function (image_id)
|
231 |
{
|
232 |
+
wdi_spider_createpopup(wdi_url.ajax_url + '?gallery_id=' + this.feed_row['id'] + '&image_id=' + image_id, this.feed_row.wdi_feed_counter, this.feed_row['lightbox_width'], this.feed_row['lightbox_height'], 1, 'testpopup', 5, this, image_id);
|
233 |
}
|
234 |
//calling responive javascript
|
235 |
wdi_responsive.columnControl(currentFeed);
|
329 |
return {"image": "standard_resolution", "video": "standard_resolution"};
|
330 |
}
|
331 |
|
332 |
+
|
333 |
var container = jQuery("#wdi_feed_" + currentFeed.feed_row.wdi_feed_counter).find('.wdi_feed_wrapper');
|
334 |
container.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');
|
335 |
|
336 |
wdi_responsive.columnControl(currentFeed, 1);
|
337 |
var attr = container.attr('wdi-res').split('wdi_col_');
|
338 |
container.find('#wdi_feed_item_example').remove();
|
339 |
+
|
340 |
+
|
341 |
if(attr.length !== 2){
|
342 |
return defaultResolution;
|
343 |
}
|
2828 |
'username': data[i]['user']['username'],
|
2829 |
'profile_picture': data[i]['user']['profile_picture'],
|
2830 |
'thumb_url': data[i]['link'] + 'media/?size=t',
|
2831 |
+
'comments_data': data[i]['comments']['data'],
|
2832 |
+
'images': data[i]['images'],
|
2833 |
+
'carousel_media': (typeof data[i]['carousel_media'] !== "undefined") ? data[i]['carousel_media'] : null
|
2834 |
}
|
2835 |
popupData.push(obj);
|
2836 |
}
|
js/wdi_frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users);if(wdi_front.updateUsersIfNecessary(c)){return}}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getUserRecentMedia(a[d]["id"],{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:" ";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.getSliderTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-clone";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="fa-clone";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="slideshow" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.replaceToVideo=function(b,a,c){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+b+"' type='video/mp4'>Your browser does not support the video tag. </video>";jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner').html(overlayHtml);jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner video').get(0).play()};wdi_front.getVideoTemplate=function(h){var f=wdi_front.setPage(h);var k="";var l="";var n="fa-play";var m="";var d="";var e;var c="";if(f!=""){l='wdi_page="'+f+'"';e="src"}else{e="src"}if(f!=""&&f!=1){k="wdi_hidden"}if(h.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(h.feed_row.show_full_description==1&&h.feed_row.feed_type=="masonry"){k+=" wdi_full_caption"}var g="";if(h.feed_row.feed_type!=="blog_style"){if(h.feed_row.feed_type=="masonry"){g="wdi_responsive.showMasonryCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}else{g="wdi_responsive.showCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}}switch(h.feed_row.feed_item_onclick){case"lightbox":m="onclick=wdi_feed_"+h.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":m="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";n="fa-play";break;case"custom_redirect":m="onclick=\"window.open ('"+h.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";n="";break;case"none":d="wdi_cursor_off wdi_hover_off";n="";if(h.feed_row.feed_type=="blog_style"||h.feed_row.feed_type=="image_browser"){m="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+h.feed_row.wdi_feed_counter+")";d="";n="fa-play"}}var i="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=h.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+k+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+l+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+i+'"><img class="wdi_img" '+e+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" '+m+">"+c+'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+n+'"></i></div></div></div></div></div></div>';if(h.feed_row["show_likes"]==="1"||h.feed_row["show_comments"]==="1"||h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(h.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+g+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var j=_.template(a);return j};wdi_front.bindEvents=function(a){if(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}if(a.feed_row.feed_display_view=="load_more_btn"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))})}if(a.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(jQuery(this),a)});a.paginatorNextFlag=false}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(a)});a.infiniteScrollFlag=false}};wdi_front.infiniteScroll=function(a){if((jQuery(window).scrollTop()+jQuery(window).height()-100)>=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top){if(a.infiniteScrollFlag===false&&a.stopInfiniteScrollFlag==false){a.infiniteScrollFlag=true;wdi_front.loadMore(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),a)}else{if(a.stopInfiniteScrollFlag){wdi_front.allImagesLoaded(a)}}}};wdi_front.paginationFirstPage=function(b,c){if(c.paginator==1||c.currentPage==1){b.addClass("wdi_disabled");return}var d=c.currentPage;c.currentPage=1;wdi_front.updatePagination(c,"custom",d);var a=b.parent().find("#wdi_last_page");a.removeClass("wdi_disabled");b.addClass("wdi_disabled")};wdi_front.paginationLastPage=function(a,b){if(b.paginator==1||b.currentPage==b.paginator){return}var d=b.currentPage;b.currentPage=b.paginator;wdi_front.updatePagination(b,"custom",d);a.addClass("wdi_disabled");var c=a.parent().find("#wdi_first_page");c.removeClass("wdi_disabled")};wdi_front.paginatorNext=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");c.paginatorNextFlag=true;if(c.paginator==c.currentPage&&!wdi_front.checkFeedFinished(c)){c.currentPage++;var e=c.feed_row.number_of_photos;wdi_front.loadMore(b,c,e);a.addClass("wdi_disabled")}else{if(c.paginator>c.currentPage){c.currentPage++;wdi_front.updatePagination(c,"next");if(c.paginator>c.currentPage){a.removeClass("wdi_disabled")}else{a.addClass("wdi_disabled")}}}d.removeClass("wdi_disabled")};wdi_front.paginatorPrev=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");if(c.currentPage==1){d.addClass("wdi_disabled");return}c.currentPage--;wdi_front.updatePagination(c,"prev");a.removeClass("wdi_disabled");if(c.currentPage==1){d.addClass("wdi_disabled")}};wdi_front.updatePagination=function(b,a,d){var c="#wdi_feed_"+b.feed_row.wdi_feed_counter;jQuery(c+' [wdi_page="'+b.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")});switch(a){case"next":var d=b.currentPage-1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":var d=b.currentPage+1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":var d=d;if(d!=b.currentPage){jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")})}break}b.paginatorNextFlag=false;jQuery(c+" .wdi_feed_wrapper").css("height","auto");jQuery(c+" #wdi_current_page").text(b.currentPage)};wdi_front.loadMore=function(f,k){var b=0;if(f!=""&&typeof f!="undefined"&&f!="initial"&&f!="initial-keep"){var l=window[f.parent().parent().parent().parent().attr("id")]}if(typeof k!="undefined"){var l=k}var n=0,g=0;for(var e=0;e<l.userSortFlags.length;e++){if(l.userSortFlags[e].flag===true){n++;for(var d=0;d<l.usersData.length;d++){if(l.userSortFlags[e]["id"]===l.usersData[d]["user_id"]){if(l.usersData[d]["finished"]==="finished"){g++}}}}}if(n===g&&n!=0){return}if(f===""){l.auto_trigger=true}else{l.auto_trigger=false}wdi_front.ajaxLoader(l);if(l.feed_row.feed_type==="masonry"&&l.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)})}for(var e=0;e<l.usersData.length;e++){if(l.usersData[e]["finished"]==="finished"){b++}}if(b===l.usersData.length){wdi_front.allImagesLoaded(l);jQuery("#wdi_feed_"+l.feed_row["wdi_feed_counter"]+" .wdi_load_more").remove()}var h=l.usersData;l.loadMoreDataCount=l.feed_users.length;for(var e=0;e<h.length;e++){var m=h[e]["pagination"];var c={user_id:h[e]["user_id"],username:h[e]["username"]};if(m.next_url!=""&&m.next_url!=null&&typeof m.next_url!="undefined"){var a=m.next_url;wdi_front.loadMoreRequest(c,a,l,f)}else{if(f=="initial-keep"){l.temproraryUsersData[e]=l.usersData[e]}l.loadMoreDataCount--;wdi_front.checkForLoadMoreDone(l,f);continue}}};wdi_front.loadMoreRequest=function(b,a,e,d){if(!e.mediaRequestsDone){return}var f=e.usersData;var c="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getUserInfo(i.id,{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></span></p></div>'}else{e+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span></span></p></div>'}e+='<div class="wdi_clear"></div>';if(a==1&&h[0]!=="#"&&c.feed_row.display_user_info=="1"){e+='<div class="wdi_bio"><%= bio%></div>'}e+="</div></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"]};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage,a,b);return false}return a};wdi_front.stripHashtag=function(a){switch(a[0]){case"#":return a.substr(1,a.length);break;default:return a;break}};wdi_front.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_front.regexpTestCaption=function(h,e){var d=false,b=false,f=[],g=e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),c=new RegExp("(?:^|\\s)"+g+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+g,"g");if(c.exec(h)!=null){d=true}while((match=a.exec(h))!=null){if(match.index==h.length-e.length-1){b=true}}if(d==true||b==true){return true}else{return false}};wdi_front.replaceNewLines=function(c){var b="vUkCJvN2ps3t",a=[],g;c=c.replace(/\r?\n|\r/g,b);g=new RegExp(b,"g");while((match=g.exec(c))!=null){a.push(match.index)}var f=c.split(b);var e=0;for(var d=0;d<f.length;d++){if(f[d]==""){e++}else{e=0}if(e>0){f.splice(d,1);e--;d--}}c=f.join(" ");return c};wdi_front.isEmptyObject=function(a){for(var b in a){if(a.hasOwnProperty(b)){return false}}return true};var WDIFeed=function(a){this["data"]=a.data;this["dataCount"]=a.dataCount;this["feed_row"]=a.feed_row;this["usersData"]=a.usersData;_this=this;this.set_images_loading_flag=function(b){window.addEventListener("load",function(){b.nowLoadingImages=false})};this.set_images_loading_flag(_this)};WDIFeed.prototype.conditionalFilter=function(a,c){var d=this,b=d.feed_row.conditional_filter_type,e=d.feed_row.conditional_filters;if(c.ignoreFiltering==true){}else{a=this.avoidDuplicateMedia(a)}if(!wdi_front.isJsonString(e)){return a}else{e=JSON.parse(e);if(e.length==0){return a}}if(d.feed_row.conditional_filter_enable=="0"){return a}d.instagramRequestCounter++;switch(b){case"AND":a=this.applyANDLogic(a,e,d);break;case"OR":a=this.applyORLogic(a,e,d);break;case"NOR":a=this.applyNORLogic(a,e,d);break;default:break}return a};WDIFeed.prototype.applyANDLogic=function(a,d){var c=this;for(var b=0;b<d.length;b++){a=this.filterResponse(a,d[b])}return a};WDIFeed.prototype.applyORLogic=function(d,c){var h=this;var a=[],g,j=[],f,b;for(var e=0;e<c.length;e++){g=this.filterResponse(d,c[e]);a=a.concat(g.data);g={}}for(e=0;e<a.length;e++){b=a[e];if(!this.mediaExists(b,j)&&!this.mediaExists(b,h.dataStorageList)){j.push(b)}}f={data:j,meta:d.meta,pagination:d.pagination};return f};WDIFeed.prototype.applyNORLogic=function(c,h){var f=c,g=this,b=this.applyORLogic(c,h,g),d=[],a;for(var e=0;e<f.data.length;e++){if(!this.mediaExists(f.data[e],b.data)){d.push(f.data[e])}}a={data:d,meta:f.meta,pagination:f.pagination};return a};WDIFeed.prototype.mediaExists=function(b,c){for(var a=0;a<c.length;a++){if(b.id==c[a]["id"]){return true}}return false};WDIFeed.prototype.filterResponse=function(a,b){switch(b.filter_type){case"hashtag":return this.filterByHashtag(a,b);break;case"username":return this.filterByUsername(a,b);break;case"mention":return this.filterByMention(a,b);break;case"description":return this.filterByDescription(a,b);break;case"location":return this.filterByLocation(a,b);break;case"url":return this.filterByUrl(a,b);break}};WDIFeed.prototype.filterByHashtag=function(b,g){var d=[],f,h,a;for(var e=0;e<b.data.length;e++){h=b.data[e];for(var c=0;c<h.tags.length;c++){tag=h.tags[c];if(tag.toLowerCase()==g.filter_by.toLowerCase()){d.push(h)}}}a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUsername=function(b,e){var c=[],f,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.user.username.toLowerCase()==e.filter_by.toLowerCase()){c.push(f)}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByMention=function(b,e){var c=[],f,g,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.caption!==null){g=f.caption["text"].toLowerCase();if(g.indexOf("@"+e.filter_by.toLowerCase())!=-1){c.push(f)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByDescription=function(c,f){var d=[],g,h,b;for(var e=0;e<c.data.length;e++){g=c.data[e];if(g.caption!==null){h=g.caption["text"].toLowerCase();h=wdi_front.replaceNewLines(h);var a=f.filter_by.toLowerCase();if(wdi_front.regexpTestCaption(h,a)){d.push(g)}}}b={data:d,meta:c.meta,pagination:c.pagination};return b};WDIFeed.prototype.filterByLocation=function(b,f){var c=[],g,e,a;for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.location!==null){e=g.location["id"];if(e==f.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUrl=function(b,e){var c=[],g,h,a,f;e.filter_by=this.getIdFromUrl(e.filter_by);for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.link!==null){h=this.getIdFromUrl(g.link);if(h==e.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.getIdFromUrl=function(a){var c=a.split("/"),d=false;for(var b=0;b<c.length;b++){if(c[b]=="p"){if(typeof c[b+1]!="undefined"){d=c[b+1];break}}}return d};WDIFeed.prototype.avoidDuplicateMedia=function(b){var e=b.data,d=[],a={};if(typeof e=="undefined"){e=[]}for(var c=0;c<e.length;c++){if(!this.mediaExists(e[c],this.dataStorageList)&&!this.mediaExists(e[c],d)&&!this.mediaExists(e[c],this.conditionalFilterBuffer)){d.push(e[c])}}this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d);a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.storeRawData=function(c,a){var e=this;if(typeof this[a]=="object"&&typeof this[a].length=="number"){for(var b=0;b<c.length;b++){var d="";if(wdi_front.isHashtag(c[b].user_id)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})};
|
1 |
+
if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this,e)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users);if(wdi_front.updateUsersIfNecessary(c)){return}}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getUserRecentMedia(a[d]["id"],{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:" ";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.getSliderTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-clone";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="fa-clone";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="slideshow" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.replaceToVideo=function(b,a,c){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+b+"' type='video/mp4'>Your browser does not support the video tag. </video>";jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner').html(overlayHtml);jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner video').get(0).play()};wdi_front.getVideoTemplate=function(h){var f=wdi_front.setPage(h);var k="";var l="";var n="fa-play";var m="";var d="";var e;var c="";if(f!=""){l='wdi_page="'+f+'"';e="src"}else{e="src"}if(f!=""&&f!=1){k="wdi_hidden"}if(h.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(h.feed_row.show_full_description==1&&h.feed_row.feed_type=="masonry"){k+=" wdi_full_caption"}var g="";if(h.feed_row.feed_type!=="blog_style"){if(h.feed_row.feed_type=="masonry"){g="wdi_responsive.showMasonryCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}else{g="wdi_responsive.showCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}}switch(h.feed_row.feed_item_onclick){case"lightbox":m="onclick=wdi_feed_"+h.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":m="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";n="fa-play";break;case"custom_redirect":m="onclick=\"window.open ('"+h.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";n="";break;case"none":d="wdi_cursor_off wdi_hover_off";n="";if(h.feed_row.feed_type=="blog_style"||h.feed_row.feed_type=="image_browser"){m="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+h.feed_row.wdi_feed_counter+")";d="";n="fa-play"}}var i="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=h.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+k+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+l+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+i+'"><img class="wdi_img" '+e+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" '+m+">"+c+'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+n+'"></i></div></div></div></div></div></div>';if(h.feed_row["show_likes"]==="1"||h.feed_row["show_comments"]==="1"||h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(h.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+g+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var j=_.template(a);return j};wdi_front.bindEvents=function(a){if(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}if(a.feed_row.feed_display_view=="load_more_btn"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))})}if(a.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(jQuery(this),a)});a.paginatorNextFlag=false}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(a)});a.infiniteScrollFlag=false}};wdi_front.infiniteScroll=function(a){if((jQuery(window).scrollTop()+jQuery(window).height()-100)>=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top){if(a.infiniteScrollFlag===false&&a.stopInfiniteScrollFlag==false){a.infiniteScrollFlag=true;wdi_front.loadMore(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),a)}else{if(a.stopInfiniteScrollFlag){wdi_front.allImagesLoaded(a)}}}};wdi_front.paginationFirstPage=function(b,c){if(c.paginator==1||c.currentPage==1){b.addClass("wdi_disabled");return}var d=c.currentPage;c.currentPage=1;wdi_front.updatePagination(c,"custom",d);var a=b.parent().find("#wdi_last_page");a.removeClass("wdi_disabled");b.addClass("wdi_disabled")};wdi_front.paginationLastPage=function(a,b){if(b.paginator==1||b.currentPage==b.paginator){return}var d=b.currentPage;b.currentPage=b.paginator;wdi_front.updatePagination(b,"custom",d);a.addClass("wdi_disabled");var c=a.parent().find("#wdi_first_page");c.removeClass("wdi_disabled")};wdi_front.paginatorNext=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");c.paginatorNextFlag=true;if(c.paginator==c.currentPage&&!wdi_front.checkFeedFinished(c)){c.currentPage++;var e=c.feed_row.number_of_photos;wdi_front.loadMore(b,c,e);a.addClass("wdi_disabled")}else{if(c.paginator>c.currentPage){c.currentPage++;wdi_front.updatePagination(c,"next");if(c.paginator>c.currentPage){a.removeClass("wdi_disabled")}else{a.addClass("wdi_disabled")}}}d.removeClass("wdi_disabled")};wdi_front.paginatorPrev=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");if(c.currentPage==1){d.addClass("wdi_disabled");return}c.currentPage--;wdi_front.updatePagination(c,"prev");a.removeClass("wdi_disabled");if(c.currentPage==1){d.addClass("wdi_disabled")}};wdi_front.updatePagination=function(b,a,d){var c="#wdi_feed_"+b.feed_row.wdi_feed_counter;jQuery(c+' [wdi_page="'+b.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")});switch(a){case"next":var d=b.currentPage-1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":var d=b.currentPage+1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":var d=d;if(d!=b.currentPage){jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")})}break}b.paginatorNextFlag=false;jQuery(c+" .wdi_feed_wrapper").css("height","auto");jQuery(c+" #wdi_current_page").text(b.currentPage)};wdi_front.loadMore=function(f,k){var b=0;if(f!=""&&typeof f!="undefined"&&f!="initial"&&f!="initial-keep"){var l=window[f.parent().parent().parent().parent().attr("id")]}if(typeof k!="undefined"){var l=k}var n=0,g=0;for(var e=0;e<l.userSortFlags.length;e++){if(l.userSortFlags[e].flag===true){n++;for(var d=0;d<l.usersData.length;d++){if(l.userSortFlags[e]["id"]===l.usersData[d]["user_id"]){if(l.usersData[d]["finished"]==="finished"){g++}}}}}if(n===g&&n!=0){return}if(f===""){l.auto_trigger=true}else{l.auto_trigger=false}wdi_front.ajaxLoader(l);if(l.feed_row.feed_type==="masonry"&&l.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)})}for(var e=0;e<l.usersData.length;e++){if(l.usersData[e]["finished"]==="finished"){b++}}if(b===l.usersData.length){wdi_front.allImagesLoaded(l);jQuery("#wdi_feed_"+l.feed_row["wdi_feed_counter"]+" .wdi_load_more").remove()}var h=l.usersData;l.loadMoreDataCount=l.feed_users.length;for(var e=0;e<h.length;e++){var m=h[e]["pagination"];var c={user_id:h[e]["user_id"],username:h[e]["username"]};if(m.next_url!=""&&m.next_url!=null&&typeof m.next_url!="undefined"){var a=m.next_url;wdi_front.loadMoreRequest(c,a,l,f)}else{if(f=="initial-keep"){l.temproraryUsersData[e]=l.usersData[e]}l.loadMoreDataCount--;wdi_front.checkForLoadMoreDone(l,f);continue}}};wdi_front.loadMoreRequest=function(b,a,e,d){if(!e.mediaRequestsDone){return}var f=e.usersData;var c="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getUserInfo(i.id,{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></span></p></div>'}else{e+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span></span></p></div>'}e+='<div class="wdi_clear"></div>';if(a==1&&h[0]!=="#"&&c.feed_row.display_user_info=="1"){e+='<div class="wdi_bio"><%= bio%></div>'}e+="</div></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"],images:f[d]["images"],carousel_media:(typeof f[d]["carousel_media"]!=="undefined")?f[d]["carousel_media"]:null};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage,a,b);return false}return a};wdi_front.stripHashtag=function(a){switch(a[0]){case"#":return a.substr(1,a.length);break;default:return a;break}};wdi_front.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_front.regexpTestCaption=function(h,e){var d=false,b=false,f=[],g=e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),c=new RegExp("(?:^|\\s)"+g+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+g,"g");if(c.exec(h)!=null){d=true}while((match=a.exec(h))!=null){if(match.index==h.length-e.length-1){b=true}}if(d==true||b==true){return true}else{return false}};wdi_front.replaceNewLines=function(c){var b="vUkCJvN2ps3t",a=[],g;c=c.replace(/\r?\n|\r/g,b);g=new RegExp(b,"g");while((match=g.exec(c))!=null){a.push(match.index)}var f=c.split(b);var e=0;for(var d=0;d<f.length;d++){if(f[d]==""){e++}else{e=0}if(e>0){f.splice(d,1);e--;d--}}c=f.join(" ");return c};wdi_front.isEmptyObject=function(a){for(var b in a){if(a.hasOwnProperty(b)){return false}}return true};var WDIFeed=function(a){this["data"]=a.data;this["dataCount"]=a.dataCount;this["feed_row"]=a.feed_row;this["usersData"]=a.usersData;_this=this;this.set_images_loading_flag=function(b){window.addEventListener("load",function(){b.nowLoadingImages=false})};this.set_images_loading_flag(_this)};WDIFeed.prototype.conditionalFilter=function(a,c){var d=this,b=d.feed_row.conditional_filter_type,e=d.feed_row.conditional_filters;if(c.ignoreFiltering==true){}else{a=this.avoidDuplicateMedia(a)}if(!wdi_front.isJsonString(e)){return a}else{e=JSON.parse(e);if(e.length==0){return a}}if(d.feed_row.conditional_filter_enable=="0"){return a}d.instagramRequestCounter++;switch(b){case"AND":a=this.applyANDLogic(a,e,d);break;case"OR":a=this.applyORLogic(a,e,d);break;case"NOR":a=this.applyNORLogic(a,e,d);break;default:break}return a};WDIFeed.prototype.applyANDLogic=function(a,d){var c=this;for(var b=0;b<d.length;b++){a=this.filterResponse(a,d[b])}return a};WDIFeed.prototype.applyORLogic=function(d,c){var h=this;var a=[],g,j=[],f,b;for(var e=0;e<c.length;e++){g=this.filterResponse(d,c[e]);a=a.concat(g.data);g={}}for(e=0;e<a.length;e++){b=a[e];if(!this.mediaExists(b,j)&&!this.mediaExists(b,h.dataStorageList)){j.push(b)}}f={data:j,meta:d.meta,pagination:d.pagination};return f};WDIFeed.prototype.applyNORLogic=function(c,h){var f=c,g=this,b=this.applyORLogic(c,h,g),d=[],a;for(var e=0;e<f.data.length;e++){if(!this.mediaExists(f.data[e],b.data)){d.push(f.data[e])}}a={data:d,meta:f.meta,pagination:f.pagination};return a};WDIFeed.prototype.mediaExists=function(b,c){for(var a=0;a<c.length;a++){if(b.id==c[a]["id"]){return true}}return false};WDIFeed.prototype.filterResponse=function(a,b){switch(b.filter_type){case"hashtag":return this.filterByHashtag(a,b);break;case"username":return this.filterByUsername(a,b);break;case"mention":return this.filterByMention(a,b);break;case"description":return this.filterByDescription(a,b);break;case"location":return this.filterByLocation(a,b);break;case"url":return this.filterByUrl(a,b);break}};WDIFeed.prototype.filterByHashtag=function(b,g){var d=[],f,h,a;for(var e=0;e<b.data.length;e++){h=b.data[e];for(var c=0;c<h.tags.length;c++){tag=h.tags[c];if(tag.toLowerCase()==g.filter_by.toLowerCase()){d.push(h)}}}a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUsername=function(b,e){var c=[],f,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.user.username.toLowerCase()==e.filter_by.toLowerCase()){c.push(f)}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByMention=function(b,e){var c=[],f,g,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.caption!==null){g=f.caption["text"].toLowerCase();if(g.indexOf("@"+e.filter_by.toLowerCase())!=-1){c.push(f)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByDescription=function(c,f){var d=[],g,h,b;for(var e=0;e<c.data.length;e++){g=c.data[e];if(g.caption!==null){h=g.caption["text"].toLowerCase();h=wdi_front.replaceNewLines(h);var a=f.filter_by.toLowerCase();if(wdi_front.regexpTestCaption(h,a)){d.push(g)}}}b={data:d,meta:c.meta,pagination:c.pagination};return b};WDIFeed.prototype.filterByLocation=function(b,f){var c=[],g,e,a;for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.location!==null){e=g.location["id"];if(e==f.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUrl=function(b,e){var c=[],g,h,a,f;e.filter_by=this.getIdFromUrl(e.filter_by);for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.link!==null){h=this.getIdFromUrl(g.link);if(h==e.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.getIdFromUrl=function(a){var c=a.split("/"),d=false;for(var b=0;b<c.length;b++){if(c[b]=="p"){if(typeof c[b+1]!="undefined"){d=c[b+1];break}}}return d};WDIFeed.prototype.avoidDuplicateMedia=function(b){var e=b.data,d=[],a={};if(typeof e=="undefined"){e=[]}for(var c=0;c<e.length;c++){if(!this.mediaExists(e[c],this.dataStorageList)&&!this.mediaExists(e[c],d)&&!this.mediaExists(e[c],this.conditionalFilterBuffer)){d.push(e[c])}}this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d);a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.storeRawData=function(c,a){var e=this;if(typeof this[a]=="object"&&typeof this[a].length=="number"){for(var b=0;b<c.length;b++){var d="";if(wdi_front.isHashtag(c[b].user_id)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})};
|
readme.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
=== Instagram Feed
|
2 |
-
Contributors: webdorado,
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Instagram Feed
|
12 |
|
13 |
== Description ==
|
14 |
|
@@ -21,8 +21,8 @@ https://www.youtube.com/watch?v=KU4LJFxw0BY
|
|
21 |
[User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
|
22 |
|
23 |
|
24 |
-
Instagram Feed
|
25 |
-
Instagram Feed
|
26 |
|
27 |
|
28 |
== Benefits ==
|
@@ -32,8 +32,8 @@ Instagram Feed WD is a perfect fit for bloggers, photography websites, travel an
|
|
32 |
* **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website’s overall look and feel.
|
33 |
* **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed.Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
|
34 |
* **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that’s user-friendly and simple in use.
|
35 |
-
* **Support** -
|
36 |
-
* **Resource efficient** -
|
37 |
|
38 |
|
39 |
|
@@ -49,24 +49,24 @@ Create Instagram galleries on your website by embedding entire timelines to your
|
|
49 |
You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from public Instagram accounts and single hashtag. Mixed feeds, on the other hand can contain multiple public Instagram accounts and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
|
50 |
|
51 |
= FILTERED FEEDS =
|
52 |
-
Use Conditional Filters of the Instagram Feed
|
53 |
|
54 |
= INSTAGRAM WIDGET =
|
55 |
Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
|
56 |
|
57 |
= LIGHTBOX =
|
58 |
-
Instagram Feed
|
59 |
|
60 |
= SCROLL AND PAGINATION =
|
61 |
The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
|
62 |
|
63 |
= THEMES =
|
64 |
-
Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. Instagram Feed
|
65 |
|
66 |
= SETTINGS/CUSTOMIZATION =
|
67 |
|
68 |
*Some customizations described here are available in Premium version. Please refer to feature summary for additional info.
|
69 |
-
Instagram Feed
|
70 |
|
71 |
|
72 |
[Premium version adds](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
|
@@ -87,32 +87,32 @@ Instagram Feed WD comes with extensive customization options for the feeds, layo
|
|
87 |
* Conditional Filters
|
88 |
|
89 |
###IMPORTANT:
|
90 |
-
If you think you found a bug in Instagram Feed
|
91 |
|
92 |
== Installation ==
|
93 |
|
94 |
-
#### Thank you for your interest in Instagram Feed
|
95 |
|
96 |
-
Here are two ways of installing Instagram Feed
|
97 |
|
98 |
**Installing via WordPress**
|
99 |
|
100 |
Login to the WordPress Administrator Panel.
|
101 |
Go to Plugins> Add New>Upload.
|
102 |
-
Click Choose file button and select the zip folder of Instagram Feed
|
103 |
Click Activate button.
|
104 |
|
105 |
**Installing via FTP**
|
106 |
|
107 |
Login to your hosting space via an FTP software, e.g. FileZilla.
|
108 |
-
Unzip the downloaded Instagram Feed
|
109 |
Upload the Instagram plugin into the following location wp-content>wp-plugins.
|
110 |
Login to the WordPress Administrator Panel.
|
111 |
-
Activate Instagram Feed
|
112 |
|
113 |
**Creating an Instagram Feed**
|
114 |
|
115 |
-
Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin.Go to Instagram Feed
|
116 |
Create an Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
|
117 |
|
118 |
|
@@ -126,7 +126,7 @@ Reset access token and username button resets default user data in plugin. Use t
|
|
126 |
|
127 |
= 2. Can I display more than one Instagram feeds on my website? =
|
128 |
|
129 |
-
Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages. Add the Instagram feeds to posts and pages by using the shortcode provided or choosing from the list by clicking on the Instagram Feed
|
130 |
|
131 |
= 3. Can I create mixed Instagram feeds with multiple Instagram accounts or hashtags? =
|
132 |
|
@@ -134,13 +134,13 @@ This option is available in Premium version. There, you can create mixed Instagr
|
|
134 |
|
135 |
= 4. I see an invalid access Token error. What should I do? =
|
136 |
|
137 |
-
If you are seeing this alert message on your Instagram Feed
|
138 |
-
Please sign in to your Instagram account and get a new token. Add it to Instagram Feed
|
139 |
and sign in again from Settings page.
|
140 |
|
141 |
= 5. I would like to display only the Instagram posts which have a certain hashtags. How can this be done? =
|
142 |
|
143 |
-
You can definitely do this with premium version! Please, go to the Instagram Feed
|
144 |
Conditional filters are used in cases if you want to insert filtered Instagram feeds of certain user(s) or hashtag(s). Conditional filters can be used for both displaying or skipping certain images. Filters are also applicable to mixed Instagram feeds. This is a a good way to display Instagram stream content that your users are most interested in to scroll through.
|
145 |
Enabling the option you will be able to add condition to the Instagram feed.
|
146 |
**Source of filtering.** When creating an Instagram feed you provide username(s) and/or hashtag(s). All provided usernames and/or hashtags will be used as initial source. Filters will be applied to Instagram feed generated on this selection.
|
@@ -163,11 +163,11 @@ You can publish Instagram Feed in a post/page, as a widget or using php function
|
|
163 |
**Publishing Instagram Feed in a Page/Post**
|
164 |
To use the created Instagram feeds within a page or post you should use shortcode. Open the page/post from the back end. Press on the Add Instagram Feed button within the editor. Then select the Instagram feed and press Insert button.
|
165 |
|
166 |
-
An alternative will be copying the shortcode from Instagram Feed
|
167 |
|
168 |
**Publishing Instagram Feed as a Widget**
|
169 |
Go to Appearance > Widgets toolbar.
|
170 |
-
Find Instagram Feed
|
171 |
Title. Provide a title for your Instagram Feed.
|
172 |
Feed. Select the Instagram social feed which will be displayed as a widget.
|
173 |
Number of Columns. Set the number of Instagram image columns (for thumbnail and masonry view).
|
@@ -178,7 +178,7 @@ Show Likes and Comments. Check the box to display Instagram likes and comments b
|
|
178 |
It is also possible to insert the created Instagram feeds into the theme by calling it with PHP function. This feature is commonly used for adding the code to header.php for displaying Instagram feeds within header or footer position of the website. You can find the function located in Instagram Feed>Feeds section under PHP function column.
|
179 |
|
180 |
= 7. Is it possible to change the Instagram Feed themes to match my website? =
|
181 |
-
This is possible in Premium version. You can customize the Instagram plugin to better fit your website design. By default Instagram Feed
|
182 |
**General.** Here you can add a theme title, change feed container and feed wrapper colors and styles.
|
183 |
**Feed Header.** Edit styling of Instagram feed header(title and feed thumb)
|
184 |
**User data.** Edit colors and styles of elements in users/hashtags section: usernames, profile images, bio text, number of posts and followers, follow button.
|
@@ -189,7 +189,7 @@ This is possible in Premium version. You can customize the Instagram plugin to b
|
|
189 |
**Image Browser.** Change Image Browser image and wrapper styles, image caption colors, comments and likes styles.
|
190 |
|
191 |
= 8. How do I change the layout of my Instagram Feed? =
|
192 |
-
Go to Instagram Feed
|
193 |
Create a Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
|
194 |
|
195 |
**Thumbnails and Masonry Layouts**
|
@@ -323,14 +323,21 @@ Hashtag. Useful when you have an Instagram feed based on usernames. It will allo
|
|
323 |
**Result.** Here you will see all of the added filters which will be applied to your Instagram feed.
|
324 |
== Screenshots ==
|
325 |
|
326 |
-
1. WordPress Instagram Feed
|
327 |
-
2. WordPress Instagram Feed
|
328 |
-
3. WordPress Instagram Feed
|
329 |
-
4. WordPress Instagram Feed
|
330 |
-
5. WordPress Instagram Feed
|
331 |
|
332 |
== Changelog ==
|
333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
= 1.2.15 =
|
335 |
Added: "How to publish feed" tab in feeds editor screen
|
336 |
Added: Closeable metaboxes in feeds editor screen
|
@@ -380,7 +387,7 @@ Change: Introduction of Backup WD plugin
|
|
380 |
Change: "create_function" is not used anymore
|
381 |
|
382 |
= 1.2.4 =
|
383 |
-
Fixed: Instagram Feed
|
384 |
|
385 |
= 1.2.3 =
|
386 |
Change: WD library updated to version 1.0.11
|
@@ -528,7 +535,7 @@ Changed: Check and get user id on frontend if empty for some unknown reason
|
|
528 |
Fixed: Bug when duplicating feeds
|
529 |
|
530 |
= 1.1.0 =
|
531 |
-
**IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your Instagram Feed
|
532 |
new: Instagram new API
|
533 |
new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
|
534 |
|
1 |
+
=== WD Instagram Feed - Instagram Gallery ===
|
2 |
+
Contributors: webdorado,10web,progmastery
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.2.16
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
WD Instagram Feed is a user-friendly plugin to display user or hashtag-based Instagram feeds as a responsive customizable gallery.
|
12 |
|
13 |
== Description ==
|
14 |
|
21 |
[User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
|
22 |
|
23 |
|
24 |
+
WD Instagram Feed is a user-friendly WordPress plugin that can help you bring Instagram feeds with all the media to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. WD Instagram Feed’s settings and features will allow you to take full control over how to display the feeds and the content on your website.
|
25 |
+
WD Instagram Feed is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from Instagram. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
|
26 |
|
27 |
|
28 |
== Benefits ==
|
32 |
* **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website’s overall look and feel.
|
33 |
* **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed.Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
|
34 |
* **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that’s user-friendly and simple in use.
|
35 |
+
* **Support** - The team behind WD Instagram Feed provides timely and effective support to all its users. We keep standards high and response time low.
|
36 |
+
* **Resource efficient** - WordPress WD Instagram Feed plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
|
37 |
|
38 |
|
39 |
|
49 |
You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from public Instagram accounts and single hashtag. Mixed feeds, on the other hand can contain multiple public Instagram accounts and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
|
50 |
|
51 |
= FILTERED FEEDS =
|
52 |
+
Use Conditional Filters of the WD Instagram Feed plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
|
53 |
|
54 |
= INSTAGRAM WIDGET =
|
55 |
Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
|
56 |
|
57 |
= LIGHTBOX =
|
58 |
+
WD Instagram Feed features a powerful lightbox. It provides support for HTML5 video,15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
|
59 |
|
60 |
= SCROLL AND PAGINATION =
|
61 |
The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
|
62 |
|
63 |
= THEMES =
|
64 |
+
Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. WD Instagram Feed allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
|
65 |
|
66 |
= SETTINGS/CUSTOMIZATION =
|
67 |
|
68 |
*Some customizations described here are available in Premium version. Please refer to feature summary for additional info.
|
69 |
+
WD Instagram Feed comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes,comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable “Follow on Instagram” button from the feed settings and let your visitors to follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings,as well as the number of the loading images.
|
70 |
|
71 |
|
72 |
[Premium version adds](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
|
87 |
* Conditional Filters
|
88 |
|
89 |
###IMPORTANT:
|
90 |
+
If you think you found a bug in WD Instagram Feed or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed) . Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://web-dorado.com/support/contact-us.html).
|
91 |
|
92 |
== Installation ==
|
93 |
|
94 |
+
#### Thank you for your interest in WD Instagram Feed.
|
95 |
|
96 |
+
Here are two ways of installing WD Instagram Feed: via WordPress backend and via FTP. Let’s discuss each case individually:
|
97 |
|
98 |
**Installing via WordPress**
|
99 |
|
100 |
Login to the WordPress Administrator Panel.
|
101 |
Go to Plugins> Add New>Upload.
|
102 |
+
Click Choose file button and select the zip folder of WD Instagram Feed plugin and press Install now button.
|
103 |
Click Activate button.
|
104 |
|
105 |
**Installing via FTP**
|
106 |
|
107 |
Login to your hosting space via an FTP software, e.g. FileZilla.
|
108 |
+
Unzip the downloaded WD Instagram Feed plugin folder without making any changes to the folder.
|
109 |
Upload the Instagram plugin into the following location wp-content>wp-plugins.
|
110 |
Login to the WordPress Administrator Panel.
|
111 |
+
Activate WD Instagram Feed by going to Plugins and pressing Activate button.
|
112 |
|
113 |
**Creating an Instagram Feed**
|
114 |
|
115 |
+
Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin.Go to WD Instagram Feed > Feed and press Add New. Here you can choose Instagram feed layout and manage lightbox options.From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries,pictures,Instagram gallery, and videos of this social network are displayed within the lightbox. You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you’ll need to adjust the lightbox and image display settings.Lightbox works great with Instagram touch.The feed will be automatically updated once users share Instagram new images.The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
|
116 |
Create an Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
|
117 |
|
118 |
|
126 |
|
127 |
= 2. Can I display more than one Instagram feeds on my website? =
|
128 |
|
129 |
+
Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages. Add the Instagram feeds to posts and pages by using the shortcode provided or choosing from the list by clicking on the WD Instagram Feed button.
|
130 |
|
131 |
= 3. Can I create mixed Instagram feeds with multiple Instagram accounts or hashtags? =
|
132 |
|
134 |
|
135 |
= 4. I see an invalid access Token error. What should I do? =
|
136 |
|
137 |
+
If you are seeing this alert message on your WD Instagram Feed plugin, please note, that Instagram access tokens expire from time to time. Therefore you need to get new from your Instagram account again.
|
138 |
+
Please sign in to your Instagram account and get a new token. Add it to WD Instagram Feed > Settings page, and if the token will still cause "Invalid access token" error, revoke access for the plugin here: www.instagram.com/accounts/manage_access/
|
139 |
and sign in again from Settings page.
|
140 |
|
141 |
= 5. I would like to display only the Instagram posts which have a certain hashtags. How can this be done? =
|
142 |
|
143 |
+
You can definitely do this with premium version! Please, go to the WD Instagram Feed > Feeds > Conditional Filters configure the settings by changing the “Filter Logic” and “Add Condition” options
|
144 |
Conditional filters are used in cases if you want to insert filtered Instagram feeds of certain user(s) or hashtag(s). Conditional filters can be used for both displaying or skipping certain images. Filters are also applicable to mixed Instagram feeds. This is a a good way to display Instagram stream content that your users are most interested in to scroll through.
|
145 |
Enabling the option you will be able to add condition to the Instagram feed.
|
146 |
**Source of filtering.** When creating an Instagram feed you provide username(s) and/or hashtag(s). All provided usernames and/or hashtags will be used as initial source. Filters will be applied to Instagram feed generated on this selection.
|
163 |
**Publishing Instagram Feed in a Page/Post**
|
164 |
To use the created Instagram feeds within a page or post you should use shortcode. Open the page/post from the back end. Press on the Add Instagram Feed button within the editor. Then select the Instagram feed and press Insert button.
|
165 |
|
166 |
+
An alternative will be copying the shortcode from WD Instagram Feed> Feeds toolbar and pasting it within post/page.
|
167 |
|
168 |
**Publishing Instagram Feed as a Widget**
|
169 |
Go to Appearance > Widgets toolbar.
|
170 |
+
Find WD Instagram Feed widget and assign it to a custom widget position on your site’s sidebar. Fill in the details below:
|
171 |
Title. Provide a title for your Instagram Feed.
|
172 |
Feed. Select the Instagram social feed which will be displayed as a widget.
|
173 |
Number of Columns. Set the number of Instagram image columns (for thumbnail and masonry view).
|
178 |
It is also possible to insert the created Instagram feeds into the theme by calling it with PHP function. This feature is commonly used for adding the code to header.php for displaying Instagram feeds within header or footer position of the website. You can find the function located in Instagram Feed>Feeds section under PHP function column.
|
179 |
|
180 |
= 7. Is it possible to change the Instagram Feed themes to match my website? =
|
181 |
+
This is possible in Premium version. You can customize the Instagram plugin to better fit your website design. By default WD Instagram Feed comes with two default themes- Instagram and Elegant. You can use one of them or create your own theme. Newly created theme will be based on Default theme.
|
182 |
**General.** Here you can add a theme title, change feed container and feed wrapper colors and styles.
|
183 |
**Feed Header.** Edit styling of Instagram feed header(title and feed thumb)
|
184 |
**User data.** Edit colors and styles of elements in users/hashtags section: usernames, profile images, bio text, number of posts and followers, follow button.
|
189 |
**Image Browser.** Change Image Browser image and wrapper styles, image caption colors, comments and likes styles.
|
190 |
|
191 |
= 8. How do I change the layout of my Instagram Feed? =
|
192 |
+
Go to WD Instagram Feed > Feed and press Add New. Here you can choose the feed layout and manage lightbox options.
|
193 |
Create a Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
|
194 |
|
195 |
**Thumbnails and Masonry Layouts**
|
323 |
**Result.** Here you will see all of the added filters which will be applied to your Instagram feed.
|
324 |
== Screenshots ==
|
325 |
|
326 |
+
1. WordPress WD Instagram Feed - Thumbnail layout
|
327 |
+
2. WordPress WD Instagram Feed - Image browser layout
|
328 |
+
3. WordPress WD Instagram Feed - Lightbox
|
329 |
+
4. WordPress WD Instagram Feed - Edit Instagram Feed
|
330 |
+
5. WordPress WD Instagram Feed - Theme Settings
|
331 |
|
332 |
== Changelog ==
|
333 |
|
334 |
+
= 1.2.16 =
|
335 |
+
New: Instagram slideshow is supported in popup
|
336 |
+
New: UX of feeds and themes admin screen, it is now similar to posts list screen
|
337 |
+
New: Inline actions for feeds and themes in admin list view
|
338 |
+
Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching
|
339 |
+
Improved: Popup is faster now and less data is being sent via AJAX
|
340 |
+
|
341 |
= 1.2.15 =
|
342 |
Added: "How to publish feed" tab in feeds editor screen
|
343 |
Added: Closeable metaboxes in feeds editor screen
|
387 |
Change: "create_function" is not used anymore
|
388 |
|
389 |
= 1.2.4 =
|
390 |
+
Fixed: WD Instagram Feed compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
|
391 |
|
392 |
= 1.2.3 =
|
393 |
Change: WD library updated to version 1.0.11
|
535 |
Fixed: Bug when duplicating feeds
|
536 |
|
537 |
= 1.1.0 =
|
538 |
+
**IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your WD Instagram Feed plugin functioning after June 1.**
|
539 |
new: Instagram new API
|
540 |
new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
|
541 |
|
wd-instagram-feed.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Instagram Feed
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
|
5 |
Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
|
6 |
-
Version: 1.2.
|
7 |
Author: WebDorado
|
8 |
Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
License: GPLv2 or later
|
@@ -21,7 +21,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
|
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE','wdi_feeds');
|
23 |
define('WDI_THEME_TABLE','wdi_themes');
|
24 |
-
define('WDI_VERSION','1.2.
|
25 |
define('WDI_IS_PRO','false');
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
27 |
define('WDI_MINIFY', $wdi_minify);
|
@@ -380,9 +380,9 @@ function wdi_load_scripts($hook){
|
|
380 |
'invalid_hashtag' => __('Invalid hashtag', "wd-instagram-feed"),
|
381 |
'hashtag_no_data' => __('This hashtag currently has no posts. Are you sure you want to add it?','wd-instagram-feed'),
|
382 |
'only_one_user_or_hashtag'=> __('You can add only one username or hashtag in FREE Version', "wd-instagram-feed"),
|
383 |
-
'available_in_pro' => __('Available in
|
384 |
-
'username_hashtag_multiple' => __('Combined Usernames/Hashtags are available only in
|
385 |
-
'theme_save_message_free' => __('Customizing Themes is available only in
|
386 |
'invalid_url' => __('URL is not valid','wd-instagram-feed'),
|
387 |
'selectConditionType' => __('Please Select Condition Type','wd-instagram-feed'),
|
388 |
'and_descr' => __('Show Posts Which Have All Of The Conditions','wd-instagram-feed'),
|
@@ -393,7 +393,9 @@ function wdi_load_scripts($hook){
|
|
393 |
'not' => __('EXCEPT','wd-instagram-feed'),
|
394 |
'and' => __('AND','wd-instagram-feed'),
|
395 |
'or' => __('OR','wd-instagram-feed'),
|
396 |
-
'nor' => __('NOR','wd-instagram-feed')
|
|
|
|
|
397 |
));
|
398 |
wp_localize_script("wdi_admin", 'wdi_url',array('plugin_url'=> WDI_URL . '/'));
|
399 |
wp_localize_script("wdi_admin", 'wdi_admin',array('admin_url' =>get_admin_url()));
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: WD Instagram Feed
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
|
5 |
Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
|
6 |
+
Version: 1.2.16
|
7 |
Author: WebDorado
|
8 |
Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
License: GPLv2 or later
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE','wdi_feeds');
|
23 |
define('WDI_THEME_TABLE','wdi_themes');
|
24 |
+
define('WDI_VERSION','1.2.16');
|
25 |
define('WDI_IS_PRO','false');
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
27 |
define('WDI_MINIFY', $wdi_minify);
|
380 |
'invalid_hashtag' => __('Invalid hashtag', "wd-instagram-feed"),
|
381 |
'hashtag_no_data' => __('This hashtag currently has no posts. Are you sure you want to add it?','wd-instagram-feed'),
|
382 |
'only_one_user_or_hashtag'=> __('You can add only one username or hashtag in FREE Version', "wd-instagram-feed"),
|
383 |
+
'available_in_pro' => __('Available in Premium','wd-instagram-feed'),
|
384 |
+
'username_hashtag_multiple' => __('Combined Usernames/Hashtags are available only in Premium version'),
|
385 |
+
'theme_save_message_free' => __('Customizing Themes is available only in Premium version','wd-instagram-feed'),
|
386 |
'invalid_url' => __('URL is not valid','wd-instagram-feed'),
|
387 |
'selectConditionType' => __('Please Select Condition Type','wd-instagram-feed'),
|
388 |
'and_descr' => __('Show Posts Which Have All Of The Conditions','wd-instagram-feed'),
|
393 |
'not' => __('EXCEPT','wd-instagram-feed'),
|
394 |
'and' => __('AND','wd-instagram-feed'),
|
395 |
'or' => __('OR','wd-instagram-feed'),
|
396 |
+
'nor' => __('NOR','wd-instagram-feed'),
|
397 |
+
'do_you_want_to_delete_selected_items' => __('Do you want to delete selected items?', 'wd-instagram-feed'),
|
398 |
+
|
399 |
));
|
400 |
wp_localize_script("wdi_admin", 'wdi_url',array('plugin_url'=> WDI_URL . '/'));
|
401 |
wp_localize_script("wdi_admin", 'wdi_admin',array('admin_url' =>get_admin_url()));
|
wd/includes/deactivate.php
CHANGED
@@ -44,7 +44,7 @@
|
|
44 |
),
|
45 |
4 => array(
|
46 |
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
47 |
-
'text' => __( 'Upgrading to
|
48 |
),
|
49 |
5 => array(
|
50 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
44 |
),
|
45 |
4 => array(
|
46 |
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
47 |
+
'text' => __( 'Upgrading to premium version', $wd_options->prefix ),
|
48 |
),
|
49 |
5 => array(
|
50 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|