WP Photo Album Plus - Version 6.7.06

Version Description

Download this release

Release Info

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

Code changes from version 6.7.05 to 6.7.06

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.6.27';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -339,7 +339,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
339
  wppaOvlImgs[idx] = new Image();
340
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
341
  wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
342
- if ( ! wppaOvlImgs[idx].complete ) {
343
  wppaConsoleLog( 'Retrying preload current image' );
344
  setTimeout( '_wppaOvlShow(' + idx + ')', 100 );
345
  return;
@@ -936,7 +936,7 @@ wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
936
  }
937
  else {
938
  img = document.getElementById( 'wppa-overlay-img' );
939
- if ( ! img || ! img.complete ) {
940
 
941
  // Wait for load complete
942
  setTimeout( 'wppaOvlFormatFull()', 100 );
@@ -1119,7 +1119,7 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1119
  if ( ! wppaIsVideo ) {
1120
  var elm = document.getElementById( 'wppa-overlay-img' );
1121
  if ( elm ) {
1122
- if ( ! elm.complete ) {
1123
  wppaConsoleLog( 'Wait during run' );
1124
  setTimeout( 'wppaOvlRun()', 500 );
1125
  return;
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.7.06';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
339
  wppaOvlImgs[idx] = new Image();
340
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
341
  wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
342
+ if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete ) {
343
  wppaConsoleLog( 'Retrying preload current image' );
344
  setTimeout( '_wppaOvlShow(' + idx + ')', 100 );
345
  return;
936
  }
937
  else {
938
  img = document.getElementById( 'wppa-overlay-img' );
939
+ if ( ! wppaIsIe && ( ! img || ! img.complete ) ) {
940
 
941
  // Wait for load complete
942
  setTimeout( 'wppaOvlFormatFull()', 100 );
1119
  if ( ! wppaIsVideo ) {
1120
  var elm = document.getElementById( 'wppa-overlay-img' );
1121
  if ( elm ) {
1122
+ if ( ! wppaIsIe && ! elm.complete ) {
1123
  wppaConsoleLog( 'Wait during run' );
1124
  setTimeout( 'wppaOvlRun()', 500 );
1125
  return;
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",100)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=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(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},300),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)},300),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),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;var a,e=(a=p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(e[1]){var t,o,l=e[1],i=jQuery("a"),w=0;for(o=0;o<i.length;o++)t=i[o],(e=!!jQuery(t).attr("data-rel")&&jQuery(t).attr("data-rel").split("[")).length>1&&"wppa"==e[0]&&e[1]==l&&(wppaOvlUrls[w]=t.href,jQuery(t).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(jQuery(t).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(t.title),wppaOvlAlts[w]=jQuery(t).attr("data-alt")?jQuery(t).attr("data-alt"):"",wppaOvlVideoHtmls[w]=jQuery(t).attr("data-videohtml")?decodeURI(jQuery(t).attr("data-videohtml")):"",wppaOvlAudioHtmls[w]=jQuery(t).attr("data-audiohtml")?decodeURI(jQuery(t).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=jQuery(t).attr("data-videonatwidth")?jQuery(t).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=jQuery(t).attr("data-videonatheight")?jQuery(t).attr("data-videonatheight"):"",t.href==p.href&&(wppaOvlIdx=w),w++)}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"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(1500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",100);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(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,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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:'+jQuery(window).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';\" >",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>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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:'+jQuery(window).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>",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)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",2e3):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!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),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");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=jQuery(window).width(),w=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight);var n,d,r;void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(n=(i-3*wppaOvlBorderWidth)/o)<(d=w/l)?n:d)<1&&(o=parseInt(o*r),l=parseInt(l*r));var v,s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v=w-s-20-2*wppaOvlBorderWidth):v=w-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(v*o/l),h=(wppaOvlPadTop,parseInt((i-u)/2),u);l<v&&(wppaOvlPadTop+(v-l)/2,parseInt((i-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),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").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+100),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(){wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode);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"))||!p.complete)return void setTimeout("wppaOvlFormatFull()",100);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,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(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!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()",500);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",500)}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"),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").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),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;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,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++)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]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",100),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",1e3)}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)}var wppaLightboxVersion="6.6.27",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0,wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight;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
+ function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",100)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=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(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},300),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)},300),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),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;var a,e=(a=p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(e[1]){var t,o,l=e[1],i=jQuery("a"),w=0;for(o=0;o<i.length;o++)t=i[o],(e=!!jQuery(t).attr("data-rel")&&jQuery(t).attr("data-rel").split("[")).length>1&&"wppa"==e[0]&&e[1]==l&&(wppaOvlUrls[w]=t.href,jQuery(t).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(jQuery(t).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(t.title),wppaOvlAlts[w]=jQuery(t).attr("data-alt")?jQuery(t).attr("data-alt"):"",wppaOvlVideoHtmls[w]=jQuery(t).attr("data-videohtml")?decodeURI(jQuery(t).attr("data-videohtml")):"",wppaOvlAudioHtmls[w]=jQuery(t).attr("data-audiohtml")?decodeURI(jQuery(t).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=jQuery(t).attr("data-videonatwidth")?jQuery(t).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=jQuery(t).attr("data-videonatheight")?jQuery(t).attr("data-videonatheight"):"",t.href==p.href&&(wppaOvlIdx=w),w++)}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"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(1500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",100);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(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,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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:'+jQuery(window).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';\" >",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>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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:'+jQuery(window).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>",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)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",2e3):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!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),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");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=jQuery(window).width(),w=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight);var n,d,r;void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(n=(i-3*wppaOvlBorderWidth)/o)<(d=w/l)?n:d)<1&&(o=parseInt(o*r),l=parseInt(l*r));var v,s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v=w-s-20-2*wppaOvlBorderWidth):v=w-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(v*o/l),h=(wppaOvlPadTop,parseInt((i-u)/2),u);l<v&&(wppaOvlPadTop+(v-l)/2,parseInt((i-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),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").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+100),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(){wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode);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()",100);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,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(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!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()",500);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",500)}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"),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").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),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;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,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++)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]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",100),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",1e3)}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)}var wppaLightboxVersion="6.7.06",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0,wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight;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");
readme.txt CHANGED
@@ -2,12 +2,12 @@
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.7.05
6
- Stable tag: 6.7.04
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
- Tested up to: 4.8
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -127,6 +127,24 @@ If this happens, make sure (ask your hosting provider) that you have all the rig
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  = 6.7.05 =
131
 
132
  = Bug Fixes =
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.7.06
6
+ Stable tag: 6.7.05
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
+ Tested up to: 4.9
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
130
+ = 6.7.06 =
131
+
132
+ = Bug Fixes =
133
+
134
+ * Fixed hanging lightbox on old versions of Internet Explorer.
135
+ * Album widget frontend display on backend failed due to undefined function wppa_get_coverphoto_id(). Fixed.
136
+ * At frontend upload: selected photo tags lost accented characters. Fixed.
137
+ * Fixed an un-well formed numeric value error in php 7.
138
+
139
+ = New Features =
140
+
141
+ * Added activity widget on wp desktop
142
+ * Added link to lightbox single image on the BestOf widget.
143
+
144
+ = Other Changes =
145
+
146
+ * For clarity: The texts 'Awaiting moderation' and 'Scheduled for XXXX' are now also displayed for the owner of the photo and users with moderate rights where it applies.
147
+
148
  = 6.7.05 =
149
 
150
  = Bug Fixes =
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 6.6.30
7
  *
8
  */
9
 
@@ -207,3 +207,101 @@ add_action( 'admin_init', 'wppa_check_tag_system' );
207
 
208
  // Check if cats system needs conversion
209
  add_action( 'admin_init', 'wppa_check_cat_system' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 6.7.06
7
  *
8
  */
9
 
207
 
208
  // Check if cats system needs conversion
209
  add_action( 'admin_init', 'wppa_check_cat_system' );
210
+
211
+ // Activity feed
212
+ if ( true ) {
213
+ add_action( 'do_meta_boxes', 'wppa_activity' );
214
+ }
215
+ function wppa_activity(){
216
+ if ( function_exists( 'wp_add_dashboard_widget' ) ) {
217
+ wp_add_dashboard_widget( 'wppa-activity', __( 'Recent WPPA activity', 'wp-photo-album-plus' ), 'wppa_show_activity_feed' ); //, $control_callback = null, $callback_args = null )
218
+ }
219
+ }
220
+ function wppa_show_activity_feed() {
221
+ global $wpdb;
222
+
223
+ // Recently uploaded photos
224
+ echo '<h3>' . __( 'Recently uploaded photos', 'wp-photo-album-plus' ) . '</h3>';
225
+ $photos = $wpdb->get_results( "SELECT * FROM `" . WPPA_PHOTOS . "` ORDER BY `timestamp` DESC LIMIT 5", ARRAY_A );
226
+ if ( ! empty( $photos ) ) {
227
+ echo
228
+ '<table>';
229
+ foreach( $photos as $photo ) {
230
+ echo
231
+ '<tr>' .
232
+ '<td>' .
233
+ '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
234
+ '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
235
+ '</a>' .
236
+ '</td>' .
237
+ '<td>';
238
+ $usr = wppa_get_user_by( 'login', $photo['owner'] );
239
+ $usr = $usr -> display_name;
240
+ if ( ! $usr ) {
241
+ $usr = $photo['owner'];
242
+ }
243
+ echo
244
+ sprintf( __( 'by %s in album %s', 'wp-photo-album-plus' ),
245
+ '<b>' . $usr . '</b>',
246
+ '<b>' . wppa_get_album_name( $photo['album'] ) . '</b> (' . $photo['album'] . ')'
247
+ ) .
248
+ '<br />' .
249
+ wppa_local_date( '', $photo['timestamp'] ) .
250
+ '</td>' .
251
+ '</tr />';
252
+ }
253
+ echo
254
+ '</table>';
255
+ }
256
+ else {
257
+ echo
258
+ '<p>' .
259
+ __( 'There are no recently uploaded photos', 'wp-photo-album-plus' ) .
260
+ '</p>';
261
+ }
262
+ echo '<br />';
263
+
264
+ // Recent comments
265
+ echo '<h3>' . __( 'Recent comments on photos', 'wp-photo-album-plus' ) . '</h3>';
266
+ $comments = $wpdb->get_results( "SELECT * FROM `" . WPPA_COMMENTS . "` ORDER BY `timestamp` DESC LIMIT 5", ARRAY_A );
267
+ if ( ! empty( $comments ) ) {
268
+ echo
269
+ '<table>';
270
+ foreach( $comments as $comment ) {
271
+ $photo = wppa_cache_photo( $comment['photo'] );
272
+ echo
273
+ '<tr>' .
274
+ '<td>' .
275
+ '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
276
+ '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
277
+ '</a>' .
278
+ '</td>' .
279
+ '<td>';
280
+ $usr = wppa_get_user_by( 'login', $comment['user'] );
281
+ if ( $usr ) {
282
+ $usr = $usr->display_name;
283
+ }
284
+ else {
285
+ $usr = $comment['user'];
286
+ }
287
+ echo
288
+ '<i>' . $comment['comment'] . '</i>' .
289
+ '<br />' .
290
+ sprintf( __( 'by %s', 'wp-photo-album-plus' ),
291
+ '<b>' . $usr . '</b>' ) .
292
+ '<br />' .
293
+ wppa_local_date( '', $photo['timestamp'] ) .
294
+ '</td>' .
295
+ '</tr>';
296
+ }
297
+ echo
298
+ '</table>';
299
+ }
300
+ else {
301
+ echo
302
+ '<p>' .
303
+ __( 'There are no recent comments on photos', 'wp-photo-album-plus' ) .
304
+ '</p>';
305
+ }
306
+
307
+ }
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -26,6 +26,10 @@ class AlbumWidget extends WP_Widget {
26
  require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
  require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
  require_once(dirname(__FILE__) . '/wppa-slideshow.php');
 
 
 
 
29
  wppa_initialize_runtime();
30
 
31
  wppa( 'in_widget', 'alb' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 6.7.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
26
  require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
  require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
  require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
+
30
+ // For widget display at backend: wppa_get_coverphoto_id()
31
+ require_once( dirname( __FILE__ ) . '/wppa-album-covers.php' );
32
+
33
  wppa_initialize_runtime();
34
 
35
  wppa( 'in_widget', 'alb' );
wppa-bestof-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
- * Version 6.7.01
7
  *
8
  */
9
 
@@ -188,6 +188,7 @@ class BestOfWidget extends WP_Widget {
188
  __( 'The photos in the authors album(s), slideshow', 'wp-photo-album-plus' ),
189
  __( 'All the authors photos, thumbnails', 'wp-photo-album-plus' ),
190
  __( 'All the authors photos, slideshow', 'wp-photo-album-plus' ),
 
191
  );
192
  $values = array( 'none',
193
  'owneralbums',
@@ -195,6 +196,7 @@ class BestOfWidget extends WP_Widget {
195
  'ownerphotosslide',
196
  'upldrphotos',
197
  'upldrphotosslide',
 
198
  );
199
  echo
200
  wppa_widget_selection( $this, 'linktype', $instance['linktype'], __( 'Link to', 'wp-photo-album-plus' ), $options, $values, array(), '' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
+ * Version 6.7.06
7
  *
8
  */
9
 
188
  __( 'The photos in the authors album(s), slideshow', 'wp-photo-album-plus' ),
189
  __( 'All the authors photos, thumbnails', 'wp-photo-album-plus' ),
190
  __( 'All the authors photos, slideshow', 'wp-photo-album-plus' ),
191
+ __( 'Lightbox single image', 'wp-photo-album-plus' ),
192
  );
193
  $values = array( 'none',
194
  'owneralbums',
196
  'ownerphotosslide',
197
  'upldrphotos',
198
  'upldrphotosslide',
199
+ 'lightboxsingle',
200
  );
201
  echo
202
  wppa_widget_selection( $this, 'linktype', $instance['linktype'], __( 'Link to', 'wp-photo-album-plus' ), $options, $values, array(), '' );
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.7.04
7
  *
8
  */
9
 
@@ -4115,7 +4115,30 @@ function wppa_bestof_html( $args, $widget = true ) {
4115
  $result .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'top' ) );
4116
 
4117
  // The link if any
4118
- if ( $linktype != 'none' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4119
  switch ( $linktype ) {
4120
  case 'owneralbums':
4121
  $href = wppa_get_permalink( $page ).'wppa-cover=1&amp;wppa-owner='.$thumb['owner'].'&amp;wppa-occur=1';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.7.06
7
  *
8
  */
9
 
4115
  $result .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'top' ) );
4116
 
4117
  // The link if any
4118
+ if ( $linktype == 'lightboxsingle' ) {
4119
+ $lbtitle = wppa_get_lbtitle( 'sphoto', $id );
4120
+ $videobody = esc_attr( wppa_get_video_body( $id ) );
4121
+ $audiobody = esc_attr( wppa_get_audio_body( $id ) );
4122
+ $videox = wppa_get_videox( $id );
4123
+ $videoy = wppa_get_videoy( $id );
4124
+ $result .=
4125
+ '<a' .
4126
+ ' href="' . wppa_get_photo_url( $id ) . '"' .
4127
+ ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.$lbtitle.'"' : '' ) .
4128
+ ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
4129
+ ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
4130
+ ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
4131
+ ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
4132
+ ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'"' .
4133
+ // ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
4134
+ ' class="thumb-img"' .
4135
+ ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
4136
+ ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
4137
+ ' style="cursor:url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;"' .
4138
+ ' title="' . wppa_zoom_in( $id ) . '"' .
4139
+ ' >';
4140
+ }
4141
+ elseif ( $linktype != 'none' ) {
4142
  switch ( $linktype ) {
4143
  case 'owneralbums':
4144
  $href = wppa_get_permalink( $page ).'wppa-cover=1&amp;wppa-owner='.$thumb['owner'].'&amp;wppa-occur=1';
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.7.05
7
  *
8
  */
9
 
@@ -3780,6 +3780,7 @@ function wppa_get_cover_width( $type, $numeric = false ) {
3780
  if ( $numeric ) {
3781
  $result = str_replace( 'width:', '', $result );
3782
  if ( strpos( $result, '%' ) ) {
 
3783
  $result = $result * wppa_opt( 'initial_colwidth' ) / '100';
3784
  }
3785
  else {
@@ -4833,7 +4834,10 @@ function wppa_fe_add_tags( $id ) {
4833
  else {
4834
  $newt = '';
4835
  }
 
 
4836
  $tags = wppa_sanitize_tags( str_replace( array( '\'', '"' ), ',', wppa_filter_iptc( wppa_filter_exif( $tags, $id ), $id ) ) );
 
4837
  if ( $tags != $oldt ) { // Added tag(s)
4838
  wppa_update_photo( array( 'id' => $id, 'tags' => $tags ) );
4839
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.7.06
7
  *
8
  */
9
 
3780
  if ( $numeric ) {
3781
  $result = str_replace( 'width:', '', $result );
3782
  if ( strpos( $result, '%' ) ) {
3783
+ $result = str_replace( '%', '', $result );
3784
  $result = $result * wppa_opt( 'initial_colwidth' ) / '100';
3785
  }
3786
  else {
4834
  else {
4835
  $newt = '';
4836
  }
4837
+
4838
+ $tags = urldecode( $tags );
4839
  $tags = wppa_sanitize_tags( str_replace( array( '\'', '"' ), ',', wppa_filter_iptc( wppa_filter_exif( $tags, $id ), $id ) ) );
4840
+
4841
  if ( $tags != $oldt ) { // Added tag(s)
4842
  wppa_update_photo( array( 'id' => $id, 'tags' => $tags ) );
4843
  }
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 6.7.02
7
  *
8
  */
9
 
@@ -790,6 +790,7 @@ function wppa_album_number_to_name_in_uri( $uri ) {
790
  function wppa_moderate_links( $type, $id, $comid = '' ) {
791
 
792
  $thumb = wppa_cache_thumb( $id );
 
793
 
794
  if ( current_user_can('wppa_moderate') || ( current_user_can('wppa_comments') && $type == 'comment' ) ) {
795
  switch ( $type ) {
@@ -855,14 +856,14 @@ function wppa_moderate_links( $type, $id, $comid = '' ) {
855
  break;
856
  }
857
  }
858
- else {
859
  if ( $type == 'comment' || $thumb['status'] != 'scheduled' ) {
860
- $result = '<div style="clear:both; color:red">'.__('Awaiting moderation', 'wp-photo-album-plus').'</div>';
861
  }
862
  else {
863
- $result = '<div style="clear:both; color:red">'.sprintf( __( 'Scheduled for %s' , 'wp-photo-album-plus'), wppa_format_scheduledtm( $thumb['scheduledtm'] ) ).'</div>';
864
  }
865
- }
866
  return $result;
867
  }
868
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 6.7.06
7
  *
8
  */
9
 
790
  function wppa_moderate_links( $type, $id, $comid = '' ) {
791
 
792
  $thumb = wppa_cache_thumb( $id );
793
+ $result = '';
794
 
795
  if ( current_user_can('wppa_moderate') || ( current_user_can('wppa_comments') && $type == 'comment' ) ) {
796
  switch ( $type ) {
856
  break;
857
  }
858
  }
859
+ // else {
860
  if ( $type == 'comment' || $thumb['status'] != 'scheduled' ) {
861
+ $result .= '<div style="clear:both; color:red">'.__('Awaiting moderation', 'wp-photo-album-plus').'</div>';
862
  }
863
  else {
864
+ $result .= '<div style="clear:both; color:red">'.sprintf( __( 'Scheduled for %s' , 'wp-photo-album-plus'), wppa_format_scheduledtm( $thumb['scheduledtm'] ) ).'</div>';
865
  }
866
+ // }
867
  return $result;
868
  }
869
 
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.7.05
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 = '6705'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-7-05-002'; // 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.7.06
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 = '6706'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-7-06-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );