WP Photo Album Plus - Version 6.9.02

Version Description

  • This version addresses various minor bug fixes and feature requests.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 6.9.02
Comparing to
See all releases

Code changes from version 6.9.01 to 6.9.02

changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 6.9.01 =
4
 
5
  = Bug Fixes =
1
  WP Photo Album Plus Changelog
2
 
3
+ = 6.9.02 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * Fixed aspect ratio of images in comment admin.
8
+ * Usernames apeared at photos rather than display names. Fixed.
9
+ * If no download link specified and Domain links BuddyPress was active, a pseudocode was shown instead of the domain link under the slideshow. Fixed.
10
+
11
+ = New Features =
12
+
13
+ * New shortcode [wppa_div][/wppa_div]. Places a div. Attributes: style="" and class="". Default: style="clear:both;position:relative;"
14
+ * Selectable spinner image. Works only with svg (Table II-J12).
15
+
16
  = 6.9.01 =
17
 
18
  = Bug Fixes =
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.8.08
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -159,10 +159,8 @@ function wppaInitSettings() {
159
  wppaCheckLinkPageErr('super_view');
160
  wppaCheckSplitNamedesc();
161
  wppaCheckShares();
162
- // wppaCheckKeepSource();
163
  wppaCheckCoverType();
164
  wppaCheckNewpag();
165
- // wppaCheckIndexSearch();
166
  wppaCheckCDN();
167
  wppaCheckAutoPage();
168
  wppaCheckGps();
@@ -224,13 +222,8 @@ function wppaQuickSel() {
224
  wppa_tablecookieoff(tab[table-1]+'-'+sub[subtab]);
225
  }
226
  }
227
- // wppaToggleSubTable('X','Z');
228
- // wppaToggleSubTable('XI','Z');
229
- // wppaToggleSubTable('VII','A');
230
  }
231
 
232
- // jQuery( '.subtableheader' ).css('display')=='none');
233
-
234
  // Find tags
235
  tag1 = jQuery("#wppa-quick-selbox-1").val();
236
  tag2 = jQuery("#wppa-quick-selbox-2").val();
@@ -340,11 +333,6 @@ function wppaCheckSlideVideoControls() {
340
  return;
341
  }
342
 
343
- // var on = document.getElementById( 'start_slide_video' ).checked;
344
- // if ( ! on ) {
345
- // return;
346
- // }
347
-
348
  alert('Warning! '+
349
  "\n"+
350
  'You can not have video controls on a videoslide when there is a link on the slide.'+
@@ -589,13 +577,6 @@ function wppaCheckShares() {
589
  if (Sh) jQuery('.wppa_share').css('display', '');
590
  else jQuery('.wppa_share').css('display', 'none');
591
  }
592
- /*
593
- function wppaCheckKeepSource() {
594
- var Ks = document.getElementById('keep_source').checked;
595
- if ( Ks ) jQuery('.wppa_keep_source').css('display', '');
596
- else jQuery('.wppa_keep_source').css('display', 'none');
597
- }
598
- */
599
 
600
  function wppaCheckCoverType() {
601
  var Type = document.getElementById('cover_type').value;
@@ -961,16 +942,6 @@ function wppaCheckSplitNamedesc() {
961
  }
962
  }
963
 
964
- /*
965
- function wppaCheckIndexSearch() {
966
- // if (document.getElementById('indexed_search').checked) {
967
- jQuery('.index_search').css('display', '');
968
- // }
969
- // else {
970
- // jQuery('.index_search').css('display', 'none');
971
- // }
972
- }
973
- */
974
  function wppa_tablecookieon(i) {
975
  wppa_setCookie('table_'+i, 'on', '365');
976
  }
@@ -1998,84 +1969,13 @@ function wppaAjaxPopupWindow( slug ) {
1998
 
1999
  jQuery( '.ui-button' ).attr( 'title', wppaCloseText );
2000
 
2001
- /*
2002
- wnd.document.write(result);
2003
- */
2004
  }
2005
- // wnd.document.write('</body>');
2006
- // wnd.document.write('</html>');
2007
-
2008
  }
2009
 
2010
  function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2011
 
2012
- var xmlhttp = wppaGetXmlHttp();
2013
-
2014
- // on-unit to process the result
2015
- xmlhttp.onreadystatechange=function() {
2016
- if (xmlhttp.readyState != 4) {
2017
- jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'spinner.gif' );
2018
- // document.getElementById('img_'+slug).src = wppaImageDirectory+'spinner.gif';
2019
- }
2020
- else { // Ready
2021
- var str = wppaTrim(xmlhttp.responseText);
2022
- var ArrValues = str.split("||");
2023
-
2024
- if (ArrValues[0] != '') {
2025
- alert('The server returned unexpected output:\n'+ArrValues[0]);
2026
- }
2027
- if (xmlhttp.status!=404) { // No Not found
2028
- switch (ArrValues[1]) {
2029
- case '0': // No error
2030
- jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'tick.png' );
2031
- // document.getElementById('img_'+slug).src = wppaImageDirectory+'tick.png';
2032
- if ( ArrValues[3] ) alert(ArrValues[3]);
2033
- if ( _wppaRefreshAfter ) {
2034
- _wppaRefreshAfter = false;
2035
- document.location.reload(true);
2036
- }
2037
- break;
2038
- default:
2039
- jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2040
- // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2041
- if ( ArrValues[3] ) alert(ArrValues[3]);
2042
- }
2043
- jQuery( '#img_'+slug ).attr( 'title', ArrValues[2] );
2044
- // document.getElementById('img_'+slug).title = ArrValues[2];
2045
-
2046
- // Update cron statusses
2047
- if ( ArrValues[4] ) {
2048
- var tokens = ArrValues[4].split( ';' );
2049
- var i = 0;
2050
- var temp;
2051
- var Old, New;
2052
- while ( i < tokens.length ) {
2053
- temp = tokens[i].split( ':' );
2054
- Old = jQuery( '#'+ temp[0] ).html();
2055
- New = temp[1];
2056
- if ( Old != '' && New == '' ) {
2057
- // New = '<span style="color:red;font-weight:bold;" onclick="document.location.reload(true)" >Reload page</span>';
2058
- New = '<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />';
2059
- }
2060
- jQuery( '#'+ temp[0] ).html( New );
2061
- i++;
2062
- }
2063
- }
2064
- }
2065
- else { // Not found
2066
- jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2067
- // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2068
- document.getElementById('img_'+slug).title = 'Communication error';
2069
- }
2070
- wppaCheckInconsistencies();
2071
- }
2072
- }
2073
-
2074
- // Make the Ajax url
2075
- eslug = wppaEncode(slug);
2076
- var data = 'action=wppa&wppa-action=update-option&wppa-option='+eslug;
2077
- data += '&wppa-nonce='+document.getElementById('wppa-nonce').value;
2078
-
2079
  if ( elem != 0 ) {
2080
  if ( typeof( elem ) == 'number' ) {
2081
  data += '&value='+elem;
@@ -2088,12 +1988,74 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2088
  }
2089
  }
2090
 
2091
- //if (!confirm('Do '+wppaAjaxUrl+'\n'+data)) return; // Diagnostic
2092
-
2093
- // Do the Ajax action
2094
- xmlhttp.open('POST',wppaAjaxUrl,true);
2095
- xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
2096
- xmlhttp.send(data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2097
  }
2098
 
2099
  function wppaEncode(xtext) {
@@ -2462,7 +2424,7 @@ function wppaAjaxUpdateTogo(slug) {
2462
  async: true,
2463
  type: 'GET',
2464
  timeout: 100000,
2465
- beforesend: function( xhr ) {
2466
  },
2467
  success: function( result, status, xhr ) {
2468
 
@@ -2564,4 +2526,35 @@ function wppaTimedConfirm( text ) {
2564
 
2565
  jQuery( '.ui-button' ).attr( 'title', wppaCloseText );
2566
  setTimeout( function(){jQuery('.ui-button').trigger('click');}, 60000 );
2567
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.9.02
5
  /* Various js routines used in admin pages
6
  */
7
 
159
  wppaCheckLinkPageErr('super_view');
160
  wppaCheckSplitNamedesc();
161
  wppaCheckShares();
 
162
  wppaCheckCoverType();
163
  wppaCheckNewpag();
 
164
  wppaCheckCDN();
165
  wppaCheckAutoPage();
166
  wppaCheckGps();
222
  wppa_tablecookieoff(tab[table-1]+'-'+sub[subtab]);
223
  }
224
  }
 
 
 
225
  }
226
 
 
 
227
  // Find tags
228
  tag1 = jQuery("#wppa-quick-selbox-1").val();
229
  tag2 = jQuery("#wppa-quick-selbox-2").val();
333
  return;
334
  }
335
 
 
 
 
 
 
336
  alert('Warning! '+
337
  "\n"+
338
  'You can not have video controls on a videoslide when there is a link on the slide.'+
577
  if (Sh) jQuery('.wppa_share').css('display', '');
578
  else jQuery('.wppa_share').css('display', 'none');
579
  }
 
 
 
 
 
 
 
580
 
581
  function wppaCheckCoverType() {
582
  var Type = document.getElementById('cover_type').value;
942
  }
943
  }
944
 
 
 
 
 
 
 
 
 
 
 
945
  function wppa_tablecookieon(i) {
946
  wppa_setCookie('table_'+i, 'on', '365');
947
  }
1969
 
1970
  jQuery( '.ui-button' ).attr( 'title', wppaCloseText );
1971
 
 
 
 
1972
  }
 
 
 
1973
  }
1974
 
1975
  function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
1976
 
1977
+ var data = 'action=wppa&wppa-action=update-option&wppa-option='+wppaEncode(slug)+
1978
+ '&wppa-nonce='+document.getElementById('wppa-nonce').value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1979
  if ( elem != 0 ) {
1980
  if ( typeof( elem ) == 'number' ) {
1981
  data += '&value='+elem;
1988
  }
1989
  }
1990
 
1991
+ jQuery.ajax( { url: wppaAjaxUrl,
1992
+ data: data,
1993
+ async: true,
1994
+ type: 'POST',
1995
+ timeout: 100000,
1996
+ beforeSend: function( xhr ) {
1997
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'spinner.gif' );
1998
+ },
1999
+ success: function( result, status, xhr ) {
2000
+ var str = wppaTrim(result);
2001
+ var ArrValues = str.split("||");
2002
+ if (ArrValues[0] != '') {
2003
+ alert('The server returned unexpected output:\n'+ArrValues[0]);
2004
+ }
2005
+ else {
2006
+ // Process result
2007
+ switch (ArrValues[1]) {
2008
+ case '0': // No error
2009
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'tick.png' );
2010
+ if ( ArrValues[3] ) alert(ArrValues[3]);
2011
+ if ( _wppaRefreshAfter ) {
2012
+ _wppaRefreshAfter = false;
2013
+ document.location.reload(true);
2014
+ }
2015
+ break;
2016
+ default:
2017
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2018
+ if ( ArrValues[3] ) alert(ArrValues[3]);
2019
+ }
2020
+ jQuery( '#img_'+slug ).attr( 'title', ArrValues[2] );
2021
+
2022
+ // Update cron statusses
2023
+ if ( ArrValues[4] ) {
2024
+ var tokens = ArrValues[4].split( ';' );
2025
+ var i = 0;
2026
+ var temp;
2027
+ var Old, New;
2028
+ while ( i < tokens.length ) {
2029
+ temp = tokens[i].split( ':' );
2030
+ Old = jQuery( '#'+ temp[0] ).html();
2031
+ New = temp[1];
2032
+ if ( Old != '' && New == '' ) {
2033
+ New = '<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />';
2034
+ }
2035
+ jQuery( '#'+ temp[0] ).html( New );
2036
+ i++;
2037
+ }
2038
+ }
2039
+ }
2040
+ },
2041
+ error: function( xhr ) {
2042
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2043
+ document.getElementById('img_'+slug).title = 'Communication error';
2044
+ },
2045
+ complete: function( xhr ) {
2046
+ wppaCheckInconsistencies();
2047
+ if ( slug == 'spinner_shape' || slug == 'icon_corner_style' ) {
2048
+ wppaAjaxGetSpinnerHtml( 'normal', 'wppa-spin-pre-1' );
2049
+ wppaAjaxGetSpinnerHtml( 'lightbox', 'wppa-spin-pre-2' );
2050
+ }
2051
+ if ( slug == 'svg_color' || slug == 'svg_bg_color' ) {
2052
+ wppaAjaxGetSpinnerHtml( 'normal', 'wppa-spin-pre-1' );
2053
+ }
2054
+ if ( slug == 'ovl_svg_color' || slug == 'ovl_svg_bg_color' ) {
2055
+ wppaAjaxGetSpinnerHtml( 'lightbox', 'wppa-spin-pre-2' );
2056
+ }
2057
+ }
2058
+ } );
2059
  }
2060
 
2061
  function wppaEncode(xtext) {
2424
  async: true,
2425
  type: 'GET',
2426
  timeout: 100000,
2427
+ beforeSend: function( xhr ) {
2428
  },
2429
  success: function( result, status, xhr ) {
2430
 
2526
 
2527
  jQuery( '.ui-button' ).attr( 'title', wppaCloseText );
2528
  setTimeout( function(){jQuery('.ui-button').trigger('click');}, 60000 );
2529
+ }
2530
+
2531
+ function wppaAjaxGetSpinnerHtml( type, target ) {
2532
+ //alert(type+' '+target);
2533
+ jQuery.ajax( { url: wppaAjaxUrl,
2534
+ data: 'action=wppa' +
2535
+ '&wppa-action=update-option' +
2536
+ '&wppa-option=getspinnerpreview' +
2537
+ '&type=' + type +
2538
+ '&wppa-nonce=' + document.getElementById( 'wppa-nonce' ).value,
2539
+ async: true,
2540
+ type: 'GET',
2541
+ timeout: 100000,
2542
+ beforeSend: function( xhr ) {
2543
+ },
2544
+ success: function( result, status, xhr ) {
2545
+ //alert(result);
2546
+ // Split status and data
2547
+ var data = result.split('|');
2548
+
2549
+ // Update html
2550
+ jQuery( '#' + target ).html( data[0] );
2551
+
2552
+ },
2553
+ error: function( xhr ) {
2554
+ //alert('Error');
2555
+ },
2556
+ complete: function( xhr ) {
2557
+ //alert('Complete');
2558
+ }
2559
+ } );
2560
+ }
js/wppa-admin-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album";function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);p.length>0&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(e,t,p){var a="",o="";a=t||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+e;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==n.status){var t=wppaTrim(n.responseText).split("||");"ER"==t[0]?(t[3]&&alert(t[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),0==t[1]?document.getElementById("photostatus-"+e).innerHTML=t[2]:(document.getElementById("photoitem-"+e).innerHTML=a+t[2]+o,wppaProcessFull(t[3],t[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(e){wppaFeAjaxLog("in");var t=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+e;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t.open("GET",p,!0),t.send(),t.onreadystatechange=function(){switch(t.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==t.status){var p=wppaTrim(t.responseText).split("||");"ER"==p[0]?(p[3]&&alert(p[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),0==p[1]?document.getElementById("photostatus-"+e).innerHTML=p[2]:document.getElementById("photoitem-"+e).innerHTML='<div style="padding-left:5px;" >'+p[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=before+'<span style="color:red;" >Comm error '+t.status+": "+t.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(e,t,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+e).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+e;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t&&(o+="&wppa-watermark-file="+t),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=wppaTrim(a.responseText).split("||");switch(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),t[1]){case"0":document.getElementById("photostatus-"+e).innerHTML=t[2];break;default:document.getElementById("photostatus-"+e).innerHTML='<span style="color:red">'+t[2]+"</span>"}jQuery("#wppa-water-spin-"+e).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+e).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(e,t,p,a,o,n){o||(o=""),n||(n="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[e]||(wppaAjaxPhotoCount[e]=0),wppaAjaxPhotoCount[e]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")")},success:function(i,s,l){var r=wppaTrim(i).split("||");switch(wppaAjaxPhotoCount[e]--,""!=r[0]&&alert("The server returned unexpected output:\n"+r[0]),r[1]){case"0":var u;if(0==wppaAjaxPhotoCount[e]?jQuery("#photostatus-"+e).html(r[2]):jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")"),r[3])(u=jQuery("#fs-a-"+e).attr("href").split("="))[1]=parseInt(u[1])+1,jQuery("#fs-a-"+e).attr("href",u[0]+"="+u[1]),jQuery("#fs-img-"+e).attr("src",u[0]+"="+u[1]);if(r[4])(u=jQuery("#tnp-"+e).attr("src").split("="))[1]=parseInt(u[1])+1,jQuery("#tnp-"+e).attr("src",u[0]+"="+u[1]);void 0!==r[5]&&(jQuery("#imstack-"+e).html(r[5]),r[5].length>0?jQuery("#imstackbutton-"+e).css("display",""):jQuery("#imstackbutton-"+e).css("display","none")),void 0!==r[6]&&jQuery("#dispfileinfo-"+e).html(r[6]);break;case"99":jQuery("#photoitem-"+e).html(o+'<span style="color:red">'+r[2]+"</span>"+n);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+r[2]+" ("+r[1]+")</span>")}"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"hidden"});var c=0,d=-1;for(count=wppaPhotoUpdateMatrix.length;c<count;)wppaPhotoUpdateMatrix[c][0]==e&&wppaPhotoUpdateMatrix[c][1]==t&&(d=c),c++;if(wppaPhotoUpdateMatrix[d]&&(wppaPhotoUpdateMatrix[d][2]=p||0,wppaPhotoUpdateMatrix[d][4]=!1,wppaPhotoUpdateMatrix[d][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),a&&"0"==r[1])return jQuery("#photostatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+e)},1e3)},error:function(t,p,a){wppaAjaxPhotoCount[e]--,jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(e,t,p,a,o){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("album-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(n,i,s){var l=wppaTrim(n).split("||");switch(wppaAjaxAlbumCount--,""!=l[0]&&alert("The server returned unexpected output:\n"+l[0]),l[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+e).html(l[2]):jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+e).html='<span style="color:red">'+l[2]+" ("+l[1]+")</span>"}if(void 0!==l[3]&&wppaProcessFull(l[3],l[4]),o&&"0"==l[1])return jQuery("#albumstatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==t&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var r=0,u=-1,c=wppaAlbumUpdateMatrix.length;r<c;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=r),r++;wppaAlbumUpdateMatrix[u][2]=p||0,wppaAlbumUpdateMatrix[u][4]=!1,wppaAlbumUpdateMatrix[u][5]=!1,wppaAjaxUpdateAlbumMonitor(a)},error:function(t,p,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),t>0?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(e,t,p){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+e+"&wppa-comment-id="+t+"&wppa-comment-status="+p+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var p=wppaTrim(a.responseText).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":jQuery("#photostatus-"+e).html(p[2]);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+p[2]+"</span>")}jQuery("#wppa-comment-spin-"+t).css("visibility","hidden")}else jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(e,t){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+e;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,t.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var t=wppaTrim(p.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=p.status)switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+e).attr("title",t[2]),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Error #"+t[1]+", message: "+t[2]+", status: "+p.status),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(e,t,p){if(p);else if(!t&&"yes"==document.getElementById(e+"_continue").value)return document.getElementById(e+"_continue").value="no",document.getElementById(e+"_button").value="Start!",void(jQuery("#"+e+"_togo").html()>0&&(jQuery("#"+e+"_status").html("Pausing..."),jQuery("#"+e+"_button").css("display","none")));p||(document.getElementById(e+"_continue").value="yes",document.getElementById(e+"_button").value="Stop!",""==jQuery("#"+e+"_status").html()&&jQuery("#"+e+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(p?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var o=e.split("||"),n=o[1],i=!1;return n?(o[0].length>10&&(alert("An error occurred:\n"+o[0]),i=!0),jQuery("#"+n+"_status").html(o[2]),jQuery("#"+n+"_togo").html(o[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==o[3]?"reload"==o[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?p||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(t,p,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+e+", Error = "+a+", status = "+p,"force"),jQuery("#"+e+"_status").html("Server error #"+(11-wppaAlwaysContinue));var o=!1;--wppaAlwaysContinue<1&&(o=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(o||wppaAlwaysContinue>0)&&("wppa_remake"==e&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==e&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==e&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+e+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(e,t,p){var a=wppaGetXmlHttp();a.onreadystatechange=function(){if(4!=a.readyState)jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");else{var t=wppaTrim(a.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=a.status){switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),t[3]&&alert(t[3])}if(jQuery("#img_"+e).attr("title",t[2]),t[4])for(var p,o,n,i=t[4].split(";"),s=0;s<i.length;)p=i[s].split(":"),o=jQuery("#"+p[0]).html(),n=p[1],""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(n),s++}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+e).title="Communication error";wppaCheckInconsistencies()}},eslug=wppaEncode(e);var o="action=wppa&wppa-action=update-option&wppa-option="+eslug;o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,0!=t&&(o+="number"==typeof t?"&value="+t:p?"&value="+wppaGetSelectionEnumByClass("."+e,","):"&value="+wppaEncode(t.value)),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(t.length>1)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),wppaFeCount>1&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],o=0,n=0;for(t||(t="."),p=jQuery(e),o=0,n=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+e,async:!0,type:"GET",timeout:1e5,beforeSend:function(t){jQuery("#"+e+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(t,p,a){alert("Export Db Table "+e+" failed. Error = "+a+", status = "+p)},complete:function(t,p,a){jQuery("#"+e+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+e,async:!0,type:"GET",timeout:1e5,beforesend:function(e){},success:function(t,p,a){var o=t.split("|");jQuery("#"+e+"_togo").html(o[0]);var n=jQuery("#"+e+"_status").html(),i=o[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+e+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(e)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}
1
+ var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album";function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",o="";a=e||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==n.status){var e=wppaTrim(n.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+o,wppaProcessFull(e[3],e[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(o+="&wppa-watermark-file="+e),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("photostatus-"+t).innerHTML=e[2];break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(s,l,r,u,c,d){c||(c=""),d||(d="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[s]||(wppaAjaxPhotoCount[s]=0),wppaAjaxPhotoCount[s]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxPhotoCount[s]--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":var o;if(0==wppaAjaxPhotoCount[s]?jQuery("#photostatus-"+s).html(a[2]):jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")"),a[3])(o=jQuery("#fs-a-"+s).attr("href").split("="))[1]=parseInt(o[1])+1,jQuery("#fs-a-"+s).attr("href",o[0]+"="+o[1]),jQuery("#fs-img-"+s).attr("src",o[0]+"="+o[1]);if(a[4])(o=jQuery("#tnp-"+s).attr("src").split("="))[1]=parseInt(o[1])+1,jQuery("#tnp-"+s).attr("src",o[0]+"="+o[1]);void 0!==a[5]&&(jQuery("#imstack-"+s).html(a[5]),0<a[5].length?jQuery("#imstackbutton-"+s).css("display",""):jQuery("#imstackbutton-"+s).css("display","none")),void 0!==a[6]&&jQuery("#dispfileinfo-"+s).html(a[6]);break;case"99":jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+a[2]+"</span>"+d);break;default:jQuery("#photostatus-"+s).html('<span style="color:red">'+a[2]+" ("+a[1]+")</span>")}"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"});var n=0,i=-1;for(count=wppaPhotoUpdateMatrix.length;n<count;)wppaPhotoUpdateMatrix[n][0]==s&&wppaPhotoUpdateMatrix[n][1]==l&&(i=n),n++;if(wppaPhotoUpdateMatrix[i]&&(wppaPhotoUpdateMatrix[i][2]=r||0,wppaPhotoUpdateMatrix[i][4]=!1,wppaPhotoUpdateMatrix[i][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),u&&"0"==a[1])return jQuery("#photostatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+s)},1e3)},error:function(e,t,p){wppaAjaxPhotoCount[s]--,jQuery("#photostatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var o=0,n=-1,i=wppaAlbumUpdateMatrix.length;o<i;)wppaAlbumUpdateMatrix[o][0]==s&&wppaAlbumUpdateMatrix[o][1]==l&&(n=o),o++;wppaAlbumUpdateMatrix[n][2]=r||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]);break;default:jQuery("#photostatus-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#photostatus-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(o,e,i){if(i);else if(!e&&"yes"==document.getElementById(o+"_continue").value)return document.getElementById(o+"_continue").value="no",document.getElementById(o+"_button").value="Start!",void(0<jQuery("#"+o+"_togo").html()&&(jQuery("#"+o+"_status").html("Pausing..."),jQuery("#"+o+"_button").css("display","none")));i||(document.getElementById(o+"_continue").value="yes",document.getElementById(o+"_button").value="Stop!",""==jQuery("#"+o+"_status").html()&&jQuery("#"+o+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+o+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(i?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),o=a[1],n=!1;return o?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),n=!0),jQuery("#"+o+"_status").html(a[2]),jQuery("#"+o+"_togo").html(a[3]),jQuery("#"+o+"_button").css("display",""),n||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+o+"', false)",20):void("yes"!=document.getElementById(o+"_continue").value?i||jQuery("#"+o+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+o+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+o+", Error = "+p+", status = "+t,"force"),jQuery("#"+o+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==o&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==o&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==o&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+o+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r).attr("title",a[2]),a[4])for(var o,n,i,s=a[4].split(";"),l=0;l<s.length;)o=s[l].split(":"),n=jQuery("#"+o[0]).html(),i=o[1],""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+o[0]).html(i),l++}},error:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],o=0,n=0;for(t||(t="."),p=jQuery(e),n=o=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(i){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+i,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+i+"_togo").html(a[0]);var o=jQuery("#"+i+"_status").html(),n=a[1];""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+i+"_status").html(n),setTimeout(function(){wppaAjaxUpdateTogo(i)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o).html(a[0])},error:function(e){},complete:function(e){}})}
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.9.01
6
- Stable tag: 6.9.00
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
 
 
140
  = 6.9.01 =
141
 
142
  * This version addresses various minor bug fixes and feature requests.
@@ -151,8 +155,8 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
151
 
152
  = 6.8.08 =
153
 
154
- * This version addresses various minor bug fixes and feature requests.
155
- * This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked.
156
  This setting is now recommended and set ticked as the default.
157
  * For more info on performance improvements and compatibility with optimizers: see the changelog.txt
158
 
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 6.9.02
6
+ Stable tag: 6.9.01
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 6.9.02 =
141
+
142
+ * This version addresses various minor bug fixes and feature requests.
143
+
144
  = 6.9.01 =
145
 
146
  * This version addresses various minor bug fixes and feature requests.
155
 
156
  = 6.8.08 =
157
 
158
+ * This version addresses various minor bug fixes and feature requests.
159
+ * This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked.
160
  This setting is now recommended and set ticked as the default.
161
  * For more info on performance improvements and compatibility with optimizers: see the changelog.txt
162
 
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.8.08
6
  *
7
  */
8
 
@@ -21,7 +21,6 @@ global $wppa_log_file;
21
  wppa( 'out', '' );
22
  $wppa_session['page']--;
23
  $wppa_session['ajax']++;
24
- // wppa_save_session();
25
 
26
  // ALTHOUGH IF WE ARE HERE AS FRONT END VISITOR, is_admin() is true.
27
  // So, $wppa_opt switches are 'yes' or 'no' and not true or false.
@@ -2254,7 +2253,35 @@ global $wppa_log_file;
2254
  if ( strpos( $option, 'wppa_fontfamily_' ) !== false ) $value = str_replace( '"', "'", $value );
2255
 
2256
  $option = wppa_decode( $option );
 
2257
  // Dispatch on option
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2258
  if ( substr( $option, 0, 16 ) == 'wppa_iptc_label_' ) {
2259
  $tag = substr( $option, 16 );
2260
  $q = $wpdb->prepare( "UPDATE `".WPPA_IPTC."` SET `description`=%s WHERE `tag`=%s AND `photo`='0'", $value, $tag );
@@ -3370,7 +3397,6 @@ global $wppa_log_file;
3370
  wppa_exit();
3371
  break;
3372
 
3373
-
3374
  default: // Unimplemented $wppa-action
3375
  die( '-1' );
3376
  }
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.9.02
6
  *
7
  */
8
 
21
  wppa( 'out', '' );
22
  $wppa_session['page']--;
23
  $wppa_session['ajax']++;
 
24
 
25
  // ALTHOUGH IF WE ARE HERE AS FRONT END VISITOR, is_admin() is true.
26
  // So, $wppa_opt switches are 'yes' or 'no' and not true or false.
2253
  if ( strpos( $option, 'wppa_fontfamily_' ) !== false ) $value = str_replace( '"', "'", $value );
2254
 
2255
  $option = wppa_decode( $option );
2256
+
2257
  // Dispatch on option
2258
+ if ( $option == 'wppa_getspinnerpreview' ) {
2259
+ if ( $_REQUEST['type'] == 'normal' ) {
2260
+ echo wppa_get_spinner_svg_html( array( 'size' => 60,
2261
+ 'display' => 'inline',
2262
+ 'lightbox' => false,
2263
+ 'position' => 'relative',
2264
+ 'left' => '0',
2265
+ 'top' => '0',
2266
+ 'margin' => '0',
2267
+ ) );
2268
+ }
2269
+ elseif ( $_REQUEST['type'] == 'lightbox' ) {
2270
+ echo wppa_get_spinner_svg_html( array( 'size' => 60,
2271
+ 'display' => 'inline',
2272
+ 'lightbox' => true,
2273
+ 'position' => 'relative',
2274
+ 'left' => '0',
2275
+ 'top' => '0',
2276
+ 'margin' => '0',
2277
+ ) );
2278
+ }
2279
+ else {
2280
+ echo 'Error';
2281
+ }
2282
+ wppa_exit();
2283
+ }
2284
+
2285
  if ( substr( $option, 0, 16 ) == 'wppa_iptc_label_' ) {
2286
  $tag = substr( $option, 16 );
2287
  $q = $wpdb->prepare( "UPDATE `".WPPA_IPTC."` SET `description`=%s WHERE `tag`=%s AND `photo`='0'", $value, $tag );
3397
  wppa_exit();
3398
  break;
3399
 
 
3400
  default: // Unimplemented $wppa-action
3401
  die( '-1' );
3402
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.8.08
7
  *
8
  */
9
 
@@ -3496,7 +3496,8 @@ global $wpdb;
3496
  ' class="wppa-box-text wppa-td"' .
3497
  ' style="vertical-align:top; width:30%; border-width: 0 0 0 0; '.wppa_wcs( 'wppa-box-text' ).wppa_wcs( 'wppa-td' ).'"' .
3498
  ' >' .
3499
- $comment['user'] . ' ' . __( 'wrote:', 'wp-photo-album-plus' ) .
 
3500
  '<br />' .
3501
  '<span style="font-size:9px; ">' .
3502
  wppa_get_time_since( $comment['timestamp'] ) .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.9.02
7
  *
8
  */
9
 
3496
  ' class="wppa-box-text wppa-td"' .
3497
  ' style="vertical-align:top; width:30%; border-width: 0 0 0 0; '.wppa_wcs( 'wppa-box-text' ).wppa_wcs( 'wppa-td' ).'"' .
3498
  ' >' .
3499
+ ( wppa_switch( 'domain_link_buddypress' ) ? wppa_bp_userlink( $comment['email'], false, true ) : $comment['user'] ) .
3500
+ ' ' . __( 'wrote:', 'wp-photo-album-plus' ) .
3501
  '<br />' .
3502
  '<span style="font-size:9px; ">' .
3503
  wppa_get_time_since( $comment['timestamp'] ) .
wppa-comment-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
- * Version 6.7.00
7
  *
8
  */
9
 
@@ -84,7 +84,7 @@ class WPPA_Comment_table extends WP_List_Table {
84
  $result =
85
  '<img' .
86
  ' src="' . $src . '"' .
87
- ' style="width:100px;max-height:75px;"' .
88
  ' title="' . $title . '"' .
89
  ' />' .
90
  '<br />' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
+ * Version 6.9.02
7
  *
8
  */
9
 
84
  $result =
85
  '<img' .
86
  ' src="' . $src . '"' .
87
+ ' style="width:100px;"' .
88
  ' title="' . $title . '"' .
89
  ' />' .
90
  '<br />' .
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 6.8.08
7
  *
8
  */
9
 
@@ -32,6 +32,23 @@ function wppa_add_shortcode_to_post( $post ) {
32
  return $new_post;
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  // The shortcode handler
36
  function wppa_shortcodes( $xatts, $content = '' ) {
37
  global $wppa;
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 6.9.02
7
  *
8
  */
9
 
32
  return $new_post;
33
  }
34
 
35
+ // Shortcode [wppa_div style="{style specs}"][/wppa_div]
36
+ function wppa_shordcode_div( $xatts, $content = '' ) {
37
+
38
+ $atts = shortcode_atts( array(
39
+ 'style' => 'clear:both;position:relative;',
40
+ 'class' => '',
41
+ ), $xatts );
42
+
43
+ $result = '<div style="' . $atts['style'] . '" class="' . $atts['class'] . '" >' .
44
+ do_shortcode( $content ) .
45
+ '</div>';
46
+
47
+ return $result;
48
+ }
49
+
50
+ add_shortcode( 'wppa_div', 'wppa_shordcode_div' );
51
+
52
  // The shortcode handler
53
  function wppa_shortcodes( $xatts, $content = '' ) {
54
  global $wppa;
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.9.01
7
  *
8
  */
9
 
@@ -2173,7 +2173,7 @@ static $user;
2173
  else {
2174
  $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2175
  'addmedal' => true,
2176
- 'escjs' => true,
2177
  'showname' => wppa_switch( 'show_full_name' ),
2178
  'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
2179
  ) );
@@ -3214,77 +3214,11 @@ global $blog_id;
3214
  }
3215
 
3216
  // Spinner for Ajax
3217
- if ( wppa_switch( 'allow_ajax' ) ) {
3218
- if ( ! wppa_in_widget() ) {
3219
-
3220
- switch( wppa_opt( 'icon_corner_style' ) ) {
3221
- case 'gif':
3222
- case 'none':
3223
- $bradius = '0';
3224
- break;
3225
- case 'light':
3226
- $bradius = '12';
3227
- break;
3228
- case 'medium':
3229
- $bradius = '24';
3230
- break;
3231
- case 'heavy':
3232
- $bradius = '60';
3233
- break;
3234
- }
3235
 
3236
- if ( wppa_use_svg() ) {
3237
- wppa_out( '<svg' .
3238
- ' id="wppa-ajax-spin-' . wppa( 'mocc' ) . '"' .
3239
- ' class="wppa-ajax-spin uil-default"' .
3240
- ' width="120px"' .
3241
- ' height="120px"' .
3242
- ' xmlns="http://www.w3.org/2000/svg"' .
3243
- ' viewBox="0 0 100 100"' .
3244
- ' preserveAspectRatio="xMidYMid"' .
3245
- ' style="' .
3246
- 'box-shadow:none;' .
3247
- 'z-index:1010;' .
3248
- 'position:fixed;' .
3249
- 'top:50%;' .
3250
- 'margin-top:-60px;' .
3251
- 'left:50%;' .
3252
- 'margin-left:-60px;' .
3253
- 'display:none;' .
3254
- 'fill:' . wppa_opt( 'svg_color' ) . ';' .
3255
- 'background-color:' . wppa_opt( 'svg_bg_color' ) . ';' .
3256
- 'border-radius:' . $bradius . 'px;' .
3257
- 'box-shadow:none;' .
3258
- '"' .
3259
- ' >' .
3260
- wppa_get_spinner_svg_body_html() .
3261
- '</svg>'
3262
- );
3263
- }
3264
- else {
3265
- wppa_out( '<img' .
3266
- ' id="wppa-ajax-spin-' . wppa( 'mocc' ) . '"' .
3267
- ' src="'.wppa_get_imgdir().'loader.' . ( wppa_use_svg() ? 'svg' : 'gif' ) . '"' .
3268
- ( wppa_use_svg() ? ' class="wppa-svg wppa-ajax-spin"' : ' class="wppa-ajax-spin"' ) .
3269
- ' alt="spinner"' .
3270
- ' style="' .
3271
- 'box-shadow:none;' .
3272
- 'z-index:1010;' .
3273
- 'position:fixed;' .
3274
- 'top:50%;' .
3275
- 'margin-top:-60px;' .
3276
- 'left:50%;' .
3277
- 'margin-left:-60px;' .
3278
- 'display:none;' .
3279
- 'fill:' . wppa_opt( 'svg_color' ) . ';' .
3280
- 'background-color:' . wppa_opt( 'svg_bg_color' ) . ';' .
3281
- 'border-radius:' . $bradius . 'px;' .
3282
- 'box-shadow:none;' .
3283
- '"' .
3284
- ' />'
3285
- );
3286
- }
3287
- }
3288
  }
3289
 
3290
  // Start timer if in debug mode
@@ -5106,7 +5040,10 @@ function wppa_get_lbtitle( $type, $id ) {
5106
  $do_desc = wppa_switch( 'ovl_'.$type.'_desc' );
5107
  $do_sm = wppa_switch( 'share_on_lightbox' );
5108
 
5109
- $dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_'.$type.'_name' ) ) );
 
 
 
5110
 
5111
  $result = '';
5112
  if ( $do_download ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.9.02
7
  *
8
  */
9
 
2173
  else {
2174
  $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2175
  'addmedal' => true,
2176
+ 'escjs' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
2177
  'showname' => wppa_switch( 'show_full_name' ),
2178
  'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
2179
  ) );
3214
  }
3215
 
3216
  // Spinner for Ajax
3217
+ if ( wppa_switch( 'allow_ajax' ) && ! wppa_in_widget() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3218
 
3219
+ wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-ajax-spin-' . wppa( 'mocc' ),
3220
+ 'class' => 'wppa-ajax-spin',
3221
+ ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3222
  }
3223
 
3224
  // Start timer if in debug mode
5040
  $do_desc = wppa_switch( 'ovl_'.$type.'_desc' );
5041
  $do_sm = wppa_switch( 'share_on_lightbox' );
5042
 
5043
+ $dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ),
5044
+ 'showname' => wppa_switch( 'ovl_'.$type.'_name' ),
5045
+ 'nobpdomain' => wppa_opt( 'art_monkey_display' ) == 'button' && $do_download,
5046
+ ) );
5047
 
5048
  $result = '';
5049
  if ( $do_download ) {
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 6.9.01
7
  *
8
  */
9
 
@@ -254,11 +254,11 @@ function wppa_get_photo_name( $id, $xargs = array() ) {
254
  $owner = wppa_display_name( $thumb['owner'] );
255
  }
256
  else {
257
- $owner = wppa_bp_userlink( $thumb['owner'], $args['escjs'] );
258
  }
259
 
260
  if ( $args['showname'] ) {
261
- if ( wppa_switch( 'owner_on_new_line' ) ) {
262
  if ( ! $args['escjs'] ) {
263
  $result .= '<br />';
264
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 6.9.02
7
  *
8
  */
9
 
254
  $owner = wppa_display_name( $thumb['owner'] );
255
  }
256
  else {
257
+ $owner = wppa_bp_userlink( $thumb['owner'] , $args['escjs'] );
258
  }
259
 
260
  if ( $args['showname'] ) {
261
+ if ( wppa_switch( 'owner_on_new_line' ) && wppa_opt( 'art_monkey_display' ) != 'button' ) {
262
  if ( ! $args['escjs'] ) {
263
  $result .= '<br />';
264
  }
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 6.8.09
7
  *
8
  */
9
 
@@ -548,75 +548,10 @@ global $wppa_js_page_data_file;
548
  '</script>';
549
 
550
  // The Spinner image
551
- switch( wppa_opt( 'icon_corner_style' ) ) {
552
- case 'gif':
553
- case 'none':
554
- $bradius = '0';
555
- break;
556
- case 'light':
557
- $bradius = '12';
558
- break;
559
- case 'medium':
560
- $bradius = '24';
561
- break;
562
- case 'heavy':
563
- $bradius = '60';
564
- break;
565
- }
566
-
567
- if ( wppa_use_svg() ) {
568
- echo
569
- '<svg' .
570
- ' id="wppa-ovl-spin"' .
571
- ' width="120px"' .
572
- ' height="120px"' .
573
- ' xmlns="http://www.w3.org/2000/svg"' .
574
- ' viewBox="0 0 100 100"' .
575
- ' preserveAspectRatio="xMidYMid"' .
576
- ' style="' .
577
- 'width:120px;' .
578
- 'height:120px;' .
579
- 'position:fixed;' .
580
- 'top:50%;' .
581
- 'margin-top:-60px;' .
582
- 'left:50%;' .
583
- 'margin-left:-60px;' .
584
- 'z-index:100100;' .
585
- 'opacity:1;' .
586
- 'display:none;' .
587
- 'fill:' . wppa_opt( 'ovl_svg_color' ) . ';' .
588
- 'background-color:' . wppa_opt( 'ovl_svg_bg_color' ) . ';' .
589
- 'box-shadow:none;' .
590
- 'border-radius:' . $bradius . 'px;' .
591
- '"' . ' >' .
592
- wppa_get_spinner_svg_body_html() .
593
- '</svg>';
594
- }
595
- else {
596
- echo
597
- '<img' .
598
- ' id="wppa-ovl-spin"' .
599
- ' alt="spinner"' .
600
- ( wppa_use_svg() ? ' class="wppa-svg"' : '' ) .
601
- ' style="' .
602
- 'width:120px;' .
603
- 'height:120px;' .
604
- 'position:fixed;' .
605
- 'top:50%;' .
606
- 'margin-top:-60px;' .
607
- 'left:50%;' .
608
- 'margin-left:-60px;' .
609
- 'z-index:100100;' .
610
- 'opacity:1;' .
611
- 'display:none;' .
612
- 'fill:' . wppa_opt( 'ovl_svg_color' ) . ';' .
613
- 'background-color:' . wppa_opt( 'ovl_svg_bg_color' ) . ';' .
614
- 'box-shadow:none;' .
615
- 'border-radius:' . $bradius . 'px;' .
616
- '"' .
617
- ' src="' . wppa_get_imgdir() . ( wppa_use_svg() ? 'loader.svg' : 'loader.gif' ) . '"' .
618
- ' />';
619
- }
620
 
621
  // The init vars
622
  $data = '
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.9.02
7
  *
8
  */
9
 
548
  '</script>';
549
 
550
  // The Spinner image
551
+ echo wppa_get_spinner_svg_html( array( 'id' => 'wppa-ovl-spin',
552
+ 'position' => 'fixed',
553
+ 'lightbox' => true,
554
+ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
 
556
  // The init vars
557
  $data = '
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.9.01
7
  *
8
  */
9
 
@@ -3118,6 +3118,45 @@ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\
3118
  $tags = 'layout,navi';
3119
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
3120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3121
  ?>
3122
  </tbody>
3123
  <tfoot style="font-weight: bold;" class="wppa_table_2">
@@ -10567,6 +10606,8 @@ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\
10567
 
10568
  </form>
10569
  <script type="text/javascript" >wppaInitSettings();wppaCheckInconsistencies();</script>
 
 
10570
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10571
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
10572
  <input type="hidden" id="wppa-heartbeat" value="0" />
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.9.02
7
  *
8
  */
9
 
3118
  $tags = 'layout,navi';
3119
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
3120
 
3121
+ $name = __('Spinner design', 'wp-photo-album-plus');
3122
+ $desc = __('Shape of the loader sybol', 'wp-photo-album-plus');
3123
+ $help = __('This works only when Table II-J11 is set to any svg style', 'wp-photo-album-plus');
3124
+ $slug = 'wppa_spinner_shape';
3125
+ $opts = array( __('default', 'wp-photo-album-plus'),
3126
+ 'puff',
3127
+ 'rings',
3128
+ 'tail-spin',
3129
+ 'three-dots',
3130
+ 'ball-triangle',
3131
+ 'spinning-circles',
3132
+ 'oval',
3133
+ 'hearts',
3134
+ 'grid',
3135
+ 'circles',
3136
+ 'bars',
3137
+ 'audio',
3138
+ );
3139
+ $vals = array( 'default',
3140
+ 'puff',
3141
+ 'rings',
3142
+ 'tail-spin',
3143
+ 'three-dots',
3144
+ 'ball-triangle',
3145
+ 'spinning-circles',
3146
+ 'oval',
3147
+ 'hearts',
3148
+ 'grid',
3149
+ 'circles',
3150
+ 'bars',
3151
+ 'audio',
3152
+ );
3153
+ $html = wppa_select($slug, $opts, $vals) .
3154
+ __('Frontend', 'wp-photo-album-plus') . ':&nbsp;<span id="wppa-spin-pre-1" >&nbsp;</span>' .
3155
+ __('Lightbox', 'wp-photo-album-plus') . ':&nbsp;<span id="wppa-spin-pre-2" >&nbsp;</span>';
3156
+ $clas = '';
3157
+ $tags = 'layout,navi';
3158
+ wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
3159
+
3160
  ?>
3161
  </tbody>
3162
  <tfoot style="font-weight: bold;" class="wppa_table_2">
10606
 
10607
  </form>
10608
  <script type="text/javascript" >wppaInitSettings();wppaCheckInconsistencies();</script>
10609
+ <script type="text/javascript" >wppaAjaxGetSpinnerHtml( 'normal', 'wppa-spin-pre-1' );
10610
+ wppaAjaxGetSpinnerHtml( 'lightbox', 'wppa-spin-pre-2' );</script>
10611
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10612
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
10613
  <input type="hidden" id="wppa-heartbeat" value="0" />
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.9.01
7
  *
8
  */
9
 
@@ -1089,6 +1089,7 @@ Hide Camera info
1089
  'wppa_close_text' => 'Close', // frontend upload/edit etc
1090
 
1091
  'wppa_icon_corner_style' => 'medium',
 
1092
 
1093
 
1094
  // Table III: Backgrounds
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.9.02
7
  *
8
  */
9
 
1089
  'wppa_close_text' => 'Close', // frontend upload/edit etc
1090
 
1091
  'wppa_icon_corner_style' => 'medium',
1092
+ 'wppa_spinner_shape' => 'default',
1093
 
1094
 
1095
  // Table III: Backgrounds
wppa-slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
- * Version 6.8.08
7
  *
8
  */
9
 
@@ -386,85 +386,10 @@ function wppa_slide_frame() {
386
  '</div>'
387
  );
388
 
389
- switch( wppa_opt( 'icon_corner_style' ) ) {
390
- case 'gif':
391
- case 'none':
392
- $bradius = '0';
393
- break;
394
- case 'light':
395
- $bradius = '12';
396
- break;
397
- case 'medium':
398
- $bradius = '24';
399
- break;
400
- case 'heavy':
401
- $bradius = '60';
402
- break;
403
- }
404
-
405
- if ( wppa_use_svg() ) {
406
- wppa_out( '<svg' .
407
- ' id="wppa-slide-spin-' . wppa( 'mocc' ) . '"' .
408
- ' class="wppa-ajax-spin uil-default"' .
409
- ' width="120px"' .
410
- ' height="120px"' .
411
- ' xmlns="http://www.w3.org/2000/svg"' .
412
- ' viewBox="0 0 100 100"' .
413
- ' preserveAspectRatio="xMidYMid"' .
414
- ' style="' .
415
- 'width:120px;' .
416
- 'height:120px;' .
417
- 'position:absolute;' .
418
- 'top:50%;' .
419
- 'margin-top:-60px;' .
420
- 'left:50%;' .
421
- 'margin-left:-60px;' .
422
- 'z-index:100100;' .
423
- 'opacity:1;' .
424
- 'display:block;' .
425
- 'fill:' . wppa_opt( 'svg_color' ) . ';' .
426
- 'background-color:' . wppa_opt( 'svg_bg_color' ) . ';' .
427
- 'box-shadow:none;' .
428
- 'border-radius:' . $bradius .'px;' .
429
- '"' .
430
- ' >' .
431
- wppa_get_spinner_svg_body_html() .
432
- '</svg>'
433
- );
434
- }
435
- else {
436
- wppa_out( '<img' .
437
- ' id="wppa-slide-spin-' . wppa( 'mocc' ) . '"' .
438
- ' alt="spinner"' .
439
- ' style="' .
440
- 'width:120px;' .
441
- 'height:120px;' .
442
- 'position:absolute;' .
443
- 'top:50%;' .
444
- 'margin-top:-60px;' .
445
- 'left:50%;' .
446
- 'margin-left:-60px;' .
447
- 'z-index:100100;' .
448
- 'opacity:1;' .
449
- 'display:block;' .
450
- // 'fill:' . wppa_opt( 'svg_color' ) . ';' .
451
- 'background-color:' . wppa_opt( 'svg_bg_color' ) . ';' .
452
- 'box-shadow:none;' .
453
- 'border-radius:' . $bradius .'px;' .
454
- '"' .
455
- ' src="' . wppa_get_imgdir() . 'loader.gif"' .
456
- ' />'
457
- );
458
- }
459
-
460
-
461
- /*'<div' .
462
- ' id="spinner-' . wppa( 'mocc' ) . '"' .
463
- ' class="spinner"' .
464
- ' >' .
465
- '</div>'
466
- );
467
- */
468
 
469
  if ( ! wppa_page( 'oneofone' ) ) {
470
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 6.9.02
7
  *
8
  */
9
 
386
  '</div>'
387
  );
388
 
389
+ // The Spinner image
390
+ wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-slide-spin-' . wppa( 'mocc' ),
391
+ 'position' => 'absolute',
392
+ ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
  if ( ! wppa_page( 'oneofone' ) ) {
395
 
wppa-users.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
- * Version 6.9.01
7
  *
8
  */
9
 
@@ -345,34 +345,46 @@ function wppa_may_user_fe_delete( $id ) {
345
  return false;
346
  }
347
 
348
- // Convert user login or displayname into a link to the users BuddyPress domain.
349
- // Only if configured and available
350
- function wppa_bp_userlink( $owner, $esc_js = false ) {
 
 
351
 
352
  // Init
353
- $result = $owner;
354
-
355
- // Configured?
356
- if ( ! wppa_switch( 'domain_link_buddypress' ) ) {
357
- return $result;
358
  }
359
 
360
- // Bp available?
361
- if ( ! function_exists( 'bp_core_get_userlink' ) ) {
362
- return $result;
363
  }
364
 
365
  // Get userdata
366
- $user = get_user_by( 'login', $owner );
367
- if ( ! $user ) {
368
- $user = get_user_by( 'display_name', $owner );
369
- if ( ! $user ) {
370
- return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  }
372
  }
373
 
374
- // Gt the Buddypress link
375
- $result = bp_core_get_userlink( $user->ID );
376
 
377
  // Filter
378
  if ( $esc_js ) {
@@ -381,20 +393,19 @@ function wppa_bp_userlink( $owner, $esc_js = false ) {
381
 
382
  // Done
383
  return $result;
384
-
385
  }
386
 
387
  // Convert login name to displayname
388
  function wppa_display_name( $owner ) {
389
-
390
  // Init
391
  $result = $owner;
392
-
393
  // Get userdata
394
  $user = get_user_by( 'login', $owner );
395
  if ( ! $user ) {
396
  return $result; // User deleted
397
  }
398
-
399
- return $user->display_name;
400
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
+ * Version 6.9.02
7
  *
8
  */
9
 
345
  return false;
346
  }
347
 
348
+ // Convert user loginname or email into a link to the users BuddyPress domain.
349
+ // Only if configured and available.
350
+ // Otherwise return display name. If user no longer exists, return $owner
351
+ function wppa_bp_userlink( $owner, $esc_js = false, $email = false ) {
352
+ static $usercache;
353
 
354
  // Init
355
+ if ( ! is_array( $usercache ) ) {
356
+ $usercache = array();
 
 
 
357
  }
358
 
359
+ // This owner already found?
360
+ if ( isset( $usercache[$owner] ) ) {
361
+ $result = $usercache[$owner];
362
  }
363
 
364
  // Get userdata
365
+ else {
366
+ $user = $email ? get_user_by( 'email', $owner ) : get_user_by( 'login', $owner );
367
+
368
+ // User exists
369
+ if ( $user ) {
370
+
371
+ // Buddypress link configured and available?
372
+ if ( wppa_switch( 'domain_link_buddypress' ) && function_exists( 'bp_core_get_userlink' ) ) {
373
+ $result = bp_core_get_userlink( $user->ID );
374
+ }
375
+ else {
376
+ $result = $user->display_name;
377
+ }
378
+ }
379
+
380
+ // User vanished
381
+ else {
382
+ $result = $owner;
383
  }
384
  }
385
 
386
+ // Cache the result
387
+ $usercache[$owner] = $result;
388
 
389
  // Filter
390
  if ( $esc_js ) {
393
 
394
  // Done
395
  return $result;
 
396
  }
397
 
398
  // Convert login name to displayname
399
  function wppa_display_name( $owner ) {
400
+
401
  // Init
402
  $result = $owner;
403
+
404
  // Get userdata
405
  $user = get_user_by( 'login', $owner );
406
  if ( ! $user ) {
407
  return $result; // User deleted
408
  }
409
+
410
+ return $user->display_name;
411
  }
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.8.09
7
  *
8
  */
9
 
@@ -3854,6 +3854,7 @@ function wppa_create_qrcode_cache( $qrsrc ) {
3854
  }
3855
  }
3856
 
 
3857
  function wppa_use_svg( $is_admin = false ) {
3858
  if ( wppa_is_ie() ) {
3859
  return false;
@@ -3864,58 +3865,672 @@ function wppa_use_svg( $is_admin = false ) {
3864
  return true;
3865
  }
3866
 
3867
- function wppa_get_spinner_svg_body_html() {
3868
- $result =
3869
- '<rect x="0" y="0" width="100" height="100" fill="none" class="bk" >' .
3870
- '</rect>' .
3871
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(0 50 50) translate(0 -32)">' .
3872
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0s" repeatCount="indefinite"/>' .
3873
- '</rect>' .
3874
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(22.5 50 50) translate(0 -32)">' .
3875
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.09375s" repeatCount="indefinite"/>' .
3876
- '</rect>' .
3877
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(45 50 50) translate(0 -32)">' .
3878
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.1875s" repeatCount="indefinite"/>' .
3879
- '</rect>' .
3880
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(67.5 50 50) translate(0 -32)">' .
3881
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.28125s" repeatCount="indefinite"/>' .
3882
- '</rect>' .
3883
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(90 50 50) translate(0 -32)">' .
3884
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.375s" repeatCount="indefinite"/>' .
3885
- '</rect>' .
3886
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(112.5 50 50) translate(0 -32)">' .
3887
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.46875s" repeatCount="indefinite"/>' .
3888
- '</rect>' .
3889
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(135 50 50) translate(0 -32)">' .
3890
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.5625s" repeatCount="indefinite"/>' .
3891
- '</rect>' .
3892
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(157.5 50 50) translate(0 -32)">' .
3893
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.65625s" repeatCount="indefinite"/>' .
3894
- '</rect>' .
3895
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(180 50 50) translate(0 -32)">' .
3896
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.75s" repeatCount="indefinite"/>' .
3897
- '</rect>' .
3898
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(202.5 50 50) translate(0 -32)">' .
3899
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.84375s" repeatCount="indefinite"/>' .
3900
- '</rect>' .
3901
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(225 50 50) translate(0 -32)">' .
3902
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.9375s" repeatCount="indefinite"/>' .
3903
- '</rect>' .
3904
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(247.5 50 50) translate(0 -32)">' .
3905
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.03125s" repeatCount="indefinite"/>' .
3906
- '</rect>' .
3907
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(270 50 50) translate(0 -32)">' .
3908
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.125s" repeatCount="indefinite"/>' .
3909
- '</rect>' .
3910
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(292.5 50 50) translate(0 -32)">' .
3911
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.21875s" repeatCount="indefinite"/>' .
3912
- '</rect>' .
3913
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(315 50 50) translate(0 -32)">' .
3914
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.3125s" repeatCount="indefinite"/>' .
3915
- '</rect>' .
3916
- '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(337.5 50 50) translate(0 -32)">' .
3917
- '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.40625s" repeatCount="indefinite"/>' .
3918
- '</rect>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3919
 
3920
  return $result;
3921
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.9.02
7
  *
8
  */
9
 
3854
  }
3855
  }
3856
 
3857
+
3858
  function wppa_use_svg( $is_admin = false ) {
3859
  if ( wppa_is_ie() ) {
3860
  return false;
3865
  return true;
3866
  }
3867
 
3868
+
3869
+ function wppa_get_spinner_svg_html( $xargs = array() ) {
3870
+
3871
+ $defaults = array(
3872
+ 'id' => 'wppa-spinner',
3873
+ 'class' => 'wppa-spinner',
3874
+ 'size' => '120',
3875
+ 'position' => 'fixed',
3876
+ 'lightbox' => false,
3877
+ 'display' => 'none',
3878
+ 'left' => '50%',
3879
+ 'top' => '50%',
3880
+ 'margin' => false,
3881
+ );
3882
+
3883
+ $args = wp_parse_args( $xargs, $defaults );
3884
+ if ( $args['margin'] === false ) $args['margin'] = $args['size'] / 2;
3885
+ $width = $args['size'];
3886
+ $height = $args['size'];
3887
+ $type = wppa_opt( 'spinner_shape' );
3888
+ $corner = wppa_opt( 'icon_corner_style' );
3889
+ $fgcol = $args['lightbox'] ? wppa_opt( 'ovl_svg_color' ) : wppa_opt( 'svg_color' );
3890
+ $bgcol = $args['lightbox'] ? wppa_opt( 'ovl_svg_bg_color' ) : wppa_opt( 'svg_bg_color' );
3891
+ $stcol = $fgcol;
3892
+
3893
+ // .svg requested and possible?
3894
+ if ( wppa_use_svg() ) {
3895
+ switch ( $type ) {
3896
+
3897
+ case 'audio':
3898
+ $viewbox = '0 0 55 80';
3899
+ $width = round( $args['size'] * 55 / 80 );
3900
+ break;
3901
+
3902
+ case 'ball-triangle':
3903
+ $viewbox = '0 0 57 57';
3904
+ break;
3905
+
3906
+ case 'bars':
3907
+ $viewbox = '0 0 135 140';
3908
+ $width = round( $args['size'] * 135 / 140 );
3909
+ break;
3910
+
3911
+ case 'circles':
3912
+ $viewbox = '0 0 135 135';
3913
+ $stcol = '';
3914
+ break;
3915
+
3916
+ case 'grid':
3917
+ $viewbox = '0 0 105 105';
3918
+ $stcol = '';
3919
+ break;
3920
+
3921
+ case 'hearts':
3922
+ $viewbox = '0 0 140 64';
3923
+ $height = round( $args['size'] * 64 / 140 );
3924
+ break;
3925
+
3926
+ case 'puff':
3927
+ $viewbox = '0 0 44 44';
3928
+ break;
3929
+
3930
+ case 'rings':
3931
+ $viewbox = '0 0 45 45';
3932
+ break;
3933
+
3934
+ case 'spinning-circles':
3935
+ $viewbox = '0 0 58 58';
3936
+ break;
3937
+
3938
+ case 'oval':
3939
+ case 'tail-spin':
3940
+ $viewbox = '0 0 38 38';
3941
+ break;
3942
+
3943
+ case 'three-dots':
3944
+ $viewbox = '0 0 120 30';
3945
+ $height = round( $args['size'] / 4 );
3946
+ break;
3947
+
3948
+ default:
3949
+ $viewbox = '0 0 100 100';
3950
+ $stcol = '';
3951
+ break;
3952
+ }
3953
+
3954
+ switch ( $corner ) {
3955
+ case 'gif':
3956
+ case 'none':
3957
+ $bradius = '0';
3958
+ break;
3959
+ case 'light':
3960
+ $bradius = round( $args['size'] / 10 );
3961
+ break;
3962
+ case 'medium':
3963
+ $bradius = round( $args['size'] / 5 );
3964
+ break;
3965
+ case 'heavy':
3966
+ $bradius = round( $args['size'] / 2 );
3967
+ break;
3968
+ }
3969
+
3970
+ $result =
3971
+ '<svg' .
3972
+ ' id="' . $args['id'] . '"' .
3973
+ ' class="' . $args['class'] . ' uil-default"' .
3974
+ ' width="' . $width . 'px"' .
3975
+ ' height="' . $height . 'px"' .
3976
+ ' xmlns="http://www.w3.org/2000/svg"' .
3977
+ ' viewBox="' . $viewbox . '"' .
3978
+ ' preserveAspectRatio="xMidYMid"' .
3979
+ ' stroke="' . $stcol . '"' .
3980
+ ' style="' .
3981
+ 'width:' . $width . 'px;' .
3982
+ 'height:' . $height . 'px;' .
3983
+ 'position:' . $args['position'] . ';' .
3984
+ 'top:' . $args['top'] . ';' .
3985
+ 'margin-top:-' . $args['margin'] . 'px;' .
3986
+ 'left:' . $args['left'] . ';' .
3987
+ 'margin-left:-' . $args['margin'] . 'px;' .
3988
+ 'z-index:100100;' .
3989
+ 'opacity:1;' .
3990
+ 'display:' . $args['display'] . ';' .
3991
+ 'fill:' . $fgcol . ';' .
3992
+ 'background-color:' . $bgcol . ';' .
3993
+ 'box-shadow:none;' .
3994
+ 'border-radius:' . $bradius .'px;' .
3995
+ '"' .
3996
+ ' >';
3997
+
3998
+ switch ( $type ) {
3999
+
4000
+ case 'audio':
4001
+ $result .=
4002
+ '<g transform="matrix(1 0 0 -1 0 80)">
4003
+ <rect width="10" height="20" rx="3">
4004
+ <animate attributeName="height"
4005
+ begin="0s" dur="4.3s"
4006
+ values="20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20" calcMode="linear"
4007
+ repeatCount="indefinite" />
4008
+ </rect>
4009
+ <rect x="15" width="10" height="80" rx="3">
4010
+ <animate attributeName="height"
4011
+ begin="0s" dur="2s"
4012
+ values="80;55;33;5;75;23;73;33;12;14;60;80" calcMode="linear"
4013
+ repeatCount="indefinite" />
4014
+ </rect>
4015
+ <rect x="30" width="10" height="50" rx="3">
4016
+ <animate attributeName="height"
4017
+ begin="0s" dur="1.4s"
4018
+ values="50;34;78;23;56;23;34;76;80;54;21;50" calcMode="linear"
4019
+ repeatCount="indefinite" />
4020
+ </rect>
4021
+ <rect x="45" width="10" height="30" rx="3">
4022
+ <animate attributeName="height"
4023
+ begin="0s" dur="2s"
4024
+ values="30;45;13;80;56;72;45;76;34;23;67;30" calcMode="linear"
4025
+ repeatCount="indefinite" />
4026
+ </rect>
4027
+ </g>';
4028
+ break;
4029
+
4030
+ case 'ball-triangle':
4031
+ $result .=
4032
+ '<g fill="none" fill-rule="evenodd">
4033
+ <g transform="translate(1 1)" stroke-width="2">
4034
+ <circle cx="5" cy="50" r="5">
4035
+ <animate attributeName="cy"
4036
+ begin="0s" dur="2.2s"
4037
+ values="50;5;50;50"
4038
+ calcMode="linear"
4039
+ repeatCount="indefinite" />
4040
+ <animate attributeName="cx"
4041
+ begin="0s" dur="2.2s"
4042
+ values="5;27;49;5"
4043
+ calcMode="linear"
4044
+ repeatCount="indefinite" />
4045
+ </circle>
4046
+ <circle cx="27" cy="5" r="5">
4047
+ <animate attributeName="cy"
4048
+ begin="0s" dur="2.2s"
4049
+ from="5" to="5"
4050
+ values="5;50;50;5"
4051
+ calcMode="linear"
4052
+ repeatCount="indefinite" />
4053
+ <animate attributeName="cx"
4054
+ begin="0s" dur="2.2s"
4055
+ from="27" to="27"
4056
+ values="27;49;5;27"
4057
+ calcMode="linear"
4058
+ repeatCount="indefinite" />
4059
+ </circle>
4060
+ <circle cx="49" cy="50" r="5">
4061
+ <animate attributeName="cy"
4062
+ begin="0s" dur="2.2s"
4063
+ values="50;50;5;50"
4064
+ calcMode="linear"
4065
+ repeatCount="indefinite" />
4066
+ <animate attributeName="cx"
4067
+ from="49" to="49"
4068
+ begin="0s" dur="2.2s"
4069
+ values="49;5;27;49"
4070
+ calcMode="linear"
4071
+ repeatCount="indefinite" />
4072
+ </circle>
4073
+ </g>
4074
+ </g>';
4075
+ break;
4076
+
4077
+ case 'bars':
4078
+ $result .=
4079
+ '<rect y="10" width="15" height="120" rx="6">
4080
+ <animate attributeName="height"
4081
+ begin="0.5s" dur="1s"
4082
+ values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear"
4083
+ repeatCount="indefinite" />
4084
+ <animate attributeName="y"
4085
+ begin="0.5s" dur="1s"
4086
+ values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear"
4087
+ repeatCount="indefinite" />
4088
+ </rect>
4089
+ <rect x="30" y="10" width="15" height="120" rx="6">
4090
+ <animate attributeName="height"
4091
+ begin="0.25s" dur="1s"
4092
+ values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear"
4093
+ repeatCount="indefinite" />
4094
+ <animate attributeName="y"
4095
+ begin="0.25s" dur="1s"
4096
+ values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear"
4097
+ repeatCount="indefinite" />
4098
+ </rect>
4099
+ <rect x="60" width="15" height="140" rx="6">
4100
+ <animate attributeName="height"
4101
+ begin="0s" dur="1s"
4102
+ values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear"
4103
+ repeatCount="indefinite" />
4104
+ <animate attributeName="y"
4105
+ begin="0s" dur="1s"
4106
+ values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear"
4107
+ repeatCount="indefinite" />
4108
+ </rect>
4109
+ <rect x="90" y="10" width="15" height="120" rx="6">
4110
+ <animate attributeName="height"
4111
+ begin="0.25s" dur="1s"
4112
+ values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear"
4113
+ repeatCount="indefinite" />
4114
+ <animate attributeName="y"
4115
+ begin="0.25s" dur="1s"
4116
+ values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear"
4117
+ repeatCount="indefinite" />
4118
+ </rect>
4119
+ <rect x="120" y="10" width="15" height="120" rx="6">
4120
+ <animate attributeName="height"
4121
+ begin="0.5s" dur="1s"
4122
+ values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear"
4123
+ repeatCount="indefinite" />
4124
+ <animate attributeName="y"
4125
+ begin="0.5s" dur="1s"
4126
+ values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear"
4127
+ repeatCount="indefinite" />
4128
+ </rect>';
4129
+ break;
4130
+
4131
+ case 'circles':
4132
+ $result .=
4133
+ '<path d="M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z">
4134
+ <animateTransform
4135
+ attributeName="transform"
4136
+ type="rotate"
4137
+ from="0 67 67"
4138
+ to="-360 67 67"
4139
+ dur="2.5s"
4140
+ repeatCount="indefinite"/>
4141
+ </path>
4142
+ <path d="M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z">
4143
+ <animateTransform
4144
+ attributeName="transform"
4145
+ type="rotate"
4146
+ from="0 67 67"
4147
+ to="360 67 67"
4148
+ dur="8s"
4149
+ repeatCount="indefinite"/>
4150
+ </path>';
4151
+ break;
4152
+
4153
+ case 'grid':
4154
+ $result .=
4155
+ '<circle cx="12.5" cy="12.5" r="12.5">
4156
+ <animate attributeName="fill-opacity"
4157
+ begin="0s" dur="1s"
4158
+ values="1;.2;1" calcMode="linear"
4159
+ repeatCount="indefinite" />
4160
+ </circle>
4161
+ <circle cx="12.5" cy="52.5" r="12.5" fill-opacity=".5">
4162
+ <animate attributeName="fill-opacity"
4163
+ begin="100ms" dur="1s"
4164
+ values="1;.2;1" calcMode="linear"
4165
+ repeatCount="indefinite" />
4166
+ </circle>
4167
+ <circle cx="52.5" cy="12.5" r="12.5">
4168
+ <animate attributeName="fill-opacity"
4169
+ begin="300ms" dur="1s"
4170
+ values="1;.2;1" calcMode="linear"
4171
+ repeatCount="indefinite" />
4172
+ </circle>
4173
+ <circle cx="52.5" cy="52.5" r="12.5">
4174
+ <animate attributeName="fill-opacity"
4175
+ begin="600ms" dur="1s"
4176
+ values="1;.2;1" calcMode="linear"
4177
+ repeatCount="indefinite" />
4178
+ </circle>
4179
+ <circle cx="92.5" cy="12.5" r="12.5">
4180
+ <animate attributeName="fill-opacity"
4181
+ begin="800ms" dur="1s"
4182
+ values="1;.2;1" calcMode="linear"
4183
+ repeatCount="indefinite" />
4184
+ </circle>
4185
+ <circle cx="92.5" cy="52.5" r="12.5">
4186
+ <animate attributeName="fill-opacity"
4187
+ begin="400ms" dur="1s"
4188
+ values="1;.2;1" calcMode="linear"
4189
+ repeatCount="indefinite" />
4190
+ </circle>
4191
+ <circle cx="12.5" cy="92.5" r="12.5">
4192
+ <animate attributeName="fill-opacity"
4193
+ begin="700ms" dur="1s"
4194
+ values="1;.2;1" calcMode="linear"
4195
+ repeatCount="indefinite" />
4196
+ </circle>
4197
+ <circle cx="52.5" cy="92.5" r="12.5">
4198
+ <animate attributeName="fill-opacity"
4199
+ begin="500ms" dur="1s"
4200
+ values="1;.2;1" calcMode="linear"
4201
+ repeatCount="indefinite" />
4202
+ </circle>
4203
+ <circle cx="92.5" cy="92.5" r="12.5">
4204
+ <animate attributeName="fill-opacity"
4205
+ begin="200ms" dur="1s"
4206
+ values="1;.2;1" calcMode="linear"
4207
+ repeatCount="indefinite" />
4208
+ </circle>';
4209
+ break;
4210
+
4211
+ case 'hearts':
4212
+ $result .=
4213
+ '<path d="M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.717-6.002 11.47-7.65 17.305-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z" fill-opacity=".5">
4214
+ <animate attributeName="fill-opacity"
4215
+ begin="0s" dur="1.4s"
4216
+ values="0.5;1;0.5"
4217
+ calcMode="linear"
4218
+ repeatCount="indefinite" />
4219
+ </path>
4220
+ <path d="M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.592-2.32 17.307 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z" fill-opacity=".5">
4221
+ <animate attributeName="fill-opacity"
4222
+ begin="0.7s" dur="1.4s"
4223
+ values="0.5;1;0.5"
4224
+ calcMode="linear"
4225
+ repeatCount="indefinite" />
4226
+ </path>
4227
+ <path d="M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z" />';
4228
+ break;
4229
+
4230
+ case 'oval':
4231
+ $result .=
4232
+ '<g fill="none" fill-rule="evenodd">
4233
+ <g transform="translate(1 1)" stroke-width="2">
4234
+ <circle stroke-opacity=".3" cx="18" cy="18" r="18"/>
4235
+ <path d="M36 18c0-9.94-8.06-18-18-18">
4236
+ <animateTransform
4237
+ attributeName="transform"
4238
+ type="rotate"
4239
+ from="0 18 18"
4240
+ to="360 18 18"
4241
+ dur="1s"
4242
+ repeatCount="indefinite"/>
4243
+ </path>
4244
+ </g>
4245
+ </g>';
4246
+ break;
4247
+
4248
+ case 'puff':
4249
+ $result .=
4250
+ '<g fill="none" fill-rule="evenodd" stroke-width="2">
4251
+ <circle cx="22" cy="22" r="1">
4252
+ <animate attributeName="r"
4253
+ begin="0s" dur="1.8s"
4254
+ values="1; 20"
4255
+ calcMode="spline"
4256
+ keyTimes="0; 1"
4257
+ keySplines="0.165, 0.84, 0.44, 1"
4258
+ repeatCount="indefinite" />
4259
+ <animate attributeName="stroke-opacity"
4260
+ begin="0s" dur="1.8s"
4261
+ values="1; 0"
4262
+ calcMode="spline"
4263
+ keyTimes="0; 1"
4264
+ keySplines="0.3, 0.61, 0.355, 1"
4265
+ repeatCount="indefinite" />
4266
+ </circle>
4267
+ <circle cx="22" cy="22" r="1">
4268
+ <animate attributeName="r"
4269
+ begin="-0.9s" dur="1.8s"
4270
+ values="1; 20"
4271
+ calcMode="spline"
4272
+ keyTimes="0; 1"
4273
+ keySplines="0.165, 0.84, 0.44, 1"
4274
+ repeatCount="indefinite" />
4275
+ <animate attributeName="stroke-opacity"
4276
+ begin="-0.9s" dur="1.8s"
4277
+ values="1; 0"
4278
+ calcMode="spline"
4279
+ keyTimes="0; 1"
4280
+ keySplines="0.3, 0.61, 0.355, 1"
4281
+ repeatCount="indefinite" />
4282
+ </circle>
4283
+ </g>';
4284
+ break;
4285
+
4286
+ case 'rings':
4287
+ $result .=
4288
+ '<g fill="none" fill-rule="evenodd" transform="translate(1 1)" stroke-width="2">
4289
+ <circle cx="22" cy="22" r="6" stroke-opacity="0">
4290
+ <animate attributeName="r"
4291
+ begin="1.5s" dur="3s"
4292
+ values="6;22"
4293
+ calcMode="linear"
4294
+ repeatCount="indefinite" />
4295
+ <animate attributeName="stroke-opacity"
4296
+ begin="1.5s" dur="3s"
4297
+ values="1;0" calcMode="linear"
4298
+ repeatCount="indefinite" />
4299
+ <animate attributeName="stroke-width"
4300
+ begin="1.5s" dur="3s"
4301
+ values="2;0" calcMode="linear"
4302
+ repeatCount="indefinite" />
4303
+ </circle>
4304
+ <circle cx="22" cy="22" r="6" stroke-opacity="0">
4305
+ <animate attributeName="r"
4306
+ begin="3s" dur="3s"
4307
+ values="6;22"
4308
+ calcMode="linear"
4309
+ repeatCount="indefinite" />
4310
+ <animate attributeName="stroke-opacity"
4311
+ begin="3s" dur="3s"
4312
+ values="1;0" calcMode="linear"
4313
+ repeatCount="indefinite" />
4314
+ <animate attributeName="stroke-width"
4315
+ begin="3s" dur="3s"
4316
+ values="2;0" calcMode="linear"
4317
+ repeatCount="indefinite" />
4318
+ </circle>
4319
+ <circle cx="22" cy="22" r="8">
4320
+ <animate attributeName="r"
4321
+ begin="0s" dur="1.5s"
4322
+ values="6;1;2;3;4;5;6"
4323
+ calcMode="linear"
4324
+ repeatCount="indefinite" />
4325
+ </circle>
4326
+ </g>';
4327
+ break;
4328
+
4329
+ case 'spinning-circles':
4330
+ $result .=
4331
+ '<g fill="none" fill-rule="evenodd">
4332
+ <g transform="translate(2 1)" stroke="' . $stcol . '" stroke-width="1.5">
4333
+ <circle cx="42.601" cy="11.462" r="5" fill-opacity="1" fill="' . $fgcol . '">
4334
+ <animate attributeName="fill-opacity"
4335
+ begin="0s" dur="1.3s"
4336
+ values="1;0;0;0;0;0;0;0" calcMode="linear"
4337
+ repeatCount="indefinite" />
4338
+ </circle>
4339
+ <circle cx="49.063" cy="27.063" r="5" fill-opacity="0" fill="' . $fgcol . '">
4340
+ <animate attributeName="fill-opacity"
4341
+ begin="0s" dur="1.3s"
4342
+ values="0;1;0;0;0;0;0;0" calcMode="linear"
4343
+ repeatCount="indefinite" />
4344
+ </circle>
4345
+ <circle cx="42.601" cy="42.663" r="5" fill-opacity="0" fill="' . $fgcol . '">
4346
+ <animate attributeName="fill-opacity"
4347
+ begin="0s" dur="1.3s"
4348
+ values="0;0;1;0;0;0;0;0" calcMode="linear"
4349
+ repeatCount="indefinite" />
4350
+ </circle>
4351
+ <circle cx="27" cy="49.125" r="5" fill-opacity="0" fill="' . $fgcol . '">
4352
+ <animate attributeName="fill-opacity"
4353
+ begin="0s" dur="1.3s"
4354
+ values="0;0;0;1;0;0;0;0" calcMode="linear"
4355
+ repeatCount="indefinite" />
4356
+ </circle>
4357
+ <circle cx="11.399" cy="42.663" r="5" fill-opacity="0" fill="' . $fgcol . '">
4358
+ <animate attributeName="fill-opacity"
4359
+ begin="0s" dur="1.3s"
4360
+ values="0;0;0;0;1;0;0;0" calcMode="linear"
4361
+ repeatCount="indefinite" />
4362
+ </circle>
4363
+ <circle cx="4.938" cy="27.063" r="5" fill-opacity="0" fill="' . $fgcol . '">
4364
+ <animate attributeName="fill-opacity"
4365
+ begin="0s" dur="1.3s"
4366
+ values="0;0;0;0;0;1;0;0" calcMode="linear"
4367
+ repeatCount="indefinite" />
4368
+ </circle>
4369
+ <circle cx="11.399" cy="11.462" r="5" fill-opacity="0" fill="' . $fgcol . '">
4370
+ <animate attributeName="fill-opacity"
4371
+ begin="0s" dur="1.3s"
4372
+ values="0;0;0;0;0;0;1;0" calcMode="linear"
4373
+ repeatCount="indefinite" />
4374
+ </circle>
4375
+ <circle cx="27" cy="5" r="5" fill-opacity="0" fill="' . $fgcol . '">
4376
+ <animate attributeName="fill-opacity"
4377
+ begin="0s" dur="1.3s"
4378
+ values="0;0;0;0;0;0;0;1" calcMode="linear"
4379
+ repeatCount="indefinite" />
4380
+ </circle>
4381
+ </g>
4382
+ </g>';
4383
+ break;
4384
+
4385
+ case 'tail-spin':
4386
+ $result .=
4387
+ '<defs>' .
4388
+ '<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">' .
4389
+ '<stop stop-color="#000" stop-opacity="0" offset="0%"/>' .
4390
+ '<stop stop-color="#000" stop-opacity=".631" offset="63.146%"/>' .
4391
+ '<stop stop-color="#000" offset="100%"/>' .
4392
+ '</linearGradient>' .
4393
+ '</defs>' .
4394
+ '<g fill="none" fill-rule="evenodd">' .
4395
+ '<g transform="translate(1 1)">' .
4396
+ '<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="' . $fgcol . '" stroke-width="2">' .
4397
+ '<animateTransform' .
4398
+ ' attributeName="transform"' .
4399
+ ' type="rotate"' .
4400
+ ' from="0 18 18"' .
4401
+ ' to="360 18 18"' .
4402
+ ' dur="1.25s"' .
4403
+ ' repeatCount="indefinite" />' .
4404
+ '</path>' .
4405
+ '<circle fill="' . $fgcol . '" cx="36" cy="18" r="1">' .
4406
+ '<animateTransform' .
4407
+ ' attributeName="transform"' .
4408
+ ' type="rotate"' .
4409
+ ' from="0 18 18"' .
4410
+ ' to="360 18 18"' .
4411
+ ' dur="1.25s"' .
4412
+ ' repeatCount="indefinite" />' .
4413
+ '</circle>' .
4414
+ '</g>' .
4415
+ '</g>';
4416
+ break;
4417
+
4418
+ case 'three-dots':
4419
+ $result .=
4420
+ '<circle cx="15" cy="15" r="15">
4421
+ <animate attributeName="r" from="15" to="15"
4422
+ begin="0s" dur="0.8s"
4423
+ values="15;9;15" calcMode="linear"
4424
+ repeatCount="indefinite" />
4425
+ <animate attributeName="fill-opacity" from="1" to="1"
4426
+ begin="0s" dur="0.8s"
4427
+ values="1;.5;1" calcMode="linear"
4428
+ repeatCount="indefinite" />
4429
+ </circle>
4430
+ <circle cx="60" cy="15" r="9" fill-opacity="0.3">
4431
+ <animate attributeName="r" from="9" to="9"
4432
+ begin="0s" dur="0.8s"
4433
+ values="9;15;9" calcMode="linear"
4434
+ repeatCount="indefinite" />
4435
+ <animate attributeName="fill-opacity" from="0.5" to="0.5"
4436
+ begin="0s" dur="0.8s"
4437
+ values=".5;1;.5" calcMode="linear"
4438
+ repeatCount="indefinite" />
4439
+ </circle>
4440
+ <circle cx="105" cy="15" r="15">
4441
+ <animate attributeName="r" from="15" to="15"
4442
+ begin="0s" dur="0.8s"
4443
+ values="15;9;15" calcMode="linear"
4444
+ repeatCount="indefinite" />
4445
+ <animate attributeName="fill-opacity" from="1" to="1"
4446
+ begin="0s" dur="0.8s"
4447
+ values="1;.5;1" calcMode="linear"
4448
+ repeatCount="indefinite" />
4449
+ </circle>';
4450
+ break;
4451
+
4452
+ default:
4453
+ $result .=
4454
+ '<rect x="0" y="0" width="100" height="100" fill="none" class="bk" >' .
4455
+ '</rect>' .
4456
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(0 50 50) translate(0 -32)">' .
4457
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0s" repeatCount="indefinite"/>' .
4458
+ '</rect>' .
4459
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(22.5 50 50) translate(0 -32)">' .
4460
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.09375s" repeatCount="indefinite"/>' .
4461
+ '</rect>' .
4462
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(45 50 50) translate(0 -32)">' .
4463
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.1875s" repeatCount="indefinite"/>' .
4464
+ '</rect>' .
4465
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(67.5 50 50) translate(0 -32)">' .
4466
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.28125s" repeatCount="indefinite"/>' .
4467
+ '</rect>' .
4468
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(90 50 50) translate(0 -32)">' .
4469
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.375s" repeatCount="indefinite"/>' .
4470
+ '</rect>' .
4471
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(112.5 50 50) translate(0 -32)">' .
4472
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.46875s" repeatCount="indefinite"/>' .
4473
+ '</rect>' .
4474
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(135 50 50) translate(0 -32)">' .
4475
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.5625s" repeatCount="indefinite"/>' .
4476
+ '</rect>' .
4477
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(157.5 50 50) translate(0 -32)">' .
4478
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.65625s" repeatCount="indefinite"/>' .
4479
+ '</rect>' .
4480
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(180 50 50) translate(0 -32)">' .
4481
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.75s" repeatCount="indefinite"/>' .
4482
+ '</rect>' .
4483
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(202.5 50 50) translate(0 -32)">' .
4484
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.84375s" repeatCount="indefinite"/>' .
4485
+ '</rect>' .
4486
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(225 50 50) translate(0 -32)">' .
4487
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="0.9375s" repeatCount="indefinite"/>' .
4488
+ '</rect>' .
4489
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(247.5 50 50) translate(0 -32)">' .
4490
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.03125s" repeatCount="indefinite"/>' .
4491
+ '</rect>' .
4492
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(270 50 50) translate(0 -32)">' .
4493
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.125s" repeatCount="indefinite"/>' .
4494
+ '</rect>' .
4495
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(292.5 50 50) translate(0 -32)">' .
4496
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.21875s" repeatCount="indefinite"/>' .
4497
+ '</rect>' .
4498
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(315 50 50) translate(0 -32)">' .
4499
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.3125s" repeatCount="indefinite"/>' .
4500
+ '</rect>' .
4501
+ '<rect class="wppa-ajaxspin" x="47" y="40" width="6" height="20" rx="3" ry="3" transform="rotate(337.5 50 50) translate(0 -32)">' .
4502
+ '<animate attributeName="opacity" from="1" to="0" dur="1.5s" begin="1.40625s" repeatCount="indefinite"/>' .
4503
+ '</rect>';
4504
+ break;
4505
+
4506
+ }
4507
+ $result .= '</svg>';
4508
+ }
4509
+
4510
+ // No .svg possible / requested, default to .gif
4511
+ else {
4512
+ $result =
4513
+ '<img' .
4514
+ ' id="' . $args['id'] . '"' .
4515
+ ' src="' . wppa_get_imgdir() . 'loader.gif"' .
4516
+ ' class="' . $args['class'] . ' wppa-ajax-spin"' .
4517
+ ' alt="spinner"' .
4518
+ ' style="' .
4519
+ 'width:' . $args['size'] . 'px;' .
4520
+ 'height:' . $args['size'] . 'px;' .
4521
+ 'position:' . $args['position'] . ';' .
4522
+ 'top:' . $args['top'] . ';' .
4523
+ 'margin-top:-' . $args['margin'] . 'px;' .
4524
+ 'left:' . $args['left'] . ';' .
4525
+ 'margin-left:-' . $args['margin'] . 'px;' .
4526
+ 'z-index:100100;' .
4527
+ 'opacity:1;' .
4528
+ 'display:' . $args['display'] . ';' .
4529
+ 'background-color:' . $bgcol . ';' .
4530
+ 'box-shadow:none;' .
4531
+ '"' .
4532
+ ' />';
4533
+ }
4534
 
4535
  return $result;
4536
  }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.9.01.003
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6901'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-9-01-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.9.02.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6902'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-9-02-004'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );