WP Photo Album Plus - Version 7.0.06.006

Version Description

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

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

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

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

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

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

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

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

= 6.9.05 =

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

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

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

= 6.9.02 =

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

= 6.9.01 =

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

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.0.06.003 to 7.0.06.006

changelog.txt CHANGED
@@ -5,6 +5,7 @@ WP Photo Album Plus Changelog
5
  * Fixed textual issues on the settings admin page.
6
  * Fixed defined path errors for Windows multisite individual systems.
7
  * Fixed nicescroll on window with deferred javascript.
 
8
 
9
  = 7.0.05 =
10
 
5
  * Fixed textual issues on the settings admin page.
6
  * Fixed defined path errors for Windows multisite individual systems.
7
  * Fixed nicescroll on window with deferred javascript.
8
+ * Long mailinglists no longer break at timeout.
9
 
10
  = 7.0.05 =
11
 
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '6.9.21';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -900,8 +900,15 @@ wppaConsoleLog( 'wppaOvlSize' );
900
  }
901
 
902
 
903
- var iw = jQuery( window ).width();
904
- var ih = jQuery( window ).height();
 
 
 
 
 
 
 
905
  var cw, nw, nh;
906
 
907
  if ( wppaOvlIsVideo ) {
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '7.0.06';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
900
  }
901
 
902
 
903
+ var iw = window.innerWidth
904
+ || document.documentElement.clientWidth
905
+ || document.body.clientWidth;
906
+
907
+ var ih = window.innerHeight
908
+ || document.documentElement.clientHeight
909
+ || document.body.clientHeight;
910
+ // var iw = jQuery( window ).width();
911
+ // var ih = jQuery( window ).height();
912
  var cw, nw, nh;
913
 
914
  if ( wppaOvlIsVideo ) {
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="6.9.21",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;a=null==p?event.keyCode:p.keyCode,e=27;var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!1;var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),o.href==p.href&&(wppaOvlIdx=r),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),w=v-s-20-2*wppaOvlBorderWidth):w=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,O=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.0.06",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;a=null==p?event.keyCode:p.keyCode,e=27;var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!1;var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),o.href==p.href&&(wppaOvlIdx=r),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,v=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),w=v-s-20-2*wppaOvlBorderWidth):w=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,O=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
wppa-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
- * Version 7.0.04
7
  *
8
  */
9
 
@@ -40,7 +40,7 @@ function wppa_add_admin() {
40
 
41
  // See if there are uploads pending moderation
42
  $upl_pending = '';
43
- $upl_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE status = 'pending'" );
44
  if ( $upl_pending_count ) $upl_pending = '<span class="update-plugins"><span class="plugin-count">'.$upl_pending_count.'</span></span>';
45
 
46
  // Compute total pending moderation
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 7.0.06
7
  *
8
  */
9
 
40
 
41
  // See if there are uploads pending moderation
42
  $upl_pending = '';
43
+ $upl_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE status = 'pending' AND album > 0" );
44
  if ( $upl_pending_count ) $upl_pending = '<span class="update-plugins"><span class="plugin-count">'.$upl_pending_count.'</span></span>';
45
 
46
  // Compute total pending moderation
wppa-adminbar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * enhances the admin bar with wppa+ menu
6
- * Version 6.9.21
7
  *
8
  */
9
 
@@ -23,7 +23,7 @@ function wppa_admin_bar_menu() {
23
  else $com_pending = '';
24
 
25
  // Pending uploads
26
- $upl_pend = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE status = 'pending'" );
27
  if ( $upl_pend ) $upl_pending = '&nbsp;<span id="ab-awaiting-mod" class="pending-count">'.$upl_pend.'</span>';
28
  else $upl_pending = '';
29
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * enhances the admin bar with wppa+ menu
6
+ * Version 7.0.06
7
  *
8
  */
9
 
23
  else $com_pending = '';
24
 
25
  // Pending uploads
26
+ $upl_pend = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE status = 'pending' AND album > 0" );
27
  if ( $upl_pend ) $upl_pending = '&nbsp;<span id="ab-awaiting-mod" class="pending-count">'.$upl_pend.'</span>';
28
  else $upl_pending = '';
29
 
wppa-cron.php CHANGED
@@ -300,12 +300,11 @@ global $wpdb;
300
  foreach( $mailings as $list ) {
301
  if ( substr( $list, 0, 8 ) != 'moderate' || user_can( $i, 'wppa_moderate' ) ) {
302
  wppa_subscribe_user( $i, $list );
303
- // wppa_log( 'Cron', 'User ' . $i . ' added to mailinglist ' . $list );
304
  }
305
  }
306
  $i++;
307
  }
308
- wppa_log( 'Eml', $to - $from . ' users added to mailinlists' );
309
  update_option( 'wppa_mailinglist_highest_user_auto_subscribed', $to );
310
  }
311
  }
300
  foreach( $mailings as $list ) {
301
  if ( substr( $list, 0, 8 ) != 'moderate' || user_can( $i, 'wppa_moderate' ) ) {
302
  wppa_subscribe_user( $i, $list );
 
303
  }
304
  }
305
  $i++;
306
  }
307
+ wppa_log( 'Eml', $to - $from . ' users added to mailinglists' );
308
  update_option( 'wppa_mailinglist_highest_user_auto_subscribed', $to );
309
  }
310
  }
wppa-encrypt.php CHANGED
@@ -42,13 +42,17 @@ global $wpdb;
42
 
43
  $crypt = crypt( microtime(),'$6$rounds=5000$' . AUTH_SALT );
44
  $crypt = str_replace( array( '.', '/' ), '', $crypt );
45
- $crypt = substr( $crypt, strlen( $crypt ) - 13, 12 );
 
46
  if ( $table == WPPA_PHOTOS ) {
47
  $dup = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos WHERE crypt = %s", $crypt ) );
48
  }
49
- else {
50
  $dup = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_albums WHERE crypt = %s", $crypt ) );
51
  }
 
 
 
52
  $count++;
53
  }
54
  if ( $count > 1 ) {
42
 
43
  $crypt = crypt( microtime(),'$6$rounds=5000$' . AUTH_SALT );
44
  $crypt = str_replace( array( '.', '/' ), '', $crypt );
45
+ $crypt = sanitize_file_name( $crypt );
46
+ $crypt = substr( $crypt, -12 );
47
  if ( $table == WPPA_PHOTOS ) {
48
  $dup = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos WHERE crypt = %s", $crypt ) );
49
  }
50
+ elseif ( $table == WPPA_ALBUMS ) {
51
  $dup = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_albums WHERE crypt = %s", $crypt ) );
52
  }
53
+ else {
54
+ $dup = false; // wppa_is_file( WPPA_UPLOAD_PATH . '/temp/wppa.' . $crypt . '.js' );
55
+ }
56
  $count++;
57
  }
58
  if ( $count > 1 ) {
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.0.05
7
  *
8
  */
9
 
@@ -4897,7 +4897,12 @@ global $wppa_alert;
4897
  wppa_check_coverimage( $id );
4898
 
4899
  // Mail
4900
- wppa_schedule_mailinglist( 'feuploadnotify', 0, $id, 0, '', wppa_get_user() );
 
 
 
 
 
4901
 
4902
  // Do pdf postprocessing
4903
  wppa_pdf_postprocess( $id );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.0.06
7
  *
8
  */
9
 
4897
  wppa_check_coverimage( $id );
4898
 
4899
  // Mail
4900
+ if ( wppa_get_photo_item( $id, 'status' ) == 'pending' ) {
4901
+ wppa_schedule_mailinglist( 'moderatephoto', 0, $id );
4902
+ }
4903
+ else {
4904
+ wppa_schedule_mailinglist( 'feuploadnotify', 0, $id );
4905
+ }
4906
 
4907
  // Do pdf postprocessing
4908
  wppa_pdf_postprocess( $id );
wppa-mailing.php CHANGED
@@ -22,14 +22,15 @@
22
  add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 6 );
23
 
24
  // Call this function to schedule a mailinglist emission
25
- function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $who = '', $time = 120 ) {
26
 
27
- wp_schedule_single_event( time() + $time, 'wppa_do_mailinglist_cron', array( $type, $alb, $pho, $com, $url, $who ) );
 
28
 
29
  }
30
 
31
  // Send the mails for a mailinglist
32
- function wppa_do_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $who = '' ) {
33
  global $wpdb;
34
 
35
  // Mailinglist enabled?
@@ -95,17 +96,29 @@ global $wpdb;
95
  // Process all subscribed users
96
  foreach( $userarray as $usr ) {
97
 
98
- // Get the user data
99
- $user = get_user_by( 'ID', $usr );
100
 
101
- // Send the mail
102
- if ( $user ) {
103
- wppa_send_mail( array( 'to' => $user->user_email,
104
- 'subj' => __( 'New album created', 'wp-photo-album-plus' ),
105
- 'cont' => $content,
106
- 'listtype' => 'newalbumnotify',
107
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
108
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
  }
111
  }
@@ -115,7 +128,7 @@ global $wpdb;
115
  {
116
  // If moderation required, do the moderatephoto mailing
117
  if ( wppa_get_photo_item( $pho, 'status' ) == 'pending' ) {
118
- wppa_do_mailinglist( 'moderatephoto', $alb, $pho, $com, $url, $who );
119
  return;
120
  }
121
 
@@ -144,18 +157,30 @@ global $wpdb;
144
  // Process all subscribed users
145
  foreach( $userarray as $usr ) {
146
 
147
- // Get the user data
148
- $user = get_user_by( 'ID', $usr );
149
 
150
- // If user exists, mail
151
- if ( $user ) {
152
- wppa_send_mail( array( 'to' => $user->user_email,
153
- 'subj' => $subj,
154
- 'cont' => $cont,
155
- 'photo' => $pho,
156
- 'listtype' => $type,
157
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
158
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
  }
161
  }
@@ -178,7 +203,7 @@ global $wpdb;
178
 
179
  // If moderation required, do the moderatecomment mailing
180
  if ( $comment['status'] == 'pending' ) {
181
- wppa_do_mailinglist( 'moderatecomment', $alb, $pho, $com, $url, $who );
182
  return;
183
  }
184
 
@@ -211,18 +236,30 @@ global $wpdb;
211
  // Process all subscribed users
212
  foreach( $userarray as $usr ) {
213
 
214
- // Get the user data
215
- $user = get_user_by( 'ID', $usr );
216
 
217
- // If user exists, mail
218
- if ( $user ) {
219
- wppa_send_mail( array( 'to' => $user->user_email,
220
- 'subj' => $subj,
221
- 'cont' => $cont,
222
- 'photo' => $pho,
223
- 'listtype' => $type,
224
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
225
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  }
227
  }
228
 
@@ -257,13 +294,18 @@ global $wpdb;
257
  $cont .= '<br />' . sprintf( __( 'You can see the photo %shere%s', 'wp-photo-album-plus' ), '<a href="' . $link . '?album=' . $alb . '&photo=' . $pho . '&occur=1' . '" >', '</a>' );
258
  }
259
 
260
- wppa_send_mail( array( 'to' => $to,
261
- 'subj' => $subj,
262
- 'cont' => $cont,
263
- 'photo' => $pho,
264
- 'listtype' => $type,
265
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
266
- ));
 
 
 
 
 
267
  }
268
 
269
  // Now the photo is approved, we can mail 'feuploadnotify'
@@ -327,6 +369,9 @@ global $wpdb;
327
  'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
328
  ));
329
  }
 
 
 
330
  }
331
 
332
  // Send the author of the comment the mail if he is in the mailinglist
@@ -423,6 +468,9 @@ global $wpdb;
423
  ));
424
 
425
  }
 
 
 
426
  }
427
  }
428
  break;
@@ -464,15 +512,20 @@ global $wpdb;
464
  $user = get_user_by( 'ID', $usr );
465
 
466
  // If user exists, mail
467
- if ( $user && user_can( $usr, 'wppa_moderate' ) ) {
468
- wppa_send_mail( array( 'to' => $user->user_email,
469
- 'subj' => $subj,
470
- 'cont' => $cont,
471
- 'photo' => $pho,
472
- 'email' => $owner->user_email,
473
- 'listtype' => $type,
474
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
475
- ));
 
 
 
 
 
476
  }
477
  }
478
  }
@@ -530,15 +583,20 @@ global $wpdb;
530
  $user = get_user_by( 'ID', $usr );
531
 
532
  // If user exists, mail
533
- if ( $user && user_can( $usr, 'wppa_moderate' ) ) {
534
- wppa_send_mail( array( 'to' => $user->user_email,
535
- 'subj' => $subj,
536
- 'cont' => $cont,
537
- 'photo' => $pho,
538
- 'email' => $email,
539
- 'listtype' => $type,
540
- 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
541
- ));
 
 
 
 
 
542
  }
543
  }
544
  }
@@ -598,6 +656,24 @@ function wppa_unsubscribe_user( $user_id, $list_type ) {
598
  }
599
  }
600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
  // Add user to mailinglist
602
  function wppa_subscribe_user( $user_id, $list_type ) {
603
 
@@ -649,12 +725,22 @@ function wppa_send_mail( $args ) {
649
  $user = get_user_by( 'id', $to );
650
  if ( $user ) {
651
  $to = $user->user_email;
 
652
  }
653
  else {
654
  wppa_log( 'err', 'Attempt to mail to a non existing user', true );
655
  return;
656
  }
657
  }
 
 
 
 
 
 
 
 
 
658
 
659
  $message_part_1 = '';
660
  $message_part_2 = '';
@@ -725,7 +811,7 @@ function wppa_send_mail( $args ) {
725
  $headers,
726
  '' );
727
  if ( $iret ) {
728
- wppa_log( 'eml', 'Mail send to: ' . $to . ', subject: ' . $subject . ', photo: ' . ( $photo ? $photo : 'not supplied.' ) );
729
  return;
730
  }
731
 
22
  add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 6 );
23
 
24
  // Call this function to schedule a mailinglist emission
25
+ function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0, $delay = 120 ) {
26
 
27
+ wp_schedule_single_event( time() + $delay, 'wppa_do_mailinglist_cron', array( $type, $alb, $pho, $com, $url, $start ) );
28
+ wppa_log( 'cron', 'Mailinglist {b}' . $type . '{/b} scheduled for run in ' . $delay . ' seconds. Args: ' . $alb . ', ' . $pho . ', ' . $com . ', ' . $url . ', ' . $start );
29
 
30
  }
31
 
32
  // Send the mails for a mailinglist
33
+ function wppa_do_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0 ) {
34
  global $wpdb;
35
 
36
  // Mailinglist enabled?
96
  // Process all subscribed users
97
  foreach( $userarray as $usr ) {
98
 
99
+ if ( $usr > $start ) {
 
100
 
101
+ // Get the user data
102
+ $user = get_user_by( 'ID', $usr );
103
+
104
+ // Send the mail
105
+ if ( $user ) {
106
+ wppa_send_mail( array( 'to' => $user->user_email,
107
+ 'subj' => __( 'New album created', 'wp-photo-album-plus' ),
108
+ 'cont' => $content,
109
+ 'listtype' => 'newalbumnotify',
110
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
111
+ ) );
112
+ }
113
+ else {
114
+ wppa_unsubscribe_all( $usr );
115
+ }
116
+
117
+ // If time up, reschedule at current user id to run in 60 sec
118
+ if ( wppa_is_time_up() ) {
119
+ wppa_schedule_mailinglist( $type, $alb, $pho, $com, $url, $usr, 60 );
120
+ wppa_exit();
121
+ }
122
  }
123
  }
124
  }
128
  {
129
  // If moderation required, do the moderatephoto mailing
130
  if ( wppa_get_photo_item( $pho, 'status' ) == 'pending' ) {
131
+ wppa_schedule_mailinglist( 'moderatephoto', $alb, $pho, $com, $url );
132
  return;
133
  }
134
 
157
  // Process all subscribed users
158
  foreach( $userarray as $usr ) {
159
 
160
+ if ( $usr > $start ) {
 
161
 
162
+ // Get the user data
163
+ $user = get_user_by( 'ID', $usr );
164
+
165
+ // If user exists, mail
166
+ if ( $user ) {
167
+ wppa_send_mail( array( 'to' => $user->user_email,
168
+ 'subj' => $subj,
169
+ 'cont' => $cont,
170
+ 'photo' => $pho,
171
+ 'listtype' => $type,
172
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
173
+ ));
174
+ }
175
+ else {
176
+ wppa_unsubscribe_all( $usr );
177
+ }
178
+
179
+ // If time up, reschedule at current user id to run in 60 sec
180
+ if ( wppa_is_time_up() ) {
181
+ wppa_schedule_mailinglist( $type, $alb, $pho, $com, $url, $usr, 60 );
182
+ wppa_exit();
183
+ }
184
  }
185
  }
186
  }
203
 
204
  // If moderation required, do the moderatecomment mailing
205
  if ( $comment['status'] == 'pending' ) {
206
+ wppa_do_mailinglist( 'moderatecomment', $alb, $pho, $com, $url );
207
  return;
208
  }
209
 
236
  // Process all subscribed users
237
  foreach( $userarray as $usr ) {
238
 
239
+ if ( $usr > $start ) {
 
240
 
241
+ // Get the user data
242
+ $user = get_user_by( 'ID', $usr );
243
+
244
+ // If user exists, mail
245
+ if ( $user ) {
246
+ wppa_send_mail( array( 'to' => $user->user_email,
247
+ 'subj' => $subj,
248
+ 'cont' => $cont,
249
+ 'photo' => $pho,
250
+ 'listtype' => $type,
251
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
252
+ ));
253
+ }
254
+ else {
255
+ wppa_unsubscribe_all( $usr );
256
+ }
257
+
258
+ // If time up, reschedule at current user id to run in 60 sec
259
+ if ( wppa_is_time_up() ) {
260
+ wppa_schedule_mailinglist( $type, $alb, $pho, $com, $url, $usr, 60 );
261
+ wppa_exit();
262
+ }
263
  }
264
  }
265
 
294
  $cont .= '<br />' . sprintf( __( 'You can see the photo %shere%s', 'wp-photo-album-plus' ), '<a href="' . $link . '?album=' . $alb . '&photo=' . $pho . '&occur=1' . '" >', '</a>' );
295
  }
296
 
297
+ if ( $user ) {
298
+ wppa_send_mail( array( 'to' => $to,
299
+ 'subj' => $subj,
300
+ 'cont' => $cont,
301
+ 'photo' => $pho,
302
+ 'listtype' => $type,
303
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
304
+ ));
305
+ }
306
+ else {
307
+ wppa_unsubscribe_all( $usr );
308
+ }
309
  }
310
 
311
  // Now the photo is approved, we can mail 'feuploadnotify'
369
  'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
370
  ));
371
  }
372
+ else {
373
+ wppa_unsubscribe_all( $usr );
374
+ }
375
  }
376
 
377
  // Send the author of the comment the mail if he is in the mailinglist
468
  ));
469
 
470
  }
471
+ else {
472
+ wppa_unsubscribe_all( $usr );
473
+ }
474
  }
475
  }
476
  break;
512
  $user = get_user_by( 'ID', $usr );
513
 
514
  // If user exists, mail
515
+ if ( $user ) {
516
+ if ( user_can( $usr, 'wppa_moderate' ) ) {
517
+ wppa_send_mail( array( 'to' => $user->user_email,
518
+ 'subj' => $subj,
519
+ 'cont' => $cont,
520
+ 'photo' => $pho,
521
+ 'email' => $owner->user_email,
522
+ 'listtype' => $type,
523
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
524
+ ));
525
+ }
526
+ }
527
+ else {
528
+ wppa_unsubscribe_all( $usr );
529
  }
530
  }
531
  }
583
  $user = get_user_by( 'ID', $usr );
584
 
585
  // If user exists, mail
586
+ if ( $user ) {
587
+ if ( user_can( $usr, 'wppa_moderate' ) ) {
588
+ wppa_send_mail( array( 'to' => $user->user_email,
589
+ 'subj' => $subj,
590
+ 'cont' => $cont,
591
+ 'photo' => $pho,
592
+ 'email' => $email,
593
+ 'listtype' => $type,
594
+ 'unsubscribe' => wppa_unsubscribe_link( $usr, $type ),
595
+ ));
596
+ }
597
+ }
598
+ else {
599
+ wppa_unsubscribe_all( $usr );
600
  }
601
  }
602
  }
656
  }
657
  }
658
 
659
+ // Remove user from all lists
660
+ function wppa_unsubscribe_all( $user_id ) {
661
+
662
+ $lists = array( 'newalbumnotify',
663
+ 'feuploadnotify',
664
+ 'commentnotify',
665
+ 'commentprevious',
666
+ 'moderatephoto',
667
+ 'moderatecomment',
668
+ 'photoapproved',
669
+ 'commentapproved',
670
+ );
671
+
672
+ foreach( $lists as $list_type ) {
673
+ wppa_unsubscribe_user( $user_id, $list_type );
674
+ }
675
+ }
676
+
677
  // Add user to mailinglist
678
  function wppa_subscribe_user( $user_id, $list_type ) {
679
 
725
  $user = get_user_by( 'id', $to );
726
  if ( $user ) {
727
  $to = $user->user_email;
728
+ $id = $user->ID;
729
  }
730
  else {
731
  wppa_log( 'err', 'Attempt to mail to a non existing user', true );
732
  return;
733
  }
734
  }
735
+ else {
736
+ $user = get_user_by( 'email', $to );
737
+ if ( $user ) {
738
+ $id = $user->ID;
739
+ }
740
+ else {
741
+ $id = 'NN';
742
+ }
743
+ }
744
 
745
  $message_part_1 = '';
746
  $message_part_2 = '';
811
  $headers,
812
  '' );
813
  if ( $iret ) {
814
+ wppa_log( 'eml', 'Mail send to: ' . $to . ' (' . $id . ') subject: ' . $subject . ', photo: ' . ( $photo ? $photo : 'not supplied.' ) );
815
  return;
816
  }
817
 
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 7.0.05
7
  *
8
  */
9
 
@@ -1233,7 +1233,12 @@ global $wppa_log_file;
1233
  break;
1234
 
1235
  case 'wppa_list_errorlog':
1236
- $header = __( 'List of WPPA+ log messages', 'wp-photo-album-plus' );
 
 
 
 
 
1237
 
1238
  $result .=
1239
  '<div style="float:left; clear:both; width:100%; overflow:auto; word-wrap:none;" >';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.0.06
7
  *
8
  */
9
 
1233
  break;
1234
 
1235
  case 'wppa_list_errorlog':
1236
+ if ( wppa( 'ajax' ) ) {
1237
+ $header = __( 'List of WPPA+ log messages', 'wp-photo-album-plus' );
1238
+ }
1239
+ else {
1240
+ $header = '';
1241
+ }
1242
 
1243
  $result .=
1244
  '<div style="float:left; clear:both; width:100%; overflow:auto; word-wrap:none;" >';
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 7.0.05
7
  *
8
  */
9
 
@@ -209,7 +209,8 @@ global $wpdb;
209
  if ( empty( $photos ) ) {
210
 
211
  $photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos
212
- WHERE status = 'pending'", ARRAY_A );
 
213
  $count = count( $photos );
214
  }
215
 
@@ -2310,7 +2311,11 @@ function wppa_album_photos_bulk( $album ) {
2310
  }
2311
  if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) {
2312
  if ( $status == 'publish' || $status == 'pending' || wppa_user_is( 'administrator' ) || ! wppa_switch( 'ext_status_restricted' ) ) {
 
2313
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = %s WHERE id = %d", $status, $id ) );
 
 
 
2314
  wppa_invalidate_treecounts( wppa_get_photo_item( $id, 'album' ) );
2315
  }
2316
  else wp_die( 'Security check failure 2' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.0.06
7
  *
8
  */
9
 
209
  if ( empty( $photos ) ) {
210
 
211
  $photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos
212
+ WHERE status = 'pending'
213
+ AND album > 0", ARRAY_A );
214
  $count = count( $photos );
215
  }
216
 
2311
  }
2312
  if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) {
2313
  if ( $status == 'publish' || $status == 'pending' || wppa_user_is( 'administrator' ) || ! wppa_switch( 'ext_status_restricted' ) ) {
2314
+ $oldstatus = $wpdb->get_var( $wpdb->prepare( "SELECT status FROM $wpdb->wppa_photos WHERE id = %d", $id ) );
2315
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = %s WHERE id = %d", $status, $id ) );
2316
+ if ( $oldstatus == 'pending' && $status == 'publish' ) {
2317
+ wppa_schedule_mailinglist( 'photoapproved', 0, $id );
2318
+ }
2319
  wppa_invalidate_treecounts( wppa_get_photo_item( $id, 'album' ) );
2320
  }
2321
  else wp_die( 'Security check failure 2' );
wppa-wrappers.php CHANGED
@@ -240,6 +240,7 @@ global $wppa_log_file;
240
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'pl_dirname' ),
241
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ),
242
  WPPA_CONTENT_PATH . '/blogs.dir',
 
243
  WPPA_PATH . '/fonts',
244
  WPPA_PATH . '/watermarks',
245
  WPPA_PATH . '/wppa-dump.txt',
240
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'pl_dirname' ),
241
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ),
242
  WPPA_CONTENT_PATH . '/blogs.dir',
243
+ WPPA_CONTENT_PATH . '/cache',
244
  WPPA_PATH . '/fonts',
245
  WPPA_PATH . '/watermarks',
246
  WPPA_PATH . '/wppa-dump.txt',
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: 7.0.06.003
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -23,7 +23,7 @@ global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7006'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7-0-06-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.0.06.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/
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7006'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7-0-06-006'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );