WP Photo Album Plus - Version 7.3.00.004

Version Description

= 7.3.00 =

  • This version addresses various bug fixes and performance enhancements.

= 7.2.14 =

  • This version addresses various bug fixes and feature requests.

= 7.2.13 =

  • This version addresses various bug fixes and feature requests.

= 7.2.12 =

  • This version addresses various bug fixes and feature requests.

= 7.2.11 =

  • This version addresses various bug fixes and feature requests.

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

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

= 7.2.05 =

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

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

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

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

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

= 7.1.02 =

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

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

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

= 7.0.08 =

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

= 7.0.07 =

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

= 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.3.00.004
Comparing to
See all releases

Code changes from version 7.2.17.004 to 7.3.00.004

changelog.txt CHANGED
@@ -1,11 +1,18 @@
1
  WP Photo Album Plus Changelog
2
 
3
- = 7.2.17 =
4
 
 
 
 
 
5
  * Januari as next month on the real calendar was not recognized as being in the future. Fixed.
6
- * To speed up dynamic behaviour, prevented various instancies of redundant execution of responsive resize handler code.
 
 
 
7
 
8
- = 7.2.16 =
9
 
10
  * The horizon on the photo admin page is now up/down draggable. Note: Imagick must be activated to adjust photos to the horizon.
11
  * New setting: Table IV-B16: Filmonly continu. The filmstrip will move almost continously. The speed is approx the animation time per item. Make sure the speed is not set to --- off ---.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.3.00 =
4
 
5
+ * The originators of ratings and comments are now defined by their user ID if they are loggedin, and by their IP addresses when they are not logged in.
6
+ This fixes contaminations when users change their display name and in case of non unique display names.
7
+ * Default settings are no longer stored in the wp_options db table. If a setting is set to the default value, it will be removed from the db and the deafult value will be used instead.
8
+ If an update comes with a changed default value, and the setting had been set to the old default value, the setting will get the new default value. Changed default values will always be listed in the changelog.
9
  * Januari as next month on the real calendar was not recognized as being in the future. Fixed.
10
+ * To speed up dynamic behaviour, redundant execution of responsive resize handler code will now be prevented as much as possible.
11
+ * Added horizrailenabled:false to the default nicescroller options.
12
+ * New setting: Table IV-B17: Filmonly random. If ticked, every pageload the sequence of the filmonly images will be different.
13
+ * The initial position of the filmstrip is not animated even when the filmstrip animation is activated.
14
 
15
+ = 7.2.16 =
16
 
17
  * The horizon on the photo admin page is now up/down draggable. Note: Imagick must be activated to adjust photos to the horizon.
18
  * New setting: Table IV-B16: Filmonly continu. The filmstrip will move almost continously. The speed is approx the animation time per item. Make sure the speed is not set to --- off ---.
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 = '7.2.17';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '7.3.00';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.2.17",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"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(0),"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){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);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),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",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")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",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),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href)),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",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")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",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],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[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)))),_bumpViewCount(wppaOvlIds[p]),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 );" onclick="wppaOvlImgClick( 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';\" >":wppaOvlIsPdf?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;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><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 );" onclick="wppaOvlImgClick( 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 );" onclick="wppaOvlImgClick( 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):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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 );" onclick="wppaOvlImgClick( event );" 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]+'" ></iframe>':(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 );" onclick="wppaOvlImgClick( 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||wppaOvlIsPdf||(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",wppaOvlIconSize,!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",wppaOvlIconSize,!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",wppaOvlIconSize,!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=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,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();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(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),c?(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(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;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":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,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",wppaOvlIconSize,!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"),wppaOvlIconSize,!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"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,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),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),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,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null)}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)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}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.3.00",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"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(0),"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){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);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),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",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")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",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),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href)),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",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")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",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],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[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)))),_bumpViewCount(wppaOvlIds[p]),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 );" onclick="wppaOvlImgClick( 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';\" >":wppaOvlIsPdf?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;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><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 );" onclick="wppaOvlImgClick( 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 );" onclick="wppaOvlImgClick( 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):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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 );" onclick="wppaOvlImgClick( event );" 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]+'" ></iframe>':(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 );" onclick="wppaOvlImgClick( 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||wppaOvlIsPdf||(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",wppaOvlIconSize,!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",wppaOvlIconSize,!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",wppaOvlIconSize,!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=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,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();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(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),c?(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(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;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":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,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",wppaOvlIconSize,!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"),wppaOvlIconSize,!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"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,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),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),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,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null)}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)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}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");
js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '7.2.17';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -1292,11 +1292,12 @@ function _wppaAdjustFilmstrip( mocc ) {
1292
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1293
 
1294
  // If going to the first (0) and running and the last was top: jump to -1 and animate to 0. No glue correction, we are before the seam.
1295
- if ( ( typeof( _wppaLastIdx[mocc] ) == 'undefined' ) || ( _wppaCurIdx[mocc] == 0 && _wppaSSRuns[mocc] && _wppaLastIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) ) {
1296
 
1297
  var loc_1 = wppaFilmStripLength[mocc] / 2 - ( -1 + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1298
  jQuery( '#wppa-filmstrip-'+mocc ).stop().css( {marginLeft: loc_1+'px'} );
1299
  _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
 
1300
  }
1301
  jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed );
1302
 
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '7.3.00';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
1292
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1293
 
1294
  // If going to the first (0) and running and the last was top: jump to -1 and animate to 0. No glue correction, we are before the seam.
1295
+ if ( ( ! wppaFilmInit[mocc] ) || ( typeof( _wppaLastIdx[mocc] ) == 'undefined' ) || ( _wppaCurIdx[mocc] == 0 && _wppaSSRuns[mocc] && _wppaLastIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) ) {
1296
 
1297
  var loc_1 = wppaFilmStripLength[mocc] / 2 - ( -1 + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1298
  jQuery( '#wppa-filmstrip-'+mocc ).stop().css( {marginLeft: loc_1+'px'} );
1299
  _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
1300
+ wppaFilmInit[mocc] = true;
1301
  }
1302
  jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed );
1303
 
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSlideshowVersion="7.2.17";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,s,l,d,u,_,m,y,c,h,S,x,f,g,j,I,Q,b,v,N,T,C,k){var R,L;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":0<parseInt(h)?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a])?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=s,_wppaAvg[p][a]=l,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(I),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],void _wppaAdjustFilmstrip(p));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var s=0;s<_wppaSlides[p].length;)0!=s&&s!=r&&(s<i||w<s)?jQuery("#wppa-numbar-"+p+"-"+s).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+s).css({display:"block"}),s++}if(_wppaFirst[p]){if(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType){var l=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))}else wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;"));wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,s=parseInt(jQuery(w).css("width")),l="nil";switch(t==i&&(l="none"),t==i-1&&(l="left"),t==i+1&&(l="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(l="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(l="right"),"nil"==l&&(l=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:s}),jQuery(r).css({marginLeft:0,width:s}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(l){case"left":jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(l){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(l){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(l){case"left":case"right":var d=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:s},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:d,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var s=wppaAspectRatio[p],l=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var y,c,h,S,x,f,g,j,I=wppaStretch;if(u)y=w-d,S=h=0,g=x=w,j=f=(c=parseInt(y*n/o))+d,jQuery("#"+i).css({width:g,height:j}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c});else{if(l<(g=w)&&(g=l),x=g,f=j=parseInt(g*s),I||g-d<=o||j-d<=n?s<(n+d)/(o+d)?(c=j-d,y=parseInt(c*o/n)):(y=g-d,c=parseInt(y*n/o)):(y=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((j-(c+d))/2);break;case"bottom":S=j-(c+d);break;case"fit":S=0,f=j=c+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:g,height:j}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((w-g)/2);break;case"right":h=w-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-y)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:y,left:b}))}var v,N=parseInt(g/3),T=2*N;v=0<r.length?j-wppaAudioHeight-wppaSlideBorderWidth-S:j,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,s=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+s+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var l="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),l+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+s+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=l}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;if(a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),void 0===_wppaLastIdx[p]||0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1){var e=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];jQuery("#wppa-filmstrip-"+p).stop().css({marginLeft:e+"px"}),_wppaLastIdx[p]=_wppaCurIdx[p]}jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var t=_wppaCurIdx[p]-10;t<0&&(t=0);var i=_wppaCurIdx[p]+10;i>_wppaSlides[p].length&&(i=_wppaSlides[p].length);for(var w=0;w<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][w]+"_"+p).html()&&(wppaMakeLazyVisible(),""!=jQuery("#wppa-film-"+w+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==w?(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]))),w++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ var wppaJsSlideshowVersion="7.3.00";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,s,l,d,u,_,m,y,c,h,S,x,f,g,I,j,Q,b,v,N,T,C,k){var R,L;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":0<parseInt(h)?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a])?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=s,_wppaAvg[p][a]=l,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],void _wppaAdjustFilmstrip(p));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var s=0;s<_wppaSlides[p].length;)0!=s&&s!=r&&(s<i||w<s)?jQuery("#wppa-numbar-"+p+"-"+s).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+s).css({display:"block"}),s++}if(_wppaFirst[p]){if(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType){var l=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))}else wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;"));wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,s=parseInt(jQuery(w).css("width")),l="nil";switch(t==i&&(l="none"),t==i-1&&(l="left"),t==i+1&&(l="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(l="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(l="right"),"nil"==l&&(l=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:s}),jQuery(r).css({marginLeft:0,width:s}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(l){case"left":jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(l){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(l){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(l){case"left":case"right":var d=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:s},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:d,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var s=wppaAspectRatio[p],l=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var y,c,h,S,x,f,g,I,j=wppaStretch;if(u)y=w-d,S=h=0,g=x=w,I=f=(c=parseInt(y*n/o))+d,jQuery("#"+i).css({width:g,height:I}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c});else{if(l<(g=w)&&(g=l),x=g,f=I=parseInt(g*s),j||g-d<=o||I-d<=n?s<(n+d)/(o+d)?(c=I-d,y=parseInt(c*o/n)):(y=g-d,c=parseInt(y*n/o)):(y=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(c+d))/2);break;case"bottom":S=I-(c+d);break;case"fit":S=0,f=I=c+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:g,height:I}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((w-g)/2);break;case"right":h=w-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-y)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:y,left:b}))}var v,N=parseInt(g/3),T=2*N;v=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,s=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+s+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var l="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),l+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+s+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=l}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;if(a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),!wppaFilmInit[p]||void 0===_wppaLastIdx[p]||0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1){var e=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];jQuery("#wppa-filmstrip-"+p).stop().css({marginLeft:e+"px"}),_wppaLastIdx[p]=_wppaCurIdx[p],wppaFilmInit[p]=!0}jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var t=_wppaCurIdx[p]-10;t<0&&(t=0);var i=_wppaCurIdx[p]+10;i>_wppaSlides[p].length&&(i=_wppaSlides[p].length);for(var w=0;w<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][w]+"_"+p).html()&&(wppaMakeLazyVisible(),""!=jQuery("#wppa-film-"+w+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==w?(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]))),w++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsUtilsVersion = '7.2.17';
6
  var wppaDebug;
7
 
8
  // Trim
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsUtilsVersion = '7.3.00';
6
  var wppaDebug;
7
 
8
  // Trim
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaJsUtilsVersion="7.2.17";function wppaTrim(e,t){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(0,n)==t;)r=(a=a.substr(n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimLeft(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(r-n)==t;)r=(a=a.substr(0,r-n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimRight(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var r=new Date;r.setDate(r.getDate()+a);var n=escape(t)+(null==a?"":"; expires="+r.toUTCString());document.cookie=e+"="+n}function wppa_getCookie(e){var t,a,r,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(a=n[t].substr(0,n[t].indexOf("=")),r=n[t].substr(n[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,r=Math.floor(a/36e5);a-=60*r*60*1e3;var n=Math.floor(a/6e4);a-=60*n*1e3;var i=Math.floor(a/1e3);a-=1e3*i,console.log("At: "+r+":"+n+":"+i+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,r,n,i,p,o){var s,c,l;switch(n=n||"0",i=i||"10",p=p||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=n;break;case"light":radius=i;break;case"medium":radius=p;break;case"heavy":radius=o}t=t||"32px",c=a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),l=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+c+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+l+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+c+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e=new Date;if(!(e.getTime()<wppaLastLazy+200)){var t;jQuery(".wppa-lazy").each(function(){t=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))});var a=e.getTime();wppaLastLazy=a}}function wppaIsElementInViewport(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return!t||0<t.bottom&&0<t.right&&t.left<wppaWindowWidth()&&t.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){var r=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?t:(wppaIsMini[e]?r/2:r)+"px;"}function wppaEntityDecode(e){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
1
+ var wppaDebug,wppaJsUtilsVersion="7.3.00";function wppaTrim(e,t){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(0,n)==t;)r=(a=a.substr(n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimLeft(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(r-n)==t;)r=(a=a.substr(0,r-n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimRight(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var r=new Date;r.setDate(r.getDate()+a);var n=escape(t)+(null==a?"":"; expires="+r.toUTCString());document.cookie=e+"="+n}function wppa_getCookie(e){var t,a,r,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(a=n[t].substr(0,n[t].indexOf("=")),r=n[t].substr(n[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,r=Math.floor(a/36e5);a-=60*r*60*1e3;var n=Math.floor(a/6e4);a-=60*n*1e3;var i=Math.floor(a/1e3);a-=1e3*i,console.log("At: "+r+":"+n+":"+i+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,r,n,i,p,o){var s,c,l;switch(n=n||"0",i=i||"10",p=p||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=n;break;case"light":radius=i;break;case"medium":radius=p;break;case"heavy":radius=o}t=t||"32px",c=a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),l=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+c+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+l+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+c+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e=new Date;if(!(e.getTime()<wppaLastLazy+200)){var t;jQuery(".wppa-lazy").each(function(){t=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))});var a=e.getTime();wppaLastLazy=a}}function wppaIsElementInViewport(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return!t||0<t.bottom&&0<t.right&&t.left<wppaWindowWidth()&&t.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){var r=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?t:(wppaIsMini[e]?r/2:r)+"px;"}function wppaEntityDecode(e){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains common vars and functions
4
  //
5
- var wppaJsVersion = '7.2.17';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
@@ -168,6 +168,7 @@ var wppaExtendedResizeCount = 0;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
170
  var wppaFilmonlyContinuous = false;
 
171
 
172
  // 'Internal' variables ( private )
173
  var _wppaId = [];
@@ -385,7 +386,7 @@ function _wppaDoAllAutocols(i) {
385
 
386
  // Report time spent this try
387
  var t1 = Date.now();
388
- wppaConsoleLog('Do autocols took '+(t1-t0)+' ms', 'force');
389
  return true;
390
  }
391
 
@@ -546,7 +547,7 @@ function wppaGetContainerWidth( mocc ) {
546
  function _wppaDoAutocol( mocc, i ) {
547
 
548
  // Log we are in
549
- wppaConsoleLog('Enter auto. mocc = '+mocc+' retry = '+i, 'force');
550
 
551
  // Auto?
552
  if ( ! wppaAutoColumnWidth[mocc] ) return true;
@@ -561,12 +562,12 @@ function _wppaDoAutocol( mocc, i ) {
561
  // Anything to do here?
562
  var container = document.getElementById( 'wppa-container-' + mocc );
563
  if ( ! container ) {
564
- wppaConsoleLog('DoAutocol '+mocc+' absent', 'force');
565
  return;
566
  }
567
  if ( ! wppaIsElementInViewport( container ) ) {
568
  jQuery( '#wppa-container-' + mocc ).css({visibility:'hidden'});
569
- wppaConsoleLog('DoAutocol '+mocc+' skipped', 'force');
570
  return;
571
  }
572
  jQuery( '#wppa-container-' + mocc ).css({visibility:'visible'});
2
  //
3
  // contains common vars and functions
4
  //
5
+ var wppaJsVersion = '7.3.00';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
170
  var wppaFilmonlyContinuous = false;
171
+ var wppaFilmInit = [];
172
 
173
  // 'Internal' variables ( private )
174
  var _wppaId = [];
386
 
387
  // Report time spent this try
388
  var t1 = Date.now();
389
+ wppaConsoleLog('Do autocols took '+(t1-t0)+' ms');
390
  return true;
391
  }
392
 
547
  function _wppaDoAutocol( mocc, i ) {
548
 
549
  // Log we are in
550
+ wppaConsoleLog('Enter auto. mocc = '+mocc+' retry = '+i);
551
 
552
  // Auto?
553
  if ( ! wppaAutoColumnWidth[mocc] ) return true;
562
  // Anything to do here?
563
  var container = document.getElementById( 'wppa-container-' + mocc );
564
  if ( ! container ) {
565
+ wppaConsoleLog('DoAutocol '+mocc+' absent');
566
  return;
567
  }
568
  if ( ! wppaIsElementInViewport( container ) ) {
569
  jQuery( '#wppa-container-' + mocc ).css({visibility:'hidden'});
570
+ wppaConsoleLog('DoAutocol '+mocc+' skipped');
571
  return;
572
  }
573
  jQuery( '#wppa-container-' + mocc ).css({visibility:'visible'});
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.2.17",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}function wppaDoAllAutocols(p){wppaConsoleLog(p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){var a=Date.now();p++,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),e++;wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);var t=Date.now();return wppaConsoleLog("Do autocols took "+(t-a)+" ms","force"),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a,"force"),!wppaAutoColumnWidth[p])return!0;var e,t;e=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(!wppaIsElementInViewport(o))return jQuery("#wppa-container-"+p).css({visibility:"hidden"}),void wppaConsoleLog("DoAutocol "+p+" skipped","force");if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,s=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,i=s-1,n=parseInt((r+wppaCoverSpacing)/s-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var w=0;w<t.length;){switch(w%s){case 0:jQuery(t[w]).css({marginLeft:"0px",clear:"both",float:"left"});break;case i:jQuery(t[w]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[w]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}w++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(e/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=e-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),h=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:h})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,f=1,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");g;)m=g*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+f+"-"+p).css("height",m),f++,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*e),wppaSetRealCalendarHeights(p),!0}wppaConsoleLog("DoAutocol "+p+" absent","force")}function wppaSetRealCalendarHeights(a){var p=jQuery("#wppa-real-calendar-"+a).width();if(0<p){var e=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+a).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+a).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+a).css({marginTop:r,marginBottom:r});var s=t/2;jQuery(".wppa-realcalimg-"+a).each(function(){if(0==this.height)e=!1;else{var p=jQuery(this).attr("data-day");thisb=s-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+a).css({bottom:thisb})}}),e||setTimeout(function(){wppaSetRealCalendarHeights(a)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.3.00",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaFilmInit=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}function wppaDoAllAutocols(p){wppaConsoleLog(p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){var a=Date.now();p++,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),e++;wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);var t=Date.now();return wppaConsoleLog("Do autocols took "+(t-a)+" ms"),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;e=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(!wppaIsElementInViewport(o))return jQuery("#wppa-container-"+p).css({visibility:"hidden"}),void wppaConsoleLog("DoAutocol "+p+" skipped");if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,s=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,i=s-1,n=parseInt((r+wppaCoverSpacing)/s-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var w=0;w<t.length;){switch(w%s){case 0:jQuery(t[w]).css({marginLeft:"0px",clear:"both",float:"left"});break;case i:jQuery(t[w]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[w]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}w++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(e/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=e-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),h=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:h})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,g=1,f=jQuery("#wppa-mas-h-"+g+"-"+p).attr("data-height-perc");f;)m=f*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+g+"-"+p).css("height",m),g++,f=jQuery("#wppa-mas-h-"+g+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*e),wppaSetRealCalendarHeights(p),!0}wppaConsoleLog("DoAutocol "+p+" absent")}function wppaSetRealCalendarHeights(a){var p=jQuery("#wppa-real-calendar-"+a).width();if(0<p){var e=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+a).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+a).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+a).css({marginTop:r,marginBottom:r});var s=t/2;jQuery(".wppa-realcalimg-"+a).each(function(){if(0==this.height)e=!1;else{var p=jQuery(this).attr("data-day");thisb=s-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+a).css({bottom:thisb})}}),e||setTimeout(function(){wppaSetRealCalendarHeights(a)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,7 +2,7 @@
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: 7.2.17.004
6
  Stable tag: 7.2.16.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
 
 
140
  = 7.2.14 =
141
 
142
  * This version addresses various bug fixes and feature requests.
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: 7.3.00.004
6
  Stable tag: 7.2.16.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.3.00 =
141
+
142
+ * This version addresses various bug fixes and performance enhancements.
143
+
144
  = 7.2.14 =
145
 
146
  * This version addresses various bug fixes and feature requests.
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -134,11 +134,11 @@ global $wpdb;
134
 
135
  // Find the album( s ) if any
136
  if ( ! $alb && ! $pid ) {
137
- $start_time = get_option( 'wppa_remake_start', '0' );
138
  $albums = $wpdb->get_results( "SELECT id FROM $wpdb->wppa_albums", ARRAY_A );
139
  }
140
  elseif ( $alb ) {
141
- $start_time = get_option( 'wppa_remake_start_album_'.$alb, '0' );
142
  $albums = array( array( 'id' => $alb ) );
143
  }
144
  else $albums = false;
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
134
 
135
  // Find the album( s ) if any
136
  if ( ! $alb && ! $pid ) {
137
+ $start_time = wppa_get_option( 'wppa_remake_start', '0' );
138
  $albums = $wpdb->get_results( "SELECT id FROM $wpdb->wppa_albums", ARRAY_A );
139
  }
140
  elseif ( $alb ) {
141
+ $start_time = wppa_get_option( 'wppa_remake_start_album_'.$alb, '0' );
142
  $albums = array( array( 'id' => $alb ) );
143
  }
144
  else $albums = false;
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.2.06
7
  *
8
  */
9
 
@@ -69,7 +69,7 @@ function wppa_add_admin() {
69
  add_submenu_page( 'wppa_admin_menu', __('Photo of the day Widget', 'wp-photo-album-plus'), __('Photo of the day', 'wp-photo-album-plus'), 'wppa_potd', 'wppa_photo_of_the_day', 'wppa_sidebar_page_options' );
70
  add_submenu_page( 'wppa_admin_menu', __('Manage comments', 'wp-photo-album-plus'), __('Comments', 'wp-photo-album-plus').$com_pending, 'wppa_comments', 'wppa_manage_comments', 'wppa_comment_admin' );
71
  add_submenu_page( 'wppa_admin_menu', __('Help &amp; Info', 'wp-photo-album-plus'), __('Documentation', 'wp-photo-album-plus'), 'wppa_help', 'wppa_help', 'wppa_page_help' );
72
- if ( get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
73
  add_submenu_page( 'wppa_admin_menu', __('Logfile', 'wp-photo-album-plus'), __('Logfile', 'wp-photo-album-plus'), 'administrator', 'wppa_log', 'wppa_log_page' );
74
  }
75
  }
@@ -279,7 +279,7 @@ require_once 'wppa-dashboard-widgets.php';
279
 
280
 
281
  // Load panoama js if needed at the backend
282
- if ( get_option( 'wppa_enable_panorama' ) == 'yes' ) {
283
  add_action( 'admin_footer', 'wppa_load_panorama_js' );
284
  }
285
  function wppa_load_panorama_js() {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 7.3.00
7
  *
8
  */
9
 
69
  add_submenu_page( 'wppa_admin_menu', __('Photo of the day Widget', 'wp-photo-album-plus'), __('Photo of the day', 'wp-photo-album-plus'), 'wppa_potd', 'wppa_photo_of_the_day', 'wppa_sidebar_page_options' );
70
  add_submenu_page( 'wppa_admin_menu', __('Manage comments', 'wp-photo-album-plus'), __('Comments', 'wp-photo-album-plus').$com_pending, 'wppa_comments', 'wppa_manage_comments', 'wppa_comment_admin' );
71
  add_submenu_page( 'wppa_admin_menu', __('Help &amp; Info', 'wp-photo-album-plus'), __('Documentation', 'wp-photo-album-plus'), 'wppa_help', 'wppa_help', 'wppa_page_help' );
72
+ if ( wppa_get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
73
  add_submenu_page( 'wppa_admin_menu', __('Logfile', 'wp-photo-album-plus'), __('Logfile', 'wp-photo-album-plus'), 'administrator', 'wppa_log', 'wppa_log_page' );
74
  }
75
  }
279
 
280
 
281
  // Load panoama js if needed at the backend
282
+ if ( wppa_get_option( 'wppa_enable_panorama' ) == 'yes' ) {
283
  add_action( 'admin_footer', 'wppa_load_panorama_js' );
284
  }
285
  function wppa_load_panorama_js() {
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 7.2.00
7
  *
8
  */
9
 
@@ -105,7 +105,7 @@ function wppa_admin_bar_menu() {
105
  );
106
 
107
  if ( current_user_can( 'administrator' ) ) {
108
- if ( get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
109
  $menu_items['logfile'] = array(
110
  'parent' => $wppaplus,
111
  'title' => __( 'Logfile', 'wp-photo-album-plus' ),
3
  * Package: wp-photo-album-plus
4
  *
5
  * enhances the admin bar with wppa+ menu
6
+ * Version 7.3.00
7
  *
8
  */
9
 
105
  );
106
 
107
  if ( current_user_can( 'administrator' ) ) {
108
+ if ( wppa_get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
109
  $menu_items['logfile'] = array(
110
  'parent' => $wppaplus,
111
  'title' => __( 'Logfile', 'wp-photo-album-plus' ),
wppa-ajax-front.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax-front.php
3
  *
4
  * Supplies the functionality like wp-admin/admin-ajax.php for wppa frontend ajax requests without using wp-admin files
5
- * version 5.1.17
6
  *
7
  */
8
  define( 'DOING_AJAX', true );
@@ -20,11 +20,11 @@ if ( empty( $_REQUEST['action'] ) )
20
  // Load the wppa admin functions
21
  require_once 'wppa-admin.php';
22
 
23
- @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
24
  @header( 'X-Robots-Tag: noindex' );
25
 
26
  send_nosniff_header();
27
  nocache_headers();
28
 
29
  wppa_ajax_callback();
30
-
2
  /* wppa-ajax-front.php
3
  *
4
  * Supplies the functionality like wp-admin/admin-ajax.php for wppa frontend ajax requests without using wp-admin files
5
+ * version 7.3.00
6
  *
7
  */
8
  define( 'DOING_AJAX', true );
20
  // Load the wppa admin functions
21
  require_once 'wppa-admin.php';
22
 
23
+ @header( 'Content-Type: text/html; charset=' . wppa_get_option( 'blog_charset' ) );
24
  @header( 'X-Robots-Tag: noindex' );
25
 
26
  send_nosniff_header();
27
  nocache_headers();
28
 
29
  wppa_ajax_callback();
30
+
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.2.12
6
  *
7
  */
8
 
@@ -112,7 +112,7 @@ global $wppa_log_file;
112
  }
113
 
114
  // Prepare additional data
115
- $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
116
  $userarray = wppa_index_string_to_array( $mailinglist );
117
 
118
  // Dispatch on list type
@@ -161,9 +161,9 @@ global $wppa_log_file;
161
  break;
162
  case 'gettogo':
163
  $slug = strip_tags( $_REQUEST['slug'] );
164
- $result = get_option( $slug . '_togo', '' ) .
165
  '|' .
166
- get_option( $slug . '_status', '' );
167
  echo $result;
168
  wppa_exit();
169
  break;
@@ -898,11 +898,9 @@ global $wppa_log_file;
898
  $shortcode = stripslashes( $_REQUEST['shortcode'] );
899
  $shortcode = str_replace( '@', '#', $shortcode );
900
  $occ = strval( intval ( $_REQUEST['moccur'] ) );
901
- // wppa_log( 'Obs', 'Shortcode request from Gutenberg: ' . $shortcode . ', occ=' . $occ );
902
  global $wppa_opt;
903
  $wppa_opt['wppa_lazy'] = 'no';
904
  $wppa_opt['wppa_inline_css'] = 'yes';
905
- // wppa( 'mocc', $occ );
906
  $result = do_shortcode( $shortcode );
907
  echo $result;
908
  wppa_exit();
@@ -987,7 +985,7 @@ global $wppa_log_file;
987
  }
988
 
989
  // Check for one rating per period
990
- $wait_text = wppa_get_rating_wait_text( $photo, wppa_get_user() );
991
  if ( $wait_text ) {
992
  echo '0||900||'.$wait_text; // 900 is recoverable error
993
  wppa_exit();
@@ -1018,9 +1016,10 @@ global $wppa_log_file;
1018
  AND status = 'pending'", $photo, $user ) );
1019
 
1020
  // Has user motivated his vote?
1021
- $hascommented = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments
1022
- WHERE photo = %d
1023
- AND user = %s", $photo, wppa_get_user( 'display' ) ) );
 
1024
 
1025
  // If the user has commented and comment needs vote is active, publish his comment
1026
  if ( $hascommented && wppa_switch( 'comment_need_vote' ) ) {
@@ -3340,7 +3339,7 @@ global $wppa_log_file;
3340
  $user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
3341
  if ( $user && $user->user_login === $value ) {
3342
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = 'pending' WHERE owner = %s", $value ) );
3343
- $black_listed_users = get_option( 'wppa_black_listed_users', array() );
3344
  if ( ! in_array( $value, $black_listed_users ) ) {
3345
  $black_listed_users[] = $value;
3346
  update_option( 'wppa_black_listed_users', $black_listed_users );
@@ -3355,7 +3354,7 @@ global $wppa_log_file;
3355
 
3356
  case 'wppa_un_blacklist_user':
3357
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = 'publish' WHERE owner = %s", $value ) );
3358
- $black_listed_users = get_option( 'wppa_black_listed_users', array() );
3359
  if ( in_array( $value, $black_listed_users ) ) {
3360
  foreach ( array_keys( $black_listed_users ) as $usr ) {
3361
  if ( $black_listed_users[$usr] == $value ) unset ( $black_listed_users[$usr] );
@@ -3370,7 +3369,7 @@ global $wppa_log_file;
3370
  $value = trim ( $value );
3371
  $user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
3372
  if ( $user && $user->user_login === $value ) {
3373
- $super_users = get_option( 'wppa_super_users', array() );
3374
  if ( ! in_array( $value, $super_users ) ) {
3375
  $super_users[] = $value;
3376
  update_option( 'wppa_super_users', $super_users );
@@ -3384,7 +3383,7 @@ global $wppa_log_file;
3384
  break;
3385
 
3386
  case 'wppa_un_superuser_user':
3387
- $super_users = get_option( 'wppa_super_users', array() );
3388
  if ( in_array( $value, $super_users ) ) {
3389
  foreach ( array_keys( $super_users ) as $usr ) {
3390
  if ( $super_users[$usr] == $value ) unset ( $super_users[$usr] );
@@ -3429,25 +3428,25 @@ global $wppa_log_file;
3429
  break;
3430
 
3431
  case 'wppa_regen_thumbs_skip_one':
3432
- $last = get_option( 'wppa_regen_thumbs_last', '0' );
3433
  $skip = $last + '1';
3434
  update_option( 'wppa_regen_thumbs_last', $skip );
3435
  break;
3436
 
3437
  case 'wppa_remake_skip_one':
3438
- $last = get_option( 'wppa_remake_last', '0' );
3439
  $skip = $last + '1';
3440
  update_option( 'wppa_remake_last', $skip );
3441
  break;
3442
 
3443
  case 'wppa_create_o1_files_skip_one':
3444
- $last = get_option( 'wppa_create_o1_files_last', '0' );
3445
  $skip = $last + '1';
3446
  update_option( 'wppa_create_o1_files_last', $skip );
3447
  break;
3448
 
3449
  case 'wppa_optimize_ewww_skip_one':
3450
- $last = get_option( 'wppa_optimize_ewww_last', '0' );
3451
  $skip = $last + '1';
3452
  update_option( 'wppa_optimize_ewww_last', $skip );
3453
  break;
@@ -3463,7 +3462,7 @@ global $wppa_log_file;
3463
  $value = wppa_sanitize_file_name( $value );
3464
  $value = trim( $value, ' /' );
3465
  // Remove old file if it exists
3466
- $oldfile = WPPA_CONTENT_PATH . '/' . get_option( 'wppa_pl_dirname' ) . '/.htaccess';
3467
  if ( is_file( $oldfile ) ) {
3468
  if ( ! wppa_unlink( $oldfile ) ) {
3469
  wppa_log('obs', 'Could not remove: '.$oldfile);
@@ -3639,8 +3638,8 @@ global $wppa_log_file;
3639
  $crondata = '';
3640
  global $wppa_cron_maintenance_slugs;
3641
  foreach ( $wppa_cron_maintenance_slugs as $slug ) {
3642
- $crondata .= $slug . '_status:' . get_option( $slug . '_status' ) . ';';
3643
- $crondata .= $slug . '_togo:' . get_option( $slug . '_togo' ) . ';';
3644
  }
3645
  $crondata = rtrim ( $crondata, ';' );
3646
 
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.3.00
6
  *
7
  */
8
 
112
  }
113
 
114
  // Prepare additional data
115
+ $mailinglist = wppa_get_option( 'wppa_mailinglist_' . $list_type, '' );
116
  $userarray = wppa_index_string_to_array( $mailinglist );
117
 
118
  // Dispatch on list type
161
  break;
162
  case 'gettogo':
163
  $slug = strip_tags( $_REQUEST['slug'] );
164
+ $result = wppa_get_option( $slug . '_togo', '' ) .
165
  '|' .
166
+ wppa_get_option( $slug . '_status', '' );
167
  echo $result;
168
  wppa_exit();
169
  break;
898
  $shortcode = stripslashes( $_REQUEST['shortcode'] );
899
  $shortcode = str_replace( '@', '#', $shortcode );
900
  $occ = strval( intval ( $_REQUEST['moccur'] ) );
 
901
  global $wppa_opt;
902
  $wppa_opt['wppa_lazy'] = 'no';
903
  $wppa_opt['wppa_inline_css'] = 'yes';
 
904
  $result = do_shortcode( $shortcode );
905
  echo $result;
906
  wppa_exit();
985
  }
986
 
987
  // Check for one rating per period
988
+ $wait_text = wppa_get_rating_wait_text( $photo );
989
  if ( $wait_text ) {
990
  echo '0||900||'.$wait_text; // 900 is recoverable error
991
  wppa_exit();
1016
  AND status = 'pending'", $photo, $user ) );
1017
 
1018
  // Has user motivated his vote?
1019
+ // $hascommented = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments
1020
+ // WHERE photo = %d
1021
+ // AND user = %s", $photo, wppa_get_user( 'display' ) ) );
1022
+ $hascommented = wppa_has_user_commented( $photo );
1023
 
1024
  // If the user has commented and comment needs vote is active, publish his comment
1025
  if ( $hascommented && wppa_switch( 'comment_need_vote' ) ) {
3339
  $user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
3340
  if ( $user && $user->user_login === $value ) {
3341
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = 'pending' WHERE owner = %s", $value ) );
3342
+ $black_listed_users = wppa_get_option( 'wppa_black_listed_users', array() );
3343
  if ( ! in_array( $value, $black_listed_users ) ) {
3344
  $black_listed_users[] = $value;
3345
  update_option( 'wppa_black_listed_users', $black_listed_users );
3354
 
3355
  case 'wppa_un_blacklist_user':
3356
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = 'publish' WHERE owner = %s", $value ) );
3357
+ $black_listed_users = wppa_get_option( 'wppa_black_listed_users', array() );
3358
  if ( in_array( $value, $black_listed_users ) ) {
3359
  foreach ( array_keys( $black_listed_users ) as $usr ) {
3360
  if ( $black_listed_users[$usr] == $value ) unset ( $black_listed_users[$usr] );
3369
  $value = trim ( $value );
3370
  $user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
3371
  if ( $user && $user->user_login === $value ) {
3372
+ $super_users = wppa_get_option( 'wppa_super_users', array() );
3373
  if ( ! in_array( $value, $super_users ) ) {
3374
  $super_users[] = $value;
3375
  update_option( 'wppa_super_users', $super_users );
3383
  break;
3384
 
3385
  case 'wppa_un_superuser_user':
3386
+ $super_users = wppa_get_option( 'wppa_super_users', array() );
3387
  if ( in_array( $value, $super_users ) ) {
3388
  foreach ( array_keys( $super_users ) as $usr ) {
3389
  if ( $super_users[$usr] == $value ) unset ( $super_users[$usr] );
3428
  break;
3429
 
3430
  case 'wppa_regen_thumbs_skip_one':
3431
+ $last = wppa_get_option( 'wppa_regen_thumbs_last', '0' );
3432
  $skip = $last + '1';
3433
  update_option( 'wppa_regen_thumbs_last', $skip );
3434
  break;
3435
 
3436
  case 'wppa_remake_skip_one':
3437
+ $last = wppa_get_option( 'wppa_remake_last', '0' );
3438
  $skip = $last + '1';
3439
  update_option( 'wppa_remake_last', $skip );
3440
  break;
3441
 
3442
  case 'wppa_create_o1_files_skip_one':
3443
+ $last = wppa_get_option( 'wppa_create_o1_files_last', '0' );
3444
  $skip = $last + '1';
3445
  update_option( 'wppa_create_o1_files_last', $skip );
3446
  break;
3447
 
3448
  case 'wppa_optimize_ewww_skip_one':
3449
+ $last = wppa_get_option( 'wppa_optimize_ewww_last', '0' );
3450
  $skip = $last + '1';
3451
  update_option( 'wppa_optimize_ewww_last', $skip );
3452
  break;
3462
  $value = wppa_sanitize_file_name( $value );
3463
  $value = trim( $value, ' /' );
3464
  // Remove old file if it exists
3465
+ $oldfile = WPPA_CONTENT_PATH . '/' . wppa_get_option( 'wppa_pl_dirname' ) . '/.htaccess';
3466
  if ( is_file( $oldfile ) ) {
3467
  if ( ! wppa_unlink( $oldfile ) ) {
3468
  wppa_log('obs', 'Could not remove: '.$oldfile);
3638
  $crondata = '';
3639
  global $wppa_cron_maintenance_slugs;
3640
  foreach ( $wppa_cron_maintenance_slugs as $slug ) {
3641
+ $crondata .= $slug . '_status:' . wppa_get_option( $slug . '_status' ) . ';';
3642
+ $crondata .= $slug . '_togo:' . wppa_get_option( $slug . '_togo' ) . ';';
3643
  }
3644
  $crondata = rtrim ( $crondata, ';' );
3645
 
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 7.2.15
7
  *
8
  */
9
 
@@ -270,7 +270,7 @@ global $wppa_revno;
270
  }
271
 
272
  // Continue after time up?
273
- if ( get_option( 'wppa_remake_start_album_' . $edit_id ) ) {
274
  wppa_ok_message( __( 'Continuing remake, please wait...', 'wp-photo-album-plus' ) );
275
  }
276
  else {
@@ -1377,7 +1377,7 @@ global $wppa_revno;
1377
  if ( isset($_REQUEST['switchto'] ) ) {
1378
  update_option( 'wppa_album_table_'.wppa_get_user(), $_REQUEST['switchto'] );
1379
  }
1380
- $style = get_option('wppa_album_table_'.wppa_get_user(), 'flat');
1381
  }
1382
  else $style = 'flat';
1383
  // The Manage Album page
@@ -1469,8 +1469,8 @@ global $wpdb;
1469
  }
1470
 
1471
  // Read all albums, pre-ordered
1472
- $order_by = get_option( 'wppa_album_order_' . wppa_get_user(), 'id' );
1473
- $order_desc = get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' );
1474
  // A dynamic query is regarded as being insecure, so we make a switch statemnent with all possible sequences.
1475
  // $albums = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_albums ORDER BY " . $order_by . ( $order_desc == 'yes' ? " DESC" : "" ) , ARRAY_A );
1476
  if ( $order_desc == 'yes' ) {
@@ -1544,12 +1544,12 @@ global $wpdb;
1544
  $reverse = false;
1545
  if ( isset($_REQUEST['order_by']) ) $order = $_REQUEST['order_by']; else $order = '';
1546
  if ( ! $order ) {
1547
- $order = get_option('wppa_album_order_'.wppa_get_user(), 'id');
1548
- $reverse = (get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
1549
  }
1550
  else {
1551
- $old_order = get_option('wppa_album_order_'.wppa_get_user(), 'id');
1552
- $reverse = (get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
1553
  if ( $old_order == $order ) {
1554
  $reverse = ! $reverse;
1555
  }
@@ -1893,9 +1893,9 @@ global $wpdb;
1893
  }
1894
 
1895
  // Read all albums, pre-ordered
1896
- // $albums = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_albums ORDER BY " . get_option( 'wppa_album_order_'.wppa_get_user(), 'id' ) . ( get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' ) == 'yes' ? " DESC" : "" ) , ARRAY_A );
1897
- $order_by = get_option( 'wppa_album_order_' . wppa_get_user(), 'id' );
1898
- $order_desc = get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' );
1899
  // A dynamic query is regarded as being insecure, so we make a switch statemnent with all possible sequences.
1900
  if ( $order_desc == 'yes' ) {
1901
  switch( $order_by ) {
@@ -1999,12 +1999,12 @@ global $wpdb;
1999
  $reverse = false;
2000
  if ( isset($_REQUEST['order_by']) ) $order = $_REQUEST['order_by']; else $order = '';
2001
  if ( ! $order ) {
2002
- $order = get_option('wppa_album_order_'.wppa_get_user(), 'id');
2003
- $reverse = (get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
2004
  }
2005
  else {
2006
- $old_order = get_option('wppa_album_order_'.wppa_get_user(), 'id');
2007
- $reverse = (get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
2008
  if ( $old_order == $order ) {
2009
  $reverse = ! $reverse;
2010
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.3.00
7
  *
8
  */
9
 
270
  }
271
 
272
  // Continue after time up?
273
+ if ( wppa_get_option( 'wppa_remake_start_album_' . $edit_id ) ) {
274
  wppa_ok_message( __( 'Continuing remake, please wait...', 'wp-photo-album-plus' ) );
275
  }
276
  else {
1377
  if ( isset($_REQUEST['switchto'] ) ) {
1378
  update_option( 'wppa_album_table_'.wppa_get_user(), $_REQUEST['switchto'] );
1379
  }
1380
+ $style = wppa_get_option('wppa_album_table_'.wppa_get_user(), 'flat');
1381
  }
1382
  else $style = 'flat';
1383
  // The Manage Album page
1469
  }
1470
 
1471
  // Read all albums, pre-ordered
1472
+ $order_by = wppa_get_option( 'wppa_album_order_' . wppa_get_user(), 'id' );
1473
+ $order_desc = wppa_get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' );
1474
  // A dynamic query is regarded as being insecure, so we make a switch statemnent with all possible sequences.
1475
  // $albums = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_albums ORDER BY " . $order_by . ( $order_desc == 'yes' ? " DESC" : "" ) , ARRAY_A );
1476
  if ( $order_desc == 'yes' ) {
1544
  $reverse = false;
1545
  if ( isset($_REQUEST['order_by']) ) $order = $_REQUEST['order_by']; else $order = '';
1546
  if ( ! $order ) {
1547
+ $order = wppa_get_option('wppa_album_order_'.wppa_get_user(), 'id');
1548
+ $reverse = (wppa_get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
1549
  }
1550
  else {
1551
+ $old_order = wppa_get_option('wppa_album_order_'.wppa_get_user(), 'id');
1552
+ $reverse = (wppa_get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
1553
  if ( $old_order == $order ) {
1554
  $reverse = ! $reverse;
1555
  }
1893
  }
1894
 
1895
  // Read all albums, pre-ordered
1896
+ // $albums = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_albums ORDER BY " . wppa_get_option( 'wppa_album_order_'.wppa_get_user(), 'id' ) . ( wppa_get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' ) == 'yes' ? " DESC" : "" ) , ARRAY_A );
1897
+ $order_by = wppa_get_option( 'wppa_album_order_' . wppa_get_user(), 'id' );
1898
+ $order_desc = wppa_get_option( 'wppa_album_order_' . wppa_get_user() . '_reverse' );
1899
  // A dynamic query is regarded as being insecure, so we make a switch statemnent with all possible sequences.
1900
  if ( $order_desc == 'yes' ) {
1901
  switch( $order_by ) {
1999
  $reverse = false;
2000
  if ( isset($_REQUEST['order_by']) ) $order = $_REQUEST['order_by']; else $order = '';
2001
  if ( ! $order ) {
2002
+ $order = wppa_get_option('wppa_album_order_'.wppa_get_user(), 'id');
2003
+ $reverse = (wppa_get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
2004
  }
2005
  else {
2006
+ $old_order = wppa_get_option('wppa_album_order_'.wppa_get_user(), 'id');
2007
+ $reverse = (wppa_get_option('wppa_album_order_'.wppa_get_user().'_reverse') == 'yes');
2008
  if ( $old_order == $order ) {
2009
  $reverse = ! $reverse;
2010
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.2.17
7
  *
8
  */
9
 
@@ -5604,7 +5604,7 @@ global $wpdb;
5604
  // There are count($thumbs) items this day
5605
  if ( count( $thumbs ) ) {
5606
 
5607
- $thisday = wppa_local_date( get_option( 'date_format' ), wppa_local_strtotime( $year . '-' . $month . '-' . $current_day . '-12' ) );
5608
  $imgtitle = sprintf( __( 'Zoom in to see %d items of %s', 'wp-photo-album-plus' ), count( $thumbs ), $thisday );
5609
  $id = $thumbs['0']['id'];
5610
  wppa_get_thumb_url( $id ); // Force creation of thumb in case its not there to find the size
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.3.00
7
  *
8
  */
9
 
5604
  // There are count($thumbs) items this day
5605
  if ( count( $thumbs ) ) {
5606
 
5607
+ $thisday = wppa_local_date( wppa_get_option( 'date_format' ), wppa_local_strtotime( $year . '-' . $month . '-' . $current_day . '-12' ) );
5608
  $imgtitle = sprintf( __( 'Zoom in to see %d items of %s', 'wp-photo-album-plus' ), count( $thumbs ), $thisday );
5609
  $id = $thumbs['0']['id'];
5610
  wppa_get_thumb_url( $id ); // Force creation of thumb in case its not there to find the size
wppa-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the interface to SCABN
6
- * Version 6.9.14
7
  *
8
  */
9
 
@@ -37,7 +37,7 @@ global $wppa_session;
37
  ), $atts ) );
38
 
39
  $cart = $wppa_session['wfcart']; // load the cart from the session
40
- $scabn_options = get_option('scabn_options');
41
  $currency = apply_filters('scabn_display_currency_symbol',NULL);
42
 
43
  // Slideshow?
@@ -111,4 +111,4 @@ global $wppa_session;
111
  return $output;
112
  }
113
 
114
- if ( get_option('wppa_use_scabn', 'no') == 'yes' ) add_shortcode('cart', 'wppa_add_to_cart');
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the interface to SCABN
6
+ * Version 7.3.00
7
  *
8
  */
9
 
37
  ), $atts ) );
38
 
39
  $cart = $wppa_session['wfcart']; // load the cart from the session
40
+ $scabn_options = wppa_get_option('scabn_options');
41
  $currency = apply_filters('scabn_display_currency_symbol',NULL);
42
 
43
  // Slideshow?
111
  return $output;
112
  }
113
 
114
+ if ( wppa_get_option('wppa_use_scabn', 'no') == 'yes' ) add_shortcode('cart', 'wppa_add_to_cart');
wppa-cloudinary.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
- * Version 6.6.18
5
  *
6
  */
7
 
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
10
  add_action('init', 'wppa_load_cloudinary');
11
  function wppa_load_cloudinary() {
12
 
13
- $cdn = get_option('wppa_cdn_service', 'nil');
14
 
15
  if ( $cdn != 'cloudinary' && $cdn != 'cloudinarymaintenance' ) return;
16
 
@@ -19,9 +19,9 @@ function wppa_load_cloudinary() {
19
  require_once 'cloudinary/src/Api.php';
20
 
21
  \Cloudinary::config(array(
22
- "cloud_name" => get_option('wppa_cdn_cloud_name'),
23
- "api_key" => get_option('wppa_cdn_api_key'),
24
- "api_secret" => get_option('wppa_cdn_api_secret')
25
  ));
26
 
27
  global $wppa_cloudinary_api;
@@ -33,7 +33,7 @@ function wppa_upload_to_cloudinary( $id ) {
33
  $prefix = ( is_multisite() && ! WPPA_MULTISITE_GLOBAL ) ? $blog_id.'-' : '';
34
 
35
  $args = array( "public_id" => $prefix.$id,
36
- "version" => get_option('wppa_photo_version', '1'),
37
  "invalidate" => true
38
  );
39
 
@@ -174,7 +174,7 @@ global $blog_id;
174
  $size = $test_only ? 'h_32/' : '';
175
  $s = is_ssl() ? 's' : '';
176
 
177
- $url = 'http'.$s.'://res.cloudinary.com/'.get_option('wppa_cdn_cloud_name').'/image/upload/'.$size.$prefix.$id.'.'.$ext;
178
 
179
  return $url;
180
  }
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
+ * Version 7.3.00
5
  *
6
  */
7
 
10
  add_action('init', 'wppa_load_cloudinary');
11
  function wppa_load_cloudinary() {
12
 
13
+ $cdn = wppa_get_option('wppa_cdn_service', 'nil');
14
 
15
  if ( $cdn != 'cloudinary' && $cdn != 'cloudinarymaintenance' ) return;
16
 
19
  require_once 'cloudinary/src/Api.php';
20
 
21
  \Cloudinary::config(array(
22
+ "cloud_name" => wppa_get_option('wppa_cdn_cloud_name'),
23
+ "api_key" => wppa_get_option('wppa_cdn_api_key'),
24
+ "api_secret" => wppa_get_option('wppa_cdn_api_secret')
25
  ));
26
 
27
  global $wppa_cloudinary_api;
33
  $prefix = ( is_multisite() && ! WPPA_MULTISITE_GLOBAL ) ? $blog_id.'-' : '';
34
 
35
  $args = array( "public_id" => $prefix.$id,
36
+ "version" => wppa_get_option('wppa_photo_version', '1'),
37
  "invalidate" => true
38
  );
39
 
174
  $size = $test_only ? 'h_32/' : '';
175
  $s = is_ssl() ? 's' : '';
176
 
177
+ $url = 'http'.$s.'://res.cloudinary.com/'.wppa_get_option('wppa_cdn_cloud_name').'/image/upload/'.$size.$prefix.$id.'.'.$ext;
178
 
179
  return $url;
180
  }
wppa-comment-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
- * Version 7.2.08
7
  *
8
  */
9
 
@@ -68,7 +68,7 @@ class WPPA_Comment_table extends WP_List_Table {
68
 
69
  function column_user( $item ) {
70
 
71
- return stripslashes( $item['user'] ) . '<br />' . $item['ip'];
72
  }
73
 
74
  function column_timestamp( $item ) {
@@ -440,7 +440,7 @@ function _wppa_comment_admin() {
440
  echo
441
  '<tr>
442
  <td style="margin:0; font-weight:bold; color:red;">' . __( 'Auto deleted spam:', 'wp-photo-album-plus' ) . '</td>
443
- <td style="margin:0; font-weight:bold;">' . get_option( 'wppa_spam_auto_delcount', '0' ) . '</td>
444
  <td>' . sprintf( __( 'Comments marked as spam will be deleted when they are entered longer than %s ago.', 'wp-photo-album-plus' ), $spamtime ) . '</td>
445
  </tr>';
446
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
+ * Version 7.3.00
7
  *
8
  */
9
 
68
 
69
  function column_user( $item ) {
70
 
71
+ return stripslashes( $item['user'] ) . '<br />(' . ( $item['userid'] == -1 ? 'Loggedout' : $item['userid'] ) . ')<br />' . $item['ip'];
72
  }
73
 
74
  function column_timestamp( $item ) {
440
  echo
441
  '<tr>
442
  <td style="margin:0; font-weight:bold; color:red;">' . __( 'Auto deleted spam:', 'wp-photo-album-plus' ) . '</td>
443
+ <td style="margin:0; font-weight:bold;">' . wppa_get_option( 'wppa_spam_auto_delcount', '0' ) . '</td>
444
  <td>' . sprintf( __( 'Comments marked as spam will be deleted when they are entered longer than %s ago.', 'wp-photo-album-plus' ), $spamtime ) . '</td>
445
  </tr>';
446
  }
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 7.2.11
6
  *
7
  */
8
 
@@ -15,52 +15,63 @@ global $wppa_opt;
15
  global $wppa_revno;
16
  global $wppa_api_version;
17
  global $wpdb;
18
- global $wppa_initruntimetime;
19
  global $wppa_defaults;
20
 
21
- $wppa_initruntimetime = - microtime( true );
22
-
23
- if ( $force ) {
24
- $wppa = false; // destroy existing arrays
25
- $wppa_opt = false;
26
- }
27
-
28
  if ( is_array( $wppa ) && is_array( $wppa_opt ) && ! $force ) {
29
  return; // Done already
30
  }
31
 
32
- if ( ! is_array( $wppa ) ) {
33
- wppa_reset_occurrance();
34
- }
 
 
 
 
 
 
 
 
 
 
35
 
36
- // Rebuild options array if required, i.e. when not yet existing or deleted.
37
- if ( ! is_array( $wppa_opt ) ) {
38
- wppa_set_defaults();
39
- $wppa_opt = $wppa_defaults;
40
- foreach ( array_keys( $wppa_opt ) as $option ) {
41
- $optval = get_option( $option, 'nil' );
42
- if ( $optval == 'nil' ) {
43
- update_option( $option, $wppa_defaults[$option] );
44
  }
 
 
45
  else {
46
- $wppa_opt[$option] = $optval;
47
  }
48
  }
 
 
 
 
 
49
  }
50
 
 
 
 
 
51
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
52
  if ( ! wppa_is_cron() && ! wppa( 'ajax' ) ) {
53
- if ( wppa_is_int( get_option( 'wppa_grant_parent' ) ) ) {
54
  wppa_grant_albums();
55
  }
56
  }
57
 
 
58
  if ( isset( $_GET['debug'] ) && wppa_switch( 'allow_debug' ) ) {
59
  $key = $_GET['debug'] ? $_GET['debug'] : E_ALL;
60
  wppa( 'debug', $key );
61
  }
62
 
63
- $wppa_initruntimetime += microtime( true );
64
  }
65
 
66
  function wppa_reset_occurrance() {
@@ -186,8 +197,8 @@ global $thumbs;
186
  'is_supersearch' => false,
187
  'supersearch' => '',
188
  'is_mobile' => wppa_is_mobile(),
189
- 'rel' => get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-rel' : 'rel',
190
- 'lbtitle' => get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-lbtitle' : 'title',
191
  'alt' => 'even',
192
  'is_wppa_tree' => false,
193
  'is_calendar' => false,
@@ -352,7 +363,7 @@ function wppa_protect_relative( $url ) {
352
  $result = $url;
353
 
354
  // Only if feature enabled
355
- if ( get_option( 'wppa_relative_urls' ) == 'yes' ) {
356
  $result = str_replace( 'http', 'h t t p ', $result );
357
  }
358
 
@@ -367,7 +378,7 @@ function wppa_make_relative( $url, $rel = '' ) {
367
 
368
  // Can not use wppa_opt(). $wppa_opt is not initialized when called from wppa_set_defaults
369
  if ( $rel != 'abs' ) { // Not if absulute is explicitly requested
370
- if ( get_option( 'wppa_relative_urls' ) == 'yes' || $rel == 'rel' ) {
371
  if ( isset( $_ENV['HTTP_HOST'] ) ) {
372
  if ( is_ssl() ) {
373
  $result = str_replace( 'https://' . $_ENV['HTTP_HOST'], '', $result );
@@ -505,6 +516,12 @@ global $wppa;
505
  $result = " ORDER BY RAND(" . time() % 4711 . ")";
506
  return $result;
507
  }
 
 
 
 
 
 
508
 
509
  // Album specified?
510
  if ( wppa_is_int( $id ) && $id > '0' ) {
@@ -1258,7 +1275,7 @@ global $wp_roles;
1258
  unset ( $roles['administrator'] );
1259
  foreach ( array_keys( $roles ) as $role ) if ( ! $limits ) {
1260
  if ( current_user_can( $role ) ) {
1261
- $limits = get_option( 'wppa_'.$role.'_upload_limit_count', '0' ).'/'.get_option( 'wppa_'.$role.'_upload_limit_time', '0' );
1262
  }
1263
  }
1264
  }
@@ -1964,7 +1981,7 @@ function wppa_delete_obsolete_tempfiles( $force = false ) {
1964
  function wppa_publish_scheduled() {
1965
  global $wpdb;
1966
 
1967
- $last_check = get_option( 'wppa_last_schedule_check', '0' );
1968
  if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
1969
 
1970
  // Publish scheduled photos
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 7.3.00
6
  *
7
  */
8
 
15
  global $wppa_revno;
16
  global $wppa_api_version;
17
  global $wpdb;
 
18
  global $wppa_defaults;
19
 
 
 
 
 
 
 
 
20
  if ( is_array( $wppa ) && is_array( $wppa_opt ) && ! $force ) {
21
  return; // Done already
22
  }
23
 
24
+ // Rebuild options array, start with the defaults
25
+ wppa_set_defaults();
26
+
27
+ // Now find the non defaults
28
+ $non_defaults = $wpdb->get_results( $wpdb->prepare( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE %s", $wpdb->esc_like( 'wppa_' ) . '%' ), ARRAY_A );
29
+
30
+ // Init with defaults
31
+ $wppa_opt = $wppa_defaults;
32
+
33
+ // Check all existing wppa_xxx options
34
+ foreach( $non_defaults as $option ) {
35
+ $name = $option['option_name'];
36
+ $value = $option['option_value'];
37
 
38
+ // If it is a setting
39
+ if ( isset( $wppa_opt[$name] ) ) {
40
+
41
+ // If it is not a default value, copy value in optins array
42
+ if ( $value != $wppa_opt[$name] ) {
43
+ $wppa_opt[$name] = $value;
 
 
44
  }
45
+
46
+ // It is default, remove it
47
  else {
48
+ delete_option( $name );
49
  }
50
  }
51
+
52
+ // It starts with wppa_ but is not a setting
53
+ else {
54
+ // wppa_log( 'dbg', 'Option ' . $name . ' starts with wppa_ but is not a setting' );
55
+ }
56
  }
57
 
58
+ // Reset runtime parms
59
+ wppa_reset_occurrance();
60
+
61
+ // Check if gran parents mudt be made
62
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
63
  if ( ! wppa_is_cron() && ! wppa( 'ajax' ) ) {
64
+ if ( wppa_is_int( wppa_get_option( 'wppa_grant_parent' ) ) ) {
65
  wppa_grant_albums();
66
  }
67
  }
68
 
69
+ // Remember if debugging is on
70
  if ( isset( $_GET['debug'] ) && wppa_switch( 'allow_debug' ) ) {
71
  $key = $_GET['debug'] ? $_GET['debug'] : E_ALL;
72
  wppa( 'debug', $key );
73
  }
74
 
 
75
  }
76
 
77
  function wppa_reset_occurrance() {
197
  'is_supersearch' => false,
198
  'supersearch' => '',
199
  'is_mobile' => wppa_is_mobile(),
200
+ 'rel' => wppa_get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-rel' : 'rel',
201
+ 'lbtitle' => wppa_get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-lbtitle' : 'title',
202
  'alt' => 'even',
203
  'is_wppa_tree' => false,
204
  'is_calendar' => false,
363
  $result = $url;
364
 
365
  // Only if feature enabled
366
+ if ( wppa_get_option( 'wppa_relative_urls' ) == 'yes' ) {
367
  $result = str_replace( 'http', 'h t t p ', $result );
368
  }
369
 
378
 
379
  // Can not use wppa_opt(). $wppa_opt is not initialized when called from wppa_set_defaults
380
  if ( $rel != 'abs' ) { // Not if absulute is explicitly requested
381
+ if ( wppa_get_option( 'wppa_relative_urls' ) == 'yes' || $rel == 'rel' ) {
382
  if ( isset( $_ENV['HTTP_HOST'] ) ) {
383
  if ( is_ssl() ) {
384
  $result = str_replace( 'https://' . $_ENV['HTTP_HOST'], '', $result );
516
  $result = " ORDER BY RAND(" . time() % 4711 . ")";
517
  return $result;
518
  }
519
+
520
+ // Filmonly random?
521
+ if ( wppa( 'is_filmonly' ) && wppa_switch( 'filmonly_random' ) ) {
522
+ $result = " ORDER BY RAND()";
523
+ return $result;
524
+ }
525
 
526
  // Album specified?
527
  if ( wppa_is_int( $id ) && $id > '0' ) {
1275
  unset ( $roles['administrator'] );
1276
  foreach ( array_keys( $roles ) as $role ) if ( ! $limits ) {
1277
  if ( current_user_can( $role ) ) {
1278
+ $limits = wppa_get_option( 'wppa_'.$role.'_upload_limit_count', '0' ).'/'.wppa_get_option( 'wppa_'.$role.'_upload_limit_time', '0' );
1279
  }
1280
  }
1281
  }
1981
  function wppa_publish_scheduled() {
1982
  global $wpdb;
1983
 
1984
+ $last_check = wppa_get_option( 'wppa_last_schedule_check', '0' );
1985
  if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
1986
 
1987
  // Publish scheduled photos
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 7.2.06
7
  *
8
  *
9
  */
@@ -88,11 +88,11 @@ function wppa_is_maintenance_cron_job_crashed( $slug ) {
88
  $result = false;
89
 
90
  // If there is a last timestamp longer than 5 minutes ago...
91
- $lasttime = get_option( $slug.'_lasttimestamp', '0' );
92
  if ( $lasttime && $lasttime < ( time() - 300 ) ) {
93
 
94
  // And the user is cron
95
- if ( get_option( $slug . '_user' ) == 'cron-job' ) {
96
 
97
  // And proc is not scheduled
98
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
@@ -107,13 +107,13 @@ function wppa_is_maintenance_cron_job_crashed( $slug ) {
107
  elseif ( ! $lasttime ) {
108
 
109
  // Nothing done yet
110
- if ( get_option( $slug . 'last' ) == '0' ) {
111
 
112
  // Togo not calculated yet
113
- if ( get_option( $slug . 'togo' ) == '' ) {
114
 
115
  // If the user is cron
116
- if ( get_option( $slug . '_user' ) == 'cron-job' ) {
117
 
118
  // And proc is not scheduled
119
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
@@ -167,7 +167,7 @@ global $wppa_endtime;
167
  // Start renew crypt processes if configured
168
  if ( wppa_opt( 'crypt_albums_every' ) ) {
169
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew albumcrypt.' );
170
- $last = get_option( 'wppa_crypt_albums_lasttimestamp', '0' );
171
  if ( $last + wppa_opt( 'crypt_albums_every' ) * 3600 < time() ) {
172
  wppa_schedule_maintenance_proc( 'wppa_crypt_albums' );
173
  update_option( 'wppa_crypt_albums_lasttimestamp', time() );
@@ -176,7 +176,7 @@ global $wppa_endtime;
176
  wppa_log( 'Cron', 'Phase 1, time left = '.($wppa_endtime-time()) );
177
  if ( wppa_opt( 'crypt_photos_every' ) ) {
178
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew photocrypt.' );
179
- $last = get_option( 'wppa_crypt_photos_lasttimestamp', '0' );
180
  if ( $last + wppa_opt( 'crypt_photos_every' ) * 3600 < time() ) {
181
  wppa_schedule_maintenance_proc( 'wppa_crypt_photos' );
182
  update_option( 'wppa_crypt_photos_lasttimestamp', time() );
@@ -201,7 +201,7 @@ global $wppa_endtime;
201
  $time = time();
202
  $obsolete = $time - $spammaxage;
203
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->wppa_comments WHERE status = 'spam' AND timestamp < %s", $obsolete ) );
204
- if ( $iret ) wppa_update_option( 'wppa_spam_auto_delcount', get_option( 'wppa_spam_auto_delcount', '0' ) + $iret );
205
  }
206
  wppa_log( 'Cron', 'Phase 4, time left = '.($wppa_endtime-time()) );
207
 
@@ -226,7 +226,7 @@ global $wppa_endtime;
226
  // Retry failed mails
227
  if ( wppa_opt( 'retry_mails' ) ) {
228
 
229
- $failed_mails = get_option( 'wppa_failed_mails' );
230
  if ( is_array( $failed_mails ) ) {
231
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} retrying failed mails.' );
232
 
@@ -388,7 +388,7 @@ static $done;
388
  wp_schedule_single_event( time() + $time, 'wppa_clear_cache' );
389
  $done = true;
390
 
391
- wppa_log( 'Cron', '{b}wppa_clear_cache{/b} scheduled for run in ' . $time . ' sec.', true );
392
  }
393
  }
394
 
@@ -507,7 +507,7 @@ global $wppa_cron_maintenance_slugs;
507
 
508
  foreach ( $wppa_cron_maintenance_slugs as $slug ) {
509
  if ( wppa_is_maintenance_cron_job_crashed( $slug ) ) {
510
- $last = get_option( $slug . '_last' );
511
  update_option( $slug . '_last', $last + 1 );
512
  wppa_schedule_maintenance_proc( $slug );
513
  wppa_log( 'Cron', '{b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 7.3.00
7
  *
8
  *
9
  */
88
  $result = false;
89
 
90
  // If there is a last timestamp longer than 5 minutes ago...
91
+ $lasttime = wppa_get_option( $slug.'_lasttimestamp', '0' );
92
  if ( $lasttime && $lasttime < ( time() - 300 ) ) {
93
 
94
  // And the user is cron
95
+ if ( wppa_get_option( $slug . '_user' ) == 'cron-job' ) {
96
 
97
  // And proc is not scheduled
98
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
107
  elseif ( ! $lasttime ) {
108
 
109
  // Nothing done yet
110
+ if ( wppa_get_option( $slug . 'last' ) == '0' ) {
111
 
112
  // Togo not calculated yet
113
+ if ( wppa_get_option( $slug . 'togo' ) == '' ) {
114
 
115
  // If the user is cron
116
+ if ( wppa_get_option( $slug . '_user' ) == 'cron-job' ) {
117
 
118
  // And proc is not scheduled
119
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
167
  // Start renew crypt processes if configured
168
  if ( wppa_opt( 'crypt_albums_every' ) ) {
169
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew albumcrypt.' );
170
+ $last = wppa_get_option( 'wppa_crypt_albums_lasttimestamp', '0' );
171
  if ( $last + wppa_opt( 'crypt_albums_every' ) * 3600 < time() ) {
172
  wppa_schedule_maintenance_proc( 'wppa_crypt_albums' );
173
  update_option( 'wppa_crypt_albums_lasttimestamp', time() );
176
  wppa_log( 'Cron', 'Phase 1, time left = '.($wppa_endtime-time()) );
177
  if ( wppa_opt( 'crypt_photos_every' ) ) {
178
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew photocrypt.' );
179
+ $last = wppa_get_option( 'wppa_crypt_photos_lasttimestamp', '0' );
180
  if ( $last + wppa_opt( 'crypt_photos_every' ) * 3600 < time() ) {
181
  wppa_schedule_maintenance_proc( 'wppa_crypt_photos' );
182
  update_option( 'wppa_crypt_photos_lasttimestamp', time() );
201
  $time = time();
202
  $obsolete = $time - $spammaxage;
203
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->wppa_comments WHERE status = 'spam' AND timestamp < %s", $obsolete ) );
204
+ if ( $iret ) wppa_update_option( 'wppa_spam_auto_delcount', wppa_get_option( 'wppa_spam_auto_delcount', '0' ) + $iret );
205
  }
206
  wppa_log( 'Cron', 'Phase 4, time left = '.($wppa_endtime-time()) );
207
 
226
  // Retry failed mails
227
  if ( wppa_opt( 'retry_mails' ) ) {
228
 
229
+ $failed_mails = wppa_get_option( 'wppa_failed_mails' );
230
  if ( is_array( $failed_mails ) ) {
231
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} retrying failed mails.' );
232
 
388
  wp_schedule_single_event( time() + $time, 'wppa_clear_cache' );
389
  $done = true;
390
 
391
+ wppa_log( 'Cron', '{b}wppa_clear_cache{/b} scheduled for run in ' . $time . ' sec.' );
392
  }
393
  }
394
 
507
 
508
  foreach ( $wppa_cron_maintenance_slugs as $slug ) {
509
  if ( wppa_is_maintenance_cron_job_crashed( $slug ) ) {
510
+ $last = wppa_get_option( $slug . '_last' );
511
  update_option( $slug . '_last', $last + 1 );
512
  wppa_schedule_maintenance_proc( $slug );
513
  wppa_log( 'Cron', '{b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
wppa-dashboard-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains dashboard widgets code
6
  *
7
- * Version 7.2.08
8
  *
9
  */
10
 
@@ -391,7 +391,7 @@ global $wpdb;
391
  }
392
 
393
  // Photo of the day history. This is undocumented and no setting for available.
394
- if ( get_option( 'wppa_potd_log', 'no' ) == 'yes' ) {
395
  add_action( 'do_meta_boxes', 'wppa_potdlog' );
396
  }
397
 
@@ -412,7 +412,7 @@ function wppa_potdlog() {
412
  function wppa_show_potd_log() {
413
 
414
  // Get data
415
- $his = get_option( 'wppa_potd_log_data', array() );
416
  if ( ! empty( $his ) ) {
417
  echo
418
  '<table>';
4
  *
5
  * Contains dashboard widgets code
6
  *
7
+ * Version 7.3.00
8
  *
9
  */
10
 
391
  }
392
 
393
  // Photo of the day history. This is undocumented and no setting for available.
394
+ if ( wppa_get_option( 'wppa_potd_log', 'no' ) == 'yes' ) {
395
  add_action( 'do_meta_boxes', 'wppa_potdlog' );
396
  }
397
 
412
  function wppa_show_potd_log() {
413
 
414
  // Get data
415
+ $his = wppa_get_option( 'wppa_potd_log_data', array() );
416
  if ( ! empty( $his ) ) {
417
  echo
418
  '<table>';
wppa-date-time.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
- * Version 7.2.10
7
  *
8
  */
9
 
@@ -180,7 +180,7 @@ function wppa_local_date( $format, $timestamp = false ) {
180
 
181
  // Fill in default format if not supplied
182
  if ( ! $format ) {
183
- $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
184
  }
185
 
186
  // Fill in default timestamp if not suplied
@@ -192,11 +192,11 @@ function wppa_local_date( $format, $timestamp = false ) {
192
  }
193
 
194
  // Find timezonestring
195
- $tzstring = get_option( 'timezone_string' );
196
  if ( empty( $tzstring ) ) {
197
 
198
  // Correct $time according to gmt_offset
199
- $current_offset = get_option( 'gmt_offset', 0 );
200
 
201
  $tzstring = 'UTC';
202
 
@@ -221,7 +221,7 @@ function wppa_local_strtotime( $str ) {
221
  $result = strtotime( $str );
222
 
223
  // Find timezonestring
224
- $tzstring = get_option( 'timezone_string' );
225
 
226
  if ( $tzstring ) {
227
  date_default_timezone_set( "UTC" );
@@ -230,7 +230,7 @@ function wppa_local_strtotime( $str ) {
230
  else {
231
 
232
  // Correct $time according to gmt_offset
233
- $current_offset = get_option( 'gmt_offset', 0 ) * 3600;
234
  }
235
 
236
  $result -= $current_offset;
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
180
 
181
  // Fill in default format if not supplied
182
  if ( ! $format ) {
183
+ $format = wppa_get_option( 'date_format' ) . ' ' . wppa_get_option( 'time_format' );
184
  }
185
 
186
  // Fill in default timestamp if not suplied
192
  }
193
 
194
  // Find timezonestring
195
+ $tzstring = wppa_get_option( 'timezone_string' );
196
  if ( empty( $tzstring ) ) {
197
 
198
  // Correct $time according to gmt_offset
199
+ $current_offset = wppa_get_option( 'gmt_offset', 0 );
200
 
201
  $tzstring = 'UTC';
202
 
221
  $result = strtotime( $str );
222
 
223
  // Find timezonestring
224
+ $tzstring = wppa_get_option( 'timezone_string' );
225
 
226
  if ( $tzstring ) {
227
  date_default_timezone_set( "UTC" );
230
  else {
231
 
232
  // Correct $time according to gmt_offset
233
+ $current_offset = wppa_get_option( 'gmt_offset', 0 ) * 3600;
234
  }
235
 
236
  $result -= $current_offset;
wppa-defaults.php ADDED
@@ -0,0 +1,1260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-defaults.php
3
+ * Package: wp-photo-album-plus
4
+ *
5
+ * Contains default settings
6
+ * Version 7.3.00
7
+ *
8
+ */
9
+
10
+ // Set default option values in global $wppa_defaults
11
+ // With $force = true, all non default options will be removed from wp_options table,
12
+ // being the equivalent to resetting to default, except: revision, rating_max and filesystem
13
+ // Changin those three requires conversion
14
+ function wppa_set_defaults( $force = false ) {
15
+ global $wppa_defaults;
16
+
17
+ $npd = '
18
+ <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'block\'); jQuery(\'.wppa-more\').css(\'display\', \'none\'); wppaOvlResize();">
19
+ <div class="wppa-more">
20
+ Camera info
21
+ </div>
22
+ </a>
23
+ <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'none\'); jQuery(\'.wppa-more\').css(\'display\', \'block\'); wppaOvlResize();">
24
+ <div class="wppa-dtl" style="display:none;" >
25
+ Hide Camera info
26
+ </div>
27
+ </a>
28
+ <div class="wppa-dtl" style="display:none;">
29
+ <br />
30
+ <table style="margin:0; border:none;" >
31
+ <tr><td class="wppa-label" >Date Time</td><td class="wppa-value" >E#0132</td></tr>
32
+ <tr><td class="wppa-label" >Camera</td><td class="wppa-value" >E#0110</td></tr>
33
+ <tr><td class="wppa-label" >Focal length</td><td class="wppa-value" >E#920A</td></tr>
34
+ <tr><td class="wppa-label" >F-Stop</td><td class="wppa-value" >E#829D</td></tr>
35
+ <tr><td class="wppa-label" >ISO Speed Rating</td><td class="wppa-value" >E#8827</td></tr>
36
+ <tr><td class="wppa-label" >Exposure program</td><td class="wppa-value" >E#8822</td></tr>
37
+ <tr><td class="wppa-label" >Metering mode</td><td class="wppa-value" >E#9207</td></tr>
38
+ <tr><td class="wppa-label" >Flash</td><td class="wppa-value" >E#9209</td></tr>
39
+ </table>
40
+ </div>';
41
+
42
+ // Nice scroll options
43
+ $nso = "cursorwidth:8,
44
+ cursoropacitymin:0.4,
45
+ cursorcolor:'#777777',
46
+ cursorborder:'none',
47
+ cursorborderradius:6,
48
+ autohidemode:'leave',
49
+ nativeparentscrolling:false,
50
+ preservenativescrolling:false,
51
+ bouncescroll:false,
52
+ smoothscroll:true,
53
+ cursorborder:'2px solid transparent',
54
+ horizrailenabled:false,";
55
+
56
+
57
+ $wppa_defaults = array ( 'wppa_revision' => '100',
58
+ 'wppa_prevrev' => '100',
59
+ 'wppa_max_users' => '1000',
60
+
61
+ // Table 0: Initial setup
62
+ 'wppa_i_responsive' => '',
63
+ 'wppa_i_downsize' => '',
64
+ 'wppa_i_source' => '',
65
+ 'wppa_i_userupload' => '',
66
+ 'wppa_i_rating' => '',
67
+ 'wppa_i_comment' => '',
68
+ 'wppa_i_share' => '',
69
+ 'wppa_i_iptc' => '',
70
+ 'wppa_i_exif' => '',
71
+ 'wppa_i_gpx' => '',
72
+ 'wppa_i_fotomoto' => '',
73
+ 'wppa_i_video' => '',
74
+ 'wppa_i_audio' => '',
75
+ 'wppa_i_stereo' => '',
76
+ 'wppa_i_pdf' => '',
77
+ 'wppa_i_done' => '',
78
+
79
+ // Table I: Sizes
80
+ // A System
81
+ 'wppa_colwidth' => 'auto', // 1
82
+ 'wppa_initial_colwidth' => '640',
83
+ 'wppa_resize_on_upload' => 'yes', // 2
84
+ 'wppa_resize_to' => '0', // 3
85
+ 'wppa_min_thumbs' => '0', // 4
86
+ 'wppa_bwidth' => '1', // 5
87
+ 'wppa_bradius' => '6', // 6
88
+ 'wppa_box_spacing' => '8', // 7
89
+ 'wppa_pagelinks_max' => '7',
90
+ 'wppa_max_filename_length' => '0',
91
+ 'wppa_max_photoname_length' => '0',
92
+ 'wppa_sticky_header_size' => '0',
93
+
94
+ // B Fullsize
95
+ 'wppa_fullsize' => '640', // 1
96
+ 'wppa_maxheight' => '480', // 2
97
+ 'wppa_enlarge' => 'no', // 3
98
+ 'wppa_fullimage_border_width' => '', // 4
99
+ 'wppa_numbar_max' => '10', // 5
100
+ 'wppa_share_size' => '32',
101
+ 'wppa_mini_treshold' => '500',
102
+ 'wppa_slideshow_pagesize' => '0',
103
+ 'wppa_film_thumbsize' => '100', // 9
104
+ 'wppa_slideonly_max' => '0',
105
+
106
+ // C Thumbnails
107
+ 'wppa_thumbsize' => '100', // 1
108
+ 'wppa_thumbsize_alt' => '130', // 1a
109
+ 'wppa_thumb_aspect' => '0:0:none', // 2
110
+ 'wppa_tf_width' => '100', // 3
111
+ 'wppa_tf_width_alt' => '130', // 3a
112
+ 'wppa_tf_height' => '150', // 4
113
+ 'wppa_tf_height_alt' => '180', // 4a
114
+ 'wppa_tn_margin' => '4', // 5
115
+ 'wppa_thumb_auto' => 'yes', // 6
116
+ 'wppa_thumb_page_size' => '0', // 7
117
+ 'wppa_popupsize' => '150', // 8
118
+ 'wppa_use_thumbs_if_fit' => 'yes', // 9
119
+ 'wppa_area_size' => '0', // 10
120
+ 'wppa_nicescroll' => 'no', // 11
121
+
122
+ // D Covers
123
+ 'wppa_max_cover_width' => '1024', // 1
124
+ 'wppa_cover_minheight' => '0', // 2
125
+ 'wppa_head_and_text_frame_height' => '0', // 3
126
+ 'wppa_text_frame_height' => '54', // 4
127
+ 'wppa_coverphoto_responsive' => 'no',
128
+ 'wppa_smallsize' => '150', // 5
129
+ 'wppa_smallsize_percentage' => '30',
130
+ 'wppa_smallsize_multi' => '100', // 6
131
+ 'wppa_smallsize_multi_percentage' => '20',
132
+ 'wppa_coversize_is_height' => 'no', // 7
133
+ 'wppa_album_page_size' => '0', // 8
134
+ 'wppa_cover_spacing' => '8', // 9
135
+
136
+ // E Rating & comments
137
+ 'wppa_rating_max' => '5', // 1
138
+ 'wppa_rating_prec' => '2', // 2
139
+ 'wppa_gravatar_size' => '40', // 3
140
+ 'wppa_ratspacing' => '30',
141
+
142
+ // F Widgets
143
+ 'wppa_topten_count' => '10', // 1
144
+ 'wppa_topten_non_zero' => 'no',
145
+ 'wppa_topten_size' => '86', // 2
146
+ 'wppa_comten_count' => '10', // 3
147
+ 'wppa_comten_size' => '86', // 4
148
+ 'wppa_featen_count' => '10',
149
+ 'wppa_featen_size' => '86',
150
+ 'wppa_thumbnail_widget_count' => '10', // 5
151
+ 'wppa_thumbnail_widget_size' => '86', // 6
152
+ 'wppa_lasten_count' => '10', // 7
153
+ 'wppa_lasten_size' => '86', // 8
154
+ 'wppa_album_widget_count' => '10',
155
+ 'wppa_album_widget_size' => '86',
156
+ 'wppa_related_count' => '10',
157
+ 'wppa_tagcloud_min' => '8',
158
+ 'wppa_tagcloud_max' => '24',
159
+
160
+ // G Overlay
161
+ 'wppa_ovl_txt_lines' => 'auto', // 1
162
+ 'wppa_magnifier' => 'magnifier-small.png', // 2
163
+ 'wppa_ovl_border_width' => '8',
164
+ 'wppa_ovl_border_radius' => '12',
165
+ 'wppa_ovl_fsx_btn_size' => '48',
166
+
167
+ // H Video
168
+ 'wppa_video_width' => '640',
169
+ 'wppa_video_height' => '480',
170
+
171
+ // J Icon sizes
172
+ 'wppa_nav_icon_size' => 'default',
173
+ 'wppa_nav_icon_size_slide' => 'default',
174
+ 'wppa_icon_size_rating' => 'default',
175
+ 'wppa_nav_icon_size_panorama' => '32',
176
+ 'wppa_nav_icon_size_lightbox' => '48',
177
+
178
+ // Table II: Visibility
179
+ // A Breadcrumb
180
+ 'wppa_show_bread_posts' => 'yes', // 1a
181
+ 'wppa_show_bread_pages' => 'yes', // 1b
182
+ 'wppa_bc_on_search' => 'yes', // 2
183
+ 'wppa_bc_on_topten' => 'yes', // 3
184
+ 'wppa_bc_on_lasten' => 'yes', // 3
185
+ 'wppa_bc_on_comten' => 'yes', // 3
186
+ 'wppa_bc_on_featen' => 'yes',
187
+ 'wppa_bc_on_tag' => 'yes', // 3
188
+ 'wppa_bc_on_related' => 'yes',
189
+ 'wppa_show_home' => 'yes', // 4
190
+ 'wppa_home_text' => __( 'Home', 'wp-photo-album-plus' ),
191
+ 'wppa_show_page' => 'yes', // 4
192
+ 'wppa_show_pname' => 'yes',
193
+ 'wppa_bc_separator' => 'raquo', // 5
194
+ 'wppa_bc_txt' => htmlspecialchars('<span style="color:red; font_size:24px;">&bull;</span>'), // 6
195
+ 'wppa_bc_url' => wppa_get_imgdir().'arrow.gif', // 7
196
+ 'wppa_pagelink_pos' => 'bottom', // 8
197
+ 'wppa_bc_slide_thumblink' => 'no',
198
+
199
+ // B Slideshow
200
+ 'wppa_navigation_type' => 'icons', // 0
201
+ 'wppa_show_startstop_navigation' => 'yes', // 1
202
+ 'wppa_show_startstop_filmonly' => 'no',
203
+ 'wppa_show_browse_navigation' => 'yes', // 2
204
+ 'wppa_filmstrip' => 'yes', // 3
205
+ 'wppa_film_show_glue' => 'yes', // 4
206
+ 'wppa_show_full_name' => 'yes', // 5
207
+ 'wppa_show_full_owner' => 'no', // 5.1
208
+ 'wppa_show_full_desc' => 'yes', // 6
209
+ 'wppa_hide_when_empty' => 'no', // 6.1
210
+ 'wppa_rating_on' => 'yes', // 7
211
+ 'wppa_dislike_mail_every' => '5', // 7.1
212
+ 'wppa_dislike_set_pending' => '0',
213
+ 'wppa_dislike_delete' => '0',
214
+ 'wppa_dislike_show_count' => 'yes', // 7.2
215
+ 'wppa_rating_display_type' => 'graphic', // 8
216
+ 'wppa_show_avg_rating' => 'yes', // 9
217
+ 'wppa_show_avg_mine_2' => 'no',
218
+ 'wppa_show_comments' => 'yes', // 10
219
+ 'wppa_comment_gravatar' => 'monsterid', // 11
220
+ 'wppa_comment_gravatar_url' => 'http://', // 12
221
+ 'wppa_show_bbb' => 'no', // 13
222
+ 'wppa_show_ubb' => 'no',
223
+ 'wppa_show_start_stop_icons' => 'no',
224
+ // 'wppa_start_stop_icons_type' => '.jpg',
225
+ 'wppa_custom_on' => 'no', // 14
226
+ 'wppa_custom_content' => '<div style="color:red; font-size:24px; font-weight:bold; text-align:center;">Hello world!</div><div style="text-align:center;" >You can change this text in Table II-B15</div>', // 15
227
+ 'wppa_show_slideshownumbar' => 'no', // 16
228
+ 'wppa_show_iptc' => 'no', // 17
229
+ 'wppa_show_iptc_open' => 'no',
230
+ 'wppa_show_exif' => 'no', // 18
231
+ 'wppa_show_exif_open' => 'no',
232
+ 'wppa_share_on' => 'no',
233
+ 'wppa_share_hide_when_running' => 'yes',
234
+ 'wppa_sm_void_pages' => '0',
235
+ 'wppa_share_on_widget' => 'no',
236
+ 'wppa_share_on_thumbs' => 'no',
237
+ 'wppa_share_on_lightbox' => 'no',
238
+ 'wppa_share_on_mphoto' => 'no',
239
+ 'wppa_share_qr' => 'no',
240
+ 'wppa_share_facebook' => 'yes',
241
+ 'wppa_share_twitter' => 'yes',
242
+ 'wppa_twitter_account' => '',
243
+ 'wppa_share_google' => 'yes',
244
+ 'wppa_share_pinterest' => 'yes',
245
+ 'wppa_share_linkedin' => 'yes',
246
+
247
+ 'wppa_facebook_comments' => 'yes',
248
+ 'wppa_facebook_like' => 'yes',
249
+ 'wppa_fb_display' => 'standard',
250
+ 'wppa_facebook_admin_id' => '',
251
+ 'wppa_facebook_app_id' => '',
252
+ 'wppa_load_facebook_sdk' => 'yes',
253
+ 'wppa_share_single_image' => 'yes',
254
+
255
+ // C Thumbnails
256
+ 'wppa_thumb_text_name' => 'yes', // 1
257
+ 'wppa_thumb_text_owner' => 'no', // 1.1
258
+ 'wppa_thumb_text_desc' => 'yes', // 2
259
+ 'wppa_thumb_text_rating' => 'yes', // 3
260
+ 'wppa_thumb_text_comcount' => 'no',
261
+ 'wppa_thumb_text_viewcount' => 'no',
262
+ 'wppa_thumb_text_virt_album' => 'yes',
263
+ 'wppa_thumb_video' => 'no',
264
+ 'wppa_thumb_audio' => 'yes',
265
+ 'wppa_popup_text_name' => 'yes', // 4
266
+ 'wppa_popup_text_owner' => 'no',
267
+ 'wppa_popup_text_desc' => 'yes', // 5
268
+ 'wppa_popup_text_desc_strip' => 'no', // 5.1
269
+ 'wppa_popup_text_rating' => 'yes', // 6
270
+ 'wppa_popup_text_ncomments' => 'yes', //
271
+ 'wppa_show_rating_count' => 'no', // 7
272
+ 'wppa_albdesc_on_thumbarea' => 'none',
273
+ 'wppa_albname_on_thumbarea' => 'none',
274
+ 'wppa_show_empty_thumblist' => 'no',
275
+
276
+ 'wppa_edit_thumb' => 'yes', // II-D17
277
+ 'wppa_upload_link_thumbs' => 'bottom',
278
+
279
+ // D Covers
280
+ 'wppa_show_cover_text' => 'yes', // 1
281
+ 'wppa_enable_slideshow' => 'yes', // 2
282
+ 'wppa_show_slideshowbrowselink' => 'yes', // 3
283
+ 'wppa_show_viewlink' => 'yes', // 4
284
+ 'wppa_show_treecount' => '-none-',
285
+ 'wppa_show_cats' => 'no',
286
+ 'wppa_skip_empty_albums' => 'yes',
287
+ 'wppa_count_on_title' => '-none-',
288
+ 'wppa_viewcount_on_cover' => '-none-',
289
+
290
+
291
+ // E Widgets
292
+ 'wppa_show_bbb_widget' => 'no', // 1
293
+ 'wppa_show_ubb_widget' => 'no', // 1
294
+ 'wppa_ubb_color' => '',
295
+ 'wppa_show_albwidget_tooltip' => 'yes',
296
+ // F Overlay
297
+ // 'wppa_ovl_close_txt' => 'Close',
298
+ 'wppa_ovl_theme' => 'black',
299
+ 'wppa_ovl_bgcolor' => 'black',
300
+ 'wppa_ovl_slide_name' => 'no',
301
+ 'wppa_ovl_slide_desc' => 'yes',
302
+ 'wppa_ovl_thumb_name' => 'yes',
303
+ 'wppa_ovl_thumb_desc' => 'no',
304
+ 'wppa_ovl_potd_name' => 'yes',
305
+ 'wppa_ovl_potd_desc' => 'no',
306
+ 'wppa_ovl_sphoto_name' => 'yes',
307
+ 'wppa_ovl_sphoto_desc' => 'no',
308
+ 'wppa_ovl_mphoto_name' => 'yes',
309
+ 'wppa_ovl_mphoto_desc' => 'no',
310
+ 'wppa_ovl_alw_name' => 'yes',
311
+ 'wppa_ovl_alw_desc' => 'no',
312
+ 'wppa_ovl_cover_name' => 'yes',
313
+ 'wppa_ovl_cover_desc' => 'no',
314
+ 'wppa_ovl_show_counter' => 'yes',
315
+ 'wppa_ovl_add_owner' => 'no',
316
+ 'wppa_ovl_show_startstop' => 'yes',
317
+ 'wppa_ovl_show_legenda' => 'yes',
318
+ 'wppa_show_zoomin' => 'yes',
319
+ 'wppa_ovl_fs_icons' => 'yes',
320
+ 'wppa_ovl_rating' => 'no',
321
+
322
+ 'wppa_owner_on_new_line' => 'no',
323
+
324
+ // H Frontend upload
325
+ 'wppa_user_upload_on' => 'no',
326
+ 'wppa_user_upload_video_on' => 'no',
327
+ 'wppa_user_upload_audio_on' => 'no',
328
+ 'wppa_user_upload_login' => 'yes',
329
+ 'wppa_user_opload_roles' => '',
330
+ 'wppa_ajax_upload' => 'yes',
331
+ 'wppa_copyright_on' => 'yes', // 19
332
+ 'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
333
+ 'wppa_watermark_user' => 'no',
334
+ 'wppa_name_user' => 'yes',
335
+ 'wppa_name_user_mandatory' => 'no',
336
+ 'wppa_apply_newphoto_desc_user' => 'no',
337
+ 'wppa_desc_user' => 'yes',
338
+ 'wppa_desc_user_mandatory' => 'no',
339
+ 'wppa_fe_custom_fields' => 'no',
340
+ 'wppa_fe_upload_tags' => 'no',
341
+ 'wppa_up_tagselbox_on_1' => 'yes', // 18
342
+ 'wppa_up_tagselbox_multi_1' => 'yes',
343
+ 'wppa_up_tagselbox_title_1' => __( 'Select tags:' , 'wp-photo-album-plus'),
344
+ 'wppa_up_tagselbox_content_1' => '',
345
+ 'wppa_up_tagselbox_on_2' => 'no',
346
+ 'wppa_up_tagselbox_multi_2' => 'yes',
347
+ 'wppa_up_tagselbox_title_2' => __( 'Select tags:' , 'wp-photo-album-plus'),
348
+ 'wppa_up_tagselbox_content_2' => '',
349
+ 'wppa_up_tagselbox_on_3' => 'no',
350
+ 'wppa_up_tagselbox_multi_3' => 'yes',
351
+ 'wppa_up_tagselbox_title_3' => __( 'Select tags:' , 'wp-photo-album-plus'),
352
+ 'wppa_up_tagselbox_content_3' => '',
353
+ 'wppa_up_tag_input_on' => 'yes',
354
+ 'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
355
+ 'wppa_up_tagbox_new' => '',
356
+ 'wppa_up_tag_preview' => 'yes',
357
+ 'wppa_camera_connect' => 'yes',
358
+ 'wppa_blog_it' => '-none-',
359
+ 'wppa_blog_it_moderate' => 'yes',
360
+ 'wppa_blog_it_shortcode' => '[wppa type="mphoto" photo="#id"]',
361
+
362
+ // J Custom datafields
363
+ 'wppa_album_custom_fields' => 'no',
364
+ 'wppa_album_custom_caption_0' => '',
365
+ 'wppa_album_custom_visible_0' => 'no',
366
+ 'wppa_album_custom_edit_0' => 'no',
367
+ 'wppa_album_custom_caption_1' => '',
368
+ 'wppa_album_custom_visible_1' => 'no',
369
+ 'wppa_album_custom_edit_1' => 'no',
370
+ 'wppa_album_custom_caption_2' => '',
371
+ 'wppa_album_custom_visible_2' => 'no',
372
+ 'wppa_album_custom_edit_2' => 'no',
373
+ 'wppa_album_custom_caption_3' => '',
374
+ 'wppa_album_custom_visible_3' => 'no',
375
+ 'wppa_album_custom_edit_3' => 'no',
376
+ 'wppa_album_custom_caption_4' => '',
377
+ 'wppa_album_custom_visible_4' => 'no',
378
+ 'wppa_album_custom_edit_4' => 'no',
379
+ 'wppa_album_custom_caption_5' => '',
380
+ 'wppa_album_custom_visible_5' => 'no',
381
+ 'wppa_album_custom_edit_5' => 'no',
382
+ 'wppa_album_custom_caption_6' => '',
383
+ 'wppa_album_custom_visible_6' => 'no',
384
+ 'wppa_album_custom_edit_6' => 'no',
385
+ 'wppa_album_custom_caption_7' => '',
386
+ 'wppa_album_custom_visible_7' => 'no',
387
+ 'wppa_album_custom_edit_7' => 'no',
388
+ 'wppa_album_custom_caption_8' => '',
389
+ 'wppa_album_custom_visible_8' => 'no',
390
+ 'wppa_album_custom_edit_8' => 'no',
391
+ 'wppa_album_custom_caption_9' => '',
392
+ 'wppa_album_custom_visible_9' => 'no',
393
+ 'wppa_album_custom_edit_9' => 'no',
394
+
395
+ 'wppa_custom_fields' => 'no',
396
+ 'wppa_custom_caption_0' => '',
397
+ 'wppa_custom_visible_0' => 'no',
398
+ 'wppa_custom_edit_0' => 'no',
399
+ 'wppa_custom_caption_1' => '',
400
+ 'wppa_custom_visible_1' => 'no',
401
+ 'wppa_custom_edit_1' => 'no',
402
+ 'wppa_custom_caption_2' => '',
403
+ 'wppa_custom_visible_2' => 'no',
404
+ 'wppa_custom_edit_2' => 'no',
405
+ 'wppa_custom_caption_3' => '',
406
+ 'wppa_custom_visible_3' => 'no',
407
+ 'wppa_custom_edit_3' => 'no',
408
+ 'wppa_custom_caption_4' => '',
409
+ 'wppa_custom_visible_4' => 'no',
410
+ 'wppa_custom_edit_4' => 'no',
411
+ 'wppa_custom_caption_5' => '',
412
+ 'wppa_custom_visible_5' => 'no',
413
+ 'wppa_custom_edit_5' => 'no',
414
+ 'wppa_custom_caption_6' => '',
415
+ 'wppa_custom_visible_6' => 'no',
416
+ 'wppa_custom_edit_6' => 'no',
417
+ 'wppa_custom_caption_7' => '',
418
+ 'wppa_custom_visible_7' => 'no',
419
+ 'wppa_custom_edit_7' => 'no',
420
+ 'wppa_custom_caption_8' => '',
421
+ 'wppa_custom_visible_8' => 'no',
422
+ 'wppa_custom_edit_8' => 'no',
423
+ 'wppa_custom_caption_9' => '',
424
+ 'wppa_custom_visible_9' => 'no',
425
+ 'wppa_custom_edit_9' => 'no',
426
+
427
+
428
+ 'wppa_close_text' => 'Close', // frontend upload/edit etc
429
+
430
+ 'wppa_icon_corner_style' => 'medium',
431
+ 'wppa_spinner_shape' => 'default',
432
+ 'wppa_show_dashboard_widgets' => 'all',
433
+ 'wppa_audio_icon' => 'Music-Note-1.svg',
434
+ 'wppa_video_icon' => 'Film-Clapper.svg',
435
+ 'wppa_document_icon' => 'Document-File.svg',
436
+ 'wppa_icon_size_multimedia' => 'M',
437
+ 'wppa_multimedia_icon_upload' => '',
438
+
439
+ // Table III: Backgrounds
440
+ 'wppa_bgcolor_even' => '#eeeeee',
441
+ 'wppa_bcolor_even' => '#cccccc',
442
+ 'wppa_bgcolor_alt' => '#dddddd',
443
+ 'wppa_bcolor_alt' => '#bbbbbb',
444
+ 'wppa_bgcolor_thumbnail' => '#000000',
445
+ // 'wppa_bcolor_thumbnail' => '#000000',
446
+ 'wppa_bgcolor_nav' => '#dddddd',
447
+ 'wppa_bcolor_nav' => '#bbbbbb',
448
+ 'wppa_bgcolor_namedesc' => '#dddddd',
449
+ 'wppa_bcolor_namedesc' => '#bbbbbb',
450
+ 'wppa_bgcolor_com' => '#dddddd',
451
+ 'wppa_bcolor_com' => '#bbbbbb',
452
+ 'wppa_bgcolor_img' => '#eeeeee',
453
+ 'wppa_bcolor_img' => '',
454
+ 'wppa_bgcolor_fullimg' => '#cccccc',
455
+ 'wppa_bcolor_fullimg' => '#777777',
456
+ 'wppa_bgcolor_cus' => '#dddddd',
457
+ 'wppa_bcolor_cus' => '#bbbbbb',
458
+ 'wppa_bgcolor_numbar' => '#cccccc',
459
+ 'wppa_bcolor_numbar' => '#cccccc',
460
+ 'wppa_bgcolor_numbar_active' => '#333333',
461
+ 'wppa_bcolor_numbar_active' => '#333333',
462
+ 'wppa_bgcolor_iptc' => '#dddddd',
463
+ 'wppa_bcolor_iptc' => '#bbbbbb',
464
+ 'wppa_bgcolor_exif' => '#dddddd',
465
+ 'wppa_bcolor_exif' => '#bbbbbb',
466
+ 'wppa_bgcolor_share' => '#dddddd',
467
+ 'wppa_bcolor_share' => '#bbbbbb',
468
+ 'wppa_bgcolor_upload' => '#dddddd',
469
+ 'wppa_bcolor_upload' => '#bbbbbb',
470
+ 'wppa_bgcolor_multitag' => '#dddddd',
471
+ 'wppa_bcolor_multitag' => '#bbbbbb',
472
+ 'wppa_bgcolor_tagcloud' => '#dddddd',
473
+ 'wppa_bcolor_tagcloud' => '#bbbbbb',
474
+ 'wppa_bgcolor_superview' => '#dddddd',
475
+ 'wppa_bcolor_superview' => '#bbbbbb',
476
+ 'wppa_bgcolor_search' => '#dddddd',
477
+ 'wppa_bcolor_search' => '#bbbbbb',
478
+ 'wppa_bgcolor_calendar' => '#dddddd',
479
+ 'wppa_bcolor_calendar' => '#bbbbbb',
480
+ 'wppa_bgcolor_bestof' => '#dddddd',
481
+ 'wppa_bcolor_bestof' => '#bbbbbb',
482
+ 'wppa_bgcolor_stereo' => '#dddddd',
483
+ 'wppa_bcolor_stereo' => '#bbbbbb',
484
+ 'wppa_bgcolor_adminschoice' => '#dddddd',
485
+ 'wppa_bcolor_adminschoice' => '#bbbbbb',
486
+ 'wppa_bgcolor_modal' => '#ffffff',
487
+ 'wppa_bcolor_modal' => '#ffffff',
488
+ 'wppa_svg_color' => '#666666',
489
+ 'wppa_svg_bg_color' => 'transparent',
490
+ 'wppa_ovl_svg_color' => '#999999',
491
+ 'wppa_ovl_svg_bg_color' => 'transparent',
492
+
493
+ // Table IV: Behaviour
494
+ // A System
495
+ 'wppa_allow_ajax' => 'yes',
496
+ 'wppa_ajax_non_admin' => 'yes',
497
+ 'wppa_ajax_render_modal' => 'no',
498
+ 'wppa_use_photo_names_in_urls' => 'no',
499
+ 'wppa_use_album_names_in_urls' => 'no',
500
+ 'wppa_use_short_qargs' => 'yes',
501
+ 'wppa_use_pretty_links' => 'classic',
502
+ 'wppa_use_encrypted_links' => 'no',
503
+ 'wppa_refuse_unencrypted' => 'no',
504
+ 'wppa_update_addressline' => 'yes',
505
+ 'wppa_render_shortcode_always' => 'no',
506
+ 'wppa_track_viewcounts' => 'yes',
507
+ 'wppa_track_clickcounts' => 'no',
508
+ 'wppa_auto_page' => 'no',
509
+ 'wppa_auto_page_type' => 'photo',
510
+ 'wppa_auto_page_links' => 'bottom',
511
+ 'wppa_defer_javascript' => 'yes',
512
+ 'wppa_inline_css' => 'yes',
513
+ 'wppa_custom_style' => '',
514
+ 'wppa_custom_style_chrome' => '',
515
+ 'wppa_custom_style_firefox' => '',
516
+ 'wppa_custom_style_safari' => '',
517
+ 'wppa_custom_style_edge' => '',
518
+ 'wppa_custom_style_ie' => '',
519
+ 'wppa_custom_style_opera' => '',
520
+ 'wppa_use_custom_style_file' => 'no',
521
+ // 'wppa_js_css_optional' => 'no',
522
+ 'wppa_enable_pdf' => 'no', // IV-A30
523
+ 'wppa_use_custom_theme_file' => 'no',
524
+ 'wppa_cre_uploads_htaccess' => 'remove',
525
+ 'wppa_debug_trace_on' => 'no',
526
+ // 'wppa_lazy_or_htmlcomp' => 'no',
527
+ 'wppa_relative_urls' => 'no',
528
+ 'wppa_lazy' => 'no',
529
+
530
+ 'wppa_thumbs_first' => 'no',
531
+ 'wppa_login_links' => 'yes',
532
+ 'wppa_enable_video' => 'yes',
533
+ 'wppa_enable_audio' => 'yes',
534
+ 'wppa_enable_stereo' => 'no',
535
+ 'wppa_enable_panorama' => 'no',
536
+
537
+ 'wppa_capitalize_tags' => 'yes',
538
+ 'wppa_enable_admins_choice' => 'no',
539
+ 'wppa_owner_to_name' => 'no',
540
+
541
+ 'wppa_nicescroll_window' => 'no',
542
+ 'wppa_nicescroll_opts' => $nso,
543
+ 'wppa_response_speed' => '0',
544
+
545
+ // B Full size and Slideshow
546
+ 'wppa_fullvalign' => 'center',
547
+ 'wppa_fullvalign_slideonly' => 'fit',
548
+ 'wppa_fullhalign' => 'center',
549
+ 'wppa_start_slide' => 'run',
550
+ 'wppa_start_slideonly' => 'yes',
551
+ 'wppa_start_slide_video' => 'no',
552
+ 'wppa_start_slide_audio' => 'no',
553
+ 'wppa_animation_type' => 'fadeover',
554
+ 'wppa_slideshow_timeout' => '2500',
555
+ 'wppa_animation_speed' => '800',
556
+ 'wppa_slide_pause' => 'no',
557
+ 'wppa_slide_wrap' => 'yes',
558
+ 'wppa_fulldesc_align' => 'center',
559
+ 'wppa_clean_pbr' => 'yes',
560
+ 'wppa_wpautop_on_desc' => 'nil',
561
+ 'wppa_auto_open_comments' => 'yes',
562
+ 'wppa_film_hover_goto' => 'no',
563
+ 'wppa_slide_swipe' => 'no',
564
+ 'wppa_slideshow_page_allow_ajax' => 'yes',
565
+ 'wppa_filmonly_continuous' => 'no',
566
+ 'wppa_filmonly_random' => 'no',
567
+
568
+ // C Thumbnail
569
+ 'wppa_list_photos_by' => '0',
570
+ 'wppa_thumbtype' => 'default',
571
+ 'wppa_thumbphoto_left' => 'no',
572
+ 'wppa_valign' => 'center',
573
+ 'wppa_use_thumb_opacity' => 'yes',
574
+ 'wppa_thumb_opacity' => '95',
575
+ 'wppa_use_thumb_popup' => 'yes',
576
+ 'wppa_align_thumbtext' => 'no',
577
+ 'wppa_wpautop_on_thumb_desc' => 'nil',
578
+
579
+ // D Albums and covers
580
+ 'wppa_list_albums_by' => '0',
581
+ 'wppa_main_photo' => '0',
582
+ 'wppa_coverphoto_pos' => 'right',
583
+ 'wppa_use_cover_opacity' => 'yes',
584
+ 'wppa_cover_opacity' => '85',
585
+ 'wppa_cover_type' => 'default',
586
+ 'wppa_imgfact_count' => '10',
587
+ 'wppa_cats_inherit' => 'no',
588
+ 'wppa_wpautop_on_album_desc' => 'nil',
589
+ 'wppa_cover_use_thumb' => 'no',
590
+
591
+ // E Rating
592
+ 'wppa_rating_login' => 'yes',
593
+ 'wppa_rating_change' => 'yes',
594
+ 'wppa_rating_multi' => 'no',
595
+ 'wppa_rating_dayly' => '0',
596
+ 'wppa_allow_owner_votes' => 'yes',
597
+ 'wppa_vote_needs_comment' => 'no',
598
+ 'wppa_dislike_value' => '-5',
599
+ 'wppa_next_on_callback' => 'no',
600
+ 'wppa_star_opacity' => '20',
601
+ 'wppa_vote_button_text' => __('Vote for me!', 'wp-photo-album-plus'),
602
+ 'wppa_voted_button_text' => __('Voted for me', 'wp-photo-album-plus'),
603
+ 'wppa_vote_thumb' => 'no',
604
+ 'wppa_medal_bronze_when' => '5',
605
+ 'wppa_medal_silver_when' => '10',
606
+ 'wppa_medal_gold_when' => '15',
607
+ 'wppa_medal_color' => '2',
608
+ 'wppa_medal_position' => 'botright',
609
+ 'wppa_topten_sortby' => 'mean_rating',
610
+
611
+ // F Comments
612
+ 'wppa_comment_login' => 'no',
613
+ 'wppa_comment_view_login' => 'no',
614
+ 'wppa_comments_desc' => 'no',
615
+ 'wppa_moderate_comment' => '-none-',
616
+ 'wppa_comment_email_required' => 'required',
617
+ 'wppa_commentprevious' => 'no',
618
+ 'wppa_commentapproved' => 'no',
619
+ 'wppa_commentapproved_text' => '',
620
+ 'wppa_commentapproved_subj' => '',
621
+ 'wppa_commentnotify_added' => 'yes',
622
+ 'wppa_comten_alt_display' => 'no',
623
+ 'wppa_comten_alt_thumbsize' => '75',
624
+ 'wppa_comment_smiley_picker' => 'no',
625
+ // 'wppa_mail_upl_email' => 'yes',
626
+ 'wppa_comment_clickable' => 'no',
627
+ 'wppa_comment_need_db_agree' => 'no',
628
+ 'wppa_comment_need_vote' => 'no',
629
+
630
+ // G Overlay
631
+ 'wppa_ovl_opacity' => '80',
632
+ 'wppa_ovl_onclick' => 'none',
633
+ 'wppa_ovl_browse_on_click' => 'no',
634
+ 'wppa_ovl_anim' => '300',
635
+ 'wppa_ovl_slide' => '5000',
636
+ // 'wppa_ovl_chrome_at_top' => 'yes',
637
+ 'wppa_lightbox_global' => 'no',
638
+ 'wppa_lightbox_global_set' => 'no',
639
+ 'wppa_lb_hres' => 'no',
640
+ 'wppa_ovl_video_start' => 'yes',
641
+ 'wppa_ovl_audio_start' => 'yes',
642
+ 'wppa_ovl_mode_initial' => 'normal',
643
+ 'wppa_ovl_mode_initial_mob' => 'padded',
644
+
645
+ // H Panorama
646
+ 'wppa_panorama_control' => 'all',
647
+ 'wppa_panorama_manual' => 'all',
648
+ 'wppa_panorama_autorun' => 'none',
649
+ 'wppa_panorama_autorun_speed' => '3',
650
+ 'wppa_panorama_wheel_sensitivity' => '3',
651
+
652
+ // Table V: Fonts
653
+ 'wppa_fontfamily_title' => '',
654
+ 'wppa_fontsize_title' => '',
655
+ 'wppa_fontcolor_title' => '',
656
+ 'wppa_fontweight_title' => 'bold',
657
+ 'wppa_fontfamily_fulldesc' => '',
658
+ 'wppa_fontsize_fulldesc' => '',
659
+ 'wppa_fontcolor_fulldesc' => '',
660
+ 'wppa_fontweight_fulldesc' => 'normal',
661
+ 'wppa_fontfamily_fulltitle' => '',
662
+ 'wppa_fontsize_fulltitle' => '',
663
+ 'wppa_fontcolor_fulltitle' => '',
664
+ 'wppa_fontweight_fulltitle' => 'normal',
665
+ 'wppa_fontfamily_nav' => '',
666
+ 'wppa_fontsize_nav' => '',
667
+ 'wppa_fontcolor_nav' => '',
668
+ 'wppa_fontweight_nav' => 'normal',
669
+ 'wppa_fontfamily_thumb' => '',
670
+ 'wppa_fontsize_thumb' => '',
671
+ 'wppa_fontcolor_thumb' => '',
672
+ 'wppa_fontweight_thumb' => 'normal',
673
+ 'wppa_fontfamily_box' => '',
674
+ 'wppa_fontsize_box' => '',
675
+ 'wppa_fontcolor_box' => '',
676
+ 'wppa_fontweight_box' => 'normal',
677
+ 'wppa_fontfamily_numbar' => '',
678
+ 'wppa_fontsize_numbar' => '',
679
+ 'wppa_fontcolor_numbar' => '#777777',
680
+ 'wppa_fontweight_numbar' => 'normal',
681
+ 'wppa_fontfamily_numbar_active' => '',
682
+ 'wppa_fontsize_numbar_active' => '',
683
+ 'wppa_fontcolor_numbar_active' => '#777777',
684
+ 'wppa_fontweight_numbar_active' => 'bold',
685
+ 'wppa_fontfamily_lightbox' => '',
686
+ 'wppa_fontsize_lightbox' => '10',
687
+ 'wppa_fontcolor_lightbox' => '',
688
+ 'wppa_fontweight_lightbox' => 'bold',
689
+ 'wppa_fontsize_widget_thumb' => '9',
690
+
691
+ // Table VI: Links
692
+ 'wppa_sphoto_linktype' => 'photo',
693
+ 'wppa_sphoto_linkpage' => '0',
694
+ 'wppa_sphoto_blank' => 'no',
695
+ 'wppa_sphoto_overrule' => 'no',
696
+
697
+ 'wppa_mphoto_linktype' => 'photo',
698
+ 'wppa_mphoto_linkpage' => '0',
699
+ 'wppa_mphoto_blank' => 'no',
700
+ 'wppa_mphoto_overrule' => 'no',
701
+
702
+ 'wppa_xphoto_linktype' => 'photo',
703
+ 'wppa_xphoto_linkpage' => '0',
704
+ 'wppa_xphoto_blank' => 'no',
705
+ 'wppa_xphoto_overrule' => 'no',
706
+
707
+ 'wppa_thumb_linktype' => 'photo',
708
+ 'wppa_thumb_linkpage' => '0',
709
+ 'wppa_thumb_blank' => 'no',
710
+ 'wppa_thumb_overrule' => 'no',
711
+
712
+ 'wppa_topten_widget_linktype' => 'photo',
713
+ 'wppa_topten_widget_linkpage' => '0',
714
+ 'wppa_topten_blank' => 'no',
715
+ 'wppa_topten_overrule' => 'no',
716
+
717
+ 'wppa_topten_widget_album_linkpage' => '0',
718
+
719
+ 'wppa_featen_widget_linktype' => 'photo',
720
+ 'wppa_featen_widget_linkpage' => '0',
721
+ 'wppa_featen_blank' => 'no',
722
+ 'wppa_featen_overrule' => 'no',
723
+
724
+ 'wppa_slideonly_widget_linktype' => 'widget',
725
+ 'wppa_slideonly_widget_linkpage' => '0',
726
+ 'wppa_sswidget_blank' => 'no',
727
+ 'wppa_sswidget_overrule' => 'no',
728
+
729
+ 'wppa_potd_linktype' => 'single',
730
+ 'wppa_potd_linkpage' => '0',
731
+ 'wppa_potd_blank' => 'no',
732
+ 'wppa_potdwidget_overrule' => 'no',
733
+
734
+ 'wppa_coverimg_linktype' => 'same',
735
+ 'wppa_coverimg_linkpage' => '0',
736
+ 'wppa_coverimg_blank' => 'no',
737
+ 'wppa_coverimg_overrule' => 'no',
738
+
739
+ 'wppa_comment_widget_linktype' => 'photo',
740
+ 'wppa_comment_widget_linkpage' => '0',
741
+ 'wppa_comment_blank' => 'no',
742
+ 'wppa_comment_overrule' => 'no',
743
+
744
+ 'wppa_slideshow_linktype' => 'none',
745
+ 'wppa_slideshow_linkpage' => '0',
746
+ 'wppa_slideshow_blank' => 'no',
747
+ 'wppa_slideshow_overrule' => 'no',
748
+
749
+ 'wppa_thumbnail_widget_linktype' => 'photo',
750
+ 'wppa_thumbnail_widget_linkpage' => '0',
751
+ 'wppa_thumbnail_widget_overrule' => 'no',
752
+ 'wppa_thumbnail_widget_blank' => 'no',
753
+
754
+ 'wppa_film_linktype' => 'slideshow',
755
+ 'wppa_film_blank' => 'no',
756
+ 'wppa_film_overrule' => 'no',
757
+
758
+ 'wppa_lasten_widget_linktype' => 'photo',
759
+ 'wppa_lasten_widget_linkpage' => '0',
760
+ 'wppa_lasten_blank' => 'no',
761
+ 'wppa_lasten_overrule' => 'no',
762
+
763
+ 'wppa_art_monkey_link' => 'none',
764
+ 'wppa_art_monkey_popup_link' => 'file',
765
+ 'wppa_artmonkey_use_source' => 'no',
766
+ 'wppa_art_monkey_display' => 'button',
767
+ 'wppa_art_monkey_on_lightbox' => 'no',
768
+
769
+ 'wppa_allow_download_album' => 'no',
770
+ 'wppa_download_album_source' => 'yes',
771
+
772
+ 'wppa_album_widget_linktype' => 'content',
773
+ 'wppa_album_widget_linkpage' => '0',
774
+ 'wppa_album_widget_blank' => 'no',
775
+
776
+ 'wppa_tagcloud_linktype' => 'album',
777
+ 'wppa_tagcloud_linkpage' => '0',
778
+ 'wppa_tagcloud_blank' => 'no',
779
+
780
+ 'wppa_multitag_linktype' => 'album',
781
+ 'wppa_multitag_linkpage' => '0',
782
+ 'wppa_multitag_blank' => 'no',
783
+
784
+ 'wppa_super_view_linkpage' => '0',
785
+
786
+ 'wppa_upldr_widget_linkpage' => '0',
787
+
788
+ 'wppa_bestof_widget_linkpage' => '0',
789
+
790
+ 'wppa_supersearch_linkpage' => '0',
791
+
792
+ 'wppa_album_navigator_widget_linktype' => 'thumbs',
793
+ 'wppa_album_navigator_widget_linkpage' => '0',
794
+
795
+ 'wppa_widget_sm_linktype' => 'landing',
796
+ 'wppa_widget_sm_linkpage' => '0',
797
+ 'wppa_widget_sm_linkpage_oc' => '1',
798
+ 'wppa_tagcloud_linkpage_oc' => '1',
799
+ 'wppa_multitag_linkpage_oc' => '1',
800
+
801
+ 'wppa_cover_sublinks' => 'none',
802
+ 'wppa_cover_sublinks_display' => 'none',
803
+ 'wppa_real_calendar_linktype' => 'lightbox',
804
+
805
+ // Table VII: Security
806
+ // B
807
+ 'wppa_owner_only' => 'yes',
808
+ 'wppa_upload_owner_only' => 'yes',
809
+ 'wppa_user_album_edit_on' => 'no',
810
+ 'wppa_upload_moderate' => 'no',
811
+ 'wppa_fe_upload_private' => 'no',
812
+ 'wppa_photoapproved' => 'no',
813
+ 'wppa_upload_edit' => '-none-',
814
+ 'wppa_upload_edit_users' => 'admin',
815
+ 'wppa_upload_edit_period' => '0',
816
+ 'wppa_upload_edit_theme_css' => 'no',
817
+ 'wppa_fe_edit_name' => 'yes',
818
+ 'wppa_fe_edit_desc' => 'yes',
819
+ 'wppa_fe_edit_tags' => 'yes',
820
+ 'wppa_fe_edit_button' => __( 'Edit', 'wp-photo-album-plus' ),
821
+ 'wppa_fe_edit_caption' => __( 'Edit photo information', 'wp-photo-album-plus' ),
822
+ 'wppa_upload_delete' => 'no',
823
+ 'wppa_upload_delete_period' => '0',
824
+ 'wppa_owner_moderate_comment' => 'no',
825
+ 'wppa_upload_backend_notify' => 'no',
826
+ 'wppa_upload_one_only' => 'no',
827
+ 'wppa_memcheck' => 'yes',
828
+ 'wppa_memcheck_copy' => 'yes',
829
+ 'wppa_comment_captcha' => 'none',
830
+ 'wppa_spam_maxage' => 'none',
831
+ 'wppa_user_create_on' => 'no',
832
+ 'wppa_user_create_login' => 'yes',
833
+ 'wppa_user_create_captcha' => 'yes', // VII-B3
834
+ 'wppa_user_destroy_on' => 'no',
835
+ 'wppa_upload_frontend_minsize' => '0',
836
+ 'wppa_upload_frontend_maxsize' => '0',
837
+ 'wppa_void_dups' => 'no',
838
+ 'wppa_home_after_upload' => 'no',
839
+ 'wppa_fe_alert' => 'all',
840
+ 'wppa_fe_upload_max_albums' => '500', // VII-B13
841
+
842
+ // 'wppa_fe_create_ntfy' => '', // VII-B1.3
843
+
844
+ 'wppa_editor_upload_limit_count' => '0',
845
+ 'wppa_editor_upload_limit_time' => '0',
846
+ 'wppa_author_upload_limit_count' => '0',
847
+ 'wppa_author_upload_limit_time' => '0',
848
+ 'wppa_contributor_upload_limit_count' => '0',
849
+ 'wppa_contributor_upload_limit_time' => '0',
850
+ 'wppa_subscriber_upload_limit_count' => '0',
851
+ 'wppa_subscriber_upload_limit_time' => '0',
852
+ 'wppa_loggedout_upload_limit_count' => '0',
853
+ 'wppa_loggedout_upload_limit_time' => '0',
854
+
855
+ 'wppa_role_limit_per_album' => 'no',
856
+
857
+ 'wppa_blacklist_user' => '',
858
+ 'wppa_un_blacklist_user' => '',
859
+ 'wppa_photo_owner_change' => 'no',
860
+ 'wppa_superuser_user' => '',
861
+ 'wppa_un_superuser_user' => '',
862
+ 'wppa_no_rightclick' => 'no',
863
+
864
+ // Table VIII: Actions
865
+ // A Harmless
866
+ // 'wppa_maint_ignore_concurrency_error' => 'no', // 0.1
867
+ 'wppa_maint_ignore_cron' => 'no', // 0.2
868
+ 'wppa_setup' => '', // 1
869
+ 'wppa_backup_filename' => '',
870
+ 'wppa_backup' => '',
871
+ 'wppa_load_skin' => '',
872
+ 'wppa_skinfile' => 'default',
873
+ 'wppa_regen_thumbs' => '',
874
+ 'wppa_regen_thumbs_skip_one' => '',
875
+ 'wppa_rerate' => '',
876
+ 'wppa_cleanup' => '',
877
+ 'wppa_recup' => '',
878
+ 'wppa_format_exif' => '',
879
+ 'wppa_file_system' => 'flat',
880
+ 'wppa_remake' => '',
881
+ 'wppa_remake_orientation_only' => 'no',
882
+ 'wppa_remake_missing_only' => 'no',
883
+ 'wppa_remake_skip_one' => '',
884
+ 'wppa_errorlog_purge' => '',
885
+ 'wppa_comp_sizes' => '',
886
+ 'wppa_crypt_photos' => '',
887
+ 'wppa_crypt_photos_every' => '0',
888
+ 'wppa_crypt_albums' => '',
889
+ 'wppa_crypt_albums_every' => '0',
890
+ 'wppa_create_o1_files' => '',
891
+ 'wppa_create_o1_files_skip_one' => '',
892
+ 'wppa_owner_to_name_proc' => '',
893
+
894
+ // B Irreversable
895
+ 'wppa_rating_clear' => 'no',
896
+ 'wppa_viewcount_clear' => 'no',
897
+ 'wppa_iptc_clear' => '',
898
+ 'wppa_exif_clear' => '',
899
+ 'wppa_apply_default_photoname_all' => '',
900
+ 'wppa_apply_new_photodesc_all' => '',
901
+ 'wppa_remake_index_albums' => '', // 8.1
902
+ 'wppa_remake_index_albums_ad_inf' => 'no', // 8.1
903
+ 'wppa_remake_index_photos' => '', // 8.2
904
+ 'wppa_remake_index_photos_ad_inf' => 'no', // 8.2
905
+ 'wppa_cleanup_index' => '', // 8.3
906
+ 'wppa_cleanup_index_ad_inf' => 'no', // 8.3
907
+ 'wppa_list_index' => '',
908
+ 'wppa_list_index_display_start' => '',
909
+ 'wppa_list_comments_by' => 'name',
910
+ 'wppa_append_text' => '',
911
+ 'wppa_append_to_photodesc' => '',
912
+ 'wppa_remove_text' => '',
913
+ 'wppa_remove_from_photodesc' => '',
914
+ 'wppa_remove_empty_albums' => '',
915
+ 'wppa_watermark_all' => '',
916
+ 'wppa_create_all_autopages' => '',
917
+ 'wppa_delete_all_autopages' => '',
918
+ 'wppa_readd_file_extensions' => '',
919
+ 'wppa_all_ext_to_lower' => '',
920
+ 'wppa_zero_numbers' => '5',
921
+ 'wppa_leading_zeros' => '',
922
+ 'wppa_add_gpx_tag' => '',
923
+ 'wppa_optimize_ewww' => '',
924
+ 'wppa_optimize_ewww_skip_one' => '',
925
+ 'wppa_tag_to_edit' => '',
926
+ 'wppa_new_tag_value' => '',
927
+ 'wppa_edit_tag' => '',
928
+ 'wppa_sync_cloud' => '',
929
+ 'wppa_sanitize_tags' => '',
930
+ 'wppa_sanitize_cats' => '',
931
+ 'wppa_move_all_photos' => '',
932
+ 'wppa_move_all_photos_from' => '',
933
+ 'wppa_move_all_photos_to' => '',
934
+ 'wppa_photos_hyphens_to_spaces' => '',
935
+ 'wppa_png_to_jpg' => '',
936
+ 'wppa_fix_mp4_meta' => '',
937
+ 'wppa_fix_userids' => '',
938
+
939
+ 'wppa_logfile_on_menu' => 'no',
940
+
941
+
942
+ 'wppa_custom_photo_proc' => '', // 99
943
+ 'wppa_test_proc_ad_inf' => 'no', // 99
944
+ 'wppa_custom_album_proc' => '', // 99
945
+
946
+
947
+ // Table IX: Miscellaneous
948
+ // A System
949
+ 'wppa_html' => 'yes', // 1
950
+ 'wppa_allow_html_custom' => 'no',
951
+ 'wppa_check_balance' => 'no', // 2
952
+ 'wppa_allow_debug' => 'no', // 3
953
+
954
+ 'wppa_filter_priority' => '1001', // 5
955
+ 'wppa_shortcode_priority' => '11',
956
+ 'wppa_shortcode_at_priority' => 'no',
957
+ 'wppa_shortcode_at_priority_widget' => 'no',
958
+ 'wppa_lightbox_name' => 'wppa', // 6
959
+ 'wppa_allow_foreign_shortcodes_general' => 'no',
960
+ 'wppa_allow_foreign_shortcodes' => 'no', // 7
961
+ 'wppa_allow_foreign_shortcodes_thumbs' => 'no',
962
+ // 'wppa_arrow_color' => 'black',
963
+ 'wppa_meta_page' => 'yes', // 9
964
+ 'wppa_meta_all' => 'yes', // 10
965
+ 'wppa_use_wp_editor' => 'no',
966
+ 'wppa_hier_albsel' => 'yes',
967
+ 'wppa_hier_pagesel' => 'no',
968
+ 'wppa_alt_type' => 'fullname',
969
+ 'wppa_album_admin_pagesize' => '100',
970
+ 'wppa_photo_admin_pagesize' => '20',
971
+ 'wppa_photo_admin_max_albums' => '500',
972
+ 'wppa_comment_admin_pagesize' => '10',
973
+ 'wppa_jpeg_quality' => '95',
974
+ 'wppa_geo_edit' => 'no',
975
+ 'wppa_auto_continue' => 'yes',
976
+ 'wppa_max_execution_time' => '25',
977
+ 'wppa_adminbarmenu_admin' => 'yes',
978
+ 'wppa_adminbarmenu_frontend' => 'yes',
979
+ 'wppa_feed_use_thumb' => 'no',
980
+ 'wppa_enable_shortcode_wppa_set' => 'no',
981
+ 'wppa_set_shortcodes' => 'wppa_thumbtype,wppa_tn_margin,wppa_thumbsize',
982
+
983
+ 'wppa_og_tags_on' => 'yes',
984
+ 'wppa_add_shortcode_to_post' => 'no',
985
+ 'wppa_shortcode_to_add' => '[wppa type="album" album="#related,desc"]',
986
+ 'wppa_import_preview' => 'yes',
987
+ 'wppa_audiostub_upload' => '',
988
+ 'wppa_documentstub_upload' => '',
989
+ 'wppa_audiostub' => '',
990
+ 'wppa_confirm_create' => 'yes',
991
+ 'wppa_import_root' => ABSPATH . 'wp-content',
992
+ 'wppa_allow_import_source' => 'no',
993
+ 'wppa_enable_generator' => 'yes',
994
+ 'wppa_log_cron' => 'no', // A9.1
995
+ 'wppa_log_ajax' => 'no', // A9.2
996
+ 'wppa_log_comments' => 'no', // A9.3
997
+ 'wppa_log_fso' => 'no', // A9.4
998
+ 'wppa_log_debug' => 'no', // A9.5
999
+ 'wppa_log_email' => 'no',
1000
+ 'wppa_moderate_bulk' => 'no', // B20
1001
+ 'wppa_retry_mails' => '0', // A10
1002
+ 'wppa_minimum_tags' => '', // A11
1003
+
1004
+ 'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1005
+ 'wppa_cache_root' => 'cache',
1006
+ 'wppa_direct_comment' => 'no',
1007
+ 'wppa_extended_resize_count' => '1',
1008
+ 'wppa_extended_resize_delay' => '200',
1009
+ 'wppa_load_nicescroller' => 'no',
1010
+
1011
+ // IX D New
1012
+ 'wppa_max_album_newtime' => '0', // 1
1013
+ 'wppa_max_photo_newtime' => '0', // 2
1014
+ 'wppa_max_album_modtime' => '0', // 1
1015
+ 'wppa_max_photo_modtime' => '0', // 2
1016
+ 'wppa_new_mod_label_is_text' => 'yes',
1017
+ 'wppa_lasten_limit_new' => 'no',
1018
+ 'wppa_lasten_use_modified' => 'no',
1019
+ 'wppa_new_label_text' => __('NEW', 'wp-photo-album-plus'),
1020
+ 'wppa_new_label_color' => 'orange',
1021
+ 'wppa_mod_label_text' => __('MODIFIED', 'wp-photo-album-plus'),
1022
+ 'wppa_mod_label_color' => 'green',
1023
+ 'wppa_new_label_url' => wppa_get_imgdir('new.png'),
1024
+ 'wppa_mod_label_url' => wppa_get_imgdir('new.png'),
1025
+ 'wppa_apply_newphoto_desc' => 'no', // IX-D3
1026
+ 'wppa_newphoto_description' => $npd, // IX-D5
1027
+ 'wppa_newphoto_owner' => '', // IX-D5.1
1028
+ 'wppa_upload_limit_count' => '0', // IX-D6a
1029
+ 'wppa_upload_limit_time' => '0', // IX-D6b
1030
+ 'wppa_show_album_full' => 'yes',
1031
+ 'wppa_grant_an_album' => 'no',
1032
+ 'wppa_grant_name' => 'display',
1033
+ 'wppa_grant_parent_sel_method' => 'selectionbox',
1034
+ 'wppa_grant_parent' => '-1',
1035
+ 'wppa_grant_cats' => '',
1036
+ 'wppa_grant_tags' => '',
1037
+ 'wppa_default_parent' => '0',
1038
+ 'wppa_default_parent_always' => 'no',
1039
+
1040
+ 'wppa_max_albums' => '0',
1041
+ 'wppa_alt_is_restricted' => 'no',
1042
+ 'wppa_link_is_restricted' => 'no',
1043
+ 'wppa_covertype_is_restricted' => 'no',
1044
+ 'wppa_porder_restricted' => 'no',
1045
+ 'wppa_reup_is_restricted' => 'yes',
1046
+ 'wppa_newtags_is_restricted' => 'no',
1047
+
1048
+ // 'wppa_strip_file_ext' => 'no',
1049
+ 'wppa_newphoto_name_method' => 'filename',
1050
+ 'wppa_default_coverimage_name' => 'Coverphoto',
1051
+
1052
+ 'wppa_copy_timestamp' => 'no',
1053
+ 'wppa_copy_owner' => 'no',
1054
+ 'wppa_frontend_album_public' => 'no',
1055
+ 'wppa_optimize_new' => 'no',
1056
+ 'wppa_default_album_linktype' => 'content',
1057
+ 'wppa_sanitize_import' => 'no',
1058
+ 'wppa_remove_accents' => 'yes',
1059
+
1060
+ // E Search
1061
+ 'wppa_search_linkpage' => '0', // 1
1062
+ 'wppa_search_oc' => '1',
1063
+ 'wppa_excl_sep' => 'no', // 2
1064
+ 'wppa_search_tags' => 'no',
1065
+ 'wppa_search_cats' => 'no',
1066
+ 'wppa_search_comments' => 'no',
1067
+ 'wppa_photos_only' => 'no', // 3
1068
+ 'wppa_max_search_photos' => '250',
1069
+ 'wppa_max_search_albums' => '25',
1070
+ 'wppa_tags_or_only' => 'no',
1071
+ 'wppa_tags_not_on' => 'no',
1072
+ 'wppa_wild_front' => 'no',
1073
+ 'wppa_search_display_type' => 'content',
1074
+ 'wppa_ss_name_max' => '0',
1075
+ 'wppa_ss_text_max' => '0',
1076
+ 'wppa_search_toptext' => '',
1077
+ 'wppa_search_in_section' => __( 'Search in current section', 'wp-photo-album-plus' ),
1078
+ 'wppa_search_in_results' => __( 'Search in current results', 'wp-photo-album-plus' ),
1079
+ 'wppa_search_min_length' => '2', // 18
1080
+ 'wppa_search_user_void' => 'times,views,wp-content,wp,content,wppa-pl,wppa,pl',
1081
+ 'wppa_search_numbers_void' => 'no',
1082
+ 'wppa_index_ignore_slash' => 'no',
1083
+ // 'wppa_index_skips' => '', // Do not add, this is an array
1084
+ 'wppa_search_catbox' => 'no',
1085
+ 'wppa_search_selboxes' => '0',
1086
+ 'wppa_search_caption_0' => '',
1087
+ 'wppa_search_selbox_0' => '',
1088
+ 'wppa_search_caption_1' => '',
1089
+ 'wppa_search_selbox_1' => '',
1090
+ 'wppa_search_caption_2' => '',
1091
+ 'wppa_search_selbox_2' => '',
1092
+ 'wppa_extended_duplicate_remove' => 'no',
1093
+ 'wppa_search_placeholder' => __( 'Search photos &hellip;', 'wp-photo-album-plus' ),
1094
+ 'wppa_search_form_method' => 'post',
1095
+
1096
+ // F Watermark
1097
+ 'wppa_watermark_on' => 'no',
1098
+ 'wppa_watermark_file' => 'specimen.png',
1099
+ 'wppa_watermark_pos' => 'cencen',
1100
+ 'wppa_textual_watermark_type' => 'tvstyle',
1101
+ 'wppa_textual_watermark_text' => "Copyright (c) 2014 w#site \n w#filename (w#owner)",
1102
+ 'wppa_textual_watermark_font' => 'system',
1103
+ 'wppa_textual_watermark_size' => '10',
1104
+ 'wppa_watermark_fgcol_text' => '#000000',
1105
+ 'wppa_watermark_bgcol_text' => '#ffffff',
1106
+ 'wppa_watermark_upload' => '',
1107
+ 'wppa_watermark_opacity' => '20',
1108
+ 'wppa_watermark_opacity_text' => '80',
1109
+ 'wppa_watermark_thumbs' => 'no',
1110
+ 'wppa_watermark_preview' => '',
1111
+ 'wppa_watermark_size' => '0',
1112
+ 'wppa_watermark_margin' => '0',
1113
+
1114
+ // G Slide order
1115
+ 'wppa_slide_order' => '0,1,2,3,4,5,6,7,8,9,10',
1116
+ 'wppa_slide_order_split' => '0,1,2,3,4,5,6,7,8,9,10,11',
1117
+ 'wppa_swap_namedesc' => 'no',
1118
+ 'wppa_split_namedesc' => 'no',
1119
+
1120
+ // H Source file management and import/upload
1121
+ 'wppa_keep_source_admin' => 'yes',
1122
+ 'wppa_keep_source_frontend' => 'yes',
1123
+ 'wppa_source_dir' => WPPA_ABSPATH.WPPA_UPLOAD.'/wppa-source',
1124
+ 'wppa_keep_sync' => 'yes',
1125
+ 'wppa_remake_add' => 'yes',
1126
+ 'wppa_save_iptc' => 'yes',
1127
+ 'wppa_save_exif' => 'yes',
1128
+ // 'wppa_exif_max_array_size' => '10',
1129
+ 'wppa_chgsrc_is_restricted' => 'no',
1130
+ 'wppa_ext_status_restricted' => 'no',
1131
+ 'wppa_desc_is_restricted' => 'no',
1132
+ 'wppa_newpag_create' => 'no',
1133
+ 'wppa_newpag_content' => '[wppa type="cover" album="w#album" align="center"]',
1134
+ 'wppa_newpag_type' => 'page',
1135
+ 'wppa_newpag_status' => 'publish',
1136
+ 'wppa_pl_dirname' => 'wppa-pl',
1137
+ 'wppa_import_parent_check' => 'yes',
1138
+ 'wppa_keep_import_files' => 'no',
1139
+
1140
+ // J Other plugins
1141
+ 'wppa_cp_points_comment' => '0',
1142
+ 'wppa_cp_points_comment_appr' => '0',
1143
+ 'wppa_cp_points_rating' => '0',
1144
+ 'wppa_cp_points_upload' => '0',
1145
+ 'wppa_use_scabn' => 'no',
1146
+ 'wppa_use_CMTooltipGlossary' => 'no',
1147
+ 'wppa_photo_on_bbpress' => 'no',
1148
+ 'wppa_domain_link_buddypress' => 'no',
1149
+
1150
+ // K External services
1151
+ 'wppa_cdn_service' => '',
1152
+ 'wppa_cdn_cloud_name' => '',
1153
+ 'wppa_cdn_api_key' => '',
1154
+ 'wppa_cdn_api_secret' => '',
1155
+ 'wppa_cdn_service_update' => 'no',
1156
+ 'wppa_delete_all_from_cloudinary' => '',
1157
+ 'wppa_delete_derived_from_cloudinary' => '',
1158
+ 'wppa_max_cloud_life' => '0',
1159
+ 'wppa_gpx_implementation' => 'none',
1160
+ 'wppa_map_height' => '300',
1161
+ 'wppa_map_apikey' => '',
1162
+ 'wppa_load_map_api' => 'no',
1163
+ 'wppa_gpx_shortcode' => '[map style="width: auto; height:300px; margin:0; " marker="yes" lat="w#lat" lon="w#lon"]',
1164
+ 'wppa_geo_zoom' => '10',
1165
+ 'wppa_fotomoto_on' => 'no',
1166
+ 'wppa_fotomoto_fontsize' => '',
1167
+ 'wppa_fotomoto_hide_when_running' => 'no',
1168
+ 'wppa_fotomoto_min_width' => '400',
1169
+ 'wppa_image_magick' => '',
1170
+
1171
+ // L photo shortcode
1172
+ 'wppa_photo_shortcode_enabled' => 'yes',
1173
+ 'wppa_photo_shortcode_type' => 'mphoto',
1174
+ 'wppa_photo_shortcode_size' => '350',
1175
+ 'wppa_photo_shortcode_align' => 'center',
1176
+ 'wppa_photo_shortcode_fe_type' => '-none-',
1177
+ 'wppa_photo_shortcode_random_albums' => '-2',
1178
+ 'wppa_photo_shortcode_random_fixed' => 'no',
1179
+ 'wppa_photo_shortcode_random_fixed_html' => 'no',
1180
+
1181
+ // M Mails
1182
+ 'wppa_newalbumnotify' => 'no',
1183
+ 'wppa_feuploadnotify' => 'no',
1184
+ 'wppa_commentnotify' => 'no',
1185
+ 'wppa_commentnotify_limit' => 'no',
1186
+ 'wppa_moderatephoto' => 'no',
1187
+ 'wppa_moderatecomment' => 'no',
1188
+
1189
+ 'wppa_void_admin_email' => 'no',
1190
+ 'wppa_mailinglist_policy' => 'opt-in',
1191
+ 'wppa_mailinglist_callback_url' => '',
1192
+
1193
+
1194
+ // Photo of the day widget
1195
+ 'wppa_potd_title' => __('Photo of the day', 'wp-photo-album-plus'),
1196
+ 'wppa_potd_widget_width' => '200',
1197
+ 'wppa_potd_align' => 'center',
1198
+ 'wppa_potd_linkurl' => '',
1199
+ 'wppa_potd_linktitle' => '',
1200
+ 'wppa_potd_subtitle' => 'none',
1201
+ 'wppa_potd_counter' => 'no',
1202
+ 'wppa_potd_counter_link' => 'thumbs',
1203
+ 'wppa_potd_album_type' => 'physical',
1204
+ 'wppa_potd_album' => 'all', // All albums
1205
+ 'wppa_potd_include_subs' => 'no',
1206
+ 'wppa_potd_status_filter' => 'none',
1207
+ 'wppa_potd_inverse' => 'no',
1208
+ 'wppa_potd_method' => '4', // Change every
1209
+ 'wppa_potd_period' => '24', // Day
1210
+ 'wppa_potd_offset' => '0',
1211
+ 'wppa_potd_photo' => '',
1212
+ 'wppa_potd_preview' => 'no',
1213
+ 'wppa_potd_log' => 'no',
1214
+ 'wppa_potd_log_max' => '5',
1215
+
1216
+
1217
+ 'wppa_widget_width' => '200', // Do we use this somewhere still?
1218
+
1219
+ // Topten widget
1220
+ 'wppa_toptenwidgettitle' => __('Top Ten Photos', 'wp-photo-album-plus'),
1221
+
1222
+ // Thumbnail widget
1223
+ 'wppa_thumbnailwidgettitle' => __('Thumbnail Photos', 'wp-photo-album-plus'),
1224
+
1225
+ // Search widget
1226
+ 'wppa_searchwidgettitle' => __('Search photos', 'wp-photo-album-plus'),
1227
+
1228
+ // Comment admin
1229
+ 'wppa_comadmin_show' => 'all',
1230
+ 'wppa_comadmin_order' => 'timestamp',
1231
+
1232
+ // QR code settings
1233
+ 'wppa_qr_size' => '200',
1234
+ 'wppa_qr_color' => '#000000',
1235
+ 'wppa_qr_bgcolor' => '#FFFFFF',
1236
+ 'wppa_qr_cache' => 'no',
1237
+
1238
+ 'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1239
+
1240
+ 'wppa_heartbeat' => '0',
1241
+
1242
+ );
1243
+
1244
+ if ( $force ) {
1245
+ array_walk( $wppa_defaults, 'wppa_set_default' );
1246
+ }
1247
+
1248
+ return true;
1249
+ }
1250
+ function wppa_set_default( $value, $key ) {
1251
+ $void_these = array(
1252
+ 'wppa_revision',
1253
+ 'wppa_rating_max',
1254
+ 'wppa_file_system'
1255
+ );
1256
+
1257
+ if ( ! in_array( $key, $void_these ) ) {
1258
+ delete_option( $key );
1259
+ }
1260
+ }
wppa-encrypt.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -19,11 +19,11 @@ function wppa_get_unique_photo_crypt() {
19
  function wppa_get_unique_album_crypt() {
20
 
21
  $cr = wppa_get_unique_crypt( WPPA_ALBUMS );
22
- while ( $cr == get_option( 'wppa_album_crypt_0', '' ) ||
23
- $cr == get_option( 'wppa_album_crypt_1', '' ) ||
24
- $cr == get_option( 'wppa_album_crypt_2', '' ) ||
25
- $cr == get_option( 'wppa_album_crypt_3', '' ) ||
26
- $cr == get_option( 'wppa_album_crypt_9', '' )
27
  ) {
28
  $cr = wppa_get_unique_crypt( WPPA_ALBUMS );
29
  }
@@ -117,20 +117,20 @@ function wppa_encrypt_album( $album ) {
117
 
118
  switch ( $id ) {
119
  case '-3':
120
- $crypt = get_option( 'wppa_album_crypt_3', false );
121
  break;
122
  case '-2':
123
- $crypt = get_option( 'wppa_album_crypt_2', false );
124
  break;
125
  case '-1':
126
- $crypt = get_option( 'wppa_album_crypt_1', false );
127
  break;
128
  case '':
129
  case '0':
130
- $crypt = get_option( 'wppa_album_crypt_0', false );
131
  break;
132
  case '999999':
133
- $crypt = get_option( 'wppa_album_crypt_9', false );
134
  break;
135
  default:
136
  if ( strlen( $id ) < 12 ) {
@@ -204,19 +204,19 @@ global $wpdb;
204
  if ( ! $crypt ) {
205
  $id = '';
206
  }
207
- elseif ( $crypt == get_option( 'wppa_album_crypt_9', false ) ) {
208
  $id = '999999';
209
  }
210
- elseif ( $crypt == get_option( 'wppa_album_crypt_0', false ) ) {
211
  $id = '0';
212
  }
213
- elseif ( $crypt == get_option( 'wppa_album_crypt_1', false ) ) {
214
  $id = '-1';
215
  }
216
- elseif ( $crypt == get_option( 'wppa_album_crypt_2', false ) ) {
217
  $id = '-2';
218
  }
219
- elseif ( $crypt == get_option( 'wppa_album_crypt_3', false ) ) {
220
  $id = '-3';
221
  }
222
  else {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
+ * Version 7.3.00
7
  *
8
  */
9
 
19
  function wppa_get_unique_album_crypt() {
20
 
21
  $cr = wppa_get_unique_crypt( WPPA_ALBUMS );
22
+ while ( $cr == wppa_get_option( 'wppa_album_crypt_0', '' ) ||
23
+ $cr == wppa_get_option( 'wppa_album_crypt_1', '' ) ||
24
+ $cr == wppa_get_option( 'wppa_album_crypt_2', '' ) ||
25
+ $cr == wppa_get_option( 'wppa_album_crypt_3', '' ) ||
26
+ $cr == wppa_get_option( 'wppa_album_crypt_9', '' )
27
  ) {
28
  $cr = wppa_get_unique_crypt( WPPA_ALBUMS );
29
  }
117
 
118
  switch ( $id ) {
119
  case '-3':
120
+ $crypt = wppa_get_option( 'wppa_album_crypt_3', false );
121
  break;
122
  case '-2':
123
+ $crypt = wppa_get_option( 'wppa_album_crypt_2', false );
124
  break;
125
  case '-1':
126
+ $crypt = wppa_get_option( 'wppa_album_crypt_1', false );
127
  break;
128
  case '':
129
  case '0':
130
+ $crypt = wppa_get_option( 'wppa_album_crypt_0', false );
131
  break;
132
  case '999999':
133
+ $crypt = wppa_get_option( 'wppa_album_crypt_9', false );
134
  break;
135
  default:
136
  if ( strlen( $id ) < 12 ) {
204
  if ( ! $crypt ) {
205
  $id = '';
206
  }
207
+ elseif ( $crypt == wppa_get_option( 'wppa_album_crypt_9', false ) ) {
208
  $id = '999999';
209
  }
210
+ elseif ( $crypt == wppa_get_option( 'wppa_album_crypt_0', false ) ) {
211
  $id = '0';
212
  }
213
+ elseif ( $crypt == wppa_get_option( 'wppa_album_crypt_1', false ) ) {
214
  $id = '-1';
215
  }
216
+ elseif ( $crypt == wppa_get_option( 'wppa_album_crypt_2', false ) ) {
217
  $id = '-2';
218
  }
219
+ elseif ( $crypt == wppa_get_option( 'wppa_album_crypt_3', false ) ) {
220
  $id = '-3';
221
  }
222
  else {
wppa-export.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the export functions
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -82,7 +82,7 @@ global $wppa_temp_idx;
82
  if ( PHP_VERSION_ID >= 50207 && class_exists('ZipArchive') ) {
83
  echo('Opening zip output file...');
84
  $wppa_zip = new ZipArchive;
85
- $zipid = get_option('wppa_last_zip', '0');
86
  $zipid++;
87
  update_option('wppa_last_zip', $zipid);
88
  $zipfile = WPPA_DEPOT_PATH.'/wppa-'.$zipid.'.zip';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the export functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
82
  if ( PHP_VERSION_ID >= 50207 && class_exists('ZipArchive') ) {
83
  echo('Opening zip output file...');
84
  $wppa_zip = new ZipArchive;
85
+ $zipid = wppa_get_option('wppa_last_zip', '0');
86
  $zipid++;
87
  update_option('wppa_last_zip', $zipid);
88
  $zipfile = WPPA_DEPOT_PATH.'/wppa-'.$zipid.'.zip';
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 7.2.15
7
  *
8
  */
9
 
@@ -571,7 +571,7 @@ global $wppa_opt;
571
  }
572
 
573
  // Enable wppa_set shortcode conditionally
574
- if ( get_option( 'wppa_enable_shortcode_wppa_set', 'no' ) == 'yes' ) {
575
  add_shortcode( 'wppa_set', 'wppa_set_shortcodes' );
576
  }
577
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 7.3.00
7
  *
8
  */
9
 
571
  }
572
 
573
  // Enable wppa_set shortcode conditionally
574
+ if ( wppa_get_option( 'wppa_enable_shortcode_wppa_set', 'no' ) == 'yes' ) {
575
  add_shortcode( 'wppa_set', 'wppa_set_shortcodes' );
576
  }
577
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.2.16
7
  *
8
  */
9
 
@@ -2372,7 +2372,7 @@ static $user;
2372
  $distext = wppa_get_distext( $discount, $myrat );
2373
 
2374
  // Test if rating is one per period and period not expired yet
2375
- $wait_text = esc_js( wppa_get_rating_wait_text( $id, $user ) );
2376
  }
2377
  else { // Rating off
2378
  $myrat = '0';
@@ -2722,11 +2722,13 @@ global $wppa_done;
2722
 
2723
  if ( wppa_get_user() != wppa_get_photo_item( $photo, 'owner' ) ) {
2724
 
2725
- $iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating
2726
- WHERE photo = %d
2727
- AND user = %s",
2728
- $photo, wppa_get_user( 'display' ) ) );
2729
- if ( $iret ) {
 
 
2730
  $status = 'approved';
2731
  }
2732
  else {
@@ -3199,7 +3201,6 @@ function wppa_get_slide_frame_style() {
3199
  if ( wppa_opt( 'box_spacing' ) ) {
3200
  $result .= 'margin-bottom: ' . wppa_opt( 'box_spacing' ) . 'px;';
3201
  }
3202
-
3203
  return $result;
3204
  }
3205
 
@@ -3407,7 +3408,6 @@ global $wppa_version; // The theme version ( wppa_theme.php )
3407
  global $wppa_microtime;
3408
  global $wppa_microtime_cum;
3409
  global $wppa_err_displayed;
3410
- global $wppa_initruntimetime;
3411
  static $wppa_numqueries;
3412
  static $auto;
3413
  global $blog_id;
@@ -3460,7 +3460,6 @@ global $blog_id;
3460
  $wppa_microtime = - microtime( true );
3461
  }
3462
  if ( wppa( 'mocc' ) == '1' ) {
3463
- wppa_dbg_msg( 'Init runtime time :'.substr( $wppa_initruntimetime,0,5 ).'s.' );
3464
  wppa_dbg_msg( 'Num queries before wppa :'.get_num_queries() );
3465
  }
3466
 
@@ -3930,10 +3929,13 @@ global $thumbs;
3930
  }
3931
 
3932
  // Vertical align
3933
- if ( wppa( 'is_slideonly' ) ) {
3934
  $ali = wppa( 'ss_widget_valign' ) ? wppa( 'ss_widget_valign' ) : $ali = 'fit';
3935
  wppa_out( wppa_js( "\n" . 'wppaFullValign['.wppa( 'mocc' ).'] = "'.$ali.'";' ) );
3936
  }
 
 
 
3937
  else {
3938
  wppa_out( wppa_js( "\n" . 'wppaFullValign['.wppa( 'mocc' ).'] = "'.wppa_opt( 'fullvalign' ).'";' ) );
3939
  }
@@ -4964,7 +4966,6 @@ global $wppa_alert;
4964
 
4965
  // Repair name if not standard
4966
  if ( ! wppa_get_post( 'user-name' ) ) {
4967
- // wppa_log('obs', 'in functions 4700:'.$file['name']);
4968
  wppa( 'unsanitized_filename', $file['name'] );
4969
  wppa_set_default_name( $id, $file['name'] );
4970
  }
@@ -5437,10 +5438,17 @@ function wppa_zoom_in( $id ) {
5437
  }
5438
 
5439
  // Test if rating is one per period and period not expired yet
5440
- function wppa_get_rating_wait_text( $id, $user ) {
5441
  global $wpdb;
5442
 
5443
- $my_youngest_rating_dtm = $wpdb->get_var( $wpdb->prepare( "SELECT timestamp FROM $wpdb->wppa_rating WHERE photo = %s AND user = %s ORDER BY timestamp DESC LIMIT 1", $id, $user ) );
 
 
 
 
 
 
 
5444
 
5445
  if ( ! $my_youngest_rating_dtm ) return ''; // Not votes yet
5446
 
@@ -5477,7 +5485,7 @@ function wppa_check_comment( $user, $email, $comment ) {
5477
  global $wpdb;
5478
 
5479
  // // If manual moderation is enabled, skip all checks and return 'pending'.
5480
- // if ( 1 == get_option( 'moderatecomment' ) ) {
5481
  // wppa_log( 'Com', 'Comment {i}' . $comment . '{/i} held for moderation (1)' );
5482
  // return 'pending';
5483
  // }
@@ -5487,7 +5495,7 @@ global $wpdb;
5487
  $ser_agent = $_SERVER["HTTP_USER_AGENT"];
5488
 
5489
  // Check for the number of external links if a max allowed number is set.
5490
- if ( $max_links = get_option( 'comment_max_links' ) ) {
5491
  $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
5492
 
5493
  /**
@@ -5512,7 +5520,7 @@ global $wpdb;
5512
  }
5513
  }
5514
 
5515
- $mod_keys = trim( get_option( 'moderation_keys' ) );
5516
 
5517
  // If moderation 'keys' (keywords) are set, process them.
5518
  if ( ! empty( $mod_keys ) ) {
@@ -5547,7 +5555,7 @@ global $wpdb;
5547
  }
5548
  }
5549
 
5550
- $blacklist_keys = trim( get_option( 'blacklist_keys' ) );
5551
 
5552
  // If blacklist 'keys' (keywords) are set, process them.
5553
  if ( ! empty( $blacklist_keys ) ) {
@@ -5589,7 +5597,7 @@ global $wpdb;
5589
  * as well as whether there are any moderation keywords (if set) present in the author
5590
  * email address. If both checks pass, return true. Otherwise, return false.
5591
  */
5592
- if ( 1 == get_option( 'comment_whitelist' ) ) {
5593
  if ( $user != '' && $email != '' ) {
5594
  $comment_user = wppa_get_user_by( 'email', wp_unslash( $email ) );
5595
  if ( ! empty( $comment_user->ID ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
2372
  $distext = wppa_get_distext( $discount, $myrat );
2373
 
2374
  // Test if rating is one per period and period not expired yet
2375
+ $wait_text = esc_js( wppa_get_rating_wait_text( $id ) );
2376
  }
2377
  else { // Rating off
2378
  $myrat = '0';
2722
 
2723
  if ( wppa_get_user() != wppa_get_photo_item( $photo, 'owner' ) ) {
2724
 
2725
+ // $iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating
2726
+ // WHERE photo = %d
2727
+ // AND user = %s",
2728
+ // $photo, wppa_get_user( 'display' ) ) );
2729
+
2730
+ $bret = wppa_has_user_rated( $photo );
2731
+ if ( $bret ) {
2732
  $status = 'approved';
2733
  }
2734
  else {
3201
  if ( wppa_opt( 'box_spacing' ) ) {
3202
  $result .= 'margin-bottom: ' . wppa_opt( 'box_spacing' ) . 'px;';
3203
  }
 
3204
  return $result;
3205
  }
3206
 
3408
  global $wppa_microtime;
3409
  global $wppa_microtime_cum;
3410
  global $wppa_err_displayed;
 
3411
  static $wppa_numqueries;
3412
  static $auto;
3413
  global $blog_id;
3460
  $wppa_microtime = - microtime( true );
3461
  }
3462
  if ( wppa( 'mocc' ) == '1' ) {
 
3463
  wppa_dbg_msg( 'Num queries before wppa :'.get_num_queries() );
3464
  }
3465
 
3929
  }
3930
 
3931
  // Vertical align
3932
+ if ( wppa( 'in_widget' ) ) {
3933
  $ali = wppa( 'ss_widget_valign' ) ? wppa( 'ss_widget_valign' ) : $ali = 'fit';
3934
  wppa_out( wppa_js( "\n" . 'wppaFullValign['.wppa( 'mocc' ).'] = "'.$ali.'";' ) );
3935
  }
3936
+ elseif ( wppa( 'is_slideonly' ) ) {
3937
+ wppa_out( wppa_js( "\n" . 'wppaFullValign['.wppa( 'mocc' ).'] = "'.wppa_opt( 'fullvalign_slideonly' ).'";' ) );
3938
+ }
3939
  else {
3940
  wppa_out( wppa_js( "\n" . 'wppaFullValign['.wppa( 'mocc' ).'] = "'.wppa_opt( 'fullvalign' ).'";' ) );
3941
  }
4966
 
4967
  // Repair name if not standard
4968
  if ( ! wppa_get_post( 'user-name' ) ) {
 
4969
  wppa( 'unsanitized_filename', $file['name'] );
4970
  wppa_set_default_name( $id, $file['name'] );
4971
  }
5438
  }
5439
 
5440
  // Test if rating is one per period and period not expired yet
5441
+ function wppa_get_rating_wait_text( $id ) {
5442
  global $wpdb;
5443
 
5444
+ if ( is_user_logged_in() ) {
5445
+ $userid = wppa_get_user_id();
5446
+ $my_youngest_rating_dtm = $wpdb->get_var( $wpdb->prepare( "SELECT timestamp FROM $wpdb->wppa_rating WHERE photo = %d AND userid = %d ORDER BY timestamp DESC LIMIT 1", $id, $userid ) );
5447
+ }
5448
+ else {
5449
+ $userip = $_SERVER['REMOTE_ADDR'];
5450
+ $my_youngest_rating_dtm = $wpdb->get_var( $wpdb->prepare( "SELECT timestamp FROM $wpdb->wppa_rating WHERE photo = %d AND ip = %s ORDER BY timestamp DESC LIMIT 1", $id, $userip ) );
5451
+ }
5452
 
5453
  if ( ! $my_youngest_rating_dtm ) return ''; // Not votes yet
5454
 
5485
  global $wpdb;
5486
 
5487
  // // If manual moderation is enabled, skip all checks and return 'pending'.
5488
+ // if ( 1 == wppa_get_option( 'moderatecomment' ) ) {
5489
  // wppa_log( 'Com', 'Comment {i}' . $comment . '{/i} held for moderation (1)' );
5490
  // return 'pending';
5491
  // }
5495
  $ser_agent = $_SERVER["HTTP_USER_AGENT"];
5496
 
5497
  // Check for the number of external links if a max allowed number is set.
5498
+ if ( $max_links = wppa_get_option( 'comment_max_links' ) ) {
5499
  $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
5500
 
5501
  /**
5520
  }
5521
  }
5522
 
5523
+ $mod_keys = trim( wppa_get_option( 'moderation_keys' ) );
5524
 
5525
  // If moderation 'keys' (keywords) are set, process them.
5526
  if ( ! empty( $mod_keys ) ) {
5555
  }
5556
  }
5557
 
5558
+ $blacklist_keys = trim( wppa_get_option( 'blacklist_keys' ) );
5559
 
5560
  // If blacklist 'keys' (keywords) are set, process them.
5561
  if ( ! empty( $blacklist_keys ) ) {
5597
  * as well as whether there are any moderation keywords (if set) present in the author
5598
  * email address. If both checks pass, return true. Otherwise, return false.
5599
  */
5600
+ if ( 1 == wppa_get_option( 'comment_whitelist' ) ) {
5601
  if ( $user != '' && $email != '' ) {
5602
  $comment_user = wppa_get_user_by( 'email', wp_unslash( $email ) );
5603
  if ( ! empty( $comment_user->ID ) ) {
wppa-gutenberg-photo.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-gutenberg-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.0.00
6
  */
7
 
8
  function wppa_gutenberg_photo_block() {
@@ -317,7 +317,7 @@ global $wpdb;
317
  $name = stripslashes(__($photo['name']));
318
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
319
 
320
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
321
  $val = $photo['id'] . '.' . $photo['ext'];
322
  }
323
  else {
@@ -381,7 +381,7 @@ global $wpdb;
381
 
382
  $name = stripslashes(__($photo['name']));
383
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
384
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
385
  $val = $photo['id'] . '.' . $photo['ext'];
386
  }
387
  else {
2
  /* wppa-gutenberg-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.3.00
6
  */
7
 
8
  function wppa_gutenberg_photo_block() {
317
  $name = stripslashes(__($photo['name']));
318
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
319
 
320
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
321
  $val = $photo['id'] . '.' . $photo['ext'];
322
  }
323
  else {
381
 
382
  $name = stripslashes(__($photo['name']));
383
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
384
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
385
  $val = $photo['id'] . '.' . $photo['ext'];
386
  }
387
  else {
wppa-gutenberg-wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.1.11
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
@@ -192,7 +192,7 @@ global $wpdb;
192
  $result .=
193
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
194
  }
195
- $users = get_option( 'wppa_super_users', array() );
196
  foreach( $users as $user ) {
197
  $result .=
198
  '<option value="'.$user.'" class="wppagallery-admin" >'.$user.'</option>';
@@ -443,7 +443,7 @@ global $wpdb;
443
  $name = stripslashes(__($photo['name']));
444
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
445
 
446
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
447
  $val = $photo['id'] . '.' . $photo['ext'];
448
  }
449
  else {
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.3.00
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
192
  $result .=
193
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
194
  }
195
+ $users = wppa_get_option( 'wppa_super_users', array() );
196
  foreach( $users as $user ) {
197
  $result .=
198
  '<option value="'.$user.'" class="wppagallery-admin" >'.$user.'</option>';
443
  $name = stripslashes(__($photo['name']));
444
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
445
 
446
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
447
  $val = $photo['id'] . '.' . $photo['ext'];
448
  }
449
  else {
wppa-htaccess.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
- * Version 6.9.21
7
  *
8
  */
9
 
@@ -20,7 +20,7 @@ function wppa_create_wppa_htaccess() {
20
  }
21
  function wppa_create_wppa_htaccess_( $filename ) {
22
 
23
- switch ( get_option( 'wppa_cre_uploads_htaccess' ) ) {
24
 
25
  // Grant access
26
  case 'grant':
@@ -114,7 +114,7 @@ global $wpdb;
114
  if ( wppa_is_cron() ) {
115
 
116
  // Remake required?
117
- if ( ! get_option( 'wppa_pl_htaccess_required' ) ) {
118
  return false;
119
  }
120
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
20
  }
21
  function wppa_create_wppa_htaccess_( $filename ) {
22
 
23
+ switch ( wppa_get_option( 'wppa_cre_uploads_htaccess' ) ) {
24
 
25
  // Grant access
26
  case 'grant':
114
  if ( wppa_is_cron() ) {
115
 
116
  // Remake required?
117
+ if ( ! wppa_get_option( 'wppa_pl_htaccess_required' ) ) {
118
  return false;
119
  }
120
  }
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -22,7 +22,7 @@ global $wppa_session;
22
  if ( wppa( 'ajax' ) ) ob_start(); // Suppress output if ajax operation
23
 
24
  // Init
25
- $ngg_opts = get_option( 'ngg_options', false );
26
  $user = wppa_get_user();
27
 
28
  // Update watermark settings for the user if new values supplied
@@ -83,22 +83,22 @@ global $wppa_session;
83
  }
84
 
85
  // Verify last albums still exist
86
- $alb = get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' );
87
  if ( $alb ) {
88
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
89
  if ( ! $exists ) update_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' );
90
  }
91
- $alb = get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' );
92
  if ( $alb ) {
93
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
94
  if ( ! $exists ) update_option( 'wppa-video-album-import-'.wppa_get_user(), '0' );
95
  }
96
- $alb = get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' );
97
  if ( $alb ) {
98
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
99
  if ( ! $exists ) update_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' );
100
  }
101
- $alb = get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' );
102
  if ( $alb ) {
103
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
104
  if ( ! $exists ) update_option( 'wppa-document-album-import-'.wppa_get_user(), '0' );
@@ -198,13 +198,13 @@ global $wppa_session;
198
  }
199
 
200
  // Get this users current source type setting ( local/remote )
201
- $source_type = get_option( 'wppa_import_source_type_'.$user, 'local' );
202
 
203
  // Local. Find data we will going to need
204
  if ( $source_type == 'local' ) {
205
 
206
  // Get current local dir setting
207
- $source = get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
208
  if ( ! $source || ! wppa_is_dir( $source ) ) {
209
  $source = WPPA_DEPOT_PATH;
210
  update_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
@@ -241,7 +241,7 @@ global $wppa_session;
241
  // Remote. Find data we will going to need
242
  if ( $source_type == 'remote' ) {
243
  wppa( 'is_remote', true );
244
- $source = get_option( 'wppa_import_source_url_' . $user, 'http://' );
245
  $source_path = $source;
246
  $source_url = $source;
247
  $is_depot = false;
@@ -256,7 +256,7 @@ global $wppa_session;
256
  $csvcount = '0';
257
  $documentcount = '0';
258
  $is_ngg = false;
259
- $remote_max = get_option( 'wppa_import_remote_max_'.$user, '10' );
260
  }
261
 
262
  // The form
@@ -613,7 +613,7 @@ global $wppa_session;
613
  '<p class="hideifupdate" >' .
614
  __( 'Default album for import:', 'wp-photo-album-plus') .
615
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
616
- 'selected' => get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' ),
617
  'addpleaseselect' => true,
618
  'checkowner' => true,
619
  'checkupload' => true,
@@ -910,7 +910,7 @@ global $wppa_session;
910
  '<p class="hideifupdate" >' .
911
  __( 'Album to import to:', 'wp-photo-album-plus') .
912
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
913
- 'selected' => get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' ),
914
  'addpleaseselect' => true,
915
  'checkowner' => true,
916
  'checkupload' => true,
@@ -1024,7 +1024,7 @@ global $wppa_session;
1024
  '<p class="hideifupdate" >' .
1025
  __( 'Album to import to:', 'wp-photo-album-plus') .
1026
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1027
- 'selected' => get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' ),
1028
  'addpleaseselect' => true,
1029
  'checkowner' => true,
1030
  'checkupload' => true,
@@ -1214,7 +1214,7 @@ global $wppa_session;
1214
  '<p class="hideifupdate" >' .
1215
  __( 'Album to import to:', 'wp-photo-album-plus') .
1216
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1217
- 'selected' => get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' ),
1218
  'addpleaseselect' => true,
1219
  'checkowner' => true,
1220
  'checkupload' => true,
@@ -1636,7 +1636,7 @@ global $wppa_session;
1636
 
1637
  // Init
1638
  $user = wppa_get_user();
1639
- $source_type = get_option( 'wppa_import_source_type_'.$user, 'local' );
1640
  $files = array();
1641
 
1642
  // Ajax? one file
@@ -1646,13 +1646,13 @@ global $wppa_session;
1646
 
1647
  // Dispatch on source type local/remote
1648
  elseif ( $source_type == 'local' ) {
1649
- $source = get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
1650
  $source_path = $source; // Filesystem
1651
  $files = wppa_glob( $source_path . '/*' );
1652
  }
1653
  else { // remote
1654
- $max_tries = get_option( 'wppa_import_remote_max_'.$user, '10' );
1655
- $setting = get_option( 'wppa_import_source_url_'.$user, 'http://' );
1656
  $pattern = '/src=".*?"/';
1657
 
1658
  // Is it a photofile in a wppa tree filestructure?
@@ -1700,7 +1700,7 @@ global $wppa_session;
1700
 
1701
  // is it a page url
1702
  else {
1703
- $files = get_option( 'wppa_import_source_url_found_' . $user, false );
1704
  if ( ! $files ) {
1705
 
1706
  // Init
@@ -1820,9 +1820,9 @@ global $wppa_session;
1820
 
1821
  // Get this users current source directory setting
1822
  $user = wppa_get_user();
1823
- $source_type = get_option( 'wppa_import_source_type_'.$user, 'local' );
1824
  if ( $source_type == 'remote' ) wppa( 'is_remote', true );
1825
- $source = get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
1826
 
1827
  $depot = WPPA_ABSPATH . $source; // Filesystem
1828
  $depoturl = get_bloginfo( 'wpurl' ).'/'.$source; // url
@@ -2137,7 +2137,7 @@ global $wppa_session;
2137
 
2138
  // If ajax and remote and not a page, update url to successfully imported photo
2139
  if ( wppa( 'ajax' ) && wppa( 'is_remote' ) ) {
2140
- $setting = get_option( 'wppa_import_source_url_'.$user, 'http://' );
2141
  $setting_x = wppa_expand_tree_path( $setting );
2142
  if ( ( ! $wppa_session['is_wppa_tree'] && wppa_is_url_a_photo( $setting, false ) ) || wppa_is_url_a_photo( $setting_x, false ) ) {
2143
  update_option( 'wppa_import_source_url_' . wppa_get_user(), wppa_compress_tree_path( $unsanitized_path_name ) );
@@ -3275,7 +3275,7 @@ static $void_dirs;
3275
  }
3276
 
3277
  // Check for ngg gallery dir
3278
- $ngg_opts = get_option( 'ngg_options', false );
3279
  if ( $ngg_opts ) {
3280
  $ngg_gal = __( '--- Ngg Galleries --- ', 'wp-photo-album-plus' );
3281
  $display = str_replace( rtrim( $ngg_opts['gallerypath'], '/' ), $ngg_gal, $display );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
22
  if ( wppa( 'ajax' ) ) ob_start(); // Suppress output if ajax operation
23
 
24
  // Init
25
+ $ngg_opts = wppa_get_option( 'ngg_options', false );
26
  $user = wppa_get_user();
27
 
28
  // Update watermark settings for the user if new values supplied
83
  }
84
 
85
  // Verify last albums still exist
86
+ $alb = wppa_get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' );
87
  if ( $alb ) {
88
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
89
  if ( ! $exists ) update_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' );
90
  }
91
+ $alb = wppa_get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' );
92
  if ( $alb ) {
93
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
94
  if ( ! $exists ) update_option( 'wppa-video-album-import-'.wppa_get_user(), '0' );
95
  }
96
+ $alb = wppa_get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' );
97
  if ( $alb ) {
98
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
99
  if ( ! $exists ) update_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' );
100
  }
101
+ $alb = wppa_get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' );
102
  if ( $alb ) {
103
  $exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $alb ) );
104
  if ( ! $exists ) update_option( 'wppa-document-album-import-'.wppa_get_user(), '0' );
198
  }
199
 
200
  // Get this users current source type setting ( local/remote )
201
+ $source_type = wppa_get_option( 'wppa_import_source_type_'.$user, 'local' );
202
 
203
  // Local. Find data we will going to need
204
  if ( $source_type == 'local' ) {
205
 
206
  // Get current local dir setting
207
+ $source = wppa_get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
208
  if ( ! $source || ! wppa_is_dir( $source ) ) {
209
  $source = WPPA_DEPOT_PATH;
210
  update_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
241
  // Remote. Find data we will going to need
242
  if ( $source_type == 'remote' ) {
243
  wppa( 'is_remote', true );
244
+ $source = wppa_get_option( 'wppa_import_source_url_' . $user, 'http://' );
245
  $source_path = $source;
246
  $source_url = $source;
247
  $is_depot = false;
256
  $csvcount = '0';
257
  $documentcount = '0';
258
  $is_ngg = false;
259
+ $remote_max = wppa_get_option( 'wppa_import_remote_max_'.$user, '10' );
260
  }
261
 
262
  // The form
613
  '<p class="hideifupdate" >' .
614
  __( 'Default album for import:', 'wp-photo-album-plus') .
615
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
616
+ 'selected' => wppa_get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' ),
617
  'addpleaseselect' => true,
618
  'checkowner' => true,
619
  'checkupload' => true,
910
  '<p class="hideifupdate" >' .
911
  __( 'Album to import to:', 'wp-photo-album-plus') .
912
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
913
+ 'selected' => wppa_get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' ),
914
  'addpleaseselect' => true,
915
  'checkowner' => true,
916
  'checkupload' => true,
1024
  '<p class="hideifupdate" >' .
1025
  __( 'Album to import to:', 'wp-photo-album-plus') .
1026
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1027
+ 'selected' => wppa_get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' ),
1028
  'addpleaseselect' => true,
1029
  'checkowner' => true,
1030
  'checkupload' => true,
1214
  '<p class="hideifupdate" >' .
1215
  __( 'Album to import to:', 'wp-photo-album-plus') .
1216
  wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1217
+ 'selected' => wppa_get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' ),
1218
  'addpleaseselect' => true,
1219
  'checkowner' => true,
1220
  'checkupload' => true,
1636
 
1637
  // Init
1638
  $user = wppa_get_user();
1639
+ $source_type = wppa_get_option( 'wppa_import_source_type_'.$user, 'local' );
1640
  $files = array();
1641
 
1642
  // Ajax? one file
1646
 
1647
  // Dispatch on source type local/remote
1648
  elseif ( $source_type == 'local' ) {
1649
+ $source = wppa_get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
1650
  $source_path = $source; // Filesystem
1651
  $files = wppa_glob( $source_path . '/*' );
1652
  }
1653
  else { // remote
1654
+ $max_tries = wppa_get_option( 'wppa_import_remote_max_'.$user, '10' );
1655
+ $setting = wppa_get_option( 'wppa_import_source_url_'.$user, 'http://' );
1656
  $pattern = '/src=".*?"/';
1657
 
1658
  // Is it a photofile in a wppa tree filestructure?
1700
 
1701
  // is it a page url
1702
  else {
1703
+ $files = wppa_get_option( 'wppa_import_source_url_found_' . $user, false );
1704
  if ( ! $files ) {
1705
 
1706
  // Init
1820
 
1821
  // Get this users current source directory setting
1822
  $user = wppa_get_user();
1823
+ $source_type = wppa_get_option( 'wppa_import_source_type_'.$user, 'local' );
1824
  if ( $source_type == 'remote' ) wppa( 'is_remote', true );
1825
+ $source = wppa_get_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH );
1826
 
1827
  $depot = WPPA_ABSPATH . $source; // Filesystem
1828
  $depoturl = get_bloginfo( 'wpurl' ).'/'.$source; // url
2137
 
2138
  // If ajax and remote and not a page, update url to successfully imported photo
2139
  if ( wppa( 'ajax' ) && wppa( 'is_remote' ) ) {
2140
+ $setting = wppa_get_option( 'wppa_import_source_url_'.$user, 'http://' );
2141
  $setting_x = wppa_expand_tree_path( $setting );
2142
  if ( ( ! $wppa_session['is_wppa_tree'] && wppa_is_url_a_photo( $setting, false ) ) || wppa_is_url_a_photo( $setting_x, false ) ) {
2143
  update_option( 'wppa_import_source_url_' . wppa_get_user(), wppa_compress_tree_path( $unsanitized_path_name ) );
3275
  }
3276
 
3277
  // Check for ngg gallery dir
3278
+ $ngg_opts = wppa_get_option( 'ngg_options', false );
3279
  if ( $ngg_opts ) {
3280
  $ngg_gal = __( '--- Ngg Galleries --- ', 'wp-photo-album-plus' );
3281
  $display = str_replace( rtrim( $ngg_opts['gallerypath'], '/' ), $ngg_gal, $display );
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 7.0.10
7
  *
8
  *
9
  */
@@ -28,12 +28,12 @@ global $pcount;
28
  }
29
 
30
  // If there is a cron job running adding to the index and this is not that cron job, do nothing, unless force
31
- if ( get_option( 'wppa_remake_index_albums_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
32
  return;
33
  }
34
 
35
  // If no user runs the remake proc, start it as cron job
36
- if ( ! get_option( 'wppa_remake_index_albums_user' ) && ! $force ) {
37
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
38
  return;
39
  }
@@ -96,12 +96,12 @@ global $pcount;
96
  }
97
 
98
  // If there is a cron job running adding to the index and this is not that cron job, do nothing
99
- if ( get_option( 'wppa_remake_index_photos_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
100
  return;
101
  }
102
 
103
  // If no user runs the remake proc, start it as cron job
104
- if ( ! get_option( 'wppa_remake_index_photos_user' ) && ! $force ) {
105
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
106
  return;
107
  }
@@ -181,7 +181,7 @@ function wppa_index_raw_to_words( $xtext, $no_skips = false, $minlen = '3', $no_
181
  }
182
 
183
  // Find words to skip
184
- $skips = $no_skips ? array() : get_option( 'wppa_index_skips', array() );
185
 
186
  // Find minimum token length
187
  $minlen = wppa_opt( 'search_min_length' );
@@ -405,12 +405,12 @@ function wppa_index_remove( $type, $id ) {
405
  global $wpdb;
406
 
407
  // If there is a cron job running cleaning the index and this is not that cron job, do nothing
408
- if ( get_option( 'wppa_cleanup_index_user' ) == 'cron-job' && ! wppa_is_cron() ) {
409
  return;
410
  }
411
 
412
  // If no user runs the cleanup proc, start it as cron job
413
- if ( ! get_option( 'wppa_cleanup_index_user' ) ) {
414
  wppa_schedule_maintenance_proc( 'wppa_cleanup_index' );
415
  return;
416
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 7.3.00
7
  *
8
  *
9
  */
28
  }
29
 
30
  // If there is a cron job running adding to the index and this is not that cron job, do nothing, unless force
31
+ if ( wppa_get_option( 'wppa_remake_index_albums_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
32
  return;
33
  }
34
 
35
  // If no user runs the remake proc, start it as cron job
36
+ if ( ! wppa_get_option( 'wppa_remake_index_albums_user' ) && ! $force ) {
37
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
38
  return;
39
  }
96
  }
97
 
98
  // If there is a cron job running adding to the index and this is not that cron job, do nothing
99
+ if ( wppa_get_option( 'wppa_remake_index_photos_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
100
  return;
101
  }
102
 
103
  // If no user runs the remake proc, start it as cron job
104
+ if ( ! wppa_get_option( 'wppa_remake_index_photos_user' ) && ! $force ) {
105
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
106
  return;
107
  }
181
  }
182
 
183
  // Find words to skip
184
+ $skips = $no_skips ? array() : wppa_get_option( 'wppa_index_skips', array() );
185
 
186
  // Find minimum token length
187
  $minlen = wppa_opt( 'search_min_length' );
405
  global $wpdb;
406
 
407
  // If there is a cron job running cleaning the index and this is not that cron job, do nothing
408
+ if ( wppa_get_option( 'wppa_cleanup_index_user' ) == 'cron-job' && ! wppa_is_cron() ) {
409
  return;
410
  }
411
 
412
  // If no user runs the cleanup proc, start it as cron job
413
+ if ( ! wppa_get_option( 'wppa_cleanup_index_user' ) ) {
414
  wppa_schedule_maintenance_proc( 'wppa_cleanup_index' );
415
  return;
416
  }
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 7.2.09
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -252,19 +252,19 @@ global $pagenow;
252
  }
253
 
254
  // Rerate required?
255
- if ( get_option( 'wppa_rating_on' ) == 'yes' && get_option( 'wppa_rerate_status' ) ) {
256
- if ( strpos( get_option( 'wppa_rerate_user' ), 'cron' ) === false ) {
257
  wppa_error_message( __('The avarage ratings need to be recalculated. Please run <i>Photo Albums -> Settings</i> admin page <i>Table VIII-A5</i>' , 'wp-photo-album-plus') );
258
  }
259
  }
260
 
261
  // Cron jobs postponed?
262
- if ( get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
263
  wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions. See <i>Table VIII-A0</i>', 'wp-photo-album-plus') );
264
  }
265
 
266
  // Finish setup
267
- if ( get_option( 'wppa_prevrev' ) == '100' && get_option('wppa_i_done') != 'done' && $_SERVER['QUERY_STRING'] != 'page=wppa_options' ) {
268
  wppa_ok_message( __('Please finish setting up WP Photo Album Plus on', 'wp-photo-album-plus') . ' <a href="'.get_admin_url().'admin.php?page=wppa_options">' . __('this page', 'wp-photo-album-plus') . '</a>' );
269
  }
270
  }
@@ -273,7 +273,7 @@ function wppa_check_tag_system() {
273
  global $wpdb;
274
 
275
  if ( current_user_can( 'wppa_settings' ) ) {
276
- if ( get_option( 'wppa_tags_ok' ) != '1' ) {
277
  $tag = $wpdb->get_var( "SELECT tags FROM $wpdb->wppa_photos WHERE tags <> '' ORDER BY id DESC LIMIT 1" );
278
  if ( $tag ) {
279
  if ( substr( $tag, 0, 1 ) != ',' ) {
@@ -295,7 +295,7 @@ function wppa_check_cat_system() {
295
  global $wpdb;
296
 
297
  if ( current_user_can( 'wppa_settings' ) ) {
298
- if ( get_option( 'wppa_cats_ok' ) != '1' ) {
299
  $tag = $wpdb->get_var( "SELECT cats FROM $wpdb->wppa_albums WHERE cats <> '' ORDER BY id DESC LIMIT 1" );
300
  if ( $tag ) {
301
  if ( substr( $tag, 0, 1 ) != ',' ) {
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 7.3.00
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
252
  }
253
 
254
  // Rerate required?
255
+ if ( wppa_get_option( 'wppa_rating_on' ) == 'yes' && wppa_get_option( 'wppa_rerate_status' ) ) {
256
+ if ( strpos( wppa_get_option( 'wppa_rerate_user' ), 'cron' ) === false ) {
257
  wppa_error_message( __('The avarage ratings need to be recalculated. Please run <i>Photo Albums -> Settings</i> admin page <i>Table VIII-A5</i>' , 'wp-photo-album-plus') );
258
  }
259
  }
260
 
261
  // Cron jobs postponed?
262
+ if ( wppa_get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
263
  wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions. See <i>Table VIII-A0</i>', 'wp-photo-album-plus') );
264
  }
265
 
266
  // Finish setup
267
+ if ( wppa_get_option( 'wppa_prevrev' ) == '100' && wppa_get_option('wppa_i_done') != 'done' && $_SERVER['QUERY_STRING'] != 'page=wppa_options' ) {
268
  wppa_ok_message( __('Please finish setting up WP Photo Album Plus on', 'wp-photo-album-plus') . ' <a href="'.get_admin_url().'admin.php?page=wppa_options">' . __('this page', 'wp-photo-album-plus') . '</a>' );
269
  }
270
  }
273
  global $wpdb;
274
 
275
  if ( current_user_can( 'wppa_settings' ) ) {
276
+ if ( wppa_get_option( 'wppa_tags_ok' ) != '1' ) {
277
  $tag = $wpdb->get_var( "SELECT tags FROM $wpdb->wppa_photos WHERE tags <> '' ORDER BY id DESC LIMIT 1" );
278
  if ( $tag ) {
279
  if ( substr( $tag, 0, 1 ) != ',' ) {
295
  global $wpdb;
296
 
297
  if ( current_user_can( 'wppa_settings' ) ) {
298
+ if ( wppa_get_option( 'wppa_cats_ok' ) != '1' ) {
299
  $tag = $wpdb->get_var( "SELECT cats FROM $wpdb->wppa_albums WHERE cats <> '' ORDER BY id DESC LIMIT 1" );
300
  if ( $tag ) {
301
  if ( substr( $tag, 0, 1 ) != ',' ) {
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 7.2.09
7
  *
8
  */
9
 
@@ -424,7 +424,7 @@ function wppa_translate_photo_keywords( $id, $text ) {
424
  $timestamps = array( 'timestamp', 'modified' );
425
  foreach ( $timestamps as $timestamp ) {
426
  if ( $thumb[$timestamp] ) {
427
- $result = str_replace( 'w#'.$timestamp, wppa_local_date( get_option( 'date_format', "F j, Y," ).' '.get_option( 'time_format', "g:i a" ), $thumb[$timestamp] ), $result );
428
  }
429
  else {
430
  $result = str_replace( 'w#'.$timestamp, '&lsaquo;'.__( 'unknown' , 'wp-photo-album-plus').'&rsaquo;', $result );
@@ -711,7 +711,7 @@ function wppa_translate_album_keywords( $id, $text, $translate = true ) {
711
  $timestamps = array( 'timestamp', 'modified' );
712
  foreach ( $timestamps as $timestamp ) {
713
  if ( $album[$timestamp] ) {
714
- $result = str_replace( 'w#'.$timestamp, wppa_local_date( get_option( 'date_format', "F j, Y," ).' '.get_option( 'time_format', "g:i a" ), $album['timestamp'] ), $result );
715
  }
716
  else {
717
  $result = str_replace( 'w#'.$timestamp, '&lsaquo;' . __( 'unknown', 'wp-photo-album-plus' ) . '&rsaquo;', $result );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 7.3.00
7
  *
8
  */
9
 
424
  $timestamps = array( 'timestamp', 'modified' );
425
  foreach ( $timestamps as $timestamp ) {
426
  if ( $thumb[$timestamp] ) {
427
+ $result = str_replace( 'w#'.$timestamp, wppa_local_date( wppa_get_option( 'date_format', "F j, Y," ).' '.wppa_get_option( 'time_format', "g:i a" ), $thumb[$timestamp] ), $result );
428
  }
429
  else {
430
  $result = str_replace( 'w#'.$timestamp, '&lsaquo;'.__( 'unknown' , 'wp-photo-album-plus').'&rsaquo;', $result );
711
  $timestamps = array( 'timestamp', 'modified' );
712
  foreach ( $timestamps as $timestamp ) {
713
  if ( $album[$timestamp] ) {
714
+ $result = str_replace( 'w#'.$timestamp, wppa_local_date( wppa_get_option( 'date_format', "F j, Y," ).' '.wppa_get_option( 'time_format', "g:i a" ), $album['timestamp'] ), $result );
715
  }
716
  else {
717
  $result = str_replace( 'w#'.$timestamp, '&lsaquo;' . __( 'unknown', 'wp-photo-album-plus' ) . '&rsaquo;', $result );
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 7.2.13
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -307,7 +307,7 @@ function wppa_convert_from_pretty( $uri ) {
307
  if ( $wppapos === false ) return $uri;
308
 
309
  // Works only on non-default permalinks
310
- if ( ! get_option( 'permalink_structure' ) ) return $uri;
311
 
312
  // copy start up to including slash before wppaspec
313
  $newuri = substr( $uri, 0, $wppapos + 1 );
@@ -450,7 +450,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
450
  $uri = $xuri;
451
 
452
  // Only when permalink structure is not default
453
- if ( ! get_option( 'permalink_structure' ) ) return $uri;
454
 
455
  // Not on front page, the redirection will fail...
456
  // if ( is_front_page() ) {
@@ -577,7 +577,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
577
 
578
  // Now the actual conversion to pretty links
579
  if ( wppa_opt( 'use_pretty_links' ) == '-none-' && ! $overrule ) return $uri;
580
- if ( ! get_option( 'permalink_structure' ) ) return $uri;
581
 
582
  // Leaving the next line out gives 404 on pretty links under certain circumstances.
583
  // Can not reproduce and also do not understand why, and do not remember why i have put it in.
@@ -2015,7 +2015,7 @@ static $trimmable;
2015
 
2016
  // In wppa_redirect() is $wppa_opt not yet initialized, do not use wppa_switch() to avoid error
2017
  // if ( wppa_switch( 'use_short_qargs' ) ) {
2018
- if ( get_option( 'wppa_use_short_qargs' ) == 'yes' ) {
2019
  foreach ( $trimmable as $item ) {
2020
  $result = str_replace( 'wppa-'.$item, $item, $result );
2021
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 7.3.00
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
307
  if ( $wppapos === false ) return $uri;
308
 
309
  // Works only on non-default permalinks
310
+ if ( ! wppa_get_option( 'permalink_structure' ) ) return $uri;
311
 
312
  // copy start up to including slash before wppaspec
313
  $newuri = substr( $uri, 0, $wppapos + 1 );
450
  $uri = $xuri;
451
 
452
  // Only when permalink structure is not default
453
+ if ( ! wppa_get_option( 'permalink_structure' ) ) return $uri;
454
 
455
  // Not on front page, the redirection will fail...
456
  // if ( is_front_page() ) {
577
 
578
  // Now the actual conversion to pretty links
579
  if ( wppa_opt( 'use_pretty_links' ) == '-none-' && ! $overrule ) return $uri;
580
+ if ( ! wppa_get_option( 'permalink_structure' ) ) return $uri;
581
 
582
  // Leaving the next line out gives 404 on pretty links under certain circumstances.
583
  // Can not reproduce and also do not understand why, and do not remember why i have put it in.
2015
 
2016
  // In wppa_redirect() is $wppa_opt not yet initialized, do not use wppa_switch() to avoid error
2017
  // if ( wppa_switch( 'use_short_qargs' ) ) {
2018
+ if ( wppa_get_option( 'wppa_use_short_qargs' ) == 'yes' ) {
2019
  foreach ( $trimmable as $item ) {
2020
  $result = str_replace( 'wppa-'.$item, $item, $result );
2021
  }
wppa-mailing.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains mailing functions
6
  *
7
- * Version 7.2.13
8
  *
9
  */
10
 
@@ -23,7 +23,7 @@ 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
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
  if ( in_array( $type, array( 'newalbumnotify', 'feuploadnotify', 'commentnotify' ) ) ) {
@@ -40,7 +40,7 @@ function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url =
40
  }
41
  $owner = wppa_get_photo_item( $pho, 'owner' );
42
 
43
- $pending = get_option( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb, false );
44
 
45
  if ( $pending ) {
46
  return;
@@ -62,7 +62,7 @@ global $wpdb;
62
  // Add new users to default mailing list subscriptions
63
  if ( wppa_opt( 'mailinglist_policy' ) == 'opt-out' ) {
64
 
65
- $from = get_option( 'wppa_mailinglist_highest_user_auto_subscribed', 0 );
66
  $to = $wpdb->get_var( "SELECT ID from $wpdb->users ORDER BY ID DESC LIMIT 1" );
67
 
68
  if ( $to > $from ) {
@@ -102,7 +102,7 @@ global $wpdb;
102
  }
103
 
104
  // Get mailinglist user ids
105
- $mailinglist = get_option( 'wppa_mailinglist_' . $type, '' );
106
  $userarray = wppa_index_string_to_array( $mailinglist );
107
 
108
  // Mailinglist empty?
@@ -133,7 +133,7 @@ global $wpdb;
133
  $blog = get_bloginfo( 'name' );
134
 
135
  // The callback url if any
136
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
137
 
138
  // The content of the mail
139
  $content =
@@ -196,8 +196,8 @@ global $wpdb;
196
  }
197
 
198
  // See if there are more directly uploaded
199
- wppa_log( 'dbg', 'last_sched='.get_option( 'last_feuploadnotify_scheduled',0));
200
- $timestamp = wppa_get_photo_item( get_option( 'last_feuploadnotify_scheduled', $pho ), 'timestamp' );
201
  $owner = wppa_get_photo_item( $pho, 'owner' );
202
  $photos = $wpdb->get_col( "SELECT id
203
  FROM $wpdb->wppa_photos
@@ -230,7 +230,7 @@ global $wpdb;
230
  }
231
 
232
  // The callback url if any
233
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
234
 
235
  // The content
236
  if ( $multi ) {
@@ -350,7 +350,7 @@ global $wpdb;
350
  $subj = sprintf( __( 'Comment on photo %s' , 'wp-photo-album-plus' ), wppa_get_photo_name( $comment['photo'] ) );
351
 
352
  // The callback url if any
353
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
354
 
355
  // The content
356
  $cont = $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
@@ -411,7 +411,7 @@ global $wpdb;
411
  $usr = $user->ID;
412
 
413
  // The callback url if any
414
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
415
 
416
  // Did user subscribe?
417
  if ( wppa_is_user_in_mailinglist( $user->ID, 'photoapproved' ) ) {
@@ -470,7 +470,7 @@ global $wpdb;
470
  }
471
 
472
  // The callback url if any
473
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
474
 
475
  // Send the owner of the photo the mail if he is in the mailinglist
476
  if ( wppa_is_user_in_mailinglist( $owner, $type ) ) {
@@ -571,7 +571,7 @@ global $wpdb;
571
  }
572
 
573
  // The callback url if any
574
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
575
 
576
  $cont =
577
  $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus' ) . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
@@ -628,7 +628,7 @@ global $wpdb;
628
  }
629
 
630
  // The callback url if any
631
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
632
 
633
  // The content
634
  $cont = sprintf( __( 'User %1$s uploaded photo %2$s into album %3$s' , 'wp-photo-album-plus' ),
@@ -704,7 +704,7 @@ global $wpdb;
704
  }
705
 
706
  // The callback url if any
707
- $link = get_option( 'wppa_mailinglist_callback_url', '' );
708
 
709
  $cont =
710
  $aut . ( strpos( $comment['email'], '@' ) ? ' (' . make_clickable( $comment['email'] ) . ') ' : ' ' ) . __( 'wrote on photo' , 'wp-photo-album-plus' ) . ' ' . wppa_get_photo_name( $pho ) . ':' .
@@ -784,7 +784,7 @@ function wppa_is_user_in_mailinglist( $usr, $list ) {
784
  $user_id = '0';
785
  }
786
  }
787
- $mailinglist = get_option( 'wppa_mailinglist_' . $list, '' );
788
  $userarray = wppa_index_string_to_array( $mailinglist );
789
  return ( in_array( $user_id, $userarray ) );
790
  }
@@ -796,7 +796,7 @@ function wppa_unsubscribe_user( $user_id, $list_type ) {
796
  return;
797
  }
798
 
799
- $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
800
  $userarray = wppa_index_string_to_array( $mailinglist );
801
  if ( in_array( $user_id, $userarray ) ) {
802
  $userarray = array_diff( $userarray, array( $user_id ) );
@@ -830,7 +830,7 @@ function wppa_subscribe_user( $user_id, $list_type ) {
830
  return;
831
  }
832
 
833
- $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
834
  $userarray = wppa_index_string_to_array( $mailinglist );
835
  if ( ! in_array( $user_id, $userarray ) ) {
836
  $userarray[] = $user_id;
4
  *
5
  * Contains mailing functions
6
  *
7
+ * Version 7.3.00
8
  *
9
  */
10
 
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
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
  if ( in_array( $type, array( 'newalbumnotify', 'feuploadnotify', 'commentnotify' ) ) ) {
40
  }
41
  $owner = wppa_get_photo_item( $pho, 'owner' );
42
 
43
+ $pending = wppa_get_option( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb, false );
44
 
45
  if ( $pending ) {
46
  return;
62
  // Add new users to default mailing list subscriptions
63
  if ( wppa_opt( 'mailinglist_policy' ) == 'opt-out' ) {
64
 
65
+ $from = wppa_get_option( 'wppa_mailinglist_highest_user_auto_subscribed', 0 );
66
  $to = $wpdb->get_var( "SELECT ID from $wpdb->users ORDER BY ID DESC LIMIT 1" );
67
 
68
  if ( $to > $from ) {
102
  }
103
 
104
  // Get mailinglist user ids
105
+ $mailinglist = wppa_get_option( 'wppa_mailinglist_' . $type, '' );
106
  $userarray = wppa_index_string_to_array( $mailinglist );
107
 
108
  // Mailinglist empty?
133
  $blog = get_bloginfo( 'name' );
134
 
135
  // The callback url if any
136
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
137
 
138
  // The content of the mail
139
  $content =
196
  }
197
 
198
  // See if there are more directly uploaded
199
+ wppa_log( 'dbg', 'last_sched='.wppa_get_option( 'last_feuploadnotify_scheduled',0));
200
+ $timestamp = wppa_get_photo_item( wppa_get_option( 'last_feuploadnotify_scheduled', $pho ), 'timestamp' );
201
  $owner = wppa_get_photo_item( $pho, 'owner' );
202
  $photos = $wpdb->get_col( "SELECT id
203
  FROM $wpdb->wppa_photos
230
  }
231
 
232
  // The callback url if any
233
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
234
 
235
  // The content
236
  if ( $multi ) {
350
  $subj = sprintf( __( 'Comment on photo %s' , 'wp-photo-album-plus' ), wppa_get_photo_name( $comment['photo'] ) );
351
 
352
  // The callback url if any
353
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
354
 
355
  // The content
356
  $cont = $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
411
  $usr = $user->ID;
412
 
413
  // The callback url if any
414
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
415
 
416
  // Did user subscribe?
417
  if ( wppa_is_user_in_mailinglist( $user->ID, 'photoapproved' ) ) {
470
  }
471
 
472
  // The callback url if any
473
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
474
 
475
  // Send the owner of the photo the mail if he is in the mailinglist
476
  if ( wppa_is_user_in_mailinglist( $owner, $type ) ) {
571
  }
572
 
573
  // The callback url if any
574
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
575
 
576
  $cont =
577
  $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus' ) . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
628
  }
629
 
630
  // The callback url if any
631
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
632
 
633
  // The content
634
  $cont = sprintf( __( 'User %1$s uploaded photo %2$s into album %3$s' , 'wp-photo-album-plus' ),
704
  }
705
 
706
  // The callback url if any
707
+ $link = wppa_get_option( 'wppa_mailinglist_callback_url', '' );
708
 
709
  $cont =
710
  $aut . ( strpos( $comment['email'], '@' ) ? ' (' . make_clickable( $comment['email'] ) . ') ' : ' ' ) . __( 'wrote on photo' , 'wp-photo-album-plus' ) . ' ' . wppa_get_photo_name( $pho ) . ':' .
784
  $user_id = '0';
785
  }
786
  }
787
+ $mailinglist = wppa_get_option( 'wppa_mailinglist_' . $list, '' );
788
  $userarray = wppa_index_string_to_array( $mailinglist );
789
  return ( in_array( $user_id, $userarray ) );
790
  }
796
  return;
797
  }
798
 
799
+ $mailinglist = wppa_get_option( 'wppa_mailinglist_' . $list_type, '' );
800
  $userarray = wppa_index_string_to_array( $mailinglist );
801
  if ( in_array( $user_id, $userarray ) ) {
802
  $userarray = array_diff( $userarray, array( $user_id ) );
830
  return;
831
  }
832
 
833
+ $mailinglist = wppa_get_option( 'wppa_mailinglist_' . $list_type, '' );
834
  $userarray = wppa_index_string_to_array( $mailinglist );
835
  if ( ! in_array( $user_id, $userarray ) ) {
836
  $userarray[] = $user_id;
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.2.11
7
  *
8
  */
9
 
@@ -60,6 +60,7 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
60
  'wppa_photos_hyphens_to_spaces',
61
  'wppa_png_to_jpg',
62
  'wppa_fix_mp4_meta',
 
63
  );
64
 
65
  global $wppa_cron_maintenance_slugs;
@@ -77,6 +78,7 @@ $wppa_cron_maintenance_slugs = array( 'wppa_remake_index_albums',
77
  'wppa_crypt_photos',
78
  'wppa_crypt_albums',
79
  'wppa_photos_hyphens_to_spaces',
 
80
 
81
  );
82
 
@@ -97,7 +99,7 @@ global $wppa_endtime;
97
 
98
  // If we do clean index by cron and remake index still active, reschedule and give up
99
  if ( wppa_is_cron() && $slug == 'wppa_cleanup_index' ) {
100
- if ( get_option( 'wppa_remake_index_photos_user', false ) || get_option( 'wppa_remake_index_albums_user', false ) ) {
101
  wppa_log( 'cron', '{b}' . $slug . '{/b} delayed' );
102
  wppa_schedule_maintenance_proc( $slug );
103
  update_option( 'wppa_cleanup_index_status', 'Delayed' );
@@ -111,7 +113,7 @@ global $wppa_endtime;
111
 
112
  foreach ( array_keys( $wppa_all_maintenance_slugs ) as $key ) {
113
  if ( $wppa_all_maintenance_slugs[$key] != $slug ) {
114
- if ( get_option( $wppa_all_maintenance_slugs[$key].'_togo', '0') ) { // Process running
115
  return __('You can run only one maintenance procedure at a time', 'wp-photo-album-plus').'||'.$slug.'||'.__('Error', 'wp-photo-album-plus').'||'.''.'||'.'';
116
  }
117
  }
@@ -137,7 +139,7 @@ global $wppa_endtime;
137
 
138
  // Initialize
139
  $chunksize = '1000';
140
- $lastid = strval( intval ( get_option( $slug . '_last', '0' ) ) );
141
  $errtxt = '';
142
  $id = '0';
143
  $topid = '0';
@@ -201,11 +203,11 @@ global $wppa_endtime;
201
  }
202
  break;
203
  case 'wppa_file_system':
204
- if ( get_option('wppa_file_system') == 'flat' ) update_option( 'wppa_file_system', 'to-tree' );
205
- if ( get_option('wppa_file_system') == 'tree' ) update_option( 'wppa_file_system', 'to-flat' );
206
  break;
207
  case 'wppa_cleanup':
208
- $orphan_album = get_option( 'wppa_orphan_album', '0' );
209
  $album_exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $orphan_album ) );
210
  if ( ! $album_exists ) $orphan_album = false;
211
  if ( ! $orphan_album ) {
@@ -242,12 +244,12 @@ global $wppa_endtime;
242
  }
243
  break;
244
  case 'wppa_move_all_photos':
245
- $fromalb = get_option( 'wppa_move_all_photos_from' );
246
  if ( ! wppa_album_exists( $fromalb ) ) {
247
  echo sprintf(__( 'From album %d does not exist', 'wp-photo-album-plus' ), $fromalb );
248
  wppa_exit();
249
  }
250
- $toalb = get_option( 'wppa_move_all_photos_to' );
251
  if ( ! wppa_album_exists( $toalb ) ) {
252
  echo sprintf(__( 'To album %d does not exist', 'wp-photo-album-plus' ), $toalb );
253
  wppa_exit();
@@ -390,12 +392,13 @@ global $wppa_endtime;
390
  case 'wppa_photos_hyphens_to_spaces':
391
  case 'wppa_png_to_jpg':
392
  case 'wppa_fix_mp4_meta':
 
393
 
394
  // Process photos
395
  $table = WPPA_PHOTOS;
396
 
397
  if ( $slug == 'wppa_cleanup' ) {
398
- $topid = get_option( 'wppa_'.WPPA_PHOTOS.'_lastkey', '1' ) * 10;
399
  $photos = array();
400
  for ( $i = ( $lastid + '1'); $i <= $topid; $i++ ) {
401
  $photos[]['id'] = $i;
@@ -415,12 +418,12 @@ global $wppa_endtime;
415
  }
416
 
417
  if ( $slug == 'wppa_edit_tag' ) {
418
- $edit_tag = get_option( 'wppa_tag_to_edit' );
419
- $new_tag = get_option( 'wppa_new_tag_value' );
420
  }
421
 
422
  if ( ! $photos && $slug == 'wppa_file_system' ) {
423
- $fs = get_option( 'wppa_file_system' );
424
  if ( $fs == 'to-tree' ) {
425
  $to = 'tree';
426
  }
@@ -560,7 +563,7 @@ global $wppa_endtime;
560
  break;
561
 
562
  case 'wppa_file_system':
563
- $fs = get_option('wppa_file_system');
564
  if ( $fs == 'to-tree' || $fs == 'to-flat' ) {
565
  if ( $fs == 'to-tree' ) {
566
  $from = 'flat';
@@ -817,8 +820,8 @@ global $wppa_endtime;
817
  break;
818
 
819
  case 'wppa_move_all_photos':
820
- $fromalb = get_option( 'wppa_move_all_photos_from' );
821
- $toalb = get_option( 'wppa_move_all_photos_to' );
822
  $alb = wppa_get_photo_item( $id, 'album' );
823
  if ( $alb == $fromalb ) {
824
  wppa_update_photo( array( 'id' => $id, 'album' => $toalb ) );
@@ -845,6 +848,51 @@ global $wppa_endtime;
845
  wppa_fix_video_framesize( $id, 'maintproc' );
846
  break;
847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
848
  case 'wppa_custom_photo_proc':
849
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
850
  include $file;
@@ -921,7 +969,7 @@ global $wppa_endtime;
921
  $photos = wppa_index_string_to_array( $indexes[$idx]['photos'] );
922
  $cp = is_array( $photos ) ? count( $photos ) : 0;
923
  $pidx = 0;
924
- $last = get_option( $slug.'_last_photo', 0 );
925
  delete_option( $slug.'_last_photo' );
926
 
927
  if ( is_array( $photos ) ) foreach( array_keys( $photos ) as $pidx ) {
@@ -1144,7 +1192,7 @@ global $wppa_endtime;
1144
  }
1145
 
1146
  if ( wppa_is_cron() ) {
1147
- if ( get_option( $slug . '_ad_inf' ) == 'yes' ) {
1148
  wppa_schedule_maintenance_proc( $slug );
1149
  }
1150
 
@@ -1189,7 +1237,7 @@ global $wppa_log_file;
1189
 
1190
  // List the search index table
1191
  case 'wppa_list_index':
1192
- $start = get_option( 'wppa_list_index_display_start', '' );
1193
  $total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_index" );
1194
  $indexes = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_index
1195
  WHERE slug >= %s ORDER BY slug LIMIT 1000", $start ), ARRAY_A );
@@ -1250,7 +1298,7 @@ global $wppa_log_file;
1250
  style="float:left;clear:both;width:100%;overflow:auto;margin-left:-1px;"
1251
  >';
1252
 
1253
- $rec = get_option( 'wppa_recursive_log', '' );
1254
  if ( $rec ) {
1255
  $result .= __( 'Recursive log detected', 'wp-photo-album-plus' ) . ': ' .
1256
  $rec . '<br /><br />';
@@ -1292,6 +1340,7 @@ global $wppa_log_file;
1292
  <th>Date/time</th>
1293
  <th>Status</th>
1294
  <th>User</th>
 
1295
  <th>Value</th>
1296
  <th>Photo id</th>
1297
  <th></th>
@@ -1311,6 +1360,7 @@ global $wppa_log_file;
1311
  <td>' . htmlentities( ( $rating['timestamp'] ? wppa_local_date( '', $rating['timestamp'] ) : 'pre-historic' ) ) . '</td>
1312
  <td>' . htmlentities( $rating['status'] ) . '</td>
1313
  <td>' . htmlentities( $rating['user'] ) . '</td>
 
1314
  <td>' . htmlentities( $rating['value'] ) . '</td>
1315
  <td>' . htmlentities( $rating['photo'] ) . '</td>
1316
  <td style="width:250px; text-align:center;"><img src="' . esc_url( wppa_get_thumb_url( $rating['photo'] ) ) . '"
@@ -1366,7 +1416,7 @@ global $wppa_log_file;
1366
  <tr>
1367
  <td>'.$session['id'].'</td>
1368
  <td>' . htmlentities( strlen( $session['ip'] ) > 15 ? substr( $session['ip'], 0, 12 ) . '...' : $session['ip'] ) . '</td>
1369
- <td style="width:150px;" >'.wppa_local_date(get_option('date_format', "F j, Y,").' '.get_option('time_format', "g:i a"), $session['timestamp']).'</td>
1370
  <td>' . htmlentities( $session['count'] ) . '</td>
1371
  <td>' . htmlentities( $session['status'] ) . '</td>
1372
  <td style="border-bottom:1px solid gray;" >';
@@ -1440,6 +1490,7 @@ global $wppa_log_file;
1440
  <th>Date/time</th>
1441
  <th>Status</th>
1442
  <th>User</th>
 
1443
  <th>Email</th>
1444
  <th>Photo id</th>
1445
  <th></th>
@@ -1458,6 +1509,7 @@ global $wppa_log_file;
1458
  <td>' . htmlentities( $comment['timestamp'] ? wppa_local_date( '', $comment['timestamp'] ) : 'pre-historic' ) . '</td>
1459
  <td>' . htmlentities( $comment['status'] ) . '</td>
1460
  <td>' . htmlentities( $comment['user'] ) . '</td>
 
1461
  <td>' . htmlentities( $comment['email'] ) . '</td>
1462
  <td>' . htmlentities( $comment['photo'] ) . '</td>
1463
  <td style="width:250px; text-align:center;" >
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.3.00
7
  *
8
  */
9
 
60
  'wppa_photos_hyphens_to_spaces',
61
  'wppa_png_to_jpg',
62
  'wppa_fix_mp4_meta',
63
+ 'wppa_fix_userids',
64
  );
65
 
66
  global $wppa_cron_maintenance_slugs;
78
  'wppa_crypt_photos',
79
  'wppa_crypt_albums',
80
  'wppa_photos_hyphens_to_spaces',
81
+ 'wppa_fix_userids',
82
 
83
  );
84
 
99
 
100
  // If we do clean index by cron and remake index still active, reschedule and give up
101
  if ( wppa_is_cron() && $slug == 'wppa_cleanup_index' ) {
102
+ if ( wppa_get_option( 'wppa_remake_index_photos_user', false ) || wppa_get_option( 'wppa_remake_index_albums_user', false ) ) {
103
  wppa_log( 'cron', '{b}' . $slug . '{/b} delayed' );
104
  wppa_schedule_maintenance_proc( $slug );
105
  update_option( 'wppa_cleanup_index_status', 'Delayed' );
113
 
114
  foreach ( array_keys( $wppa_all_maintenance_slugs ) as $key ) {
115
  if ( $wppa_all_maintenance_slugs[$key] != $slug ) {
116
+ if ( wppa_get_option( $wppa_all_maintenance_slugs[$key].'_togo', '0') ) { // Process running
117
  return __('You can run only one maintenance procedure at a time', 'wp-photo-album-plus').'||'.$slug.'||'.__('Error', 'wp-photo-album-plus').'||'.''.'||'.'';
118
  }
119
  }
139
 
140
  // Initialize
141
  $chunksize = '1000';
142
+ $lastid = strval( intval ( wppa_get_option( $slug . '_last', '0' ) ) );
143
  $errtxt = '';
144
  $id = '0';
145
  $topid = '0';
203
  }
204
  break;
205
  case 'wppa_file_system':
206
+ if ( wppa_get_option('wppa_file_system') == 'flat' ) update_option( 'wppa_file_system', 'to-tree' );
207
+ if ( wppa_get_option('wppa_file_system') == 'tree' ) update_option( 'wppa_file_system', 'to-flat' );
208
  break;
209
  case 'wppa_cleanup':
210
+ $orphan_album = wppa_get_option( 'wppa_orphan_album', '0' );
211
  $album_exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE id = %s", $orphan_album ) );
212
  if ( ! $album_exists ) $orphan_album = false;
213
  if ( ! $orphan_album ) {
244
  }
245
  break;
246
  case 'wppa_move_all_photos':
247
+ $fromalb = wppa_get_option( 'wppa_move_all_photos_from' );
248
  if ( ! wppa_album_exists( $fromalb ) ) {
249
  echo sprintf(__( 'From album %d does not exist', 'wp-photo-album-plus' ), $fromalb );
250
  wppa_exit();
251
  }
252
+ $toalb = wppa_get_option( 'wppa_move_all_photos_to' );
253
  if ( ! wppa_album_exists( $toalb ) ) {
254
  echo sprintf(__( 'To album %d does not exist', 'wp-photo-album-plus' ), $toalb );
255
  wppa_exit();
392
  case 'wppa_photos_hyphens_to_spaces':
393
  case 'wppa_png_to_jpg':
394
  case 'wppa_fix_mp4_meta':
395
+ case 'wppa_fix_userids':
396
 
397
  // Process photos
398
  $table = WPPA_PHOTOS;
399
 
400
  if ( $slug == 'wppa_cleanup' ) {
401
+ $topid = wppa_get_option( 'wppa_'.WPPA_PHOTOS.'_lastkey', '1' ) * 10;
402
  $photos = array();
403
  for ( $i = ( $lastid + '1'); $i <= $topid; $i++ ) {
404
  $photos[]['id'] = $i;
418
  }
419
 
420
  if ( $slug == 'wppa_edit_tag' ) {
421
+ $edit_tag = wppa_get_option( 'wppa_tag_to_edit' );
422
+ $new_tag = wppa_get_option( 'wppa_new_tag_value' );
423
  }
424
 
425
  if ( ! $photos && $slug == 'wppa_file_system' ) {
426
+ $fs = wppa_get_option( 'wppa_file_system' );
427
  if ( $fs == 'to-tree' ) {
428
  $to = 'tree';
429
  }
563
  break;
564
 
565
  case 'wppa_file_system':
566
+ $fs = wppa_get_option('wppa_file_system');
567
  if ( $fs == 'to-tree' || $fs == 'to-flat' ) {
568
  if ( $fs == 'to-tree' ) {
569
  $from = 'flat';
820
  break;
821
 
822
  case 'wppa_move_all_photos':
823
+ $fromalb = wppa_get_option( 'wppa_move_all_photos_from' );
824
+ $toalb = wppa_get_option( 'wppa_move_all_photos_to' );
825
  $alb = wppa_get_photo_item( $id, 'album' );
826
  if ( $alb == $fromalb ) {
827
  wppa_update_photo( array( 'id' => $id, 'album' => $toalb ) );
848
  wppa_fix_video_framesize( $id, 'maintproc' );
849
  break;
850
 
851
+ case 'wppa_fix_userids':
852
+ $ratings = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_rating WHERE photo = $id", ARRAY_A );
853
+ foreach ( $ratings as $rating ) {
854
+ $username = $rating['user'];
855
+ $userid = $wpdb->get_var( "SELECT ID FROM $wpdb->users WHERE user_login = '$username'" ); // try login name
856
+ if ( ! $userid ) {
857
+ $usrs = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE display_name = '$username'" ); // try display name
858
+ if ( count( $usrs ) == 1 ) {
859
+ $userid = $usrs[0];
860
+ }
861
+ }
862
+ if ( ! $userid ) {
863
+ $userid = -1; // logged out
864
+ }
865
+ // Update
866
+ $rid = $rating['id'];
867
+ $wpdb->query( "UPDATE $wpdb->wppa_rating SET userid = $userid WHERE id = $rid" );
868
+ }
869
+
870
+ $comments = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_comments WHERE photo = $id", ARRAY_A );
871
+ foreach ( $comments as $comment ) {
872
+ $username = $comment['user'];
873
+ $useremail = $comment['email'];
874
+ $userid = $wpdb->get_var( "SELECT ID FROM $wpdb->users WHERE user_login = '$username'" ); // try login name
875
+ if ( ! $userid ) {
876
+ $usrs = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_email = '$useremail'" ); // try email address
877
+ if ( count( $usrs ) == 1 ) {
878
+ $userid = $usrs[0];
879
+ }
880
+ }
881
+ if ( ! $userid ) {
882
+ $usrs = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE display_name = '$username'" ); // try display name
883
+ if ( count( $usrs ) == 1 ) {
884
+ $userid = $usrs[0];
885
+ }
886
+ }
887
+ if ( ! $userid ) {
888
+ $userid = -1; // logged out
889
+ }
890
+ // Update
891
+ $cid = $comment['id'];
892
+ $wpdb->query( "UPDATE $wpdb->wppa_comments SET userid = $userid WHERE id = $cid" );
893
+ }
894
+ break;
895
+
896
  case 'wppa_custom_photo_proc':
897
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
898
  include $file;
969
  $photos = wppa_index_string_to_array( $indexes[$idx]['photos'] );
970
  $cp = is_array( $photos ) ? count( $photos ) : 0;
971
  $pidx = 0;
972
+ $last = wppa_get_option( $slug.'_last_photo', 0 );
973
  delete_option( $slug.'_last_photo' );
974
 
975
  if ( is_array( $photos ) ) foreach( array_keys( $photos ) as $pidx ) {
1192
  }
1193
 
1194
  if ( wppa_is_cron() ) {
1195
+ if ( wppa_get_option( $slug . '_ad_inf' ) == 'yes' ) {
1196
  wppa_schedule_maintenance_proc( $slug );
1197
  }
1198
 
1237
 
1238
  // List the search index table
1239
  case 'wppa_list_index':
1240
+ $start = wppa_get_option( 'wppa_list_index_display_start', '' );
1241
  $total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_index" );
1242
  $indexes = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_index
1243
  WHERE slug >= %s ORDER BY slug LIMIT 1000", $start ), ARRAY_A );
1298
  style="float:left;clear:both;width:100%;overflow:auto;margin-left:-1px;"
1299
  >';
1300
 
1301
+ $rec = wppa_get_option( 'wppa_recursive_log', '' );
1302
  if ( $rec ) {
1303
  $result .= __( 'Recursive log detected', 'wp-photo-album-plus' ) . ': ' .
1304
  $rec . '<br /><br />';
1340
  <th>Date/time</th>
1341
  <th>Status</th>
1342
  <th>User</th>
1343
+ <th>UserId</th>
1344
  <th>Value</th>
1345
  <th>Photo id</th>
1346
  <th></th>
1360
  <td>' . htmlentities( ( $rating['timestamp'] ? wppa_local_date( '', $rating['timestamp'] ) : 'pre-historic' ) ) . '</td>
1361
  <td>' . htmlentities( $rating['status'] ) . '</td>
1362
  <td>' . htmlentities( $rating['user'] ) . '</td>
1363
+ <td>' . htmlentities( $rating['userid'] ) . '</td>
1364
  <td>' . htmlentities( $rating['value'] ) . '</td>
1365
  <td>' . htmlentities( $rating['photo'] ) . '</td>
1366
  <td style="width:250px; text-align:center;"><img src="' . esc_url( wppa_get_thumb_url( $rating['photo'] ) ) . '"
1416
  <tr>
1417
  <td>'.$session['id'].'</td>
1418
  <td>' . htmlentities( strlen( $session['ip'] ) > 15 ? substr( $session['ip'], 0, 12 ) . '...' : $session['ip'] ) . '</td>
1419
+ <td style="width:150px;" >'.wppa_local_date(wppa_get_option('date_format', "F j, Y,").' '.wppa_get_option('time_format', "g:i a"), $session['timestamp']).'</td>
1420
  <td>' . htmlentities( $session['count'] ) . '</td>
1421
  <td>' . htmlentities( $session['status'] ) . '</td>
1422
  <td style="border-bottom:1px solid gray;" >';
1490
  <th>Date/time</th>
1491
  <th>Status</th>
1492
  <th>User</th>
1493
+ <th>UserId</th>
1494
  <th>Email</th>
1495
  <th>Photo id</th>
1496
  <th></th>
1509
  <td>' . htmlentities( $comment['timestamp'] ? wppa_local_date( '', $comment['timestamp'] ) : 'pre-historic' ) . '</td>
1510
  <td>' . htmlentities( $comment['status'] ) . '</td>
1511
  <td>' . htmlentities( $comment['user'] ) . '</td>
1512
+ <td>' . htmlentities( $comment['userid'] ) . '</td>
1513
  <td>' . htmlentities( $comment['email'] ) . '</td>
1514
  <td>' . htmlentities( $comment['photo'] ) . '</td>
1515
  <td style="width:250px; text-align:center;" >
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 7.2.16
7
  *
8
  */
9
 
@@ -26,17 +26,17 @@ global $wppa_api_version;
26
  if ( wppa_switch( 'use_custom_style_file' ) ) {
27
 
28
  // In child theme?
29
- $userstyle = get_theme_root() . '/' . get_option('stylesheet') . '/wppa-style.css';
30
  if ( is_file($userstyle) ) {
31
- wp_register_style('wppa_style', get_theme_root_uri() . '/' . get_option('stylesheet') . '/wppa-style.css', array(), $wppa_api_version);
32
  wp_enqueue_style('wppa_style');
33
  return;
34
  }
35
 
36
  // In theme?
37
- $userstyle = get_theme_root() . '/' . get_option('template') . '/wppa-style.css';
38
  if ( is_file($userstyle) ) {
39
- wp_register_style('wppa_style', get_theme_root_uri() . '/' . get_option('template') . '/wppa-style.css', array(), $wppa_api_version);
40
  wp_enqueue_style('wppa_style');
41
  return;
42
  }
@@ -50,10 +50,10 @@ global $wppa_api_version;
50
  if ( ! wppa_switch( 'inline_css' ) ) {
51
  if ( ! file_exists( WPPA_PATH.'/dynamic/wppa-dynamic.css' ) ) {
52
  wppa_create_wppa_dynamic_css();
53
- update_option( 'wppa_dynamic_css_version', get_option( 'wppa_dynamic_css_version', '0' ) + '1' );
54
  }
55
  if ( file_exists( WPPA_PATH.'/dynamic/wppa-dynamic.css' ) ) {
56
- wp_enqueue_style( 'wppa-dynamic', WPPA_URL.'/dynamic/wppa-dynamic.css', array('wppa_style'), get_option( 'wppa_dynamic_css_version' ) );
57
  }
58
  }
59
  }
@@ -380,10 +380,10 @@ global $wppa_opt;
380
  // wppa-init
381
  if ( ! file_exists( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
382
  wppa_create_wppa_init_js();
383
- update_option( 'wppa_ini_js_version_'.$wppa_lang, get_option( 'wppa_ini_js_version_'.$wppa_lang, '0' ) + '1' );
384
  }
385
  if ( file_exists( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
386
- wp_enqueue_script( 'wppa-init', WPPA_URL.'/dynamic/wppa-init.'.$wppa_lang.'.js', array( 'wppa' ), get_option( 'wppa_ini_js_version_'.$wppa_lang, $footer ) );
387
  }
388
 
389
  // wppa-pagedata
@@ -412,7 +412,7 @@ function wppa_load_theme() {
412
  // Are we allowed to look in theme?
413
  if ( wppa_switch( 'use_custom_theme_file' ) ) {
414
 
415
- $usertheme = get_theme_root() . '/' . get_option( 'template' ) . '/wppa-theme.php';
416
  if ( is_file( $usertheme ) ) {
417
  require_once $usertheme;
418
  return;
@@ -606,7 +606,7 @@ global $wppa_session;
606
 
607
  // Debugging, show active plugins
608
  if ( wppa( 'debug' ) ) {
609
- $plugins = get_option('active_plugins');
610
  wppa_dbg_msg('Active Plugins');
611
  foreach ( $plugins as $plugin ) {
612
  wppa_dbg_msg($plugin);
@@ -693,15 +693,15 @@ function wppa_redirect() {
693
  if ( $wppapos === false ) {
694
 
695
  $wppapos = strpos( $uri, '/-/' );
696
- if ( get_option( 'wppa_use_pretty_links' ) != 'compressed' ) {
697
  $wppapos = false;
698
  }
699
  }
700
 
701
- if ( $wppapos !== false && get_option( 'permalink_structure' ) ) {
702
 
703
  // old style solution, still required when qTranslate is active
704
- $plugins = implode( ',', get_option( 'active_plugins' ) );
705
  if ( stripos( $plugins, 'qtranslate' ) !== false ) {
706
 
707
  $newuri = wppa_convert_from_pretty( $uri );
@@ -1012,8 +1012,7 @@ wppaResponseSpeed = ' . wppa_opt( 'response_speed' ) . ';
1012
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
1013
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1014
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1015
- wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';
1016
- ';
1017
 
1018
  // Thumbnail aspect (for real calendar)
1019
  $aspect = 1;
@@ -1028,8 +1027,8 @@ wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : '
1028
  else {
1029
  $aspect = wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' );
1030
  }
1031
- $content .= 'wppaThumbAspect = ' . $aspect . ';
1032
- ';
1033
 
1034
  // Open file
1035
  $file = wppa_fopen( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js', 'wb' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 7.3.00
7
  *
8
  */
9
 
26
  if ( wppa_switch( 'use_custom_style_file' ) ) {
27
 
28
  // In child theme?
29
+ $userstyle = get_theme_root() . '/' . wppa_get_option('stylesheet') . '/wppa-style.css';
30
  if ( is_file($userstyle) ) {
31
+ wp_register_style('wppa_style', get_theme_root_uri() . '/' . wppa_get_option('stylesheet') . '/wppa-style.css', array(), $wppa_api_version);
32
  wp_enqueue_style('wppa_style');
33
  return;
34
  }
35
 
36
  // In theme?
37
+ $userstyle = get_theme_root() . '/' . wppa_get_option('template') . '/wppa-style.css';
38
  if ( is_file($userstyle) ) {
39
+ wp_register_style('wppa_style', get_theme_root_uri() . '/' . wppa_get_option('template') . '/wppa-style.css', array(), $wppa_api_version);
40
  wp_enqueue_style('wppa_style');
41
  return;
42
  }
50
  if ( ! wppa_switch( 'inline_css' ) ) {
51
  if ( ! file_exists( WPPA_PATH.'/dynamic/wppa-dynamic.css' ) ) {
52
  wppa_create_wppa_dynamic_css();
53
+ update_option( 'wppa_dynamic_css_version', wppa_get_option( 'wppa_dynamic_css_version', '0' ) + '1' );
54
  }
55
  if ( file_exists( WPPA_PATH.'/dynamic/wppa-dynamic.css' ) ) {
56
+ wp_enqueue_style( 'wppa-dynamic', WPPA_URL.'/dynamic/wppa-dynamic.css', array('wppa_style'), wppa_get_option( 'wppa_dynamic_css_version' ) );
57
  }
58
  }
59
  }
380
  // wppa-init
381
  if ( ! file_exists( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
382
  wppa_create_wppa_init_js();
383
+ update_option( 'wppa_ini_js_version_'.$wppa_lang, wppa_get_option( 'wppa_ini_js_version_'.$wppa_lang, '0' ) + '1' );
384
  }
385
  if ( file_exists( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
386
+ wp_enqueue_script( 'wppa-init', WPPA_URL.'/dynamic/wppa-init.'.$wppa_lang.'.js', array( 'wppa' ), wppa_get_option( 'wppa_ini_js_version_'.$wppa_lang, $footer ) );
387
  }
388
 
389
  // wppa-pagedata
412
  // Are we allowed to look in theme?
413
  if ( wppa_switch( 'use_custom_theme_file' ) ) {
414
 
415
+ $usertheme = get_theme_root() . '/' . wppa_get_option( 'template' ) . '/wppa-theme.php';
416
  if ( is_file( $usertheme ) ) {
417
  require_once $usertheme;
418
  return;
606
 
607
  // Debugging, show active plugins
608
  if ( wppa( 'debug' ) ) {
609
+ $plugins = wppa_get_option('active_plugins');
610
  wppa_dbg_msg('Active Plugins');
611
  foreach ( $plugins as $plugin ) {
612
  wppa_dbg_msg($plugin);
693
  if ( $wppapos === false ) {
694
 
695
  $wppapos = strpos( $uri, '/-/' );
696
+ if ( wppa_get_option( 'wppa_use_pretty_links' ) != 'compressed' ) {
697
  $wppapos = false;
698
  }
699
  }
700
 
701
+ if ( $wppapos !== false && wppa_get_option( 'permalink_structure' ) ) {
702
 
703
  // old style solution, still required when qTranslate is active
704
+ $plugins = implode( ',', wppa_get_option( 'active_plugins' ) );
705
  if ( stripos( $plugins, 'qtranslate' ) !== false ) {
706
 
707
  $newuri = wppa_convert_from_pretty( $uri );
1012
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
1013
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1014
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1015
+ wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';';
 
1016
 
1017
  // Thumbnail aspect (for real calendar)
1018
  $aspect = 1;
1027
  else {
1028
  $aspect = wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' );
1029
  }
1030
+ $content .= '
1031
+ wppaThumbAspect = ' . $aspect . ';';
1032
 
1033
  // Open file
1034
  $file = wppa_fopen( WPPA_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js', 'wb' );
wppa-potd-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  * admin photo of the day widget
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -11,7 +11,7 @@ function _wppa_sidebar_page_options() {
11
  global $wpdb;
12
  global $wppa_defaults;
13
 
14
- wppa_set_defaults();
15
 
16
  $onch = 'myReload()';
17
 
@@ -182,7 +182,7 @@ global $wppa_defaults;
182
  $name = __( 'Albums to use:', 'wp-photo-album-plus' );
183
  $desc = __( 'Select the albums to use for the photo of the day.', 'wp-photo-album-plus' );
184
  $slug = 'wppa_potd_album';
185
- if ( get_option( 'wppa_potd_album_type' ) == 'physical' ) {
186
  $html = '<select
187
  id="wppa_potd_album"
188
  name="wppa_potd_album"
@@ -194,7 +194,7 @@ global $wppa_defaults;
194
  >' .
195
  wppa_album_select_a( array ( 'path' => true,
196
  'optionclass' => 'potd_album',
197
- 'selected' => get_option( 'wppa_potd_album' ),
198
  ) ) . '
199
  </select>
200
  <img
@@ -221,7 +221,7 @@ global $wppa_defaults;
221
  wppa_potd_setting( $slug, '9', $name, $desc, $html );
222
  }
223
 
224
- if ( get_option( 'wppa_potd_album_type' ) == 'physical' ) {
225
  $name = __( 'Include (grand)children:', 'wp-photo-album-plus' );
226
  $desc = __( 'Include the photos of all sub albums?', 'wp-photo-album-plus' );
227
  $slug = 'wppa_potd_include_subs';
@@ -273,7 +273,7 @@ global $wppa_defaults;
273
  $html = wppa_potd_select( $slug, $opts, $vals, $onch );
274
  wppa_potd_setting( $slug, '11', $name, $desc, $html );
275
 
276
- if ( get_option( 'wppa_potd_method' ) == '4' ) { // Change every
277
  $name = __( 'Change every period:', 'wp-photo-album-plus' );
278
  $desc = __( 'The time period a certain photo is used.', 'wp-photo-album-plus' );
279
  $slug = 'wppa_potd_period';
@@ -300,7 +300,7 @@ global $wppa_defaults;
300
  $html = wppa_potd_select( $slug, $opts, $vals, $onch );
301
  wppa_potd_setting( $slug, '11a', $name, $desc, $html );
302
 
303
- $wppa_widget_period = get_option( 'wppa_potd_period' );
304
  if ( substr( $wppa_widget_period, 0, 7 ) == 'day-of-' ) {
305
  switch( substr( $wppa_widget_period, 7 ) ) {
306
  case 'week':
@@ -320,11 +320,11 @@ global $wppa_defaults;
320
  $date_key = '';
321
  break;
322
  }
323
- while ( get_option( 'wppa_potd_offset', '0' ) > $n_days ) {
324
- update_option( 'wppa_potd_offset', get_option( 'wppa_potd_offset') - $n_days );
325
  }
326
- while ( get_option( 'wppa_potd_offset', '0' ) < '0' ) {
327
- update_option( 'wppa_potd_offset', get_option( 'wppa_potd_offset') + $n_days );
328
  }
329
 
330
  $name = __( 'Day offset:', 'wp-photo-album-plus' );
@@ -342,7 +342,7 @@ global $wppa_defaults;
342
  '</span> ' .
343
  wppa_potd_select( $slug, $opts, $vals, $onch );
344
 
345
- $photo_order = wppa_local_date( $date_key ) - get_option( 'wppa_potd_offset', '0' );
346
  while ( $photo_order < '0' ) {
347
  $photo_order += $n_days;
348
  }
@@ -518,7 +518,7 @@ global $wppa_defaults;
518
  (#' . strval( intval( $photo['p_order'] ) ) . ')
519
  </div>';
520
 
521
- if ( get_option( 'wppa_potd_method' ) == '1' ) { // Only if fixed photo
522
  echo '
523
  <input
524
  style="float:right;"
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  * admin photo of the day widget
6
+ * Version 7.3.00
7
  *
8
  */
9
 
11
  global $wpdb;
12
  global $wppa_defaults;
13
 
14
+ // wppa_set_defaults();
15
 
16
  $onch = 'myReload()';
17
 
182
  $name = __( 'Albums to use:', 'wp-photo-album-plus' );
183
  $desc = __( 'Select the albums to use for the photo of the day.', 'wp-photo-album-plus' );
184
  $slug = 'wppa_potd_album';
185
+ if ( wppa_get_option( 'wppa_potd_album_type' ) == 'physical' ) {
186
  $html = '<select
187
  id="wppa_potd_album"
188
  name="wppa_potd_album"
194
  >' .
195
  wppa_album_select_a( array ( 'path' => true,
196
  'optionclass' => 'potd_album',
197
+ 'selected' => wppa_get_option( 'wppa_potd_album' ),
198
  ) ) . '
199
  </select>
200
  <img
221
  wppa_potd_setting( $slug, '9', $name, $desc, $html );
222
  }
223
 
224
+ if ( wppa_get_option( 'wppa_potd_album_type' ) == 'physical' ) {
225
  $name = __( 'Include (grand)children:', 'wp-photo-album-plus' );
226
  $desc = __( 'Include the photos of all sub albums?', 'wp-photo-album-plus' );
227
  $slug = 'wppa_potd_include_subs';
273
  $html = wppa_potd_select( $slug, $opts, $vals, $onch );
274
  wppa_potd_setting( $slug, '11', $name, $desc, $html );
275
 
276
+ if ( wppa_get_option( 'wppa_potd_method' ) == '4' ) { // Change every
277
  $name = __( 'Change every period:', 'wp-photo-album-plus' );
278
  $desc = __( 'The time period a certain photo is used.', 'wp-photo-album-plus' );
279
  $slug = 'wppa_potd_period';
300
  $html = wppa_potd_select( $slug, $opts, $vals, $onch );
301
  wppa_potd_setting( $slug, '11a', $name, $desc, $html );
302
 
303
+ $wppa_widget_period = wppa_get_option( 'wppa_potd_period' );
304
  if ( substr( $wppa_widget_period, 0, 7 ) == 'day-of-' ) {
305
  switch( substr( $wppa_widget_period, 7 ) ) {
306
  case 'week':
320
  $date_key = '';
321
  break;
322
  }
323
+ while ( wppa_get_option( 'wppa_potd_offset', '0' ) > $n_days ) {
324
+ update_option( 'wppa_potd_offset', wppa_get_option( 'wppa_potd_offset') - $n_days );
325
  }
326
+ while ( wppa_get_option( 'wppa_potd_offset', '0' ) < '0' ) {
327
+ update_option( 'wppa_potd_offset', wppa_get_option( 'wppa_potd_offset') + $n_days );
328
  }
329
 
330
  $name = __( 'Day offset:', 'wp-photo-album-plus' );
342
  '</span> ' .
343
  wppa_potd_select( $slug, $opts, $vals, $onch );
344
 
345
+ $photo_order = wppa_local_date( $date_key ) - wppa_get_option( 'wppa_potd_offset', '0' );
346
  while ( $photo_order < '0' ) {
347
  $photo_order += $n_days;
348
  }
518
  (#' . strval( intval( $photo['p_order'] ) ) . ')
519
  </div>';
520
 
521
+ if ( wppa_get_option( 'wppa_potd_method' ) == '1' ) { // Only if fixed photo
522
  echo '
523
  <input
524
  style="float:right;"
wppa-privacy-policy.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all procedures related to the privacy policy.
6
  *
7
- * Version 7.2.13
8
  */
9
 
10
  function wppa_comment_exporter( $email_address, $page = 1 ) {
@@ -246,7 +246,7 @@ global $wpdb;
246
  "LIMIT %d,%d", $owner, ( $page - 1 ) * $number, $number
247
  ), ARRAY_A );
248
 
249
- $media_export_ids = get_option( 'wppa-media-export-ids', array() );
250
 
251
  foreach ( (array) $media_items as $media_item ) {
252
 
@@ -456,7 +456,7 @@ add_action(
456
 
457
  function wppa_add_media_to_zip( $archive_pathname, $archive_url, $html_report_pathname, $request_id ) {
458
 
459
- $ids = get_option( 'wppa-media-export-ids', array() );
460
 
461
  if ( ! is_array( $ids ) || count( $ids ) == 0 ) {
462
  return;
4
  *
5
  * This file contains all procedures related to the privacy policy.
6
  *
7
+ * Version 7.3.00
8
  */
9
 
10
  function wppa_comment_exporter( $email_address, $page = 1 ) {
246
  "LIMIT %d,%d", $owner, ( $page - 1 ) * $number, $number
247
  ), ARRAY_A );
248
 
249
+ $media_export_ids = wppa_get_option( 'wppa-media-export-ids', array() );
250
 
251
  foreach ( (array) $media_items as $media_item ) {
252
 
456
 
457
  function wppa_add_media_to_zip( $archive_pathname, $archive_url, $html_report_pathname, $request_id ) {
458
 
459
+ $ids = wppa_get_option( 'wppa-media-export-ids', array() );
460
 
461
  if ( ! is_array( $ids ) || count( $ids ) == 0 ) {
462
  return;
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.2.16
7
  *
8
  */
9
 
@@ -38,7 +38,7 @@ global $wppa_supported_camara_brands;
38
  wppa_re_animate_cron();
39
 
40
  // Make sure translatable defaults are translated
41
- wppa_set_defaults();
42
 
43
  // If watermark all is going to be run, make sure the current user has no private overrule settings
44
  delete_option( 'wppa_watermark_file_'.wppa_get_user() );
@@ -339,7 +339,7 @@ global $wppa_supported_camara_brands;
339
  <?php
340
  if ( current_user_can( 'administrator' ) ) {
341
  echo ' ' .
342
- __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . get_option( 'wppa_revision', '100') . '. ' .
343
  __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
344
  // __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
345
  __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ';
@@ -369,7 +369,7 @@ global $wppa_supported_camara_brands;
369
  'simple-lightbox/main.php',
370
  'amp/amp.php',
371
  );
372
- $plugins = get_option('active_plugins');
373
  $matches = array_intersect($blacklist_plugins, $plugins);
374
  foreach ( $matches as $bad ) {
375
  wppa_error_message(__('Please de-activate plugin <i style="font-size:14px;">', 'wp-photo-album-plus').substr($bad, 0, strpos($bad, '/')).__('. </i>This plugin will cause wppa+ to function not properly.', 'wp-photo-album-plus'));
@@ -395,13 +395,13 @@ global $wppa_supported_camara_brands;
395
  }
396
 
397
  // Check for pending actions
398
- if ( get_option( 'wppa_remove_empty_albums_status' ) && get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Remove empty albums needs completion. See Table VIII', 'wp-photo-album-plus') );
399
- if ( get_option( 'wppa_apply_new_photodesc_all_status' ) && get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Applying new photo description needs completion. See Table VIII', 'wp-photo-album-plus') );
400
- if ( get_option( 'wppa_append_to_photodesc_status' ) && get_option( 'wppa_append_to_photodesc_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Appending to photo description needs completion. See Table VIII' , 'wp-photo-album-plus') );
401
- if ( get_option( 'wppa_remove_from_photodesc_status' ) && get_option( 'wppa_remove_from_photodesc_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Removing from photo description needs completion. See Table VIII' , 'wp-photo-album-plus') );
402
- if ( get_option( 'wppa_remove_file_extensions_status' ) && get_option( 'wppa_remove_file_extensions_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Removing file extensions needs completion. See Table VIII' , 'wp-photo-album-plus') );
403
- if ( get_option( 'wppa_regen_thumbs_status' ) && get_option( 'wppa_regen_thumbs_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Regenerating the Thumbnails needs completion. See Table VIII' , 'wp-photo-album-plus') );
404
- if ( get_option( 'wppa_rerate_status' ) && get_option( 'wppa_rerate_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rerating needs completion. See Table VIII' , 'wp-photo-album-plus') );
405
 
406
  // Check for inconsistencies
407
  if ( ( wppa_opt( 'thumbtype' ) == 'default' ) && (
@@ -538,7 +538,7 @@ global $wppa_supported_camara_brands;
538
  </div>
539
  <input type="hidden" name="wppa-key" id="wppa-key" value="" />
540
  <input type="hidden" name="wppa-sub" id="wppa-sub" value="" />
541
- <?php if ( get_option('wppa_i_done') == 'done' ) { ?>
542
  <a class="-wppa-quick" onclick="jQuery('.wppa-quick').css('display','inline');jQuery('.-wppa-quick').css('display','none')" ><?php _e('Quick setup', 'wp-photo-album-plus') ?></a>
543
  <?php } else { ?>
544
  <input type="button" id="wppa-quick" style="background-color:yellow;" class="-wppa-quick" onclick="jQuery('.wppa-quick').css('display','inline');jQuery('.-wppa-quick').css('display','none')" value="<?php _e('Do a quick initial setup', 'wp-photo-album-plus') ?>" />
@@ -559,7 +559,7 @@ global $wppa_supported_camara_brands;
559
  />
560
 
561
  <?php
562
- if ( get_option( 'wppa_prevrev' ) == '100' && get_option('wppa_i_done') != 'done' ) {
563
  ?>
564
  <script type="text/javascript" >
565
  var wppaButtonColor = '#7F7';
@@ -2049,7 +2049,7 @@ global $wppa_supported_camara_brands;
2049
  $clas = '';
2050
  $tags = 'slide,navi';
2051
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
2052
-
2053
  $name = __('Start/stop on Filmonly');
2054
  $desc = __('Show the Start/Stop slideshow bar on filmonly displays.', 'wp-photo-album-plus');
2055
  $help = '';
@@ -3183,7 +3183,7 @@ global $wppa_supported_camara_brands;
3183
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3184
  $help = '';
3185
  $slug = 'wppa_up_tagselbox_title_1';
3186
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3187
  $clas = 'wppa_feup wppa_up_tags';
3188
  $tags = 'upload';
3189
  wppa_setting($slug, '11.1c', $name, $desc, $html, $help, $clas, $tags);
@@ -3192,7 +3192,7 @@ global $wppa_supported_camara_brands;
3192
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3193
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3194
  $slug = 'wppa_up_tagselbox_content_1';
3195
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3196
  $clas = 'wppa_feup wppa_up_tags';
3197
  $tags = 'upload';
3198
  wppa_setting($slug, '11.1d', $name, $desc, $html, $help, $clas, $tags);
@@ -3211,7 +3211,7 @@ global $wppa_supported_camara_brands;
3211
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3212
  $help = '';
3213
  $slug = 'wppa_up_tagselbox_title_2';
3214
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3215
  $clas = 'wppa_feup wppa_up_tags';
3216
  $tags = 'upload';
3217
  wppa_setting($slug, '11.2c', $name, $desc, $html, $help, $clas, $tags);
@@ -3220,7 +3220,7 @@ global $wppa_supported_camara_brands;
3220
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3221
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3222
  $slug = 'wppa_up_tagselbox_content_2';
3223
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3224
  $clas = 'wppa_feup wppa_up_tags';
3225
  $tags = 'upload';
3226
  wppa_setting($slug, '11.2d', $name, $desc, $html, $help, $clas, $tags);
@@ -3239,7 +3239,7 @@ global $wppa_supported_camara_brands;
3239
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3240
  $help = '';
3241
  $slug = 'wppa_up_tagselbox_title_3';
3242
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3243
  $clas = 'wppa_feup wppa_up_tags';
3244
  $tags = 'upload';
3245
  wppa_setting($slug, '11.3c', $name, $desc, $html, $help, $clas, $tags);
@@ -3248,7 +3248,7 @@ global $wppa_supported_camara_brands;
3248
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3249
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3250
  $slug = 'wppa_up_tagselbox_content_3';
3251
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3252
  $clas = 'wppa_feup wppa_up_tags';
3253
  $tags = 'upload';
3254
  wppa_setting($slug, '11.3d', $name, $desc, $html, $help, $clas, $tags);
@@ -3266,7 +3266,7 @@ global $wppa_supported_camara_brands;
3266
  $desc = __('The caption above the tags input field.', 'wp-photo-album-plus');
3267
  $help = '';
3268
  $slug = 'wppa_up_tag_input_title';
3269
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3270
  $clas = 'wppa_feup wppa_up_tags';
3271
  $tags = 'upload';
3272
  wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
@@ -3275,7 +3275,7 @@ global $wppa_supported_camara_brands;
3275
  $desc = __('The tags in the New tags input box.', 'wp-photo-album-plus');
3276
  $help = '';
3277
  $slug = 'wppa_up_tagbox_new';
3278
- $html = wppa_edit( $slug, get_option( $slug ), '300px' );
3279
  $clas = 'wppa_feup wppa_up_tags';
3280
  $tags = 'upload';
3281
  wppa_setting($slug, '13.1', $name, $desc, $html, $help, $clas, $tags);
@@ -4432,7 +4432,6 @@ global $wppa_supported_camara_brands;
4432
  $name = __('V align', 'wp-photo-album-plus');
4433
  $desc = __('Vertical alignment of slideshow images.', 'wp-photo-album-plus');
4434
  $help = (__('Specify the vertical alignment of slideshow images.', 'wp-photo-album-plus'));
4435
- $help .= '<br />'.(__('If you select --- none ---, the photos will not be centered horizontally either.', 'wp-photo-album-plus'));
4436
  $slug = 'wppa_fullvalign';
4437
  $options = array(__('--- none ---', 'wp-photo-album-plus'), __('top', 'wp-photo-album-plus'), __('center', 'wp-photo-album-plus'), __('bottom', 'wp-photo-album-plus'), __('fit', 'wp-photo-album-plus'));
4438
  $values = array('default', 'top', 'center', 'bottom', 'fit');
@@ -4442,6 +4441,18 @@ global $wppa_supported_camara_brands;
4442
  $tags = 'slide,layout';
4443
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
4444
 
 
 
 
 
 
 
 
 
 
 
 
 
4445
  $name = __('H align', 'wp-photo-album-plus');
4446
  $desc = __('Horizontal alignment of slideshow images.', 'wp-photo-album-plus');
4447
  $help = (__('Specify the horizontal alignment of slideshow images. If you specify --- none --- , no horizontal alignment will take place.', 'wp-photo-album-plus'));
@@ -4643,6 +4654,15 @@ global $wppa_supported_camara_brands;
4643
  $clas = '';
4644
  $tags = 'slide,system';
4645
  wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
4646
 
4647
  }
4648
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
@@ -7007,8 +7027,8 @@ global $wppa_supported_camara_brands;
7007
  unset ( $roles['administrator'] );
7008
  foreach (array_keys($roles) as $role) {
7009
  $t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
7010
- if ( get_option('wppa_'.$role.'_upload_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_count', '0');
7011
- if ( get_option('wppa_'.$role.'_upload_limit_time', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_time', '0');
7012
  $name = sprintf(__('Upload limit %s', 'wp-photo-album-plus'), $t_role);
7013
  if ( $role == 'loggedout' ) $desc = __('Limit upload capacity for logged out users.', 'wp-photo-album-plus');
7014
  else $desc = sprintf(__('Limit upload capacity for the user role %s.', 'wp-photo-album-plus'), $t_role);
@@ -7027,7 +7047,7 @@ global $wppa_supported_camara_brands;
7027
 
7028
  foreach (array_keys($roles) as $role) {
7029
  $t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
7030
- if ( get_option('wppa_'.$role.'_album_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_album_limit_count', '0');
7031
  $name = sprintf(__('Album limit %s', 'wp-photo-album-plus'), $t_role);
7032
  if ( $role == 'loggedout' ) $desc = __('Limit number of albums for logged out users.', 'wp-photo-album-plus');
7033
  else $desc = sprintf(__('Limit number of albums for the user role %s.', 'wp-photo-album-plus'), $t_role);
@@ -7346,7 +7366,7 @@ global $wppa_supported_camara_brands;
7346
  $desc = __('The text on the Edit button.', 'wp-photo-album-plus');
7347
  $help = '';
7348
  $slug = 'wppa_fe_edit_button';
7349
- $html1 = wppa_edit($slug, get_option( $slug ), '300px');
7350
  $html2 = '';
7351
  $html = array( $html1, $html2 );
7352
  $clas= '';
@@ -7357,7 +7377,7 @@ global $wppa_supported_camara_brands;
7357
  $desc = __('The text on the header of the popup.', 'wp-photo-album-plus');
7358
  $help = '';
7359
  $slug = 'wppa_fe_edit_caption';
7360
- $html1 = wppa_edit($slug, get_option( $slug ), '300px');
7361
  $html2 = '';
7362
  $html = array( $html1, $html2 );
7363
  $clas= '';
@@ -7484,7 +7504,7 @@ global $wppa_supported_camara_brands;
7484
  $desc = __('Set the status of all the users photos to \'pending\'.', 'wp-photo-album-plus');
7485
  $help = (__('Also inhibits further uploads.', 'wp-photo-album-plus'));
7486
  $slug = 'wppa_blacklist_user';
7487
- $blacklist = get_option( 'wppa_black_listed_users', array() );
7488
 
7489
  if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
7490
  $users = wppa_get_users();
@@ -7516,7 +7536,7 @@ global $wppa_supported_camara_brands;
7516
  $desc = __('Set the status of all the users photos to \'publish\'.', 'wp-photo-album-plus');
7517
  $help = '';
7518
  $slug = 'wppa_un_blacklist_user';
7519
- $blacklist = get_option( 'wppa_black_listed_users', array() );
7520
  $options = array( __('--- select a user to unblacklist ---', 'wp-photo-album-plus') );
7521
  $values = array( '0' );
7522
  foreach ( $blacklist as $usr ) {
@@ -7548,7 +7568,7 @@ global $wppa_supported_camara_brands;
7548
  $help = (__('This gives the user all the administrator privileges within wppa.', 'wp-photo-album-plus'));
7549
  $help .= '<br />'.(__('Make sure the user also has a role that has all the boxes ticked in Table VII-A', 'wp-photo-album-plus'));
7550
  $slug = 'wppa_superuser_user';
7551
- $superlist = get_option( 'wppa_super_users', array() );
7552
 
7553
  if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
7554
  $users = wppa_get_users();
@@ -7580,7 +7600,7 @@ global $wppa_supported_camara_brands;
7580
  $desc = __('Remove user from super user list.', 'wp-photo-album-plus');
7581
  $help = '';
7582
  $slug = 'wppa_un_superuser_user';
7583
- $superlist = get_option( 'wppa_super_users', array() );
7584
  $options = array( __('--- select a user to unmake superuser ---', 'wp-photo-album-plus') );
7585
  $values = array( '0' );
7586
  foreach ( $superlist as $usr ) {
@@ -7819,7 +7839,7 @@ global $wppa_supported_camara_brands;
7819
  $tags = 'system';
7820
  wppa_setting(false, '8.3', $name, $desc, $html, $help, $clas, $tags);
7821
 
7822
- $fs = get_option('wppa_file_system');
7823
  if ( ! $fs ) { // Fix for wp delete_option bug
7824
  $fs = 'flat';
7825
  wppa_update_option('wppa_file_system', 'flat');
@@ -8243,7 +8263,7 @@ global $wppa_supported_camara_brands;
8243
  $vals[] = $tag;
8244
  }
8245
  $html1 = '<div><small style="float:left;margin-right:5px;" >'.__('Tag:', 'wp-photo-album-plus').'</small>'.wppa_select( $slug1, $opts, $vals ).'</div>';
8246
- $html2 = '<div style="clear:both" ><small style="float:left;margin-right:5px;" >'.__('Change to:', 'wp-photo-album-plus').'</small>'.wppa_edit( $slug2, trim( get_option( $slug2 ), ',' ), '100px' ).'</div>';
8247
  $html3 = wppa_maintenance_button( $slug3 );
8248
  $html4 = wppa_status_field( $slug3 );
8249
  $html5 = wppa_togo_field( $slug3 );
@@ -8355,7 +8375,7 @@ global $wppa_supported_camara_brands;
8355
  ' >'.
8356
  wppa_album_select_a(array( 'addpleaseselect'=>true,
8357
  'path'=>true,
8358
- 'selected'=>get_option('wppa_move_all_photos_from')
8359
  )).
8360
  '</select>' .
8361
  '<img' .
@@ -8382,7 +8402,7 @@ global $wppa_supported_camara_brands;
8382
  ' >'.
8383
  wppa_album_select_a(array( 'addpleaseselect'=>true,
8384
  'path'=>true,
8385
- 'selected'=>get_option('wppa_move_all_photos_to')
8386
  )).
8387
  '</select>' .
8388
  '<img' .
@@ -8414,6 +8434,7 @@ global $wppa_supported_camara_brands;
8414
 
8415
  $name = __('PNG to JPG', 'wp-photo-album-plus');
8416
  $desc = __('Convert all .png files to .jpg files', 'wp-photo-album-plus');
 
8417
  $slug2 = 'wppa_png_to_jpg';
8418
  $html1 = '';
8419
  $html2 = wppa_maintenance_button( $slug2 );
@@ -8426,6 +8447,7 @@ global $wppa_supported_camara_brands;
8426
 
8427
  $name = __('Fix mp4 meta data', 'wp-photo-album-plus');
8428
  $desc = __('Import framesize, creationdate and duration from mp4 video files', 'wp-photo-album-plus');
 
8429
  $slug2 = 'wppa_fix_mp4_meta';
8430
  $html1 = '';
8431
  $html2 = wppa_maintenance_button( $slug2 );
@@ -8436,6 +8458,19 @@ global $wppa_supported_camara_brands;
8436
  $tags = 'system,video';
8437
  wppa_setting(false, '22', $name, $desc, $html, $help, $clas, $tags);
8438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8439
  if ( current_user_can( 'administrator' ) ) {
8440
  $name = __('Custom album proc', 'wp-photo-album-plus');
8441
  $desc = __('The php code to execute on all albums', 'wp-photo-album-plus');
@@ -10520,7 +10555,7 @@ global $wppa_supported_camara_brands;
10520
  wppa_setting($slug, '1.3', $name, $desc, $html, $help, $clas, $tags);
10521
 
10522
  $name = __('QR cache', 'wp-photo-album-plus');
10523
- $desc = __('Enable caching QR codes', 'wp-photo-album-plus') . ' ' . sprintf( __('So far %d cache hits, %d miss', 'wp-photo-album-plus'), get_option('wppa_qr_cache_hits', '0'), get_option('wppa_qr_cache_miss', '0'));
10524
  $help = __('Enable this to avoid DoS on heavy loads on the qrserver', 'wp-photo-album-plus'); $slug = 'wppa_qr_cache';
10525
  $html = wppa_checkbox($slug);
10526
  $clas = '';
@@ -10934,7 +10969,7 @@ global $wppa_supported_camara_brands;
10934
  $desc = __('Enable mailing users when a new album is created', 'wp-photo-album-plus');
10935
  $help = '';
10936
  $slug = 'wppa_newalbumnotify';
10937
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_newalbumnotify', '' ) ) );
10938
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
10939
  $clas = '';
10940
  $tags = 'mail,album';
@@ -10944,7 +10979,7 @@ global $wppa_supported_camara_brands;
10944
  $desc = __('Enable mailing users when a frontend upload has been done', 'wp-photo-album-plus');
10945
  $help = (__('When moderation is required, the mails will be sent after approval', 'wp-photo-album-plus'));
10946
  $slug = 'wppa_feuploadnotify';
10947
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_feuploadnotify', '' ) ) );
10948
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
10949
  $clas = '';
10950
  $tags = 'upload,mail';
@@ -10967,7 +11002,7 @@ global $wppa_supported_camara_brands;
10967
  $help .= '<br />' . __('All subscribers will get the email, unless you tick the \'to owner and admin only\' box', 'wp-photo-album-plus');
10968
  $slug1 = 'wppa_commentnotify';
10969
  $slug2 = 'wppa_commentnotify_limit';
10970
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_commentnotify', '' ) ) );
10971
  $html = wppa_checkbox($slug1) . '<span style="float:left" >&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs ) . '&nbsp;</span>' .
10972
  wppa_checkbox($slug2) . '<span style="float:left" >&nbsp;' . __( 'to owner and admin only', 'wp-photo-album-plus' ) . '</span>';
10973
  $clas = '';
@@ -11009,7 +11044,7 @@ global $wppa_supported_camara_brands;
11009
  $desc = __('Notify users who have commented this photo earlier', 'wp-photo-album-plus');
11010
  $help = '';
11011
  $slug = 'wppa_commentprevious';
11012
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_commentprevious', '' ) ) );
11013
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11014
  $clas = '';
11015
  $tags = 'comment,mail';
@@ -11019,7 +11054,7 @@ global $wppa_supported_camara_brands;
11019
  $desc = __('Notify moderators when a photo needs moderation', 'wp-photo-album-plus');
11020
  $help = '';
11021
  $slug = 'wppa_moderatephoto';
11022
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_moderatephoto', '' ) ) );
11023
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11024
  $clas = '';
11025
  $tags = 'upload,mail';
@@ -11029,7 +11064,7 @@ global $wppa_supported_camara_brands;
11029
  $desc = __('Notify moderators when a comment needs moderation', 'wp-photo-album-plus');
11030
  $help = '';
11031
  $slug = 'wppa_moderatecomment';
11032
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_moderatecomment', '' ) ) );
11033
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11034
  $clas = '';
11035
  $tags = 'upload,mail';
@@ -11039,7 +11074,7 @@ global $wppa_supported_camara_brands;
11039
  $desc = __('Send an email to the owner when a photo is approved', 'wp-photo-album-plus');
11040
  $help = '';
11041
  $slug = 'wppa_photoapproved';
11042
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_photoapproved', '' ) ) );
11043
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11044
  $clas = '';
11045
  $tags = 'upload,mail';
@@ -11049,7 +11084,7 @@ global $wppa_supported_camara_brands;
11049
  $desc = __('Notify photo owner and commenter of approved comment', 'wp-photo-album-plus');
11050
  $help = '';
11051
  $slug = 'wppa_commentapproved';
11052
- $subs = count( wppa_index_string_to_array( get_option( 'wppa_mailinglist_commentapproved', '' ) ) );
11053
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11054
  $clas = 'wppa_comment_';
11055
  $tags = 'comment,mail';
@@ -11741,7 +11776,7 @@ global $wppa_opt;
11741
  $slug = substr( $xslug, 5 );
11742
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11743
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11744
- $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : get_option( $xslug, '' );
11745
  $html = '<input'.$title.' style="float:left; width: '.$width.'; height:20px;';
11746
  if ($minwidth != '') $html .= ' min-width:'.$minwidth.';';
11747
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="text" id="'.$slug.'"';
@@ -11761,7 +11796,7 @@ function wppa_number($xslug, $min, $max, $text = '', $onchange = '') {
11761
  $slug = substr( $xslug, 5 );
11762
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11763
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11764
- $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : get_option( $xslug, '' );
11765
  $html = '<input'.$title.' style="float:left; height:20px; width:50px;';
11766
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="number" id="'.$slug.'"';
11767
  if ($onchange != '') $html .= ' onchange="'. esc_attr( $onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);').'"';
@@ -11779,7 +11814,7 @@ global $wppa_opt;
11779
  $slug = substr( $xslug, 5 );
11780
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11781
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11782
- $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : get_option( $xslug, '' );
11783
  $html = '<input'.$title.' type="color" style="float:left; width: '.$width.'; height:20px;';
11784
  if ($minwidth != '') $html .= ' min-width:'.$minwidth.';';
11785
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="text" id="'.$slug.'"';
@@ -11983,7 +12018,7 @@ global $wppa_opt;
11983
  if ($class != '') $html .= ' class="'.$class.'"';
11984
  $html .= '>';
11985
 
11986
- $val = get_option( $xslug ); // value can be yes or no in Table 0 !! so do not use wppa_opt()
11987
  $idx = 0;
11988
  $cnt = count($options);
11989
  while ($idx < $cnt) {
@@ -12025,7 +12060,7 @@ global $wppa_opt;
12025
  ' class="'.$class.'"' .
12026
  ' >';
12027
 
12028
- $val = get_option( $xslug ); // value can be yes or no in Table 0 !! so do not use wppa_opt()
12029
  $idx = 0;
12030
  $cnt = count( $options );
12031
 
@@ -12170,7 +12205,7 @@ function wppa_cronjob_button( $slug ) {
12170
 
12171
  $label = __( 'Start as cron job', 'wp-photo-album-plus' );
12172
  $me = wppa_get_user();
12173
- $user = get_option( $slug.'_user', $me );
12174
 
12175
  if ( $user && $user != $me ) {
12176
  $label = __( 'Locked!', 'wp-photo-album-plus' );
@@ -12209,7 +12244,7 @@ function wppa_maintenance_button( $slug ) {
12209
 
12210
  $label = __('Start!', 'wp-photo-album-plus');
12211
  $me = wppa_get_user();
12212
- $user = get_option( $slug.'_user', $me );
12213
 
12214
  if ( $user && $user != $me ) {
12215
  $label = __('Locked!', 'wp-photo-album-plus');
@@ -12231,12 +12266,12 @@ function wppa_maintenance_button( $slug ) {
12231
  return $result;
12232
  }
12233
  function wppa_status_field( $slug ) {
12234
- $result = '<span id="'.$slug.'_status" >'.get_option( $slug.'_status', '' ).'</span>';
12235
  return $result;
12236
  }
12237
  function wppa_togo_field( $slug ) {
12238
- $togo = get_option($slug.'_togo', '' );
12239
- $is_cron = get_option($slug.'_user', '' ) == 'cron-job';
12240
  $result = '<span id="'.$slug.'_togo" >' . $togo . '</span>';
12241
  if ( $togo || $is_cron ) {
12242
  $result .= '<script>wppaAjaxUpdateTogo(\'' . $slug . '\');</script>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.3.00
7
  *
8
  */
9
 
38
  wppa_re_animate_cron();
39
 
40
  // Make sure translatable defaults are translated
41
+ // wppa_set_defaults();
42
 
43
  // If watermark all is going to be run, make sure the current user has no private overrule settings
44
  delete_option( 'wppa_watermark_file_'.wppa_get_user() );
339
  <?php
340
  if ( current_user_can( 'administrator' ) ) {
341
  echo ' ' .
342
+ __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . wppa_get_option( 'wppa_revision', '100') . '. ' .
343
  __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
344
  // __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
345
  __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ';
369
  'simple-lightbox/main.php',
370
  'amp/amp.php',
371
  );
372
+ $plugins = wppa_get_option('active_plugins');
373
  $matches = array_intersect($blacklist_plugins, $plugins);
374
  foreach ( $matches as $bad ) {
375
  wppa_error_message(__('Please de-activate plugin <i style="font-size:14px;">', 'wp-photo-album-plus').substr($bad, 0, strpos($bad, '/')).__('. </i>This plugin will cause wppa+ to function not properly.', 'wp-photo-album-plus'));
395
  }
396
 
397
  // Check for pending actions
398
+ if ( wppa_get_option( 'wppa_remove_empty_albums_status' ) && wppa_get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Remove empty albums needs completion. See Table VIII', 'wp-photo-album-plus') );
399
+ if ( wppa_get_option( 'wppa_apply_new_photodesc_all_status' ) && wppa_get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Applying new photo description needs completion. See Table VIII', 'wp-photo-album-plus') );
400
+ if ( wppa_get_option( 'wppa_append_to_photodesc_status' ) && wppa_get_option( 'wppa_append_to_photodesc_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Appending to photo description needs completion. See Table VIII' , 'wp-photo-album-plus') );
401
+ if ( wppa_get_option( 'wppa_remove_from_photodesc_status' ) && wppa_get_option( 'wppa_remove_from_photodesc_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Removing from photo description needs completion. See Table VIII' , 'wp-photo-album-plus') );
402
+ if ( wppa_get_option( 'wppa_remove_file_extensions_status' ) && wppa_get_option( 'wppa_remove_file_extensions_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Removing file extensions needs completion. See Table VIII' , 'wp-photo-album-plus') );
403
+ if ( wppa_get_option( 'wppa_regen_thumbs_status' ) && wppa_get_option( 'wppa_regen_thumbs_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Regenerating the Thumbnails needs completion. See Table VIII' , 'wp-photo-album-plus') );
404
+ if ( wppa_get_option( 'wppa_rerate_status' ) && wppa_get_option( 'wppa_rerate_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rerating needs completion. See Table VIII' , 'wp-photo-album-plus') );
405
 
406
  // Check for inconsistencies
407
  if ( ( wppa_opt( 'thumbtype' ) == 'default' ) && (
538
  </div>
539
  <input type="hidden" name="wppa-key" id="wppa-key" value="" />
540
  <input type="hidden" name="wppa-sub" id="wppa-sub" value="" />
541
+ <?php if ( wppa_get_option('wppa_i_done') == 'done' ) { ?>
542
  <a class="-wppa-quick" onclick="jQuery('.wppa-quick').css('display','inline');jQuery('.-wppa-quick').css('display','none')" ><?php _e('Quick setup', 'wp-photo-album-plus') ?></a>
543
  <?php } else { ?>
544
  <input type="button" id="wppa-quick" style="background-color:yellow;" class="-wppa-quick" onclick="jQuery('.wppa-quick').css('display','inline');jQuery('.-wppa-quick').css('display','none')" value="<?php _e('Do a quick initial setup', 'wp-photo-album-plus') ?>" />
559
  />
560
 
561
  <?php
562
+ if ( wppa_get_option( 'wppa_prevrev' ) == '100' && wppa_get_option('wppa_i_done') != 'done' ) {
563
  ?>
564
  <script type="text/javascript" >
565
  var wppaButtonColor = '#7F7';
2049
  $clas = '';
2050
  $tags = 'slide,navi';
2051
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
2052
+
2053
  $name = __('Start/stop on Filmonly');
2054
  $desc = __('Show the Start/Stop slideshow bar on filmonly displays.', 'wp-photo-album-plus');
2055
  $help = '';
3183
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3184
  $help = '';
3185
  $slug = 'wppa_up_tagselbox_title_1';
3186
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3187
  $clas = 'wppa_feup wppa_up_tags';
3188
  $tags = 'upload';
3189
  wppa_setting($slug, '11.1c', $name, $desc, $html, $help, $clas, $tags);
3192
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3193
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3194
  $slug = 'wppa_up_tagselbox_content_1';
3195
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3196
  $clas = 'wppa_feup wppa_up_tags';
3197
  $tags = 'upload';
3198
  wppa_setting($slug, '11.1d', $name, $desc, $html, $help, $clas, $tags);
3211
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3212
  $help = '';
3213
  $slug = 'wppa_up_tagselbox_title_2';
3214
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3215
  $clas = 'wppa_feup wppa_up_tags';
3216
  $tags = 'upload';
3217
  wppa_setting($slug, '11.2c', $name, $desc, $html, $help, $clas, $tags);
3220
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3221
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3222
  $slug = 'wppa_up_tagselbox_content_2';
3223
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3224
  $clas = 'wppa_feup wppa_up_tags';
3225
  $tags = 'upload';
3226
  wppa_setting($slug, '11.2d', $name, $desc, $html, $help, $clas, $tags);
3239
  $desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
3240
  $help = '';
3241
  $slug = 'wppa_up_tagselbox_title_3';
3242
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3243
  $clas = 'wppa_feup wppa_up_tags';
3244
  $tags = 'upload';
3245
  wppa_setting($slug, '11.3c', $name, $desc, $html, $help, $clas, $tags);
3248
  $desc = __('The tags in the selection box.', 'wp-photo-album-plus');
3249
  $help = (__('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus'));
3250
  $slug = 'wppa_up_tagselbox_content_3';
3251
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3252
  $clas = 'wppa_feup wppa_up_tags';
3253
  $tags = 'upload';
3254
  wppa_setting($slug, '11.3d', $name, $desc, $html, $help, $clas, $tags);
3266
  $desc = __('The caption above the tags input field.', 'wp-photo-album-plus');
3267
  $help = '';
3268
  $slug = 'wppa_up_tag_input_title';
3269
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3270
  $clas = 'wppa_feup wppa_up_tags';
3271
  $tags = 'upload';
3272
  wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
3275
  $desc = __('The tags in the New tags input box.', 'wp-photo-album-plus');
3276
  $help = '';
3277
  $slug = 'wppa_up_tagbox_new';
3278
+ $html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
3279
  $clas = 'wppa_feup wppa_up_tags';
3280
  $tags = 'upload';
3281
  wppa_setting($slug, '13.1', $name, $desc, $html, $help, $clas, $tags);
4432
  $name = __('V align', 'wp-photo-album-plus');
4433
  $desc = __('Vertical alignment of slideshow images.', 'wp-photo-album-plus');
4434
  $help = (__('Specify the vertical alignment of slideshow images.', 'wp-photo-album-plus'));
 
4435
  $slug = 'wppa_fullvalign';
4436
  $options = array(__('--- none ---', 'wp-photo-album-plus'), __('top', 'wp-photo-album-plus'), __('center', 'wp-photo-album-plus'), __('bottom', 'wp-photo-album-plus'), __('fit', 'wp-photo-album-plus'));
4437
  $values = array('default', 'top', 'center', 'bottom', 'fit');
4441
  $tags = 'slide,layout';
4442
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
4443
 
4444
+ $name = __('V align', 'wp-photo-album-plus');
4445
+ $desc = __('Vertical alignment of slideonly slidshow images.', 'wp-photo-album-plus');
4446
+ $help = (__('Specify the vertical alignment of slideonly slideshow images.', 'wp-photo-album-plus'));
4447
+ $slug = 'wppa_fullvalign_slideonly';
4448
+ $options = array(__('--- none ---', 'wp-photo-album-plus'), __('top', 'wp-photo-album-plus'), __('center', 'wp-photo-album-plus'), __('bottom', 'wp-photo-album-plus'), __('fit', 'wp-photo-album-plus'));
4449
+ $values = array('default', 'top', 'center', 'bottom', 'fit');
4450
+ $onchange = 'wppaCheckFullHalign()';
4451
+ $html = wppa_select($slug, $options, $values, $onchange);
4452
+ $clas = '';
4453
+ $tags = 'slide,layout';
4454
+ wppa_setting($slug, '1.1', $name, $desc, $html, $help, $clas, $tags);
4455
+
4456
  $name = __('H align', 'wp-photo-album-plus');
4457
  $desc = __('Horizontal alignment of slideshow images.', 'wp-photo-album-plus');
4458
  $help = (__('Specify the horizontal alignment of slideshow images. If you specify --- none --- , no horizontal alignment will take place.', 'wp-photo-album-plus'));
4654
  $clas = '';
4655
  $tags = 'slide,system';
4656
  wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
4657
+
4658
+ $name = __('Filmonly random', 'wp-photo-album-plus');
4659
+ $desc = __('Set sequence in filmonly to random');
4660
+ $help = __('Every pageload the sequence will be different', 'wp-photo-album-plus');
4661
+ $slug = 'wppa_filmonly_random';
4662
+ $html = wppa_checkbox($slug);
4663
+ $clas = '';
4664
+ $tags = 'slide,system';
4665
+ wppa_setting($slug, '17', $name, $desc, $html, $help, $clas, $tags);
4666
 
4667
  }
4668
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
7027
  unset ( $roles['administrator'] );
7028
  foreach (array_keys($roles) as $role) {
7029
  $t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
7030
+ if ( wppa_get_option('wppa_'.$role.'_upload_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_count', '0');
7031
+ if ( wppa_get_option('wppa_'.$role.'_upload_limit_time', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_time', '0');
7032
  $name = sprintf(__('Upload limit %s', 'wp-photo-album-plus'), $t_role);
7033
  if ( $role == 'loggedout' ) $desc = __('Limit upload capacity for logged out users.', 'wp-photo-album-plus');
7034
  else $desc = sprintf(__('Limit upload capacity for the user role %s.', 'wp-photo-album-plus'), $t_role);
7047
 
7048
  foreach (array_keys($roles) as $role) {
7049
  $t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
7050
+ if ( wppa_get_option('wppa_'.$role.'_album_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_album_limit_count', '0');
7051
  $name = sprintf(__('Album limit %s', 'wp-photo-album-plus'), $t_role);
7052
  if ( $role == 'loggedout' ) $desc = __('Limit number of albums for logged out users.', 'wp-photo-album-plus');
7053
  else $desc = sprintf(__('Limit number of albums for the user role %s.', 'wp-photo-album-plus'), $t_role);
7366
  $desc = __('The text on the Edit button.', 'wp-photo-album-plus');
7367
  $help = '';
7368
  $slug = 'wppa_fe_edit_button';
7369
+ $html1 = wppa_edit($slug, wppa_get_option( $slug ), '300px');
7370
  $html2 = '';
7371
  $html = array( $html1, $html2 );
7372
  $clas= '';
7377
  $desc = __('The text on the header of the popup.', 'wp-photo-album-plus');
7378
  $help = '';
7379
  $slug = 'wppa_fe_edit_caption';
7380
+ $html1 = wppa_edit($slug, wppa_get_option( $slug ), '300px');
7381
  $html2 = '';
7382
  $html = array( $html1, $html2 );
7383
  $clas= '';
7504
  $desc = __('Set the status of all the users photos to \'pending\'.', 'wp-photo-album-plus');
7505
  $help = (__('Also inhibits further uploads.', 'wp-photo-album-plus'));
7506
  $slug = 'wppa_blacklist_user';
7507
+ $blacklist = wppa_get_option( 'wppa_black_listed_users', array() );
7508
 
7509
  if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
7510
  $users = wppa_get_users();
7536
  $desc = __('Set the status of all the users photos to \'publish\'.', 'wp-photo-album-plus');
7537
  $help = '';
7538
  $slug = 'wppa_un_blacklist_user';
7539
+ $blacklist = wppa_get_option( 'wppa_black_listed_users', array() );
7540
  $options = array( __('--- select a user to unblacklist ---', 'wp-photo-album-plus') );
7541
  $values = array( '0' );
7542
  foreach ( $blacklist as $usr ) {
7568
  $help = (__('This gives the user all the administrator privileges within wppa.', 'wp-photo-album-plus'));
7569
  $help .= '<br />'.(__('Make sure the user also has a role that has all the boxes ticked in Table VII-A', 'wp-photo-album-plus'));
7570
  $slug = 'wppa_superuser_user';
7571
+ $superlist = wppa_get_option( 'wppa_super_users', array() );
7572
 
7573
  if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
7574
  $users = wppa_get_users();
7600
  $desc = __('Remove user from super user list.', 'wp-photo-album-plus');
7601
  $help = '';
7602
  $slug = 'wppa_un_superuser_user';
7603
+ $superlist = wppa_get_option( 'wppa_super_users', array() );
7604
  $options = array( __('--- select a user to unmake superuser ---', 'wp-photo-album-plus') );
7605
  $values = array( '0' );
7606
  foreach ( $superlist as $usr ) {
7839
  $tags = 'system';
7840
  wppa_setting(false, '8.3', $name, $desc, $html, $help, $clas, $tags);
7841
 
7842
+ $fs = wppa_get_option('wppa_file_system');
7843
  if ( ! $fs ) { // Fix for wp delete_option bug
7844
  $fs = 'flat';
7845
  wppa_update_option('wppa_file_system', 'flat');
8263
  $vals[] = $tag;
8264
  }
8265
  $html1 = '<div><small style="float:left;margin-right:5px;" >'.__('Tag:', 'wp-photo-album-plus').'</small>'.wppa_select( $slug1, $opts, $vals ).'</div>';
8266
+ $html2 = '<div style="clear:both" ><small style="float:left;margin-right:5px;" >'.__('Change to:', 'wp-photo-album-plus').'</small>'.wppa_edit( $slug2, trim( wppa_get_option( $slug2 ), ',' ), '100px' ).'</div>';
8267
  $html3 = wppa_maintenance_button( $slug3 );
8268
  $html4 = wppa_status_field( $slug3 );
8269
  $html5 = wppa_togo_field( $slug3 );
8375
  ' >'.
8376
  wppa_album_select_a(array( 'addpleaseselect'=>true,
8377
  'path'=>true,
8378
+ 'selected'=>wppa_get_option('wppa_move_all_photos_from')
8379
  )).
8380
  '</select>' .
8381
  '<img' .
8402
  ' >'.
8403
  wppa_album_select_a(array( 'addpleaseselect'=>true,
8404
  'path'=>true,
8405
+ 'selected'=>wppa_get_option('wppa_move_all_photos_to')
8406
  )).
8407
  '</select>' .
8408
  '<img' .
8434
 
8435
  $name = __('PNG to JPG', 'wp-photo-album-plus');
8436
  $desc = __('Convert all .png files to .jpg files', 'wp-photo-album-plus');
8437
+ $help = '';
8438
  $slug2 = 'wppa_png_to_jpg';
8439
  $html1 = '';
8440
  $html2 = wppa_maintenance_button( $slug2 );
8447
 
8448
  $name = __('Fix mp4 meta data', 'wp-photo-album-plus');
8449
  $desc = __('Import framesize, creationdate and duration from mp4 video files', 'wp-photo-album-plus');
8450
+ $help = '';
8451
  $slug2 = 'wppa_fix_mp4_meta';
8452
  $html1 = '';
8453
  $html2 = wppa_maintenance_button( $slug2 );
8458
  $tags = 'system,video';
8459
  wppa_setting(false, '22', $name, $desc, $html, $help, $clas, $tags);
8460
 
8461
+ $name = __('Fix user ids', 'wp-photo-album-plus');
8462
+ $desc = __('Fill in missing user ids to ratings and comments', 'wp-photo-album-plus');
8463
+ $help = __('Only used to update ratings and comments entered before version 7.3 to meet the new standards', 'wp-photo-album-plus');
8464
+ $slug2 = 'wppa_fix_userids';
8465
+ $html1 = wppa_cronjob_button( $slug2 );
8466
+ $html2 = wppa_maintenance_button( $slug2 );
8467
+ $html3 = wppa_status_field( $slug2 );
8468
+ $html4 = wppa_togo_field( $slug2 );
8469
+ $html = array($html1, $html2, $html3, $html4);
8470
+ $clas = '';
8471
+ $tags = 'system,rating,comment';
8472
+ wppa_setting(false, '20', $name, $desc, $html, $help, $clas, $tags);
8473
+
8474
  if ( current_user_can( 'administrator' ) ) {
8475
  $name = __('Custom album proc', 'wp-photo-album-plus');
8476
  $desc = __('The php code to execute on all albums', 'wp-photo-album-plus');
10555
  wppa_setting($slug, '1.3', $name, $desc, $html, $help, $clas, $tags);
10556
 
10557
  $name = __('QR cache', 'wp-photo-album-plus');
10558
+ $desc = __('Enable caching QR codes', 'wp-photo-album-plus') . ' ' . sprintf( __('So far %d cache hits, %d miss', 'wp-photo-album-plus'), wppa_get_option('wppa_qr_cache_hits', '0'), wppa_get_option('wppa_qr_cache_miss', '0'));
10559
  $help = __('Enable this to avoid DoS on heavy loads on the qrserver', 'wp-photo-album-plus'); $slug = 'wppa_qr_cache';
10560
  $html = wppa_checkbox($slug);
10561
  $clas = '';
10969
  $desc = __('Enable mailing users when a new album is created', 'wp-photo-album-plus');
10970
  $help = '';
10971
  $slug = 'wppa_newalbumnotify';
10972
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_newalbumnotify', '' ) ) );
10973
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
10974
  $clas = '';
10975
  $tags = 'mail,album';
10979
  $desc = __('Enable mailing users when a frontend upload has been done', 'wp-photo-album-plus');
10980
  $help = (__('When moderation is required, the mails will be sent after approval', 'wp-photo-album-plus'));
10981
  $slug = 'wppa_feuploadnotify';
10982
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_feuploadnotify', '' ) ) );
10983
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
10984
  $clas = '';
10985
  $tags = 'upload,mail';
11002
  $help .= '<br />' . __('All subscribers will get the email, unless you tick the \'to owner and admin only\' box', 'wp-photo-album-plus');
11003
  $slug1 = 'wppa_commentnotify';
11004
  $slug2 = 'wppa_commentnotify_limit';
11005
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_commentnotify', '' ) ) );
11006
  $html = wppa_checkbox($slug1) . '<span style="float:left" >&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs ) . '&nbsp;</span>' .
11007
  wppa_checkbox($slug2) . '<span style="float:left" >&nbsp;' . __( 'to owner and admin only', 'wp-photo-album-plus' ) . '</span>';
11008
  $clas = '';
11044
  $desc = __('Notify users who have commented this photo earlier', 'wp-photo-album-plus');
11045
  $help = '';
11046
  $slug = 'wppa_commentprevious';
11047
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_commentprevious', '' ) ) );
11048
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11049
  $clas = '';
11050
  $tags = 'comment,mail';
11054
  $desc = __('Notify moderators when a photo needs moderation', 'wp-photo-album-plus');
11055
  $help = '';
11056
  $slug = 'wppa_moderatephoto';
11057
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_moderatephoto', '' ) ) );
11058
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11059
  $clas = '';
11060
  $tags = 'upload,mail';
11064
  $desc = __('Notify moderators when a comment needs moderation', 'wp-photo-album-plus');
11065
  $help = '';
11066
  $slug = 'wppa_moderatecomment';
11067
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_moderatecomment', '' ) ) );
11068
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11069
  $clas = '';
11070
  $tags = 'upload,mail';
11074
  $desc = __('Send an email to the owner when a photo is approved', 'wp-photo-album-plus');
11075
  $help = '';
11076
  $slug = 'wppa_photoapproved';
11077
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_photoapproved', '' ) ) );
11078
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11079
  $clas = '';
11080
  $tags = 'upload,mail';
11084
  $desc = __('Notify photo owner and commenter of approved comment', 'wp-photo-album-plus');
11085
  $help = '';
11086
  $slug = 'wppa_commentapproved';
11087
+ $subs = count( wppa_index_string_to_array( wppa_get_option( 'wppa_mailinglist_commentapproved', '' ) ) );
11088
  $html = wppa_checkbox($slug) . '&nbsp;' . sprintf( __( '%d subscribers', 'wp-photo-album-plus' ), $subs );
11089
  $clas = 'wppa_comment_';
11090
  $tags = 'comment,mail';
11776
  $slug = substr( $xslug, 5 );
11777
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11778
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11779
+ $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : wppa_get_option( $xslug, '' );
11780
  $html = '<input'.$title.' style="float:left; width: '.$width.'; height:20px;';
11781
  if ($minwidth != '') $html .= ' min-width:'.$minwidth.';';
11782
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="text" id="'.$slug.'"';
11796
  $slug = substr( $xslug, 5 );
11797
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11798
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11799
+ $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : wppa_get_option( $xslug, '' );
11800
  $html = '<input'.$title.' style="float:left; height:20px; width:50px;';
11801
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="number" id="'.$slug.'"';
11802
  if ($onchange != '') $html .= ' onchange="'. esc_attr( $onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);').'"';
11814
  $slug = substr( $xslug, 5 );
11815
  $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
11816
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
11817
+ $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : wppa_get_option( $xslug, '' );
11818
  $html = '<input'.$title.' type="color" style="float:left; width: '.$width.'; height:20px;';
11819
  if ($minwidth != '') $html .= ' min-width:'.$minwidth.';';
11820
  $html .= ' font-size: 11px; margin: 0px; padding: 0px;" type="text" id="'.$slug.'"';
12018
  if ($class != '') $html .= ' class="'.$class.'"';
12019
  $html .= '>';
12020
 
12021
+ $val = wppa_get_option( $xslug ); // value can be yes or no in Table 0 !! so do not use wppa_opt()
12022
  $idx = 0;
12023
  $cnt = count($options);
12024
  while ($idx < $cnt) {
12060
  ' class="'.$class.'"' .
12061
  ' >';
12062
 
12063
+ $val = wppa_get_option( $xslug ); // value can be yes or no in Table 0 !! so do not use wppa_opt()
12064
  $idx = 0;
12065
  $cnt = count( $options );
12066
 
12205
 
12206
  $label = __( 'Start as cron job', 'wp-photo-album-plus' );
12207
  $me = wppa_get_user();
12208
+ $user = wppa_get_option( $slug.'_user', $me );
12209
 
12210
  if ( $user && $user != $me ) {
12211
  $label = __( 'Locked!', 'wp-photo-album-plus' );
12244
 
12245
  $label = __('Start!', 'wp-photo-album-plus');
12246
  $me = wppa_get_user();
12247
+ $user = wppa_get_option( $slug.'_user', $me );
12248
 
12249
  if ( $user && $user != $me ) {
12250
  $label = __('Locked!', 'wp-photo-album-plus');
12266
  return $result;
12267
  }
12268
  function wppa_status_field( $slug ) {
12269
+ $result = '<span id="'.$slug.'_status" >'.wppa_get_option( $slug.'_status', '' ).'</span>';
12270
  return $result;
12271
  }
12272
  function wppa_togo_field( $slug ) {
12273
+ $togo = wppa_get_option($slug.'_togo', '' );
12274
+ $is_cron = wppa_get_option($slug.'_user', '' ) == 'cron-job';
12275
  $result = '<span id="'.$slug.'_togo" >' . $togo . '</span>';
12276
  if ( $togo || $is_cron ) {
12277
  $result .= '<script>wppaAjaxUpdateTogo(\'' . $slug . '\');</script>';
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 7.2.16
7
  *
8
  */
9
 
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
20
  // instead of characters of unexpected output.
21
  // register_activation_hook(WPPA_FILE, 'wppa_activate_plugin'); is in wppa.php
22
  function wppa_activate_plugin() {
23
- $old_rev = get_option( 'wppa_revision', '100' );
24
  $new_rev = $old_rev - '0.01';
25
  wppa_update_option( 'wppa_revision', $new_rev );
26
  }
@@ -34,7 +34,7 @@ global $wppa_revno;
34
  global $current_user;
35
  global $wppa_error;
36
 
37
- $old_rev = get_option( 'wppa_revision', '100' );
38
 
39
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
40
 
@@ -126,6 +126,8 @@ global $wppa_error;
126
  photo bigint(20) NOT NULL,
127
  value smallint(5) NOT NULL,
128
  user text NOT NULL,
 
 
129
  status tinytext NOT NULL,
130
  PRIMARY KEY (id),
131
  KEY photokey (photo)
@@ -136,6 +138,7 @@ global $wppa_error;
136
  timestamp tinytext NOT NULL,
137
  photo bigint(20) NOT NULL,
138
  user text NOT NULL,
 
139
  ip tinytext NOT NULL,
140
  email text NOT NULL,
141
  comment text NOT NULL,
@@ -281,11 +284,11 @@ global $wppa_error;
281
  if ( WPPA_DEBUG ) if ($ah || $ph) wppa_ok_message($ah.' out of '.$at.' albums and '.$ph.' out of '.$pt.' photos html converted');
282
  }
283
  if ( $old_rev <= '482' ) { // Share box added
284
- $so = get_option('wppa_slide_order', '0,1,2,3,4,5,6,7,8,9');
285
  if ( strlen($so) == '19' ) {
286
  wppa_update_option('wppa_slide_order', $so.',10');
287
  }
288
- $so = get_option('wppa_slide_order_split', '0,1,2,3,4,5,6,7,8,9,10');
289
  if ( strlen($so) == '22' ) {
290
  wppa_update_option('wppa_slide_order_split', $so.',11');
291
  }
@@ -313,20 +316,20 @@ global $wppa_error;
313
  delete_option('wppa_taglist'); // Forces recreation
314
  }
315
  if ( $old_rev <= '5205' ) {
316
- if ( get_option('wppa_list_albums_desc', 'nil') == 'yes' ) {
317
- $value = get_option('wppa_list_albums_by', '0') * '-1';
318
  wppa_update_option('wppa_list_albums_by', $value);
319
  wppa_remove_setting('wppa_list_albums_desc');
320
  }
321
- if ( get_option('wppa_list_photos_desc', 'nil') == 'yes' ) {
322
- $value = get_option('wppa_list_photos_by', '0') * '-1';
323
  wppa_update_option('wppa_list_photos_by', $value);
324
  wppa_remove_setting('wppa_list_photos_desc');
325
  }
326
  }
327
 
328
  if ( $old_rev <= '5207' ) {
329
- if ( get_option( 'wppa_strip_file_ext', 'nil' ) == 'yes' ) {
330
  wppa_update_option( 'wppa_newphoto_name_method', 'noext' );
331
  delete_option( 'wppa_strip_file_ext' );
332
  }
@@ -347,8 +350,8 @@ global $wppa_error;
347
 
348
  if ( $old_rev == '5421' || $old_rev == '5420.99' ) { // The rev where the bug was
349
  if ( $wppa_revno >= '5422' ) { // The rev where we fix it
350
- if ( get_option( 'wppa_rating_on', 'no' ) == 'yes' ) { // Only if rating used
351
- if ( get_option( 'wppa_ajax_non_admin', 'yes' ) == 'no' ) { // Only if backend ajax
352
  update_option( 'wppa_rerate_status', __('Required', 'wp-photo-album-plus') ); // Make sure they see the message
353
  }
354
  }
@@ -356,7 +359,7 @@ global $wppa_error;
356
  }
357
 
358
  if ( $old_rev <= '5500' ) {
359
- wppa_create_pl_htaccess( get_option( 'wppa_pl_dirname', 'wppa-pl' ) ); // Remake due to fix in wppa_sanitize_file_name()
360
  }
361
 
362
  if ( $old_rev <= '6103' ) {
@@ -364,10 +367,10 @@ global $wppa_error;
364
  }
365
 
366
  if ( $old_rev <= '6305' ) {
367
- if ( get_option( 'wppa_comment_captcha' ) == 'no' ) {
368
  update_option( 'wppa_comment_captcha', 'none' );
369
  }
370
- if ( get_option( 'wppa_comment_captcha' ) == 'yes' ) {
371
  update_option( 'wppa_comment_captcha', 'all' );
372
  }
373
  }
@@ -393,10 +396,10 @@ global $wppa_error;
393
  }
394
 
395
  if ( $old_rev <= '6319' ) {
396
- if ( get_option( 'wppa_cre_uploads_htaccess', 'no' ) == 'no' ) {
397
  update_option( 'wppa_cre_uploads_htaccess', 'remove' );
398
  }
399
- if ( get_option( 'wppa_cre_uploads_htaccess', 'no' ) == 'yes' ) {
400
  update_option( 'wppa_cre_uploads_htaccess', 'grant' );
401
  }
402
  }
@@ -406,7 +409,7 @@ global $wppa_error;
406
  }
407
 
408
  if ( $old_rev <= '6408' ) {
409
- if ( get_option( 'wppa_comment_email_required', 'yes' ) ) {
410
  update_option( 'wppa_comment_email_required', 'required', false );
411
  }
412
  else {
@@ -415,7 +418,7 @@ global $wppa_error;
415
  }
416
 
417
  if ( $old_rev <= '6411' ) {
418
- $old = get_option( 'wppa_upload_edit', 'no' );
419
  if ( $old == 'no' ) {
420
  update_option( 'wppa_upload_edit', '-none-', false );
421
  }
@@ -425,10 +428,10 @@ global $wppa_error;
425
  }
426
 
427
  if ( $old_rev <= '6414' ) {
428
- if ( get_option( 'wppa_upload_edit', 'no' ) != 'no' ) {
429
  update_option( 'wppa_upload_delete', 'yes' );
430
  }
431
- if ( get_option( 'wppa_upload_edit_users' ) == 'equalname' ) {
432
  update_option( 'wppa_upload_edit_users', 'owner' );
433
  }
434
  }
@@ -454,39 +457,39 @@ global $wppa_error;
454
  }
455
 
456
  if ( $old_rev <= '6600' ) {
457
- wppa_create_pl_htaccess( get_option( 'wppa_pl_dirname', 'wppa-pl' ) ); // Remake due to fix in wppa_create_pl_htaccess() and wppa_get_source_pl()
458
- if ( get_option( 'wppa_run_wpautop_on_desc' ) == 'yes' ) {
459
  wppa_update_option( 'wppa_wpautop_on_desc', 'wpautop' );
460
  }
461
- if ( get_option( 'wppa_run_wpautop_on_desc' ) == 'no' ) {
462
  wppa_update_option( 'wppa_wpautop_on_desc', 'nil' );
463
  }
464
  }
465
 
466
  if ( $old_rev <= '6601' ) {
467
- if ( get_option( 'wppa_bc_url', 'nil' ) != 'nil' ) {
468
- update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', get_option( 'wppa_bc_url', 'nil' ) ) );
469
  }
470
  }
471
 
472
  if ( $old_rev <= '6602' ) {
473
- if ( get_option( 'wppa_show_treecount' ) == 'yes' ) {
474
  wppa_update_option( 'wppa_show_treecount', 'detail' );
475
  }
476
- if ( get_option( 'wppa_show_treecount' ) == 'no' ) {
477
  wppa_update_option( 'wppa_show_treecount', '-none-' );
478
  }
479
- if ( get_option( 'wppa_count_on_title' ) == 'yes' ) {
480
  wppa_update_option( 'wppa_count_on_title', 'self' );
481
  }
482
- if ( get_option( 'wppa_count_on_title' ) == 'no' ) {
483
  wppa_update_option( 'wppa_count_on_title', '-none-' );
484
  }
485
 
486
  }
487
 
488
  if ( $old_rev <= '6606' ) {
489
- if ( get_option( 'wppa_rating_dayly' ) == 'no' ) {
490
  wppa_update_option( 'wppa_rating_dayly', '0' );
491
  }
492
  }
@@ -496,10 +499,10 @@ global $wppa_error;
496
  }
497
 
498
  if ( $old_rev <= '6610' ) {
499
- if ( get_option( 'wppa_blog_it' ) == 'yes' ) {
500
  wppa_update_option( 'wppa_blog_it', 'optional' );
501
  }
502
- if ( get_option( 'wppa_blog_it' ) == 'no' ) {
503
  wppa_update_option( 'wppa_blog_it', '-none-' );
504
  }
505
  }
@@ -508,10 +511,10 @@ global $wppa_error;
508
  delete_option( 'wppa_cached_options' );
509
  delete_option( 'wppa_md5_options' );
510
  @ $wpdb->query( "UPDATE " . $wpdb->options . " SET autoload = 'yes' WHERE option_name LIKE 'wppa_%'");
511
- if ( get_option( 'wppa_fe_alert' ) == 'no' ) {
512
  update_option( 'wppa_fe_alert', '-none-' );
513
  }
514
- if ( get_option( 'wppa_fe_alert' ) == 'yes' ) {
515
  update_option( 'wppa_fe_alert', 'all' );
516
  }
517
  }
@@ -526,16 +529,16 @@ global $wppa_error;
526
  }
527
 
528
  if ( $old_rev <= '6628' ) {
529
- if ( get_option( 'wppa_gpx_implementation' ) == 'wppa-plus-embedded' ) {
530
  update_option( 'wppa_load_map_api', 'yes' );
531
  }
532
- if ( get_option( 'wppa_gpx_implementation' ) == 'google-maps-gpx-viewer' ) {
533
  update_option( 'wppa_gpx_implementation', 'external-plugin' );
534
  }
535
  }
536
 
537
  if ( $old_rev <= '6630' ) {
538
- if ( get_option( 'wppa_upload_edit' ) == 'none' ) {
539
  update_option( 'wppa_upload_edit', '-none-' );
540
  }
541
  }
@@ -567,19 +570,19 @@ global $wppa_error;
567
  }
568
 
569
  if ( $old_rev <= '6915' ) {
570
- if ( ! get_option( 'wppa_album_admin_pagesize', '0' ) ) {
571
  update_option( 'wppa_album_admin_pagesize', '100' );
572
  }
573
- if ( ! get_option( 'wppa_photo_admin_pagesize', '0' ) ) {
574
  update_option( 'wppa_photo_admin_pagesize', '20' );
575
  }
576
  }
577
 
578
  if ( $old_rev <= '7001' ) {
579
- if ( get_option( 'wppa_use_pretty_links', 'nil' ) == 'no' ) {
580
  update_option( 'wppa_use_pretty_links', '-none-' );
581
  }
582
- if ( get_option( 'wppa_use_pretty_links', 'nil' ) == 'yes' ) {
583
  update_option( 'wppa_use_pretty_links', 'classic' );
584
  }
585
 
@@ -587,7 +590,7 @@ global $wppa_error;
587
 
588
  if ( $old_rev <= '7010' ) {
589
  $met = ini_get( 'max_execution_time' );
590
- $wppamet = get_option( 'wppa_max_execution_time', '30' );
591
  if ( ( $met > 5 ) && $wppamet > ( $met - '5' ) ) {
592
  update_option( 'wppa_max_execution_time', $met - '5' );
593
  }
@@ -620,16 +623,20 @@ global $wppa_error;
620
  if ( $old_rev <= '7211' ) {
621
 
622
  // Fix bug because of different usernames in rating and comments
623
- if ( get_option( 'wppa_vote_needs_comment' ) == 'yes' || get_option( 'wppa_comment_need_vote' ) == 'yes' ) {
624
  $wpdb->query( "UPDATE $wpdb->wppa_rating SET status = 'publish' WHERE status = 'pending'" );
625
  $wpdb->query( "UPDATE $wpdb->wppa_comments SET status = 'approved' WHERE status = 'pending'" );
626
  wppa_schedule_maintenance_proc( 'wppa_rerate' );
627
  }
628
  }
 
 
 
 
629
  }
630
 
631
  // Set Defaults
632
- wppa_set_defaults();
633
 
634
  // Check required directories
635
  if ( ! wppa_check_dirs() ) $wppa_error = true;
@@ -685,16 +692,16 @@ global $wppa_error;
685
  // If so, produce message
686
  $key = '0';
687
  if ( $old_rev < '5400' ) { // theme changed since...
688
- $usertheme = get_theme_root().'/'.get_option('template').'/wppa-theme.php';
689
  if ( is_file( $usertheme ) ) $key += '2';
690
  }
691
  if ( $old_rev < '5211' ) { // css changed since...
692
- $userstyle = get_theme_root().'/'.get_option('stylesheet').'/wppa-style.css';
693
  if ( is_file( $userstyle ) ) {
694
  $key += '1';
695
  }
696
  else {
697
- $userstyle = get_theme_root().'/'.get_option('template').'/wppa-style.css';
698
  if ( is_file( $userstyle ) ) {
699
  $key += '1';
700
  }
@@ -721,7 +728,7 @@ global $wppa_error;
721
  // Make sure virtual album crypt exist
722
  $albs = array( '0', '1', '2', '3', '9' );
723
  foreach( $albs as $alb ) {
724
- if ( ! get_option( 'wppa_album_crypt_' . $alb ) ) {
725
  update_option( 'wppa_album_crypt_' . $alb, wppa_get_unique_album_crypt() );
726
  }
727
  }
@@ -751,1267 +758,23 @@ global $wppa_error;
751
 
752
  // Function used during setup when existing settings are changed or removed
753
  function wppa_convert_setting($oldname, $oldvalue, $newname, $newvalue) {
754
- if ( get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
755
- if ( get_option($oldname, 'nil') == $oldvalue ) wppa_update_option($newname, $newvalue);
756
  }
757
  function wppa_remove_setting($oldname) {
758
- if ( get_option($oldname, 'nil') != 'nil' ) delete_option($oldname);
759
  }
760
  function wppa_rename_setting($oldname, $newname) {
761
- if ( get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
762
- wppa_update_option($newname, get_option($oldname));
763
  delete_option($oldname);
764
  }
765
  function wppa_copy_setting($oldname, $newname) {
766
- if ( get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
767
- wppa_update_option($newname, get_option($oldname));
768
  }
769
  function wppa_revalue_setting($oldname, $oldvalue, $newvalue) {
770
- if ( get_option($oldname, 'nil') == $oldvalue ) wppa_update_option($oldname, $newvalue);
771
- }
772
-
773
- // Set default option values in global $wppa_defaults
774
- // With $force = true, all non default options will be reset to default, so everything is set to the default except: revision, rating_max and filesystem
775
- function wppa_set_defaults($force = false) {
776
- global $wppa_defaults;
777
-
778
- $npd = '
779
- <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'block\'); jQuery(\'.wppa-more\').css(\'display\', \'none\'); wppaOvlResize();">
780
- <div class="wppa-more">
781
- Camera info
782
- </div>
783
- </a>
784
- <a onClick="jQuery(\'.wppa-dtl\').css(\'display\', \'none\'); jQuery(\'.wppa-more\').css(\'display\', \'block\'); wppaOvlResize();">
785
- <div class="wppa-dtl" style="display:none;" >
786
- Hide Camera info
787
- </div>
788
- </a>
789
- <div class="wppa-dtl" style="display:none;">
790
- <br />
791
- <table style="margin:0; border:none;" >
792
- <tr><td class="wppa-label" >Date Time</td><td class="wppa-value" >E#0132</td></tr>
793
- <tr><td class="wppa-label" >Camera</td><td class="wppa-value" >E#0110</td></tr>
794
- <tr><td class="wppa-label" >Focal length</td><td class="wppa-value" >E#920A</td></tr>
795
- <tr><td class="wppa-label" >F-Stop</td><td class="wppa-value" >E#829D</td></tr>
796
- <tr><td class="wppa-label" >ISO Speed Rating</td><td class="wppa-value" >E#8827</td></tr>
797
- <tr><td class="wppa-label" >Exposure program</td><td class="wppa-value" >E#8822</td></tr>
798
- <tr><td class="wppa-label" >Metering mode</td><td class="wppa-value" >E#9207</td></tr>
799
- <tr><td class="wppa-label" >Flash</td><td class="wppa-value" >E#9209</td></tr>
800
- </table>
801
- </div>';
802
-
803
- // Nice scroll options
804
- $nso = "cursorwidth:8,
805
- cursoropacitymin:0.4,
806
- cursorcolor:'#777777',
807
- cursorborder:'none',
808
- cursorborderradius:6,
809
- autohidemode:'leave',
810
- nativeparentscrolling:false,
811
- preservenativescrolling:false,
812
- bouncescroll:false,
813
- smoothscroll:true,
814
- cursorborder:'2px solid transparent',";
815
-
816
-
817
- $wppa_defaults = array ( 'wppa_revision' => '100',
818
- 'wppa_prevrev' => '100',
819
- 'wppa_max_users' => '1000',
820
-
821
- // Table 0: Initial setup
822
- 'wppa_i_responsive' => '',
823
- 'wppa_i_downsize' => '',
824
- 'wppa_i_source' => '',
825
- 'wppa_i_userupload' => '',
826
- 'wppa_i_rating' => '',
827
- 'wppa_i_comment' => '',
828
- 'wppa_i_share' => '',
829
- 'wppa_i_iptc' => '',
830
- 'wppa_i_exif' => '',
831
- 'wppa_i_gpx' => '',
832
- 'wppa_i_fotomoto' => '',
833
- 'wppa_i_video' => '',
834
- 'wppa_i_audio' => '',
835
- 'wppa_i_stereo' => '',
836
- 'wppa_i_pdf' => '',
837
- 'wppa_i_done' => '',
838
-
839
- // Table I: Sizes
840
- // A System
841
- 'wppa_colwidth' => 'auto', // 1
842
- 'wppa_initial_colwidth' => '640',
843
- 'wppa_resize_on_upload' => 'yes', // 2
844
- 'wppa_resize_to' => '0', // 3
845
- 'wppa_min_thumbs' => '0', // 4
846
- 'wppa_bwidth' => '1', // 5
847
- 'wppa_bradius' => '6', // 6
848
- 'wppa_box_spacing' => '8', // 7
849
- 'wppa_pagelinks_max' => '7',
850
- 'wppa_max_filename_length' => '0',
851
- 'wppa_max_photoname_length' => '0',
852
- 'wppa_sticky_header_size' => '0',
853
-
854
- // B Fullsize
855
- 'wppa_fullsize' => '640', // 1
856
- 'wppa_maxheight' => '480', // 2
857
- 'wppa_enlarge' => 'no', // 3
858
- 'wppa_fullimage_border_width' => '', // 4
859
- 'wppa_numbar_max' => '10', // 5
860
- 'wppa_share_size' => '32',
861
- 'wppa_mini_treshold' => '500',
862
- 'wppa_slideshow_pagesize' => '0',
863
- 'wppa_film_thumbsize' => '100', // 9
864
- 'wppa_slideonly_max' => '0',
865
-
866
- // C Thumbnails
867
- 'wppa_thumbsize' => '100', // 1
868
- 'wppa_thumbsize_alt' => '130', // 1a
869
- 'wppa_thumb_aspect' => '0:0:none', // 2
870
- 'wppa_tf_width' => '100', // 3
871
- 'wppa_tf_width_alt' => '130', // 3a
872
- 'wppa_tf_height' => '150', // 4
873
- 'wppa_tf_height_alt' => '180', // 4a
874
- 'wppa_tn_margin' => '4', // 5
875
- 'wppa_thumb_auto' => 'yes', // 6
876
- 'wppa_thumb_page_size' => '0', // 7
877
- 'wppa_popupsize' => '150', // 8
878
- 'wppa_use_thumbs_if_fit' => 'yes', // 9
879
- 'wppa_area_size' => '0', // 10
880
- 'wppa_nicescroll' => 'no', // 11
881
-
882
- // D Covers
883
- 'wppa_max_cover_width' => '1024', // 1
884
- 'wppa_cover_minheight' => '0', // 2
885
- 'wppa_head_and_text_frame_height' => '0', // 3
886
- 'wppa_text_frame_height' => '54', // 4
887
- 'wppa_coverphoto_responsive' => 'no',
888
- 'wppa_smallsize' => '150', // 5
889
- 'wppa_smallsize_percentage' => '30',
890
- 'wppa_smallsize_multi' => '100', // 6
891
- 'wppa_smallsize_multi_percentage' => '20',
892
- 'wppa_coversize_is_height' => 'no', // 7
893
- 'wppa_album_page_size' => '0', // 8
894
- 'wppa_cover_spacing' => '8', // 9
895
-
896
- // E Rating & comments
897
- 'wppa_rating_max' => '5', // 1
898
- 'wppa_rating_prec' => '2', // 2
899
- 'wppa_gravatar_size' => '40', // 3
900
- 'wppa_ratspacing' => '30',
901
-
902
- // F Widgets
903
- 'wppa_topten_count' => '10', // 1
904
- 'wppa_topten_non_zero' => 'no',
905
- 'wppa_topten_size' => '86', // 2
906
- 'wppa_comten_count' => '10', // 3
907
- 'wppa_comten_size' => '86', // 4
908
- 'wppa_featen_count' => '10',
909
- 'wppa_featen_size' => '86',
910
- 'wppa_thumbnail_widget_count' => '10', // 5
911
- 'wppa_thumbnail_widget_size' => '86', // 6
912
- 'wppa_lasten_count' => '10', // 7
913
- 'wppa_lasten_size' => '86', // 8
914
- 'wppa_album_widget_count' => '10',
915
- 'wppa_album_widget_size' => '86',
916
- 'wppa_related_count' => '10',
917
- 'wppa_tagcloud_min' => '8',
918
- 'wppa_tagcloud_max' => '24',
919
-
920
- // G Overlay
921
- 'wppa_ovl_txt_lines' => 'auto', // 1
922
- 'wppa_magnifier' => 'magnifier-small.png', // 2
923
- 'wppa_ovl_border_width' => '8',
924
- 'wppa_ovl_border_radius' => '12',
925
- 'wppa_ovl_fsx_btn_size' => '48',
926
-
927
- // H Video
928
- 'wppa_video_width' => '640',
929
- 'wppa_video_height' => '480',
930
-
931
- // J Icon sizes
932
- 'wppa_nav_icon_size' => 'default',
933
- 'wppa_nav_icon_size_slide' => 'default',
934
- 'wppa_icon_size_rating' => 'default',
935
- 'wppa_nav_icon_size_panorama' => '32',
936
- 'wppa_nav_icon_size_lightbox' => '48',
937
-
938
- // Table II: Visibility
939
- // A Breadcrumb
940
- 'wppa_show_bread_posts' => 'yes', // 1a
941
- 'wppa_show_bread_pages' => 'yes', // 1b
942
- 'wppa_bc_on_search' => 'yes', // 2
943
- 'wppa_bc_on_topten' => 'yes', // 3
944
- 'wppa_bc_on_lasten' => 'yes', // 3
945
- 'wppa_bc_on_comten' => 'yes', // 3
946
- 'wppa_bc_on_featen' => 'yes',
947
- 'wppa_bc_on_tag' => 'yes', // 3
948
- 'wppa_bc_on_related' => 'yes',
949
- 'wppa_show_home' => 'yes', // 4
950
- 'wppa_home_text' => __( 'Home', 'wp-photo-album-plus' ),
951
- 'wppa_show_page' => 'yes', // 4
952
- 'wppa_show_pname' => 'yes',
953
- 'wppa_bc_separator' => 'raquo', // 5
954
- 'wppa_bc_txt' => htmlspecialchars('<span style="color:red; font_size:24px;">&bull;</span>'), // 6
955
- 'wppa_bc_url' => wppa_get_imgdir().'arrow.gif', // 7
956
- 'wppa_pagelink_pos' => 'bottom', // 8
957
- 'wppa_bc_slide_thumblink' => 'no',
958
-
959
- // B Slideshow
960
- 'wppa_navigation_type' => 'icons', // 0
961
- 'wppa_show_startstop_navigation' => 'yes', // 1
962
- 'wppa_show_startstop_filmonly' => 'no',
963
- 'wppa_show_browse_navigation' => 'yes', // 2
964
- 'wppa_filmstrip' => 'yes', // 3
965
- 'wppa_film_show_glue' => 'yes', // 4
966
- 'wppa_show_full_name' => 'yes', // 5
967
- 'wppa_show_full_owner' => 'no', // 5.1
968
- 'wppa_show_full_desc' => 'yes', // 6
969
- 'wppa_hide_when_empty' => 'no', // 6.1
970
- 'wppa_rating_on' => 'yes', // 7
971
- 'wppa_dislike_mail_every' => '5', // 7.1
972
- 'wppa_dislike_set_pending' => '0',
973
- 'wppa_dislike_delete' => '0',
974
- 'wppa_dislike_show_count' => 'yes', // 7.2
975
- 'wppa_rating_display_type' => 'graphic', // 8
976
- 'wppa_show_avg_rating' => 'yes', // 9
977
- 'wppa_show_avg_mine_2' => 'no',
978
- 'wppa_show_comments' => 'yes', // 10
979
- 'wppa_comment_gravatar' => 'monsterid', // 11
980
- 'wppa_comment_gravatar_url' => 'http://', // 12
981
- 'wppa_show_bbb' => 'no', // 13
982
- 'wppa_show_ubb' => 'no',
983
- 'wppa_show_start_stop_icons' => 'no',
984
- // 'wppa_start_stop_icons_type' => '.jpg',
985
- 'wppa_custom_on' => 'no', // 14
986
- 'wppa_custom_content' => '<div style="color:red; font-size:24px; font-weight:bold; text-align:center;">Hello world!</div><div style="text-align:center;" >You can change this text in Table II-B15</div>', // 15
987
- 'wppa_show_slideshownumbar' => 'no', // 16
988
- 'wppa_show_iptc' => 'no', // 17
989
- 'wppa_show_iptc_open' => 'no',
990
- 'wppa_show_exif' => 'no', // 18
991
- 'wppa_show_exif_open' => 'no',
992
- 'wppa_share_on' => 'no',
993
- 'wppa_share_hide_when_running' => 'yes',
994
- 'wppa_sm_void_pages' => '0',
995
- 'wppa_share_on_widget' => 'no',
996
- 'wppa_share_on_thumbs' => 'no',
997
- 'wppa_share_on_lightbox' => 'no',
998
- 'wppa_share_on_mphoto' => 'no',
999
- 'wppa_share_qr' => 'no',
1000
- 'wppa_share_facebook' => 'yes',
1001
- 'wppa_share_twitter' => 'yes',
1002
- 'wppa_twitter_account' => '',
1003
- 'wppa_share_google' => 'yes',
1004
- 'wppa_share_pinterest' => 'yes',
1005
- 'wppa_share_linkedin' => 'yes',
1006
-
1007
- 'wppa_facebook_comments' => 'yes',
1008
- 'wppa_facebook_like' => 'yes',
1009
- 'wppa_fb_display' => 'standard',
1010
- 'wppa_facebook_admin_id' => '',
1011
- 'wppa_facebook_app_id' => '',
1012
- 'wppa_load_facebook_sdk' => 'yes',
1013
- 'wppa_share_single_image' => 'yes',
1014
-
1015
- // C Thumbnails
1016
- 'wppa_thumb_text_name' => 'yes', // 1
1017
- 'wppa_thumb_text_owner' => 'no', // 1.1
1018
- 'wppa_thumb_text_desc' => 'yes', // 2
1019
- 'wppa_thumb_text_rating' => 'yes', // 3
1020
- 'wppa_thumb_text_comcount' => 'no',
1021
- 'wppa_thumb_text_viewcount' => 'no',
1022
- 'wppa_thumb_text_virt_album' => 'yes',
1023
- 'wppa_thumb_video' => 'no',
1024
- 'wppa_thumb_audio' => 'yes',
1025
- 'wppa_popup_text_name' => 'yes', // 4
1026
- 'wppa_popup_text_owner' => 'no',
1027
- 'wppa_popup_text_desc' => 'yes', // 5
1028
- 'wppa_popup_text_desc_strip' => 'no', // 5.1
1029
- 'wppa_popup_text_rating' => 'yes', // 6
1030
- 'wppa_popup_text_ncomments' => 'yes', //
1031
- 'wppa_show_rating_count' => 'no', // 7
1032
- 'wppa_albdesc_on_thumbarea' => 'none',
1033
- 'wppa_albname_on_thumbarea' => 'none',
1034
- 'wppa_show_empty_thumblist' => 'no',
1035
-
1036
- 'wppa_edit_thumb' => 'yes', // II-D17
1037
- 'wppa_upload_link_thumbs' => 'bottom',
1038
-
1039
- // D Covers
1040
- 'wppa_show_cover_text' => 'yes', // 1
1041
- 'wppa_enable_slideshow' => 'yes', // 2
1042
- 'wppa_show_slideshowbrowselink' => 'yes', // 3
1043
- 'wppa_show_viewlink' => 'yes', // 4
1044
- 'wppa_show_treecount' => '-none-',
1045
- 'wppa_show_cats' => 'no',
1046
- 'wppa_skip_empty_albums' => 'yes',
1047
- 'wppa_count_on_title' => '-none-',
1048
- 'wppa_viewcount_on_cover' => '-none-',
1049
-
1050
-
1051
- // E Widgets
1052
- 'wppa_show_bbb_widget' => 'no', // 1
1053
- 'wppa_show_ubb_widget' => 'no', // 1
1054
- 'wppa_ubb_color' => '',
1055
- 'wppa_show_albwidget_tooltip' => 'yes',
1056
- // F Overlay
1057
- // 'wppa_ovl_close_txt' => 'Close',
1058
- 'wppa_ovl_theme' => 'black',
1059
- 'wppa_ovl_bgcolor' => 'black',
1060
- 'wppa_ovl_slide_name' => 'no',
1061
- 'wppa_ovl_slide_desc' => 'yes',
1062
- 'wppa_ovl_thumb_name' => 'yes',
1063
- 'wppa_ovl_thumb_desc' => 'no',
1064
- 'wppa_ovl_potd_name' => 'yes',
1065
- 'wppa_ovl_potd_desc' => 'no',
1066
- 'wppa_ovl_sphoto_name' => 'yes',
1067
- 'wppa_ovl_sphoto_desc' => 'no',
1068
- 'wppa_ovl_mphoto_name' => 'yes',
1069
- 'wppa_ovl_mphoto_desc' => 'no',
1070
- 'wppa_ovl_alw_name' => 'yes',
1071
- 'wppa_ovl_alw_desc' => 'no',
1072
- 'wppa_ovl_cover_name' => 'yes',
1073
- 'wppa_ovl_cover_desc' => 'no',
1074
- 'wppa_ovl_show_counter' => 'yes',
1075
- 'wppa_ovl_add_owner' => 'no',
1076
- 'wppa_ovl_show_startstop' => 'yes',
1077
- 'wppa_ovl_show_legenda' => 'yes',
1078
- 'wppa_show_zoomin' => 'yes',
1079
- 'wppa_ovl_fs_icons' => 'yes',
1080
- 'wppa_ovl_rating' => 'no',
1081
-
1082
- 'wppa_owner_on_new_line' => 'no',
1083
-
1084
- // H Frontend upload
1085
- 'wppa_user_upload_on' => 'no',
1086
- 'wppa_user_upload_video_on' => 'no',
1087
- 'wppa_user_upload_audio_on' => 'no',
1088
- 'wppa_user_upload_login' => 'yes',
1089
- 'wppa_user_opload_roles' => '',
1090
- 'wppa_ajax_upload' => 'yes',
1091
- 'wppa_copyright_on' => 'yes', // 19
1092
- 'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
1093
- 'wppa_watermark_user' => 'no',
1094
- 'wppa_name_user' => 'yes',
1095
- 'wppa_name_user_mandatory' => 'no',
1096
- 'wppa_apply_newphoto_desc_user' => 'no',
1097
- 'wppa_desc_user' => 'yes',
1098
- 'wppa_desc_user_mandatory' => 'no',
1099
- 'wppa_fe_custom_fields' => 'no',
1100
- 'wppa_fe_upload_tags' => 'no',
1101
- 'wppa_up_tagselbox_on_1' => 'yes', // 18
1102
- 'wppa_up_tagselbox_multi_1' => 'yes',
1103
- 'wppa_up_tagselbox_title_1' => __( 'Select tags:' , 'wp-photo-album-plus'),
1104
- 'wppa_up_tagselbox_content_1' => '',
1105
- 'wppa_up_tagselbox_on_2' => 'no',
1106
- 'wppa_up_tagselbox_multi_2' => 'yes',
1107
- 'wppa_up_tagselbox_title_2' => __( 'Select tags:' , 'wp-photo-album-plus'),
1108
- 'wppa_up_tagselbox_content_2' => '',
1109
- 'wppa_up_tagselbox_on_3' => 'no',
1110
- 'wppa_up_tagselbox_multi_3' => 'yes',
1111
- 'wppa_up_tagselbox_title_3' => __( 'Select tags:' , 'wp-photo-album-plus'),
1112
- 'wppa_up_tagselbox_content_3' => '',
1113
- 'wppa_up_tag_input_on' => 'yes',
1114
- 'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
1115
- 'wppa_up_tagbox_new' => '',
1116
- 'wppa_up_tag_preview' => 'yes',
1117
- 'wppa_camera_connect' => 'yes',
1118
- 'wppa_blog_it' => '-none-',
1119
- 'wppa_blog_it_moderate' => 'yes',
1120
- 'wppa_blog_it_shortcode' => '[wppa type="mphoto" photo="#id"]',
1121
-
1122
- // J Custom datafields
1123
- 'wppa_album_custom_fields' => 'no',
1124
- 'wppa_album_custom_caption_0' => '',
1125
- 'wppa_album_custom_visible_0' => 'no',
1126
- 'wppa_album_custom_edit_0' => 'no',
1127
- 'wppa_album_custom_caption_1' => '',
1128
- 'wppa_album_custom_visible_1' => 'no',
1129
- 'wppa_album_custom_edit_1' => 'no',
1130
- 'wppa_album_custom_caption_2' => '',
1131
- 'wppa_album_custom_visible_2' => 'no',
1132
- 'wppa_album_custom_edit_2' => 'no',
1133
- 'wppa_album_custom_caption_3' => '',
1134
- 'wppa_album_custom_visible_3' => 'no',
1135
- 'wppa_album_custom_edit_3' => 'no',
1136
- 'wppa_album_custom_caption_4' => '',
1137
- 'wppa_album_custom_visible_4' => 'no',
1138
- 'wppa_album_custom_edit_4' => 'no',
1139
- 'wppa_album_custom_caption_5' => '',
1140
- 'wppa_album_custom_visible_5' => 'no',
1141
- 'wppa_album_custom_edit_5' => 'no',
1142
- 'wppa_album_custom_caption_6' => '',
1143
- 'wppa_album_custom_visible_6' => 'no',
1144
- 'wppa_album_custom_edit_6' => 'no',
1145
- 'wppa_album_custom_caption_7' => '',
1146
- 'wppa_album_custom_visible_7' => 'no',
1147
- 'wppa_album_custom_edit_7' => 'no',
1148
- 'wppa_album_custom_caption_8' => '',
1149
- 'wppa_album_custom_visible_8' => 'no',
1150
- 'wppa_album_custom_edit_8' => 'no',
1151
- 'wppa_album_custom_caption_9' => '',
1152
- 'wppa_album_custom_visible_9' => 'no',
1153
- 'wppa_album_custom_edit_9' => 'no',
1154
-
1155
- 'wppa_custom_fields' => 'no',
1156
- 'wppa_custom_caption_0' => '',
1157
- 'wppa_custom_visible_0' => 'no',
1158
- 'wppa_custom_edit_0' => 'no',
1159
- 'wppa_custom_caption_1' => '',
1160
- 'wppa_custom_visible_1' => 'no',
1161
- 'wppa_custom_edit_1' => 'no',
1162
- 'wppa_custom_caption_2' => '',
1163
- 'wppa_custom_visible_2' => 'no',
1164
- 'wppa_custom_edit_2' => 'no',
1165
- 'wppa_custom_caption_3' => '',
1166
- 'wppa_custom_visible_3' => 'no',
1167
- 'wppa_custom_edit_3' => 'no',
1168
- 'wppa_custom_caption_4' => '',
1169
- 'wppa_custom_visible_4' => 'no',
1170
- 'wppa_custom_edit_4' => 'no',
1171
- 'wppa_custom_caption_5' => '',
1172
- 'wppa_custom_visible_5' => 'no',
1173
- 'wppa_custom_edit_5' => 'no',
1174
- 'wppa_custom_caption_6' => '',
1175
- 'wppa_custom_visible_6' => 'no',
1176
- 'wppa_custom_edit_6' => 'no',
1177
- 'wppa_custom_caption_7' => '',
1178
- 'wppa_custom_visible_7' => 'no',
1179
- 'wppa_custom_edit_7' => 'no',
1180
- 'wppa_custom_caption_8' => '',
1181
- 'wppa_custom_visible_8' => 'no',
1182
- 'wppa_custom_edit_8' => 'no',
1183
- 'wppa_custom_caption_9' => '',
1184
- 'wppa_custom_visible_9' => 'no',
1185
- 'wppa_custom_edit_9' => 'no',
1186
-
1187
-
1188
- 'wppa_close_text' => 'Close', // frontend upload/edit etc
1189
-
1190
- 'wppa_icon_corner_style' => 'medium',
1191
- 'wppa_spinner_shape' => 'default',
1192
- 'wppa_show_dashboard_widgets' => 'all',
1193
- 'wppa_audio_icon' => 'Music-Note-1.svg',
1194
- 'wppa_video_icon' => 'Film-Clapper.svg',
1195
- 'wppa_document_icon' => 'Document-File.svg',
1196
- 'wppa_icon_size_multimedia' => 'M',
1197
- 'wppa_multimedia_icon_upload' => '',
1198
-
1199
- // Table III: Backgrounds
1200
- 'wppa_bgcolor_even' => '#eeeeee',
1201
- 'wppa_bcolor_even' => '#cccccc',
1202
- 'wppa_bgcolor_alt' => '#dddddd',
1203
- 'wppa_bcolor_alt' => '#bbbbbb',
1204
- 'wppa_bgcolor_thumbnail' => '#000000',
1205
- // 'wppa_bcolor_thumbnail' => '#000000',
1206
- 'wppa_bgcolor_nav' => '#dddddd',
1207
- 'wppa_bcolor_nav' => '#bbbbbb',
1208
- 'wppa_bgcolor_namedesc' => '#dddddd',
1209
- 'wppa_bcolor_namedesc' => '#bbbbbb',
1210
- 'wppa_bgcolor_com' => '#dddddd',
1211
- 'wppa_bcolor_com' => '#bbbbbb',
1212
- 'wppa_bgcolor_img' => '#eeeeee',
1213
- 'wppa_bcolor_img' => '',
1214
- 'wppa_bgcolor_fullimg' => '#cccccc',
1215
- 'wppa_bcolor_fullimg' => '#777777',
1216
- 'wppa_bgcolor_cus' => '#dddddd',
1217
- 'wppa_bcolor_cus' => '#bbbbbb',
1218
- 'wppa_bgcolor_numbar' => '#cccccc',
1219
- 'wppa_bcolor_numbar' => '#cccccc',
1220
- 'wppa_bgcolor_numbar_active' => '#333333',
1221
- 'wppa_bcolor_numbar_active' => '#333333',
1222
- 'wppa_bgcolor_iptc' => '#dddddd',
1223
- 'wppa_bcolor_iptc' => '#bbbbbb',
1224
- 'wppa_bgcolor_exif' => '#dddddd',
1225
- 'wppa_bcolor_exif' => '#bbbbbb',
1226
- 'wppa_bgcolor_share' => '#dddddd',
1227
- 'wppa_bcolor_share' => '#bbbbbb',
1228
- 'wppa_bgcolor_upload' => '#dddddd',
1229
- 'wppa_bcolor_upload' => '#bbbbbb',
1230
- 'wppa_bgcolor_multitag' => '#dddddd',
1231
- 'wppa_bcolor_multitag' => '#bbbbbb',
1232
- 'wppa_bgcolor_tagcloud' => '#dddddd',
1233
- 'wppa_bcolor_tagcloud' => '#bbbbbb',
1234
- 'wppa_bgcolor_superview' => '#dddddd',
1235
- 'wppa_bcolor_superview' => '#bbbbbb',
1236
- 'wppa_bgcolor_search' => '#dddddd',
1237
- 'wppa_bcolor_search' => '#bbbbbb',
1238
- 'wppa_bgcolor_calendar' => '#dddddd',
1239
- 'wppa_bcolor_calendar' => '#bbbbbb',
1240
- 'wppa_bgcolor_bestof' => '#dddddd',
1241
- 'wppa_bcolor_bestof' => '#bbbbbb',
1242
- 'wppa_bgcolor_stereo' => '#dddddd',
1243
- 'wppa_bcolor_stereo' => '#bbbbbb',
1244
- 'wppa_bgcolor_adminschoice' => '#dddddd',
1245
- 'wppa_bcolor_adminschoice' => '#bbbbbb',
1246
- 'wppa_bgcolor_modal' => '#ffffff',
1247
- 'wppa_bcolor_modal' => '#ffffff',
1248
- 'wppa_svg_color' => '#666666',
1249
- 'wppa_svg_bg_color' => 'transparent',
1250
- 'wppa_ovl_svg_color' => '#999999',
1251
- 'wppa_ovl_svg_bg_color' => 'transparent',
1252
-
1253
- // Table IV: Behaviour
1254
- // A System
1255
- 'wppa_allow_ajax' => 'yes',
1256
- 'wppa_ajax_non_admin' => 'yes',
1257
- 'wppa_ajax_render_modal' => 'no',
1258
- 'wppa_use_photo_names_in_urls' => 'no',
1259
- 'wppa_use_album_names_in_urls' => 'no',
1260
- 'wppa_use_short_qargs' => 'yes',
1261
- 'wppa_use_pretty_links' => 'classic',
1262
- 'wppa_use_encrypted_links' => 'no',
1263
- 'wppa_refuse_unencrypted' => 'no',
1264
- 'wppa_update_addressline' => 'yes',
1265
- 'wppa_render_shortcode_always' => 'no',
1266
- 'wppa_track_viewcounts' => 'yes',
1267
- 'wppa_track_clickcounts' => 'no',
1268
- 'wppa_auto_page' => 'no',
1269
- 'wppa_auto_page_type' => 'photo',
1270
- 'wppa_auto_page_links' => 'bottom',
1271
- 'wppa_defer_javascript' => 'yes',
1272
- 'wppa_inline_css' => 'yes',
1273
- 'wppa_custom_style' => '',
1274
- 'wppa_custom_style_chrome' => '',
1275
- 'wppa_custom_style_firefox' => '',
1276
- 'wppa_custom_style_safari' => '',
1277
- 'wppa_custom_style_edge' => '',
1278
- 'wppa_custom_style_ie' => '',
1279
- 'wppa_custom_style_opera' => '',
1280
- 'wppa_use_custom_style_file' => 'no',
1281
- // 'wppa_js_css_optional' => 'no',
1282
- 'wppa_enable_pdf' => 'no', // IV-A30
1283
- 'wppa_use_custom_theme_file' => 'no',
1284
- 'wppa_cre_uploads_htaccess' => 'remove',
1285
- 'wppa_debug_trace_on' => 'no',
1286
- // 'wppa_lazy_or_htmlcomp' => 'no',
1287
- 'wppa_relative_urls' => 'no',
1288
- 'wppa_lazy' => 'no',
1289
-
1290
- 'wppa_thumbs_first' => 'no',
1291
- 'wppa_login_links' => 'yes',
1292
- 'wppa_enable_video' => 'yes',
1293
- 'wppa_enable_audio' => 'yes',
1294
- 'wppa_enable_stereo' => 'no',
1295
- 'wppa_enable_panorama' => 'no',
1296
-
1297
- 'wppa_capitalize_tags' => 'yes',
1298
- 'wppa_enable_admins_choice' => 'no',
1299
- 'wppa_owner_to_name' => 'no',
1300
-
1301
- 'wppa_nicescroll_window' => 'no',
1302
- 'wppa_nicescroll_opts' => $nso,
1303
- 'wppa_response_speed' => '0',
1304
-
1305
- // B Full size and Slideshow
1306
- 'wppa_fullvalign' => 'center',
1307
- 'wppa_fullhalign' => 'center',
1308
- 'wppa_start_slide' => 'run',
1309
- 'wppa_start_slideonly' => 'yes',
1310
- 'wppa_start_slide_video' => 'no',
1311
- 'wppa_start_slide_audio' => 'no',
1312
- 'wppa_animation_type' => 'fadeover',
1313
- 'wppa_slideshow_timeout' => '2500',
1314
- 'wppa_animation_speed' => '800',
1315
- 'wppa_slide_pause' => 'no',
1316
- 'wppa_slide_wrap' => 'yes',
1317
- 'wppa_fulldesc_align' => 'center',
1318
- 'wppa_clean_pbr' => 'yes',
1319
- 'wppa_wpautop_on_desc' => 'nil',
1320
- 'wppa_auto_open_comments' => 'yes',
1321
- 'wppa_film_hover_goto' => 'no',
1322
- 'wppa_slide_swipe' => 'no',
1323
- 'wppa_slideshow_page_allow_ajax' => 'yes',
1324
- 'wppa_filmonly_continuous' => 'no',
1325
-
1326
- // C Thumbnail
1327
- 'wppa_list_photos_by' => '0',
1328
- 'wppa_thumbtype' => 'default',
1329
- 'wppa_thumbphoto_left' => 'no',
1330
- 'wppa_valign' => 'center',
1331
- 'wppa_use_thumb_opacity' => 'yes',
1332
- 'wppa_thumb_opacity' => '95',
1333
- 'wppa_use_thumb_popup' => 'yes',
1334
- 'wppa_align_thumbtext' => 'no',
1335
- 'wppa_wpautop_on_thumb_desc' => 'nil',
1336
-
1337
- // D Albums and covers
1338
- 'wppa_list_albums_by' => '0',
1339
- 'wppa_main_photo' => '0',
1340
- 'wppa_coverphoto_pos' => 'right',
1341
- 'wppa_use_cover_opacity' => 'yes',
1342
- 'wppa_cover_opacity' => '85',
1343
- 'wppa_cover_type' => 'default',
1344
- 'wppa_imgfact_count' => '10',
1345
- 'wppa_cats_inherit' => 'no',
1346
- 'wppa_wpautop_on_album_desc' => 'nil',
1347
- 'wppa_cover_use_thumb' => 'no',
1348
-
1349
- // E Rating
1350
- 'wppa_rating_login' => 'yes',
1351
- 'wppa_rating_change' => 'yes',
1352
- 'wppa_rating_multi' => 'no',
1353
- 'wppa_rating_dayly' => '0',
1354
- 'wppa_allow_owner_votes' => 'yes',
1355
- 'wppa_vote_needs_comment' => 'no',
1356
- 'wppa_dislike_value' => '-5',
1357
- 'wppa_next_on_callback' => 'no',
1358
- 'wppa_star_opacity' => '20',
1359
- 'wppa_vote_button_text' => __('Vote for me!', 'wp-photo-album-plus'),
1360
- 'wppa_voted_button_text' => __('Voted for me', 'wp-photo-album-plus'),
1361
- 'wppa_vote_thumb' => 'no',
1362
- 'wppa_medal_bronze_when' => '5',
1363
- 'wppa_medal_silver_when' => '10',
1364
- 'wppa_medal_gold_when' => '15',
1365
- 'wppa_medal_color' => '2',
1366
- 'wppa_medal_position' => 'botright',
1367
- 'wppa_topten_sortby' => 'mean_rating',
1368
-
1369
- // F Comments
1370
- 'wppa_comment_login' => 'no',
1371
- 'wppa_comment_view_login' => 'no',
1372
- 'wppa_comments_desc' => 'no',
1373
- 'wppa_moderate_comment' => '-none-',
1374
- 'wppa_comment_email_required' => 'required',
1375
- 'wppa_commentprevious' => 'no',
1376
- 'wppa_commentapproved' => 'no',
1377
- 'wppa_commentapproved_text' => '',
1378
- 'wppa_commentapproved_subj' => '',
1379
- 'wppa_commentnotify_added' => 'yes',
1380
- 'wppa_comten_alt_display' => 'no',
1381
- 'wppa_comten_alt_thumbsize' => '75',
1382
- 'wppa_comment_smiley_picker' => 'no',
1383
- // 'wppa_mail_upl_email' => 'yes',
1384
- 'wppa_comment_clickable' => 'no',
1385
- 'wppa_comment_need_db_agree' => 'no',
1386
- 'wppa_comment_need_vote' => 'no',
1387
-
1388
- // G Overlay
1389
- 'wppa_ovl_opacity' => '80',
1390
- 'wppa_ovl_onclick' => 'none',
1391
- 'wppa_ovl_browse_on_click' => 'no',
1392
- 'wppa_ovl_anim' => '300',
1393
- 'wppa_ovl_slide' => '5000',
1394
- // 'wppa_ovl_chrome_at_top' => 'yes',
1395
- 'wppa_lightbox_global' => 'no',
1396
- 'wppa_lightbox_global_set' => 'no',
1397
- 'wppa_lb_hres' => 'no',
1398
- 'wppa_ovl_video_start' => 'yes',
1399
- 'wppa_ovl_audio_start' => 'yes',
1400
- 'wppa_ovl_mode_initial' => 'normal',
1401
- 'wppa_ovl_mode_initial_mob' => 'padded',
1402
-
1403
- // H Panorama
1404
- 'wppa_panorama_control' => 'all',
1405
- 'wppa_panorama_manual' => 'all',
1406
- 'wppa_panorama_autorun' => 'none',
1407
- 'wppa_panorama_autorun_speed' => '3',
1408
- 'wppa_panorama_wheel_sensitivity' => '3',
1409
-
1410
- // Table V: Fonts
1411
- 'wppa_fontfamily_title' => '',
1412
- 'wppa_fontsize_title' => '',
1413
- 'wppa_fontcolor_title' => '',
1414
- 'wppa_fontweight_title' => 'bold',
1415
- 'wppa_fontfamily_fulldesc' => '',
1416
- 'wppa_fontsize_fulldesc' => '',
1417
- 'wppa_fontcolor_fulldesc' => '',
1418
- 'wppa_fontweight_fulldesc' => 'normal',
1419
- 'wppa_fontfamily_fulltitle' => '',
1420
- 'wppa_fontsize_fulltitle' => '',
1421
- 'wppa_fontcolor_fulltitle' => '',
1422
- 'wppa_fontweight_fulltitle' => 'normal',
1423
- 'wppa_fontfamily_nav' => '',
1424
- 'wppa_fontsize_nav' => '',
1425
- 'wppa_fontcolor_nav' => '',
1426
- 'wppa_fontweight_nav' => 'normal',
1427
- 'wppa_fontfamily_thumb' => '',
1428
- 'wppa_fontsize_thumb' => '',
1429
- 'wppa_fontcolor_thumb' => '',
1430
- 'wppa_fontweight_thumb' => 'normal',
1431
- 'wppa_fontfamily_box' => '',
1432
- 'wppa_fontsize_box' => '',
1433
- 'wppa_fontcolor_box' => '',
1434
- 'wppa_fontweight_box' => 'normal',
1435
- 'wppa_fontfamily_numbar' => '',
1436
- 'wppa_fontsize_numbar' => '',
1437
- 'wppa_fontcolor_numbar' => '#777777',
1438
- 'wppa_fontweight_numbar' => 'normal',
1439
- 'wppa_fontfamily_numbar_active' => '',
1440
- 'wppa_fontsize_numbar_active' => '',
1441
- 'wppa_fontcolor_numbar_active' => '#777777',
1442
- 'wppa_fontweight_numbar_active' => 'bold',
1443
- 'wppa_fontfamily_lightbox' => '',
1444
- 'wppa_fontsize_lightbox' => '10',
1445
- 'wppa_fontcolor_lightbox' => '',
1446
- 'wppa_fontweight_lightbox' => 'bold',
1447
- 'wppa_fontsize_widget_thumb' => '9',
1448
-
1449
- // Table VI: Links
1450
- 'wppa_sphoto_linktype' => 'photo',
1451
- 'wppa_sphoto_linkpage' => '0',
1452
- 'wppa_sphoto_blank' => 'no',
1453
- 'wppa_sphoto_overrule' => 'no',
1454
-
1455
- 'wppa_mphoto_linktype' => 'photo',
1456
- 'wppa_mphoto_linkpage' => '0',
1457
- 'wppa_mphoto_blank' => 'no',
1458
- 'wppa_mphoto_overrule' => 'no',
1459
-
1460
- 'wppa_xphoto_linktype' => 'photo',
1461
- 'wppa_xphoto_linkpage' => '0',
1462
- 'wppa_xphoto_blank' => 'no',
1463
- 'wppa_xphoto_overrule' => 'no',
1464
-
1465
- 'wppa_thumb_linktype' => 'photo',
1466
- 'wppa_thumb_linkpage' => '0',
1467
- 'wppa_thumb_blank' => 'no',
1468
- 'wppa_thumb_overrule' => 'no',
1469
-
1470
- 'wppa_topten_widget_linktype' => 'photo',
1471
- 'wppa_topten_widget_linkpage' => '0',
1472
- 'wppa_topten_blank' => 'no',
1473
- 'wppa_topten_overrule' => 'no',
1474
-
1475
- 'wppa_topten_widget_album_linkpage' => '0',
1476
-
1477
- 'wppa_featen_widget_linktype' => 'photo',
1478
- 'wppa_featen_widget_linkpage' => '0',
1479
- 'wppa_featen_blank' => 'no',
1480
- 'wppa_featen_overrule' => 'no',
1481
-
1482
- 'wppa_slideonly_widget_linktype' => 'widget',
1483
- 'wppa_slideonly_widget_linkpage' => '0',
1484
- 'wppa_sswidget_blank' => 'no',
1485
- 'wppa_sswidget_overrule' => 'no',
1486
-
1487
- 'wppa_potd_linktype' => 'single',
1488
- 'wppa_potd_linkpage' => '0',
1489
- 'wppa_potd_blank' => 'no',
1490
- 'wppa_potdwidget_overrule' => 'no',
1491
-
1492
- 'wppa_coverimg_linktype' => 'same',
1493
- 'wppa_coverimg_linkpage' => '0',
1494
- 'wppa_coverimg_blank' => 'no',
1495
- 'wppa_coverimg_overrule' => 'no',
1496
-
1497
- 'wppa_comment_widget_linktype' => 'photo',
1498
- 'wppa_comment_widget_linkpage' => '0',
1499
- 'wppa_comment_blank' => 'no',
1500
- 'wppa_comment_overrule' => 'no',
1501
-
1502
- 'wppa_slideshow_linktype' => 'none',
1503
- 'wppa_slideshow_linkpage' => '0',
1504
- 'wppa_slideshow_blank' => 'no',
1505
- 'wppa_slideshow_overrule' => 'no',
1506
-
1507
- 'wppa_thumbnail_widget_linktype' => 'photo',
1508
- 'wppa_thumbnail_widget_linkpage' => '0',
1509
- 'wppa_thumbnail_widget_overrule' => 'no',
1510
- 'wppa_thumbnail_widget_blank' => 'no',
1511
-
1512
- 'wppa_film_linktype' => 'slideshow',
1513
- 'wppa_film_blank' => 'no',
1514
- 'wppa_film_overrule' => 'no',
1515
-
1516
- 'wppa_lasten_widget_linktype' => 'photo',
1517
- 'wppa_lasten_widget_linkpage' => '0',
1518
- 'wppa_lasten_blank' => 'no',
1519
- 'wppa_lasten_overrule' => 'no',
1520
-
1521
- 'wppa_art_monkey_link' => 'none',
1522
- 'wppa_art_monkey_popup_link' => 'file',
1523
- 'wppa_artmonkey_use_source' => 'no',
1524
- 'wppa_art_monkey_display' => 'button',
1525
- 'wppa_art_monkey_on_lightbox' => 'no',
1526
-
1527
- 'wppa_allow_download_album' => 'no',
1528
- 'wppa_download_album_source' => 'yes',
1529
-
1530
- 'wppa_album_widget_linktype' => 'content',
1531
- 'wppa_album_widget_linkpage' => '0',
1532
- 'wppa_album_widget_blank' => 'no',
1533
-
1534
- 'wppa_tagcloud_linktype' => 'album',
1535
- 'wppa_tagcloud_linkpage' => '0',
1536
- 'wppa_tagcloud_blank' => 'no',
1537
-
1538
- 'wppa_multitag_linktype' => 'album',
1539
- 'wppa_multitag_linkpage' => '0',
1540
- 'wppa_multitag_blank' => 'no',
1541
-
1542
- 'wppa_super_view_linkpage' => '0',
1543
-
1544
- 'wppa_upldr_widget_linkpage' => '0',
1545
-
1546
- 'wppa_bestof_widget_linkpage' => '0',
1547
-
1548
- 'wppa_supersearch_linkpage' => '0',
1549
-
1550
- 'wppa_album_navigator_widget_linktype' => 'thumbs',
1551
- 'wppa_album_navigator_widget_linkpage' => '0',
1552
-
1553
- 'wppa_widget_sm_linktype' => 'landing',
1554
- 'wppa_widget_sm_linkpage' => '0',
1555
- 'wppa_widget_sm_linkpage_oc' => '1',
1556
- 'wppa_tagcloud_linkpage_oc' => '1',
1557
- 'wppa_multitag_linkpage_oc' => '1',
1558
-
1559
- 'wppa_cover_sublinks' => 'none',
1560
- 'wppa_cover_sublinks_display' => 'none',
1561
- 'wppa_real_calendar_linktype' => 'lightbox',
1562
-
1563
- // Table VII: Security
1564
- // B
1565
- 'wppa_owner_only' => 'yes',
1566
- 'wppa_upload_owner_only' => 'yes',
1567
- 'wppa_user_album_edit_on' => 'no',
1568
- 'wppa_upload_moderate' => 'no',
1569
- 'wppa_fe_upload_private' => 'no',
1570
- 'wppa_photoapproved' => 'no',
1571
- 'wppa_upload_edit' => '-none-',
1572
- 'wppa_upload_edit_users' => 'admin',
1573
- 'wppa_upload_edit_period' => '0',
1574
- 'wppa_upload_edit_theme_css' => 'no',
1575
- 'wppa_fe_edit_name' => 'yes',
1576
- 'wppa_fe_edit_desc' => 'yes',
1577
- 'wppa_fe_edit_tags' => 'yes',
1578
- 'wppa_fe_edit_button' => __( 'Edit', 'wp-photo-album-plus' ),
1579
- 'wppa_fe_edit_caption' => __( 'Edit photo information', 'wp-photo-album-plus' ),
1580
- 'wppa_upload_delete' => 'no',
1581
- 'wppa_upload_delete_period' => '0',
1582
- 'wppa_owner_moderate_comment' => 'no',
1583
- 'wppa_upload_backend_notify' => 'no',
1584
- 'wppa_upload_one_only' => 'no',
1585
- 'wppa_memcheck' => 'yes',
1586
- 'wppa_memcheck_copy' => 'yes',
1587
- 'wppa_comment_captcha' => 'none',
1588
- 'wppa_spam_maxage' => 'none',
1589
- 'wppa_user_create_on' => 'no',
1590
- 'wppa_user_create_login' => 'yes',
1591
- 'wppa_user_create_captcha' => 'yes', // VII-B3
1592
- 'wppa_user_destroy_on' => 'no',
1593
- 'wppa_upload_frontend_minsize' => '0',
1594
- 'wppa_upload_frontend_maxsize' => '0',
1595
- 'wppa_void_dups' => 'no',
1596
- 'wppa_home_after_upload' => 'no',
1597
- 'wppa_fe_alert' => 'all',
1598
- 'wppa_fe_upload_max_albums' => '500', // VII-B13
1599
-
1600
- // 'wppa_fe_create_ntfy' => '', // VII-B1.3
1601
-
1602
- 'wppa_editor_upload_limit_count' => '0',
1603
- 'wppa_editor_upload_limit_time' => '0',
1604
- 'wppa_author_upload_limit_count' => '0',
1605
- 'wppa_author_upload_limit_time' => '0',
1606
- 'wppa_contributor_upload_limit_count' => '0',
1607
- 'wppa_contributor_upload_limit_time' => '0',
1608
- 'wppa_subscriber_upload_limit_count' => '0',
1609
- 'wppa_subscriber_upload_limit_time' => '0',
1610
- 'wppa_loggedout_upload_limit_count' => '0',
1611
- 'wppa_loggedout_upload_limit_time' => '0',
1612
-
1613
- 'wppa_role_limit_per_album' => 'no',
1614
-
1615
- 'wppa_blacklist_user' => '',
1616
- 'wppa_un_blacklist_user' => '',
1617
- 'wppa_photo_owner_change' => 'no',
1618
- 'wppa_superuser_user' => '',
1619
- 'wppa_un_superuser_user' => '',
1620
- 'wppa_no_rightclick' => 'no',
1621
-
1622
- // Table VIII: Actions
1623
- // A Harmless
1624
- // 'wppa_maint_ignore_concurrency_error' => 'no', // 0.1
1625
- 'wppa_maint_ignore_cron' => 'no', // 0.2
1626
- 'wppa_setup' => '', // 1
1627
- 'wppa_backup_filename' => '',
1628
- 'wppa_backup' => '',
1629
- 'wppa_load_skin' => '',
1630
- 'wppa_skinfile' => 'default',
1631
- 'wppa_regen_thumbs' => '',
1632
- 'wppa_regen_thumbs_skip_one' => '',
1633
- 'wppa_rerate' => '',
1634
- 'wppa_cleanup' => '',
1635
- 'wppa_recup' => '',
1636
- 'wppa_format_exif' => '',
1637
- 'wppa_file_system' => 'flat',
1638
- 'wppa_remake' => '',
1639
- 'wppa_remake_orientation_only' => 'no',
1640
- 'wppa_remake_missing_only' => 'no',
1641
- 'wppa_remake_skip_one' => '',
1642
- 'wppa_errorlog_purge' => '',
1643
- 'wppa_comp_sizes' => '',
1644
- 'wppa_crypt_photos' => '',
1645
- 'wppa_crypt_photos_every' => '0',
1646
- 'wppa_crypt_albums' => '',
1647
- 'wppa_crypt_albums_every' => '0',
1648
- 'wppa_create_o1_files' => '',
1649
- 'wppa_create_o1_files_skip_one' => '',
1650
- 'wppa_owner_to_name_proc' => '',
1651
-
1652
- // B Irreversable
1653
- 'wppa_rating_clear' => 'no',
1654
- 'wppa_viewcount_clear' => 'no',
1655
- 'wppa_iptc_clear' => '',
1656
- 'wppa_exif_clear' => '',
1657
- 'wppa_apply_default_photoname_all' => '',
1658
- 'wppa_apply_new_photodesc_all' => '',
1659
- 'wppa_remake_index_albums' => '', // 8.1
1660
- 'wppa_remake_index_albums_ad_inf' => 'no', // 8.1
1661
- 'wppa_remake_index_photos' => '', // 8.2
1662
- 'wppa_remake_index_photos_ad_inf' => 'no', // 8.2
1663
- 'wppa_cleanup_index' => '', // 8.3
1664
- 'wppa_cleanup_index_ad_inf' => 'no', // 8.3
1665
- 'wppa_list_index' => '',
1666
- 'wppa_list_index_display_start' => '',
1667
- 'wppa_list_comments_by' => 'name',
1668
- 'wppa_append_text' => '',
1669
- 'wppa_append_to_photodesc' => '',
1670
- 'wppa_remove_text' => '',
1671
- 'wppa_remove_from_photodesc' => '',
1672
- 'wppa_remove_empty_albums' => '',
1673
- 'wppa_watermark_all' => '',
1674
- 'wppa_create_all_autopages' => '',
1675
- 'wppa_delete_all_autopages' => '',
1676
- 'wppa_readd_file_extensions' => '',
1677
- 'wppa_all_ext_to_lower' => '',
1678
- 'wppa_zero_numbers' => '5',
1679
- 'wppa_leading_zeros' => '',
1680
- 'wppa_add_gpx_tag' => '',
1681
- 'wppa_optimize_ewww' => '',
1682
- 'wppa_optimize_ewww_skip_one' => '',
1683
- 'wppa_tag_to_edit' => '',
1684
- 'wppa_new_tag_value' => '',
1685
- 'wppa_edit_tag' => '',
1686
- 'wppa_sync_cloud' => '',
1687
- 'wppa_sanitize_tags' => '',
1688
- 'wppa_sanitize_cats' => '',
1689
- 'wppa_move_all_photos' => '',
1690
- 'wppa_move_all_photos_from' => '',
1691
- 'wppa_move_all_photos_to' => '',
1692
- 'wppa_photos_hyphens_to_spaces' => '',
1693
- 'wppa_png_to_jpg' => '',
1694
- 'wppa_fix_mp4_meta' => '',
1695
-
1696
- 'wppa_logfile_on_menu' => 'no',
1697
-
1698
-
1699
- 'wppa_custom_photo_proc' => '', // 99
1700
- 'wppa_test_proc_ad_inf' => 'no', // 99
1701
- 'wppa_custom_album_proc' => '', // 99
1702
-
1703
-
1704
- // Table IX: Miscellaneous
1705
- // A System
1706
- 'wppa_html' => 'yes', // 1
1707
- 'wppa_allow_html_custom' => 'no',
1708
- 'wppa_check_balance' => 'no', // 2
1709
- 'wppa_allow_debug' => 'no', // 3
1710
-
1711
- 'wppa_filter_priority' => '1001', // 5
1712
- 'wppa_shortcode_priority' => '11',
1713
- 'wppa_shortcode_at_priority' => 'no',
1714
- 'wppa_shortcode_at_priority_widget' => 'no',
1715
- 'wppa_lightbox_name' => 'wppa', // 6
1716
- 'wppa_allow_foreign_shortcodes_general' => 'no',
1717
- 'wppa_allow_foreign_shortcodes' => 'no', // 7
1718
- 'wppa_allow_foreign_shortcodes_thumbs' => 'no',
1719
- // 'wppa_arrow_color' => 'black',
1720
- 'wppa_meta_page' => 'yes', // 9
1721
- 'wppa_meta_all' => 'yes', // 10
1722
- 'wppa_use_wp_editor' => 'no',
1723
- 'wppa_hier_albsel' => 'yes',
1724
- 'wppa_hier_pagesel' => 'no',
1725
- 'wppa_alt_type' => 'fullname',
1726
- 'wppa_album_admin_pagesize' => '100',
1727
- 'wppa_photo_admin_pagesize' => '20',
1728
- 'wppa_photo_admin_max_albums' => '500',
1729
- 'wppa_comment_admin_pagesize' => '10',
1730
- 'wppa_jpeg_quality' => '95',
1731
- 'wppa_geo_edit' => 'no',
1732
- 'wppa_auto_continue' => 'yes',
1733
- 'wppa_max_execution_time' => '25',
1734
- 'wppa_adminbarmenu_admin' => 'yes',
1735
- 'wppa_adminbarmenu_frontend' => 'yes',
1736
- 'wppa_feed_use_thumb' => 'no',
1737
- 'wppa_enable_shortcode_wppa_set' => 'no',
1738
- 'wppa_set_shortcodes' => 'wppa_thumbtype,wppa_tn_margin,wppa_thumbsize',
1739
-
1740
- 'wppa_og_tags_on' => 'yes',
1741
- 'wppa_add_shortcode_to_post' => 'no',
1742
- 'wppa_shortcode_to_add' => '[wppa type="album" album="#related,desc"]',
1743
- 'wppa_import_preview' => 'yes',
1744
- 'wppa_audiostub_upload' => '',
1745
- 'wppa_documentstub_upload' => '',
1746
- 'wppa_audiostub' => '',
1747
- 'wppa_confirm_create' => 'yes',
1748
- 'wppa_import_root' => ABSPATH . 'wp-content',
1749
- 'wppa_allow_import_source' => 'no',
1750
- 'wppa_enable_generator' => 'yes',
1751
- 'wppa_log_cron' => 'no', // A9.1
1752
- 'wppa_log_ajax' => 'no', // A9.2
1753
- 'wppa_log_comments' => 'no', // A9.3
1754
- 'wppa_log_fso' => 'no', // A9.4
1755
- 'wppa_log_debug' => 'no', // A9.5
1756
- 'wppa_log_email' => 'no',
1757
- 'wppa_moderate_bulk' => 'no', // B20
1758
- 'wppa_retry_mails' => '0', // A10
1759
- 'wppa_minimum_tags' => '', // A11
1760
-
1761
- 'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1762
- 'wppa_cache_root' => 'cache',
1763
- 'wppa_direct_comment' => 'no',
1764
- 'wppa_extended_resize_count' => '1',
1765
- 'wppa_extended_resize_delay' => '200',
1766
- 'wppa_load_nicescroller' => 'no',
1767
-
1768
- // IX D New
1769
- 'wppa_max_album_newtime' => '0', // 1
1770
- 'wppa_max_photo_newtime' => '0', // 2
1771
- 'wppa_max_album_modtime' => '0', // 1
1772
- 'wppa_max_photo_modtime' => '0', // 2
1773
- 'wppa_new_mod_label_is_text' => 'yes',
1774
- 'wppa_lasten_limit_new' => 'no',
1775
- 'wppa_lasten_use_modified' => 'no',
1776
- 'wppa_new_label_text' => __('NEW', 'wp-photo-album-plus'),
1777
- 'wppa_new_label_color' => 'orange',
1778
- 'wppa_mod_label_text' => __('MODIFIED', 'wp-photo-album-plus'),
1779
- 'wppa_mod_label_color' => 'green',
1780
- 'wppa_new_label_url' => wppa_get_imgdir('new.png'),
1781
- 'wppa_mod_label_url' => wppa_get_imgdir('new.png'),
1782
- 'wppa_apply_newphoto_desc' => 'no', // IX-D3
1783
- 'wppa_newphoto_description' => $npd, // IX-D5
1784
- 'wppa_newphoto_owner' => '', // IX-D5.1
1785
- 'wppa_upload_limit_count' => '0', // IX-D6a
1786
- 'wppa_upload_limit_time' => '0', // IX-D6b
1787
- 'wppa_show_album_full' => 'yes',
1788
- 'wppa_grant_an_album' => 'no',
1789
- 'wppa_grant_name' => 'display',
1790
- 'wppa_grant_parent_sel_method' => 'selectionbox',
1791
- 'wppa_grant_parent' => '-1',
1792
- 'wppa_grant_cats' => '',
1793
- 'wppa_grant_tags' => '',
1794
- 'wppa_default_parent' => '0',
1795
- 'wppa_default_parent_always' => 'no',
1796
-
1797
- 'wppa_max_albums' => '0',
1798
- 'wppa_alt_is_restricted' => 'no',
1799
- 'wppa_link_is_restricted' => 'no',
1800
- 'wppa_covertype_is_restricted' => 'no',
1801
- 'wppa_porder_restricted' => 'no',
1802
- 'wppa_reup_is_restricted' => 'yes',
1803
- 'wppa_newtags_is_restricted' => 'no',
1804
-
1805
- // 'wppa_strip_file_ext' => 'no',
1806
- 'wppa_newphoto_name_method' => 'filename',
1807
- 'wppa_default_coverimage_name' => 'Coverphoto',
1808
-
1809
- 'wppa_copy_timestamp' => 'no',
1810
- 'wppa_copy_owner' => 'no',
1811
- 'wppa_frontend_album_public' => 'no',
1812
- 'wppa_optimize_new' => 'no',
1813
- 'wppa_default_album_linktype' => 'content',
1814
- 'wppa_sanitize_import' => 'no',
1815
- 'wppa_remove_accents' => 'yes',
1816
-
1817
- // E Search
1818
- 'wppa_search_linkpage' => '0', // 1
1819
- 'wppa_search_oc' => '1',
1820
- 'wppa_excl_sep' => 'no', // 2
1821
- 'wppa_search_tags' => 'no',
1822
- 'wppa_search_cats' => 'no',
1823
- 'wppa_search_comments' => 'no',
1824
- 'wppa_photos_only' => 'no', // 3
1825
- 'wppa_max_search_photos' => '250',
1826
- 'wppa_max_search_albums' => '25',
1827
- 'wppa_tags_or_only' => 'no',
1828
- 'wppa_tags_not_on' => 'no',
1829
- 'wppa_wild_front' => 'no',
1830
- 'wppa_search_display_type' => 'content',
1831
- 'wppa_ss_name_max' => '0',
1832
- 'wppa_ss_text_max' => '0',
1833
- 'wppa_search_toptext' => '',
1834
- 'wppa_search_in_section' => __( 'Search in current section', 'wp-photo-album-plus' ),
1835
- 'wppa_search_in_results' => __( 'Search in current results', 'wp-photo-album-plus' ),
1836
- 'wppa_search_min_length' => '2', // 18
1837
- 'wppa_search_user_void' => 'times,views,wp-content,wp,content,wppa-pl,wppa,pl',
1838
- 'wppa_search_numbers_void' => 'no',
1839
- 'wppa_index_ignore_slash' => 'no',
1840
- // 'wppa_index_skips' => '', // Do not add, this is an array
1841
- 'wppa_search_catbox' => 'no',
1842
- 'wppa_search_selboxes' => '0',
1843
- 'wppa_search_caption_0' => '',
1844
- 'wppa_search_selbox_0' => '',
1845
- 'wppa_search_caption_1' => '',
1846
- 'wppa_search_selbox_1' => '',
1847
- 'wppa_search_caption_2' => '',
1848
- 'wppa_search_selbox_2' => '',
1849
- 'wppa_extended_duplicate_remove' => 'no',
1850
- 'wppa_search_placeholder' => __( 'Search photos &hellip;', 'wp-photo-album-plus' ),
1851
- 'wppa_search_form_method' => 'post',
1852
-
1853
- // F Watermark
1854
- 'wppa_watermark_on' => 'no',
1855
- 'wppa_watermark_file' => 'specimen.png',
1856
- 'wppa_watermark_pos' => 'cencen',
1857
- 'wppa_textual_watermark_type' => 'tvstyle',
1858
- 'wppa_textual_watermark_text' => "Copyright (c) 2014 w#site \n w#filename (w#owner)",
1859
- 'wppa_textual_watermark_font' => 'system',
1860
- 'wppa_textual_watermark_size' => '10',
1861
- 'wppa_watermark_fgcol_text' => '#000000',
1862
- 'wppa_watermark_bgcol_text' => '#ffffff',
1863
- 'wppa_watermark_upload' => '',
1864
- 'wppa_watermark_opacity' => '20',
1865
- 'wppa_watermark_opacity_text' => '80',
1866
- 'wppa_watermark_thumbs' => 'no',
1867
- 'wppa_watermark_preview' => '',
1868
- 'wppa_watermark_size' => '0',
1869
- 'wppa_watermark_margin' => '0',
1870
-
1871
- // G Slide order
1872
- 'wppa_slide_order' => '0,1,2,3,4,5,6,7,8,9,10',
1873
- 'wppa_slide_order_split' => '0,1,2,3,4,5,6,7,8,9,10,11',
1874
- 'wppa_swap_namedesc' => 'no',
1875
- 'wppa_split_namedesc' => 'no',
1876
-
1877
- // H Source file management and import/upload
1878
- 'wppa_keep_source_admin' => 'yes',
1879
- 'wppa_keep_source_frontend' => 'yes',
1880
- 'wppa_source_dir' => WPPA_ABSPATH.WPPA_UPLOAD.'/wppa-source',
1881
- 'wppa_keep_sync' => 'yes',
1882
- 'wppa_remake_add' => 'yes',
1883
- 'wppa_save_iptc' => 'yes',
1884
- 'wppa_save_exif' => 'yes',
1885
- // 'wppa_exif_max_array_size' => '10',
1886
- 'wppa_chgsrc_is_restricted' => 'no',
1887
- 'wppa_ext_status_restricted' => 'no',
1888
- 'wppa_desc_is_restricted' => 'no',
1889
- 'wppa_newpag_create' => 'no',
1890
- 'wppa_newpag_content' => '[wppa type="cover" album="w#album" align="center"]',
1891
- 'wppa_newpag_type' => 'page',
1892
- 'wppa_newpag_status' => 'publish',
1893
- 'wppa_pl_dirname' => 'wppa-pl',
1894
- 'wppa_import_parent_check' => 'yes',
1895
- 'wppa_keep_import_files' => 'no',
1896
-
1897
- // J Other plugins
1898
- 'wppa_cp_points_comment' => '0',
1899
- 'wppa_cp_points_comment_appr' => '0',
1900
- 'wppa_cp_points_rating' => '0',
1901
- 'wppa_cp_points_upload' => '0',
1902
- 'wppa_use_scabn' => 'no',
1903
- 'wppa_use_CMTooltipGlossary' => 'no',
1904
- 'wppa_photo_on_bbpress' => 'no',
1905
- 'wppa_domain_link_buddypress' => 'no',
1906
-
1907
- // K External services
1908
- 'wppa_cdn_service' => '',
1909
- 'wppa_cdn_cloud_name' => '',
1910
- 'wppa_cdn_api_key' => '',
1911
- 'wppa_cdn_api_secret' => '',
1912
- 'wppa_cdn_service_update' => 'no',
1913
- 'wppa_delete_all_from_cloudinary' => '',
1914
- 'wppa_delete_derived_from_cloudinary' => '',
1915
- 'wppa_max_cloud_life' => '0',
1916
- 'wppa_gpx_implementation' => 'none',
1917
- 'wppa_map_height' => '300',
1918
- 'wppa_map_apikey' => '',
1919
- 'wppa_load_map_api' => 'no',
1920
- 'wppa_gpx_shortcode' => '[map style="width: auto; height:300px; margin:0; " marker="yes" lat="w#lat" lon="w#lon"]',
1921
- 'wppa_geo_zoom' => '10',
1922
- 'wppa_fotomoto_on' => 'no',
1923
- 'wppa_fotomoto_fontsize' => '',
1924
- 'wppa_fotomoto_hide_when_running' => 'no',
1925
- 'wppa_fotomoto_min_width' => '400',
1926
- 'wppa_image_magick' => '',
1927
-
1928
- // L photo shortcode
1929
- 'wppa_photo_shortcode_enabled' => 'yes',
1930
- 'wppa_photo_shortcode_type' => 'mphoto',
1931
- 'wppa_photo_shortcode_size' => '350',
1932
- 'wppa_photo_shortcode_align' => 'center',
1933
- 'wppa_photo_shortcode_fe_type' => '-none-',
1934
- 'wppa_photo_shortcode_random_albums' => '-2',
1935
- 'wppa_photo_shortcode_random_fixed' => 'no',
1936
- 'wppa_photo_shortcode_random_fixed_html' => 'no',
1937
-
1938
- // M Mails
1939
- 'wppa_newalbumnotify' => 'no',
1940
- 'wppa_feuploadnotify' => 'no',
1941
- 'wppa_commentnotify' => 'no',
1942
- 'wppa_commentnotify_limit' => 'no',
1943
- 'wppa_moderatephoto' => 'no',
1944
- 'wppa_moderatecomment' => 'no',
1945
-
1946
- 'wppa_void_admin_email' => 'no',
1947
- 'wppa_mailinglist_policy' => 'opt-in',
1948
- 'wppa_mailinglist_callback_url' => '',
1949
-
1950
-
1951
- // Photo of the day widget
1952
- 'wppa_potd_title' => __('Photo of the day', 'wp-photo-album-plus'),
1953
- 'wppa_potd_widget_width' => '200',
1954
- 'wppa_potd_align' => 'center',
1955
- 'wppa_potd_linkurl' => '',
1956
- 'wppa_potd_linktitle' => '',
1957
- 'wppa_potd_subtitle' => 'none',
1958
- 'wppa_potd_counter' => 'no',
1959
- 'wppa_potd_counter_link' => 'thumbs',
1960
- 'wppa_potd_album_type' => 'physical',
1961
- 'wppa_potd_album' => 'all', // All albums
1962
- 'wppa_potd_include_subs' => 'no',
1963
- 'wppa_potd_status_filter' => 'none',
1964
- 'wppa_potd_inverse' => 'no',
1965
- 'wppa_potd_method' => '4', // Change every
1966
- 'wppa_potd_period' => '24', // Day
1967
- 'wppa_potd_offset' => '0',
1968
- 'wppa_potd_photo' => '',
1969
- 'wppa_potd_preview' => 'no',
1970
- 'wppa_potd_log' => 'no',
1971
- 'wppa_potd_log_max' => '5',
1972
-
1973
-
1974
- 'wppa_widget_width' => '200', // Do we use this somewhere still?
1975
-
1976
- // Topten widget
1977
- 'wppa_toptenwidgettitle' => __('Top Ten Photos', 'wp-photo-album-plus'),
1978
-
1979
- // Thumbnail widget
1980
- 'wppa_thumbnailwidgettitle' => __('Thumbnail Photos', 'wp-photo-album-plus'),
1981
-
1982
- // Search widget
1983
- 'wppa_searchwidgettitle' => __('Search photos', 'wp-photo-album-plus'),
1984
-
1985
- // Comment admin
1986
- 'wppa_comadmin_show' => 'all',
1987
- 'wppa_comadmin_order' => 'timestamp',
1988
-
1989
- // QR code settings
1990
- 'wppa_qr_size' => '200',
1991
- 'wppa_qr_color' => '#000000',
1992
- 'wppa_qr_bgcolor' => '#FFFFFF',
1993
- 'wppa_qr_cache' => 'no',
1994
-
1995
- 'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1996
-
1997
- 'wppa_heartbeat' => '0',
1998
-
1999
- );
2000
-
2001
- if ( $force ) {
2002
- array_walk( $wppa_defaults, 'wppa_set_default' );
2003
- }
2004
-
2005
- return true;
2006
- }
2007
- function wppa_set_default( $value, $key ) {
2008
- $void_these = array(
2009
- 'wppa_revision',
2010
- 'wppa_rating_max',
2011
- 'wppa_file_system'
2012
- );
2013
-
2014
- if ( ! in_array($key, $void_these) ) wppa_update_option($key, $value);
2015
  }
2016
 
2017
  // Check if the required directories exist, if not, try to create them and optionally report it
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 7.3.00
7
  *
8
  */
9
 
20
  // instead of characters of unexpected output.
21
  // register_activation_hook(WPPA_FILE, 'wppa_activate_plugin'); is in wppa.php
22
  function wppa_activate_plugin() {
23
+ $old_rev = wppa_get_option( 'wppa_revision', '100' );
24
  $new_rev = $old_rev - '0.01';
25
  wppa_update_option( 'wppa_revision', $new_rev );
26
  }
34
  global $current_user;
35
  global $wppa_error;
36
 
37
+ $old_rev = wppa_get_option( 'wppa_revision', '100' );
38
 
39
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
40
 
126
  photo bigint(20) NOT NULL,
127
  value smallint(5) NOT NULL,
128
  user text NOT NULL,
129
+ userid int NOT NULL,
130
+ ip tinytext NOT NULL,
131
  status tinytext NOT NULL,
132
  PRIMARY KEY (id),
133
  KEY photokey (photo)
138
  timestamp tinytext NOT NULL,
139
  photo bigint(20) NOT NULL,
140
  user text NOT NULL,
141
+ userid int NOT NULL,
142
  ip tinytext NOT NULL,
143
  email text NOT NULL,
144
  comment text NOT NULL,
284
  if ( WPPA_DEBUG ) if ($ah || $ph) wppa_ok_message($ah.' out of '.$at.' albums and '.$ph.' out of '.$pt.' photos html converted');
285
  }
286
  if ( $old_rev <= '482' ) { // Share box added
287
+ $so = wppa_get_option('wppa_slide_order', '0,1,2,3,4,5,6,7,8,9');
288
  if ( strlen($so) == '19' ) {
289
  wppa_update_option('wppa_slide_order', $so.',10');
290
  }
291
+ $so = wppa_get_option('wppa_slide_order_split', '0,1,2,3,4,5,6,7,8,9,10');
292
  if ( strlen($so) == '22' ) {
293
  wppa_update_option('wppa_slide_order_split', $so.',11');
294
  }
316
  delete_option('wppa_taglist'); // Forces recreation
317
  }
318
  if ( $old_rev <= '5205' ) {
319
+ if ( wppa_get_option('wppa_list_albums_desc', 'nil') == 'yes' ) {
320
+ $value = wppa_get_option('wppa_list_albums_by', '0') * '-1';
321
  wppa_update_option('wppa_list_albums_by', $value);
322
  wppa_remove_setting('wppa_list_albums_desc');
323
  }
324
+ if ( wppa_get_option('wppa_list_photos_desc', 'nil') == 'yes' ) {
325
+ $value = wppa_get_option('wppa_list_photos_by', '0') * '-1';
326
  wppa_update_option('wppa_list_photos_by', $value);
327
  wppa_remove_setting('wppa_list_photos_desc');
328
  }
329
  }
330
 
331
  if ( $old_rev <= '5207' ) {
332
+ if ( wppa_get_option( 'wppa_strip_file_ext', 'nil' ) == 'yes' ) {
333
  wppa_update_option( 'wppa_newphoto_name_method', 'noext' );
334
  delete_option( 'wppa_strip_file_ext' );
335
  }
350
 
351
  if ( $old_rev == '5421' || $old_rev == '5420.99' ) { // The rev where the bug was
352
  if ( $wppa_revno >= '5422' ) { // The rev where we fix it
353
+ if ( wppa_get_option( 'wppa_rating_on', 'no' ) == 'yes' ) { // Only if rating used
354
+ if ( wppa_get_option( 'wppa_ajax_non_admin', 'yes' ) == 'no' ) { // Only if backend ajax
355
  update_option( 'wppa_rerate_status', __('Required', 'wp-photo-album-plus') ); // Make sure they see the message
356
  }
357
  }
359
  }
360
 
361
  if ( $old_rev <= '5500' ) {
362
+ wppa_create_pl_htaccess( wppa_get_option( 'wppa_pl_dirname', 'wppa-pl' ) ); // Remake due to fix in wppa_sanitize_file_name()
363
  }
364
 
365
  if ( $old_rev <= '6103' ) {
367
  }
368
 
369
  if ( $old_rev <= '6305' ) {
370
+ if ( wppa_get_option( 'wppa_comment_captcha' ) == 'no' ) {
371
  update_option( 'wppa_comment_captcha', 'none' );
372
  }
373
+ if ( wppa_get_option( 'wppa_comment_captcha' ) == 'yes' ) {
374
  update_option( 'wppa_comment_captcha', 'all' );
375
  }
376
  }
396
  }
397
 
398
  if ( $old_rev <= '6319' ) {
399
+ if ( wppa_get_option( 'wppa_cre_uploads_htaccess', 'no' ) == 'no' ) {
400
  update_option( 'wppa_cre_uploads_htaccess', 'remove' );
401
  }
402
+ if ( wppa_get_option( 'wppa_cre_uploads_htaccess', 'no' ) == 'yes' ) {
403
  update_option( 'wppa_cre_uploads_htaccess', 'grant' );
404
  }
405
  }
409
  }
410
 
411
  if ( $old_rev <= '6408' ) {
412
+ if ( wppa_get_option( 'wppa_comment_email_required', 'yes' ) ) {
413
  update_option( 'wppa_comment_email_required', 'required', false );
414
  }
415
  else {
418
  }
419
 
420
  if ( $old_rev <= '6411' ) {
421
+ $old = wppa_get_option( 'wppa_upload_edit', 'no' );
422
  if ( $old == 'no' ) {
423
  update_option( 'wppa_upload_edit', '-none-', false );
424
  }
428
  }
429
 
430
  if ( $old_rev <= '6414' ) {
431
+ if ( wppa_get_option( 'wppa_upload_edit', 'no' ) != 'no' ) {
432
  update_option( 'wppa_upload_delete', 'yes' );
433
  }
434
+ if ( wppa_get_option( 'wppa_upload_edit_users' ) == 'equalname' ) {
435
  update_option( 'wppa_upload_edit_users', 'owner' );
436
  }
437
  }
457
  }
458
 
459
  if ( $old_rev <= '6600' ) {
460
+ wppa_create_pl_htaccess( wppa_get_option( 'wppa_pl_dirname', 'wppa-pl' ) ); // Remake due to fix in wppa_create_pl_htaccess() and wppa_get_source_pl()
461
+ if ( wppa_get_option( 'wppa_run_wpautop_on_desc' ) == 'yes' ) {
462
  wppa_update_option( 'wppa_wpautop_on_desc', 'wpautop' );
463
  }
464
+ if ( wppa_get_option( 'wppa_run_wpautop_on_desc' ) == 'no' ) {
465
  wppa_update_option( 'wppa_wpautop_on_desc', 'nil' );
466
  }
467
  }
468
 
469
  if ( $old_rev <= '6601' ) {
470
+ if ( wppa_get_option( 'wppa_bc_url', 'nil' ) != 'nil' ) {
471
+ update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', wppa_get_option( 'wppa_bc_url', 'nil' ) ) );
472
  }
473
  }
474
 
475
  if ( $old_rev <= '6602' ) {
476
+ if ( wppa_get_option( 'wppa_show_treecount' ) == 'yes' ) {
477
  wppa_update_option( 'wppa_show_treecount', 'detail' );
478
  }
479
+ if ( wppa_get_option( 'wppa_show_treecount' ) == 'no' ) {
480
  wppa_update_option( 'wppa_show_treecount', '-none-' );
481
  }
482
+ if ( wppa_get_option( 'wppa_count_on_title' ) == 'yes' ) {
483
  wppa_update_option( 'wppa_count_on_title', 'self' );
484
  }
485
+ if ( wppa_get_option( 'wppa_count_on_title' ) == 'no' ) {
486
  wppa_update_option( 'wppa_count_on_title', '-none-' );
487
  }
488
 
489
  }
490
 
491
  if ( $old_rev <= '6606' ) {
492
+ if ( wppa_get_option( 'wppa_rating_dayly' ) == 'no' ) {
493
  wppa_update_option( 'wppa_rating_dayly', '0' );
494
  }
495
  }
499
  }
500
 
501
  if ( $old_rev <= '6610' ) {
502
+ if ( wppa_get_option( 'wppa_blog_it' ) == 'yes' ) {
503
  wppa_update_option( 'wppa_blog_it', 'optional' );
504
  }
505
+ if ( wppa_get_option( 'wppa_blog_it' ) == 'no' ) {
506
  wppa_update_option( 'wppa_blog_it', '-none-' );
507
  }
508
  }
511
  delete_option( 'wppa_cached_options' );
512
  delete_option( 'wppa_md5_options' );
513
  @ $wpdb->query( "UPDATE " . $wpdb->options . " SET autoload = 'yes' WHERE option_name LIKE 'wppa_%'");
514
+ if ( wppa_get_option( 'wppa_fe_alert' ) == 'no' ) {
515
  update_option( 'wppa_fe_alert', '-none-' );
516
  }
517
+ if ( wppa_get_option( 'wppa_fe_alert' ) == 'yes' ) {
518
  update_option( 'wppa_fe_alert', 'all' );
519
  }
520
  }
529
  }
530
 
531
  if ( $old_rev <= '6628' ) {
532
+ if ( wppa_get_option( 'wppa_gpx_implementation' ) == 'wppa-plus-embedded' ) {
533
  update_option( 'wppa_load_map_api', 'yes' );
534
  }
535
+ if ( wppa_get_option( 'wppa_gpx_implementation' ) == 'google-maps-gpx-viewer' ) {
536
  update_option( 'wppa_gpx_implementation', 'external-plugin' );
537
  }
538
  }
539
 
540
  if ( $old_rev <= '6630' ) {
541
+ if ( wppa_get_option( 'wppa_upload_edit' ) == 'none' ) {
542
  update_option( 'wppa_upload_edit', '-none-' );
543
  }
544
  }
570
  }
571
 
572
  if ( $old_rev <= '6915' ) {
573
+ if ( ! wppa_get_option( 'wppa_album_admin_pagesize', '0' ) ) {
574
  update_option( 'wppa_album_admin_pagesize', '100' );
575
  }
576
+ if ( ! wppa_get_option( 'wppa_photo_admin_pagesize', '0' ) ) {
577
  update_option( 'wppa_photo_admin_pagesize', '20' );
578
  }
579
  }
580
 
581
  if ( $old_rev <= '7001' ) {
582
+ if ( wppa_get_option( 'wppa_use_pretty_links', 'nil' ) == 'no' ) {
583
  update_option( 'wppa_use_pretty_links', '-none-' );
584
  }
585
+ if ( wppa_get_option( 'wppa_use_pretty_links', 'nil' ) == 'yes' ) {
586
  update_option( 'wppa_use_pretty_links', 'classic' );
587
  }
588
 
590
 
591
  if ( $old_rev <= '7010' ) {
592
  $met = ini_get( 'max_execution_time' );
593
+ $wppamet = wppa_get_option( 'wppa_max_execution_time', '30' );
594
  if ( ( $met > 5 ) && $wppamet > ( $met - '5' ) ) {
595
  update_option( 'wppa_max_execution_time', $met - '5' );
596
  }
623
  if ( $old_rev <= '7211' ) {
624
 
625
  // Fix bug because of different usernames in rating and comments
626
+ if ( wppa_get_option( 'wppa_vote_needs_comment' ) == 'yes' || wppa_get_option( 'wppa_comment_need_vote' ) == 'yes' ) {
627
  $wpdb->query( "UPDATE $wpdb->wppa_rating SET status = 'publish' WHERE status = 'pending'" );
628
  $wpdb->query( "UPDATE $wpdb->wppa_comments SET status = 'approved' WHERE status = 'pending'" );
629
  wppa_schedule_maintenance_proc( 'wppa_rerate' );
630
  }
631
  }
632
+
633
+ if ( $old_rev <= '7300' ) {
634
+ wppa_schedule_maintenance_proc( 'wppa_fix_userids' );
635
+ }
636
  }
637
 
638
  // Set Defaults
639
+ // wppa_set_defaults();
640
 
641
  // Check required directories
642
  if ( ! wppa_check_dirs() ) $wppa_error = true;
692
  // If so, produce message
693
  $key = '0';
694
  if ( $old_rev < '5400' ) { // theme changed since...
695
+ $usertheme = get_theme_root().'/'.wppa_get_option('template').'/wppa-theme.php';
696
  if ( is_file( $usertheme ) ) $key += '2';
697
  }
698
  if ( $old_rev < '5211' ) { // css changed since...
699
+ $userstyle = get_theme_root().'/'.wppa_get_option('stylesheet').'/wppa-style.css';
700
  if ( is_file( $userstyle ) ) {
701
  $key += '1';
702
  }
703
  else {
704
+ $userstyle = get_theme_root().'/'.wppa_get_option('template').'/wppa-style.css';
705
  if ( is_file( $userstyle ) ) {
706
  $key += '1';
707
  }
728
  // Make sure virtual album crypt exist
729
  $albs = array( '0', '1', '2', '3', '9' );
730
  foreach( $albs as $alb ) {
731
+ if ( ! wppa_get_option( 'wppa_album_crypt_' . $alb ) ) {
732
  update_option( 'wppa_album_crypt_' . $alb, wppa_get_unique_album_crypt() );
733
  }
734
  }
758
 
759
  // Function used during setup when existing settings are changed or removed
760
  function wppa_convert_setting($oldname, $oldvalue, $newname, $newvalue) {
761
+ if ( wppa_get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
762
+ if ( wppa_get_option($oldname, 'nil') == $oldvalue ) wppa_update_option($newname, $newvalue);
763
  }
764
  function wppa_remove_setting($oldname) {
765
+ if ( wppa_get_option($oldname, 'nil') != 'nil' ) delete_option($oldname);
766
  }
767
  function wppa_rename_setting($oldname, $newname) {
768
+ if ( wppa_get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
769
+ wppa_update_option($newname, wppa_get_option($oldname));
770
  delete_option($oldname);
771
  }
772
  function wppa_copy_setting($oldname, $newname) {
773
+ if ( wppa_get_option($oldname, 'nil') == 'nil' ) return; // no longer exists
774
+ wppa_update_option($newname, wppa_get_option($oldname));
775
  }
776
  function wppa_revalue_setting($oldname, $oldvalue, $newvalue) {
777
+ if ( wppa_get_option($oldname, 'nil') == $oldvalue ) wppa_update_option($oldname, $newvalue);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
778
  }
779
 
780
  // Check if the required directories exist, if not, try to create them and optionally report it
wppa-slideshow-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
- * Version 6.8.07
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -20,7 +20,7 @@ class SlideshowWidget extends WP_Widget {
20
 
21
  // Fix non constant defaults
22
  $this -> defaults['title'] = __( 'Sidebar Slideshow', 'wp-photo-album-plus' );
23
- $this -> defaults['width'] = get_option( 'wppa_widget_width' );
24
 
25
  }
26
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
+ * Version 7.3.00
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
20
 
21
  // Fix non constant defaults
22
  $this -> defaults['title'] = __( 'Sidebar Slideshow', 'wp-photo-album-plus' );
23
+ $this -> defaults['width'] = wppa_get_option( 'wppa_widget_width' );
24
 
25
  }
26
 
wppa-slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
- * Version 7.2.16
7
  *
8
  */
9
 
@@ -269,9 +269,9 @@ function wppa_start_stop_icons( $opt = '' ) {
269
  ' class="wppa-nav-text speed0"' .
270
  ' style="'.wppa_wcs('wppa-nav-text').'display:inline-block;"' .
271
  ' title="' . __('Slower', 'wp-photo-album-plus') . '"' .
272
- ( $Filmonlynavcontin ?
273
  ' onclick="wppaAnimationSpeed*=1.25;";' :
274
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
275
  ) .
276
  ' >' .
277
  wppa_get_svghtml( 'Snail', $iconsize ) .
@@ -294,7 +294,7 @@ function wppa_start_stop_icons( $opt = '' ) {
294
  ' title="' . __('Faster', 'wp-photo-album-plus') . '"' .
295
  ( $Filmonlynavcontin ?
296
  ' onclick="wppaAnimationSpeed*=0.8;";' :
297
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
298
  ) .
299
  ' >' .
300
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
@@ -342,9 +342,9 @@ function wppa_start_stop_text( $opt = '' ) {
342
  ' id="speed0-'.wppa( 'mocc' ).'"' .
343
  ' class="wppa-nav-text speed0"' .
344
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
345
- ( $Filmonlynavcontin ?
346
  ' onclick="wppaAnimationSpeed*=1.25;";' :
347
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
348
  ) .
349
  ' >' .
350
  __('Slower', 'wp-photo-album-plus') .
@@ -364,7 +364,7 @@ function wppa_start_stop_text( $opt = '' ) {
364
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
365
  ( $Filmonlynavcontin ?
366
  ' onclick="wppaAnimationSpeed*=0.8;";' :
367
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
368
  ) .
369
  ' >' .
370
  __('Faster', 'wp-photo-album-plus') .
@@ -913,7 +913,7 @@ global $wpdb;
913
  }
914
 
915
  if ( $id ) {
916
- $wait_text = wppa_get_rating_wait_text( $id, wppa_get_user() );
917
  if ( $wait_text ) {
918
  if ( $is_lightbox ) {
919
  return '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 7.3.00
7
  *
8
  */
9
 
269
  ' class="wppa-nav-text speed0"' .
270
  ' style="'.wppa_wcs('wppa-nav-text').'display:inline-block;"' .
271
  ' title="' . __('Slower', 'wp-photo-album-plus') . '"' .
272
+ ( $Filmonlynavcontin ?
273
  ' onclick="wppaAnimationSpeed*=1.25;";' :
274
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
275
  ) .
276
  ' >' .
277
  wppa_get_svghtml( 'Snail', $iconsize ) .
294
  ' title="' . __('Faster', 'wp-photo-album-plus') . '"' .
295
  ( $Filmonlynavcontin ?
296
  ' onclick="wppaAnimationSpeed*=0.8;";' :
297
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
298
  ) .
299
  ' >' .
300
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
342
  ' id="speed0-'.wppa( 'mocc' ).'"' .
343
  ' class="wppa-nav-text speed0"' .
344
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
345
+ ( $Filmonlynavcontin ?
346
  ' onclick="wppaAnimationSpeed*=1.25;";' :
347
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
348
  ) .
349
  ' >' .
350
  __('Slower', 'wp-photo-album-plus') .
364
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
365
  ( $Filmonlynavcontin ?
366
  ' onclick="wppaAnimationSpeed*=0.8;";' :
367
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
368
  ) .
369
  ' >' .
370
  __('Faster', 'wp-photo-album-plus') .
913
  }
914
 
915
  if ( $id ) {
916
+ $wait_text = wppa_get_rating_wait_text( $id );
917
  if ( $wait_text ) {
918
  if ( $is_lightbox ) {
919
  return '';
wppa-statistics.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Functions for counts etc
6
  * Common use front and admin
7
- * Version 7.2.01
8
  *
9
  */
10
 
@@ -283,7 +283,7 @@ global $wppa_session;
283
 
284
  function wppa_get_upldr_cache() {
285
 
286
- $result = get_option( 'wppa_upldr_cache', array() );
287
 
288
  return $result;
289
  }
@@ -511,7 +511,7 @@ global $wpdb;
511
  if ( ! wppa_is_cron() ) {
512
  wppa_log( 'dbg', 'Fixed treecounts for ' . $alb . ' ' . str_replace( array( "\r\n", "\n" ), '', var_export( $result, true ) ) );
513
  }
514
-
515
  // Done
516
  return $result;
517
 
4
  *
5
  * Functions for counts etc
6
  * Common use front and admin
7
+ * Version 7.3.00
8
  *
9
  */
10
 
283
 
284
  function wppa_get_upldr_cache() {
285
 
286
+ $result = wppa_get_option( 'wppa_upldr_cache', array() );
287
 
288
  return $result;
289
  }
511
  if ( ! wppa_is_cron() ) {
512
  wppa_log( 'dbg', 'Fixed treecounts for ' . $alb . ' ' . str_replace( array( "\r\n", "\n" ), '', var_export( $result, true ) ) );
513
  }
514
+
515
  // Done
516
  return $result;
517
 
wppa-tinymce-common.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-common.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.2.07
6
  *
7
  */
8
 
@@ -356,7 +356,7 @@ global $wpdb;
356
  $name = stripslashes(__($photo['name']));
357
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
358
 
359
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
360
  $val = $photo['id'] . '.' . $photo['ext'];
361
  }
362
  else {
@@ -420,7 +420,7 @@ global $wpdb;
420
 
421
  $name = stripslashes(__($photo['name']));
422
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
423
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
424
  $val = $photo['id'] . '.' . $photo['ext'];
425
  }
426
  else {
2
  /* wppa-tinymce-common.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.3.00
6
  *
7
  */
8
 
356
  $name = stripslashes(__($photo['name']));
357
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
358
 
359
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
360
  $val = $photo['id'] . '.' . $photo['ext'];
361
  }
362
  else {
420
 
421
  $name = stripslashes(__($photo['name']));
422
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
423
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
424
  $val = $photo['id'] . '.' . $photo['ext'];
425
  }
426
  else {
wppa-tinymce-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.2.07
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
@@ -238,7 +238,7 @@ global $wpdb;
238
  $result .=
239
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
240
  }
241
- $users = get_option( 'wppa_super_users', array() );
242
  foreach( $users as $user ) {
243
  $result .=
244
  '<option value="'.$user.'" class="wppagallery-admin" >'.$user.'</option>';
@@ -489,7 +489,7 @@ global $wpdb;
489
  $name = stripslashes(__($photo['name']));
490
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
491
 
492
- if ( get_option( 'wppa_file_system' ) == 'flat' ) {
493
  $val = $photo['id'] . '.' . $photo['ext'];
494
  }
495
  else {
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.3.00
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
238
  $result .=
239
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
240
  }
241
+ $users = wppa_get_option( 'wppa_super_users', array() );
242
  foreach( $users as $user ) {
243
  $result .=
244
  '<option value="'.$user.'" class="wppagallery-admin" >'.$user.'</option>';
489
  $name = stripslashes(__($photo['name']));
490
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
491
 
492
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) {
493
  $val = $photo['id'] . '.' . $photo['ext'];
494
  }
495
  else {
wppa-users.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
- * Version 7.2.07
7
  *
8
  */
9
 
@@ -141,7 +141,7 @@ global $wp_roles;
141
 
142
  // Login not required and logged out
143
  else {
144
- $rmax = get_option( 'wppa_loggedout_album_limit_count', '0' );
145
 
146
  // If logged out max set, check if limit reached
147
  if ( $rmax ) {
@@ -187,7 +187,7 @@ global $wp_roles;
187
 
188
  // Find firste role the user has
189
  if ( wppa_user_is( $role ) ) {
190
- $rmax = get_option( 'wppa_'.$role.'_album_limit_count', '0' );
191
  if ( ! $rmax || $albs < $rmax ) {
192
  return true;
193
  }
@@ -237,7 +237,7 @@ static $result = -1;
237
  return false;
238
  }
239
 
240
- $blacklist = get_option( 'wppa_black_listed_users', array() );
241
  if ( empty( $blacklist ) ) { // Anybody on the blacklist?
242
  $result = false;
243
  return false;
@@ -266,7 +266,7 @@ function wppa_is_user_superuser( $user = '' ) {
266
 
267
  $login = $user ? $user : wppa_get_user();
268
 
269
- $superlist = get_option( 'wppa_super_users', array() );
270
 
271
  if ( in_array( $login, $superlist ) ) {
272
  return true;
@@ -438,7 +438,7 @@ global $wpdb;
438
  // Get array of superuser ids
439
  function wppa_get_superuser_ids_a() {
440
 
441
- $susers = get_option( 'wppa_super_users', array() );
442
 
443
  if ( is_array( $susers ) ) {
444
 
@@ -453,4 +453,43 @@ function wppa_get_superuser_ids_a() {
453
  }
454
 
455
  return $susers;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
+ * Version 7.3.00
7
  *
8
  */
9
 
141
 
142
  // Login not required and logged out
143
  else {
144
+ $rmax = wppa_get_option( 'wppa_loggedout_album_limit_count', '0' );
145
 
146
  // If logged out max set, check if limit reached
147
  if ( $rmax ) {
187
 
188
  // Find firste role the user has
189
  if ( wppa_user_is( $role ) ) {
190
+ $rmax = wppa_get_option( 'wppa_'.$role.'_album_limit_count', '0' );
191
  if ( ! $rmax || $albs < $rmax ) {
192
  return true;
193
  }
237
  return false;
238
  }
239
 
240
+ $blacklist = wppa_get_option( 'wppa_black_listed_users', array() );
241
  if ( empty( $blacklist ) ) { // Anybody on the blacklist?
242
  $result = false;
243
  return false;
266
 
267
  $login = $user ? $user : wppa_get_user();
268
 
269
+ $superlist = wppa_get_option( 'wppa_super_users', array() );
270
 
271
  if ( in_array( $login, $superlist ) ) {
272
  return true;
438
  // Get array of superuser ids
439
  function wppa_get_superuser_ids_a() {
440
 
441
+ $susers = wppa_get_option( 'wppa_super_users', array() );
442
 
443
  if ( is_array( $susers ) ) {
444
 
453
  }
454
 
455
  return $susers;
456
+ }
457
+
458
+ // Has the current user rated photo $id?
459
+ function wppa_has_user_rated( $id ) {
460
+ global $wpdb;
461
+
462
+ if ( is_user_logged_in() ) {
463
+ $uid = wppa_get_user_id();
464
+ $cnt = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating WHERE photo = %d AND userid = %d", $id, $uid ) );
465
+ }
466
+ else {
467
+ $uid = $_SERVER['REMOTE_ADDR'];
468
+ $cnt = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating WHERE photo = %d AND ip = %s", $id, $uid ) );
469
+ }
470
+ return ( $cnt > 0 );
471
+ }
472
+
473
+ // Has the current user commented photo $id?
474
+ function wppa_has_user_commented( $id ) {
475
+ global $wpdb;
476
+
477
+ if ( is_user_logged_in() ) {
478
+ $uid = wppa_get_user_id();
479
+ $cnt = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE photo = %d AND userid = %d", $id, $uid ) );
480
+ }
481
+ else {
482
+ $uid = $_SERVER['REMOTE_ADDR'];
483
+ $cnt = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE photo = %d AND ip = %s", $id, $uid ) );
484
+ }
485
+ return ( $cnt > 0 );
486
+ }
487
+
488
+ // Get current users id
489
+ function wppa_get_user_id() {
490
+ $user = wp_get_current_user();
491
+ if ( $user ) {
492
+ return $user->ID;
493
+ }
494
+ return -1;
495
  }
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.2.15
7
  *
8
  */
9
 
@@ -64,7 +64,7 @@ global $blog_id;
64
  $sizespec = ( $x && $y ) ? 'w_'.$x.',h_'.$y.',c_'.$t.',q_'.$q.'/' : '';
65
  $prefix = ( is_multisite() && ! WPPA_MULTISITE_GLOBAL ) ? $blog_id.'-' : '';
66
  $s = is_ssl() ? 's' : '';
67
- $url = 'http'.$s.'://res.cloudinary.com/'.get_option('wppa_cdn_cloud_name').'/image/upload/'.$sizespec.$prefix.$thumb['id'].'.'.$thumb['ext'];
68
  return $url;
69
  break;
70
 
@@ -80,8 +80,8 @@ global $blog_id;
80
  wppa_create_thumbnail( $id );
81
  }
82
 
83
- if ( get_option('wppa_file_system') == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
84
- if ( get_option('wppa_file_system') == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
85
 
86
  if ( $system == 'tree' ) {
87
  $result = WPPA_UPLOAD_URL . '/thumbs/' . wppa_expand_id( $thumb['id'] ) . '.' . $thumb['ext'];
@@ -94,14 +94,14 @@ global $blog_id;
94
  $result = wppa_fix_poster_ext( $result, $thumb['id'] );
95
  }
96
 
97
- $result .= '?ver=' . get_option( 'wppa_thumb_version', '1' );
98
 
99
  return $result;
100
  }
101
 
102
  // Bump thumbnail version number
103
  function wppa_bump_thumb_rev() {
104
- wppa_update_option('wppa_thumb_version', get_option('wppa_thumb_version', '1') + '1');
105
  }
106
 
107
  // get path of thumb
@@ -112,8 +112,8 @@ function wppa_get_thumb_path( $id, $fix_poster_ext = true, $system = 'flat' ) {
112
  return false;
113
  }
114
 
115
- if ( get_option( 'wppa_file_system' ) == 'flat' ) $system = 'flat'; // Has been converted, ignore argument
116
- if ( get_option( 'wppa_file_system' ) == 'tree' ) $system = 'tree'; // Has been converted, ignore argument
117
 
118
  if ( $system == 'tree' ) {
119
  $result = WPPA_UPLOAD_PATH.'/thumbs/'.wppa_expand_id($thumb['id'], true).'.'.$thumb['ext'];
@@ -168,7 +168,7 @@ global $wppa_supported_stereo_types;
168
  $q = wppa_opt( 'jpeg_quality' );
169
  $sizespec = ( $x && $y ) ? 'w_'.$x.',h_'.$y.',c_'.$t.',q_'.$q.'/' : '';
170
  $s = is_ssl() ? 's' : '';
171
- $url = 'http'.$s.'://res.cloudinary.com/'.get_option('wppa_cdn_cloud_name').'/image/upload/'.$sizespec.$prefix.$thumb['id'].'.'.$thumb['ext'];
172
  return $url;
173
  break;
174
 
@@ -200,18 +200,18 @@ global $wppa_supported_stereo_types;
200
 
201
  // Build the url
202
  if ( $st == '_flat' ) {
203
- $url = WPPA_UPLOAD_URL . '/stereo/' . $id . '-' . $st . '.jpg' . '?ver=' . get_option( 'wppa_photo_version', '1' );
204
  }
205
  else {
206
- $url = WPPA_UPLOAD_URL . '/stereo/' . $id . '-' . $st . '-' . $sg . '.jpg' . '?ver=' . get_option( 'wppa_photo_version', '1' );
207
  }
208
 
209
  // Done
210
  return $url;
211
  }
212
 
213
- if ( get_option('wppa_file_system') == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
214
- if ( get_option('wppa_file_system') == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
215
 
216
  if ( $system == 'tree' ) {
217
  $result = WPPA_UPLOAD_URL . '/' . wppa_expand_id( $thumb['id'] ) . '.' . $thumb['ext'];
@@ -226,7 +226,7 @@ global $wppa_supported_stereo_types;
226
 
227
  // Social media do not like querystrings
228
  if ( ! wppa( 'no_ver' ) ) {
229
- $result .= '?ver=' . get_option( 'wppa_photo_version', '1' );
230
  }
231
 
232
  return $result;
@@ -234,7 +234,7 @@ global $wppa_supported_stereo_types;
234
 
235
  // Bump Fullsize photo version number
236
  function wppa_bump_photo_rev() {
237
- wppa_update_option('wppa_photo_version', get_option('wppa_photo_version', '1') + '1');
238
  }
239
 
240
  // Bump Download counter
@@ -252,8 +252,8 @@ function wppa_get_photo_path( $id, $fix_poster_ext = true, $system = 'flat' ) {
252
  return false;
253
  }
254
 
255
- if ( get_option( 'wppa_file_system' ) == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
256
- if ( get_option( 'wppa_file_system' ) == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
257
 
258
  if ( $system == 'tree' ) {
259
  $result = WPPA_UPLOAD_PATH . '/' . wppa_expand_id( $thumb['id'], true ) . '.' . $thumb['ext'];
@@ -430,7 +430,7 @@ function wppa_switch( $xkey ) {
430
  global $wppa_opt;
431
 
432
  // Are we initialized?
433
- if ( empty( $wppa_opt ) ) {
434
  wppa_initialize_runtime();
435
  }
436
 
@@ -459,7 +459,7 @@ function wppa_opt( $xkey ) {
459
  global $wppa_opt;
460
 
461
  // Are we initialized?
462
- if ( empty( $wppa_opt ) ) {
463
  wppa_initialize_runtime();
464
  }
465
 
@@ -490,7 +490,7 @@ function wppa( $key, $newval = 'nil' ) {
490
  global $wppa;
491
 
492
  // Array defined?
493
- if ( empty( $wppa ) ) {
494
  wppa_reset_occurrance();
495
  }
496
 
@@ -655,7 +655,7 @@ function wppa_array_sort( $array, $on, $order = SORT_ASC ) {
655
 
656
  function wppa_get_taglist() {
657
 
658
- $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_taglist', 'nil' ) : get_option( 'wppa_taglist', 'nil' );
659
  if ( $result == 'nil' ) {
660
  $result = wppa_create_taglist();
661
  }
@@ -670,7 +670,7 @@ function wppa_get_taglist() {
670
  function wppa_clear_taglist() {
671
 
672
  $result = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_taglist', 'nil' ) : update_option( 'wppa_taglist', 'nil' );
673
- $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_taglist', 'nil' ) : get_option( 'wppa_taglist', 'nil' );
674
  if ( $result != 'nil' ) {
675
  wppa_log( 'Warning', 'Could not clear taglist' ) ;
676
  }
@@ -739,7 +739,7 @@ global $wpdb;
739
 
740
  function wppa_get_catlist() {
741
 
742
- $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_catlist', 'nil' ) : get_option( 'wppa_catlist', 'nil' );
743
  if ( $result == 'nil' ) {
744
  $result = wppa_create_catlist();
745
  }
@@ -754,7 +754,7 @@ function wppa_get_catlist() {
754
  function wppa_clear_catlist() {
755
 
756
  $result = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_catlist', 'nil' ) : update_option( 'wppa_catlist', 'nil' );
757
- $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_catlist', 'nil' ) : get_option( 'wppa_catlist', 'nil' );
758
  if ( $result != 'nil' ) {
759
  wppa_log( 'Warning', 'Could not clear catlist' ) ;
760
  }
@@ -1099,7 +1099,7 @@ function wppa_set_last_album( $id = '' ) {
1099
  // get last album
1100
  function wppa_get_last_album() {
1101
 
1102
- $album = get_option( 'wppa_last_album_used-' . wppa_get_user( 'login' ), '0' );
1103
  if ( ! wppa_album_exists( $album ) ) {
1104
  $album = false;
1105
  }
@@ -1153,7 +1153,7 @@ global $wpdb;
1153
  $start_time = time();
1154
  $end = $start_time + '15';
1155
  $count = '0';
1156
- $start = get_option('wppa_sourcefile_fix_start', '0');
1157
  if ( $start == '-1' ) return; // Done!
1158
 
1159
  $photos = $wpdb->get_results( "SELECT id, album, name, filename" .
@@ -1503,7 +1503,7 @@ function wppa_is_enum( $var ) {
1503
  }
1504
 
1505
  // Log a wppa message.
1506
- // We use get_option() here to prevent wppa_switch() to generate messages itsself.
1507
  // Also, we do not use the wppa filesystem function wrappers, to prevent recursive error logging
1508
  function wppa_log( $xtype, $msg, $trace = false, $listuri = false ) {
1509
  global $wppa_session;
@@ -1538,14 +1538,14 @@ static $repeat_count;
1538
  case 'c':
1539
  switch ( $u ) {
1540
  case 'r':
1541
- if ( get_option( 'wppa_log_cron' ) == 'no' ) {
1542
  $busy = false;
1543
  return;
1544
  }
1545
  $type = '{span style="color:blue;" }Cron{/span}';
1546
  break;
1547
  case 'o':
1548
- if ( get_option( 'wppa_log_comments' ) == 'no' ) {
1549
  $busy = false;
1550
  return;
1551
  }
@@ -1558,7 +1558,7 @@ static $repeat_count;
1558
  }
1559
  break;
1560
  case 'd':
1561
- if ( get_option( 'wppa_log_debug' ) == 'no' ) {
1562
  $busy = false;
1563
  return;
1564
  }
@@ -1570,7 +1570,7 @@ static $repeat_count;
1570
  $type = '{span style="color:red;" }Err{/span}';
1571
  break;
1572
  case 'm':
1573
- if ( get_option( 'wppa_log_email' ) == 'no' ) {
1574
  $busy = false;
1575
  return;
1576
  }
@@ -1585,7 +1585,7 @@ static $repeat_count;
1585
  case 'f':
1586
  switch ( $u ) {
1587
  case 's':
1588
- if ( get_option( 'wppa_log_fso' ) == 'no' ) {
1589
  $busy = false;
1590
  return;
1591
  }
@@ -3334,7 +3334,6 @@ static $usercache;
3334
  if ( $p['owner'] != $user ) {
3335
  wppa_update_photo( array( 'id' => $id, 'owner' => $user ) );
3336
  wppa_cache_thumb( 'invalidate', $id );
3337
- wppa_log( 'Obs', 'Owner of photo '.$id.' in album '.wppa_get_photo_item( $id, 'album' ).' set to: '.$user );
3338
  return true;
3339
  }
3340
  else {
@@ -3350,15 +3349,26 @@ static $usercache;
3350
  function wppa_get_my_last_vote( $id ) {
3351
  global $wpdb;
3352
 
3353
- $result = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM $wpdb->wppa_rating " .
3354
- "WHERE photo = %s " .
3355
- "AND user = %s " .
3356
- "ORDER BY id DESC " .
3357
- "LIMIT 1 ",
3358
- $id,
3359
- wppa_get_user( 'display' )
3360
- )
3361
- );
 
 
 
 
 
 
 
 
 
 
 
3362
  return $result;
3363
  }
3364
 
@@ -3799,7 +3809,7 @@ function wppa_process_failed_mail( $to = '', $subject = '', $message = '', $head
3799
  $id = md5( ( is_array( $to ) ? implode( '|', $to ) : $to ) . $subject . $message );
3800
 
3801
  // Get stack of failed mails
3802
- $failed_mails = get_option( 'wppa_failed_mails' );
3803
 
3804
  // If no failed mails yet, create array
3805
  if ( ! is_array( $failed_mails ) ) {
@@ -3879,12 +3889,12 @@ function wppa_create_qrcode_cache( $url, $size = '80' ) {
3879
  if ( is_file( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg' ) ) {
3880
 
3881
  // Bump cache found counter
3882
- update_option( 'wppa_qr_cache_hits', get_option( 'wppa_qr_cache_hits', 0 ) + 1 );
3883
  return WPPA_UPLOAD_URL . '/qr/' . $key . '.svg';
3884
  }
3885
 
3886
  // Bump cache miss counter
3887
- update_option( 'wppa_qr_cache_miss', get_option( 'wppa_qr_cache_miss', 0 ) + 1 );
3888
 
3889
  // Catch the qr image
3890
  $curl = curl_init();
@@ -4951,4 +4961,16 @@ function wppa_get_thumb_aspect() {
4951
  }
4952
 
4953
  return $aspect;
 
 
 
 
 
 
 
 
 
 
 
 
4954
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.3.00
7
  *
8
  */
9
 
64
  $sizespec = ( $x && $y ) ? 'w_'.$x.',h_'.$y.',c_'.$t.',q_'.$q.'/' : '';
65
  $prefix = ( is_multisite() && ! WPPA_MULTISITE_GLOBAL ) ? $blog_id.'-' : '';
66
  $s = is_ssl() ? 's' : '';
67
+ $url = 'http'.$s.'://res.cloudinary.com/'.wppa_get_option('wppa_cdn_cloud_name').'/image/upload/'.$sizespec.$prefix.$thumb['id'].'.'.$thumb['ext'];
68
  return $url;
69
  break;
70
 
80
  wppa_create_thumbnail( $id );
81
  }
82
 
83
+ if ( wppa_get_option('wppa_file_system') == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
84
+ if ( wppa_get_option('wppa_file_system') == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
85
 
86
  if ( $system == 'tree' ) {
87
  $result = WPPA_UPLOAD_URL . '/thumbs/' . wppa_expand_id( $thumb['id'] ) . '.' . $thumb['ext'];
94
  $result = wppa_fix_poster_ext( $result, $thumb['id'] );
95
  }
96
 
97
+ $result .= '?ver=' . wppa_get_option( 'wppa_thumb_version', '1' );
98
 
99
  return $result;
100
  }
101
 
102
  // Bump thumbnail version number
103
  function wppa_bump_thumb_rev() {
104
+ wppa_update_option('wppa_thumb_version', wppa_get_option('wppa_thumb_version', '1') + '1');
105
  }
106
 
107
  // get path of thumb
112
  return false;
113
  }
114
 
115
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) $system = 'flat'; // Has been converted, ignore argument
116
+ if ( wppa_get_option( 'wppa_file_system' ) == 'tree' ) $system = 'tree'; // Has been converted, ignore argument
117
 
118
  if ( $system == 'tree' ) {
119
  $result = WPPA_UPLOAD_PATH.'/thumbs/'.wppa_expand_id($thumb['id'], true).'.'.$thumb['ext'];
168
  $q = wppa_opt( 'jpeg_quality' );
169
  $sizespec = ( $x && $y ) ? 'w_'.$x.',h_'.$y.',c_'.$t.',q_'.$q.'/' : '';
170
  $s = is_ssl() ? 's' : '';
171
+ $url = 'http'.$s.'://res.cloudinary.com/'.wppa_get_option('wppa_cdn_cloud_name').'/image/upload/'.$sizespec.$prefix.$thumb['id'].'.'.$thumb['ext'];
172
  return $url;
173
  break;
174
 
200
 
201
  // Build the url
202
  if ( $st == '_flat' ) {
203
+ $url = WPPA_UPLOAD_URL . '/stereo/' . $id . '-' . $st . '.jpg' . '?ver=' . wppa_get_option( 'wppa_photo_version', '1' );
204
  }
205
  else {
206
+ $url = WPPA_UPLOAD_URL . '/stereo/' . $id . '-' . $st . '-' . $sg . '.jpg' . '?ver=' . wppa_get_option( 'wppa_photo_version', '1' );
207
  }
208
 
209
  // Done
210
  return $url;
211
  }
212
 
213
+ if ( wppa_get_option('wppa_file_system') == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
214
+ if ( wppa_get_option('wppa_file_system') == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
215
 
216
  if ( $system == 'tree' ) {
217
  $result = WPPA_UPLOAD_URL . '/' . wppa_expand_id( $thumb['id'] ) . '.' . $thumb['ext'];
226
 
227
  // Social media do not like querystrings
228
  if ( ! wppa( 'no_ver' ) ) {
229
+ $result .= '?ver=' . wppa_get_option( 'wppa_photo_version', '1' );
230
  }
231
 
232
  return $result;
234
 
235
  // Bump Fullsize photo version number
236
  function wppa_bump_photo_rev() {
237
+ wppa_update_option('wppa_photo_version', wppa_get_option('wppa_photo_version', '1') + '1');
238
  }
239
 
240
  // Bump Download counter
252
  return false;
253
  }
254
 
255
+ if ( wppa_get_option( 'wppa_file_system' ) == 'flat' ) $system = 'flat'; // Have been converted, ignore argument
256
+ if ( wppa_get_option( 'wppa_file_system' ) == 'tree' ) $system = 'tree'; // Have been converted, ignore argument
257
 
258
  if ( $system == 'tree' ) {
259
  $result = WPPA_UPLOAD_PATH . '/' . wppa_expand_id( $thumb['id'], true ) . '.' . $thumb['ext'];
430
  global $wppa_opt;
431
 
432
  // Are we initialized?
433
+ if ( ! isset( $wppa_opt[$xkey] ) ) {
434
  wppa_initialize_runtime();
435
  }
436
 
459
  global $wppa_opt;
460
 
461
  // Are we initialized?
462
+ if ( ! isset( $wppa_opt[$xkey] ) ) {
463
  wppa_initialize_runtime();
464
  }
465
 
490
  global $wppa;
491
 
492
  // Array defined?
493
+ if ( ! isset( $wppa[$key] ) ) {
494
  wppa_reset_occurrance();
495
  }
496
 
655
 
656
  function wppa_get_taglist() {
657
 
658
+ $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_taglist', 'nil' ) : wppa_get_option( 'wppa_taglist', 'nil' );
659
  if ( $result == 'nil' ) {
660
  $result = wppa_create_taglist();
661
  }
670
  function wppa_clear_taglist() {
671
 
672
  $result = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_taglist', 'nil' ) : update_option( 'wppa_taglist', 'nil' );
673
+ $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_taglist', 'nil' ) : wppa_get_option( 'wppa_taglist', 'nil' );
674
  if ( $result != 'nil' ) {
675
  wppa_log( 'Warning', 'Could not clear taglist' ) ;
676
  }
739
 
740
  function wppa_get_catlist() {
741
 
742
+ $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_catlist', 'nil' ) : wppa_get_option( 'wppa_catlist', 'nil' );
743
  if ( $result == 'nil' ) {
744
  $result = wppa_create_catlist();
745
  }
754
  function wppa_clear_catlist() {
755
 
756
  $result = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_catlist', 'nil' ) : update_option( 'wppa_catlist', 'nil' );
757
+ $result = WPPA_MULTISITE_GLOBAL ? get_site_option( 'wppa_catlist', 'nil' ) : wppa_get_option( 'wppa_catlist', 'nil' );
758
  if ( $result != 'nil' ) {
759
  wppa_log( 'Warning', 'Could not clear catlist' ) ;
760
  }
1099
  // get last album
1100
  function wppa_get_last_album() {
1101
 
1102
+ $album = wppa_get_option( 'wppa_last_album_used-' . wppa_get_user( 'login' ), '0' );
1103
  if ( ! wppa_album_exists( $album ) ) {
1104
  $album = false;
1105
  }
1153
  $start_time = time();
1154
  $end = $start_time + '15';
1155
  $count = '0';
1156
+ $start = wppa_get_option('wppa_sourcefile_fix_start', '0');
1157
  if ( $start == '-1' ) return; // Done!
1158
 
1159
  $photos = $wpdb->get_results( "SELECT id, album, name, filename" .
1503
  }
1504
 
1505
  // Log a wppa message.
1506
+ // We use wppa_get_option() here to prevent wppa_switch() to generate messages itsself.
1507
  // Also, we do not use the wppa filesystem function wrappers, to prevent recursive error logging
1508
  function wppa_log( $xtype, $msg, $trace = false, $listuri = false ) {
1509
  global $wppa_session;
1538
  case 'c':
1539
  switch ( $u ) {
1540
  case 'r':
1541
+ if ( wppa_get_option( 'wppa_log_cron' ) == 'no' ) {
1542
  $busy = false;
1543
  return;
1544
  }
1545
  $type = '{span style="color:blue;" }Cron{/span}';
1546
  break;
1547
  case 'o':
1548
+ if ( wppa_get_option( 'wppa_log_comments' ) == 'no' ) {
1549
  $busy = false;
1550
  return;
1551
  }
1558
  }
1559
  break;
1560
  case 'd':
1561
+ if ( wppa_get_option( 'wppa_log_debug' ) == 'no' ) {
1562
  $busy = false;
1563
  return;
1564
  }
1570
  $type = '{span style="color:red;" }Err{/span}';
1571
  break;
1572
  case 'm':
1573
+ if ( wppa_get_option( 'wppa_log_email' ) == 'no' ) {
1574
  $busy = false;
1575
  return;
1576
  }
1585
  case 'f':
1586
  switch ( $u ) {
1587
  case 's':
1588
+ if ( wppa_get_option( 'wppa_log_fso' ) == 'no' ) {
1589
  $busy = false;
1590
  return;
1591
  }
3334
  if ( $p['owner'] != $user ) {
3335
  wppa_update_photo( array( 'id' => $id, 'owner' => $user ) );
3336
  wppa_cache_thumb( 'invalidate', $id );
 
3337
  return true;
3338
  }
3339
  else {
3349
  function wppa_get_my_last_vote( $id ) {
3350
  global $wpdb;
3351
 
3352
+ if ( is_user_logged_in() ) {
3353
+ $result = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM $wpdb->wppa_rating
3354
+ WHERE photo = %d
3355
+ AND userid = %d
3356
+ ORDER BY id DESC
3357
+ LIMIT 1",
3358
+ $id,
3359
+ wppa_get_user_id()
3360
+ ) );
3361
+ }
3362
+ else {
3363
+ $result = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM $wpdb->wppa_rating
3364
+ WHERE photo = %d
3365
+ AND ip = %s
3366
+ ORDER BY id DESC
3367
+ LIMIT 1",
3368
+ $id,
3369
+ $_SERVER['REMOTE_ADDR']
3370
+ ) );
3371
+ }
3372
  return $result;
3373
  }
3374
 
3809
  $id = md5( ( is_array( $to ) ? implode( '|', $to ) : $to ) . $subject . $message );
3810
 
3811
  // Get stack of failed mails
3812
+ $failed_mails = wppa_get_option( 'wppa_failed_mails' );
3813
 
3814
  // If no failed mails yet, create array
3815
  if ( ! is_array( $failed_mails ) ) {
3889
  if ( is_file( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg' ) ) {
3890
 
3891
  // Bump cache found counter
3892
+ update_option( 'wppa_qr_cache_hits', wppa_get_option( 'wppa_qr_cache_hits', 0 ) + 1 );
3893
  return WPPA_UPLOAD_URL . '/qr/' . $key . '.svg';
3894
  }
3895
 
3896
  // Bump cache miss counter
3897
+ update_option( 'wppa_qr_cache_miss', wppa_get_option( 'wppa_qr_cache_miss', 0 ) + 1 );
3898
 
3899
  // Catch the qr image
3900
  $curl = curl_init();
4961
  }
4962
 
4963
  return $aspect;
4964
+ }
4965
+
4966
+ // Wrapper around get_option, but checks the settings first
4967
+ function wppa_get_option( $name, $default = null ) {
4968
+ global $wppa_defaults;
4969
+
4970
+ // If the option is a setting, use the default for the setting as the default
4971
+ if ( isset( $wppa_defaults[$name] ) ) {
4972
+ $default = $wppa_defaults[$name];
4973
+ }
4974
+
4975
+ return get_option( $name, $default );
4976
  }
wppa-watermark.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
- * Version 7.2.06
6
  *
7
  */
8
 
@@ -349,15 +349,15 @@ function wppa_get_water_file_and_pos( $id ) {
349
  $result['file'] = $_POST['wppa-watermark-file'];
350
  update_option( 'wppa_watermark_file_' . $user, $_POST['wppa-watermark-file'] );
351
  }
352
- elseif ( get_option( 'wppa_watermark_file_' . $user, 'nil' ) != 'nil' ) {
353
- $result['file'] = get_option( 'wppa_watermark_file_' . $user );
354
  }
355
  if ( isset( $_POST['wppa-watermark-pos'] ) ) {
356
  $result['pos'] = $_POST['wppa-watermark-pos'];
357
  update_option( 'wppa_watermark_pos_' . $user, $_POST['wppa-watermark-pos'] );
358
  }
359
- elseif ( get_option( 'wppa_watermark_pos_' . $user, 'nil' ) != 'nil' ) {
360
- $result['pos'] = get_option( 'wppa_watermark_pos_' . $user );
361
  }
362
  }
363
  $result['select'] = $result['file'];
@@ -639,7 +639,7 @@ function wppa_watermark_file_select( $key, $album = '0' ) {
639
  elseif ( $key == 'user' ) {
640
  $default = $select;
641
  if ( wppa_switch( 'watermark_user' ) ) {
642
- $temp = get_option( 'wppa_watermark_file_' . $user );
643
  if ( $temp ) {
644
  $select = $temp;
645
  }
@@ -706,7 +706,7 @@ function wppa_watermark_pos_select( $key, $album = '0' ) {
706
  elseif ( $key == 'user' ) {
707
  $default = $select;
708
  if ( wppa_switch( 'watermark_user' ) ) {
709
- $temp = get_option( 'wppa_watermark_pos_' . $user );
710
  if ( $temp ) {
711
  $select = $temp;
712
  }
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
+ * Version 7.3.00
6
  *
7
  */
8
 
349
  $result['file'] = $_POST['wppa-watermark-file'];
350
  update_option( 'wppa_watermark_file_' . $user, $_POST['wppa-watermark-file'] );
351
  }
352
+ elseif ( wppa_get_option( 'wppa_watermark_file_' . $user, 'nil' ) != 'nil' ) {
353
+ $result['file'] = wppa_get_option( 'wppa_watermark_file_' . $user );
354
  }
355
  if ( isset( $_POST['wppa-watermark-pos'] ) ) {
356
  $result['pos'] = $_POST['wppa-watermark-pos'];
357
  update_option( 'wppa_watermark_pos_' . $user, $_POST['wppa-watermark-pos'] );
358
  }
359
+ elseif ( wppa_get_option( 'wppa_watermark_pos_' . $user, 'nil' ) != 'nil' ) {
360
+ $result['pos'] = wppa_get_option( 'wppa_watermark_pos_' . $user );
361
  }
362
  }
363
  $result['select'] = $result['file'];
639
  elseif ( $key == 'user' ) {
640
  $default = $select;
641
  if ( wppa_switch( 'watermark_user' ) ) {
642
+ $temp = wppa_get_option( 'wppa_watermark_file_' . $user );
643
  if ( $temp ) {
644
  $select = $temp;
645
  }
706
  elseif ( $key == 'user' ) {
707
  $default = $select;
708
  if ( wppa_switch( 'watermark_user' ) ) {
709
+ $temp = wppa_get_option( 'wppa_watermark_pos_' . $user );
710
  if ( $temp ) {
711
  $select = $temp;
712
  }
wppa-widget-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
- /* Version 7.1.02
6
  /*
7
  */
8
 
@@ -182,7 +182,7 @@ static $potd;
182
 
183
  $id = 0;
184
  switch ( wppa_opt( 'potd_method' ) ) {
185
-
186
  // Random
187
  case '2':
188
  $album = wppa_opt( 'potd_album' );
@@ -237,7 +237,7 @@ static $potd;
237
  elseif ( $per == 'day-of-week' ) {
238
  if ( $photos ) {
239
  $d = date_i18n( "w" );
240
- $d -= get_option( 'wppa_potd_offset', '0' );
241
  while ( $d < '1' ) $d += '7';
242
  foreach ( $photos as $img ) {
243
  if ( $img['p_order'] == $d ) $id = $img['id'];
@@ -247,7 +247,7 @@ static $potd;
247
  elseif ( $per == 'day-of-month' ) {
248
  if ( $photos ) {
249
  $d = strval(intval(date_i18n( "d" )));
250
- $d -= get_option( 'wppa_potd_offset', '0' );
251
  while ( $d < '1' ) $d += '31';
252
  foreach ( $photos as $img ) {
253
  if ( $img['p_order'] == $d ) $id = $img['id'];
@@ -257,7 +257,7 @@ static $potd;
257
  elseif ( $per == 'day-of-year' ) {
258
  if ( $photos ) {
259
  $d = strval(intval(date_i18n( "z" )));
260
- $d -= get_option( 'wppa_potd_offset', '0' );
261
  while ( $d < '0' ) $d += '366';
262
  foreach ( $photos as $img ) {
263
  if ( $img['p_order'] == $d ) $id = $img['id'];
@@ -314,7 +314,7 @@ static $potd;
314
  }
315
  }
316
  break;
317
-
318
  // Fixed photo
319
  default:
320
  $id = wppa_opt( 'potd_photo' );
@@ -523,7 +523,7 @@ function wppa_log_potd( $id ) {
523
  if ( wppa_switch( 'potd_log' ) ) {
524
 
525
  // Get existig history
526
- $his = get_option( 'wppa_potd_log_data', array() );
527
 
528
  // If history exists and last one is current id, quit
529
  if ( ! empty( $his ) ) {
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
+ /* Version 7.3.00
6
  /*
7
  */
8
 
182
 
183
  $id = 0;
184
  switch ( wppa_opt( 'potd_method' ) ) {
185
+
186
  // Random
187
  case '2':
188
  $album = wppa_opt( 'potd_album' );
237
  elseif ( $per == 'day-of-week' ) {
238
  if ( $photos ) {
239
  $d = date_i18n( "w" );
240
+ $d -= wppa_get_option( 'wppa_potd_offset', '0' );
241
  while ( $d < '1' ) $d += '7';
242
  foreach ( $photos as $img ) {
243
  if ( $img['p_order'] == $d ) $id = $img['id'];
247
  elseif ( $per == 'day-of-month' ) {
248
  if ( $photos ) {
249
  $d = strval(intval(date_i18n( "d" )));
250
+ $d -= wppa_get_option( 'wppa_potd_offset', '0' );
251
  while ( $d < '1' ) $d += '31';
252
  foreach ( $photos as $img ) {
253
  if ( $img['p_order'] == $d ) $id = $img['id'];
257
  elseif ( $per == 'day-of-year' ) {
258
  if ( $photos ) {
259
  $d = strval(intval(date_i18n( "z" )));
260
+ $d -= wppa_get_option( 'wppa_potd_offset', '0' );
261
  while ( $d < '0' ) $d += '366';
262
  foreach ( $photos as $img ) {
263
  if ( $img['p_order'] == $d ) $id = $img['id'];
314
  }
315
  }
316
  break;
317
+
318
  // Fixed photo
319
  default:
320
  $id = wppa_opt( 'potd_photo' );
523
  if ( wppa_switch( 'potd_log' ) ) {
524
 
525
  // Get existig history
526
+ $his = wppa_get_option( 'wppa_potd_log_data', array() );
527
 
528
  // If history exists and last one is current id, quit
529
  if ( ! empty( $his ) ) {
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 7.2.11
7
  *
8
  */
9
 
@@ -165,11 +165,20 @@ global $wpdb;
165
  function wppa_create_comments_entry( $args ) {
166
  global $wpdb;
167
 
 
 
 
 
 
 
 
 
168
  $args = wp_parse_args( (array) $args, array (
169
  'id' => '0',
170
  'timestamp' => time(),
171
  'photo' => '0',
172
  'user' => wppa_get_user(),
 
173
  'ip' => $_SERVER['REMOTE_ADDR'],
174
  'email' => '',
175
  'comment' => '',
@@ -177,26 +186,26 @@ global $wpdb;
177
  ) );
178
 
179
  if ( ! wppa_is_id_free( WPPA_COMMENTS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_COMMENTS );
180
-
181
- $query = $wpdb->prepare("INSERT INTO $wpdb->wppa_comments ( id,
182
- timestamp,
183
- photo,
184
- user,
185
- ip,
186
- email,
187
- comment,
188
- status
189
- )
190
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s )",
191
- $args['id'],
192
- $args['timestamp'],
193
- $args['photo'],
194
- $args['user'],
195
- $args['ip'],
196
- $args['email'],
197
- $args['comment'],
198
- $args['status']
199
- );
200
  $iret = $wpdb->query($query);
201
 
202
  if ( $iret ) {
@@ -212,32 +221,46 @@ global $wpdb;
212
  function wppa_create_rating_entry( $args ) {
213
  global $wpdb;
214
 
 
 
 
 
 
 
 
 
 
215
  $args = wp_parse_args( (array) $args, array (
216
  'id' => '0',
217
  'timestamp' => time(),
218
  'photo' => '0',
219
  'value' => '0',
220
  'user' => '',
 
 
221
  'status' => 'publish'
222
  ) );
223
 
224
  if ( ! wppa_is_id_free( WPPA_RATING, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_RATING );
225
-
226
- $query = $wpdb->prepare("INSERT INTO $wpdb->wppa_rating ( id,
227
- timestamp,
228
- photo,
229
- value,
230
- user,
231
- status
232
- )
233
- VALUES ( %s, %s, %s, %s, %s, %s )",
234
- $args['id'],
235
- $args['timestamp'],
236
- $args['photo'],
237
- $args['value'],
238
- $args['user'],
239
- $args['status']
240
- );
 
 
 
241
  $iret = $wpdb->query($query);
242
 
243
  if ( $iret ) return $args['id'];
@@ -525,7 +548,7 @@ function wppa_nextkey( $table ) {
525
  global $wpdb;
526
 
527
  $name = 'wppa_' . $table . '_lastkey';
528
- $lastkey = get_option( $name, 'nil' );
529
 
530
  if ( $lastkey == 'nil' ) { // Init option
531
  $lastkey = $wpdb->get_var( "SELECT id FROM ".$table." WHERE id < '9223372036854775806' ORDER BY id DESC LIMIT 1" );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 7.3.00
7
  *
8
  */
9
 
165
  function wppa_create_comments_entry( $args ) {
166
  global $wpdb;
167
 
168
+ if ( is_user_logged_in() ) {
169
+ $user = wp_get_current_user();
170
+ $userid = $user->ID;
171
+ }
172
+ else {
173
+ $userid = -1;
174
+ }
175
+
176
  $args = wp_parse_args( (array) $args, array (
177
  'id' => '0',
178
  'timestamp' => time(),
179
  'photo' => '0',
180
  'user' => wppa_get_user(),
181
+ 'userid' => '0',
182
  'ip' => $_SERVER['REMOTE_ADDR'],
183
  'email' => '',
184
  'comment' => '',
186
  ) );
187
 
188
  if ( ! wppa_is_id_free( WPPA_COMMENTS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_COMMENTS );
189
+ $args['userid'] = $userid;
190
+
191
+ $query = $wpdb->prepare( "INSERT INTO $wpdb->wppa_comments SET id = %d,
192
+ timestamp = %s,
193
+ photo = %d,
194
+ user = %s,
195
+ userid = %d,
196
+ ip = %s,
197
+ email = %s,
198
+ comment = %s,
199
+ status = %s",
200
+ $args['id'],
201
+ $args['timestamp'],
202
+ $args['photo'],
203
+ $args['user'],
204
+ $args['userid'],
205
+ $args['ip'],
206
+ $args['email'],
207
+ $args['comment'],
208
+ $args['status'] );
209
  $iret = $wpdb->query($query);
210
 
211
  if ( $iret ) {
221
  function wppa_create_rating_entry( $args ) {
222
  global $wpdb;
223
 
224
+ if ( is_user_logged_in() ) {
225
+ $user = wp_get_current_user();
226
+ $userid = $user->ID;
227
+ wppa_log('obs','userid='.$userid);
228
+ }
229
+ else {
230
+ $userid = -1;
231
+ }
232
+
233
  $args = wp_parse_args( (array) $args, array (
234
  'id' => '0',
235
  'timestamp' => time(),
236
  'photo' => '0',
237
  'value' => '0',
238
  'user' => '',
239
+ 'userid' => '0',
240
+ 'ip' => $_SERVER['REMOTE_ADDR'],
241
  'status' => 'publish'
242
  ) );
243
 
244
  if ( ! wppa_is_id_free( WPPA_RATING, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_RATING );
245
+ $args['userid'] = $userid;
246
+
247
+ $query = $wpdb->prepare( "INSERT INTO $wpdb->wppa_rating SET id = %d,
248
+ timestamp = %s,
249
+ photo = %d,
250
+ value = %d,
251
+ user = %s,
252
+ userid = %d,
253
+ ip = %s,
254
+ status = %s",
255
+ $args['id'],
256
+ $args['timestamp'],
257
+ $args['photo'],
258
+ $args['value'],
259
+ $args['user'],
260
+ $args['userid'],
261
+ $args['ip'],
262
+ $args['status'] );
263
+ wppa_log('dbg', $query);
264
  $iret = $wpdb->query($query);
265
 
266
  if ( $iret ) return $args['id'];
548
  global $wpdb;
549
 
550
  $name = 'wppa_' . $table . '_lastkey';
551
+ $lastkey = wppa_get_option( $name, 'nil' );
552
 
553
  if ( $lastkey == 'nil' ) { // Init option
554
  $lastkey = $wpdb->get_var( "SELECT id FROM ".$table." WHERE id < '9223372036854775806' ORDER BY id DESC LIMIT 1" );
wppa-wrappers.php CHANGED
@@ -5,7 +5,7 @@
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
- * Version 7.2.09
9
  *
10
  */
11
 
@@ -588,7 +588,7 @@ global $wppa_log_file;
588
  function wppa_unserialize( $xstring, $is_session = false ) {
589
 
590
  if ( version_compare( PHP_VERSION, '7.0.0') >= 0 ) {
591
- if ( $is_session && get_option( 'wppa_use_scabn' ) == 'yes' ) {
592
  return unserialize( $xstring, array( 'allowed_classes' => array( 'wfCart' ) ) );
593
  }
594
  else {
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
+ * Version 7.3.00
9
  *
10
  */
11
 
588
  function wppa_unserialize( $xstring, $is_session = false ) {
589
 
590
  if ( version_compare( PHP_VERSION, '7.0.0') >= 0 ) {
591
+ if ( $is_session && wppa_get_option( 'wppa_use_scabn' ) == 'yes' ) {
592
  return unserialize( $xstring, array( 'allowed_classes' => array( 'wfCart' ) ) );
593
  }
594
  else {
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.2.17.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -13,6 +13,7 @@
13
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly (1)" );
14
 
15
  require_once 'wppa-init.php';
 
16
 
17
  /* See explanation on activation hook in wppa-setup.php */
18
  register_activation_hook( __FILE__, 'wppa_activate_plugin' );
@@ -22,25 +23,28 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7216'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.17.004'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';
30
 
31
  /* start timers */
32
- add_action( 'plugins_loaded', 'wppa_init_timer' );
33
  function wppa_init_timer() {
34
  global $wppa_endtime;
35
  if ( wppa_is_cron() || wppa( 'ajax' ) ) {
36
  $wppa_endtime = time() + '25';
37
  }
38
  else {
39
- $met = max( get_option( 'wppa_max_execution_time', '25' ), '25' );
40
  $wppa_endtime = time() + $met;
41
  }
42
  }
43
 
 
 
 
44
  /* CONSTANTS
45
  /*
46
  /* Check for php version
@@ -147,7 +151,7 @@ add_action( 'init', 'wppa_init_path_and_url_constants', 1 );
147
  add_action( 'plugins_loaded', 'wppa_load_plugin_textdomain' );
148
 
149
  /* SET UP array $wppa, array $wppa_opt. Must be done after language has been set */
150
- add_action( 'init', 'wppa_initialize_runtime', 11 );
151
 
152
  /* Load adminbar menu if required, after translations loaded */
153
  add_action( 'init', 'wppa_admin_bar_init', 12);
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.3.00.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
13
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly (1)" );
14
 
15
  require_once 'wppa-init.php';
16
+ require_once 'wppa-defaults.php';
17
 
18
  /* See explanation on activation hook in wppa-setup.php */
19
  register_activation_hook( __FILE__, 'wppa_activate_plugin' );
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
+ global $wppa_revno; $wppa_revno = '7300'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.00.004'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
31
 
32
  /* start timers */
33
+ add_action( 'plugins_loaded', 'wppa_init_timer', '1' );
34
  function wppa_init_timer() {
35
  global $wppa_endtime;
36
  if ( wppa_is_cron() || wppa( 'ajax' ) ) {
37
  $wppa_endtime = time() + '25';
38
  }
39
  else {
40
+ $met = max( wppa_get_option( 'wppa_max_execution_time', '25' ), '25' );
41
  $wppa_endtime = time() + $met;
42
  }
43
  }
44
 
45
+ /* Set defaults */
46
+ // add_action( 'plugins_loaded', 'wppa_set_defaults', '2' );
47
+
48
  /* CONSTANTS
49
  /*
50
  /* Check for php version
151
  add_action( 'plugins_loaded', 'wppa_load_plugin_textdomain' );
152
 
153
  /* SET UP array $wppa, array $wppa_opt. Must be done after language has been set */
154
+ //add_action( 'init', 'wppa_initialize_runtime', 11 );
155
 
156
  /* Load adminbar menu if required, after translations loaded */
157
  add_action( 'init', 'wppa_admin_bar_init', 12);