WP Photo Album Plus - Version 6.9.08

Version Description

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.
Download this release

Release Info

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

Code changes from version 6.9.07 to 6.9.08

changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 6.9.07 =
4
 
5
  = Bug Fixes =
@@ -9,7 +19,7 @@ WP Photo Album Plus Changelog
9
 
10
  = New Features =
11
 
12
- * Panorama images phase 1: 360 deg spherical panorama photos can be displayed as any of the three single image types.
13
  Tick Table IV-A24.2 and a selectionbox will appear on the photo admin page at every photo.
14
 
15
  = Other Changes =
1
  WP Photo Album Plus Changelog
2
 
3
+ = 6.9.08 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * When lightbox global was the only wppa activity on the page and javascript deferred, lightbox did not work. Fixed.
8
+
9
+ = New Features =
10
+
11
+ * Panorama images phase II: Non 360 flat panorama photos can be displayed as any of the three single image types.
12
+
13
  = 6.9.07 =
14
 
15
  = Bug Fixes =
19
 
20
  = New Features =
21
 
22
+ * Panorama images phase I: 360 deg spherical panorama photos can be displayed as any of the three single image types.
23
  Tick Table IV-A24.2 and a selectionbox will appear on the photo admin page at every photo.
24
 
25
  = Other Changes =
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsUtilsVersion = '6.9.06';
6
  var wppaDebug;
7
 
8
  // Trim
@@ -435,11 +435,11 @@ function wppaMakeLazyVisible() {
435
  var d = new Date();
436
  var n = d.getTime();
437
  if ( n < ( wppaLastLazy + 200 ) ) {
438
- wppaConsoleLog( 'MakeLazyVisible() skipped' );
439
  return;
440
  }
441
-
442
- wppaConsoleLog( 'MakeLazyVisible()' );
443
  var src;
444
 
445
  jQuery( '.wppa-lazy' ).each( function() {
@@ -450,7 +450,7 @@ function wppaMakeLazyVisible() {
450
  jQuery( this ).removeClass( 'wppa-lazy' );
451
  }
452
  });
453
-
454
  wppaLastLazy = n;
455
  }
456
 
@@ -474,7 +474,7 @@ function wppaIsElementInViewport( elm ) {
474
  function wppaSizeThumbArea() {
475
 
476
  if ( wppaThumbAreaMaxFrac > 0 && wppaThumbAreaMaxFrac < 1 ) {
477
- wppaConsoleLog( 'SizeThumbArea()' );
478
  jQuery('.wppa-thumb-area').css('max-height',(jQuery(window).height()*wppaThumbAreaMaxFrac));
479
  }
480
  }
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsUtilsVersion = '6.9.08';
6
  var wppaDebug;
7
 
8
  // Trim
435
  var d = new Date();
436
  var n = d.getTime();
437
  if ( n < ( wppaLastLazy + 200 ) ) {
438
+ // wppaConsoleLog( 'MakeLazyVisible() skipped' );
439
  return;
440
  }
441
+
442
+ // wppaConsoleLog( 'MakeLazyVisible()' );
443
  var src;
444
 
445
  jQuery( '.wppa-lazy' ).each( function() {
450
  jQuery( this ).removeClass( 'wppa-lazy' );
451
  }
452
  });
453
+
454
  wppaLastLazy = n;
455
  }
456
 
474
  function wppaSizeThumbArea() {
475
 
476
  if ( wppaThumbAreaMaxFrac > 0 && wppaThumbAreaMaxFrac < 1 ) {
477
+ // wppaConsoleLog( 'SizeThumbArea()' );
478
  jQuery('.wppa-thumb-area').css('max-height',(jQuery(window).height()*wppaThumbAreaMaxFrac));
479
  }
480
  }
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaJsUtilsVersion="6.9.06";function wppaTrim(e,a){return wppaTrimRight(wppaTrimLeft(e,a),a)}function wppaTrimLeft(e,a){var t,r,o,p,n,s,i;switch(typeof a){case"string":for(r=(t=e).length,o=a.length;o<=r&&t.substr(0,o)==a;)r=(t=t.substr(o)).length;break;case"object":for(n=!1,i=e;!n;){for(p=0,s=i;p<a.length;)i=wppaTrimLeft(i,a[p]),p++;n=s==i}t=i;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,r,o,p,n,s,i;switch(typeof a){case"string":for(r=(t=e).length,o=a.length;o<=r&&t.substr(r-o)==a;)r=(t=t.substr(0,r-o)).length;break;case"object":for(n=!1,i=e;!n;){for(p=0,s=i;p<a.length;)i=wppaTrimRight(i,a[p]),p++;n=s==i}t=i;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var r=new Date;r.setDate(r.getDate()+t);var o=escape(a)+(null==t?"":"; expires="+r.toUTCString());document.cookie=e+"="+o}function wppa_getCookie(e){var a,t,r,o=document.cookie.split(";");for(a=0;a<o.length;a++)if(t=o[a].substr(0,o[a].indexOf("=")),r=o[a].substr(o[a].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){if("undefined"!=typeof console&&(wppaDebug||"force"==a)){var t=(new Date).getTime()%864e5,r=Math.floor(t/36e5);t-=60*r*60*1e3;var o=Math.floor(t/6e4);t-=60*o*1e3;var p=Math.floor(t/1e3);t-=1e3*p,console.log("At: "+r+":"+o+":"+p+"."+t+" message: "+e)}}function wppaConvertScriptToShortcode(e,a){var t,r,o,p,n,s,l,c,u,w;if("string"!=typeof(t=jQuery("#"+e).val())||0==t.length)return jQuery("#"+a).val("No script found"),void jQuery("#"+a).css("color","red");if(workarr=t.split("%%"),"wppa"!=workarr[1]||workarr.length<3)return jQuery("#"+a).val("No %%wppa%% found"),void jQuery("#"+a).css("color","red");for(i=3;i<workarr.length;i+=2)if(o=(r=workarr[i].split("="))[0],p=r[1],o&&p)switch(o){case"size":c=p;break;case"align":u=p;break;case"photo":case"mphoto":case"slphoto":n=o,l=p;break;case"album":case"cover":case"slide":case"slideonly":case"slideonlyf":case"slidef":n=o,s=p;break;default:return jQuery("#"+a).val('Token "'+workarr[i]+'" not recognized'),void jQuery("#"+a).css("color","red")}w="[wppa",n&&0<n.length&&(w+=' type="'+n+'"'),s&&0<s.length&&(w+=' album="'+s+'"'),l&&0<l.length&&(w+=' photo="'+l+'"'),c&&0<c.length&&(w+=' size="'+c+'"'),u&&0<u.length&&(w+=' align="'+u+'"'),w+="][/wppa]",jQuery("#"+a).val(w),jQuery("#"+a).css("color","green"),document.getElementById(a).focus(),document.getElementById(a).select()}function wppaSvgHtml(e,a,t,r,o,p,n,s){var i,l,c;switch(o||(o="0"),p||(p="10"),n||(n="20"),s||(s="50"),!1,wppaSvgCornerStyle){case"gif":case"none":radius=o;break;case"light":radius=p;break;case"medium":radius=n;break;case"heavy":radius=s}a||(a="32px"),t?(i=wppaOvlSvgFillcolor,l=wppaOvlSvgBgcolor):(i=wppaSvgFillcolor,l=wppaSvgBgcolor),c=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(a?"height:"+a+";":"")+"fill:"+i+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+c+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+a+";fill:"+i+";background-color:"+l+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e,a=(new Date).getTime();a<wppaLastLazy+200?wppaConsoleLog("MakeLazyVisible() skipped"):(wppaConsoleLog("MakeLazyVisible()"),jQuery(".wppa-lazy").each(function(){e=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))}),wppaLastLazy=a)}function wppaIsElementInViewport(e){var a=e.getBoundingClientRect();return!a||0<a.bottom&&0<a.right&&a.left<jQuery(window).width()&&a.top<jQuery(window).height()}function wppaSizeThumbArea(){0<wppaThumbAreaMaxFrac&&wppaThumbAreaMaxFrac<1&&(wppaConsoleLog("SizeThumbArea()"),jQuery(".wppa-thumb-area").css("max-height",jQuery(window).height()*wppaThumbAreaMaxFrac))}function wppaIconSize(e,a,t){var r=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?a:(wppaIsMini[e]?r/2:r)+"px;"}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
1
+ var wppaDebug,wppaJsUtilsVersion="6.9.08";function wppaTrim(e,a){return wppaTrimRight(wppaTrimLeft(e,a),a)}function wppaTrimLeft(e,a){var t,r,o,p,n,s,i;switch(typeof a){case"string":for(r=(t=e).length,o=a.length;o<=r&&t.substr(0,o)==a;)r=(t=t.substr(o)).length;break;case"object":for(n=!1,i=e;!n;){for(p=0,s=i;p<a.length;)i=wppaTrimLeft(i,a[p]),p++;n=s==i}t=i;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,r,o,p,n,s,i;switch(typeof a){case"string":for(r=(t=e).length,o=a.length;o<=r&&t.substr(r-o)==a;)r=(t=t.substr(0,r-o)).length;break;case"object":for(n=!1,i=e;!n;){for(p=0,s=i;p<a.length;)i=wppaTrimRight(i,a[p]),p++;n=s==i}t=i;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var r=new Date;r.setDate(r.getDate()+t);var o=escape(a)+(null==t?"":"; expires="+r.toUTCString());document.cookie=e+"="+o}function wppa_getCookie(e){var a,t,r,o=document.cookie.split(";");for(a=0;a<o.length;a++)if(t=o[a].substr(0,o[a].indexOf("=")),r=o[a].substr(o[a].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){if("undefined"!=typeof console&&(wppaDebug||"force"==a)){var t=(new Date).getTime()%864e5,r=Math.floor(t/36e5);t-=60*r*60*1e3;var o=Math.floor(t/6e4);t-=60*o*1e3;var p=Math.floor(t/1e3);t-=1e3*p,console.log("At: "+r+":"+o+":"+p+"."+t+" message: "+e)}}function wppaConvertScriptToShortcode(e,a){var t,r,o,p,n,s,l,c,u,w;if("string"!=typeof(t=jQuery("#"+e).val())||0==t.length)return jQuery("#"+a).val("No script found"),void jQuery("#"+a).css("color","red");if(workarr=t.split("%%"),"wppa"!=workarr[1]||workarr.length<3)return jQuery("#"+a).val("No %%wppa%% found"),void jQuery("#"+a).css("color","red");for(i=3;i<workarr.length;i+=2)if(o=(r=workarr[i].split("="))[0],p=r[1],o&&p)switch(o){case"size":c=p;break;case"align":u=p;break;case"photo":case"mphoto":case"slphoto":n=o,l=p;break;case"album":case"cover":case"slide":case"slideonly":case"slideonlyf":case"slidef":n=o,s=p;break;default:return jQuery("#"+a).val('Token "'+workarr[i]+'" not recognized'),void jQuery("#"+a).css("color","red")}w="[wppa",n&&0<n.length&&(w+=' type="'+n+'"'),s&&0<s.length&&(w+=' album="'+s+'"'),l&&0<l.length&&(w+=' photo="'+l+'"'),c&&0<c.length&&(w+=' size="'+c+'"'),u&&0<u.length&&(w+=' align="'+u+'"'),w+="][/wppa]",jQuery("#"+a).val(w),jQuery("#"+a).css("color","green"),document.getElementById(a).focus(),document.getElementById(a).select()}function wppaSvgHtml(e,a,t,r,o,p,n,s){var i,l,c;switch(o||(o="0"),p||(p="10"),n||(n="20"),s||(s="50"),!1,wppaSvgCornerStyle){case"gif":case"none":radius=o;break;case"light":radius=p;break;case"medium":radius=n;break;case"heavy":radius=s}a||(a="32px"),t?(i=wppaOvlSvgFillcolor,l=wppaOvlSvgBgcolor):(i=wppaSvgFillcolor,l=wppaSvgBgcolor),c=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(a?"height:"+a+";":"")+"fill:"+i+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+c+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+a+";fill:"+i+";background-color:"+l+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e,a=(new Date).getTime();a<wppaLastLazy+200||(jQuery(".wppa-lazy").each(function(){e=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))}),wppaLastLazy=a)}function wppaIsElementInViewport(e){var a=e.getBoundingClientRect();return!a||0<a.bottom&&0<a.right&&a.left<jQuery(window).width()&&a.top<jQuery(window).height()}function wppaSizeThumbArea(){0<wppaThumbAreaMaxFrac&&wppaThumbAreaMaxFrac<1&&jQuery(".wppa-thumb-area").css("max-height",jQuery(window).height()*wppaThumbAreaMaxFrac)}function wppaIconSize(e,a,t){var r=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?a:(wppaIsMini[e]?r/2:r)+"px;"}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.9.06';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
@@ -729,59 +729,6 @@ function wppaFotomotoHide( mocc ) {
729
  jQuery( '#wppa-fotomoto-checkout-'+mocc ).css( 'display','none' );
730
  }
731
 
732
- // Compute fullsize ( slideshow ) url with current photo
733
- /* obsolete
734
- function wppaGetCurrentFullUrl( mocc, idx ) {
735
-
736
- var xurl = document.location.href;
737
- var url;
738
-
739
- // Remove &wppa-photo=... if present.
740
- var temp1 = xurl.split( "?" );
741
- var temp2 = 'nil';
742
- var temp3;
743
- var i = 0;
744
- var first = true;
745
- var pfx;
746
-
747
- if ( ! wppaShortQargs ) pfx = 'wppa-';
748
- else pfx = '';
749
-
750
- if ( temp1[1] ) temp2 = temp1[1].split( "&" );
751
-
752
- var albumSeen = false;
753
- url = temp1[0]; // everything before '?'
754
- if ( temp2 != 'nil' ) {
755
- if ( temp2.length > 0 ) {
756
- while ( i<temp2.length ) {
757
- temp3 = temp2[i].split( "=" );
758
- if ( temp3[0] == pfx+'album' ) albumSeen = true;
759
- if ( temp3[0] != pfx+'photo' ) {
760
- if ( first ) url += "?";
761
- else url += "&";
762
- first = false;
763
- url += temp2[i];
764
- }
765
- i++;
766
- }
767
- }
768
- }
769
- if ( ! albumSeen ) return '';
770
-
771
- // Append new &wppa-photo=...
772
- if ( first ) url += "?";
773
- else url += "&";
774
- if ( wppaUsePhotoNamesInUrls ) { //&& ! wppaStringContainsForbiddenChars( _wppaNames[mocc][idx] ) ) {
775
- url += pfx+'photo='+encodeURIComponent(_wppaNames[mocc][idx]);
776
- }
777
- else {
778
- url += pfx+'photo='+_wppaId[mocc][idx];
779
- }
780
-
781
- return url;
782
- }
783
- */
784
-
785
  // Sanitize utility
786
  function wppaStringContainsForbiddenChars( str ) {
787
  var forbidden = [ '?', '&', '#', '/', '"', "'" ];
@@ -814,7 +761,7 @@ window.onpopstate = function( event ) {
814
  }
815
  }
816
  else if ( wppaUpdateAddressLine ) {
817
- /**/
818
  occ = wppaFirstOccur;
819
  // Restore first modified occurrences content
820
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.9.08';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
729
  jQuery( '#wppa-fotomoto-checkout-'+mocc ).css( 'display','none' );
730
  }
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  // Sanitize utility
733
  function wppaStringContainsForbiddenChars( str ) {
734
  var forbidden = [ '?', '&', '#', '/', '"', "'" ];
761
  }
762
  }
763
  else if ( wppaUpdateAddressLine ) {
764
+
765
  occ = wppaFirstOccur;
766
  // Restore first modified occurrences content
767
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="6.9.06",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaProcessing="Processing...",wppaDone="Done!",wppaUploadFailed="Upload failed",wppaServerError="Server error",wppaGeoZoom=10,wppaLazyLoad=!0,wppaThumbAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeThumbArea),wppaSizeThumbArea(),jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible(),wppaProtect()}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(1<t.length){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,r=o-1;e=parseInt((a+8)/o-8);for(var s=0;s<t.length;){switch(s%o){case 0:jQuery(t[s]).css({marginLeft:"0px",clear:"both",float:"left"});break;case r:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"left"})}s++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,l=parseInt(n/(i+wppaMinThumbSpace)),w=parseInt(.5+(n-l*i)/(l+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:w})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=p.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="6.9.08",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaProcessing="Processing...",wppaDone="Done!",wppaUploadFailed="Upload failed",wppaServerError="Server error",wppaGeoZoom=10,wppaLazyLoad=!0,wppaThumbAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeThumbArea),wppaSizeThumbArea(),jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible(),wppaProtect()}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(1<t.length){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,r=o-1;e=parseInt((a+8)/o-8);for(var s=0;s<t.length;){switch(s%o){case 0:jQuery(t[s]).css({marginLeft:"0px",clear:"both",float:"left"});break;case r:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"left"})}s++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,l=parseInt(n/(i+wppaMinThumbSpace)),w=parseInt(.5+(n-l*i)/(l+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:w})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=p.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
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.07
6
- Stable tag: 6.9.06
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,8 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
140
  * This version addresses various minor bug fixes and feature requests.
141
- * 360 deg panorama implemented.
142
 
143
  = 6.9.07 =
144
 
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.08
6
+ Stable tag: 6.9.07
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.08 =
141
+
142
  * This version addresses various minor bug fixes and feature requests.
143
+ * Panorama support phase II.
144
 
145
  = 6.9.07 =
146
 
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.9.07
7
  *
8
  */
9
 
@@ -506,16 +506,19 @@ function wppa_lightbox_global( $content ) {
506
  if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) { // Our lightbox
507
  if ( wppa_switch( 'lightbox_global_set' ) ) { // A set
508
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
509
- // $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
510
  $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
511
  $content = preg_replace($pattern, $replacement, $content);
512
  }
513
  else { // Not a set
514
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
515
- // $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
516
  $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
517
  $content = preg_replace($pattern, $replacement, $content);
518
  }
 
 
 
 
 
519
  }
520
  }
521
  return $content;
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 6.9.08
7
  *
8
  */
9
 
506
  if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) { // Our lightbox
507
  if ( wppa_switch( 'lightbox_global_set' ) ) { // A set
508
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
 
509
  $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
510
  $content = preg_replace($pattern, $replacement, $content);
511
  }
512
  else { // Not a set
513
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
 
514
  $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
515
  $content = preg_replace($pattern, $replacement, $content);
516
  }
517
+
518
+ // If any lightbox global occurred on this page, make sure we load (deferred) js filesize
519
+ if ( strpos( $content, 'data-rel="wppa"' ) !== false ) {
520
+ wppa_bump_mocc();
521
+ }
522
  }
523
  }
524
  return $content;
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.9.07
7
  *
8
  */
9
 
@@ -536,6 +536,8 @@ function wppaToggleExif( id, count ) {
536
  $linktitle = stripslashes( $photo['linktitle'] );
537
  $alt = stripslashes( $photo['alt'] );
538
  $filename = $photo['filename'];
 
 
539
  $videox = $photo['videox'];
540
  $videoy = $photo['videoy'];
541
  $location = $photo['location'];
@@ -1155,15 +1157,17 @@ function wppaToggleExif( id, count ) {
1155
 
1156
  // Panorama
1157
  if ( wppa_switch( 'enable_panorama' ) ) {
 
1158
  echo
1159
  __( 'Panorama' ) . ': ' .
1160
- '<select' .
1161
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this )"' .
1162
- ' >' .
1163
- '<option value="0"' . ( $panorama == '0' ? ' selected="selected"' : '' ) . ' >' . __( '- none -', 'wp-photo-album-plus' ) . '</option>' .
1164
- '<option value="1"' . ( $panorama == '1' ? ' selected="selected"' : '' ) . ' >' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>' .
1165
- // '<option value="2"' . ( $panorama == '2' ? ' selected="selected"' : '' ) . ' >' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>' .
1166
- ' />';
 
1167
  }
1168
 
1169
  // Watermark
@@ -1177,7 +1181,7 @@ function wppaToggleExif( id, count ) {
1177
  $user = wppa_get_user();
1178
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1179
  echo
1180
- __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1181
  echo
1182
  '<select' .
1183
  ' id="wmfsel_' . $id . '"' .
@@ -1185,7 +1189,7 @@ function wppaToggleExif( id, count ) {
1185
  ' >' .
1186
  wppa_watermark_file_select( 'user', $album ) .
1187
  '</select>' .
1188
- __( 'Pos:', 'wp-photo-album-plus' ) . ' ' .
1189
  '<select' .
1190
  ' id="wmpsel_' . $id . '"' .
1191
  ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this );"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.9.08
7
  *
8
  */
9
 
536
  $linktitle = stripslashes( $photo['linktitle'] );
537
  $alt = stripslashes( $photo['alt'] );
538
  $filename = $photo['filename'];
539
+ $photox = $photo['photox'];
540
+ $photoy = $photo['photoy'];
541
  $videox = $photo['videox'];
542
  $videoy = $photo['videoy'];
543
  $location = $photo['location'];
1157
 
1158
  // Panorama
1159
  if ( wppa_switch( 'enable_panorama' ) ) {
1160
+ $can_panorama = $photox / $photoy >= 1.999;
1161
  echo
1162
  __( 'Panorama' ) . ': ' .
1163
+ ( $can_panorama ?
1164
+ '<select onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this )" >' .
1165
+ '<option value="0"' . ( $panorama == '0' ? ' selected="selected"' : '' ) . ' >' . __( '- none -', 'wp-photo-album-plus' ) . '</option>' .
1166
+ '<option value="1"' . ( $panorama == '1' ? ' selected="selected"' : '' ) . ' >' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>' .
1167
+ '<option value="2"' . ( $panorama == '2' ? ' selected="selected"' : '' ) . ' >' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>' .
1168
+ '</select>' :
1169
+ __( 'Too narrow.', 'wp-photo-album-plus' )
1170
+ );
1171
  }
1172
 
1173
  // Watermark
1181
  $user = wppa_get_user();
1182
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1183
  echo
1184
+ ' ' . __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1185
  echo
1186
  '<select' .
1187
  ' id="wmfsel_' . $id . '"' .
1189
  ' >' .
1190
  wppa_watermark_file_select( 'user', $album ) .
1191
  '</select>' .
1192
+ ' ' . __( 'Pos:', 'wp-photo-album-plus' ) . ' ' .
1193
  '<select' .
1194
  ' id="wmpsel_' . $id . '"' .
1195
  ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this );"' .
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 6.9.07
7
  *
8
  */
9
 
@@ -278,11 +278,11 @@ function wppa_get_picture_html( $args ) {
278
 
279
  // Get the html for a panorama image
280
  function wppa_get_panorama_html( $args ) {
281
-
282
  if ( ! isset( $args['id'] ) ) return;
283
-
284
  switch( wppa_is_panorama( $args['id'] ) ) {
285
-
286
  case '1':
287
  $result = wppa_get_spheric_panorama_html( $args );
288
  break;
@@ -290,15 +290,15 @@ function wppa_get_panorama_html( $args ) {
290
  $result = wppa_get_flat_panorama_html( $args );
291
  break;
292
  default:
293
- $result = '';
294
  }
295
-
296
  return $result;
297
  }
298
 
299
  // Spheric 360deg panorama
300
  function wppa_get_spheric_panorama_html( $args ) {
301
-
302
  // Init
303
  $defaults = array( 'id' => '0',
304
  'mocc' => '0',
@@ -314,16 +314,16 @@ function wppa_get_spheric_panorama_html( $args ) {
314
  $width = $args['width'] ? $args['width'] : wppa_get_container_width();
315
  $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
316
  $haslink = $args['haslink'];
317
- $iconsize = '32px';
318
 
319
- $url = wppa_get_hires_url( $id );
320
 
321
  $result =
322
  ( $haslink ? '</a>' : '' ) .
323
  '<div' .
324
  ' id="wppa-panorama-div-' . $mocc . '"' .
325
  ' class="wppa-panorama-div wppa-panorama-div-' . $mocc . '"' .
326
- ' style="margin-bottom:4px;"' .
327
  ' >' .
328
  '</div>' .
329
  '<div' .
@@ -341,7 +341,7 @@ function wppa_get_spheric_panorama_html( $args ) {
341
  ' id="wppa-panoramacontrol-right-' . $mocc . '"' .
342
  ' style="margin:2px;"' .
343
  ' >' .
344
- wppa_get_svghtml( 'Right-4', $iconsize ) .
345
  '</span>' .
346
  '<span' .
347
  ' id="wppa-panoramacontrol-up-' . $mocc . '"' .
@@ -437,10 +437,11 @@ function wppa_get_spheric_panorama_html( $args ) {
437
  'zoomin.addEventListener("touchend", function(){run=false;deltaFov=0}, false);' .
438
  'zoomout.addEventListener("touchstart", function(){run=true;deltaFov=0.2;doZoom();render();}, false);' .
439
  'zoomout.addEventListener("touchend", function(){run=false;deltaFov=0}, false);'
440
- :
441
  'div.addEventListener("mousedown", onDivMouseDown, false);' .
442
  'div.addEventListener("mousemove", onDivMouseMove, false);' .
443
  'div.addEventListener("mouseup", onDivMouseUp, false);' .
 
444
  'right.addEventListener("mousedown", function(){run=true;deltaX=0.2;render();}, false);' .
445
  'right.addEventListener("mouseup", function(){run=false;deltaX=0}, false);' .
446
  'left.addEventListener("mousedown", function(){run=true;deltaX=-0.2;render();}, false);' .
@@ -454,7 +455,7 @@ function wppa_get_spheric_panorama_html( $args ) {
454
  'zoomout.addEventListener("mousedown", function(){run=true;deltaFov=0.2;doZoom();render();}, false);' .
455
  'zoomout.addEventListener("mouseup", function(){run=false;deltaFov=0}, false);'
456
  ) .
457
-
458
  // Init and Resize hanler
459
  'jQuery(window).on("DOMContentLoaded load resize scroll",onResize' . $mocc . ');' .
460
 
@@ -534,7 +535,7 @@ function wppa_get_spheric_panorama_html( $args ) {
534
  run=false;
535
 
536
  }' .
537
-
538
  // When a (responsive) resize is required, we resize the scene
539
  'function onResize' . $mocc . '(event){
540
  var containerwidth = div.parentNode.clientWidth;
@@ -545,7 +546,7 @@ function wppa_get_spheric_panorama_html( $args ) {
545
  render();
546
  doZoom();
547
  run=false;
548
-
549
  }' .
550
 
551
  '});
@@ -558,7 +559,7 @@ function wppa_get_spheric_panorama_html( $args ) {
558
 
559
  // Non 360 flat panorama
560
  function wppa_get_flat_panorama_html( $args ) {
561
-
562
  // Init
563
  $defaults = array( 'id' => '0',
564
  'mocc' => '0',
@@ -574,35 +575,39 @@ function wppa_get_flat_panorama_html( $args ) {
574
  $width = $args['width'] ? $args['width'] : wppa_get_container_width();
575
  $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
576
  $haslink = $args['haslink'];
577
- $iconsize = '32px';
578
 
579
- $url = wppa_get_hires_url( $id );
580
 
581
  $result =
582
  ( $haslink ? '</a>' : '' ) .
583
-
584
  // The container
585
  '<div' .
586
  ' id="wppa-panorama-div-' . $mocc . '"' .
587
  ' class="wppa-panorama-div wppa-panorama-div-' . $mocc . '"' .
588
  ' style="margin-bottom:4px;"' .
589
  ' >' .
590
-
591
  // The actual drawing area
592
  '<canvas' .
593
  ' id="wppa-panorama-canvas-' . $mocc . '"' .
594
- ' style="width:100%;height:50%;"' .
595
- ' >' .
 
 
596
  '</canvas>' .
597
-
598
- // The hidden image
599
- '<img' .
600
- ' id="wppa-panorama-img-' . $mocc . '"' .
601
- ' src="' . $url . '"' .
602
- ' style="display:none;position:fixed;max-width:100000px;max-height:10000px;"' .
 
603
  ' />' .
 
604
  '</div>' .
605
-
606
  // The controlbar
607
  '<div' .
608
  ' id="wppa-panoramacontrol-div-' . $mocc . '"' .
@@ -619,7 +624,7 @@ function wppa_get_flat_panorama_html( $args ) {
619
  ' id="wppa-panoramacontrol-right-' . $mocc . '"' .
620
  ' style="margin:2px;"' .
621
  ' >' .
622
- wppa_get_svghtml( 'Right-4', $iconsize ) .
623
  '</span>' .
624
  '<span' .
625
  ' id="wppa-panoramacontrol-up-' . $mocc . '"' .
@@ -646,20 +651,25 @@ function wppa_get_flat_panorama_html( $args ) {
646
  wppa_get_svghtml( 'ZoomOut', $iconsize ) .
647
  '</span>' .
648
  '</div>' .
649
-
650
- // The preview image
651
- '<img' .
652
- ' id="wppa-panorama-prev-img-' . $mocc . '"' .
653
- ' src="' . $url . '"' .
654
- ' style="width:100%;"' .
655
- ' />' .
656
-
657
  '<script>' .
658
 
659
- 'jQuery(document).ready(function(){' .
660
-
 
 
 
 
 
 
 
 
 
 
 
 
661
  'var manualControl = false,' .
662
- 'zoomFactor = 1.0,' .
663
  'deltaX = 0,' .
664
  'deltaY = 0,' .
665
  'deltaFactor = 1.0,' .
@@ -667,126 +677,223 @@ function wppa_get_flat_panorama_html( $args ) {
667
  'busy = false,' .
668
  'div = document.getElementById("wppa-panorama-div-' . $mocc . '"),' .
669
  'canvas = document.getElementById("wppa-panorama-canvas-' . $mocc . '"),' .
670
- 'image = document.getElementById("wppa-panorama-img-' . $mocc . '"),' .
671
  'left = document.getElementById("wppa-panoramacontrol-left-' . $mocc . '"),' .
672
  'right = document.getElementById("wppa-panoramacontrol-right-' . $mocc . '"),' .
673
  'up = document.getElementById("wppa-panoramacontrol-up-' . $mocc . '"),' .
674
  'down = document.getElementById("wppa-panoramacontrol-down-' . $mocc . '"),' .
675
  'zoomin = document.getElementById("wppa-panoramacontrol-zoomin-' . $mocc . '"),' .
676
  'zoomout = document.getElementById("wppa-panoramacontrol-zoomout-' . $mocc . '"),' .
677
- 'imgWidth = jQuery(image).width(),' .
678
- 'imgHeight = jQuery(image).height(),' .
679
  'canvasWidth = div.parentNode.clientWidth,' .
680
- 'canvasHeight = canvasWidth / 2;' .
681
- // 'scaleFactor = imgHeight / canvasHeight;' .
682
-
683
-
684
-
685
- // listeners
686
- ( wppa_is_mobile() ? /*
687
- div.addEventListener("touchstart", onDivMouseDown, false);
688
- div.addEventListener("touchmove", onDivMouseMove, false);
689
- div.addEventListener("touchend", onDivMouseUp, false); */
690
- 'right.addEventListener("touchstart", function(){run=true;deltaX=0.2;render();}, false);' .
691
- 'right.addEventListener("touchend", function(){run=false;deltaX=0}, false);' .
692
- 'left.addEventListener("touchstart", function(){run=true;deltaX=-0.2;render();}, false);' .
693
- 'left.addEventListener("touchend", function(){run=false;deltaX=0}, false);' .
694
- 'up.addEventListener("touchstart", function(){run=true;deltaY=0.2;render();}, false);' .
695
- 'up.addEventListener("touchend", function(){run=false;deltaY=0}, false);' .
696
- 'down.addEventListener("touchstart", function(){run=true;deltaY=-0.2;render();}, false);' .
697
- 'down.addEventListener("touchend", function(){run=false;deltaY=0}, false);' .
698
- 'zoomin.addEventListener("touchstart", function(){run=true;deltaFov=-0.2;doZoom();render();}, false);' .
699
- 'zoomin.addEventListener("touchend", function(){run=false;deltaFov=0}, false);' .
700
- 'zoomout.addEventListener("touchstart", function(){run=true;deltaFov=0.2;doZoom();render();}, false);' .
701
- 'zoomout.addEventListener("touchend", function(){run=false;deltaFov=0}, false);'
702
- :
703
- // 'div.addEventListener("mousedown", onDivMouseDown, false);' .
704
- // 'div.addEventListener("mousemove", onDivMouseMove, false);' .
705
- // 'div.addEventListener("mouseup", onDivMouseUp, false);' .
706
- 'right.addEventListener("mousedown", function(){run=true;deltaX=2;render();}, false);' .
707
- 'right.addEventListener("mouseup", function(){run=false;deltaX=0}, false);' .
708
- 'left.addEventListener("mousedown", function(){run=true;deltaX=-2;render();}, false);' .
709
- 'left.addEventListener("mouseup", function(){run=false;deltaX=0}, false);' .
710
- 'up.addEventListener("mousedown", function(){run=true;deltaY=-2;render();}, false);' .
711
- 'up.addEventListener("mouseup", function(){run=false;deltaY=0}, false);' .
712
- 'down.addEventListener("mousedown", function(){run=true;deltaY=2;render();}, false);' .
713
- 'down.addEventListener("mouseup", function(){run=false;deltaY=0}, false);' .
714
- 'zoomin.addEventListener("mousedown", function(){run=true;deltaFactor=1.01;render();}, false);' .
715
- 'zoomin.addEventListener("mouseup", function(){run=false;deltaFactor=1;}, false);' .
716
- 'zoomout.addEventListener("mousedown", function(){run=true;deltaFactor=0.99;render();}, false);' .
717
- 'zoomout.addEventListener("mouseup", function(){run=false;deltaFactor=1;}, false);'
718
- ) .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
 
720
- // Init and Resize handler
721
- 'jQuery(window).on("DOMContentLoaded load resize scroll",onResize' . $mocc . ');' .
722
-
723
- '
724
- var fromHeight = imgHeight;
725
- var fromWidth = fromHeight * 2;
726
-
727
- var savedFromX = ( imgWidth - fromWidth ) / 2;
728
- var savedFromY = ( imgHeight - fromHeight ) / 2;
729
-
730
- var scaleFactor = imgHeight / canvasHeight;
731
- ' .
732
-
733
- // Doit!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
734
  'render();' .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
 
736
- // The render function
737
- 'function render(){
738
- if (!run) return;
739
- if (busy) return;
740
- busy = true;
741
- if(!manualControl){' .
742
-
743
- // Panning
744
- 'savedFromX += deltaX;
745
- // savedFromX = Math.max(0, Math.min(imgWidth-fromWidth, savedFromX));
746
- savedFromY += deltaY;
747
- // savedFromY = Math.max(0, Math.min(imgHeight-fromHeight, savedFromY));' .
748
-
749
- // Zooming
750
- '
751
- // wppaConsoleLog(zoomFactor+" "+deltaFactor+" "+zoomFactor * deltaFactor);
752
- zoomFactor = zoomFactor * deltaFactor;
753
- // wppaConsoleLog( zoomFactor+" "+deltaFactor);
754
- zoomFactor = Math.max(1, Math.min(10, zoomFactor));
755
- fromX = savedFromX + ( zoomFactor - 1 ) * scaleFactor*fromWidth/zoomFactor / 4;
756
- fromY = savedFromY + ( zoomFactor - 1 ) * scaleFactor*fromHeight/zoomFactor / 4;
757
-
758
- fromX = Math.max(0, Math.min(imgWidth-fromWidth, fromX));
759
- fromY = Math.max(0, Math.min(imgHeight-fromHeight, fromY));
760
-
761
  }
762
- var context = canvas.getContext("2d");
763
-
764
- //wppaConsoleLog(fromX+", "+fromY+", "+scaleFactor*fromWidth/zoomFactor+", "+scaleFactor*fromHeight/zoomFactor+", 0, 0, canvasWidth="+canvasWidth+", canvasHeight="+canvasHeight+", zoomFactor="+zoomFactor);
765
- context.drawImage(image,
766
- fromX,
767
- fromY,
768
- scaleFactor*fromWidth/zoomFactor,
769
- scaleFactor*fromHeight/zoomFactor,
770
- 0,0,canvasWidth,canvasHeight);
771
- busy = false;
772
- if (run) setTimeout(function(){render()},25);
773
- }' .
774
-
775
- // When a (responsive) resize is required, we resize the scene
776
- 'function onResize' . $mocc . '(event){
777
-
778
- canvasWidth = div.parentNode.clientWidth;
779
- canvasHeight = canvasWidth / 2;
780
- scaleFactor = imgHeight / canvasHeight;
781
-
782
- run=true;
783
- render();
784
- run=false;
785
-
786
- }' .
787
 
788
- '});
789
-
790
  </script>
791
  ' . ( $haslink ? '<a>' : '' ) . '';
792
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 6.9.08
7
  *
8
  */
9
 
278
 
279
  // Get the html for a panorama image
280
  function wppa_get_panorama_html( $args ) {
281
+
282
  if ( ! isset( $args['id'] ) ) return;
283
+
284
  switch( wppa_is_panorama( $args['id'] ) ) {
285
+
286
  case '1':
287
  $result = wppa_get_spheric_panorama_html( $args );
288
  break;
290
  $result = wppa_get_flat_panorama_html( $args );
291
  break;
292
  default:
293
+ $result = '';
294
  }
295
+
296
  return $result;
297
  }
298
 
299
  // Spheric 360deg panorama
300
  function wppa_get_spheric_panorama_html( $args ) {
301
+
302
  // Init
303
  $defaults = array( 'id' => '0',
304
  'mocc' => '0',
314
  $width = $args['width'] ? $args['width'] : wppa_get_container_width();
315
  $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
316
  $haslink = $args['haslink'];
317
+ $iconsize = wppa_opt( 'nav_icon_size_panorama' ) . 'px;';
318
 
319
+ $url = wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id );
320
 
321
  $result =
322
  ( $haslink ? '</a>' : '' ) .
323
  '<div' .
324
  ' id="wppa-panorama-div-' . $mocc . '"' .
325
  ' class="wppa-panorama-div wppa-panorama-div-' . $mocc . '"' .
326
+ ' style="margin-bottom:4px;cursor:grab;"' .
327
  ' >' .
328
  '</div>' .
329
  '<div' .
341
  ' id="wppa-panoramacontrol-right-' . $mocc . '"' .
342
  ' style="margin:2px;"' .
343
  ' >' .
344
+ wppa_get_svghtml( 'Right-4', $iconsize ) .
345
  '</span>' .
346
  '<span' .
347
  ' id="wppa-panoramacontrol-up-' . $mocc . '"' .
437
  'zoomin.addEventListener("touchend", function(){run=false;deltaFov=0}, false);' .
438
  'zoomout.addEventListener("touchstart", function(){run=true;deltaFov=0.2;doZoom();render();}, false);' .
439
  'zoomout.addEventListener("touchend", function(){run=false;deltaFov=0}, false);'
440
+ :
441
  'div.addEventListener("mousedown", onDivMouseDown, false);' .
442
  'div.addEventListener("mousemove", onDivMouseMove, false);' .
443
  'div.addEventListener("mouseup", onDivMouseUp, false);' .
444
+ // 'div.addEventListener("mouseout", onDivMouseUp, false);' .
445
  'right.addEventListener("mousedown", function(){run=true;deltaX=0.2;render();}, false);' .
446
  'right.addEventListener("mouseup", function(){run=false;deltaX=0}, false);' .
447
  'left.addEventListener("mousedown", function(){run=true;deltaX=-0.2;render();}, false);' .
455
  'zoomout.addEventListener("mousedown", function(){run=true;deltaFov=0.2;doZoom();render();}, false);' .
456
  'zoomout.addEventListener("mouseup", function(){run=false;deltaFov=0}, false);'
457
  ) .
458
+
459
  // Init and Resize hanler
460
  'jQuery(window).on("DOMContentLoaded load resize scroll",onResize' . $mocc . ');' .
461
 
535
  run=false;
536
 
537
  }' .
538
+
539
  // When a (responsive) resize is required, we resize the scene
540
  'function onResize' . $mocc . '(event){
541
  var containerwidth = div.parentNode.clientWidth;
546
  render();
547
  doZoom();
548
  run=false;
549
+
550
  }' .
551
 
552
  '});
559
 
560
  // Non 360 flat panorama
561
  function wppa_get_flat_panorama_html( $args ) {
562
+
563
  // Init
564
  $defaults = array( 'id' => '0',
565
  'mocc' => '0',
575
  $width = $args['width'] ? $args['width'] : wppa_get_container_width();
576
  $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
577
  $haslink = $args['haslink'];
578
+ $iconsize = wppa_opt( 'nav_icon_size_panorama' ) . 'px;';
579
 
580
+ $url = wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id );
581
 
582
  $result =
583
  ( $haslink ? '</a>' : '' ) .
584
+
585
  // The container
586
  '<div' .
587
  ' id="wppa-panorama-div-' . $mocc . '"' .
588
  ' class="wppa-panorama-div wppa-panorama-div-' . $mocc . '"' .
589
  ' style="margin-bottom:4px;"' .
590
  ' >' .
591
+
592
  // The actual drawing area
593
  '<canvas' .
594
  ' id="wppa-panorama-canvas-' . $mocc . '"' .
595
+ ' style="background-color:black;cursor:grab;"' .
596
+ ' width="' . $width . '"' .
597
+ ' height=' . ( $width / 2 ) . '"' .
598
+ ' >' .
599
  '</canvas>' .
600
+
601
+ // The preview image
602
+ '<canvas' .
603
+ ' id="wppa-panorama-prev-canvas-' . $mocc . '"' .
604
+ ' style="margin-top:4px;background-color:black;"' .
605
+ ' width="' . $width . '"' .
606
+ ' height=' . $height . '"' .
607
  ' />' .
608
+
609
  '</div>' .
610
+
611
  // The controlbar
612
  '<div' .
613
  ' id="wppa-panoramacontrol-div-' . $mocc . '"' .
624
  ' id="wppa-panoramacontrol-right-' . $mocc . '"' .
625
  ' style="margin:2px;"' .
626
  ' >' .
627
+ wppa_get_svghtml( 'Right-4', $iconsize ) .
628
  '</span>' .
629
  '<span' .
630
  ' id="wppa-panoramacontrol-up-' . $mocc . '"' .
651
  wppa_get_svghtml( 'ZoomOut', $iconsize ) .
652
  '</span>' .
653
  '</div>' .
654
+
655
+
 
 
 
 
 
 
656
  '<script>' .
657
 
658
+ // Create image object and add the image url to it
659
+ 'image' . $mocc . ' = new Image();' .
660
+ 'image' . $mocc . '.src = "' . $url . '",' .
661
+
662
+ // When document complete, run the main proc
663
+ 'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
664
+
665
+ // The main proccedure
666
+ 'function wppaDoFlatPanorama' . $mocc . '(){' .
667
+
668
+ // Wait until the image file has been completely loaded
669
+ 'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 20 );return;}' .
670
+
671
+ // Var declarations
672
  'var manualControl = false,' .
 
673
  'deltaX = 0,' .
674
  'deltaY = 0,' .
675
  'deltaFactor = 1.0,' .
677
  'busy = false,' .
678
  'div = document.getElementById("wppa-panorama-div-' . $mocc . '"),' .
679
  'canvas = document.getElementById("wppa-panorama-canvas-' . $mocc . '"),' .
680
+ 'prevCanvas = document.getElementById("wppa-panorama-prev-canvas-' . $mocc . '"),' .
681
  'left = document.getElementById("wppa-panoramacontrol-left-' . $mocc . '"),' .
682
  'right = document.getElementById("wppa-panoramacontrol-right-' . $mocc . '"),' .
683
  'up = document.getElementById("wppa-panoramacontrol-up-' . $mocc . '"),' .
684
  'down = document.getElementById("wppa-panoramacontrol-down-' . $mocc . '"),' .
685
  'zoomin = document.getElementById("wppa-panoramacontrol-zoomin-' . $mocc . '"),' .
686
  'zoomout = document.getElementById("wppa-panoramacontrol-zoomout-' . $mocc . '"),' .
 
 
687
  'canvasWidth = div.parentNode.clientWidth,' .
688
+ 'canvasHeight = canvasWidth / 2,' .
689
+ 'savedCanvasX = 0,' .
690
+ 'savedCanvasY = 0,' .
691
+ 'fromHeight = image' . $mocc . '.height / 2,' .
692
+ 'fromWidth = fromHeight * 2,' .
693
+ 'fromX = ( image' . $mocc . '.width - fromWidth ) / 2,' .
694
+ 'fromY = ( image' . $mocc . '.height - fromHeight ) / 2,' .
695
+ 'centerX = fromX + fromWidth / 2,' .
696
+ 'centerY = fromY + fromHeight / 2;' .
697
+
698
+ // Set canvas sizes
699
+ // 'canvas.width = canvasWidth;' .
700
+ // 'canvas.height = canvasHeight;' .
701
+ // 'prevCanvas.width = canvasWidth;' .
702
+ // 'prevCanvas.height = canvasWidth * image' . $mocc . '.height / image' . $mocc . '.width;' .
703
+ // 'jQuery(prevCanvas).css({width:\'\',height:\'\'});' .
704
+
705
+ // Install listeners
706
+ ( wppa_is_mobile() ? /*
707
+ div.addEventListener("touchstart", onDivMouseDown, false);
708
+ div.addEventListener("touchmove", onDivMouseMove, false);
709
+ div.addEventListener("touchend", onDivMouseUp, false); */
710
+ 'right.addEventListener("touchstart", function(){run=true;deltaX=2;render();}, false);' .
711
+ 'right.addEventListener("touchend", onButtonup, false);' .
712
+ 'left.addEventListener("touchstart", function(){run=true;deltaX=-2;render();}, false);' .
713
+ 'left.addEventListener("touchend", onButtonup, false);' .
714
+ 'up.addEventListener("touchstart", function(){run=true;deltaY=-2;render();}, false);' .
715
+ 'up.addEventListener("touchend", onButtonup, false);' .
716
+ 'down.addEventListener("touchstart", function(){run=true;deltaY=2;render();}, false);' .
717
+ 'down.addEventListener("touchend", onButtonup, false);' .
718
+ 'zoomin.addEventListener("touchstart", function(){run=true;deltaFactor=1.01;render();}, false);' .
719
+ 'zoomin.addEventListener("touchend", onButtonup, false);' .
720
+ 'zoomout.addEventListener("touchstart", function(){run=true;deltaFactor=0.99;render();}, false);' .
721
+ 'zoomout.addEventListener("touchend", onButtonup, false);'
722
+ :
723
+ 'canvas.addEventListener("mousedown", onCanvasMouseDown, false);' .
724
+ 'canvas.addEventListener("mousemove", onCanvasMouseMove, false);' .
725
+ 'canvas.addEventListener("mouseup", onCanvasMouseUp, false);' .
726
+ // 'canvas.addEventListener("mouseout", onCanvasMouseUp, false);' .
727
+ 'prevCanvas.addEventListener("mousedown", onCanvasMouseDown, false);' .
728
+ 'prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove, false);' .
729
+ 'prevCanvas.addEventListener("mouseup", onCanvasMouseUp, false);' .
730
+ // 'prevCanvas.addEventListener("mouseout", onCanvasMouseUp, false);' .
731
+ 'right.addEventListener("mousedown", function(){run=true;deltaX=2;render();}, false);' .
732
+ 'right.addEventListener("mouseup", onButtonup, false);' .
733
+ 'left.addEventListener("mousedown", function(){run=true;deltaX=-2;render();}, false);' .
734
+ 'left.addEventListener("mouseup", onButtonup, false);' .
735
+ 'up.addEventListener("mousedown", function(){run=true;deltaY=-2;render();}, false);' .
736
+ 'up.addEventListener("mouseup", onButtonup, false);' .
737
+ 'down.addEventListener("mousedown", function(){run=true;deltaY=2;render();}, false);' .
738
+ 'down.addEventListener("mouseup", onButtonup, false);' .
739
+ 'zoomin.addEventListener("mousedown", function(){run=true;deltaFactor=1.01;render();}, false);' .
740
+ 'zoomin.addEventListener("mouseup", onButtonup, false);' .
741
+ 'zoomout.addEventListener("mousedown", function(){run=true;deltaFactor=0.99;render();}, false);' .
742
+ 'zoomout.addEventListener("mouseup", onButtonup, false);'
743
+ ) .
744
+
745
+ // Install Resize handler
746
+ 'jQuery(window).on("DOMContentLoaded load resize scroll",onResize' . $mocc . ');' .
747
+
748
+ // Do the rendering
749
+ 'render();' .
750
 
751
+ // The render function
752
+ 'function render(){' .
753
+ 'if (!run) return;' .
754
+ 'if (busy) return;' .
755
+ 'busy = true;' .
756
+
757
+ // manualControl is true when a drag on the canvas is being performed
758
+ 'if(!manualControl){' .
759
+
760
+ // Panning
761
+ 'fromX += deltaX;' .
762
+ 'fromY += deltaY;' .
763
+
764
+ // Zooming
765
+ 'var newHeight = fromHeight / deltaFactor;' .
766
+ 'var newWidth = fromWidth / deltaFactor;' .
767
+
768
+ // Keep zooming in range
769
+ 'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {' .
770
+ 'fromX -= ( newWidth - fromWidth ) / 2;' .
771
+ 'fromY -= ( newHeight - fromHeight ) / 2;' .
772
+ 'fromWidth = newWidth;' .
773
+ 'fromHeight = newHeight;' .
774
+ '}' .
775
+ '}' .
776
+
777
+ // Keep viewport within image boundaries
778
+ 'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
779
+ 'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
780
+
781
+ // Draw the image
782
+ 'var context = canvas.getContext("2d");' .
783
+ 'context.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvasWidth,canvasHeight);' .
784
+
785
+ // Draw the preview image
786
+ 'var prevContext = prevCanvas.getContext("2d");' .
787
+ 'prevContext.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
788
+ 'prevContext.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
789
+
790
+ // Draw viewport rect on preview iamge
791
+ 'var factor = prevCanvas.width / image' . $mocc . '.width;' .
792
+ 'prevContext.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
793
+
794
+ // Done so far
795
+ 'busy = false;' .
796
+
797
+ // Re-render if needed
798
+ 'if (run) {' .
799
+ 'if (manualControl){setTimeout(function(){render()},25);}' .
800
+ 'else {setTimeout(function(){render()},5);}' .
801
+ '}' .
802
+ '}' .
803
+
804
+ // When a navigation button is released, stop and reset all deltas
805
+ 'function onButtonup(event) {' .
806
+ 'run=false;deltaX=0;deltaY=0;deltaFactor=1;' .
807
+ '}' .
808
+
809
+ // When a (responsive) resize is required, we resize the scene
810
+ 'function onResize' . $mocc . '(event){' .
811
+
812
+ 'canvasWidth = div.parentNode.clientWidth;' .
813
+ 'canvasHeight = canvasWidth / 2;' .
814
+ 'canvas.width = canvasWidth;' .
815
+ 'canvas.height = canvasHeight;' .
816
+ 'prevCanvas.width = canvasWidth;' .
817
+ 'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
818
+ 'run=true;' .
819
  'render();' .
820
+ 'run=false;' .
821
+ '}' .
822
+
823
+ // when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
824
+ 'function onCanvasMouseDown(event){
825
+
826
+ event.preventDefault();
827
+
828
+ manualControl = true;
829
+
830
+ savedCanvasX = event.offsetX;
831
+ savedCanvasY = event.offsetY;
832
+
833
+ fromX = fromX;
834
+ fromY = fromY;
835
+
836
+ run=true;
837
+ render();
838
+
839
+ }' .
840
+
841
+ 'function onCanvasMouseMove(event){
842
+
843
+ if ( manualControl && !busy ){
844
+
845
+ var factor = canvasWidth / fromWidth;
846
+
847
+ fromX = ( savedCanvasX - event.offsetX ) / factor + fromX;
848
+ fromY = ( savedCanvasY - event.offsetY ) / factor + fromY;
849
+
850
+ savedCanvasX = event.offsetX;
851
+ savedCanvasY = event.offsetY;
852
+ }
853
+
854
+ }' .
855
+
856
+ 'function onPrevCanvasMouseMove(event){
857
+
858
+ var factor = prevCanvas.width / image' . $mocc . '.width;
859
+
860
+ if (event.offsetX > factor * fromX &&
861
+ event.offsetX < factor * ( fromX + fromWidth ) &&
862
+ event.offsetY > factor * fromY &&
863
+ event.offsetY < factor * ( fromY + fromHeight ) ) {
864
+
865
+ jQuery(prevCanvas).css(\'cursor\',\'grab\');
866
+ }
867
+ else {
868
+ jQuery(prevCanvas).css(\'cursor\',\'default\');
869
+ }
870
+
871
+ if ( manualControl && !busy ){
872
+
873
+ if (event.offsetX > factor * fromX &&
874
+ event.offsetX < factor * ( fromX + fromWidth ) &&
875
+ event.offsetY > factor * fromY &&
876
+ event.offsetY < factor * ( fromY + fromHeight ) ) {
877
+
878
+ fromX = ( event.offsetX - savedCanvasX ) / factor + fromX;
879
+ fromY = ( event.offsetY - savedCanvasY ) / factor + fromY;
880
+
881
+ savedCanvasX = event.offsetX;
882
+ savedCanvasY = event.offsetY;
883
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  }
885
+ }
886
+ }' .
887
+
888
+ 'function onCanvasMouseUp(event){
889
+
890
+ manualControl = false;
891
+ run=false;
892
+
893
+ }' .
894
+
895
+ '}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
896
 
 
 
897
  </script>
898
  ' . ( $haslink ? '<a>' : '' ) . '';
899
 
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.9.07
7
  *
8
  */
9
 
@@ -794,8 +794,32 @@ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\
794
  $help .= '\n'.esc_js(__('The use of a non-default value is particularly usefull when you make use of lightbox functionality.', 'wp-photo-album-plus'));
795
  $slug = 'wppa_resize_to';
796
  $px = __('pixels', 'wp-photo-album-plus');
797
- $options = array(__('Fit within rectangle as set in Table I-B1,2', 'wp-photo-album-plus'), '640 x 480 '.$px, '800 x 600 '.$px, '1024 x 768 '.$px, '1200 x 900 '.$px, '1280 x 960 '.$px, '1366 x 768 '.$px, '1920 x 1080 '.$px);
798
- $values = array( '0', '640x480', '800x600', '1024x768', '1200x900', '1280x960', '1366x768', '1920x1080');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
799
  $html = wppa_select($slug, $options, $values);
800
  $clas = 're_up';
801
  $tags = 'size,upload';
@@ -1613,6 +1637,29 @@ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\
1613
  $clas = '';
1614
  $tags = 'size,layout';
1615
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1616
  }
1617
 
1618
  ?>
@@ -4037,7 +4084,7 @@ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\
4037
  $tags = 'system';
4038
  wppa_setting($slug, '24.1', $name, $desc, $html, $help, $clas, $tags);
4039
 
4040
- $name = __('Enable Pnorama', 'wp-photo-album-plus');
4041
  $desc = __('Enable panorama photo support.', 'wp-photo-album-plus');
4042
  $help = '';
4043
  $slug = 'wppa_enable_panorama';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.9.08
7
  *
8
  */
9
 
794
  $help .= '\n'.esc_js(__('The use of a non-default value is particularly usefull when you make use of lightbox functionality.', 'wp-photo-album-plus'));
795
  $slug = 'wppa_resize_to';
796
  $px = __('pixels', 'wp-photo-album-plus');
797
+ $options = array( __('Fit within rectangle as set in Table I-B1,2', 'wp-photo-album-plus'),
798
+ '640 x 480 '.$px,
799
+ '800 x 600 '.$px,
800
+ '1024 x 768 '.$px,
801
+ '1200 x 900 '.$px,
802
+ '1280 x 960 '.$px,
803
+ '1366 x 768 '.$px,
804
+ '1920 x 1080 '.$px,
805
+ '2400 x 1200 '.$px,
806
+ '3600 x 1800 '.$px,
807
+ '4800 x 2400 '.$px,
808
+ '6000 x 3000 '.$px,
809
+ );
810
+ $values = array( '0',
811
+ '640x480',
812
+ '800x600',
813
+ '1024x768',
814
+ '1200x900',
815
+ '1280x960',
816
+ '1366x768',
817
+ '1920x1080',
818
+ '2400x1200',
819
+ '3600x1800',
820
+ '4800x2400',
821
+ '6000x3000',
822
+ );
823
  $html = wppa_select($slug, $options, $values);
824
  $clas = 're_up';
825
  $tags = 'size,upload';
1637
  $clas = '';
1638
  $tags = 'size,layout';
1639
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
1640
+
1641
+ $name = __('Navigation icon size panorama', 'wp-photo-album-plus');
1642
+ $desc = __('The size of navigation icons on panorama photos', 'wp-photo-album-plus');
1643
+ $help = '';
1644
+ $slug = 'wppa_nav_icon_size_panorama';
1645
+ $opts = array( '16px',
1646
+ '20px',
1647
+ '24px',
1648
+ '32px',
1649
+ '40px',
1650
+ '48px',
1651
+ );
1652
+ $vals = array( '16',
1653
+ '20',
1654
+ '24',
1655
+ '32',
1656
+ '40',
1657
+ '48',
1658
+ );
1659
+ $html = wppa_select($slug, $opts, $vals);
1660
+ $clas = '';
1661
+ $tags = 'size,layout';
1662
+ wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
1663
  }
1664
 
1665
  ?>
4084
  $tags = 'system';
4085
  wppa_setting($slug, '24.1', $name, $desc, $html, $help, $clas, $tags);
4086
 
4087
+ $name = __('Enable Panorama', 'wp-photo-album-plus');
4088
  $desc = __('Enable panorama photo support.', 'wp-photo-album-plus');
4089
  $help = '';
4090
  $slug = 'wppa_enable_panorama';
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.07
7
  *
8
  */
9
 
@@ -858,6 +858,7 @@ cursorborder:'2px solid transparent',";
858
  'wppa_nav_icon_size' => 'default',
859
  'wppa_nav_icon_size_slide' => 'default',
860
  'wppa_icon_size_rating' => 'default',
 
861
 
862
  // Table II: Visibility
863
  // A Breadcrumb
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.9.08
7
  *
8
  */
9
 
858
  'wppa_nav_icon_size' => 'default',
859
  'wppa_nav_icon_size_slide' => 'default',
860
  'wppa_icon_size_rating' => 'default',
861
+ 'wppa_nav_icon_size_panorama' => '32',
862
 
863
  // Table II: Visibility
864
  // A Breadcrumb
wppa-utils.php CHANGED
@@ -129,7 +129,7 @@ global $wppa_supported_stereo_types;
129
  // If in the cloud...
130
  $for_sm = wppa( 'for_sm' ); // Social media do not accept cloud images
131
  $is_old = wppa_too_old_for_cloud( $id );
132
- if ( wppa_cdn( 'front' ) && ! wppa_is_multi( $id ) && ! $is_old && ! wppa_is_stereo( $id ) && ! $for_sm && ! $thumb['magickstack'] ) {
133
  if ( $x && $y ) { // Only when size is given
134
  switch ( wppa_cdn( 'front' ) ) {
135
  case 'local':
@@ -2011,7 +2011,7 @@ function wppa_get_hires_url( $id ) {
2011
  }
2012
 
2013
  // Try CDN
2014
- if ( wppa_cdn( 'front' ) && ! wppa_too_old_for_cloud( $id ) ) {
2015
  switch ( wppa_cdn( 'front' ) ) {
2016
  case 'cloudinary':
2017
  $url = wppa_get_cloudinary_url( $id );
129
  // If in the cloud...
130
  $for_sm = wppa( 'for_sm' ); // Social media do not accept cloud images
131
  $is_old = wppa_too_old_for_cloud( $id );
132
+ if ( wppa_cdn( 'front' ) && ! wppa_is_multi( $id ) && ! $is_old && ! wppa_is_stereo( $id ) && ! $for_sm && ! $thumb['magickstack'] && ! wppa_is_panorama( $id ) ) {
133
  if ( $x && $y ) { // Only when size is given
134
  switch ( wppa_cdn( 'front' ) ) {
135
  case 'local':
2011
  }
2012
 
2013
  // Try CDN
2014
+ if ( wppa_cdn( 'front' ) && ! wppa_too_old_for_cloud( $id ) && ! wppa_is_panorama( $id ) ) {
2015
  switch ( wppa_cdn( 'front' ) ) {
2016
  case 'cloudinary':
2017
  $url = wppa_get_cloudinary_url( $id );
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.07.006
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 = '6907'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-9-07-006'; // 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.08.008
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 = '6908'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-9-08-008'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );