WP Photo Album Plus - Version 8.0.00.024

Version Description

= 7.7.07 =

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

Release Info

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

Code changes from version 8.0.00.020 to 8.0.00.024

changelog.txt CHANGED
@@ -18,6 +18,7 @@ Ajax is always activated, because there can no longer be conflicts due to inacce
18
  [wppa type="photo" photo="#last,12"] or [wppa type="photo" album="12" photo="#last"]. Fixed. Works also for type="mphoto" and type="xphoto".
19
  * Fixed a slideshow filmstrip layout issue for theme twentytwentyone.
20
  * The max simultaneous ajax requests during resequencing photos is now limited to 10. This prevents db errors due to too many open db instances.
 
21
 
22
  = 7.7.07 =
23
 
18
  [wppa type="photo" photo="#last,12"] or [wppa type="photo" album="12" photo="#last"]. Fixed. Works also for type="mphoto" and type="xphoto".
19
  * Fixed a slideshow filmstrip layout issue for theme twentytwentyone.
20
  * The max simultaneous ajax requests during resequencing photos is now limited to 10. This prevents db errors due to too many open db instances.
21
+ * Caching system is simplified. Just on or off. In widgets: checkbox; in shortcodes: '', '0', 'off' or 'no' means no caching; anything else means caching on.
22
 
23
  = 7.7.07 =
24
 
js/wppa-ajax-front.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsAjaxVersion = '8.0.00.001';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -26,6 +26,7 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
26
  // Ajax possible, or no newurl defined ?
27
  if ( wppaCanAjaxRender || ! newurl ) {
28
 
 
29
  jQuery.ajax( { url: ajaxurl,
30
  async: true,
31
  type: 'GET',
@@ -1248,3 +1249,51 @@ function wppaAjaxNotify( elm, list ) {
1248
  }
1249
  } );
1250
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '8.0.00.021';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
26
  // Ajax possible, or no newurl defined ?
27
  if ( wppaCanAjaxRender || ! newurl ) {
28
 
29
+ wppaConsoleLog(ajaxurl, 'force');
30
  jQuery.ajax( { url: ajaxurl,
31
  async: true,
32
  type: 'GET',
1249
  }
1250
  } );
1251
  }
1252
+
1253
+ // Supersearch function get iptc list
1254
+ function wppaAjaxGetSsIptcList( mocc, s3, selid, retry ) {
1255
+
1256
+ wppaAjaxGetSsIptcExifList( mocc, s3, selid, retry, 'iptc' );
1257
+ }
1258
+
1259
+ // Supersearch function get exif list
1260
+ function wppaAjaxGetSsExifList( mocc, s3, selid, retry ) {
1261
+
1262
+ wppaAjaxGetSsIptcExifList( mocc, s3, selid, retry, 'exif' );
1263
+ }
1264
+
1265
+ // Common function that does the job
1266
+ function wppaAjaxGetSsIptcExifList( mocc, s3, selid, retry, tagtype ) {
1267
+
1268
+ if ( retry ) {
1269
+ ajaxurl = wppaAdminAjaxUrl;
1270
+ }
1271
+ else {
1272
+ ajaxurl = wppaAjaxUrl;
1273
+ }
1274
+ ajaxurl += '?action=wppa&wppa-action=getss' + tagtype + 'list&' + tagtype + 'tag=' + s3 + '&moccur=' + mocc;
1275
+ jQuery.ajax( { url: ajaxurl,
1276
+ async: true,
1277
+ type: 'GET',
1278
+ timeout: 10000,
1279
+ beforeSend: function( xhr ) {
1280
+ jQuery( '#wppa-ss-spinner-'+mocc ).css('display', '');
1281
+ },
1282
+ success: function( result, status, xhr ) {
1283
+ jQuery( '#'+selid ).html( result );
1284
+ jQuery( '#wppa-ss-'+tagtype+'opts-'+mocc ).css('display', '');
1285
+ wppaSuperSearchSelect( mocc );
1286
+ setTimeout('wppaSetIptcExifSize( ".wppa-'+tagtype+'list-'+mocc+'", "#'+selid+'" )', 10 );
1287
+ if (retry) {
1288
+ wppaConsoleLog('wppaAjaxGetSs'+tagtype+'List success after retry.', 'force');
1289
+ }
1290
+ },
1291
+ error: function( xhr, status, error ) {
1292
+ wppaConsoleLog('wppaAjaxGetSs'+tagtype+'List failed. Error = ' + error + ', status = ' + status, 'force' );
1293
+ if (!retry) wppaAjaxGetSsIptcExifList( mocc, s3, selid, true, tagtype );
1294
+ },
1295
+ complete: function( xhr, status, newurl ) {
1296
+ jQuery( '#wppa-ss-spinner-'+mocc ).css('display', 'none');
1297
+ }
1298
+ } );
1299
+ }
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
1
+ var wppaJsAjaxVersion="8.0.00.021",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?(wppaConsoleLog(a,"force"),jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,p,e){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}})):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRequestInfo(a,p,e){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+p+", "+e+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";e={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(e).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var p;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),p='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(p),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,p,e){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+e).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+p).val())&&(n[u]=o),a=n.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(o,p){var a,e,t;0!=p&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],e=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var p=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}}))}function wppaAjaxNotify(a,p){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxGetSsIptcList(a,p,e,t){wppaAjaxGetSsIptcExifList(a,p,e,t,"iptc")}function wppaAjaxGetSsExifList(a,p,e,t){wppaAjaxGetSsIptcExifList(a,p,e,t,"exif")}function wppaAjaxGetSsIptcExifList(t,o,r,n,i){ajaxurl=n?wppaAdminAjaxUrl:wppaAjaxUrl,ajaxurl+="?action=wppa&wppa-action=getss"+i+"list&"+i+"tag="+o+"&moccur="+t,jQuery.ajax({url:ajaxurl,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(a,p,e){jQuery("#"+r).html(a),jQuery("#wppa-ss-"+i+"opts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-'+i+"list-"+t+'", "#'+r+'" )',10),n&&wppaConsoleLog("wppaAjaxGetSs"+i+"List success after retry.","force")},error:function(a,p,e){wppaConsoleLog("wppaAjaxGetSs"+i+"List failed. Error = "+e+", status = "+p,"force"),n||wppaAjaxGetSsIptcExifList(t,o,r,!0,i)},complete:function(a,p,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}
js/wppa-all.js CHANGED
@@ -1,11 +1,11 @@
1
  // wppa-utils
2
  var wppaDebug;wppaJsUtilsVersion="8.0.00.017";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<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="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<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":l+='<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":l+='<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":l+='<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":l+='<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":l+='<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"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<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;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(function(){wppaMakeLazyVisible("scrollend")},wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(e){if(wppaLazyLoad&&!wppaLazyBusy){wppaLazyBusy=!0;var t,a=new Date,p=a.getTime();if(p<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible("selftimer")},100),void(wppaLazyBusy=!1);wppaInitMasonryPlus(),wppaLastLazy=p,clearTimeout(wppaLazyTimer);var i=0;jQuery("*[data-src]").each(function(){t=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),i++)}),0<i&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&(setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery("div").getNiceScroll().resize()},1500)),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),p=(a=new Date).getTime(),wppaLastLazy=p,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.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){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=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}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
- wppaWppaVer="8.0.00.017";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,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,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,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,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],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,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_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=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,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,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").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 e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-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",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/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*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){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(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}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;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){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 a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){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 i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}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,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){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,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),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"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;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,e,a,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}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
6
  var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[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]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" 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]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}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:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);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,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;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"+t+"-"+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]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):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 l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-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)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),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?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):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))):wppaMakeTheSlideHtml(p,e,_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);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}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,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}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){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),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]])),_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 i=_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,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.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 l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<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+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</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":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}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,l=""==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+l+' 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+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",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),s+='<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),s+='<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 "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' 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),s+='<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=s}""!=_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 wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible("filmstripmocc="+p),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_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?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_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):(_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){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_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):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):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_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):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):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;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_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 w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[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(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(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",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" 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(r)}0==e?(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(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}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("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+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,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).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"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}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,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
7
  // wppa-ajax-front
8
- var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
  // wppa-lightbox
10
  var panType,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.020",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0,wppaSavedContainerHeight=0;function wppaOvlKeyboardHandler(p){var a,t=(a=(null==p?event:p).keyCode,27),p=String.fromCharCode(a).toLowerCase();switch(a){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(p){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(p){var a,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(p.rel||!!e(p).attr("data-rel")&&e(p).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],w=e("a"),n=0,r=0;r<w.length;r++)1<(l=!!e(o=w[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[n]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[n]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",a=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"",panType=e(o).attr("data-pantype")?e(o).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(t+1),wppaOvlPanoramaIds[n]=a.substr(0,t),wppaOvlTypes[n]=panType):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0,wppaOvlTypes[n]=""),0<wppaOvlPdfHtmls[n].length&&(wppaOvlTypes[n]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(p).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(p).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);else wppaOvlUrls[0]=p.href,e(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=e(p).attr("data-id")?e(p).attr("data-id"):"0",wppaOvlAlts[0]=e(p).attr("data-alt")?e(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(p).attr("data-videohtml")?decodeURI(e(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(p).attr("data-audiohtml")?decodeURI(e(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(p).attr("data-pdfhtml")?decodeURI(e(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(p).attr("data-videonatwidth")?e(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(p).attr("data-videonatheight")?e(p).attr("data-videonatheight"):"",a=e(p).attr("data-panorama")?e(p).attr("data-panorama"):"",panType=e(p).attr("data-pantype")?e(p).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(t+1),wppaOvlPanoramaIds[0]=a.substr(0,t),wppaOvlTypes[0]=panType):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){var a=jQuery;a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),wppaOvlCurIdx=p,wppaOvlFirst&&a("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if(""==wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t]),""==wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e]),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[p],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama){if(wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[p]: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>":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>':(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>"),!wppaIsVideo&&!wppaHasAudio||wppaOvlFsPhotoId!=wppaPhotoId||0==wppaPhotoId)if(wppaStopVideo(0),wppaStopAudio(),0<wppaOvlActivePanorama)switch(wppaOvlTypes[p]){case"spheric":a("#wppa-overlay-pc").html(l).show();break;case"flat":a("#wppa-overlay-fpc").html(l).show();break;case"zoom":a("#wppa-overlay-zpc").html(l).show()}else a("#wppa-overlay-ic").html(l).show();return 0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&a(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,""==wppaOvlTypes[p]&&a("#wppa-overlay-ic").show(),wppaFsShow(),wppaProtect(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&a("#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+";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),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";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;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?a("#wppa-overlay-ic"):a("#wppa-overlay-pc")).html(l),""!=wppaOvlTypes[p]&&"document"!=wppaOvlTypes[p]||a("#wppa-overlay-ic").show(),wppaFsShow(),a("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(p){var a=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=a("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),w=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,w=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/w)?e:t)<1&&(l=parseInt(l*t),w=parseInt(w*t));var t=a("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/w),i=(wppaOvlPadTop,parseInt((o-i)/2),i);w<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(w=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*w/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+a("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),a("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),a("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),o?(a("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var p,a=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout(wppaOvlFormatFull,200);o=p.naturalWidth,i=p.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),a(p).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),a(p).css({visibility:"visible"}),a("#wppa-ovl-full-bg").css({overflow:"hidden"}),a("#wppa-ovl-full-bg").scrollTop(0),a("#wppa-ovl-full-bg").scrollLeft(0),a("#wppa-ovl-spin").hide(),a("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=a("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",a("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&p.play()}function wppaOvlStartStop(){var p=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&p("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&p("#wppa-ovl-next-btn").css("visibility","visible")),p("#wppa-ovl-stop-btn").hide(),p("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),p("#wppa-ovl-stop-btn").show(),p("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo&&!wppaOvlIsPdf){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx-1;p<0&&(p=wppaOvlUrls.length-1);var a=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx+1;p>wppaOvlUrls.length-1&&(p=0);var a=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var p,a;wppaOvlOpen&&(p=wppaOvlCurIdx,a=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(p),a&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(p){var a=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),p||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,a("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(p)},250):(wppaOvlClosing=!1,p||setTimeout(function(){a("#wppa-overlay-bg").hide(),a("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(p){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var p=e(this),a=p.find("IMG[alt]").attr("alt")||"",t=p.find(".wp-caption-text").html()||"",p=p.find("a"),t=a+"<br>"+t;p.attr("data-lbtitle")||p.attr("data-lbtitle",t)});var p,a,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=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<t.length;a++)if(p=t[a],e(p).attr("data-rel")?l=e(p).attr("data-rel").split("["):p.rel?l=p.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":e(p).css("cursor","pointer");break;case"":e(p).css("cursor","default");break;default:e(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
1
  // wppa-utils
2
  var wppaDebug;wppaJsUtilsVersion="8.0.00.017";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<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="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<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":l+='<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":l+='<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":l+='<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":l+='<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":l+='<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"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<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;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(function(){wppaMakeLazyVisible("scrollend")},wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(e){if(wppaLazyLoad&&!wppaLazyBusy){wppaLazyBusy=!0;var t,a=new Date,p=a.getTime();if(p<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible("selftimer")},100),void(wppaLazyBusy=!1);wppaInitMasonryPlus(),wppaLastLazy=p,clearTimeout(wppaLazyTimer);var i=0;jQuery("*[data-src]").each(function(){t=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),i++)}),0<i&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&(setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery("div").getNiceScroll().resize()},1500)),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),p=(a=new Date).getTime(),wppaLastLazy=p,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.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){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=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}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
+ wppaWppaVer="8.0.00.021";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,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,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,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="",wppaAdminAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],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,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_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=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,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,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").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 e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-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",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/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*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){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(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}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;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){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 a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){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 i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),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"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;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,e,a,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}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
6
  var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[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]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" 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]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}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:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);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,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;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"+t+"-"+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]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):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 l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-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)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),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?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):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))):wppaMakeTheSlideHtml(p,e,_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);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}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,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}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){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),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]])),_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 i=_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,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.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 l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<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+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</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":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}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,l=""==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+l+' 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+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",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),s+='<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),s+='<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 "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' 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),s+='<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=s}""!=_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 wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible("filmstripmocc="+p),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_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?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_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):(_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){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_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):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):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_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):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):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;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_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 w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[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(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(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",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" 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(r)}0==e?(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(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}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("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+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,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).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"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}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,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
7
  // wppa-ajax-front
8
+ var wppaJsAjaxVersion="8.0.00.021",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?(wppaConsoleLog(a,"force"),jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,p,e){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}})):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRequestInfo(a,p,e){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+p+", "+e+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";e={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(e).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var p;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),p='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(p),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,p,e){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+e).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+p).val())&&(n[u]=o),a=n.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(o,p){var a,e,t;0!=p&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],e=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var p=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}}))}function wppaAjaxNotify(a,p){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxGetSsIptcList(a,p,e,t){wppaAjaxGetSsIptcExifList(a,p,e,t,"iptc")}function wppaAjaxGetSsExifList(a,p,e,t){wppaAjaxGetSsIptcExifList(a,p,e,t,"exif")}function wppaAjaxGetSsIptcExifList(t,o,r,n,i){ajaxurl=n?wppaAdminAjaxUrl:wppaAjaxUrl,ajaxurl+="?action=wppa&wppa-action=getss"+i+"list&"+i+"tag="+o+"&moccur="+t,jQuery.ajax({url:ajaxurl,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(a,p,e){jQuery("#"+r).html(a),jQuery("#wppa-ss-"+i+"opts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-'+i+"list-"+t+'", "#'+r+'" )',10),n&&wppaConsoleLog("wppaAjaxGetSs"+i+"List success after retry.","force")},error:function(a,p,e){wppaConsoleLog("wppaAjaxGetSs"+i+"List failed. Error = "+e+", status = "+p,"force"),n||wppaAjaxGetSsIptcExifList(t,o,r,!0,i)},complete:function(a,p,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}
9
  // wppa-lightbox
10
  var panType,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.020",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0,wppaSavedContainerHeight=0;function wppaOvlKeyboardHandler(p){var a,t=(a=(null==p?event:p).keyCode,27),p=String.fromCharCode(a).toLowerCase();switch(a){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(p){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(p){var a,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(p.rel||!!e(p).attr("data-rel")&&e(p).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],w=e("a"),n=0,r=0;r<w.length;r++)1<(l=!!e(o=w[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[n]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[n]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",a=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"",panType=e(o).attr("data-pantype")?e(o).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(t+1),wppaOvlPanoramaIds[n]=a.substr(0,t),wppaOvlTypes[n]=panType):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0,wppaOvlTypes[n]=""),0<wppaOvlPdfHtmls[n].length&&(wppaOvlTypes[n]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(p).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(p).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);else wppaOvlUrls[0]=p.href,e(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=e(p).attr("data-id")?e(p).attr("data-id"):"0",wppaOvlAlts[0]=e(p).attr("data-alt")?e(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(p).attr("data-videohtml")?decodeURI(e(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(p).attr("data-audiohtml")?decodeURI(e(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(p).attr("data-pdfhtml")?decodeURI(e(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(p).attr("data-videonatwidth")?e(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(p).attr("data-videonatheight")?e(p).attr("data-videonatheight"):"",a=e(p).attr("data-panorama")?e(p).attr("data-panorama"):"",panType=e(p).attr("data-pantype")?e(p).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(t+1),wppaOvlPanoramaIds[0]=a.substr(0,t),wppaOvlTypes[0]=panType):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){var a=jQuery;a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),wppaOvlCurIdx=p,wppaOvlFirst&&a("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if(""==wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t]),""==wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e]),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[p],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama){if(wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[p]: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>":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>':(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>"),!wppaIsVideo&&!wppaHasAudio||wppaOvlFsPhotoId!=wppaPhotoId||0==wppaPhotoId)if(wppaStopVideo(0),wppaStopAudio(),0<wppaOvlActivePanorama)switch(wppaOvlTypes[p]){case"spheric":a("#wppa-overlay-pc").html(l).show();break;case"flat":a("#wppa-overlay-fpc").html(l).show();break;case"zoom":a("#wppa-overlay-zpc").html(l).show()}else a("#wppa-overlay-ic").html(l).show();return 0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&a(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,""==wppaOvlTypes[p]&&a("#wppa-overlay-ic").show(),wppaFsShow(),wppaProtect(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&a("#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+";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),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";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;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?a("#wppa-overlay-ic"):a("#wppa-overlay-pc")).html(l),""!=wppaOvlTypes[p]&&"document"!=wppaOvlTypes[p]||a("#wppa-overlay-ic").show(),wppaFsShow(),a("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(p){var a=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=a("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),w=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,w=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/w)?e:t)<1&&(l=parseInt(l*t),w=parseInt(w*t));var t=a("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/w),i=(wppaOvlPadTop,parseInt((o-i)/2),i);w<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(w=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*w/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+a("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),a("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),a("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),o?(a("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var p,a=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout(wppaOvlFormatFull,200);o=p.naturalWidth,i=p.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),a(p).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),a(p).css({visibility:"visible"}),a("#wppa-ovl-full-bg").css({overflow:"hidden"}),a("#wppa-ovl-full-bg").scrollTop(0),a("#wppa-ovl-full-bg").scrollLeft(0),a("#wppa-ovl-spin").hide(),a("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=a("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",a("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&p.play()}function wppaOvlStartStop(){var p=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&p("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&p("#wppa-ovl-next-btn").css("visibility","visible")),p("#wppa-ovl-stop-btn").hide(),p("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),p("#wppa-ovl-stop-btn").show(),p("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo&&!wppaOvlIsPdf){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx-1;p<0&&(p=wppaOvlUrls.length-1);var a=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx+1;p>wppaOvlUrls.length-1&&(p=0);var a=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var p,a;wppaOvlOpen&&(p=wppaOvlCurIdx,a=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(p),a&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(p){var a=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),p||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,a("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(p)},250):(wppaOvlClosing=!1,p||setTimeout(function(){a("#wppa-overlay-bg").hide(),a("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(p){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var p=e(this),a=p.find("IMG[alt]").attr("alt")||"",t=p.find(".wp-caption-text").html()||"",p=p.find("a"),t=a+"<br>"+t;p.attr("data-lbtitle")||p.attr("data-lbtitle",t)});var p,a,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=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<t.length;a++)if(p=t[a],e(p).attr("data-rel")?l=e(p).attr("data-rel").split("["):p.rel?l=p.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":e(p).css("cursor","pointer");break;case"":e(p).css("cursor","default");break;default:e(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
js/wppa.js CHANGED
@@ -3,7 +3,7 @@
3
  // contains common vars and functions
4
  //
5
 
6
- wppaWppaVer = '8.0.00.017';
7
 
8
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
9
  var wppaIsSafari = false;
@@ -76,6 +76,7 @@ var wppaFontColorNumbarActive = '';
76
  var wppaFontWeightNumbarActive = '';
77
  var wppaNumbarMax = '10';
78
  var wppaAjaxUrl = '';
 
79
  var wppaLang = '';
80
  var wppaNextOnCallback = false;
81
  var wppaStarOpacity = 0.2;
@@ -1450,67 +1451,6 @@ function wppaSuperSearchSelect( mocc, go ) {
1450
  }
1451
  }
1452
 
1453
- // Supersearch function get iptc list
1454
- // These functions may not be moved to wppa-ajax-front.js because they MUST be loaded in the header!
1455
- function wppaAjaxGetSsIptcList( mocc, s3, selid ) {
1456
-
1457
- jQuery.ajax( { url: wppaAjaxUrl,
1458
- data: 'action=wppa' +
1459
- '&wppa-action=getssiptclist' +
1460
- '&tag=' + s3 +
1461
- '&moccur=' + mocc,
1462
- async: true,
1463
- type: 'GET',
1464
- timeout: 10000,
1465
- beforeSend: function( xhr ) {
1466
- jQuery( '#wppa-ss-spinner-'+mocc ).css('display', '');
1467
- },
1468
- success: function( result, status, xhr ) {
1469
- jQuery( '#'+selid ).html( result );
1470
- jQuery( '#wppa-ss-iptcopts-'+mocc ).css('display', '');
1471
- wppaSuperSearchSelect( mocc );
1472
- setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+mocc+'", "#'+selid+'" )', 10 );
1473
- },
1474
- error: function( xhr, status, error ) {
1475
- wppaConsoleLog('wppaAjaxGetSsIptcList failed. Error = ' + error + ', status = ' + status, 'force' );
1476
- },
1477
- complete: function( xhr, status, newurl ) {
1478
- jQuery( '#wppa-ss-spinner-'+mocc ).css('display', 'none');
1479
- }
1480
- } );
1481
-
1482
- }
1483
-
1484
- // Supersearch function get exif list
1485
- function wppaAjaxGetSsExifList( mocc, s3, selid ) {
1486
-
1487
- jQuery.ajax( { url: wppaAjaxUrl,
1488
- data: 'action=wppa' +
1489
- '&wppa-action=getssexiflist' +
1490
- '&tag=' + s3 +
1491
- '&moccur=' + mocc,
1492
- async: true,
1493
- type: 'GET',
1494
- timeout: 10000,
1495
- beforeSend: function( xhr ) {
1496
- jQuery( '#wppa-ss-spinner-'+mocc ).css('display', '');
1497
- },
1498
- success: function( result, status, xhr ) {
1499
- jQuery( '#'+selid ).html( result );
1500
- jQuery( '#wppa-ss-exifopts-'+mocc ).css('display', '');
1501
- wppaSuperSearchSelect( mocc );
1502
- setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+mocc+'", "#'+selid+'" )', 10 );
1503
- },
1504
- error: function( xhr, status, error ) {
1505
- wppaConsoleLog('wppaAjaxGetSsExifList failed. Error = ' + error + ', status = ' + status, 'force' );
1506
- },
1507
- complete: function( xhr, status, newurl ) {
1508
- jQuery( '#wppa-ss-spinner-'+mocc ).css('display', 'none');
1509
- }
1510
- } );
1511
-
1512
- }
1513
-
1514
  // Supersearch function set size of exif/iptc itemlist
1515
  function wppaSetIptcExifSize( clas, selid ) {
1516
  var t = jQuery( clas );
3
  // contains common vars and functions
4
  //
5
 
6
+ wppaWppaVer = '8.0.00.021';
7
 
8
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
9
  var wppaIsSafari = false;
76
  var wppaFontWeightNumbarActive = '';
77
  var wppaNumbarMax = '10';
78
  var wppaAjaxUrl = '';
79
+ var wppaAdminAjaxUrl = '';
80
  var wppaLang = '';
81
  var wppaNextOnCallback = false;
82
  var wppaStarOpacity = 0.2;
1451
  }
1452
  }
1453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1454
  // Supersearch function set size of exif/iptc itemlist
1455
  function wppaSetIptcExifSize( clas, selid ) {
1456
  var t = jQuery( clas );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- wppaWppaVer="8.0.00.017";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,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,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,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,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],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,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_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=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,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,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").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 e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-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",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/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*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){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(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}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;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){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 a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){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 i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}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,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){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,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),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"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;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,e,a,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}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
1
+ wppaWppaVer="8.0.00.021";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,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,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,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="",wppaAdminAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],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,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_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=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,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,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").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 e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-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",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/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*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){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(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}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;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){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 a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){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 i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).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","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),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"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;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,e,a,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}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
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 8.0.00.019
7
  *
8
  */
9
 
@@ -370,7 +370,6 @@ add_action( 'admin_init', 'wppa_check_cat_system' );
370
 
371
  require_once 'wppa-dashboard-widgets.php';
372
 
373
-
374
  // Load panoama js if needed at the backend
375
  if ( wppa_get_option( 'wppa_enable_panorama' ) == 'yes' ) {
376
  add_action( 'admin_footer', 'wppa_load_panorama_js' );
@@ -387,9 +386,7 @@ global $wppa_api_version;
387
 
388
  // Register category for Gutenberg
389
  function wppa_block_categories( $categories, $post ) {
390
- if ( $post->post_type !== 'post' && $post->post_type !== 'page' ) {
391
- return $categories;
392
- }
393
  return array_merge(
394
  $categories,
395
  array(
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 8.0.00.021
7
  *
8
  */
9
 
370
 
371
  require_once 'wppa-dashboard-widgets.php';
372
 
 
373
  // Load panoama js if needed at the backend
374
  if ( wppa_get_option( 'wppa_enable_panorama' ) == 'yes' ) {
375
  add_action( 'admin_footer', 'wppa_load_panorama_js' );
386
 
387
  // Register category for Gutenberg
388
  function wppa_block_categories( $categories, $post ) {
389
+
 
 
390
  return array_merge(
391
  $categories,
392
  array(
wppa-admins-choice-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
- * Version 7.4.00
7
  *
8
  */
9
 
@@ -77,7 +77,7 @@ class AdminsChoice extends WP_Widget {
77
  }
78
  $result .= $widget_content . $after_widget;
79
 
80
- echo $result;
81
  echo wppa_widget_timer( 'show', $widget_title );
82
 
83
  // Cache?
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
77
  }
78
  $result .= $widget_content . $after_widget;
79
 
80
+ echo wppa_compress_html( $result );
81
  echo wppa_widget_timer( 'show', $widget_title );
82
 
83
  // Cache?
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.0.00.020
6
  *
7
  */
8
 
@@ -24,7 +24,7 @@ function wppa_ajax_rewrite_rule() {
24
 
25
  add_rewrite_rule( 'wppaajax/?$', 'index.php?wppa_ajax=1', 'top' );
26
  $rewrite_rules = get_option( 'rewrite_rules', array() );
27
- if ( ! in_array( 'index.php?wppa_ajax=1', $rewrite_rules ) ) {
28
  flush_rewrite_rules();
29
  }
30
  }
@@ -224,16 +224,26 @@ global $wppa;
224
  echo $result;
225
  wppa_exit();
226
  break;
 
227
  case 'getssiptclist':
228
- $tag = str_replace( 'H', '#', $_REQUEST['tag'] );
229
- $mocc = strval( intval( $_REQUEST['moccur'] ) );
230
- $oldvalue = '';
 
 
 
 
 
 
 
 
 
231
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
232
  $ss_data = explode( ',', $wppa_session['supersearch'] );
233
  if ( count( $ss_data ) == '4' ) {
234
  if ( $ss_data['0'] == 'p' ) {
235
  if ( $ss_data['1'] == 'i' ) {
236
- if ( $ss_data['2'] == $_REQUEST['tag'] ) {
237
  $oldvalue = $ss_data['3'];
238
  }
239
  }
@@ -275,12 +285,21 @@ global $wppa;
275
  break;
276
 
277
  case 'getssexiflist':
278
- $tag = str_replace( 'H', '#', substr( $_REQUEST['tag'], 0, 6 ) );
279
- $brand = substr( $_REQUEST['tag'], 6 );
280
- $mocc = strval( intval( $_REQUEST['moccur'] ) );
 
281
  $oldvalue = '';
282
  $ss_data = array();
283
 
 
 
 
 
 
 
 
 
284
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
285
  $data = explode( ',', $wppa_session['supersearch'] );
286
  if ( count( $data ) >= '4' ) {
@@ -294,7 +313,7 @@ global $wppa;
294
 
295
  if ( $ss_data['0'] == 'p' ) {
296
  if ( $ss_data['1'] == 'e' ) {
297
- if ( $ss_data['2'] == $_REQUEST['tag'] ) {
298
  $oldvalue = $ss_data['3'];
299
  }
300
  }
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.0.00.021
6
  *
7
  */
8
 
24
 
25
  add_rewrite_rule( 'wppaajax/?$', 'index.php?wppa_ajax=1', 'top' );
26
  $rewrite_rules = get_option( 'rewrite_rules', array() );
27
+ if ( ! is_array( $rewrite_rules ) || ! in_array( 'index.php?wppa_ajax=1', $rewrite_rules ) ) {
28
  flush_rewrite_rules();
29
  }
30
  }
224
  echo $result;
225
  wppa_exit();
226
  break;
227
+
228
  case 'getssiptclist':
229
+
230
+ $tag = '';
231
+ $mocc = '1';
232
+ $oldvalue = '';
233
+
234
+ if ( isset( $_REQUEST['iptctag'] ) ) {
235
+ $tag = str_replace( 'H', '#', $_REQUEST['iptctag'] );
236
+ }
237
+ if ( isset( $_REQUEST['moccur'] ) ) {
238
+ $mocc = strval( intval( $_REQUEST['moccur'] ) );
239
+ }
240
+
241
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
242
  $ss_data = explode( ',', $wppa_session['supersearch'] );
243
  if ( count( $ss_data ) == '4' ) {
244
  if ( $ss_data['0'] == 'p' ) {
245
  if ( $ss_data['1'] == 'i' ) {
246
+ if ( $ss_data['2'] == $_REQUEST['iptctag'] ) {
247
  $oldvalue = $ss_data['3'];
248
  }
249
  }
285
  break;
286
 
287
  case 'getssexiflist':
288
+
289
+ $tag = '';
290
+ $brand = '';
291
+ $mocc = '1';
292
  $oldvalue = '';
293
  $ss_data = array();
294
 
295
+ if ( isset( $_REQUEST['exiftag'] ) ) {
296
+ $tag = str_replace( 'H', '#', substr( $_REQUEST['exiftag'], 0, 6 ) );
297
+ $brand = substr( $_REQUEST['exiftag'], 6 );
298
+ }
299
+ if ( isset( $_REQUEST['moccur'] ) ) {
300
+ $mocc = strval( intval( $_REQUEST['moccur'] ) );
301
+ }
302
+
303
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
304
  $data = explode( ',', $wppa_session['supersearch'] );
305
  if ( count( $data ) >= '4' ) {
313
 
314
  if ( $ss_data['0'] == 'p' ) {
315
  if ( $ss_data['1'] == 'e' ) {
316
+ if ( $ss_data['2'] == $_REQUEST['exiftag'] ) {
317
  $oldvalue = $ss_data['3'];
318
  }
319
  }
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 8.0.00.008
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -27,7 +27,7 @@ class AlbumNavigatorWidget extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
- $cache = $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
@@ -36,23 +36,11 @@ class AlbumNavigatorWidget extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Other inits
@@ -89,7 +77,7 @@ class AlbumNavigatorWidget extends WP_Widget {
89
  }
90
  $result .= $widget_content . $after_widget;
91
 
92
- echo $result;
93
  echo wppa_widget_timer( 'show', $widget_title );
94
 
95
  // Cache?
@@ -172,7 +160,7 @@ class AlbumNavigatorWidget extends WP_Widget {
172
 
173
  // Cache
174
  echo
175
- wppa_widget_cache( $this, $instance['cache'] );
176
 
177
  }
178
 
@@ -341,7 +329,7 @@ class AlbumNavigatorWidget extends WP_Widget {
341
  $result .= '
342
  <a
343
  class="albnav albnav-albumlink" ' .
344
- ( $link['is_url'] ? 'href="' . $link['url'] . '" ' : ' ' ) .
345
  ( $link['target'] ? 'target="' . $link['target'] . '" ' : ' ' ) .
346
  ( $link['onclick'] ? 'onclick="' . $link['onclick'] . '" ' : ' ' ) .
347
  '
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
+ $cache = ! is_admin() && $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Other inits
77
  }
78
  $result .= $widget_content . $after_widget;
79
 
80
+ echo wppa_compress_html( $result );
81
  echo wppa_widget_timer( 'show', $widget_title );
82
 
83
  // Cache?
160
 
161
  // Cache
162
  echo
163
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
164
 
165
  }
166
 
329
  $result .= '
330
  <a
331
  class="albnav albnav-albumlink" ' .
332
+ ( $link['is_url'] ? 'href="' . $link['url'] . '" ' : ' ' ) .
333
  ( $link['target'] ? 'target="' . $link['target'] . '" ' : ' ' ) .
334
  ( $link['onclick'] ? 'onclick="' . $link['onclick'] . '" ' : ' ' ) .
335
  '
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 8.0.00.008
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -28,7 +28,7 @@ class AlbumWidget extends WP_Widget {
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
- $cache = $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
@@ -37,23 +37,11 @@ class AlbumWidget extends WP_Widget {
37
  }
38
 
39
  // Cache?
40
- if ( $cache ) {
41
-
42
- if ( wppa_is_file( $cachefile ) ) {
43
-
44
- // Cache expired?
45
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
46
- wppa_remove_widget_cache_path( $this->id );
47
- }
48
-
49
- // No, use it
50
- else {
51
- echo wppa_get_contents( $cachefile );
52
- echo wppa_widget_timer( 'show', $widget_title, true );
53
- wppa( 'in_widget', false );
54
- return;
55
- }
56
- }
57
  }
58
 
59
  // Other inits
@@ -64,21 +52,6 @@ class AlbumWidget extends WP_Widget {
64
  $parent = $instance['parent'];
65
  $subs = wppa_checked( $instance['subs'] );
66
 
67
- // Logged in only and logged out?
68
- if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
69
- return;
70
- }
71
-
72
- // Cache?
73
- if ( $cache ) {
74
- if ( wppa_is_file( $cachefile ) ) {
75
- echo wppa_get_contents( $cachefile );
76
- echo wppa_widget_timer( 'show', $widget_title );
77
- wppa( 'in_widget', false );
78
- return;
79
- }
80
- }
81
-
82
  switch ( $parent ) {
83
  case 'all':
84
  if ( wppa_has_many_albums() ) {
@@ -390,7 +363,7 @@ class AlbumWidget extends WP_Widget {
390
  }
391
  $result .= $widget_content . $after_widget;
392
 
393
- echo $result;
394
 
395
  // Cache?
396
  if ( wppa_checked( $instance['cache'] ) ) {
@@ -477,11 +450,11 @@ class AlbumWidget extends WP_Widget {
477
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
478
 
479
  // Cache
480
- wppa_widget_cache( $this, $instance['cache'] ) .
481
 
482
  '<p>' .
483
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus') .
484
- ' ' . __( 'Table I-F9 and 10', 'wp-photo-album-plus' ) .
485
  '</p>';
486
  }
487
 
@@ -494,7 +467,7 @@ class AlbumWidget extends WP_Widget {
494
  'name' => 'no',
495
  'skip' => 'no',
496
  'logonly' => 'no',
497
- 'cache' => '0',
498
  );
499
  return $defaults;
500
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
+ $cache = ! is_admin() && $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
37
  }
38
 
39
  // Cache?
40
+ if ( $cache && wppa_is_file( $cachefile ) ) {
41
+ echo wppa_get_contents( $cachefile );
42
+ echo wppa_widget_timer( 'show', $widget_title, true );
43
+ wppa( 'in_widget', false );
44
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  // Other inits
52
  $parent = $instance['parent'];
53
  $subs = wppa_checked( $instance['subs'] );
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  switch ( $parent ) {
56
  case 'all':
57
  if ( wppa_has_many_albums() ) {
363
  }
364
  $result .= $widget_content . $after_widget;
365
 
366
+ echo wppa_compress_html( $result );
367
 
368
  // Cache?
369
  if ( wppa_checked( $instance['cache'] ) ) {
450
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
451
 
452
  // Cache
453
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) .
454
 
455
  '<p>' .
456
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus') .
457
+ ' ' . __( 'Basic setings -> Widget -> Items 10 and 11', 'wp-photo-album-plus' ) .
458
  '</p>';
459
  }
460
 
467
  'name' => 'no',
468
  'skip' => 'no',
469
  'logonly' => 'no',
470
+ 'cache' => 'no',
471
  );
472
  return $defaults;
473
  }
wppa-bestof-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
- * Version 7.3.03
7
  *
8
  */
9
 
@@ -29,7 +29,7 @@ class BestOfWidget extends WP_Widget {
29
  extract( $args );
30
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
31
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
32
- $cache = $instance['cache'];
33
  $cachefile = wppa_get_widget_cache_path( $this->id );
34
 
35
  // Logged in only and logged out?
@@ -38,23 +38,11 @@ class BestOfWidget extends WP_Widget {
38
  }
39
 
40
  // Cache?
41
- if ( $cache ) {
42
-
43
- if ( wppa_is_file( $cachefile ) ) {
44
-
45
- // Cache expired?
46
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
47
- wppa_remove_widget_cache_path( $this->id );
48
- }
49
-
50
- // No, use it
51
- else {
52
- echo wppa_get_contents( $cachefile );
53
- echo wppa_widget_timer( 'show', $widget_title, true );
54
- wppa( 'in_widget', false );
55
- return;
56
- }
57
- }
58
  }
59
 
60
  // Other inits
@@ -98,7 +86,7 @@ class BestOfWidget extends WP_Widget {
98
  }
99
  $result .= $widget_content . $after_widget;
100
 
101
- echo $result;
102
  echo wppa_widget_timer( 'show', $widget_title );
103
 
104
  // Cache?
@@ -218,7 +206,7 @@ class BestOfWidget extends WP_Widget {
218
 
219
  // Cache
220
  echo
221
- wppa_widget_cache( $this, $instance['cache'] );
222
 
223
  }
224
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
29
  extract( $args );
30
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
31
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
32
+ $cache = ! is_admin() && $instance['cache'];
33
  $cachefile = wppa_get_widget_cache_path( $this->id );
34
 
35
  // Logged in only and logged out?
38
  }
39
 
40
  // Cache?
41
+ if ( $cache && wppa_is_file( $cachefile ) ) {
42
+ echo wppa_get_contents( $cachefile );
43
+ echo wppa_widget_timer( 'show', $widget_title, true );
44
+ wppa( 'in_widget', false );
45
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
 
48
  // Other inits
86
  }
87
  $result .= $widget_content . $after_widget;
88
 
89
+ echo wppa_compress_html( $result );
90
  echo wppa_widget_timer( 'show', $widget_title );
91
 
92
  // Cache?
206
 
207
  // Cache
208
  echo
209
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
210
 
211
  }
212
 
wppa-boxes-html.php CHANGED
@@ -3,13 +3,13 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.0.00.020
7
  *
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
11
 
12
- // Open / cose the box containing the thumbnails
13
  function wppa_thumb_area( $action ) {
14
 
15
  // Init
@@ -26,25 +26,21 @@ function wppa_thumb_area( $action ) {
26
  // Open thumbnail area box
27
  if ( $action == 'open' ) {
28
  if ( is_feed() ) {
29
- $result .= '<div'.
30
- ' id="wppa-thumb-area-' . $mocc . '"' .
31
- ' class="wppa-box wppa-thumb-area"' .
32
- ' >';
 
33
  }
34
  else {
35
- $result .= "\n";
36
- $result .= '<div' .
37
- ' id="wppa-thumb-area-' . $mocc . '"' .
38
- ' class="' .
39
- 'wppa-box wppa-thumb-area ' .
40
- 'wppa-thumb-area-' . $mocc . ' ' .
41
- '"' .
42
- ' style="' .
43
- ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
44
- 'overflow:' . $overflow . ';' .
45
- '"' .
46
- ' onscroll="wppaMakeLazyVisibleScrollEnd();" ' .
47
- ' >';
48
 
49
  if ( wppa_is_int( wppa( 'start_album' ) ) ) {
50
  wppa_bump_viewcount( 'album', wppa( 'start_album') );
@@ -63,7 +59,6 @@ function wppa_thumb_area( $action ) {
63
  $result .= wppa_get_user_create_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
64
  $result .= wppa_get_user_upload_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
65
  }
66
-
67
  }
68
 
69
  // Close thumbnail area box
@@ -82,27 +77,19 @@ function wppa_thumb_area( $action ) {
82
 
83
  // Nicescroller
84
  if ( $nice ) {
85
- $result .=
86
- '<script>jQuery(document).ready(function(){' .
87
- 'jQuery(".wppa-thumb-area").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});' .
88
- '});
89
- </script>' .
90
- '</div>'; // close .wppa-nicewrap div
 
91
  }
92
 
93
  // Close the thumbnail box
94
  $result .= '</div>';
95
  }
96
 
97
- // Unimplemented action
98
- else {
99
- $result .= '<span style="color:red;">' .
100
- 'Error, wppa_thumb_area() called with wrong argument: ' .
101
- $action .
102
- '. Possible values: \'open\' or \'close\'' .
103
- '</span>';
104
- }
105
-
106
  // Output result
107
  wppa_out( $result );
108
  }
@@ -123,26 +110,21 @@ function wppa_contest_box() {
123
 
124
  // Open contest box
125
  if ( is_feed() ) {
126
- $result .= '<div'.
127
- ' id="wppa-thumb-area-' . $mocc . '"' .
128
- ' class="wppa-box wppa-thumb-area"' .
129
- ' >';
 
130
  }
131
  else {
132
- $result .= "\n";
133
- $result .= '<div' .
134
- ' id="wppa-thumb-area-' . $mocc . '"' .
135
- ' class="' .
136
- 'wppa-box wppa-contest ' .
137
- 'wppa-thumb-area ' .
138
- 'wppa-thumb-area-' . $mocc . ' ' .
139
- '"' .
140
- ' style="' .
141
- ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
142
- 'overflow:' . $overflow . ';' .
143
- '"' .
144
- ' onscroll="wppaMakeLazyVisibleScrollEnd();" ' .
145
- ' >';
146
  }
147
 
148
  // Use nicescroller?
@@ -159,11 +141,11 @@ function wppa_contest_box() {
159
  if ( $nice ) {
160
  $result .= '
161
  <script>
162
- jQuery(document).ready(function(){' .
163
- 'jQuery(".wppa-thumb-area").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});' .
164
- '});
165
- </script>' .
166
- '</div>'; // close .wppa-nicewrap div
167
  }
168
 
169
  // Close the box
@@ -372,7 +354,7 @@ global $wpdb;
372
  </table>
373
  <br /><div style="clear:both;" ></div>';
374
 
375
- return $result;
376
  }
377
 
378
  // Should comment be visible on contest display?
@@ -423,14 +405,20 @@ function wppa_search_box() {
423
  wppa_container( 'open' );
424
 
425
  // Open wrapper
426
- $result .= "\n";
427
- $result .= '<div' .
428
- ' id="wppa-search-'.wppa( 'mocc' ) . '"' .
429
- ' class="wppa-box wppa-search"' .
430
- ' >';
431
 
432
  // The search html
433
- $result .= wppa_get_search_html( '', wppa( 'may_sub' ), wppa( 'may_root' ), wppa( 'forceroot' ), wppa( 'landingpage' ), wppa_switch( 'search_catbox' ), wppa_opt( 'search_selboxes' ) );
 
 
 
 
 
 
434
 
435
  // Clear both
436
  $result .= '<div class="wppa-clear" ></div>';
@@ -487,34 +475,34 @@ global $wppa_session;
487
  wppa_dbg_msg( 'Root=' . $root . ': ' . ( wppa_is_int( $root ) ? wppa_get_album_name( $root ) : $root ) );
488
 
489
  // Open the form
490
- $result =
491
- '<form' .
492
- ' id="wppa_searchform_' . $mocc . '"' .
493
- ' action="' . $pagelink.'"' .
494
- ' method="' . wppa_opt( 'search_form_method' ) . '"' .
495
- ' class="widget_search search-form"' .
496
- ' role="search"' .
497
- ' >';
498
 
499
  // Catbox
500
  if ( $catbox ) {
501
 
502
  // Item wrapper
503
- $result .=
504
- '<div' .
505
- ' class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"' .
506
- ' style="width:' . $w . '%;float:left;"' .
507
- ' >';
508
 
509
  $cats = wppa_get_catlist();
510
  $result .=
511
- __( 'Category', 'wp-photo-album-plus' ) .
512
- '<select' .
513
- ' id="wppa-catbox-' . $mocc . '"' .
514
- ' name="wppa-catbox"' .
515
- ' class="wppa-searchselbox"' .
516
- ' style="width:100%;clear:both;"' .
517
- ' >';
518
 
519
  $current = '';
520
  if ( wppa_get_get( 'catbox' ) ) {
@@ -529,14 +517,14 @@ global $wppa_session;
529
 
530
  $result .= '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
531
  if ( ! empty( $cats ) ) foreach( array_keys( $cats ) as $cat ) {
532
- $result .= '<option value="' . $cat . '" ' . ( $current == $cat ? 'selected="selected"' : '' ) . ' >' . $cat . '</option>';
533
  }
534
- $result .=
535
- '</select>';
536
 
537
  // Close item wrapper
538
- $result .=
539
- '</div>';
540
  }
541
 
542
  // Selection boxes
@@ -548,48 +536,48 @@ global $wppa_session;
548
  $current = wppa_get_post( 'wppa-searchselbox-' . $sb );
549
 
550
  // Item wrapper
551
- $result .=
552
- '<div' .
553
- ' class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"' .
554
- ' style="width:' . $w . '%;float:left;"' .
555
- ' >';
556
 
557
  // Caption
558
  $result .=
559
  wppa_opt( 'search_caption_' . $sb ) . ( $any_caption ? '&nbsp;' : '' );
560
 
561
  // Selbox
562
- $result .=
563
- '<select' .
564
- ' name="wppa-searchselbox-' . $sb . '"' .
565
- ' class="wppa-searchselbox"' .
566
- ' style="clear:both;width:100%;"' .
567
- ' >';
568
  foreach( array_keys( $opts[$sb] ) as $key ) {
569
- $sel = $current == $vals[$sb][$key] ? ' selected="selected"' : '';
570
  $result .= '<option value="' . $vals[$sb][$key] . '"' . $sel . ' >' . $opts[$sb][$key] . '</option>';
571
  }
572
- $result .=
573
- '</select>';
574
 
575
  // Close item wrapper
576
- $result .=
577
- '</div>';
578
  }
579
  }
580
 
581
  // The actual search input and submit
582
  // Item wrapper
583
- $result .=
584
- '<div' .
585
- ' class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"' .
586
- ' style="width:' . $w . '%;float:left;"' .
587
- ' >';
588
 
589
  // Toptext
590
  $result .=
591
- wppa_opt( 'search_toptext' ) . ( $any_caption ? '&nbsp;' : '' ) .
592
- '<div style="position:relative;" >';
593
 
594
  // form core
595
  $form_core = '';
@@ -699,59 +687,64 @@ global $wppa_session;
699
  // Insert
700
  $result .= $form_core;
701
 
702
- $result .=
703
- '</div>';
704
 
705
  // Close item wrapper
706
- $result .=
707
- '</div>';
708
 
709
- $result .=
710
- '<div style="clear:both;" ></div>';
711
 
712
  // The hidden inputs and sub/root checkboxes
713
  if ( $force_root ) {
714
- $result .=
715
- '<input' .
716
- ' type="hidden"' .
717
- ' name="wppa-forceroot"' .
718
- ' value="' . $force_root . '"' .
719
- ' />';
720
  }
721
- $result .=
722
- '<input' .
723
- ' type="hidden"' .
724
- ' name="wppa-searchroot"' .
725
- ' class="wppa-search-root-id"' .
726
- ' value="' . $root . '"' .
727
- ' />' .
728
- ( $rt && ! $force_root ?
729
- '<div style="clear:both" ></div>' .
730
- '<small class="wppa-search-root" style="margin:0;padding:4px 0 0;" >' .
731
- wppa_display_root( $root ) .
732
- '</small>' .
733
- '<div style="clear:both;' . $fontsize . '" >
734
- <input type="checkbox" name="wppa-rootsearch" class="wppa-rootbox" ' . $rootboxset . ' /> ' .
735
- wppa_opt( 'search_in_section' ) .
736
- '</div>' : '' ) .
737
- ( $sub ?
738
- '<div style="clear:both" ></div>' .
739
- '<small class="wppa-display-searchstring" style="margin:0;padding:4px 0 0;" >' .
740
- $wppa_session['display_searchstring'] .
741
- '</small>' .
742
- '<div style="clear:both;' . $fontsize . '" >' .
743
- '<input' .
744
- ' type="checkbox"' .
745
- ' name="wppa-subsearch"' .
746
- ' class="wppa-search-sub-box"' .
747
- ( empty( $wppa_session['display_searchstring'] ) ? ' disabled="disabled"' : '' ) .
748
- ' onchange="wppaSubboxChange(this)"' .
749
- ' /> '.
750
- wppa_opt( 'search_in_results' ) .
751
- '</div>' : '' ) .
752
- '</form>';
 
 
 
 
 
753
 
754
- return $result;
755
  }
756
 
757
  // The supersearch box
@@ -761,15 +754,14 @@ function wppa_supersearch_box() {
761
 
762
  wppa_container( 'open' );
763
 
764
- wppa_out( '<div' .
765
- ' id="wppa-search-' . wppa( 'mocc' ) . '"' .
766
- ' class="wppa-box wppa-search"' .
767
- ' >' .
768
- wppa_get_supersearch_html() .
769
- '<div class="wppa-clear" >' .
770
- '</div>' .
771
- '</div>'
772
- );
773
 
774
  wppa_container( 'close' );
775
  }
@@ -781,6 +773,7 @@ global $wppa_session;
781
  global $wppa_supported_camara_brands;
782
 
783
  // Init
 
784
  $page = wppa_get_the_landing_page( 'supersearch_linkpage',
785
  __( 'Photo search results' ,'wp-photo-album-plus' )
786
  );
@@ -922,158 +915,163 @@ global $wppa_supported_camara_brands;
922
  }
923
 
924
  // Make the html
925
- $id = 'wppa_searchform_' . wppa('mocc');
926
- $result =
927
- '<form' .
928
- ' id="' . $id . '"' .
929
- ' action="'.$pagelink.'"' .
930
- ' method="post"' .
931
- ' class="widget_search"' .
932
- ' >' .
933
- '<input' .
934
- ' type="hidden"' .
935
- ' id="wppa-ss-pageurl-'.wppa('mocc').'"' .
936
- ' name="wppa-ss-pageurl"' .
937
  ' value="'.$pagelink.'"' .
938
  ' />';
939
 
940
  // album or photo
941
- $id = 'wppa-ss-pa-'.wppa('mocc');
942
- $result .=
943
- '<select' .
944
- ' id="' . $id . '"' .
945
- ' name="wppa-ss-pa"' .
946
- ' style="margin:2px;padding:0;vertical-align:top;float:left;"' .
947
- ' onchange="wppaSuperSearchSelect( ' . wppa('mocc') . ' );"' .
948
- ' size="2"' .
949
- ' >' .
950
- '<option' .
951
- ' value="a" ' .
952
- ( $ss_data['0'] == 'a' ? 'selected="selected" ' : '' ) .
953
- ' >' .
954
- __('Albums', 'wp-photo-album-plus' ) .
955
- '</option>' .
956
- '<option' .
957
- ' value="p" ' .
958
- ( $ss_data['0'] == 'p' ? 'selected="selected" ' : '' ) .
959
- ' >' .
960
- __('Photos', 'wp-photo-album-plus' ) .
961
- '</option>' .
962
- '</select>';
 
963
 
964
  // album
965
- $id = 'wppa-ss-albumopt-' . wppa('mocc');
966
- $result .=
967
- '<select' .
968
- ' id="' . $id . '"' .
969
- ' name="wppa-ss-albumopt"' .
970
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
971
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
972
- ' size="' . ( ! empty( $catlist ) ? '3' : '2' ) . '"' .
973
- ' >' .
974
- ( ! empty( $catlist ) ?
975
- '<option' .
976
- ' value="c"' .
977
- ( $ss_data['0'] == 'a' && $ss_data['1'] == 'c' ? 'selected="selected" ' : '' ) .
978
- ' >' .
979
- __( 'Category', 'wp-photo-album-plus' ) .
980
- '</option>' : ''
981
- ) .
982
- '<option' .
983
- ' value="n"' .
984
- ( $ss_data['0'] == 'a' && $ss_data['1'] == 'n' ? 'selected="selected" ' : '' ) .
985
- ' >' .
986
- __( 'Name', 'wp-photo-album-plus' ) .
987
- '</option>' .
988
- '<option' .
989
- ' value="t"' .
990
- ( $ss_data['0'] == 'a' && $ss_data['1'] == 't' ? 'selected="selected" ' : '' ) .
991
- ' >' .
992
- __( 'Text', 'wp-photo-album-plus' ) .
993
- '</option>' .
994
- '</select>';
 
 
 
995
 
996
  // album category
997
  if ( ! empty( $catlist ) ) {
998
- $id = 'wppa-ss-albumcat-'.wppa('mocc');
999
- $result .=
1000
- '<select'.
1001
- ' id="' . $id . '"' .
1002
- ' name="wppa-ss-albumcat"' .
1003
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1004
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1005
- ' size="' . ( min( count( $catlist ), '6' ) ) . '"' .
1006
- ' multiple' .
1007
- ' title="' .
1008
- esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) . "\n" .
1009
- esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) .
1010
- '"' .
1011
- ' >';
1012
  foreach ( array_keys( $catlist ) as $cat ) {
1013
  $sel = in_array ( $cat, $ss_cats );
1014
- $result .=
1015
- '<option' .
1016
- ' value="' . $cat . '"' .
1017
- ' class="' . $id . '"' .
1018
- ( $sel ? ' selected="selected"' : '' ) .
1019
- ' >' .
1020
- $cat .
1021
- '</option>';
1022
  }
1023
- $result .=
1024
- '</select>';
1025
  }
1026
 
1027
  // album name
1028
- $id = 'wppa-ss-albumname-'.wppa('mocc');
1029
- $result .=
1030
- '<select'.
1031
- ' id="' . $id . '"' .
1032
- ' name="wppa-ss-albumname"' .
1033
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1034
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1035
- ' size="' . ( min( count( $albums ), '6' ) ) . '"' .
1036
- ' >';
 
1037
  foreach ( $albums as $album ) {
1038
  $name = stripslashes( $album['name'] );
1039
  $sel = ( $ss_data['3'] == $name && $ss_data['0'] == 'a' && $ss_data['1'] == 'n' );
1040
- $result .=
1041
- '<option' .
1042
- ' value="' . esc_attr( $name ) . '"' .
1043
- ( $sel ? ' selected="selected"' : '' ) .
1044
- ' >' .
1045
- __( $name ) .
1046
- '</option>';
1047
  }
1048
  $result .=
1049
  '</select>';
1050
 
1051
  // album text
1052
- $id = 'wppa-ss-albumtext-'.wppa('mocc');
1053
  $result .= '
1054
- <select'.
1055
- ' id="' . $id . '"' .
1056
- ' name="wppa-ss-albumtext"' .
1057
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1058
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1059
- ' size="' . ( min( count( $albumtxt ), '6' ) ) . '"' .
1060
- ' multiple="multiple"' .
1061
- ' title="' .
1062
- esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) . "\n" .
1063
- esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) .
1064
- '"' .
1065
- ' >';
1066
  foreach ( $albumtxt as $txt ) {
1067
  $text = $txt['slug'];
1068
  $sel = in_array ( $text, $ss_atxt );
1069
- $result .=
1070
- '<option' .
1071
- ' value="' . $text . '"' .
1072
- ' class="' . $id . '"' .
1073
- ( $sel ? ' selected="selected"' : '' ) .
1074
- ' >' .
1075
- $text .
1076
- '</option>';
1077
  }
1078
  $result .= '
1079
  </select>';
@@ -1086,218 +1084,224 @@ global $wppa_supported_camara_brands;
1086
  ( wppa_switch( 'save_iptc' ) ) +
1087
  ( wppa_switch( 'save_exif' ) );
1088
  $result .= '
1089
- <select'.
1090
- ' id="wppa-ss-photoopt-'.wppa('mocc').'"' .
1091
- ' name="wppa-ss-photoopt"' .
1092
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1093
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1094
- ' size="' . $n . '"' .
1095
- ' >' .
1096
- '<option' .
1097
- ' value="n"' .
1098
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 'n' ? 'selected="selected" ' : '' ) .
1099
- ' >' .
1100
- __( 'Name', 'wp-photo-album-plus' ) .
1101
- '</option>';
1102
- if ( count( $ownerlist ) > '1' ) {
1103
- $result .=
1104
- '<option' .
1105
- ' value="o"' .
1106
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 'o' ? 'selected="selected" ' : '' ) .
1107
- ' >' .
1108
- __( 'Owner', 'wp-photo-album-plus' ) .
1109
- '</option>';
1110
- }
1111
- if ( ! empty( $taglist ) ) {
1112
- $result .=
1113
- '<option' .
1114
- ' value="g"' .
1115
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 'g' ? 'selected="selected" ' : '' ) .
1116
- ' >' .
1117
- __( 'Tag', 'wp-photo-album-plus' ) .
1118
- '</option>';
1119
- }
1120
- $result .=
1121
- '<option' .
1122
- ' value="t"' .
1123
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 't' ? 'selected="selected" ' : '' ) .
1124
- ' >' .
1125
- __( 'Text', 'wp-photo-album-plus' ) .
1126
- '</option>';
1127
- if ( wppa_switch( 'save_iptc' ) ) {
1128
- $result .=
1129
- '<option' .
1130
- ' value="i"' .
1131
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 'i' ? 'selected="selected" ' : '' ) .
1132
- ' >' .
1133
- __( 'Iptc', 'wp-photo-album-plus' ) .
1134
- '</option>';
1135
- }
1136
- if ( wppa_switch( 'save_exif' ) ) {
1137
- $result .=
1138
- '<option' .
1139
- ' value="e"' .
1140
- ( $ss_data['0'] == 'p' && $ss_data['1'] == 'e' ? 'selected="selected" ' : '' ) .
1141
- ' >' .
1142
- __( 'Exif', 'wp-photo-album-plus' ) .
1143
- '</option>';
1144
- }
1145
- $result .=
1146
- '</select>';
 
1147
 
1148
  // photo name
1149
- $id = 'wppa-ss-photoname-'.wppa('mocc');
1150
  $result .= '
1151
- <select'.
1152
- ' id="' . $id . '"' .
1153
- ' name="wppa-ss-photoname"' .
1154
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1155
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1156
- ' size="' . min( count( $photonames ), '6' ) . '"' .
1157
- ' >';
 
1158
  foreach ( $photonames as $photo ) {
1159
  $name = stripslashes( $photo['name'] );
1160
  $sel = ( $ss_data['3'] == $name && $ss_data['0'] == 'p' && $ss_data['1'] == 'n' );
1161
- $result .=
1162
- '<option' .
1163
- ' value="' . esc_attr( $name ) . '"' .
1164
- ( $sel ? ' selected="selected"' : '' ) .
1165
- ' >' .
1166
- __( $name ) .
1167
- '</option>';
1168
  }
1169
  $result .= '
1170
  </select>';
1171
 
1172
  // photo owner
1173
- $id = 'wppa-ss-photoowner-'.wppa('mocc');
1174
  $result .= '
1175
- <select'.
1176
- ' id="' . $id . '"' .
1177
- ' name="wppa-ss-photoowner"' .
1178
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1179
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1180
- ' size="' . ( min( count( $ownerlist ), '6' ) ) . '"' .
1181
- ' >';
 
1182
  foreach ( $ownerlist as $photo ) {
1183
  $owner = $photo['owner'];
1184
  $sel = ( $ss_data['3'] == $owner && $ss_data['0'] == 'p' && $ss_data['1'] == 'o' );
1185
- $result .=
1186
- '<option' .
1187
- ' value="' . $owner . '"' .
1188
- ( $sel ? ' selected="selected"' : '' ) .
1189
- ' >' .
1190
- $owner .
1191
- '</option>';
1192
  }
1193
  $result .= '
1194
  </select>';
1195
 
1196
  // photo tag
1197
  if ( ! empty( $taglist ) ) {
1198
- $id = 'wppa-ss-phototag-'.wppa('mocc');
1199
  $result .= '
1200
- <select'.
1201
- ' id="' . $id . '"' .
1202
- ' name="wppa-ss-phototag"' .
1203
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1204
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1205
- ' size="' . ( min( count( $taglist ), '6' ) ) . '"' .
1206
- ' multiple' .
1207
- ' title="' .
1208
- esc_attr( __( 'CTRL+Click to add/remove option.' , 'wp-photo-album-plus' ) ) . "\n" .
1209
- esc_attr( __( 'Items must meet all selected options.' , 'wp-photo-album-plus' ) ) .
1210
- '"' .
1211
- ' >';
1212
  foreach ( array_keys( $taglist ) as $tag ) {
1213
  $sel = in_array ( $tag, $ss_tags );
1214
- $result .=
1215
- '<option' .
1216
- ' value="'.$tag.'"' .
1217
- ' class="' . $id . '"' .
1218
- ( $sel ? ' selected="selected"' : '' ) .
1219
- ' >' .
1220
- $tag .
1221
- '</option>';
1222
  }
1223
- $result .=
1224
- '</select>';
1225
  }
1226
 
1227
  // photo text
1228
- $id = 'wppa-ss-phototext-'.wppa('mocc');
1229
  $result .= '
1230
- <select' .
1231
- ' id="' . $id . '"' .
1232
- ' name="wppa-ss-phototext"' .
1233
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1234
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1235
- ' size="' . ( min( count( $phototxt ), '6' ) ) . '"' .
1236
- ' multiple="multiple"' .
1237
- ' title="' .
1238
- esc_attr( __( 'CTRL+Click to add/remove option.' , 'wp-photo-album-plus' ) ) . "\n" .
1239
- esc_attr( __( 'Items must meet all selected options.' , 'wp-photo-album-plus' ) ) .
1240
- '"' .
1241
- ' >';
1242
  foreach ( $phototxt as $txt ) {
1243
  $text = $txt['slug'];
1244
  $sel = in_array ( $text, $ss_ptxt );
1245
- $result .=
1246
- '<option' .
1247
- ' value="' . $text . '"' .
1248
- ' class="' . $id . '"' .
1249
- ( $sel ? ' selected="selected"' : '' ) .
1250
- ' >' .
1251
- $text .
1252
- '</option>';
1253
  }
1254
- $result .=
1255
- '</select>';
1256
 
1257
  // photo iptc
1258
  $result .= '
1259
- <select' .
1260
- ' id="wppa-ss-photoiptc-'.wppa('mocc').'"' .
1261
- ' name="wppa-ss-photoiptc"' .
1262
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1263
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1264
- ' size="' . min( count( $iptclist ), '6' ) . '"' .
1265
- ' >';
 
1266
  $reftag = str_replace( 'H', '#', $ss_data['2'] );
1267
  foreach ( $iptclist as $item ) {
1268
  $tag = $item['tag'];
1269
  $sel = ( $reftag == $tag && $ss_data['0'] = 'p' && $ss_data['1'] == 'i' );
1270
- $result .=
1271
- '<option' .
1272
- ' value="' . $tag . '"' .
1273
- ( $sel ? ' selected="selected"' : '' ) .
1274
- ' >' .
1275
- __( $item['description'], 'wp-photo-album-plus' ) .
1276
- '</option>';
1277
  }
1278
- $result .=
1279
- '</select>';
1280
 
1281
  // Iptc items
1282
  $result .= '
1283
- <select' .
1284
- ' id="wppa-ss-iptcopts-'.wppa('mocc').'"' .
1285
- ' name="wppa-ss-iptcopts"' .
1286
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1287
- ' size="6"' .
1288
- ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
1289
- ' >
 
1290
  </select>';
1291
 
1292
  // photo exif
1293
  $result .= '
1294
- <select' .
1295
- ' id="wppa-ss-photoexif-'.wppa('mocc').'"' .
1296
- ' name="wppa-ss-photoexif"' .
1297
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1298
- ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
1299
- ' size="' . min( count( $exiflist ), '6' ) . '"' .
1300
- ' >';
 
1301
  $reftag = str_replace( 'H', '#', $ss_data['2'] );
1302
 
1303
  // Process all tags
@@ -1331,53 +1335,54 @@ global $wppa_supported_camara_brands;
1331
  $desc = $item['desc'];
1332
  $sel = ( $reftag == $tag && $ss_data['0'] == 'p' && $ss_data['1'] == 'e' );
1333
 
1334
- $result .=
1335
- '<option' .
1336
- ' value="' . $tag . '"' .
1337
- ( $sel ? ' selected="selected"' : '' ) .
1338
- ' >' .
1339
- $desc . ':' .
1340
- '</option>';
1341
  }
1342
- $result .=
1343
- '</select>';
1344
 
1345
  // Exif items
1346
  $result .= '
1347
- <select' .
1348
- ' id="wppa-ss-exifopts-'.wppa('mocc').'"' .
1349
- ' name="wppa-ss-exifopts"' .
1350
- ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1351
- ' size="6"' .
1352
- ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
1353
- ' >
 
1354
  </select>';
1355
 
1356
  // The spinner
1357
  $result .= '
1358
- <img' .
1359
- ' id="wppa-ss-spinner-'.wppa('mocc').'"' .
1360
- ' src="' . wppa_get_imgdir() . '/spinner.gif' . '"' .
1361
- ' style="margin:0 4px;display:none;"' .
1362
- ' />';
1363
 
1364
  // The button
1365
  $result .= '
1366
- <input' .
1367
- ' type="button"' .
1368
- ' id="wppa-ss-button-' . wppa('mocc') . '"' .
1369
- ' value="' . __( 'Submit', 'wp-photo-album-plus' ) . '"' .
1370
- ' style="vertical-align:top;margin:2px;"' .
1371
- ' onclick="wppaSuperSearchSelect(' . wppa('mocc') .' , true)"' .
1372
- ' />';
1373
 
1374
  $result .= '
1375
  </form>
1376
- <script type="text/javascript" >
1377
- jQuery(document).ready(function(){wppaSuperSearchSelect(' . wppa('mocc') . ')});
1378
  </script>';
1379
 
1380
- return $result;
1381
  }
1382
 
1383
  // Superview box
@@ -1387,16 +1392,15 @@ function wppa_superview_box( $album_root = '0', $sort = true ) {
1387
 
1388
  wppa_container( 'open' );
1389
 
1390
- wppa_out(
1391
- '<div' .
1392
- ' id="wppa-superview-' . wppa( 'mocc' ) . '"' .
1393
- ' class="wppa-box wppa-superview"' .
1394
- ' >' .
1395
- wppa_get_superview_html( $album_root, $sort ) .
1396
- '<div class="wppa-clear" >' .
1397
- '</div>' .
1398
- '</div>'
1399
- );
1400
 
1401
  wppa_container( 'close' );
1402
  }
@@ -1410,45 +1414,42 @@ global $wppa_session;
1410
  );
1411
  $url = get_permalink( $page );
1412
 
1413
- $checked = 'checked="checked"';
1414
-
1415
  $result = '
1416
  <div>
1417
  <form action="' . $url . '" method = "get">
1418
- <label>' . __( 'Album:' , 'wp-photo-album-plus') . '</label><br />
1419
- <select name="wppa-album">' .
1420
  wppa_album_select_a( array( 'selected' => $wppa_session['superalbum'],
1421
  'addpleaseselect' => true,
1422
  'root' => $album_root,
1423
  'content' => true,
1424
  'sort' => $sort,
1425
  'path' => ( ! wppa_in_widget() ),
1426
- ) ) .
1427
- '</select><br />
1428
- <input' .
1429
- ' type="radio"' .
1430
- ' name="wppa-slide"' .
1431
- ' value="nil" ' .
1432
- ( $wppa_session['superview'] == 'thumbs' ? $checked : '' ) .
1433
- ' >' .
1434
- __( 'Thumbnails' , 'wp-photo-album-plus') .
1435
- '<br />
1436
- <input' .
1437
- ' type="radio"' .
1438
- ' name="wppa-slide"' .
1439
- ' value="1" ' .
1440
- ( $wppa_session['superview'] == 'slide' ? $checked : '' ) .
1441
- ' >' .
1442
- __( 'Slideshow', 'wp-photo-album-plus' ) .
1443
- '<br />
1444
  <input type="hidden" name="wppa-occur" value="1" />
1445
  <input type="hidden" name="wppa-superview" value="1" />
1446
  <input type="submit" value="' . __( 'Submit', 'wp-photo-album-plus' ) . '" />
1447
  </form>
1448
- </div>
1449
- ';
1450
 
1451
- return $result;
1452
  }
1453
 
1454
  // The admins choice box
@@ -1458,16 +1459,14 @@ function wppa_admins_choice_box( $admins ) {
1458
 
1459
  wppa_container( 'open' );
1460
 
1461
- wppa_out(
1462
- '<div' .
1463
- ' id="wppa-adminschoice-' . wppa( 'mocc' ) . '"' .
1464
- ' class="wppa-box wppa-adminschoice"' .
1465
- ' >' .
1466
- wppa_get_admins_choice_html( $admins ) .
1467
- '<div class="wppa-clear" >' .
1468
- '</div>' .
1469
- '</div>'
1470
- );
1471
 
1472
  wppa_container( 'close' );
1473
  }
@@ -1496,9 +1495,8 @@ function wppa_get_admins_choice_html( $admins ) {
1496
 
1497
  if ( $zipfiles ) {
1498
 
1499
- $result = '<ul' .
1500
- ( ! wppa( 'in_widget' ) ? ' style="list-style-position:inside;margin:0;padding:0;"' : '' ) .
1501
- ' >';
1502
 
1503
  // Compose the current users zip filename
1504
  $myzip = $zipsdir.wppa_get_user().'.zip';
@@ -1527,19 +1525,22 @@ function wppa_get_admins_choice_html( $admins ) {
1527
  $stat = $wppa_zip->statIndex( $i );
1528
  $title .= esc_attr($stat['name']) . "\n";
1529
  }
1530
- $result .= '<li title="'.$title.'" >' .
1531
- '<a href="'. WPPA_UPLOAD_URL.'/zips/'.basename($zipfile).'" >' .
1532
- $user .
1533
- '</a>';
1534
- if ( $zipfile == $myzip ) {
1535
- $result .=
1536
- '<a' .
1537
- ' onclick="wppaAjaxDeleteMyZip();"' .
1538
- ' style="float:right;cursor:pointer;" >' .
1539
- __('Delete', 'wp-photo-album-plus') .
1540
- '</a>';
1541
- }
1542
- $result .= '</li>';
 
 
 
1543
  }
1544
  }
1545
  }
@@ -1547,7 +1548,7 @@ function wppa_get_admins_choice_html( $admins ) {
1547
  $result .= '</ul>';
1548
  }
1549
  else {
1550
- $result = __('No zipfiles available', 'wp-photo-album-plus');
1551
  }
1552
 
1553
  return $result;
@@ -1560,16 +1561,14 @@ function wppa_tagcloud_box( $seltags = '', $minsize = '8', $maxsize = '24' ) {
1560
 
1561
  wppa_container( 'open' );
1562
 
1563
- wppa_out(
1564
- '<div' .
1565
- ' id="wppa-tagcloud-' . wppa( 'mocc' ) . '"' .
1566
- ' class="wppa-box wppa-tagcloud"' .
1567
- ' >' .
1568
- wppa_get_tagcloud_html( $seltags, $minsize, $maxsize ) .
1569
- '<div class="wppa-clear" >' .
1570
- '</div>' .
1571
- '</div>'
1572
- );
1573
 
1574
  wppa_container( 'close' );
1575
  }
@@ -1631,13 +1630,14 @@ function wppa_get_tagcloud_html( $seltags = '', $minsize = '8', $maxsize = '24'
1631
  else {
1632
  $size = round( $minsize + $tag['fraction'] * $factor );
1633
  }
1634
- $result .= '<a' .
1635
- ' href="' . $href . '"' .
1636
- ' title="' . $title . '"' .
1637
- ' style="font-size:' . $size . 'px;"' .
1638
- ' >' .
1639
- ucfirst( __( $name ) ) .
1640
- '</a> ';
 
1641
  }
1642
  }
1643
  }
@@ -1652,16 +1652,14 @@ function wppa_multitag_box( $nperline = '2', $seltags = '' ) {
1652
 
1653
  wppa_container( 'open' );
1654
 
1655
- wppa_out(
1656
- '<div' .
1657
- ' id="wppa-multitag-' . wppa( 'mocc' ) . '"' .
1658
- ' class="wppa-box wppa-multitag"' .
1659
- ' >' .
1660
- wppa_get_multitag_html( $nperline, $seltags ) .
1661
- '<div class="wppa-clear" >' .
1662
- '</div>' .
1663
- '</div>'
1664
- );
1665
 
1666
  wppa_container( 'close' );
1667
  }
@@ -1675,6 +1673,7 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1675
  __( 'Multi Tagged photos' ,'wp-photo-album-plus' )
1676
  );
1677
  $oc = wppa_opt( 'multitag_linkpage_oc' );
 
1678
  $result = '';
1679
  if ( $page ) {
1680
  if ( $page == '-1' ) {
@@ -1692,53 +1691,56 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1692
  }
1693
  }
1694
  else {
1695
- return __( 'Please select a multitag landing page in Table VI-C4b' , 'wp-photo-album-plus');
1696
  }
1697
  $tags = wppa_get_taglist( true );
1698
 
1699
  $result .= '
1700
- <script type="text/javascript" >
1701
- function wppaProcessMultiTagRequest'.wppa('mocc').'() {
1702
- var any = false;
1703
- var url="' . wppa_encrypt_url( $hr ) . '";';
 
 
 
 
 
 
 
 
1704
 
1705
- $result .= '
1706
- if ( jQuery( "#inverse-'.wppa( 'mocc' ).'" ).prop( "checked" ) ) {
1707
- url += "&wppa-inv=1";
 
 
1708
  }
1709
- url += "&wppa-tag=";
1710
- ';
1711
-
1712
- if ( $or_only ) {
1713
- $result .= '
1714
- var andor = "or";';
1715
- }
1716
- else {
1717
- $result .= '
1718
- var andor = "and";
1719
- if ( document.getElementById( "andoror-'.wppa( 'mocc' ).'" ).checked ) andor = "or";
1720
- var sep;';
1721
- }
1722
-
1723
- $result .= '
1724
- if ( andor == "and" ) sep = ","; else sep = ";";
1725
- ';
1726
-
1727
- $selarr = $seltags ? explode( ',', $seltags ) : array();
1728
- if ( $tags ) foreach ( $tags as $tag ) {
1729
- if ( ! $seltags || in_array( $tag['tag'], $selarr ) ) {
1730
  $result .= '
1731
- if ( document.getElementById( "wppa-'.wppa('mocc').'-'.str_replace( ' ', '_', $tag['tag']).'" ).checked ) {' .
1732
- 'url+="'.urlencode($tag['tag']).'"+sep;' .
1733
- 'any = true;
 
 
1734
  }';
1735
  }
1736
- }
1737
 
1738
- $result .= '
1739
- if ( any ) document.location = url;
1740
- else alert ( "'.__( 'Please check the tag(s) that the photos must have' , 'wp-photo-album-plus').'" );
1741
- }</script>
 
 
 
 
 
 
 
 
 
 
 
 
1742
  ';
1743
 
1744
  $qtag = wppa_get_get( 'tag' );
@@ -1755,59 +1757,60 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1755
  if ( $tags ) {
1756
 
1757
  if ( ! $or_only || $not_on ) {
1758
- $result .= '<table class="wppa-multitag-table">';
1759
- if ( ! $or_only ) {
1760
- $result .=
1761
- '<tr>' .
1762
- '<td>' .
1763
- '<input' .
1764
- ' class="radio"' .
1765
- ' name="andor-' . wppa( 'mocc' ) . '"' .
1766
- ' value="and"' .
1767
- ' id="andorand-' . wppa( 'mocc' ) . '"' .
1768
- ' type="radio"' .
1769
- ( $andor == 'and' ? ' checked="checked"' : '' ) .
1770
- ' />' .
1771
- '&nbsp;' . __( 'And', 'wp-photo-album-plus') .
1772
- '</td>' .
1773
- '<td>' .
1774
- '<input' .
1775
- ' class="radio"' .
1776
- ' name="andor-' . wppa( 'mocc' ) . '"' .
1777
- ' value="or"' .
1778
- ' id="andoror-' . wppa( 'mocc' ) . '"' .
1779
- ' type="radio"' .
1780
- ( $andor == 'or' ? ' checked="checked"' : '' ) .
1781
- ' />' .
1782
- '&nbsp;' . __( 'Or', 'wp-photo-album-plus' ) .
1783
- '</td>' .
1784
- '</tr>';
1785
- }
1786
- if ( $not_on ) {
1787
- $result .=
1788
- '<tr>' .
1789
- '<td>' .
1790
- '<input' .
1791
- ' type="checkbox"' .
1792
- ' class="checkbox"' .
1793
- ' name="inverse-' . wppa( 'mocc' ) . '"' .
1794
- ' id="inverse-' . wppa( 'mocc' ) . '"' .
1795
- ( wppa_get_get( 'inv' ) ? ' checked="checked"' : '' ) .
1796
- ' />' .
1797
- '&nbsp;' . __( 'Inverse selection', 'wp-photo-album-plus' ) .
1798
- '</td>' .
1799
- '<td>' .
1800
- '</td>' .
1801
- '</tr>';
1802
- }
1803
- $result .= '</table>';//<hr style="margin: 3px 0;" />';
 
1804
  }
1805
 
1806
  $count = '0';
1807
  $checked = '';
1808
  $tropen = false;
1809
 
1810
- $result .= '<table class="wppa-multitag-table">';
1811
 
1812
  foreach ( $tags as $tag ) {
1813
  if ( ! $seltags || in_array( $tag['tag'], $selarr ) ) {
@@ -1816,18 +1819,19 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1816
  $tropen = true;
1817
  }
1818
  if ( is_array( $querystringtags ) ) {
1819
- $checked = in_array( $tag['tag'], $querystringtags ) ? 'checked="checked"' : '';
1820
  }
1821
- $result .= '<td' .
1822
- ' style="padding-right:4px;"' .
1823
- ' >' .
1824
- '<input' .
1825
- ' type="checkbox"' .
1826
- ' id="wppa-'.wppa('mocc').'-'.str_replace( ' ', '_', $tag['tag'] ).'"' .
1827
- ' ' . $checked .
1828
- ' />' .
1829
- '&nbsp;' . str_replace( ' ', '&nbsp;', ucfirst( __( $tag['tag'] ) ) ) .
1830
- '</td>';
 
1831
  $count++;
1832
  if ( $count % $nperline == '0' ) {
1833
  $result .= '</tr>';
@@ -1844,11 +1848,12 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1844
  $result .= '</tr>';
1845
  }
1846
  $result .= '</table>';
1847
- $result .= '<input' .
1848
- ' type="button"' .
1849
- ' onclick="wppaProcessMultiTagRequest'.wppa('mocc').'()"' .
1850
- ' value="' . __( 'Find!', 'wp-photo-album-plus' ) . '"' .
1851
- ' />';
 
1852
  }
1853
 
1854
  return $result;
@@ -1927,13 +1932,14 @@ global $wppa_locale;
1927
  // qr code
1928
  if ( wppa_switch( 'share_qr' ) && $key != 'thumb' ) {
1929
  $src = wppa_create_qrcode_cache( $share_url, '80' );
1930
- $qr = '<div style="float:left; padding:2px;" >' .
1931
- '<img' .
1932
- ' src="' . $src . '"' .
1933
- ' title="' . esc_attr( $share_url ) . '"' .
1934
- ' alt="' . __( 'QR code', 'wp-photo-album-plus' ) . '"' .
1935
- ' />' .
1936
- '</div>';
 
1937
  }
1938
  else {
1939
  $qr = '';
@@ -1973,20 +1979,26 @@ global $wppa_locale;
1973
  $tweet .= ': '. urlencode( substr( $photo_desc, 0, $rest_len ) ) . '...';
1974
  }
1975
  }
1976
- $tweet = urlencode( $share_url );
1977
- $tw = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
1978
- '<a' .
1979
- ' title="' . sprintf( __( 'Tweet %s on Twitter', 'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"' .
1980
- ' href="https://twitter.com/intent/tweet?text='.$tweet.'"' .
1981
- ' target="_blank"' .
1982
- ' >' .
1983
- '<img' .
1984
- ' src="' . wppa_get_imgdir() . 'twitter.png"' .
1985
- ' style="height:' . $s . 'px;vertical-align:top;"' .
1986
- ' alt="' . esc_attr( __( 'Share on Twitter', 'wp-photo-album-plus' ) ) . '"' .
1987
- ' />' .
1988
- '</a>' .
1989
- '</div>';
 
 
 
 
 
 
1990
  }
1991
  else {
1992
  $tw = '';
@@ -1994,19 +2006,20 @@ $tweet = urlencode( $share_url );
1994
 
1995
  // Google
1996
  if ( wppa_switch( 'share_google' ) ) {
1997
- $go = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
1998
- '<a' .
1999
- ' title="' . sprintf( __( 'Share %s on Google+', 'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"' .
2000
- ' href="https://plus.google.com/share?url=' . urlencode( $share_url ) . '"' .
2001
- ' target="_blank"' .
2002
- ' >' .
2003
- '<img' .
2004
- ' src="' . wppa_get_imgdir() . 'google.png"' .
2005
- ' style="height:' . $s . 'px;vertical-align:top;"' .
2006
- ' alt="' . esc_attr( __( 'Share on Google+', 'wp-photo-album-plus' ) ) . '"' .
2007
- ' />' .
2008
- '</a>' .
2009
- '</div>';
 
2010
  }
2011
  else {
2012
  $go = '';
@@ -2016,23 +2029,23 @@ $tweet = urlencode( $share_url );
2016
  $desc = urlencode( $see_on_site ).': '.urlencode( $photo_desc );
2017
  if ( strlen( $desc ) > 500 ) $desc = substr( $desc, 0, 495 ).'...';
2018
  if ( wppa_switch( 'share_pinterest' ) ) {
2019
- $pi = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
2020
- '<a' .
2021
- ' title="' . sprintf( __( 'Share %s on Pinterest' ,'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"' .
2022
- ' href="http://pinterest.com/pin/create/button/?url=' . urlencode( $share_url ) .
 
2023
  '&media=' . urlencode( str_replace( '/thumbs/', '/', $share_img ) ) .
2024
  '&description=' . $desc .
2025
- '"' .
2026
- ' target="_blank"' .
2027
- ' >' .
2028
- '<img' .
2029
- ' src="' . wppa_get_imgdir() . 'pinterest.png"' .
2030
- ' style="height:' . $s . 'px;vertical-align:top;border-radius:' . $br . 'px;"' .
2031
- ' alt="' . esc_attr( __( 'Share on Pinterest', 'wp-photo-album-plus' ) ) . '"' .
2032
- ' />' .
2033
- '</a>' .
2034
- '</div>';
2035
-
2036
  }
2037
  else {
2038
  $pi = '';
@@ -2040,33 +2053,21 @@ $tweet = urlencode( $share_url );
2040
 
2041
  // LinkedIn
2042
  if ( wppa_switch( 'share_linkedin' ) && $key != 'thumb' && $key != 'lightbox' ) {
2043
- /* old style that does no longer work
2044
- $li = '<script' .
2045
- ' type="text/javascript"' .
2046
- ' src="//platform.linkedin.com/in.js"' .
2047
- ' >' .
2048
- 'lang: ' . $wppa_locale .
2049
- '</script>' .
2050
- '<script' .
2051
- ' type="IN/Share"' .
2052
- ' data-url="' . urlencode( $share_url ) . '"' .
2053
- ' data-counter="top"' .
2054
- ' >' .
2055
- '</script>';
2056
- if ( $js ) {
2057
- $li = str_replace( '<', '[', $li );
2058
- }
2059
- */
2060
  // New style under development
2061
- $li = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
2062
- '<a' .
2063
- ' title="' . sprintf( __( 'Share %s on LinkedIn' ,'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"' .
2064
- ' href="https://www.linkedin.com/shareArticle?mini=true&url=' . urlencode( $share_url ) . '"' .
2065
- ' target="_blank"' .
2066
- ' >' .
2067
- '<img src="' . wppa_get_imgdir() . 'linkedin.png" style="height:' . $s . 'px;vertical-align:top;" />' .
2068
- '</a>' .
2069
- '</div>';
 
 
 
 
2070
  }
2071
  else {
2072
  $li = '';
@@ -2091,27 +2092,29 @@ $tweet = urlencode( $share_url );
2091
  // Share
2092
  if ( wppa_switch( 'share_facebook' ) && ! wppa_switch( 'facebook_like' ) ) {
2093
  if ( $small ) {
2094
- $fb .= '<div' .
2095
- ' class="fb-share-button"' .
2096
- ' style="float:left; padding:0 2px;"' .
2097
- ' data-href="' . $share_url . '"' .
2098
- ' data-type="icon"' .
2099
- ' >' .
2100
- '</div>';
 
2101
  }
2102
  else {
2103
  $disp = wppa_opt( 'fb_display' );
2104
  if ( 'standard' == $disp ) {
2105
  $disp = 'button';
2106
  }
2107
- $fb .= '<div' .
2108
- ' class="fb-share-button"' .
2109
- ' style="float:left; padding:0 2px; '. $lbs . '"' .
2110
- ' data-width="200"' .
2111
- ' data-href="' . $share_url . '"' .
2112
- ' data-type="' . $disp . '"' .
2113
- ' >' .
2114
- '</div>';
 
2115
  }
2116
  $need_fb_init = true;
2117
  }
@@ -2119,23 +2122,25 @@ $tweet = urlencode( $share_url );
2119
  // Like
2120
  if ( wppa_switch( 'facebook_like' ) && ! wppa_switch( 'share_facebook' ) ) {
2121
  if ( $small ) {
2122
- $fb .= '<div' .
2123
- ' class="fb-like"' .
2124
- ' style="float:left; padding:0 2px; "' .
2125
- ' data-href="' . $share_url . '"' .
2126
- ' data-layout="button"' .
2127
- ' >' .
2128
- '</div>';
 
2129
  }
2130
  else {
2131
- $fb .= '<div' .
2132
- ' class="fb-like"' .
2133
- ' style="float:left; padding:0 2px; '.$lbs.'"' .
2134
- ' data-width="200"' .
2135
- ' data-href="' . $share_url . '"' .
2136
- ' data-layout="' . wppa_opt( 'fb_display' ) . '"' .
2137
- ' >' .
2138
- '</div>';
 
2139
  }
2140
  $need_fb_init = true;
2141
  }
@@ -2143,29 +2148,31 @@ $tweet = urlencode( $share_url );
2143
  // Like and share
2144
  if ( wppa_switch( 'facebook_like' ) && wppa_switch( 'share_facebook' ) ) {
2145
  if ( $small ) {
2146
- $fb .= '<div' .
2147
- ' class="fb-like"' .
2148
- ' style="float:left; padding:0 2px; "' .
2149
- ' data-href="' . $share_url . '"' .
2150
- ' data-layout="button"' .
2151
- ' data-action="like"' .
2152
- ' data-show-faces="false"' .
2153
- ' data-share="true"' .
2154
- ' >' .
2155
- '</div>';
 
2156
  }
2157
  else {
2158
- $fb .= '<div' .
2159
- ' class="fb-like"' .
2160
- ' style="float:left; padding:0 2px; '.$lbs.'"' .
2161
- ' data-width="200"' .
2162
- ' data-href="' . $share_url . '"' .
2163
- ' data-layout="' . wppa_opt( 'fb_display' ) . '"' .
2164
- ' data-action="like"' .
2165
- ' data-show-faces="false"' .
2166
- ' data-share="true"' .
2167
- ' >' .
2168
- '</div>';
 
2169
  }
2170
  $need_fb_init = true;
2171
  }
@@ -2174,11 +2181,12 @@ $tweet = urlencode( $share_url );
2174
  if ( wppa_switch( 'facebook_comments' ) && ! wppa_in_widget() && $key != 'thumb' && $key != 'lightbox' ) {
2175
  $width = wppa( 'auto_colwidth' ) ? '100%' : wppa_get_container_width( true );
2176
  if ( wppa_switch( 'facebook_comments' ) ) {
2177
- $fb .= '<div style="clear:both;" ></div>' .
2178
- '<div class="wppa-fb-comments-title" style="color:blue;" >' .
2179
- __( 'Comment on Facebook:', 'wp-photo-album-plus' ) .
2180
- '</div>';
2181
- $fb .= '<div class="fb-comments" data-href="'.$share_url.'" data-width="'.$width.'"></div>';
 
2182
  $need_fb_init = true;
2183
  }
2184
  }
@@ -2193,8 +2201,7 @@ $tweet = urlencode( $share_url );
2193
  }
2194
  }
2195
 
2196
- return '<div class="wppa-share-'.$key.'" >'.$qr.$tw.$go.$pi.$li.$fb.'<div style="clear:both"></div></div>';
2197
-
2198
  }
2199
 
2200
  // Make html for share a page/post
@@ -2231,13 +2238,14 @@ global $wpdb;
2231
  // qr code
2232
  if ( wppa_switch( 'share_qr' ) ) {
2233
  $src = wppa_create_qrcode_cache( $share_url, '80' );
2234
- $qr = '<div style="float:left; padding:2px;" >' .
2235
- '<img' .
2236
- ' src="' . $src . '"' .
2237
- ' title="' . esc_attr( $share_url ) . '"' .
2238
- ' alt="' . __( 'QR code', 'wp-photo-album-plus' ) . '"' .
2239
- ' />' .
2240
- '</div>';
 
2241
  }
2242
  else {
2243
  $qr = '';
@@ -2265,19 +2273,20 @@ global $wpdb;
2265
  }
2266
  }
2267
 
2268
- $tw = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
2269
- '<a' .
2270
- ' title="' . sprintf( __( 'Tweet %s on Twitter', 'wp-photo-album-plus' ), esc_attr( $share_name ) ) . '"' .
2271
- ' href="https://twitter.com/intent/tweet?text='.$tweet.'"' .
2272
- ' target="_blank"' .
2273
- ' >' .
2274
- '<img' .
2275
- ' src="' . wppa_get_imgdir() . 'twitter.png"' .
2276
- ' style="height:' . $s . 'px;vertical-align:top;"' .
2277
- ' alt="' . esc_attr( __( 'Share on Twitter', 'wp-photo-album-plus' ) ) . '"' .
2278
- ' />' .
2279
- '</a>' .
2280
- '</div>';
 
2281
  }
2282
  else {
2283
  $tw = '';
@@ -2285,20 +2294,21 @@ global $wpdb;
2285
 
2286
  // Google
2287
  if ( wppa_switch( 'share_google' ) ) {
2288
- $go = '<div class="wppa-share-icon" style="float:left; padding:0 2px;" >' .
2289
- '<a' .
2290
- ' title="' . sprintf( __( 'Share %s on Google+', 'wp-photo-album-plus' ), esc_attr( $share_name ) ) . '"' .
2291
- ' href="https://plus.google.com/share?url=' . urlencode( $share_url ) . '"' .
2292
- ' onclick="javascript:window.open( this.href, \"\", \"menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\" );return false;"' .
2293
- ' target="_blank"' .
2294
- ' >' .
2295
- '<img' .
2296
- ' src="' . wppa_get_imgdir() . 'google.png"' .
2297
- ' style="height:' . $s . 'px;vertical-align:top;"' .
2298
- ' alt="' . esc_attr( __( 'Share on Google+', 'wp-photo-album-plus' ) ) . '"' .
2299
- ' />' .
2300
- '</a>' .
2301
- '</div>';
 
2302
  }
2303
  else {
2304
  $go = '';
@@ -2321,14 +2331,15 @@ global $wpdb;
2321
  if ( 'standard' == $disp ) {
2322
  $disp = 'button';
2323
  }
2324
- $fb .= '<div' .
2325
- ' class="fb-share-button"' .
2326
- ' style="float:left; padding:0 2px;"' .
2327
- ' data-width="200"' .
2328
- ' data-href="' . $share_url . '"' .
2329
- ' data-type="' . $disp . '"' .
2330
- ' >' .
2331
- '</div>';
 
2332
 
2333
  $need_fb_init = true;
2334
  }
@@ -2336,14 +2347,15 @@ global $wpdb;
2336
  // Like
2337
  if ( wppa_switch( 'facebook_like' ) && ! wppa_switch( 'share_facebook' ) ) {
2338
 
2339
- $fb .= '<div' .
2340
- ' class="fb-like"' .
2341
- ' style="float:left; padding:0 2px;"' .
2342
- ' data-width="200"' .
2343
- ' data-href="' . $share_url . '"' .
2344
- ' data-layout="' . wppa_opt( 'fb_display' ) . '"' .
2345
- ' >' .
2346
- '</div>';
 
2347
 
2348
  $need_fb_init = true;
2349
  }
@@ -2351,17 +2363,18 @@ global $wpdb;
2351
  // Like and share
2352
  if ( wppa_switch( 'facebook_like' ) && wppa_switch( 'share_facebook' ) ) {
2353
 
2354
- $fb .= '<div' .
2355
- ' class="fb-like"' .
2356
- ' style="float:left; padding:0 2px;"' .
2357
- ' data-width="200"' .
2358
- ' data-href="' . $share_url . '"' .
2359
- ' data-layout="' . wppa_opt( 'fb_display' ) . '"' .
2360
- ' data-action="like"' .
2361
- ' data-show-faces="false"' .
2362
- ' data-share="true"' .
2363
- ' >' .
2364
- '</div>';
 
2365
 
2366
  $need_fb_init = true;
2367
  }
@@ -2369,11 +2382,13 @@ global $wpdb;
2369
  // Comments
2370
  if ( wppa_switch( 'facebook_comments' ) ) {
2371
  if ( wppa_switch( 'facebook_comments' ) ) {
2372
- $fb .= '<div style="clear:both;" ></div>' .
2373
- '<div class="wppa-fb-comments-title" style="color:blue;" >' .
2374
- __( 'Comment on Facebook:', 'wp-photo-album-plus' ) .
2375
- '</div>';
2376
- $fb .= '<div class="fb-comments" data-href="'.$share_url.'" data-width="100%" ></div>';
 
 
2377
  $need_fb_init = true;
2378
  }
2379
  }
@@ -2387,7 +2402,7 @@ global $wpdb;
2387
  $qr . $tw . $go . $pi . $li . $fb .
2388
  '<div style="clear:both"></div>';
2389
 
2390
- return $result;
2391
 
2392
  }
2393
 
@@ -2427,18 +2442,14 @@ function wppa_upload_box() {
2427
  wppa_container( 'open' );
2428
 
2429
  // Open div
2430
- wppa_out( '<div' .
2431
- ' id="wppa-upload-box-' . wppa( 'mocc' ) . '"' .
2432
- ' class="wppa-box wppa-upload"' .
2433
- ' >'
2434
- );
2435
-
2436
- // The html
2437
- wppa_out( $create );
2438
- wppa_out( $upload );
2439
-
2440
- // Clear and close div
2441
- wppa_out( '<div style="clear:both;"></div></div>' );
2442
 
2443
  // Close container
2444
  wppa_container( 'close' );
@@ -2468,24 +2479,22 @@ function wppa_user_destroy_html( $alb, $width, $where, $rsp ) {
2468
  }
2469
 
2470
  // Make the html
2471
- wppa_out(
2472
- '<div' .
2473
- ' class="wppa-album-cover-link"' .
2474
- ' style="clear:both;"' .
2475
- '>' .
2476
- '<a' .
2477
- ' style="float:left; cursor:pointer;"' .
2478
- ' onclick="' .
2479
- 'jQuery(this).html(\'' . __( 'Working...', 'wp-photo-album-plus' ) . '\');' .
2480
- 'wppaAjaxDestroyAlbum(' . $alb . ',\'' . wp_create_nonce( 'wppa_nonce_' . $alb ) . '\');' .
2481
- 'jQuery(this).html(\'' . __( 'Delete Album', 'wp-photo-album-plus' ) . '\');' .
2482
- '"' .
2483
- ' >' .
2484
- __( 'Delete Album', 'wp-photo-album-plus' ) .
2485
- '</a>' .
2486
- '</div>'
2487
- );
2488
-
2489
  }
2490
 
2491
  // Frontend create album, for use in the upload box, the widget or in the album and thumbnail box
@@ -2545,68 +2554,60 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2545
  elseif ( $where == 'thumb' ) {
2546
  $returnurl .= 'wppa-album=' . $parent . '&amp;wppa-cover=0&amp;wppa-occur=' . $occur;
2547
  }
2548
- // elseif ( $where == 'widget' || $where == 'uploadbox' ) {
2549
- // Do nothing
2550
- // }
2551
  if ( wppa( 'page' ) ) $returnurl .= '&amp;wppa-page=' . wppa( 'page' );
2552
  $returnurl = trim( $returnurl, '?' );
2553
-
2554
  $returnurl = wppa_trim_wppa_( $returnurl );
2555
-
2556
  $t = $mcr ? 'mcr-' : '';
2557
 
2558
  // The links
2559
- $result .=
2560
- '<div style="clear:both"></div>' .
2561
- '<a' .
2562
- ' id="wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
2563
- ' class="wppa-create-' . $where . ' wppa-album-cover-link"' .
2564
- ' onclick="' .
2565
- 'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Create form
2566
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
2567
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
2568
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
2569
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );'. // Hide catogory
2570
- 'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
2571
- 'window.dispatchEvent(new Event(\'resize\'));'.
2572
- '"' .
2573
- ' style="float:left;cursor:pointer;"' .
2574
- '> ' .
2575
- ( $alb ? __( 'Create Sub Album', 'wp-photo-album-plus' ) : __( 'Create Album', 'wp-photo-album-plus' ) ) .
2576
- '</a>' .
2577
- '<a' .
2578
- ' id="_wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
2579
- ' class="wppa-create-' . $where . ' wppa-album-cover-link"' .
2580
- ' onclick="' .
2581
- 'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create form
2582
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
2583
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Upload link
2584
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Edit link
2585
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );'. // Show catogory
2586
- 'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2587
- 'window.dispatchEvent(new Event(\'resize\'));'.
2588
- '"' .
2589
- ' style="float:right;cursor:pointer;display:none;padding-right:6px;"' .
2590
- ' >' .
2591
- __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2592
- '</a>';
2593
 
2594
  // The create form
2595
- $result .=
2596
- '<div' .
2597
- ' id="wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
2598
- // ' class=""' .
2599
- ' style="width:100%;text-align:center;display:none;"' .
2600
- ' >' .
2601
- '<form' .
2602
- ' id="wppa-creform-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
2603
- // ' action="'.$returnurl.'"' .
2604
- ' action="#"' .
2605
- ' method="post"' .
2606
- ' >' .
2607
- wppa_nonce_field( 'wppa-album-check' , 'wppa-nonce', false, false, $alb ) .
2608
- // '<input type="hidden" name="wppa-album-parent" value="'.$parent.'" />' .
2609
- '<input type="hidden" name="wppa-fe-create" value="yes" />';
2610
 
2611
  // Parent
2612
  if ( ( $where == 'widget' || wppa( 'is_upload' ) ) && ! wppa_switch( 'default_parent_always' ) ) {
@@ -2615,14 +2616,13 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2615
  $body = '';
2616
  $result .= wppa_get_dlg_item( $head, $body, false );
2617
 
2618
- $result .=
2619
- '<select' .
2620
- ' id="wppa-create-parent-'.$mocc.'"' .
2621
- ' name="wppa-album-parent"' .
2622
- ' class="wppa-upload-album-'.$mocc.'"' .
2623
- ' style="max-width: 100%;"' .
2624
- // ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2625
- ' >' .
2626
  wppa_album_select_a( array ( 'exclude' => '',
2627
  'selected' => '',
2628
  'disabled' => '',
@@ -2654,79 +2654,76 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2654
  'tagonchange' => '',
2655
  'multiple' => false,
2656
  'tagstyle' => '',
2657
- ) ) .
2658
- '</select>' .
2659
- '<div style="clear:both;" ></div>';
2660
  }
2661
  else {
2662
- $result .=
2663
- '<input type="hidden" name="wppa-album-parent" value="'.$parent.'" />';
 
 
 
 
2664
  }
2665
 
2666
  // Name
2667
- $result .=
2668
- '<div'.
2669
- ' class="wppa-box-text wppa-td"' .
2670
- ' style="' .
2671
- 'width:100%;' .
2672
- 'clear:both;' .
2673
- 'float:left;' .
2674
- 'text-align:left;' .
2675
- '"' .
2676
- ' >' .
2677
- __( 'Enter album name.', 'wp-photo-album-plus' ) .
2678
- '&nbsp;<span style="font-size:10px;" >' .
2679
- __( 'Don\'t leave this blank!', 'wp-photo-album-plus' ) . '</span>' .
2680
- '</div>' .
2681
- '<input' .
2682
- ' type="text"' .
2683
- ' class="wppa-box-text"' .
2684
- ' style="padding:0; width:100%;"' .
2685
- ' name="wppa-album-name"' .
2686
- ' />' .
2687
 
2688
  // Description
2689
- '<div' .
2690
- ' class="wppa-box-text wppa-td"' .
2691
- ' style="' .
2692
- 'width:100%;' .
2693
- 'clear:both;' .
2694
- 'float:left;' .
2695
- 'text-align:left;' .
2696
- '"' .
2697
- ' >' .
2698
- __( 'Enter album description', 'wp-photo-album-plus' ) .
2699
- '</div>' .
2700
- '<textarea' .
2701
- ' class="wppa-user-textarea wppa-box-text"' .
2702
- ' style="padding:0;height:120px; width:100%;"' .
2703
- ' name="wppa-album-desc" >' .
2704
- '</textarea>';
2705
 
2706
  if ( wppa_switch( 'user_create_captcha' ) ) {
2707
- $result .=
2708
- '<div style="float:left; margin: 6px 0;" >' .
2709
- '<div style="float:left;">' .
2710
- wppa_make_captcha( wppa_get_randseed( 'session' ) ) .
2711
- '</div>' .
2712
- '<input' .
2713
- ' type="text"' .
2714
- ' id="wppa-captcha-'.$mocc.'"' .
2715
- ' name="wppa-captcha"' .
2716
- ' style="margin-left: 6px; width:50px;"' .
2717
- ' />' .
2718
- '</div>';
2719
  }
2720
 
2721
- $result .=
2722
- '<input' .
2723
- ' type="submit"' .
2724
- ' class="wppa-user-submit"' .
2725
- ' style="margin: 6px 0; float:right;"' .
2726
- ' value="' . __( 'Create album', 'wp-photo-album-plus' ) . '"' .
2727
- ' />' .
2728
- '</form>' .
2729
- '</div>';
2730
 
2731
  return $result;
2732
  }
@@ -2943,8 +2940,6 @@ static $albums_granted;
2943
  elseif ( $where == 'thumb' ) {
2944
  $returnurl .= 'wppa-album=' . $alb . '&amp;wppa-cover=0&amp;wppa-occur=' . $occur;
2945
  }
2946
- // elseif ( $where == 'widget' || $where == 'uploadbox' ) {
2947
- // }
2948
  if ( wppa( 'page' ) ) $returnurl .= '&amp;wppa-page=' . wppa( 'page' );
2949
  $returnurl = trim( $returnurl, '?' );
2950
 
@@ -2956,61 +2951,59 @@ static $albums_granted;
2956
  $big = true;
2957
  if ( wppa( 'in_widget' ) ) $big = false;
2958
 
2959
- $result .=
2960
- '<a' .
2961
- ' id="wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2962
- ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
2963
- ' onclick="' .
2964
- 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Upload form
2965
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
2966
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
2967
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
2968
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );'. // Hide catogory
2969
- 'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
2970
- 'window.dispatchEvent(new Event(\'resize\'));'.
2971
- '"' .
2972
- ' style="float:left; cursor:pointer;' .
2973
- '" >' .
2974
- __( 'Upload Photo', 'wp-photo-album-plus' ) .
2975
- '</a>' .
2976
- '<a' .
2977
- ' id="_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2978
- ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
2979
- ' onclick="' .
2980
- 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload form
2981
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
2982
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Upload link
2983
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Edit link
2984
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );'. // Show catogory
2985
- 'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2986
- 'window.dispatchEvent(new Event(\'resize\'));'.
2987
- '"' .
2988
- ' style="float:right; cursor:pointer;display:none;padding-right:6px;' .
2989
- '" >' .
2990
- __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2991
- '</a>' .
2992
- '<div' .
2993
- ' id="wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2994
- ' class=""' .
2995
- ' style="width:100%;text-align:center;display:none; clear:both;"' .
2996
- ' >' .
2997
- '<form' .
2998
- ' id="wppa-uplform-'.$yalb.'-'.$mocc.'"' .
2999
- ' action="'.$returnurl.'"' .
3000
- ' method="post"' .
3001
- ' enctype="multipart/form-data"' .
3002
- ' >' .
3003
- wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false, $yalb );
3004
 
3005
  // Single Album given
3006
  if ( wppa_is_int( $alb ) ) {
3007
- $result .=
3008
- '<input' .
3009
- ' type="hidden"' .
3010
- ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
3011
- ' name="wppa-upload-album"' .
3012
- ' value="'.$alb.'"' .
3013
- ' />';
3014
 
3015
  $head = '';
3016
  $body = '';
@@ -3029,14 +3022,14 @@ static $albums_granted;
3029
  // Can an selection box be displayed?
3030
  if ( ! wppa_opt( 'fe_upload_max_albums' ) || // No limit on number of albums
3031
  wppa_opt( 'fe_upload_max_albums' ) > wppa_get_uploadable_album_count( $alb ) ) { // Below max
3032
- $body .=
3033
- '<select' .
3034
- ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
3035
- ' name="wppa-upload-album"' .
3036
- ' class="wppa-upload-album-'.$mocc.'"' .
3037
- ' style="max-width: 100%;"' .
3038
- ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
3039
- ' >' .
3040
  wppa_album_select_a( array ( 'addpleaseselect' => true,
3041
  'checkowner' => true,
3042
  'checkupload' => true,
@@ -3044,22 +3037,22 @@ static $albums_granted;
3044
  'checkarray' => count( $alb ) > 1,
3045
  'array' => $alb,
3046
  'sort' => true,
3047
- ) ) .
3048
- '</select>' .
3049
- '<div style="clear:both;" ></div>';
3050
  }
3051
 
3052
  // No, there are too many albums
3053
  else {
3054
- $body .=
3055
- '<input' .
3056
- ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
3057
- ' type="number"' .
3058
- ' placeholder="' . esc_attr( __( 'Enter album id', 'wp-photo-album-plus' ) ) . '"' .
3059
- ' name="wppa-upload-album"' .
3060
- ' style="max-width: 100%;"' .
3061
- ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
3062
- ' />';
3063
  }
3064
  }
3065
 
@@ -3071,9 +3064,9 @@ static $albums_granted;
3071
  // Album select
3072
  $result .= wppa_get_dlg_item( $head, $body, $big );
3073
 
3074
-
3075
  $one_only = wppa_switch( 'upload_one_only' ) && ! wppa_user_is( 'administrator' );
3076
  $multiple = ! $one_only;
 
3077
  $on_camera = wppa_switch( 'camera_connect' );
3078
  $may_video = wppa_switch( 'user_upload_video_on' );
3079
  $may_audio = wppa_switch( 'user_upload_audio_on' );
@@ -3089,7 +3082,6 @@ static $albums_granted;
3089
  $accept .= ',.pdf';
3090
  }
3091
 
3092
-
3093
  if ( $one_only ) {
3094
  if ( $on_camera ) {
3095
  $head = esc_attr( __( 'Select File or Camera', 'wp-photo-album-plus' ) );
@@ -3111,123 +3103,97 @@ static $albums_granted;
3111
 
3112
  // Save the button text
3113
  $body =
3114
- '<script>var wppaUploadButtonText="' . esc_js( $value ) . '"</script>' .
3115
 
3116
  // The (hidden) functional button
3117
- '<input' .
3118
- ' type="file"' .
3119
- ' accept="' . $accept . '"' .
3120
- ( $multiple ? ' multiple="multiple"' : '' ) .
3121
- ' style="' .
3122
- 'display:none;' .
3123
- '"' .
3124
- ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '"' .
3125
- ' name="wppa-user-upload-' . $yalb . '-' . $mocc . '[]"' .
3126
- ' onchange="' .
3127
- 'jQuery( \'#wppa-user-submit-' . $yalb . '-' . $mocc.'\' ).css( \'display\', \'block\' );' .
3128
- 'wppaDisplaySelectedFiles(\'wppa-user-upload-' . $yalb . '-' . $mocc . '\')' .
3129
- '"' .
3130
- ' />';
3131
 
3132
  // The displayed button
3133
- $body .=
3134
- '<input' .
3135
- ' type="button"' .
3136
- ' style="max-width:100%;width:auto;margin-top:8px;margin-bottom:8px;padding-left:6px;padding-right:6px;"' .
3137
- ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-display"' .
3138
- ' class="wppa-upload-button"' .
3139
- ' value="' . $value . '"' .
3140
- ' onclick="' .
3141
- 'wppaSetMaxWidthToParentWidth(this);' .
3142
- 'jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').removeAttr(\'capture\');' .
3143
- 'jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();' .
3144
- '"' .
3145
- '/>';
 
3146
  // The camera button for iphone and ipad, if Table II-H15 (Camera connect) is ticked.
3147
  if ( wppa_is_iphoneoripad() && $on_camera ) {
3148
- $body .=
3149
- '<input' .
3150
- ' type="button"' .
3151
- ' style="' .
3152
- 'width:32px;' .
3153
- 'margin-top:8px;' .
3154
- 'margin-bottom:8px;' .
3155
- 'margin-left:12px;' .
3156
- 'padding-left:6px;' .
3157
- 'padding-right:6px;' .
3158
- 'background-image:url(\'' . wppa_get_imgdir() . 'camera16.png\');' .
3159
- 'background-repeat:no-repeat;' .
3160
- 'background-position:center;' .
3161
- '"' .
3162
- ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-idisplay"' .
3163
- ' class="wppa-upload-button"' .
3164
- ' value="&nbsp;"' .
3165
- ' onclick="' .
3166
- 'jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').prop(\'capture\',true);' .
3167
- 'jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();' .
3168
- '"' .
3169
- '/>';
3170
  }
3171
 
3172
  // Explanation
3173
- if ( $one_only ) {
3174
- $max = 1;
3175
- }
3176
- // if ( ! wppa_switch( 'upload_one_only' ) ) {
3177
- // if ( $max ) {
3178
- $body .=
3179
- '<div style="font-size:10px;" >' .
3180
- sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
3181
- $max,
3182
- 'wp-photo-album-plus' ), $max ) .
3183
- '</div>';
3184
-
3185
- if ( wppa_opt( 'upload_frontend_minsize' ) ) {
3186
- $minsize = wppa_opt( 'upload_frontend_minsize' );
3187
- $body .=
3188
- '<div style="font-size:10px;" >' .
3189
- sprintf( __( 'Min photo size: %d pixels', 'wp-photo-album-plus' ), $minsize ) .
3190
- '</div>';
3191
- }
3192
- if ( wppa_opt( 'upload_frontend_maxsize' ) ) {
3193
- $maxsize = wppa_opt( 'upload_frontend_maxsize' );
3194
- $body .=
3195
- '<div style="font-size:10px;" >' .
3196
- sprintf( __( 'Max photo size: %d pixels', 'wp-photo-album-plus' ), $maxsize ) .
3197
- '</div>';
3198
- }
3199
- /*
3200
- else {
3201
- $maxsize = wppa_check_memory_limit( false );
3202
- if ( is_array( $maxsize ) ) {
3203
- $body .=
3204
- '<div style="font-size:10px;" >' .
3205
- sprintf( __( 'Max photo size: %d x %d (%2.1f MegaPixel)', 'wp-photo-album-plus' ),
3206
- $maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 )
3207
- ) .
3208
- '</div>';
3209
- }
3210
- }
3211
- */
3212
- $supp = $wppa_supported_photo_extensions;
3213
- $body .=
3214
  '<div style="font-size:10px;" >' .
3215
- __( 'You may upload files of type', 'wp-photo-album-plus' ) . ': .' .
3216
- implode( ', .', $wppa_supported_photo_extensions );
3217
- if ( $may_video ) {
3218
- $body .= ', ' . implode( ', .', $wppa_supported_video_extensions );
3219
- }
3220
- if ( $may_audio ) {
3221
- $body .= ', ' . implode( ', .', $wppa_supported_audio_extensions );
3222
- }
3223
- if ( wppa_switch( 'enable_pdf' ) && wppa_can_magick() ) {
3224
- $body .= ', .pdf';
3225
- }
3226
- $body .=
3227
  '</div>';
 
3228
 
3229
- // }
3230
- // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3231
 
3232
  // Copyright notice
3233
  if ( wppa_switch( 'copyright_on' ) ) {
@@ -3243,62 +3209,61 @@ static $albums_granted;
3243
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) ) ) {
3244
 
3245
  $head = __( 'Watermark', 'wp-photo-album-plus' );
3246
- $body =
3247
- '<table' .
3248
- ' class="wppa-watermark wppa-box-text"' .
3249
- ' style="margin:0; border:0;"' .
3250
- ' >' .
3251
- '<tbody>' .
3252
- '<tr valign="top" style="border: 0 none; " >' .
3253
- '<td' .
3254
- ' class="wppa-box-text wppa-td"' .
3255
- ' >' .
3256
- __( 'Apply watermark file:', 'wp-photo-album-plus' ) .
3257
- '</td>' .
3258
- '</tr>' .
3259
- '<tr>' .
3260
- '<td' .
3261
- ' class="wppa-box-text wppa-td"' .
3262
- ' style="width: '.$width.';"' .
3263
- ' >' .
3264
- '<select' .
3265
- ' style="margin:0; padding:0; text-align:left; width:auto; "' .
3266
- ' name="wppa-watermark-file"' .
3267
- ' id="wppa-watermark-file"' .
3268
- ' >' .
3269
- wppa_watermark_file_select( 'user' ) .
3270
- '</select>' .
3271
- '</td>' .
3272
- '</tr>' .
3273
- '<tr valign="top" style="border: 0 none; " >' .
3274
- '<td' .
3275
- ' class="wppa-box-text wppa-td"' .
3276
- ' style="width: '.$width.';"' .
3277
- ' >' .
3278
- __( 'Position:', 'wp-photo-album-plus' ) .
3279
- '</td>' .
3280
- '</tr>' .
3281
- '<tr>' .
3282
- '<td' .
3283
- ' class="wppa-box-text wppa-td"' .
3284
- ' style="width: '.$width.';"' .
3285
- ' >' .
3286
- '<select' .
3287
- ' style="margin:0; padding:0; text-align:left; width:auto; "' .
3288
- ' name="wppa-watermark-pos"' .
3289
- ' id="wppa-watermark-pos"' .
3290
- ' >' .
3291
- wppa_watermark_pos_select( 'user' ) .
3292
- '</select>' .
3293
- '</td>' .
3294
- '</tr>' .
3295
- '</tbody>' .
3296
- '</table>';
3297
 
3298
  $result .= wppa_get_dlg_item( $head, $body, $big );
3299
  }
3300
 
3301
-
3302
  // Name
3303
  $head = __( 'Name', 'wp-photo-album-plus' );
3304
  if ( wppa_switch( 'name_user_mandatory' ) ) {
@@ -3336,17 +3301,17 @@ static $albums_granted;
3336
  'wp-photo-album-plus' );
3337
  }
3338
  }
3339
- $body .=
3340
- '<input' .
3341
- ' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
3342
- ' type="text"' .
3343
- ' class="wppa-box-text"' .
3344
- ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; width:100%;"' .
3345
- ' name="wppa-user-name"' .
3346
- ' />' .
3347
- '<div style="clear:left;font-size:10px;" >' .
3348
- $expl .
3349
- '</div>';
3350
  }
3351
  $result .= wppa_get_dlg_item( $head, $body, $big );
3352
 
@@ -3364,15 +3329,15 @@ static $albums_granted;
3364
  $desc = '';
3365
  }
3366
 
3367
- $body =
3368
- '<textarea' .
3369
- ' id="wppa-desc-user-' . $mocc . '-' . $seqno . '"' .
3370
- ' class="wppa-user-textarea wppa-box-text"' .
3371
- ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"' .
3372
- ' name="wppa-user-desc"' .
3373
- ' >' .
3374
- $desc .
3375
- '</textarea>';
3376
 
3377
  $result .= wppa_get_dlg_item( $head, $body, $big );
3378
  }
@@ -3380,29 +3345,29 @@ static $albums_granted;
3380
  // Predefined desc ?
3381
  elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
3382
 
3383
- $result .= wppa_get_dlg_item( '',
3384
- '<input' .
3385
- ' id="wppa-desc-user-' . $mocc . '-' . $seqno . '"' .
3386
- ' type="hidden"' .
3387
- ' value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"' .
3388
- ' name="wppa-user-desc"' .
3389
- ' />', $big );
3390
  }
3391
 
3392
  // Custom fields
3393
  if ( wppa_switch( 'fe_custom_fields' ) ) {
3394
  for ( $i = '0'; $i < '10' ; $i++ ) {
3395
- if ( wppa_opt( 'custom_caption_'.$i ) ) {
3396
-
3397
- $head = __( wppa_opt( 'custom_caption_'.$i ) ) .
3398
- ( wppa_switch( 'custom_visible_'.$i ) ? '' : '&nbsp;<small><i>(&nbsp;'.__( 'hidden', 'wp-photo-album-plus' ).'&nbsp;)</i></small>' );
3399
- $body =
3400
- '<input' .
3401
- ' type="text"' .
3402
- ' class="wppa-box-text"' .
3403
- ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; width:100%;"' .
3404
- ' name="wppa-user-custom-'.$i.'"' .
3405
- ' />';
3406
 
3407
  $result .= wppa_get_dlg_item( $head, $body, $big );
3408
  }
@@ -3415,168 +3380,161 @@ static $albums_granted;
3415
  // Prepare onclick action
3416
  $onc = 'wppaPrevTags(\'wppa-sel-'.$yalb.'-'.$mocc.'\', \'wppa-inp-'.$yalb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$yalb.'-'.$mocc.'\')';
3417
 
3418
- // Open the tag enter area
3419
- // $result .= '<div style="clear:both;" >';
 
3420
 
3421
- // Selection boxes 1..3
3422
- for ( $i = '1'; $i < '4'; $i++ ) {
3423
- if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
3424
-
3425
- $head = __( wppa_opt( 'up_tagselbox_title_'.$i ) );
3426
- $head = trim( $head, ': ');
3427
- $body = '<select' .
3428
- ' id="wppa-sel-'.$yalb.'-'.$mocc.'-'.$i.'"' .
3429
- ' name="wppa-user-tags-'.$i.'[]"' .
3430
- ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
3431
- ' onchange="'.$onc.'"' .
3432
- ' >';
3433
-
3434
- if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
3435
- $tags = explode( ',', trim( wppa_opt( 'up_tagselbox_content_'.$i ), ',' ) );
3436
- $body .= '<option value="" >&nbsp;</option>';
3437
- if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
3438
- $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
3439
- }
3440
  }
3441
- else { // All existing tags
3442
- $tags = wppa_get_taglist();
3443
- $body .= '<option value="" >&nbsp;</option>';
3444
- if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
3445
- $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
3446
- }
3447
  }
3448
- $body .= '</select><div style="clear:both;" ></div>';
3449
-
3450
- $result .= wppa_get_dlg_item( $head, $body, $big );
3451
  }
3452
- }
3453
-
3454
- // New tags
3455
- if ( wppa_switch( 'up_tag_input_on' ) ) {
3456
-
3457
- $head = __( wppa_opt( 'up_tag_input_title' ) );
3458
- $head = trim( $head, ': ');
3459
- $body = '<input' .
3460
- ' id="wppa-inp-'.$yalb.'-'.$mocc.'"' .
3461
- ' type="text"' .
3462
- ' class="wppa-box-text "' .
3463
- ' style="padding:0; width:100%;"' .
3464
- ' name="wppa-new-tags"' .
3465
- ' onchange="'.$onc.'"' .
3466
- ' value="'.trim(wppa_opt('up_tagbox_new'), ',').'"' .
3467
- ' />';
3468
 
3469
  $result .= wppa_get_dlg_item( $head, $body, $big );
3470
  }
 
3471
 
3472
- // Preview area
3473
- if ( wppa_switch( 'up_tag_preview' ) ) {
3474
- $head = __( 'Preview tags', 'wp-photo-album-plus' );
3475
- $body = '<span id="wppa-prev-'.$yalb.'-'.$mocc.'">' .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3476
 
3477
- ( $yalb ? htmlspecialchars( trim( wppa_sanitize_tags( wppa_get_album_item( $yalb, 'default_tags' ), false, true ), ',' ) ) : '' ) .
 
 
 
3478
 
3479
- '</span>' .
3480
 
3481
- ( $yalb ? '' : wppa_js( 'jQuery(document).ready(function() {'.$onc.'});' ) );
3482
 
3483
- $result .= wppa_get_dlg_item( $head, $body, $big );
3484
- }
3485
 
3486
- // Close tag enter area
3487
- // $result .= '</div>';
3488
  }
3489
 
3490
  /* The Blogit section */
3491
 
3492
  if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
3493
- // $result .=
3494
- // '<div style="margin-top:6px;" >';
3495
-
3496
- // Use can choose to blog it
3497
- if ( wppa_opt( 'blog_it' ) == 'optional' ) {
3498
-
3499
- $head =
3500
- '<input' .
3501
- ' type="button"' .
3502
- ' value="' . esc_attr( __( 'Blog it?', 'wp-photo-album-plus' ) ) . '"' .
3503
- ' onclick="jQuery(\'#wppa-blogit-'.$yalb.'-'.$mocc.'\').trigger(\'click\')"' .
3504
- ' />';
3505
-
3506
- $head .=
3507
- ' <input' .
3508
- ' type="checkbox"' .
3509
- ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3510
- ' name="wppa-blogit"' .
3511
- ' style="display:none;"' .
3512
- ' onchange="if ( jQuery(this).prop(\'checked\') ) { ' .
3513
- 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'block\'); ' .
3514
- 'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').prop(\'value\', \'' . esc_js(__( 'Upload and blog', 'wp-photo-album-plus' )) . '\'); ' .
3515
- '} ' .
3516
- 'else { ' .
3517
- 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'none\'); ' .
3518
- 'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').prop(\'value\', \'' . esc_js(__( 'Upload photo', 'wp-photo-album-plus' )) . '\'); ' .
3519
- '} "' .
3520
- ' />' ;
3521
- }
3522
 
3523
- // Always blog
3524
- else {
3525
 
3526
- $head =
3527
- '<input' .
3528
- ' type="checkbox"' .
3529
- ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3530
- ' name="wppa-blogit"' .
3531
- ' style="display:none;"' .
3532
- ' checked="checked"' .
3533
- ' />';
3534
- }
3535
 
3536
- $body =
3537
- '<div' .
3538
- ' id="blog-div-'.$yalb.'-'.$mocc.'"' .
3539
- ( wppa_opt( 'blog_it' ) == 'optional' ? ' style="display:none;"' : '' ) .
3540
- ' >' .
 
 
 
 
 
 
 
 
 
 
 
3541
 
 
 
3542
 
3543
- '<h6>' .
3544
- __( 'Post title', 'wp-photo-album-plus' ) .
3545
- '</h6>' .
3546
- '<input' .
3547
- ' id="wppa-blogit-title-'.$yalb.'-'.$mocc.'"' .
3548
- ' type="text"' .
3549
- ' class="wppa-box-text "' .
3550
- ' style="padding:0; width:100%;"' .
3551
- ' name="wppa-post-title"' .
3552
- ' />' .
3553
- '<h6>' .
3554
- __( 'Text BEFORE the image', 'wp-photo-album-plus' ) .
3555
- '</h6>' .
3556
- '<textarea' .
3557
- ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3558
- ' name="wppa-blogit-pretext"' .
3559
- ' class=wppa-user-textarea wppa-box-text"' .
3560
- ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"' .
3561
- ' >' .
3562
- '</textarea>' .
3563
- '<h6>' .
3564
- __( 'Text AFTER the image', 'wp-photo-album-plus' ) .
3565
- '</h6>' .
3566
- '<textarea' .
3567
- ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3568
- ' name="wppa-blogit-posttext"' .
3569
- ' class=wppa-user-textarea wppa-box-text"' .
3570
- ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"' .
3571
- '>' .
3572
- '</textarea>' .
3573
- '</div>';// .
3574
 
3575
- $result .= wppa_get_dlg_item( $head, $body, $big );
3576
- // '</div>';
 
 
 
3577
 
3578
- }
3579
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3580
 
3581
  /* start submit section */
3582
 
@@ -4623,7 +4581,7 @@ global $wppa_iptc_cache;
4623
  foreach ( $wppa_iptc_labels as $iptc_label ) {
4624
  if ( $iptc_label['tag'] == $iptcline['tag'] ) {
4625
  $default = $iptc_label['status'];
4626
- $label = $iptc_label['description'];
4627
  }
4628
  }
4629
 
@@ -4643,11 +4601,12 @@ global $wppa_iptc_cache;
4643
  $result .= '; '; // next item with same tag
4644
  }
4645
  else {
4646
- $result .= '<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none; ">' .
4647
- '<td class="wppa-iptc-label wppa-box-text wppa-td" >';
4648
- $result .= esc_js( __( $label ) );
4649
- $result .= '</td>' .
4650
- '<td class="wppa-iptc-value wppa-box-text wppa-td" >';
 
4651
  }
4652
  $result .= esc_js( wppa_sanitize_text( __( $iptcline['description'], 'wp-photo-album-plus' ) ) );
4653
  $oldtag = $newtag;
@@ -4699,11 +4658,14 @@ global $wppa_exif_cache;
4699
 
4700
  // Create the output
4701
  if ( ! empty( $exifdata ) ) {
 
4702
  // Open the container content
4703
  $result = '<div id="exifcontent-'.wppa( 'mocc' ).'" >';
 
4704
  // Open or closed?
4705
  $d1 = wppa_switch( 'show_exif_open' ) ? 'display:none;' : 'display:inline;';
4706
  $d2 = wppa_switch( 'show_exif_open' ) ? 'display:inline;' : 'display:none;';
 
4707
  // Process data
4708
  $onclick = 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
4709
  'jQuery( \'.wppa-exif-table-' . wppa( 'mocc' ) . '\' ).css( \'display\', \'\' );' .
@@ -4746,9 +4708,6 @@ global $wppa_exif_cache;
4746
  }
4747
  }
4748
 
4749
- // if ( ! isset( $wppa_exifdefaults[$exifline['tag']] ) ) continue;
4750
- // $exifline['description'] = trim( $exifline['description'], "\x00..\x1F " );
4751
-
4752
  // Photo status is hide ?
4753
  if ( $exifline['status'] == 'hide' ) continue;
4754
 
@@ -4766,13 +4725,13 @@ global $wppa_exif_cache;
4766
  }
4767
  else {
4768
  $result .= '<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" >' .
4769
- '<td class="wppa-exif-label wppa-box-text wppa-td" >';
4770
 
4771
- $label = wppa_exif_tagname( $exifline['tag'], $brand ) . ':';
4772
 
4773
  $result .= esc_js( __( $label ) );
4774
 
4775
- $result .= '</td><td class="wppa-exif-value wppa-box-text wppa-td" >';
4776
  }
4777
  $result .= esc_js( $exifline['f_description'] );
4778
  $oldtag = $newtag;
@@ -5156,15 +5115,15 @@ function wppa_bestof_html( $args, $widget = true ) {
5156
  switch ( $linktype ) {
5157
  case 'owneralbums':
5158
  $href = wppa_get_permalink( $page ).'wppa-cover=1&amp;wppa-owner='.$data[$author]['owner'].'&amp;wppa-occur=1';
5159
- $title = __( 'See the authors albums' , 'wp-photo-album-plus');
5160
  break;
5161
  case 'ownerphotos':
5162
  $href = wppa_get_permalink( $page ).'wppa-cover=0&amp;wppa-owner='.$data[$author]['owner'].'&amp;photos-only&amp;wppa-occur=1';
5163
- $title = __( 'See the authors photos' , 'wp-photo-album-plus');
5164
  break;
5165
  case 'upldrphotos':
5166
  $href = wppa_get_permalink( $page ).'wppa-cover=0&amp;wppa-upldr='.$data[$author]['owner'].'&amp;wppa-occur=1';
5167
- $title = __( 'See all the authors photos' , 'wp-photo-album-plus');
5168
  break;
5169
  default:
5170
  $href = '';
@@ -5422,7 +5381,7 @@ global $wpdb;
5422
  '"' .
5423
  ' >';
5424
 
5425
- $result .= '<script type="text/javascript" >' .
5426
  'wppaWaitForCounter = 0;' .
5427
  '</script>';
5428
 
@@ -5480,7 +5439,7 @@ global $wpdb;
5480
  if ( $autoall ) {
5481
  $addlabel = '<a id="wppa-' . $day . '" ></a>';
5482
 
5483
- $result .= '<script type="text/javascript" >
5484
  jQuery(document).ready(function(){
5485
  wppaDoAjaxRender( ' . ( wppa( 'mocc' ) + 1 ) . ',
5486
  \'' . str_replace( '&amp;', '&', $ajaxurl ) . '\',
@@ -5545,7 +5504,7 @@ global $wpdb;
5545
  if ( $autoall ) {
5546
  $addlabel = '<a id="wppa-' . $day . '" ></a>';
5547
 
5548
- $result .= '<script type="text/javascript" >
5549
  jQuery(document).ready(function(){
5550
  wppaDoAjaxRender( ' . ( wppa( 'mocc' ) + 1 ) . ',
5551
  \'' . str_replace( '&amp;', '&', $ajaxurl ) . '\',
@@ -6373,7 +6332,7 @@ global $wppa_supported_stereo_glass_names;
6373
  $result .=
6374
  '<option' .
6375
  ' value="' . $wppa_supported_stereo_types[$key] . '"' .
6376
- ( isset( $_COOKIE["stereotype"] ) && $_COOKIE["stereotype"] == $wppa_supported_stereo_types[$key] ? ' selected="selected"' : '' ) .
6377
  ' >' .
6378
  $wppa_supported_stereo_type_names[$key] .
6379
  '</option>';
@@ -6389,7 +6348,7 @@ global $wppa_supported_stereo_glass_names;
6389
  $result .=
6390
  '<option' .
6391
  ' value="' . $wppa_supported_stereo_glasses[$key] . '"' .
6392
- ( isset( $_COOKIE["stereoglass"] ) && $_COOKIE["stereoglass"] == $wppa_supported_stereo_glasses[$key] ? ' selected="selected"' : '' ) .
6393
  ' >' .
6394
  $wppa_supported_stereo_glass_names[$key] .
6395
  '</option>';
@@ -6438,7 +6397,7 @@ function wppa_is_exif_date( $date ) {
6438
  function wppa_get_responsive_widget_js_html( $mocc ) {
6439
 
6440
  $result =
6441
- '<script type="text/javascript" >
6442
  if ( ! wppaAutoColumnWidth ) var wppaAutoColumnWidth = [];
6443
  wppaAutoColumnWidth['.$mocc.'] = true;
6444
  if ( ! wppaAutoColumnFrac ) var wppaAutoColumnFrac = [];
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.0.00.023
7
  *
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
11
 
12
+ // Open / close the box containing the thumbnails
13
  function wppa_thumb_area( $action ) {
14
 
15
  // Init
26
  // Open thumbnail area box
27
  if ( $action == 'open' ) {
28
  if ( is_feed() ) {
29
+ $result .= '
30
+ <div
31
+ id="wppa-thumb-area-' . $mocc . '"
32
+ class="wppa-box wppa-thumb-area"
33
+ >';
34
  }
35
  else {
36
+ $result .= '
37
+ <div
38
+ id="wppa-thumb-area-' . $mocc . '"
39
+ class="wppa-box wppa-thumb-area wppa-thumb-area-' . $mocc . '"
40
+ style="' . ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) . '
41
+ overflow:' . $overflow . ';"
42
+ onscroll="wppaMakeLazyVisibleScrollEnd();"
43
+ >';
 
 
 
 
 
44
 
45
  if ( wppa_is_int( wppa( 'start_album' ) ) ) {
46
  wppa_bump_viewcount( 'album', wppa( 'start_album') );
59
  $result .= wppa_get_user_create_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
60
  $result .= wppa_get_user_upload_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
61
  }
 
62
  }
63
 
64
  // Close thumbnail area box
77
 
78
  // Nicescroller
79
  if ( $nice ) {
80
+ $result .= '
81
+ <script>
82
+ jQuery(document).ready(function(){
83
+ jQuery(".wppa-thumb-area").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});
84
+ });
85
+ </script>
86
+ </div>'; // close .wppa-nicewrap div
87
  }
88
 
89
  // Close the thumbnail box
90
  $result .= '</div>';
91
  }
92
 
 
 
 
 
 
 
 
 
 
93
  // Output result
94
  wppa_out( $result );
95
  }
110
 
111
  // Open contest box
112
  if ( is_feed() ) {
113
+ $result .= '
114
+ <div
115
+ id="wppa-thumb-area-' . $mocc . '"
116
+ class="wppa-box wppa-thumb-area"
117
+ >';
118
  }
119
  else {
120
+ $result .= '
121
+ <div
122
+ id="wppa-thumb-area-' . $mocc . '"
123
+ class="wppa-box wppa-contest wppa-thumb-area wppa-thumb-area-' . $mocc . '"
124
+ style="' . ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) . '
125
+ overflow:' . $overflow . ';"
126
+ onscroll="wppaMakeLazyVisibleScrollEnd();"
127
+ >';
 
 
 
 
 
 
128
  }
129
 
130
  // Use nicescroller?
141
  if ( $nice ) {
142
  $result .= '
143
  <script>
144
+ jQuery(document).ready(function(){
145
+ jQuery(".wppa-thumb-area").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});
146
+ });
147
+ </script>
148
+ </div>'; // close .wppa-nicewrap div
149
  }
150
 
151
  // Close the box
354
  </table>
355
  <br /><div style="clear:both;" ></div>';
356
 
357
+ return wppa_compress_html( $result );
358
  }
359
 
360
  // Should comment be visible on contest display?
405
  wppa_container( 'open' );
406
 
407
  // Open wrapper
408
+ $result .= '
409
+ <div
410
+ id="wppa-search-'.wppa( 'mocc' ) . '"
411
+ class="wppa-box wppa-search"
412
+ >';
413
 
414
  // The search html
415
+ $result .= wppa_get_search_html( '',
416
+ wppa( 'may_sub' ),
417
+ wppa( 'may_root' ),
418
+ wppa( 'forceroot' ),
419
+ wppa( 'landingpage' ),
420
+ wppa_switch( 'search_catbox' ),
421
+ wppa_opt( 'search_selboxes' ) );
422
 
423
  // Clear both
424
  $result .= '<div class="wppa-clear" ></div>';
475
  wppa_dbg_msg( 'Root=' . $root . ': ' . ( wppa_is_int( $root ) ? wppa_get_album_name( $root ) : $root ) );
476
 
477
  // Open the form
478
+ $result = '
479
+ <form
480
+ id="wppa_searchform_' . $mocc . '"
481
+ action="' . $pagelink.'"
482
+ method="' . wppa_opt( 'search_form_method' ) . '"
483
+ class="widget_search search-form"
484
+ role="search"
485
+ >';
486
 
487
  // Catbox
488
  if ( $catbox ) {
489
 
490
  // Item wrapper
491
+ $result .= '
492
+ <div
493
+ class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"
494
+ style="width:' . $w . '%;float:left;"
495
+ >';
496
 
497
  $cats = wppa_get_catlist();
498
  $result .=
499
+ __( 'Category', 'wp-photo-album-plus' ) . '
500
+ <select
501
+ id="wppa-catbox-' . $mocc . '"
502
+ name="wppa-catbox"
503
+ class="wppa-searchselbox"
504
+ style="width:100%;clear:both;"
505
+ >';
506
 
507
  $current = '';
508
  if ( wppa_get_get( 'catbox' ) ) {
517
 
518
  $result .= '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
519
  if ( ! empty( $cats ) ) foreach( array_keys( $cats ) as $cat ) {
520
+ $result .= '<option value="' . $cat . '" ' . ( $current == $cat ? 'selected' : '' ) . ' >' . $cat . '</option>';
521
  }
522
+ $result .= '
523
+ </select>';
524
 
525
  // Close item wrapper
526
+ $result .= '
527
+ </div>';
528
  }
529
 
530
  // Selection boxes
536
  $current = wppa_get_post( 'wppa-searchselbox-' . $sb );
537
 
538
  // Item wrapper
539
+ $result .= '
540
+ <div
541
+ class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"
542
+ style="width:' . $w . '%;float:left;"
543
+ >';
544
 
545
  // Caption
546
  $result .=
547
  wppa_opt( 'search_caption_' . $sb ) . ( $any_caption ? '&nbsp;' : '' );
548
 
549
  // Selbox
550
+ $result .= '
551
+ <select
552
+ name="wppa-searchselbox-' . $sb . '"
553
+ class="wppa-searchselbox"
554
+ style="clear:both;width:100%;"
555
+ >';
556
  foreach( array_keys( $opts[$sb] ) as $key ) {
557
+ $sel = $current == $vals[$sb][$key] ? ' selected' : '';
558
  $result .= '<option value="' . $vals[$sb][$key] . '"' . $sel . ' >' . $opts[$sb][$key] . '</option>';
559
  }
560
+ $result .= '
561
+ </select>';
562
 
563
  // Close item wrapper
564
+ $result .= '
565
+ </div>';
566
  }
567
  }
568
 
569
  // The actual search input and submit
570
  // Item wrapper
571
+ $result .= '
572
+ <div
573
+ class="wppa-searchsel-item wppa-searchsel-item-' . $mocc . '"
574
+ style="width:' . $w . '%;float:left;"
575
+ >';
576
 
577
  // Toptext
578
  $result .=
579
+ wppa_opt( 'search_toptext' ) . ( $any_caption ? '&nbsp;' : '' ) . '
580
+ <div style="position:relative;" >';
581
 
582
  // form core
583
  $form_core = '';
687
  // Insert
688
  $result .= $form_core;
689
 
690
+ $result .= '
691
+ </div>';
692
 
693
  // Close item wrapper
694
+ $result .= '
695
+ </div>';
696
 
697
+ $result .= '
698
+ <div style="clear:both;" ></div>';
699
 
700
  // The hidden inputs and sub/root checkboxes
701
  if ( $force_root ) {
702
+ $result .= '
703
+ <input
704
+ type="hidden"
705
+ name="wppa-forceroot"
706
+ value="' . $force_root . '"
707
+ />';
708
  }
709
+ $result .= '
710
+ <input
711
+ type="hidden"
712
+ name="wppa-searchroot"
713
+ class="wppa-search-root-id"
714
+ value="' . $root . '"
715
+ />';
716
+ if ( $rt && ! $force_root ) {
717
+ $result .= '
718
+ <div style="clear:both" ></div>
719
+ <small class="wppa-search-root" style="margin:0;padding:4px 0 0;" >' .
720
+ wppa_display_root( $root ) . '
721
+ </small>
722
+ <div style="clear:both;' . $fontsize . '" >
723
+ <input type="checkbox" name="wppa-rootsearch" class="wppa-rootbox" ' . $rootboxset . ' /> ' .
724
+ wppa_opt( 'search_in_section' ) . '
725
+ </div>';
726
+ }
727
+ if ( $sub ) {
728
+ $result .= '
729
+ <div style="clear:both" ></div>
730
+ <small class="wppa-display-searchstring" style="margin:0;padding:4px 0 0;" >' .
731
+ $wppa_session['display_searchstring'] . '
732
+ </small>
733
+ <div style="clear:both;' . $fontsize . '" >
734
+ <input
735
+ type="checkbox"
736
+ name="wppa-subsearch"
737
+ class="wppa-search-sub-box"' .
738
+ ( empty( $wppa_session['display_searchstring'] ) ? ' disabled="disabled"' : '' ) . '
739
+ onchange="wppaSubboxChange(this)"
740
+ /> ' .
741
+ wppa_opt( 'search_in_results' ) . '
742
+ </div>';
743
+ }
744
+ $result .= '
745
+ </form>';
746
 
747
+ return wppa_compress_html( $result );
748
  }
749
 
750
  // The supersearch box
754
 
755
  wppa_container( 'open' );
756
 
757
+ wppa_out( '
758
+ <div
759
+ id="wppa-search-' . wppa( 'mocc' ) . '"
760
+ class="wppa-box wppa-search"
761
+ >' .
762
+ wppa_get_supersearch_html() . '
763
+ <div class="wppa-clear" ></div>
764
+ </div>' );
 
765
 
766
  wppa_container( 'close' );
767
  }
773
  global $wppa_supported_camara_brands;
774
 
775
  // Init
776
+ $mocc = wppa( 'mocc' );
777
  $page = wppa_get_the_landing_page( 'supersearch_linkpage',
778
  __( 'Photo search results' ,'wp-photo-album-plus' )
779
  );
915
  }
916
 
917
  // Make the html
918
+ $id = 'wppa_searchform_' . $mocc;
919
+ $result = '
920
+ <form
921
+ id="' . $id . '"
922
+ action="'.$pagelink.'"
923
+ method="post"
924
+ class="widget_search"
925
+ >
926
+ <input
927
+ type="hidden"
928
+ id="wppa-ss-pageurl-' . $mocc . '"
929
+ name="wppa-ss-pageurl"' .
930
  ' value="'.$pagelink.'"' .
931
  ' />';
932
 
933
  // album or photo
934
+ $id = 'wppa-ss-pa-' . $mocc;
935
+ $result .= '
936
+ <select
937
+ id="' . $id . '"
938
+ name="wppa-ss-pa"
939
+ style="margin:2px;padding:0;vertical-align:top;float:left;"
940
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
941
+ onwheel="event.stopPropagation();"
942
+ size="2"
943
+ >
944
+ <option
945
+ value="a"' .
946
+ ( $ss_data['0'] == 'a' ? ' selected' : '' ) . '
947
+ >' .
948
+ __('Albums', 'wp-photo-album-plus' ) . '
949
+ </option>
950
+ <option
951
+ value="p"' .
952
+ ( $ss_data['0'] == 'p' ? ' selected' : '' ) . '
953
+ >' .
954
+ __('Photos', 'wp-photo-album-plus' ) . '
955
+ </option>
956
+ </select>';
957
 
958
  // album
959
+ $id = 'wppa-ss-albumopt-' . $mocc;
960
+ $result .= '
961
+ <select
962
+ id="' . $id . '"
963
+ name="wppa-ss-albumopt"
964
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
965
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
966
+ onwheel="event.stopPropagation();"
967
+ size="' . ( ! empty( $catlist ) ? '3' : '2' ) . '"
968
+ >';
969
+ if ( ! empty( $catlist ) ) {
970
+ $result .= '
971
+ <option
972
+ value="c"' .
973
+ ( $ss_data['0'] == 'a' && $ss_data['1'] == 'c' ? ' selected' : '' ) . '
974
+ >' .
975
+ __( 'Category', 'wp-photo-album-plus' ) . '
976
+ </option>';
977
+ }
978
+ $result .= '
979
+ <option
980
+ value="n"' .
981
+ ( $ss_data['0'] == 'a' && $ss_data['1'] == 'n' ? ' selected' : '' ) . '
982
+ >' .
983
+ __( 'Name', 'wp-photo-album-plus' ) . '
984
+ </option>
985
+ <option
986
+ value="t"' .
987
+ ( $ss_data['0'] == 'a' && $ss_data['1'] == 't' ? ' selected' : '' ) . '
988
+ >' .
989
+ __( 'Text', 'wp-photo-album-plus' ) . '
990
+ </option>
991
+ </select>';
992
 
993
  // album category
994
  if ( ! empty( $catlist ) ) {
995
+ $id = 'wppa-ss-albumcat-' . $mocc;
996
+ $result .= '
997
+ <select
998
+ id="' . $id . '"
999
+ name="wppa-ss-albumcat"
1000
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1001
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1002
+ onwheel="event.stopPropagation();"
1003
+ size="' . ( min( count( $catlist ), '6' ) ) . '"
1004
+ multiple
1005
+ title="' .
1006
+ esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) .
1007
+ esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) . '"
1008
+ >';
1009
  foreach ( array_keys( $catlist ) as $cat ) {
1010
  $sel = in_array ( $cat, $ss_cats );
1011
+ $result .= '
1012
+ <option
1013
+ value="' . $cat . '"
1014
+ class="' . $id . '"' .
1015
+ ( $sel ? ' selected' : '' ) . '
1016
+ >' .
1017
+ $cat . '
1018
+ </option>';
1019
  }
1020
+ $result .= '
1021
+ </select>';
1022
  }
1023
 
1024
  // album name
1025
+ $id = 'wppa-ss-albumname-' . $mocc;
1026
+ $result .= '
1027
+ <select
1028
+ id="' . $id . '"
1029
+ name="wppa-ss-albumname"
1030
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1031
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1032
+ onwheel="event.stopPropagation();"
1033
+ size="' . ( min( count( $albums ), '6' ) ) . '"
1034
+ >';
1035
  foreach ( $albums as $album ) {
1036
  $name = stripslashes( $album['name'] );
1037
  $sel = ( $ss_data['3'] == $name && $ss_data['0'] == 'a' && $ss_data['1'] == 'n' );
1038
+ $result .= '
1039
+ <option
1040
+ value="' . esc_attr( $name ) . '"' .
1041
+ ( $sel ? ' selected' : '' ) . '
1042
+ >' .
1043
+ __( $name ) . '
1044
+ </option>';
1045
  }
1046
  $result .=
1047
  '</select>';
1048
 
1049
  // album text
1050
+ $id = 'wppa-ss-albumtext-' . $mocc;
1051
  $result .= '
1052
+ <select
1053
+ id="' . $id . '"
1054
+ name="wppa-ss-albumtext"
1055
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1056
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1057
+ onwheel="event.stopPropagation();"
1058
+ size="' . ( min( count( $albumtxt ), '6' ) ) . '"
1059
+ multiple="multiple"
1060
+ title="' .
1061
+ esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) .
1062
+ esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) . '"
1063
+ >';
1064
  foreach ( $albumtxt as $txt ) {
1065
  $text = $txt['slug'];
1066
  $sel = in_array ( $text, $ss_atxt );
1067
+ $result .= '
1068
+ <option
1069
+ value="' . $text . '"
1070
+ class="' . $id . '"' .
1071
+ ( $sel ? ' selected' : '' ) . '
1072
+ >' .
1073
+ $text . '
1074
+ </option>';
1075
  }
1076
  $result .= '
1077
  </select>';
1084
  ( wppa_switch( 'save_iptc' ) ) +
1085
  ( wppa_switch( 'save_exif' ) );
1086
  $result .= '
1087
+ <select
1088
+ id="wppa-ss-photoopt-' . $mocc . '"
1089
+ name="wppa-ss-photoopt"
1090
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1091
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1092
+ onwheel="event.stopPropagation();"
1093
+ size="' . $n . '"
1094
+ >
1095
+ <option
1096
+ value="n"' .
1097
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 'n' ? 'selected ' : '' ) . '
1098
+ >' .
1099
+ __( 'Name', 'wp-photo-album-plus' ) . '
1100
+ </option>';
1101
+ if ( count( $ownerlist ) > '1' ) {
1102
+ $result .= '
1103
+ <option
1104
+ value="o"' .
1105
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 'o' ? 'selected ' : '' ) . '
1106
+ >' .
1107
+ __( 'Owner', 'wp-photo-album-plus' ) . '
1108
+ </option>';
1109
+ }
1110
+ if ( ! empty( $taglist ) ) {
1111
+ $result .= '
1112
+ <option
1113
+ value="g"' .
1114
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 'g' ? 'selected ' : '' ) . '
1115
+ >' .
1116
+ __( 'Tag', 'wp-photo-album-plus' ) . '
1117
+ </option>';
1118
+ }
1119
+ $result .= '
1120
+ <option' . '
1121
+ value="t"' .
1122
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 't' ? 'selected ' : '' ) . '
1123
+ >' .
1124
+ __( 'Text', 'wp-photo-album-plus' ) . '
1125
+ </option>';
1126
+ if ( wppa_switch( 'save_iptc' ) ) {
1127
+ $result .= '
1128
+ <option
1129
+ value="i"' .
1130
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 'i' ? 'selected ' : '' ) . '
1131
+ >' .
1132
+ __( 'Iptc', 'wp-photo-album-plus' ) . '
1133
+ </option>';
1134
+ }
1135
+ if ( wppa_switch( 'save_exif' ) ) {
1136
+ $result .= '
1137
+ <option
1138
+ value="e"' .
1139
+ ( $ss_data['0'] == 'p' && $ss_data['1'] == 'e' ? 'selected ' : '' ) . '
1140
+ >' .
1141
+ __( 'Exif', 'wp-photo-album-plus' ) . '
1142
+ </option>';
1143
+ }
1144
+ $result .= '
1145
+ </select>';
1146
 
1147
  // photo name
1148
+ $id = 'wppa-ss-photoname-' . $mocc;
1149
  $result .= '
1150
+ <select
1151
+ id="' . $id . '"
1152
+ name="wppa-ss-photoname"
1153
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1154
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1155
+ onwheel="event.stopPropagation();"
1156
+ size="' . min( count( $photonames ), '6' ) . '"
1157
+ >';
1158
  foreach ( $photonames as $photo ) {
1159
  $name = stripslashes( $photo['name'] );
1160
  $sel = ( $ss_data['3'] == $name && $ss_data['0'] == 'p' && $ss_data['1'] == 'n' );
1161
+ $result .= '
1162
+ <option
1163
+ value="' . esc_attr( $name ) . '"' .
1164
+ ( $sel ? ' selected' : '' ) . '
1165
+ >' .
1166
+ __( $name ) . '
1167
+ </option>';
1168
  }
1169
  $result .= '
1170
  </select>';
1171
 
1172
  // photo owner
1173
+ $id = 'wppa-ss-photoowner-' . $mocc;
1174
  $result .= '
1175
+ <select
1176
+ id="' . $id . '"
1177
+ name="wppa-ss-photoowner"
1178
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1179
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1180
+ onwheel="event.stopPropagation();"
1181
+ size="' . ( min( count( $ownerlist ), '6' ) ) . '"
1182
+ >';
1183
  foreach ( $ownerlist as $photo ) {
1184
  $owner = $photo['owner'];
1185
  $sel = ( $ss_data['3'] == $owner && $ss_data['0'] == 'p' && $ss_data['1'] == 'o' );
1186
+ $result .= '
1187
+ <option
1188
+ value="' . $owner . '"' .
1189
+ ( $sel ? ' selected' : '' ) . '
1190
+ >' .
1191
+ $owner . '
1192
+ </option>';
1193
  }
1194
  $result .= '
1195
  </select>';
1196
 
1197
  // photo tag
1198
  if ( ! empty( $taglist ) ) {
1199
+ $id = 'wppa-ss-phototag-' . $mocc;
1200
  $result .= '
1201
+ <select
1202
+ id="' . $id . '"
1203
+ name="wppa-ss-phototag"
1204
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1205
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1206
+ onwheel="event.stopPropagation();"
1207
+ size="' . ( min( count( $taglist ), '6' ) ) . '"
1208
+ multiple
1209
+ title="' .
1210
+ esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) .
1211
+ esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) . '"
1212
+ >';
1213
  foreach ( array_keys( $taglist ) as $tag ) {
1214
  $sel = in_array ( $tag, $ss_tags );
1215
+ $result .= '
1216
+ <option
1217
+ value="'.$tag.'"
1218
+ class="' . $id . '"' .
1219
+ ( $sel ? ' selected' : '' ) . '
1220
+ >' .
1221
+ $tag . '
1222
+ </option>';
1223
  }
1224
+ $result .= '
1225
+ </select>';
1226
  }
1227
 
1228
  // photo text
1229
+ $id = 'wppa-ss-phototext-' . $mocc;
1230
  $result .= '
1231
+ <select
1232
+ id="' . $id . '"
1233
+ name="wppa-ss-phototext"
1234
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1235
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1236
+ onwheel="event.stopPropagation();"
1237
+ size="' . ( min( count( $phototxt ), '6' ) ) . '"
1238
+ multiple="multiple"
1239
+ title="' .
1240
+ esc_attr( __( 'CTRL+Click to add/remove option.', 'wp-photo-album-plus' ) ) .
1241
+ esc_attr( __( 'Items must meet all selected options.', 'wp-photo-album-plus' ) ) . '"
1242
+ >';
1243
  foreach ( $phototxt as $txt ) {
1244
  $text = $txt['slug'];
1245
  $sel = in_array ( $text, $ss_ptxt );
1246
+ $result .= '
1247
+ <option
1248
+ value="' . $text . '"
1249
+ class="' . $id . '"' .
1250
+ ( $sel ? ' selected' : '' ) . '
1251
+ >' .
1252
+ $text . '
1253
+ </option>';
1254
  }
1255
+ $result .= '
1256
+ </select>';
1257
 
1258
  // photo iptc
1259
  $result .= '
1260
+ <select
1261
+ id="wppa-ss-photoiptc-' . $mocc . '"
1262
+ name="wppa-ss-photoiptc"
1263
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1264
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1265
+ onwheel="event.stopPropagation();"
1266
+ size="' . min( count( $iptclist ), '6' ) . '"
1267
+ >';
1268
  $reftag = str_replace( 'H', '#', $ss_data['2'] );
1269
  foreach ( $iptclist as $item ) {
1270
  $tag = $item['tag'];
1271
  $sel = ( $reftag == $tag && $ss_data['0'] = 'p' && $ss_data['1'] == 'i' );
1272
+ $result .= '
1273
+ <option
1274
+ value="' . $tag . '"' .
1275
+ ( $sel ? ' selected' : '' ) . '
1276
+ >' .
1277
+ rtrim( __( $item['description'], 'wp-photo-album-plus' ), " \n\r\t\v\0:" ) . '
1278
+ </option>';
1279
  }
1280
+ $result .= '
1281
+ </select>';
1282
 
1283
  // Iptc items
1284
  $result .= '
1285
+ <select
1286
+ id="wppa-ss-iptcopts-' . $mocc . '"
1287
+ name="wppa-ss-iptcopts"
1288
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1289
+ size="6"
1290
+ onchange="wppaSuperSearchSelect(' . $mocc . ')"
1291
+ onwheel="event.stopPropagation();"
1292
+ >
1293
  </select>';
1294
 
1295
  // photo exif
1296
  $result .= '
1297
+ <select
1298
+ id="wppa-ss-photoexif-' . $mocc . '"
1299
+ name="wppa-ss-photoexif"
1300
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1301
+ onchange="wppaSuperSearchSelect(' . $mocc . ');"
1302
+ onwheel="event.stopPropagation();"
1303
+ size="' . min( count( $exiflist ), '6' ) . '"
1304
+ >';
1305
  $reftag = str_replace( 'H', '#', $ss_data['2'] );
1306
 
1307
  // Process all tags
1335
  $desc = $item['desc'];
1336
  $sel = ( $reftag == $tag && $ss_data['0'] == 'p' && $ss_data['1'] == 'e' );
1337
 
1338
+ $result .= '
1339
+ <option
1340
+ value="' . $tag . '"' .
1341
+ ( $sel ? ' selected' : '' ) . '
1342
+ >' .
1343
+ $desc . '
1344
+ </option>';
1345
  }
1346
+ $result .= '
1347
+ </select>';
1348
 
1349
  // Exif items
1350
  $result .= '
1351
+ <select
1352
+ id="wppa-ss-exifopts-' . $mocc . '"
1353
+ name="wppa-ss-exifopts"
1354
+ style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"
1355
+ size="6"
1356
+ onchange="wppaSuperSearchSelect(' . $mocc . ')"
1357
+ onwheel="event.stopPropagation();"
1358
+ >
1359
  </select>';
1360
 
1361
  // The spinner
1362
  $result .= '
1363
+ <img
1364
+ id="wppa-ss-spinner-' . $mocc . '"
1365
+ src="' . wppa_get_imgdir() . '/spinner.gif' . '"
1366
+ style="margin:0 4px;display:none;"
1367
+ />';
1368
 
1369
  // The button
1370
  $result .= '
1371
+ <input
1372
+ type="button"
1373
+ id="wppa-ss-button-' . $mocc . '"
1374
+ value="' . __( 'Submit', 'wp-photo-album-plus' ) . '"
1375
+ style="vertical-align:top;margin:2px;"
1376
+ onclick="wppaSuperSearchSelect(' . $mocc . ' , true)"
1377
+ />';
1378
 
1379
  $result .= '
1380
  </form>
1381
+ <script>
1382
+ jQuery(document).ready(function(){wppaSuperSearchSelect(' . $mocc . ')});
1383
  </script>';
1384
 
1385
+ return $result; // wppa_compress_html( $result );
1386
  }
1387
 
1388
  // Superview box
1392
 
1393
  wppa_container( 'open' );
1394
 
1395
+ wppa_out( '
1396
+ <div
1397
+ id="wppa-superview-' . wppa( 'mocc' ) . '"
1398
+ class="wppa-box wppa-superview"
1399
+ >' .
1400
+ wppa_get_superview_html( $album_root, $sort ) . '
1401
+ <div class="wppa-clear" >
1402
+ </div>
1403
+ </div>' );
 
1404
 
1405
  wppa_container( 'close' );
1406
  }
1414
  );
1415
  $url = get_permalink( $page );
1416
 
 
 
1417
  $result = '
1418
  <div>
1419
  <form action="' . $url . '" method = "get">
1420
+ <label>' . __( 'Album:', 'wp-photo-album-plus') . '</label>
1421
+ <select name="wppa-album" style="clear:left;" >' .
1422
  wppa_album_select_a( array( 'selected' => $wppa_session['superalbum'],
1423
  'addpleaseselect' => true,
1424
  'root' => $album_root,
1425
  'content' => true,
1426
  'sort' => $sort,
1427
  'path' => ( ! wppa_in_widget() ),
1428
+ ) ) . '
1429
+ </select><br />
1430
+ <input
1431
+ type="radio"
1432
+ name="wppa-slide"
1433
+ value="nil" ' .
1434
+ ( $wppa_session['superview'] == 'thumbs' ? 'checked' : '' ) . '
1435
+ />' .
1436
+ __( 'Thumbnails', 'wp-photo-album-plus') . '
1437
+ <br />
1438
+ <input
1439
+ type="radio"
1440
+ name="wppa-slide"
1441
+ value="1" ' .
1442
+ ( $wppa_session['superview'] == 'slide' ? 'checked' : '' ) . '
1443
+ />' .
1444
+ __( 'Slideshow', 'wp-photo-album-plus' ) . '
1445
+ <br />
1446
  <input type="hidden" name="wppa-occur" value="1" />
1447
  <input type="hidden" name="wppa-superview" value="1" />
1448
  <input type="submit" value="' . __( 'Submit', 'wp-photo-album-plus' ) . '" />
1449
  </form>
1450
+ </div>';
 
1451
 
1452
+ return wppa_compress_html( $result );
1453
  }
1454
 
1455
  // The admins choice box
1459
 
1460
  wppa_container( 'open' );
1461
 
1462
+ wppa_out( '
1463
+ <div
1464
+ id="wppa-adminschoice-' . wppa( 'mocc' ) . '"
1465
+ class="wppa-box wppa-adminschoice"
1466
+ >' .
1467
+ wppa_get_admins_choice_html( $admins ) . '
1468
+ <div class="wppa-clear" ></div>
1469
+ </div>' );
 
 
1470
 
1471
  wppa_container( 'close' );
1472
  }
1495
 
1496
  if ( $zipfiles ) {
1497
 
1498
+ $result = '
1499
+ <ul' . ( ! wppa( 'in_widget' ) ? ' style="list-style-position:inside;margin:0;padding:0;"' : '' ) . ' >';
 
1500
 
1501
  // Compose the current users zip filename
1502
  $myzip = $zipsdir.wppa_get_user().'.zip';
1525
  $stat = $wppa_zip->statIndex( $i );
1526
  $title .= esc_attr($stat['name']) . "\n";
1527
  }
1528
+ $result .= '
1529
+ <li title="' . $title . '" >
1530
+ <a href="'. WPPA_UPLOAD_URL.'/zips/'.basename($zipfile).'" >' .
1531
+ $user . '
1532
+ </a>';
1533
+ if ( $zipfile == $myzip ) {
1534
+ $result .= '
1535
+ <a
1536
+ onclick="wppaAjaxDeleteMyZip();"
1537
+ style="float:right;cursor:pointer;"
1538
+ >' .
1539
+ __('Delete', 'wp-photo-album-plus') . '
1540
+ </a>';
1541
+ }
1542
+ $result .= '
1543
+ </li>';
1544
  }
1545
  }
1546
  }
1548
  $result .= '</ul>';
1549
  }
1550
  else {
1551
+ $result = __( 'No zipfiles available', 'wp-photo-album-plus' );
1552
  }
1553
 
1554
  return $result;
1561
 
1562
  wppa_container( 'open' );
1563
 
1564
+ wppa_out( '
1565
+ <div
1566
+ id="wppa-tagcloud-' . wppa( 'mocc' ) . '"
1567
+ class="wppa-box wppa-tagcloud"
1568
+ >' .
1569
+ wppa_get_tagcloud_html( $seltags, $minsize, $maxsize ) . '
1570
+ <div class="wppa-clear" ></div>
1571
+ </div>' );
 
 
1572
 
1573
  wppa_container( 'close' );
1574
  }
1630
  else {
1631
  $size = round( $minsize + $tag['fraction'] * $factor );
1632
  }
1633
+ $result .= '
1634
+ <a
1635
+ href="' . $href . '"
1636
+ title="' . $title . '"
1637
+ style="font-size:' . $size . 'px;"
1638
+ >' .
1639
+ ucfirst( __( $name ) ) . '
1640
+ </a> ';
1641
  }
1642
  }
1643
  }
1652
 
1653
  wppa_container( 'open' );
1654
 
1655
+ wppa_out( '
1656
+ <div
1657
+ id="wppa-multitag-' . wppa( 'mocc' ) . '"
1658
+ class="wppa-box wppa-multitag"
1659
+ >' .
1660
+ wppa_get_multitag_html( $nperline, $seltags ) . '
1661
+ <div class="wppa-clear" ></div>
1662
+ </div>' );
 
 
1663
 
1664
  wppa_container( 'close' );
1665
  }
1673
  __( 'Multi Tagged photos' ,'wp-photo-album-plus' )
1674
  );
1675
  $oc = wppa_opt( 'multitag_linkpage_oc' );
1676
+ $mocc = wppa( 'mocc' );
1677
  $result = '';
1678
  if ( $page ) {
1679
  if ( $page == '-1' ) {
1691
  }
1692
  }
1693
  else {
1694
+ return __( 'Please select a multitag landing page in Table VI-C4b', 'wp-photo-album-plus');
1695
  }
1696
  $tags = wppa_get_taglist( true );
1697
 
1698
  $result .= '
1699
+ <script>
1700
+ function wppaProcessMultiTagRequest'.wppa('mocc').'() {
1701
+ var any = false;
1702
+ var url = "' . wppa_encrypt_url( $hr ) . '";
1703
+ var andor;
1704
+ var sep;
1705
+
1706
+ if ( jQuery( "#inverse-' . $mocc . '" ).prop( "checked" ) ) {
1707
+ url += "&wppa-inv=1";
1708
+ }
1709
+ url += "&wppa-tag=";
1710
+ ';
1711
 
1712
+ if ( $or_only ) {
1713
+ $result .= '
1714
+ andor = "or";
1715
+ sep = ";";
1716
+ ';
1717
  }
1718
+ else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1719
  $result .= '
1720
+ andor = "and";
1721
+ sep = ",";
1722
+ if ( document.getElementById( "andoror-' . $mocc . '" ).checked ) {
1723
+ andor = "or";
1724
+ sep = ";";
1725
  }';
1726
  }
 
1727
 
1728
+ $selarr = $seltags ? explode( ',', $seltags ) : array();
1729
+ if ( $tags ) foreach ( $tags as $tag ) {
1730
+ if ( ! $seltags || in_array( $tag['tag'], $selarr ) ) {
1731
+ $result .= '
1732
+ if ( document.getElementById( "wppa-' . $mocc . '-' . str_replace( ' ', '_', $tag['tag'] ) . '" ).checked ) {
1733
+ url+="' . urlencode( $tag['tag'] ) . '"+sep;
1734
+ any = true;
1735
+ }';
1736
+ }
1737
+ }
1738
+
1739
+ $result .= '
1740
+ if ( any ) document.location = url;
1741
+ else alert ( "' . __( 'Please check the tag(s) that the photos must have', 'wp-photo-album-plus' ) . '" );
1742
+ }
1743
+ </script>
1744
  ';
1745
 
1746
  $qtag = wppa_get_get( 'tag' );
1757
  if ( $tags ) {
1758
 
1759
  if ( ! $or_only || $not_on ) {
1760
+ $result .= '
1761
+ <table class="wppa-multitag-table">';
1762
+ if ( ! $or_only ) {
1763
+ $result .= '
1764
+ <tr>
1765
+ <td>
1766
+ <input
1767
+ class="radio"
1768
+ name="andor-' . $mocc . '"
1769
+ value="and"
1770
+ id="andorand-' . $mocc . '"
1771
+ type="radio"' .
1772
+ ( $andor == 'and' ? ' checked' : '' ) . '
1773
+ />&nbsp;' .
1774
+ __( 'And', 'wp-photo-album-plus') . '
1775
+ </td>
1776
+ <td>
1777
+ <input
1778
+ class="radio"
1779
+ name="andor-' . $mocc . '"
1780
+ value="or"
1781
+ id="andoror-' . $mocc . '"
1782
+ type="radio"' .
1783
+ ( $andor == 'or' ? ' checked' : '' ) . '
1784
+ />&nbsp;' .
1785
+ __( 'Or', 'wp-photo-album-plus' ) . '
1786
+ </td>
1787
+ </tr>';
1788
+ }
1789
+ if ( $not_on ) {
1790
+ $result .= '
1791
+ <tr>
1792
+ <td>
1793
+ <input
1794
+ type="checkbox"
1795
+ class="checkbox"
1796
+ name="inverse-' . $mocc . '"
1797
+ id="inverse-' . $mocc . '"' .
1798
+ ( wppa_get_get( 'inv' ) ? ' checked' : '' ) . '
1799
+ />&nbsp;' .
1800
+ __( 'Inverse selection', 'wp-photo-album-plus' ) . '
1801
+ </td>
1802
+ <td>
1803
+ </td>
1804
+ </tr>';
1805
+ }
1806
+ $result .= '</table>';
1807
  }
1808
 
1809
  $count = '0';
1810
  $checked = '';
1811
  $tropen = false;
1812
 
1813
+ $result .= '<table class="wppa-multitag-table" >';
1814
 
1815
  foreach ( $tags as $tag ) {
1816
  if ( ! $seltags || in_array( $tag['tag'], $selarr ) ) {
1819
  $tropen = true;
1820
  }
1821
  if ( is_array( $querystringtags ) ) {
1822
+ $checked = in_array( $tag['tag'], $querystringtags ) ? ' checked' : ' ';
1823
  }
1824
+ $result .= '
1825
+ <td
1826
+ style="padding-right:4px;"
1827
+ >
1828
+ <input
1829
+ type="checkbox"
1830
+ id="wppa-' . $mocc . '-' . str_replace( ' ', '_', $tag['tag'] ) . '"' .
1831
+ $checked . '
1832
+ />&nbsp;' .
1833
+ str_replace( ' ', '&nbsp;', ucfirst( __( $tag['tag'] ) ) ) . '
1834
+ </td>';
1835
  $count++;
1836
  if ( $count % $nperline == '0' ) {
1837
  $result .= '</tr>';
1848
  $result .= '</tr>';
1849
  }
1850
  $result .= '</table>';
1851
+ $result .= '
1852
+ <input
1853
+ type="button"
1854
+ onclick="wppaProcessMultiTagRequest' . $mocc . '()"
1855
+ value="' . __( 'Find!', 'wp-photo-album-plus' ) . '"
1856
+ />';
1857
  }
1858
 
1859
  return $result;
1932
  // qr code
1933
  if ( wppa_switch( 'share_qr' ) && $key != 'thumb' ) {
1934
  $src = wppa_create_qrcode_cache( $share_url, '80' );
1935
+ $qr = '
1936
+ <div style="float:left; padding:2px;" >
1937
+ <img
1938
+ src="' . $src . '"
1939
+ title="' . esc_attr( $share_url ) . '"
1940
+ alt="' . __( 'QR code', 'wp-photo-album-plus' ) . '"
1941
+ />
1942
+ </div>';
1943
  }
1944
  else {
1945
  $qr = '';
1979
  $tweet .= ': '. urlencode( substr( $photo_desc, 0, $rest_len ) ) . '...';
1980
  }
1981
  }
1982
+
1983
+ $tweet = urlencode( $share_url );
1984
+
1985
+ $tw = '
1986
+ <div
1987
+ class="wppa-share-icon"
1988
+ style="float:left; padding:0 2px;"
1989
+ >
1990
+ <a
1991
+ title="' . sprintf( __( 'Tweet %s on Twitter', 'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"
1992
+ href="https://twitter.com/intent/tweet?text=' . $tweet . '"
1993
+ target="_blank"
1994
+ >
1995
+ <img
1996
+ src="' . wppa_get_imgdir() . 'twitter.png"
1997
+ style="height:' . $s . 'px;vertical-align:top;"
1998
+ alt="' . esc_attr( __( 'Share on Twitter', 'wp-photo-album-plus' ) ) . '"
1999
+ />
2000
+ </a>
2001
+ </div>';
2002
  }
2003
  else {
2004
  $tw = '';
2006
 
2007
  // Google
2008
  if ( wppa_switch( 'share_google' ) ) {
2009
+ $go = '
2010
+ <div class="wppa-share-icon" style="float:left; padding:0 2px;" >
2011
+ <a
2012
+ title="' . sprintf( __( 'Share %s on Google+', 'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"
2013
+ href="https://plus.google.com/share?url=' . urlencode( $share_url ) . '"
2014
+ target="_blank"
2015
+ >
2016
+ <img
2017
+ src="' . wppa_get_imgdir() . 'google.png"
2018
+ style="height:' . $s . 'px;vertical-align:top;"
2019
+ alt="' . esc_attr( __( 'Share on Google+', 'wp-photo-album-plus' ) ) . '"
2020
+ />
2021
+ </a>
2022
+ </div>';
2023
  }
2024
  else {
2025
  $go = '';
2029
  $desc = urlencode( $see_on_site ).': '.urlencode( $photo_desc );
2030
  if ( strlen( $desc ) > 500 ) $desc = substr( $desc, 0, 495 ).'...';
2031
  if ( wppa_switch( 'share_pinterest' ) ) {
2032
+ $pi = '
2033
+ <div class="wppa-share-icon" style="float:left; padding:0 2px;" >
2034
+ <a
2035
+ title="' . sprintf( __( 'Share %s on Pinterest' ,'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"
2036
+ href="http://pinterest.com/pin/create/button/?url=' . urlencode( $share_url ) .
2037
  '&media=' . urlencode( str_replace( '/thumbs/', '/', $share_img ) ) .
2038
  '&description=' . $desc .
2039
+ '"
2040
+ target="_blank"
2041
+ >
2042
+ <img
2043
+ src="' . wppa_get_imgdir() . 'pinterest.png"
2044
+ style="height:' . $s . 'px;vertical-align:top;border-radius:' . $br . 'px;"
2045
+ alt="' . esc_attr( __( 'Share on Pinterest', 'wp-photo-album-plus' ) ) . '"
2046
+ />
2047
+ </a>
2048
+ </div>';
 
2049
  }
2050
  else {
2051
  $pi = '';
2053
 
2054
  // LinkedIn
2055
  if ( wppa_switch( 'share_linkedin' ) && $key != 'thumb' && $key != 'lightbox' ) {
2056
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2057
  // New style under development
2058
+ $li = '
2059
+ <div class="wppa-share-icon" style="float:left; padding:0 2px;" >
2060
+ <a
2061
+ title="' . sprintf( __( 'Share %s on LinkedIn' ,'wp-photo-album-plus' ), esc_attr( $photo_name ) ) . '"
2062
+ href="https://www.linkedin.com/shareArticle?mini=true&url=' . urlencode( $share_url ) . '"
2063
+ target="_blank"
2064
+ >
2065
+ <img
2066
+ src="' . wppa_get_imgdir() . 'linkedin.png"
2067
+ style="height:' . $s . 'px;vertical-align:top;"
2068
+ />
2069
+ </a>
2070
+ </div>';
2071
  }
2072
  else {
2073
  $li = '';
2092
  // Share
2093
  if ( wppa_switch( 'share_facebook' ) && ! wppa_switch( 'facebook_like' ) ) {
2094
  if ( $small ) {
2095
+ $fb .= '
2096
+ <div
2097
+ class="fb-share-button"
2098
+ style="float:left; padding:0 2px;"
2099
+ data-href="' . $share_url . '"
2100
+ data-type="icon"
2101
+ >
2102
+ </div>';
2103
  }
2104
  else {
2105
  $disp = wppa_opt( 'fb_display' );
2106
  if ( 'standard' == $disp ) {
2107
  $disp = 'button';
2108
  }
2109
+ $fb .= '
2110
+ <div
2111
+ class="fb-share-button"
2112
+ style="float:left; padding:0 2px; ' . $lbs . '"
2113
+ data-width="200"
2114
+ data-href="' . $share_url . '"
2115
+ data-type="' . $disp . '"
2116
+ >
2117
+ </div>';
2118
  }
2119
  $need_fb_init = true;
2120
  }
2122
  // Like
2123
  if ( wppa_switch( 'facebook_like' ) && ! wppa_switch( 'share_facebook' ) ) {
2124
  if ( $small ) {
2125
+ $fb .= '
2126
+ <div
2127
+ class="fb-like"
2128
+ style="float:left; padding:0 2px; "
2129
+ data-href="' . $share_url . '"
2130
+ data-layout="button"
2131
+ >
2132
+ </div>';
2133
  }
2134
  else {
2135
+ $fb .= '
2136
+ <div
2137
+ class="fb-like"
2138
+ style="float:left; padding:0 2px; ' . $lbs . '"
2139
+ data-width="200"
2140
+ data-href="' . $share_url . '"
2141
+ data-layout="' . wppa_opt( 'fb_display' ) . '"
2142
+ >
2143
+ </div>';
2144
  }
2145
  $need_fb_init = true;
2146
  }
2148
  // Like and share
2149
  if ( wppa_switch( 'facebook_like' ) && wppa_switch( 'share_facebook' ) ) {
2150
  if ( $small ) {
2151
+ $fb .= '
2152
+ <div
2153
+ class="fb-like"
2154
+ style="float:left; padding:0 2px; "
2155
+ data-href="' . $share_url . '"
2156
+ data-layout="button"
2157
+ data-action="like"
2158
+ data-show-faces="false"
2159
+ data-share="true"
2160
+ >
2161
+ </div>';
2162
  }
2163
  else {
2164
+ $fb .= '
2165
+ <div
2166
+ class="fb-like"
2167
+ style="float:left; padding:0 2px; ' . $lbs . '"
2168
+ data-width="200"
2169
+ data-href="' . $share_url . '"
2170
+ data-layout="' . wppa_opt( 'fb_display' ) . '"
2171
+ data-action="like"
2172
+ data-show-faces="false"
2173
+ data-share="true"
2174
+ >
2175
+ </div>';
2176
  }
2177
  $need_fb_init = true;
2178
  }
2181
  if ( wppa_switch( 'facebook_comments' ) && ! wppa_in_widget() && $key != 'thumb' && $key != 'lightbox' ) {
2182
  $width = wppa( 'auto_colwidth' ) ? '100%' : wppa_get_container_width( true );
2183
  if ( wppa_switch( 'facebook_comments' ) ) {
2184
+ $fb .= '
2185
+ <div style="clear:both;" ></div>
2186
+ <div class="wppa-fb-comments-title" style="color:blue;" >' .
2187
+ __( 'Comment on Facebook:', 'wp-photo-album-plus' ) . '
2188
+ </div>
2189
+ <div class="fb-comments" data-href="' . $share_url . '" data-width="' . $width . '"></div>';
2190
  $need_fb_init = true;
2191
  }
2192
  }
2201
  }
2202
  }
2203
 
2204
+ return wppa_compress_html( '<div class="wppa-share-'.$key.'" >'.$qr.$tw.$go.$pi.$li.$fb.'<div style="clear:both"></div></div>' );
 
2205
  }
2206
 
2207
  // Make html for share a page/post
2238
  // qr code
2239
  if ( wppa_switch( 'share_qr' ) ) {
2240
  $src = wppa_create_qrcode_cache( $share_url, '80' );
2241
+ $qr = '
2242
+ <div style="float:left; padding:2px;" >
2243
+ <img
2244
+ src="' . $src . '"
2245
+ title="' . esc_attr( $share_url ) . '"
2246
+ alt="' . __( 'QR code', 'wp-photo-album-plus' ) . '"
2247
+ />
2248
+ </div>';
2249
  }
2250
  else {
2251
  $qr = '';
2273
  }
2274
  }
2275
 
2276
+ $tw = '
2277
+ <div class="wppa-share-icon" style="float:left; padding:0 2px;" >
2278
+ <a
2279
+ title="' . sprintf( __( 'Tweet %s on Twitter', 'wp-photo-album-plus' ), esc_attr( $share_name ) ) . '"
2280
+ href="https://twitter.com/intent/tweet?text=' . $tweet . '"
2281
+ target="_blank"
2282
+ >
2283
+ <img
2284
+ src="' . wppa_get_imgdir() . 'twitter.png"
2285
+ style="height:' . $s . 'px;vertical-align:top;"
2286
+ alt="' . esc_attr( __( 'Share on Twitter', 'wp-photo-album-plus' ) ) . '"
2287
+ />
2288
+ </a>
2289
+ </div>';
2290
  }
2291
  else {
2292
  $tw = '';
2294
 
2295
  // Google
2296
  if ( wppa_switch( 'share_google' ) ) {
2297
+ $go = '
2298
+ <div class="wppa-share-icon" style="float:left; padding:0 2px;" >
2299
+ <a
2300
+ title="' . sprintf( __( 'Share %s on Google+', 'wp-photo-album-plus' ), esc_attr( $share_name ) ) . '"
2301
+ href="https://plus.google.com/share?url=' . urlencode( $share_url ) . '"
2302
+ onclick="javascript:window.open( this.href, \"\", \"menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\" );return false;"
2303
+ target="_blank"
2304
+ >
2305
+ <img
2306
+ src="' . wppa_get_imgdir() . 'google.png"
2307
+ style="height:' . $s . 'px;vertical-align:top;"
2308
+ alt="' . esc_attr( __( 'Share on Google+', 'wp-photo-album-plus' ) ) . '"
2309
+ />
2310
+ </a>
2311
+ </div>';
2312
  }
2313
  else {
2314
  $go = '';
2331
  if ( 'standard' == $disp ) {
2332
  $disp = 'button';
2333
  }
2334
+ $fb .= '
2335
+ <div
2336
+ class="fb-share-button"
2337
+ style="float:left; padding:0 2px;"
2338
+ data-width="200"
2339
+ data-href="' . $share_url . '"
2340
+ data-type="' . $disp . '"
2341
+ >
2342
+ </div>';
2343
 
2344
  $need_fb_init = true;
2345
  }
2347
  // Like
2348
  if ( wppa_switch( 'facebook_like' ) && ! wppa_switch( 'share_facebook' ) ) {
2349
 
2350
+ $fb .= '
2351
+ <div
2352
+ class="fb-like"
2353
+ style="float:left; padding:0 2px;"
2354
+ data-width="200"
2355
+ data-href="' . $share_url . '"
2356
+ data-layout="' . wppa_opt( 'fb_display' ) . '"
2357
+ >
2358
+ </div>';
2359
 
2360
  $need_fb_init = true;
2361
  }
2363
  // Like and share
2364
  if ( wppa_switch( 'facebook_like' ) && wppa_switch( 'share_facebook' ) ) {
2365
 
2366
+ $fb .= '
2367
+ <div
2368
+ class="fb-like"
2369
+ style="float:left; padding:0 2px;"
2370
+ data-width="200"
2371
+ data-href="' . $share_url . '"
2372
+ data-layout="' . wppa_opt( 'fb_display' ) . '"
2373
+ data-action="like"
2374
+ data-show-faces="false"
2375
+ data-share="true"
2376
+ >
2377
+ </div>';
2378
 
2379
  $need_fb_init = true;
2380
  }
2382
  // Comments
2383
  if ( wppa_switch( 'facebook_comments' ) ) {
2384
  if ( wppa_switch( 'facebook_comments' ) ) {
2385
+ $fb .= '
2386
+ <div style="clear:both;" ></div>
2387
+ <div class="wppa-fb-comments-title" style="color:blue;" >' .
2388
+ __( 'Comment on Facebook:', 'wp-photo-album-plus' ) . '
2389
+ </div>
2390
+ <div class="fb-comments" data-href="' . $share_url . '" data-width="100%" ></div>';
2391
+
2392
  $need_fb_init = true;
2393
  }
2394
  }
2402
  $qr . $tw . $go . $pi . $li . $fb .
2403
  '<div style="clear:both"></div>';
2404
 
2405
+ return wppa_compress_html( $result );
2406
 
2407
  }
2408
 
2442
  wppa_container( 'open' );
2443
 
2444
  // Open div
2445
+ wppa_out( '
2446
+ <div
2447
+ id="wppa-upload-box-' . wppa( 'mocc' ) . '"
2448
+ class="wppa-box wppa-upload"
2449
+ >' .
2450
+ $create . $upload . '
2451
+ <div style="clear:both;"></div>
2452
+ </div>' );
 
 
 
 
2453
 
2454
  // Close container
2455
  wppa_container( 'close' );
2479
  }
2480
 
2481
  // Make the html
2482
+ wppa_out( '
2483
+ <div
2484
+ class="wppa-album-cover-link"
2485
+ style="clear:both;"
2486
+ >
2487
+ <a
2488
+ style="float:left; cursor:pointer;"
2489
+ onclick="
2490
+ jQuery(this).html(\'' . __( 'Working...', 'wp-photo-album-plus' ) . '\');
2491
+ wppaAjaxDestroyAlbum(' . $alb . ',\'' . wp_create_nonce( 'wppa_nonce_' . $alb ) . '\');
2492
+ jQuery(this).html(\'' . __( 'Delete Album', 'wp-photo-album-plus' ) . '\');
2493
+ "
2494
+ >' .
2495
+ __( 'Delete Album', 'wp-photo-album-plus' ) . '
2496
+ </a>
2497
+ </div>' );
 
 
2498
  }
2499
 
2500
  // Frontend create album, for use in the upload box, the widget or in the album and thumbnail box
2554
  elseif ( $where == 'thumb' ) {
2555
  $returnurl .= 'wppa-album=' . $parent . '&amp;wppa-cover=0&amp;wppa-occur=' . $occur;
2556
  }
 
 
 
2557
  if ( wppa( 'page' ) ) $returnurl .= '&amp;wppa-page=' . wppa( 'page' );
2558
  $returnurl = trim( $returnurl, '?' );
 
2559
  $returnurl = wppa_trim_wppa_( $returnurl );
 
2560
  $t = $mcr ? 'mcr-' : '';
2561
 
2562
  // The links
2563
+ $result .= '
2564
+ <div style="clear:both"></div>
2565
+ <a
2566
+ id="wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"
2567
+ class="wppa-create-' . $where . ' wppa-album-cover-link"
2568
+ onclick="
2569
+ jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2570
+ jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2571
+ jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2572
+ jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2573
+ jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );
2574
+ jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2575
+ window.dispatchEvent(new Event(\'resize\'));
2576
+ "
2577
+ style="float:left;cursor:pointer;"
2578
+ > ' .
2579
+ ( $alb ? __( 'Create Sub Album', 'wp-photo-album-plus' ) : __( 'Create Album', 'wp-photo-album-plus' ) ) . '
2580
+ </a>
2581
+ <a
2582
+ id="_wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"
2583
+ class="wppa-create-' . $where . ' wppa-album-cover-link"
2584
+ onclick="
2585
+ jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2586
+ jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2587
+ jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2588
+ jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2589
+ jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );
2590
+ jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2591
+ window.dispatchEvent(new Event(\'resize\'));
2592
+ "
2593
+ style="float:right;cursor:pointer;display:none;padding-right:6px;"
2594
+ >' .
2595
+ __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) . '
2596
+ </a>';
2597
 
2598
  // The create form
2599
+ $result .= '
2600
+ <div
2601
+ id="wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"
2602
+ style="width:100%;text-align:center;display:none;"
2603
+ >
2604
+ <form
2605
+ id="wppa-creform-'.str_replace('.','-',$alb).'-'.$mocc.'"
2606
+ action="#"
2607
+ method="post"
2608
+ >' .
2609
+ wppa_nonce_field( 'wppa-album-check', 'wppa-nonce', false, false, $alb ) . '
2610
+ <input type="hidden" name="wppa-fe-create" value="yes" />';
 
 
 
2611
 
2612
  // Parent
2613
  if ( ( $where == 'widget' || wppa( 'is_upload' ) ) && ! wppa_switch( 'default_parent_always' ) ) {
2616
  $body = '';
2617
  $result .= wppa_get_dlg_item( $head, $body, false );
2618
 
2619
+ $result .= '
2620
+ <select
2621
+ id="wppa-create-parent-' . $mocc . '"
2622
+ name="wppa-album-parent"
2623
+ class="wppa-upload-album-' . $mocc . '"
2624
+ style="max-width: 100%;"
2625
+ >' .
 
2626
  wppa_album_select_a( array ( 'exclude' => '',
2627
  'selected' => '',
2628
  'disabled' => '',
2654
  'tagonchange' => '',
2655
  'multiple' => false,
2656
  'tagstyle' => '',
2657
+ ) ) . '
2658
+ </select>
2659
+ <div style="clear:both;" ></div>';
2660
  }
2661
  else {
2662
+ $result .= '
2663
+ <input
2664
+ type="hidden"
2665
+ name="wppa-album-parent"
2666
+ value="' . $parent . '"
2667
+ />';
2668
  }
2669
 
2670
  // Name
2671
+ $result .= '
2672
+ <div
2673
+ class="wppa-box-text wppa-td"
2674
+ style="width:100%;clear:both;float:left;text-align:left;"
2675
+ >' .
2676
+ __( 'Enter album name.', 'wp-photo-album-plus' ) . '&nbsp;
2677
+ <span style="font-size:10px;" >' .
2678
+ __( 'Don\'t leave this blank!', 'wp-photo-album-plus' ) . '
2679
+ </span>
2680
+ </div>
2681
+ <input
2682
+ type="text"
2683
+ class="wppa-box-text"
2684
+ style="padding:0; width:100%;"
2685
+ name="wppa-album-name"
2686
+ />';
 
 
 
 
2687
 
2688
  // Description
2689
+ $result .= '
2690
+ <div
2691
+ class="wppa-box-text wppa-td"
2692
+ style="width:100%;clear:both;float:left;text-align:left;"
2693
+ >' .
2694
+ __( 'Enter album description', 'wp-photo-album-plus' ) . '
2695
+ </div>
2696
+ <textarea
2697
+ class="wppa-user-textarea wppa-box-text"
2698
+ style="padding:0;height:120px; width:100%;"
2699
+ name="wppa-album-desc"
2700
+ >
2701
+ </textarea>';
 
 
 
2702
 
2703
  if ( wppa_switch( 'user_create_captcha' ) ) {
2704
+ $result .= '
2705
+ <div style="float:left; margin: 6px 0;" >
2706
+ <div style="float:left;">' .
2707
+ wppa_make_captcha( wppa_get_randseed( 'session' ) ) . '
2708
+ </div>
2709
+ <input
2710
+ type="text"
2711
+ id="wppa-captcha-' . $mocc . '"
2712
+ name="wppa-captcha"
2713
+ style="margin-left: 6px; width:50px;"
2714
+ />
2715
+ </div>';
2716
  }
2717
 
2718
+ $result .= '
2719
+ <input
2720
+ type="submit"
2721
+ class="wppa-user-submit"
2722
+ style="margin: 6px 0; float:right;"
2723
+ value="' . __( 'Create album', 'wp-photo-album-plus' ) . '"
2724
+ />
2725
+ </form>
2726
+ </div>';
2727
 
2728
  return $result;
2729
  }
2940
  elseif ( $where == 'thumb' ) {
2941
  $returnurl .= 'wppa-album=' . $alb . '&amp;wppa-cover=0&amp;wppa-occur=' . $occur;
2942
  }
 
 
2943
  if ( wppa( 'page' ) ) $returnurl .= '&amp;wppa-page=' . wppa( 'page' );
2944
  $returnurl = trim( $returnurl, '?' );
2945
 
2951
  $big = true;
2952
  if ( wppa( 'in_widget' ) ) $big = false;
2953
 
2954
+ $result .= '
2955
+ <a
2956
+ id="wppa-up-' . str_replace( '.', '-', $yalb ) . '-' . $mocc . '"
2957
+ class="wppa-upload-'.$where.' wppa-album-cover-link"
2958
+ onclick="
2959
+ jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2960
+ jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2961
+ jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2962
+ jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2963
+ jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );
2964
+ jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2965
+ window.dispatchEvent(new Event(\'resize\'));
2966
+ "
2967
+ style="float:left; cursor:pointer;"
2968
+ >' .
2969
+ __( 'Upload Photo', 'wp-photo-album-plus' ) . '
2970
+ </a>
2971
+ <a
2972
+ id="_wppa-up-' . str_replace( '.', '-', $yalb ) . '-' . $mocc . '"
2973
+ class="wppa-upload-'.$where.' wppa-album-cover-link"
2974
+ onclick="
2975
+ jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2976
+ jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2977
+ jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2978
+ jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );
2979
+ jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );
2980
+ jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );
2981
+ window.dispatchEvent(new Event(\'resize\'));
2982
+ "
2983
+ style="float:right; cursor:pointer;display:none;padding-right:6px;" >' .
2984
+ __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) . '
2985
+ </a>
2986
+ <div
2987
+ id="wppa-file-' . $t . str_replace( '.', '-', $yalb ) . '-' . $mocc . '"
2988
+ style="width:100%;text-align:center;display:none; clear:both;"
2989
+ >
2990
+ <form
2991
+ id="wppa-uplform-' . $yalb . '-' . $mocc . '"
2992
+ action="' . $returnurl . '"
2993
+ method="post"
2994
+ enctype="multipart/form-data"
2995
+ >' .
2996
+ wppa_nonce_field( 'wppa-check', 'wppa-nonce', false, false, $yalb );
 
 
2997
 
2998
  // Single Album given
2999
  if ( wppa_is_int( $alb ) ) {
3000
+ $result .= '
3001
+ <input
3002
+ type="hidden"
3003
+ id="wppa-upload-album-' . $mocc . '-' . $seqno . '"
3004
+ name="wppa-upload-album"
3005
+ value="' . $alb . '"
3006
+ />';
3007
 
3008
  $head = '';
3009
  $body = '';
3022
  // Can an selection box be displayed?
3023
  if ( ! wppa_opt( 'fe_upload_max_albums' ) || // No limit on number of albums
3024
  wppa_opt( 'fe_upload_max_albums' ) > wppa_get_uploadable_album_count( $alb ) ) { // Below max
3025
+ $body .= '
3026
+ <select
3027
+ id="wppa-upload-album-' . $mocc . '-' . $seqno . '"
3028
+ name="wppa-upload-album"
3029
+ class="wppa-upload-album-' . $mocc . '"
3030
+ style="max-width: 100%;"
3031
+ onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"
3032
+ >' .
3033
  wppa_album_select_a( array ( 'addpleaseselect' => true,
3034
  'checkowner' => true,
3035
  'checkupload' => true,
3037
  'checkarray' => count( $alb ) > 1,
3038
  'array' => $alb,
3039
  'sort' => true,
3040
+ ) ) . '
3041
+ </select>
3042
+ <div style="clear:both;" ></div>';
3043
  }
3044
 
3045
  // No, there are too many albums
3046
  else {
3047
+ $body .= '
3048
+ <input
3049
+ id="wppa-upload-album-' . $mocc . '-' . $seqno . '"
3050
+ type="number"
3051
+ placeholder="' . esc_attr( __( 'Enter album id', 'wp-photo-album-plus' ) ) . '"
3052
+ name="wppa-upload-album"
3053
+ style="max-width: 100%;"
3054
+ onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"
3055
+ />';
3056
  }
3057
  }
3058
 
3064
  // Album select
3065
  $result .= wppa_get_dlg_item( $head, $body, $big );
3066
 
 
3067
  $one_only = wppa_switch( 'upload_one_only' ) && ! wppa_user_is( 'administrator' );
3068
  $multiple = ! $one_only;
3069
+ if ( $one_only ) $max = '1';
3070
  $on_camera = wppa_switch( 'camera_connect' );
3071
  $may_video = wppa_switch( 'user_upload_video_on' );
3072
  $may_audio = wppa_switch( 'user_upload_audio_on' );
3082
  $accept .= ',.pdf';
3083
  }
3084
 
 
3085
  if ( $one_only ) {
3086
  if ( $on_camera ) {
3087
  $head = esc_attr( __( 'Select File or Camera', 'wp-photo-album-plus' ) );
3103
 
3104
  // Save the button text
3105
  $body =
3106
+ '<script>var wppaUploadButtonText="' . esc_js( $value ) . '"</script>';
3107
 
3108
  // The (hidden) functional button
3109
+ $body .= '
3110
+ <input
3111
+ type="file"
3112
+ accept="' . $accept . '"' .
3113
+ ( $multiple ? ' multiple' : '' ) . '
3114
+ style="display:none;"
3115
+ id="wppa-user-upload-' . $yalb . '-' . $mocc . '"
3116
+ name="wppa-user-upload-' . $yalb . '-' . $mocc . '[]"
3117
+ onchange="
3118
+ jQuery( \'#wppa-user-submit-' . $yalb . '-' . $mocc.'\' ).css( \'display\', \'block\' );
3119
+ wppaDisplaySelectedFiles(\'wppa-user-upload-' . $yalb . '-' . $mocc . '\');
3120
+ "
3121
+ />';
 
3122
 
3123
  // The displayed button
3124
+ $body .= '
3125
+ <input
3126
+ type="button"
3127
+ style="max-width:100%;width:auto;margin-top:8px;margin-bottom:8px;padding-left:6px;padding-right:6px;"
3128
+ id="wppa-user-upload-' . $yalb . '-' . $mocc . '-display"
3129
+ class="wppa-upload-button"
3130
+ value="' . $value . '"
3131
+ onclick="
3132
+ wppaSetMaxWidthToParentWidth(this);
3133
+ jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').removeAttr(\'capture\');
3134
+ jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').click();
3135
+ "
3136
+ />';
3137
+
3138
  // The camera button for iphone and ipad, if Table II-H15 (Camera connect) is ticked.
3139
  if ( wppa_is_iphoneoripad() && $on_camera ) {
3140
+ $body .= '
3141
+ <input
3142
+ type="button"
3143
+ style="
3144
+ width:32px;margin:8px 12px;padding:0 6px;
3145
+ background-image:url(\'' . wppa_get_imgdir() . 'camera16.png\');
3146
+ background-repeat:no-repeat;
3147
+ background-position:center;
3148
+ "
3149
+ id="wppa-user-upload-' . $yalb . '-' . $mocc . '-idisplay"
3150
+ class="wppa-upload-button"
3151
+ value="&nbsp;"
3152
+ onclick="
3153
+ jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').prop(\'capture\',true);
3154
+ jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();
3155
+ "
3156
+ />';
 
 
 
 
 
3157
  }
3158
 
3159
  // Explanation
3160
+ $body .= '
3161
+ <div style="font-size:10px;" >' .
3162
+ sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
3163
+ $max, 'wp-photo-album-plus' ), $max ) . '
3164
+ </div>';
3165
+
3166
+ if ( wppa_opt( 'upload_frontend_minsize' ) ) {
3167
+ $minsize = wppa_opt( 'upload_frontend_minsize' );
3168
+ $body .=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3169
  '<div style="font-size:10px;" >' .
3170
+ sprintf( __( 'Min photo size: %d pixels', 'wp-photo-album-plus' ), $minsize ) .
3171
+ '</div>';
3172
+ }
3173
+ if ( wppa_opt( 'upload_frontend_maxsize' ) ) {
3174
+ $maxsize = wppa_opt( 'upload_frontend_maxsize' );
3175
+ $body .=
3176
+ '<div style="font-size:10px;" >' .
3177
+ sprintf( __( 'Max photo size: %d pixels', 'wp-photo-album-plus' ), $maxsize ) .
 
 
 
 
3178
  '</div>';
3179
+ }
3180
 
3181
+ $supp = $wppa_supported_photo_extensions;
3182
+ $body .=
3183
+ '<div style="font-size:10px;" >' .
3184
+ __( 'You may upload files of type', 'wp-photo-album-plus' ) . ': .' .
3185
+ implode( ', .', $wppa_supported_photo_extensions );
3186
+ if ( $may_video ) {
3187
+ $body .= ', ' . implode( ', .', $wppa_supported_video_extensions );
3188
+ }
3189
+ if ( $may_audio ) {
3190
+ $body .= ', ' . implode( ', .', $wppa_supported_audio_extensions );
3191
+ }
3192
+ if ( wppa_switch( 'enable_pdf' ) && wppa_can_magick() ) {
3193
+ $body .= ', .pdf';
3194
+ }
3195
+ $body .=
3196
+ '</div>';
3197
 
3198
  // Copyright notice
3199
  if ( wppa_switch( 'copyright_on' ) ) {
3209
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) ) ) {
3210
 
3211
  $head = __( 'Watermark', 'wp-photo-album-plus' );
3212
+ $body = '
3213
+ <table
3214
+ class="wppa-watermark wppa-box-text"
3215
+ style="margin:0; border:0;"
3216
+ >
3217
+ <tbody>
3218
+ <tr valign="top" style="border: 0 none; " >
3219
+ <td
3220
+ class="wppa-box-text wppa-td"
3221
+ >' .
3222
+ __( 'Apply watermark file:', 'wp-photo-album-plus' ) . '
3223
+ </td>
3224
+ </tr>
3225
+ <tr>
3226
+ <td
3227
+ class="wppa-box-text wppa-td"
3228
+ style="width:' . $width . ';"
3229
+ >
3230
+ <select
3231
+ style="margin:0; padding:0; text-align:left; width:auto; "
3232
+ name="wppa-watermark-file"
3233
+ id="wppa-watermark-file"
3234
+ >' .
3235
+ wppa_watermark_file_select( 'user' ) . '
3236
+ </select>
3237
+ </td>
3238
+ </tr>
3239
+ <tr valign="top" style="border: 0 none;" >
3240
+ <td
3241
+ class="wppa-box-text wppa-td"
3242
+ style="width:' . $width . ';"
3243
+ >' .
3244
+ __( 'Position:', 'wp-photo-album-plus' ) . '
3245
+ </td>
3246
+ </tr>
3247
+ <tr>
3248
+ <td
3249
+ class="wppa-box-text wppa-td"
3250
+ style="width: ' . $width . ';"
3251
+ >
3252
+ <select
3253
+ style="margin:0; padding:0; text-align:left; width:auto; "
3254
+ name="wppa-watermark-pos"
3255
+ id="wppa-watermark-pos"
3256
+ >' .
3257
+ wppa_watermark_pos_select( 'user' ) . '
3258
+ </select>
3259
+ </td>
3260
+ </tr>
3261
+ </tbody>
3262
+ </table>';
3263
 
3264
  $result .= wppa_get_dlg_item( $head, $body, $big );
3265
  }
3266
 
 
3267
  // Name
3268
  $head = __( 'Name', 'wp-photo-album-plus' );
3269
  if ( wppa_switch( 'name_user_mandatory' ) ) {
3301
  'wp-photo-album-plus' );
3302
  }
3303
  }
3304
+ $body .= '
3305
+ <input
3306
+ id="wppa-name-user-' . $mocc . '-' . $seqno . '"
3307
+ type="text"
3308
+ class="wppa-box-text"
3309
+ style="border:1px solid ' . wppa_opt( 'bcolor' ) . ';clear:left; padding:0; width:100%;"
3310
+ name="wppa-user-name"
3311
+ />
3312
+ <div style="clear:left;font-size:10px;" >' .
3313
+ $expl . '
3314
+ </div>';
3315
  }
3316
  $result .= wppa_get_dlg_item( $head, $body, $big );
3317
 
3329
  $desc = '';
3330
  }
3331
 
3332
+ $body = '
3333
+ <textarea
3334
+ id="wppa-desc-user-' . $mocc . '-' . $seqno . '"
3335
+ class="wppa-user-textarea wppa-box-text"
3336
+ style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"
3337
+ name="wppa-user-desc"
3338
+ >' .
3339
+ $desc . '
3340
+ </textarea>';
3341
 
3342
  $result .= wppa_get_dlg_item( $head, $body, $big );
3343
  }
3345
  // Predefined desc ?
3346
  elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
3347
 
3348
+ $result .= wppa_get_dlg_item( '', '
3349
+ <input
3350
+ id="wppa-desc-user-' . $mocc . '-' . $seqno . '"
3351
+ type="hidden"
3352
+ value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"
3353
+ name="wppa-user-desc"
3354
+ />', $big );
3355
  }
3356
 
3357
  // Custom fields
3358
  if ( wppa_switch( 'fe_custom_fields' ) ) {
3359
  for ( $i = '0'; $i < '10' ; $i++ ) {
3360
+ if ( wppa_opt( 'custom_caption_' . $i ) ) {
3361
+
3362
+ $head = __( wppa_opt( 'custom_caption_' . $i ) ) .
3363
+ ( wppa_switch( 'custom_visible_' . $i ) ? '' : '&nbsp;<small><i>(&nbsp;'.__( 'hidden', 'wp-photo-album-plus' ).'&nbsp;)</i></small>' );
3364
+ $body = '
3365
+ <input
3366
+ type="text"
3367
+ class="wppa-box-text"
3368
+ style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; width:100%;"
3369
+ name="wppa-user-custom-' . $i . '"
3370
+ />';
3371
 
3372
  $result .= wppa_get_dlg_item( $head, $body, $big );
3373
  }
3380
  // Prepare onclick action
3381
  $onc = 'wppaPrevTags(\'wppa-sel-'.$yalb.'-'.$mocc.'\', \'wppa-inp-'.$yalb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$yalb.'-'.$mocc.'\')';
3382
 
3383
+ // Selection boxes 1..3
3384
+ for ( $i = '1'; $i < '4'; $i++ ) {
3385
+ if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
3386
 
3387
+ $head = __( wppa_opt( 'up_tagselbox_title_'.$i ) );
3388
+ $head = trim( $head, ': ');
3389
+ $body = '
3390
+ <select
3391
+ id="wppa-sel-' . $yalb . '-' . $mocc . '-' . $i . '"
3392
+ name="wppa-user-tags-' . $i . '[]"' .
3393
+ ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) . '
3394
+ onchange="' . $onc . '"
3395
+ >';
3396
+
3397
+ if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
3398
+ $tags = explode( ',', trim( wppa_opt( 'up_tagselbox_content_'.$i ), ',' ) );
3399
+ $body .= '<option value="" >&nbsp;</option>';
3400
+ if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
3401
+ $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
 
 
 
 
3402
  }
3403
+ }
3404
+ else { // All existing tags
3405
+ $tags = wppa_get_taglist();
3406
+ $body .= '<option value="" >&nbsp;</option>';
3407
+ if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
3408
+ $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
3409
  }
 
 
 
3410
  }
3411
+ $body .= '
3412
+ </select>
3413
+ <div style="clear:both;" ></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
3414
 
3415
  $result .= wppa_get_dlg_item( $head, $body, $big );
3416
  }
3417
+ }
3418
 
3419
+ // New tags
3420
+ if ( wppa_switch( 'up_tag_input_on' ) ) {
3421
+
3422
+ $head = __( wppa_opt( 'up_tag_input_title' ) );
3423
+ $head = trim( $head, ': ');
3424
+ $body = '
3425
+ <input
3426
+ id="wppa-inp-' . $yalb . '-' . $mocc . '"
3427
+ type="text"
3428
+ class="wppa-box-text"
3429
+ style="padding:0; width:100%;"
3430
+ name="wppa-new-tags"
3431
+ onchange="' . $onc . '"
3432
+ value="' . trim( wppa_opt( 'up_tagbox_new' ), ',' ) . '"
3433
+ />';
3434
+
3435
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3436
+ }
3437
 
3438
+ // Preview area
3439
+ if ( wppa_switch( 'up_tag_preview' ) ) {
3440
+ $head = __( 'Preview tags', 'wp-photo-album-plus' );
3441
+ $body = '<span id="wppa-prev-'.$yalb.'-'.$mocc.'">' .
3442
 
3443
+ ( $yalb ? htmlspecialchars( trim( wppa_sanitize_tags( wppa_get_album_item( $yalb, 'default_tags' ), false, true ), ',' ) ) : '' ) .
3444
 
3445
+ '</span>' .
3446
 
3447
+ ( $yalb ? '' : wppa_js( 'jQuery(document).ready(function() {'.$onc.'});' ) );
 
3448
 
3449
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3450
+ }
3451
  }
3452
 
3453
  /* The Blogit section */
3454
 
3455
  if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3456
 
3457
+ // User can choose to blog it
3458
+ if ( wppa_opt( 'blog_it' ) == 'optional' ) {
3459
 
3460
+ $head =
3461
+ '<input' .
3462
+ ' type="button"' .
3463
+ ' value="' . esc_attr( __( 'Blog it?', 'wp-photo-album-plus' ) ) . '"' .
3464
+ ' onclick="jQuery(\'#wppa-blogit-'.$yalb.'-'.$mocc.'\').trigger(\'click\')"' .
3465
+ ' />';
 
 
 
3466
 
3467
+ $head .=
3468
+ ' <input' .
3469
+ ' type="checkbox"' .
3470
+ ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3471
+ ' name="wppa-blogit"' .
3472
+ ' style="display:none;"' .
3473
+ ' onchange="if ( jQuery(this).prop(\'checked\') ) { ' .
3474
+ 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'block\'); ' .
3475
+ 'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').prop(\'value\', \'' . esc_js(__( 'Upload and blog', 'wp-photo-album-plus' )) . '\'); ' .
3476
+ '} ' .
3477
+ 'else { ' .
3478
+ 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'none\'); ' .
3479
+ 'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').prop(\'value\', \'' . esc_js(__( 'Upload photo', 'wp-photo-album-plus' )) . '\'); ' .
3480
+ '} "' .
3481
+ ' />' ;
3482
+ }
3483
 
3484
+ // Always blog
3485
+ else {
3486
 
3487
+ $head =
3488
+ '<input' .
3489
+ ' type="checkbox"' .
3490
+ ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3491
+ ' name="wppa-blogit"' .
3492
+ ' style="display:none;"' .
3493
+ ' checked="checked"' .
3494
+ ' />';
3495
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3496
 
3497
+ $body =
3498
+ '<div' .
3499
+ ' id="blog-div-'.$yalb.'-'.$mocc.'"' .
3500
+ ( wppa_opt( 'blog_it' ) == 'optional' ? ' style="display:none;"' : '' ) .
3501
+ ' >' .
3502
 
 
3503
 
3504
+ '<h6>' .
3505
+ __( 'Post title', 'wp-photo-album-plus' ) .
3506
+ '</h6>' .
3507
+ '<input' .
3508
+ ' id="wppa-blogit-title-'.$yalb.'-'.$mocc.'"' .
3509
+ ' type="text"' .
3510
+ ' class="wppa-box-text "' .
3511
+ ' style="padding:0; width:100%;"' .
3512
+ ' name="wppa-post-title"' .
3513
+ ' />' .
3514
+ '<h6>' .
3515
+ __( 'Text BEFORE the image', 'wp-photo-album-plus' ) .
3516
+ '</h6>' .
3517
+ '<textarea' .
3518
+ ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3519
+ ' name="wppa-blogit-pretext"' .
3520
+ ' class=wppa-user-textarea wppa-box-text"' .
3521
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"' .
3522
+ ' >' .
3523
+ '</textarea>' .
3524
+ '<h6>' .
3525
+ __( 'Text AFTER the image', 'wp-photo-album-plus' ) .
3526
+ '</h6>' .
3527
+ '<textarea' .
3528
+ ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3529
+ ' name="wppa-blogit-posttext"' .
3530
+ ' class=wppa-user-textarea wppa-box-text"' .
3531
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%;"' .
3532
+ '>' .
3533
+ '</textarea>' .
3534
+ '</div>';
3535
+
3536
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3537
+ }
3538
 
3539
  /* start submit section */
3540
 
4581
  foreach ( $wppa_iptc_labels as $iptc_label ) {
4582
  if ( $iptc_label['tag'] == $iptcline['tag'] ) {
4583
  $default = $iptc_label['status'];
4584
+ $label = rtrim( $iptc_label['description'], " \n\r\t\v\0:" );
4585
  }
4586
  }
4587
 
4601
  $result .= '; '; // next item with same tag
4602
  }
4603
  else {
4604
+ $result .= '
4605
+ <tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" >
4606
+ <td class="wppa-iptc-label wppa-box-text wppa-td" style="width:50%;text-align:right;" >' .
4607
+ esc_js( __( $label ) ) . '
4608
+ </td>
4609
+ <td class="wppa-iptc-value wppa-box-text wppa-td" style="width:50%;text-align:left;" >';
4610
  }
4611
  $result .= esc_js( wppa_sanitize_text( __( $iptcline['description'], 'wp-photo-album-plus' ) ) );
4612
  $oldtag = $newtag;
4658
 
4659
  // Create the output
4660
  if ( ! empty( $exifdata ) ) {
4661
+
4662
  // Open the container content
4663
  $result = '<div id="exifcontent-'.wppa( 'mocc' ).'" >';
4664
+
4665
  // Open or closed?
4666
  $d1 = wppa_switch( 'show_exif_open' ) ? 'display:none;' : 'display:inline;';
4667
  $d2 = wppa_switch( 'show_exif_open' ) ? 'display:inline;' : 'display:none;';
4668
+
4669
  // Process data
4670
  $onclick = 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
4671
  'jQuery( \'.wppa-exif-table-' . wppa( 'mocc' ) . '\' ).css( \'display\', \'\' );' .
4708
  }
4709
  }
4710
 
 
 
 
4711
  // Photo status is hide ?
4712
  if ( $exifline['status'] == 'hide' ) continue;
4713
 
4725
  }
4726
  else {
4727
  $result .= '<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" >' .
4728
+ '<td class="wppa-exif-label wppa-box-text wppa-td" style="width:50%;text-align:right;" >';
4729
 
4730
+ $label = rtrim( wppa_exif_tagname( $exifline['tag'], $brand ), " \n\r\t\v\0:" );
4731
 
4732
  $result .= esc_js( __( $label ) );
4733
 
4734
+ $result .= '</td><td class="wppa-exif-value wppa-box-text wppa-td" style="width:50%;text-align:left;" >';
4735
  }
4736
  $result .= esc_js( $exifline['f_description'] );
4737
  $oldtag = $newtag;
5115
  switch ( $linktype ) {
5116
  case 'owneralbums':
5117
  $href = wppa_get_permalink( $page ).'wppa-cover=1&amp;wppa-owner='.$data[$author]['owner'].'&amp;wppa-occur=1';
5118
+ $title = __( 'See the authors albums', 'wp-photo-album-plus');
5119
  break;
5120
  case 'ownerphotos':
5121
  $href = wppa_get_permalink( $page ).'wppa-cover=0&amp;wppa-owner='.$data[$author]['owner'].'&amp;photos-only&amp;wppa-occur=1';
5122
+ $title = __( 'See the authors photos', 'wp-photo-album-plus');
5123
  break;
5124
  case 'upldrphotos':
5125
  $href = wppa_get_permalink( $page ).'wppa-cover=0&amp;wppa-upldr='.$data[$author]['owner'].'&amp;wppa-occur=1';
5126
+ $title = __( 'See all the authors photos', 'wp-photo-album-plus');
5127
  break;
5128
  default:
5129
  $href = '';
5381
  '"' .
5382
  ' >';
5383
 
5384
+ $result .= '<script>' .
5385
  'wppaWaitForCounter = 0;' .
5386
  '</script>';
5387
 
5439
  if ( $autoall ) {
5440
  $addlabel = '<a id="wppa-' . $day . '" ></a>';
5441
 
5442
+ $result .= '<script>
5443
  jQuery(document).ready(function(){
5444
  wppaDoAjaxRender( ' . ( wppa( 'mocc' ) + 1 ) . ',
5445
  \'' . str_replace( '&amp;', '&', $ajaxurl ) . '\',
5504
  if ( $autoall ) {
5505
  $addlabel = '<a id="wppa-' . $day . '" ></a>';
5506
 
5507
+ $result .= '<script>
5508
  jQuery(document).ready(function(){
5509
  wppaDoAjaxRender( ' . ( wppa( 'mocc' ) + 1 ) . ',
5510
  \'' . str_replace( '&amp;', '&', $ajaxurl ) . '\',
6332
  $result .=
6333
  '<option' .
6334
  ' value="' . $wppa_supported_stereo_types[$key] . '"' .
6335
+ ( isset( $_COOKIE["stereotype"] ) && $_COOKIE["stereotype"] == $wppa_supported_stereo_types[$key] ? ' selected' : '' ) .
6336
  ' >' .
6337
  $wppa_supported_stereo_type_names[$key] .
6338
  '</option>';
6348
  $result .=
6349
  '<option' .
6350
  ' value="' . $wppa_supported_stereo_glasses[$key] . '"' .
6351
+ ( isset( $_COOKIE["stereoglass"] ) && $_COOKIE["stereoglass"] == $wppa_supported_stereo_glasses[$key] ? ' selected' : '' ) .
6352
  ' >' .
6353
  $wppa_supported_stereo_glass_names[$key] .
6354
  '</option>';
6397
  function wppa_get_responsive_widget_js_html( $mocc ) {
6398
 
6399
  $result =
6400
+ '<script>
6401
  if ( ! wppaAutoColumnWidth ) var wppaAutoColumnWidth = [];
6402
  wppaAutoColumnWidth['.$mocc.'] = true;
6403
  if ( ! wppaAutoColumnFrac ) var wppaAutoColumnFrac = [];
wppa-comment-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
- * Version 8.0.00.008
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -28,7 +28,7 @@ class wppaCommentWidget extends WP_Widget {
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
- $cache = $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
@@ -41,23 +41,11 @@ class wppaCommentWidget extends WP_Widget {
41
  }
42
 
43
  // Cache?
44
- if ( $cache ) {
45
-
46
- if ( wppa_is_file( $cachefile ) ) {
47
-
48
- // Cache expired?
49
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
50
- wppa_remove_widget_cache_path( $this->id );
51
- }
52
-
53
- // No, use it
54
- else {
55
- echo wppa_get_contents( $cachefile );
56
- echo wppa_widget_timer( 'show', $widget_title, true );
57
- wppa( 'in_widget', false );
58
- return;
59
- }
60
- }
61
  }
62
 
63
  // Other inits
@@ -132,7 +120,7 @@ class wppaCommentWidget extends WP_Widget {
132
  }
133
  $result .= $widget_content . $after_widget;
134
 
135
- echo $result;
136
  echo wppa_widget_timer( 'show', $widget_title );
137
 
138
  // Cache?
@@ -173,12 +161,12 @@ class wppaCommentWidget extends WP_Widget {
173
 
174
  // Cache
175
  echo
176
- wppa_widget_cache( $this, $instance['cache'] );
177
 
178
  echo
179
  '<p>' .
180
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
181
- ' ' . __( 'Table I-F3 and 4', 'wp-photo-album-plus' ) .
182
  '</p>';
183
  }
184
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
+ $cache = ! is_admin() && $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
41
  }
42
 
43
  // Cache?
44
+ if ( $cache && wppa_is_file( $cachefile ) ) {
45
+ echo wppa_get_contents( $cachefile );
46
+ echo wppa_widget_timer( 'show', $widget_title, true );
47
+ wppa( 'in_widget', false );
48
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
 
51
  // Other inits
120
  }
121
  $result .= $widget_content . $after_widget;
122
 
123
+ echo wppa_compress_html( $result );
124
  echo wppa_widget_timer( 'show', $widget_title );
125
 
126
  // Cache?
161
 
162
  // Cache
163
  echo
164
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
165
 
166
  echo
167
  '<p>' .
168
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
169
+ ' ' . __( 'Basic setings -> Widget -> Items 4 and 5', 'wp-photo-album-plus' ) .
170
  '</p>';
171
  }
172
 
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 8.0.00.020
6
  *
7
  */
8
 
@@ -1239,7 +1239,7 @@ global $wppa;
1239
  }
1240
  elseif ( $reload == 'home' ) {
1241
  echo
1242
- '<script id="wppaer" type="text/javascript" >' .
1243
  ( $msg ? 'alert( \'' . $msg . '\' );' : '' ) .
1244
  'jQuery( "#wppaer" ).html( "" );' .
1245
  'document.location.href="' . home_url() . '";' .
@@ -1247,7 +1247,7 @@ global $wppa;
1247
  }
1248
  else {
1249
  echo
1250
- '<script id="wppaer" type="text/javascript" >' .
1251
  ( $msg ? 'alert( \'' . $msg . '\' );' : '' ) .
1252
  'jQuery( "#wppaer" ).html( "" );' .
1253
  'document.location.reload( true );' .
@@ -1557,7 +1557,7 @@ function wppa_check_memory_limit( $verbose = true, $x = '0', $y = '0' ) {
1557
  $maxxhd = sqrt( $maxpixels / 144 ) * 16;
1558
  $maxyhd = sqrt( $maxpixels / 144 ) * 9;
1559
  if ( $verbose ) { // Make it a string
1560
- $result = '<br />'.sprintf( __( 'Based on your server memory limit you should not upload images larger then <b>%2.1f</b> Mega pixels' , 'wp-photo-album-plus'), $maxpixels / ( 1024 * 1024 ) );
1561
  $result .= '<br />'.sprintf( __( 'E.g. not bigger than approx %s x %s pixels (4:3) or %s x %s (16:9)', 'wp-photo-album-plus' ),
1562
  '<b>' . ( round( $maxx / 25 ) * 25 ) . '</b>',
1563
  '<b>' . ( round( $maxy / 25 ) * 25 ) . '</b>',
@@ -1770,13 +1770,13 @@ global $wpdb;
1770
  ' title="' .
1771
  esc_attr( __( 'Enter album number', 'wp-photo-album-plus' ) );
1772
 
1773
- if ( $args['addnone'] ) $result .= esc_attr( "\n" . __( '0 for --- none ---' , 'wp-photo-album-plus' ) );
1774
- if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '0 for --- all ---' , 'wp-photo-album-plus' ) );
1775
- if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '-2 for --- generic ---' , 'wp-photo-album-plus' ) );
1776
- if ( $args['addowner'] ) $result .= esc_attr( "\n" . __( '-3 for --- owner/public ---' , 'wp-photo-album-plus' ) );
1777
- if ( $args['addmultiple'] ) $result .= esc_attr( "\n" . __( '-99 for --- multiple see below ---' , 'wp-photo-album-plus' ) );
1778
- if ( $args['addselbox'] ) $result .= esc_attr( "\n" . __( '0 for --- a selection box ---' , 'wp-photo-album-plus' ) );
1779
- if ( $args['addseparate'] ) $result .= esc_attr( "\n" . __( '-1 for --- separate ---' , 'wp-photo-album-plus' ) );
1780
 
1781
  $result .=
1782
  '"' .
@@ -1789,56 +1789,56 @@ global $wpdb;
1789
  else {
1790
  $result = '';
1791
 
1792
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1793
  if ( $args['addpleaseselect'] ) $result .=
1794
  '<option value="0" disabled="disabled" '.$selected.' >' .
1795
- __( '- select an album -' , 'wp-photo-album-plus' ) .
1796
  '</option>';
1797
 
1798
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1799
  if ( $args['addnone'] ) $result .=
1800
  '<option value="0"'.$selected.' >' .
1801
- __( '--- none ---' , 'wp-photo-album-plus' ) .
1802
  '</option>';
1803
 
1804
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1805
  if ( $args['addall'] ) $result .=
1806
  '<option value="0"'.$selected.' >' .
1807
- __( '--- all ---' , 'wp-photo-album-plus' ) .
1808
  '</option>';
1809
 
1810
- $selected = $args['selected'] == '-2' ? ' selected="selected"' : '';
1811
  if ( $args['addall'] ) $result .=
1812
  '<option value="-2"'.$selected.' >' .
1813
- __( '--- generic ---' , 'wp-photo-album-plus' ) .
1814
  '</option>';
1815
 
1816
- $selected = $args['selected'] == '-3' ? ' selected="selected"' : '';
1817
  if ( $args['addowner'] ) $result .=
1818
  '<option value="-3"'.$selected.' >' .
1819
- __( '--- owner/public ---' , 'wp-photo-album-plus' ) .
1820
  '</option>';
1821
 
1822
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1823
  if ( $args['addblank'] ) $result .=
1824
  '<option value="0"'.$selected.' >' .
1825
  '</option>';
1826
 
1827
- $selected = $args['selected'] == '-99' ? ' selected="selected"' : '';
1828
  if ( $args['addmultiple'] ) $result .=
1829
  '<option value="-99"'.$selected.' >' .
1830
- __( '--- multiple see below ---' , 'wp-photo-album-plus' ) .
1831
  '</option>';
1832
 
1833
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1834
  if ( $args['addselbox'] ) $result .=
1835
  '<option value="0"'.$selected.' >' .
1836
- __( '--- a selection box ---' , 'wp-photo-album-plus' ) .
1837
  '</option>';
1838
- $selected = $args['selected'] == '-1' ? ' selected="selected"' : '';
1839
  if ( $args['addseparate'] ) $result .=
1840
  '<option value="-1"' . $selected . '>' .
1841
- __( '--- separate ---' , 'wp-photo-album-plus' ) .
1842
  '</option>';
1843
 
1844
  return $result;
@@ -1938,51 +1938,51 @@ global $wpdb;
1938
  $result .= $args['tagopen'];
1939
  }
1940
 
1941
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1942
  if ( $args['addpleaseselect'] ) $result .=
1943
  '<option value="0" disabled="disabled" '.$selected.' >' .
1944
- __( '- select an album -' , 'wp-photo-album-plus' ) .
1945
  '</option>';
1946
 
1947
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1948
  if ( $args['addnone'] ) $result .=
1949
  '<option value="0"'.$selected.' >' .
1950
- __( '--- none ---' , 'wp-photo-album-plus' ) .
1951
  '</option>';
1952
 
1953
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1954
  if ( $args['addall'] ) $result .=
1955
  '<option value="0"'.$selected.' >' .
1956
- __( '--- all ---' , 'wp-photo-album-plus' ) .
1957
  '</option>';
1958
 
1959
- $selected = $args['selected'] == '-2' ? ' selected="selected"' : '';
1960
  if ( $args['addall'] ) $result .=
1961
  '<option value="-2"'.$selected.' >' .
1962
- __( '--- generic ---' , 'wp-photo-album-plus' ) .
1963
  '</option>';
1964
 
1965
- $selected = $args['selected'] == '-3' ? ' selected="selected"' : '';
1966
  if ( $args['addowner'] ) $result .=
1967
  '<option value="-3"'.$selected.' >' .
1968
- __( '--- owner/public ---' , 'wp-photo-album-plus' ) .
1969
  '</option>';
1970
 
1971
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1972
  if ( $args['addblank'] ) $result .=
1973
  '<option value="0"'.$selected.' >' .
1974
  '</option>';
1975
 
1976
- $selected = $args['selected'] == '-99' ? ' selected="selected"' : '';
1977
  if ( $args['addmultiple'] ) $result .=
1978
  '<option value="-99"'.$selected.' >' .
1979
- __( '--- multiple see below ---' , 'wp-photo-album-plus' ) .
1980
  '</option>';
1981
 
1982
- $selected = $args['selected'] == '0' ? ' selected="selected"' : '';
1983
  if ( $args['addselbox'] ) $result .=
1984
  '<option value="0"'.$selected.' >' .
1985
- __( '--- a selection box ---' , 'wp-photo-album-plus' ) .
1986
  '</option>';
1987
 
1988
  // In case multiple
@@ -2003,7 +2003,7 @@ global $wpdb;
2003
  ( $args['checkupload'] && ( ! wppa_allow_uploads( $album['id'] ) || ! $lim ) ) ||
2004
  ( $args['disableancestors'] && wppa_is_ancestor( $args['exclude'], $album['id'] ) )
2005
  ) $disabled = ' disabled="disabled"'; else $disabled = '';
2006
- if ( in_array( $album['id'], $selarr, true ) && ! $disabled ) $selected = ' selected="selected"'; else $selected = '';
2007
 
2008
  $ok = true; // Assume this will be in the list
2009
  if ( $args['checkaccess'] && ! wppa_have_access( $album['id'] ) ) {
@@ -2037,10 +2037,10 @@ global $wpdb;
2037
  }
2038
  }
2039
 
2040
- $selected = $args['selected'] == '-1' ? ' selected="selected"' : '';
2041
  if ( $args['addseparate'] ) $result .=
2042
  '<option value="-1"' . $selected . '>' .
2043
- __( '--- separate ---' , 'wp-photo-album-plus' ) .
2044
  '</option>';
2045
 
2046
  // New format
@@ -2157,12 +2157,18 @@ global $wpdb;
2157
  }
2158
  }
2159
 
2160
- // Add script to the page specific temp js file, stripped from <script> tags.
2161
- // If admin or no file (i.e. no defer js) return untouched
2162
  function wppa_js( $txt ) {
2163
  global $wppa_js_page_data;
2164
  global $wppa_script_open;
2165
 
 
 
 
 
 
 
2166
  if ( ! $wppa_script_open ) {
2167
  $wppa_js_page_data .= '
2168
  <script>';
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.0.00.022
6
  *
7
  */
8
 
1239
  }
1240
  elseif ( $reload == 'home' ) {
1241
  echo
1242
+ '<script id="wppaer">' .
1243
  ( $msg ? 'alert( \'' . $msg . '\' );' : '' ) .
1244
  'jQuery( "#wppaer" ).html( "" );' .
1245
  'document.location.href="' . home_url() . '";' .
1247
  }
1248
  else {
1249
  echo
1250
+ '<script id="wppaer">' .
1251
  ( $msg ? 'alert( \'' . $msg . '\' );' : '' ) .
1252
  'jQuery( "#wppaer" ).html( "" );' .
1253
  'document.location.reload( true );' .
1557
  $maxxhd = sqrt( $maxpixels / 144 ) * 16;
1558
  $maxyhd = sqrt( $maxpixels / 144 ) * 9;
1559
  if ( $verbose ) { // Make it a string
1560
+ $result = '<br />'.sprintf( __( 'Based on your server memory limit you should not upload images larger then <b>%2.1f</b> Mega pixels', 'wp-photo-album-plus'), $maxpixels / ( 1024 * 1024 ) );
1561
  $result .= '<br />'.sprintf( __( 'E.g. not bigger than approx %s x %s pixels (4:3) or %s x %s (16:9)', 'wp-photo-album-plus' ),
1562
  '<b>' . ( round( $maxx / 25 ) * 25 ) . '</b>',
1563
  '<b>' . ( round( $maxy / 25 ) * 25 ) . '</b>',
1770
  ' title="' .
1771
  esc_attr( __( 'Enter album number', 'wp-photo-album-plus' ) );
1772
 
1773
+ if ( $args['addnone'] ) $result .= esc_attr( "\n" . __( '0 for --- none ---', 'wp-photo-album-plus' ) );
1774
+ if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '0 for --- all ---', 'wp-photo-album-plus' ) );
1775
+ if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '-2 for --- generic ---', 'wp-photo-album-plus' ) );
1776
+ if ( $args['addowner'] ) $result .= esc_attr( "\n" . __( '-3 for --- owner/public ---', 'wp-photo-album-plus' ) );
1777
+ if ( $args['addmultiple'] ) $result .= esc_attr( "\n" . __( '-99 for --- multiple see below ---', 'wp-photo-album-plus' ) );
1778
+ if ( $args['addselbox'] ) $result .= esc_attr( "\n" . __( '0 for --- a selection box ---', 'wp-photo-album-plus' ) );
1779
+ if ( $args['addseparate'] ) $result .= esc_attr( "\n" . __( '-1 for --- separate ---', 'wp-photo-album-plus' ) );
1780
 
1781
  $result .=
1782
  '"' .
1789
  else {
1790
  $result = '';
1791
 
1792
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1793
  if ( $args['addpleaseselect'] ) $result .=
1794
  '<option value="0" disabled="disabled" '.$selected.' >' .
1795
+ __( '- select an album -', 'wp-photo-album-plus' ) .
1796
  '</option>';
1797
 
1798
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1799
  if ( $args['addnone'] ) $result .=
1800
  '<option value="0"'.$selected.' >' .
1801
+ __( '--- none ---', 'wp-photo-album-plus' ) .
1802
  '</option>';
1803
 
1804
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1805
  if ( $args['addall'] ) $result .=
1806
  '<option value="0"'.$selected.' >' .
1807
+ __( '--- all ---', 'wp-photo-album-plus' ) .
1808
  '</option>';
1809
 
1810
+ $selected = $args['selected'] == '-2' ? ' selected' : '';
1811
  if ( $args['addall'] ) $result .=
1812
  '<option value="-2"'.$selected.' >' .
1813
+ __( '--- generic ---', 'wp-photo-album-plus' ) .
1814
  '</option>';
1815
 
1816
+ $selected = $args['selected'] == '-3' ? ' selected' : '';
1817
  if ( $args['addowner'] ) $result .=
1818
  '<option value="-3"'.$selected.' >' .
1819
+ __( '--- owner/public ---', 'wp-photo-album-plus' ) .
1820
  '</option>';
1821
 
1822
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1823
  if ( $args['addblank'] ) $result .=
1824
  '<option value="0"'.$selected.' >' .
1825
  '</option>';
1826
 
1827
+ $selected = $args['selected'] == '-99' ? ' selected' : '';
1828
  if ( $args['addmultiple'] ) $result .=
1829
  '<option value="-99"'.$selected.' >' .
1830
+ __( '--- multiple see below ---', 'wp-photo-album-plus' ) .
1831
  '</option>';
1832
 
1833
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1834
  if ( $args['addselbox'] ) $result .=
1835
  '<option value="0"'.$selected.' >' .
1836
+ __( '--- a selection box ---', 'wp-photo-album-plus' ) .
1837
  '</option>';
1838
+ $selected = $args['selected'] == '-1' ? ' selected' : '';
1839
  if ( $args['addseparate'] ) $result .=
1840
  '<option value="-1"' . $selected . '>' .
1841
+ __( '--- separate ---', 'wp-photo-album-plus' ) .
1842
  '</option>';
1843
 
1844
  return $result;
1938
  $result .= $args['tagopen'];
1939
  }
1940
 
1941
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1942
  if ( $args['addpleaseselect'] ) $result .=
1943
  '<option value="0" disabled="disabled" '.$selected.' >' .
1944
+ __( '- select an album -', 'wp-photo-album-plus' ) .
1945
  '</option>';
1946
 
1947
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1948
  if ( $args['addnone'] ) $result .=
1949
  '<option value="0"'.$selected.' >' .
1950
+ __( '--- none ---', 'wp-photo-album-plus' ) .
1951
  '</option>';
1952
 
1953
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1954
  if ( $args['addall'] ) $result .=
1955
  '<option value="0"'.$selected.' >' .
1956
+ __( '--- all ---', 'wp-photo-album-plus' ) .
1957
  '</option>';
1958
 
1959
+ $selected = $args['selected'] == '-2' ? ' selected' : '';
1960
  if ( $args['addall'] ) $result .=
1961
  '<option value="-2"'.$selected.' >' .
1962
+ __( '--- generic ---', 'wp-photo-album-plus' ) .
1963
  '</option>';
1964
 
1965
+ $selected = $args['selected'] == '-3' ? ' selected' : '';
1966
  if ( $args['addowner'] ) $result .=
1967
  '<option value="-3"'.$selected.' >' .
1968
+ __( '--- owner/public ---', 'wp-photo-album-plus' ) .
1969
  '</option>';
1970
 
1971
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1972
  if ( $args['addblank'] ) $result .=
1973
  '<option value="0"'.$selected.' >' .
1974
  '</option>';
1975
 
1976
+ $selected = $args['selected'] == '-99' ? ' selected' : '';
1977
  if ( $args['addmultiple'] ) $result .=
1978
  '<option value="-99"'.$selected.' >' .
1979
+ __( '--- multiple see below ---', 'wp-photo-album-plus' ) .
1980
  '</option>';
1981
 
1982
+ $selected = $args['selected'] == '0' ? ' selected' : '';
1983
  if ( $args['addselbox'] ) $result .=
1984
  '<option value="0"'.$selected.' >' .
1985
+ __( '--- a selection box ---', 'wp-photo-album-plus' ) .
1986
  '</option>';
1987
 
1988
  // In case multiple
2003
  ( $args['checkupload'] && ( ! wppa_allow_uploads( $album['id'] ) || ! $lim ) ) ||
2004
  ( $args['disableancestors'] && wppa_is_ancestor( $args['exclude'], $album['id'] ) )
2005
  ) $disabled = ' disabled="disabled"'; else $disabled = '';
2006
+ if ( in_array( $album['id'], $selarr, true ) && ! $disabled ) $selected = ' selected'; else $selected = '';
2007
 
2008
  $ok = true; // Assume this will be in the list
2009
  if ( $args['checkaccess'] && ! wppa_have_access( $album['id'] ) ) {
2037
  }
2038
  }
2039
 
2040
+ $selected = $args['selected'] == '-1' ? ' selected' : '';
2041
  if ( $args['addseparate'] ) $result .=
2042
  '<option value="-1"' . $selected . '>' .
2043
+ __( '--- separate ---', 'wp-photo-album-plus' ) .
2044
  '</option>';
2045
 
2046
  // New format
2157
  }
2158
  }
2159
 
2160
+ // Add script to the page specific data, stripped from <script> tags.
2161
+ // If admin or no defer js or cached: output with tags by wppa_out()
2162
  function wppa_js( $txt ) {
2163
  global $wppa_js_page_data;
2164
  global $wppa_script_open;
2165
 
2166
+ if ( is_admin() || ! wppa_switch( 'defer_javascript' ) || wppa( 'cache' ) ) {
2167
+ wppa_out( '
2168
+ <script>' . $txt . '</script>' );
2169
+ return;
2170
+ }
2171
+
2172
  if ( ! $wppa_script_open ) {
2173
  $wppa_js_page_data .= '
2174
  <script>';
wppa-featen-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
- * Version 7.3.03
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -29,7 +29,7 @@ class FeaTenWidget extends WP_Widget {
29
  extract( $args );
30
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
31
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
32
- $cache = $instance['cache'];
33
  $cachefile = wppa_get_widget_cache_path( $this->id );
34
 
35
  // Logged in only and logged out?
@@ -38,23 +38,11 @@ class FeaTenWidget extends WP_Widget {
38
  }
39
 
40
  // Cache?
41
- if ( $cache ) {
42
-
43
- if ( wppa_is_file( $cachefile ) ) {
44
-
45
- // Cache expired?
46
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
47
- wppa_remove_widget_cache_path( $this->id );
48
- }
49
-
50
- // No, use it
51
- else {
52
- echo wppa_get_contents( $cachefile );
53
- echo wppa_widget_timer( 'show', $widget_title, true );
54
- wppa( 'in_widget', false );
55
- return;
56
- }
57
- }
58
  }
59
 
60
  // Other inits
@@ -192,7 +180,7 @@ class FeaTenWidget extends WP_Widget {
192
  }
193
  $result .= $widget_content . $after_widget;
194
 
195
- echo $result;
196
  echo wppa_widget_timer( 'show', $widget_title );
197
 
198
  // Cache?
@@ -246,13 +234,13 @@ class FeaTenWidget extends WP_Widget {
246
 
247
  // Cache
248
  echo
249
- wppa_widget_cache( $this, $instance['cache'] );
250
 
251
  // Explanation
252
  echo
253
  '<p>' .
254
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
255
- ' ' . __( 'Table I-F11 and 12', 'wp-photo-album-plus' ) .
256
  '</p>';
257
 
258
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
29
  extract( $args );
30
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
31
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
32
+ $cache = ! is_admin() && $instance['cache'];
33
  $cachefile = wppa_get_widget_cache_path( $this->id );
34
 
35
  // Logged in only and logged out?
38
  }
39
 
40
  // Cache?
41
+ if ( $cache && wppa_is_file( $cachefile ) ) {
42
+ echo wppa_get_contents( $cachefile );
43
+ echo wppa_widget_timer( 'show', $widget_title, true );
44
+ wppa( 'in_widget', false );
45
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
 
48
  // Other inits
180
  }
181
  $result .= $widget_content . $after_widget;
182
 
183
+ echo wppa_compress_html( $result );
184
  echo wppa_widget_timer( 'show', $widget_title );
185
 
186
  // Cache?
234
 
235
  // Cache
236
  echo
237
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
238
 
239
  // Explanation
240
  echo
241
  '<p>' .
242
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
243
+ ' ' . __( 'Basic setings -> Widget -> Items 12 and 13', 'wp-photo-album-plus' ) .
244
  '</p>';
245
 
246
  }
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 8.0.00.020
7
  *
8
  */
9
 
@@ -163,12 +163,10 @@ global $wppa_current_shortcode_atts;
163
  foreach ( array_keys( $atts ) as $key ) {
164
  $atts[$key] = strip_tags( $atts[$key] ); // NOT htmlspecialchars because of album="$cat,René" has allowed funny chars
165
  }
166
- if ( $atts['cache'] != 'inf' ) {
167
- $atts['cache'] = ( $atts['cache'] ? strval( intval( $atts['cache'] ) ) : '0' );
168
- }
169
 
170
  // Caching?
171
- $wppa['cache'] = $atts['cache'];
 
172
  if ( wppa_switch( 'defer_javascript' ) ) { // When defer js: can not cache slideshows
173
  if ( in_array( $atts['type'], array( 'slide', 'slideonly', 'slideonlyf' ) ) && $wppa['cache'] ) {
174
  wppa_log( 'war', 'Can not cache shortcode type ' . $atts['type'] . ' when defer javascript is enabled' );
@@ -583,6 +581,9 @@ global $wppa_current_shortcode_atts;
583
  // Relative urls?
584
  $result = wppa_make_relative( $result );
585
 
 
 
 
586
  // Done
587
  return $result;
588
 
@@ -770,10 +771,7 @@ global $wppa_current_shortcode_atts;
770
 
771
  // Cache?
772
  if ( isset( $xatts['cache'] ) ) {
773
- if ( $xatts['cache'] != 'inf' ) {
774
- $xatts['cache'] = ( $xatts['cache'] ? strval( intval( $xatts['cache'] ) ) : '0' );
775
- }
776
- $wppa['cache'] = $xatts['cache'];
777
  }
778
 
779
  // Delay
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.00.023
7
  *
8
  */
9
 
163
  foreach ( array_keys( $atts ) as $key ) {
164
  $atts[$key] = strip_tags( $atts[$key] ); // NOT htmlspecialchars because of album="$cat,René" has allowed funny chars
165
  }
 
 
 
166
 
167
  // Caching?
168
+ $wppa['cache'] = ! in_array( $atts['cache'], array( '', '0', 'off', 'no' ) );
169
+
170
  if ( wppa_switch( 'defer_javascript' ) ) { // When defer js: can not cache slideshows
171
  if ( in_array( $atts['type'], array( 'slide', 'slideonly', 'slideonlyf' ) ) && $wppa['cache'] ) {
172
  wppa_log( 'war', 'Can not cache shortcode type ' . $atts['type'] . ' when defer javascript is enabled' );
581
  // Relative urls?
582
  $result = wppa_make_relative( $result );
583
 
584
+ // Compress
585
+ $result = wppa_compress_html( $result );
586
+
587
  // Done
588
  return $result;
589
 
771
 
772
  // Cache?
773
  if ( isset( $xatts['cache'] ) ) {
774
+ $wppa['cache'] = ! in_array( $xatts['cache'], array( '', '0', 'off', 'no' ) );
 
 
 
775
  }
776
 
777
  // Delay
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.0.00.021
7
  *
8
  */
9
 
@@ -155,14 +155,17 @@ global $wppa_current_shortcode_atts;
155
  if ( wppa( 'is_tag' ) ) wppa_dbg_msg( 'Is Tag: ' . wppa( 'is_tag' ) );
156
  else wppa_dbg_msg( 'Is NOT Tag' );
157
  wppa( 'page', wppa_get_get( 'page' ) );
 
158
  if ( wppa_get_get( 'superview' ) ) {
159
  $wppa_session['superview'] = wppa( 'is_slide' ) ? 'slide': 'thumbs';
160
  $wppa_session['superalbum'] = wppa( 'start_album' );
161
  wppa( 'photos_only', true );
162
  }
163
  wppa( 'is_upldr', wppa_get_get( 'upldr' ) );
 
164
  if ( wppa( 'is_upldr' ) ) wppa( 'photos_only', true );
165
  wppa( 'is_owner', wppa_get_get( 'owner' ) );
 
166
  if ( wppa( 'is_owner' ) ) {
167
  $albs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_albums
168
  WHERE owner = %s", wppa( 'is_owner' ) ), ARRAY_A );
@@ -176,7 +179,7 @@ global $wppa_current_shortcode_atts;
176
  }
177
  wppa( 'supersearch', strip_tags( wppa_get_get( 'supersearch' ) ) );
178
  $wppa_session['supersearch'] = wppa( 'supersearch' );
179
- // wppa_save_session();
180
  if ( wppa( 'supersearch' ) ) {
181
  $ss_info = explode( ',', wppa( 'supersearch' ) );
182
  if ( $ss_info['0'] == 'a' ) {
@@ -191,25 +194,17 @@ global $wppa_current_shortcode_atts;
191
  // New style calendar and ajax: set is_calendar
192
  if ( substr( wppa_get_get( 'calendar' ), 0, 4 ) == 'real' ) {
193
  wppa( 'calendar', wppa_get_get( 'calendar' ) );
194
- // }
195
- // if ( wppa( 'calendar' ) == 'real' && wppa( 'ajax' ) ) {
196
  wppa( 'is_calendar', true );
197
  }
198
  wppa( 'caldate', strip_tags( wppa_get_get( 'caldate' ) ) );
199
  wppa( 'is_inverse', wppa_get_get( 'inv' ) );
200
 
201
- // if ( ! isset( $_REQUEST['album'] ) && ! isset( $_REQUEST['wppa-album'] ) ) {
202
- // wppa_dbg_msg( 'No album spec' . ( wppa_is_virtual() ? ' on virtual album' : ' on real album (0)' ) , 'red', 'force' );
203
- // }
204
  }
205
 
206
  // 2. wppa_albums is called directly. Assume any arg. If not, no worry, system defaults are used == generic
207
  elseif ( $id != '' || $type != '' || $size != '' || $align != '' ) {
208
- // Do NOT Set internal defaults here, they may be set before the call
209
 
210
  // Interprete function args
211
- // if ( $type == 'album' ) {
212
- // }
213
  if ( $type == 'cover' ) {
214
  wppa( 'is_cover', true );
215
  }
@@ -310,6 +305,7 @@ global $wppa_current_shortcode_atts;
310
  wppa_reset_occurrance();
311
  return $out . $tim;
312
  }
 
313
  if ( wppa( 'is_admins_choice' ) ) {
314
  $args = wppa( 'admins_choice_users' );
315
  wppa_admins_choice_box( $args );
@@ -317,6 +313,7 @@ global $wppa_current_shortcode_atts;
317
  wppa_reset_occurrance();
318
  return $out;
319
  }
 
320
  if ( wppa( 'bestof' ) ) {
321
  $args = wppa( 'bestof_args' );
322
  wppa_bestof_box( $args );
@@ -366,7 +363,7 @@ global $wppa_current_shortcode_atts;
366
  if ( substr( wppa( 'start_album' ), 0, 1 ) == '#' ) { // Keyword
367
  $keyword = wppa( 'start_album' );
368
  if ( strpos( $keyword, ',' ) ) $keyword = substr( $keyword, 0, strpos( $keyword, ',' ) );
369
- switch ( $keyword ) { // ( substr( wppa( 'start_album'], 0, 5 ) ) {
370
  case '#last': // Last upload
371
  $id = wppa_get_youngest_album_id();
372
  if ( wppa( 'is_cover' ) ) { // To make sure the ordering sequence is ok.
@@ -648,13 +645,8 @@ global $wppa_current_shortcode_atts;
648
  }
649
  $id = implode ( '.', $albs );
650
 
651
- // if ( $id ) {
652
- // wppa( 'start_album', $id );
653
- // }
654
  if ( ! $id ) {
655
  $id = '-9'; // Force nothing found
656
- // wppa_reset_occurrance();
657
- // return; // No children found
658
  }
659
  }
660
  wppa( 'is_owner', $owner );
@@ -847,13 +839,11 @@ global $wppa_current_shortcode_atts;
847
  $wppa_session['search_root'] = strval( intval( $_REQUEST['wppa-forceroot'] ) );
848
  wppa( 'is_rootsearch', true );
849
  wppa( 'start_album', strval( intval( $_REQUEST['wppa-forceroot'] ) ) );
850
- // wppa_save_session();
851
  }
852
 
853
  // No rootsearch, forget previous root
854
  if ( ! wppa( 'is_rootsearch' ) ) {
855
  $wppa_session['search_root'] = '0';
856
- // wppa_save_session();
857
  }
858
 
859
  wppa_dbg_msg( 'Forceroot='.(isset( $_REQUEST['wppa-forceroot'] )?$_REQUEST['wppa-forceroot']:'none').', is_rootsearch='.wppa('is_rootsearch').', start_album='.wppa('start_album'), 'red');
@@ -869,8 +859,6 @@ global $wppa_current_shortcode_atts;
869
 
870
  // Update session with new searchroot
871
  $wppa_session['search_root'] = wppa( 'start_album' );
872
- // wppa_save_session();
873
-
874
  }
875
 
876
  // Update searchroot in search boxes
@@ -882,7 +870,6 @@ global $wppa_current_shortcode_atts;
882
  if ( ! wppa( 'src' ) ) {
883
  $wppa_session['use_searchstring'] = '';
884
  $wppa_session['display_searchstring'] = '';
885
- // wppa_save_session();
886
  wppa_add( 'src_script', 'jQuery(document).ready(function(){wppaClearSubsearch()});' );
887
  }
888
  else { // Enable subbox
@@ -1090,7 +1077,7 @@ global $wppa_session;
1090
  if ( wppa( 'is_lasten' ) ) return false;
1091
  if ( wppa( 'is_comten' ) ) return false;
1092
  if ( wppa( 'is_featen' ) ) return false;
1093
- if ( wppa( 'is_tag' ) ) return false;
1094
  if ( wppa( 'photos_only' ) ) return false;
1095
 
1096
  if ( wppa( 'src' ) && wppa_switch( 'photos_only' ) ) return false;
@@ -1215,7 +1202,7 @@ global $wppa_session;
1215
 
1216
  // Check maximum
1217
  if ( is_array( $albums ) && count( $albums ) > wppa_opt( 'max_search_albums' ) && wppa_opt( 'max_search_albums' ) != '0' ) {
1218
- $alert_text = sprintf( __( 'There are %s albums found. Only the first %s will be shown. Please refine your search criteria.' , 'wp-photo-album-plus'),
1219
  count( $albums ),
1220
  wppa_opt( 'max_search_albums' )
1221
  );
@@ -2596,9 +2583,13 @@ static $user;
2596
  $wait_text = '';
2597
  }
2598
 
2599
-
2600
  // Find comments
2601
- $comment = ( wppa_is_item_displayable( $alb, 'comments', 'show_comments' ) && ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) ? wppa_comment_html( $id, $comment_allowed ) : 'void';
 
 
 
 
 
2602
 
2603
  // Get the callback url.
2604
  if ( wppa_switch( 'rating_on' ) ) {
@@ -2734,27 +2725,27 @@ static $user;
2734
  if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
2735
  if ( wppa_may_user_fe_edit( $id ) && wppa_opt( 'upload_edit' ) != '-none-' ) {
2736
  $editlink = '
2737
- <input' .
2738
- ' type="button"' .
2739
- ' style="float:right;margin-right:6px;cursor:pointer;"' .
2740
- ' onclick="wppaStopShow( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').' );"' .
2741
- ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
2742
- ' /><span></span>';
2743
  }
2744
  if ( wppa_may_user_fe_delete( $id ) && $thumb['album'] > 0 ) {
2745
  $dellink = '
2746
- <input' .
2747
- ' id="wppa-delete-' . wppa_encrypt_photo($thumb['id']) . '"' .
2748
- ' class="wppa-delete-button" ' .
2749
- ' type="button"' .
2750
- ' style="float:right; margin-right:6px;cursor:pointer;"' .
2751
- ' onclick="' .
2752
- 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2753
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo?' , 'wp-photo-album-plus') . '" ) ) ' .
2754
- 'wppaAjaxRemovePhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', true );' ) .
2755
- '"' .
2756
- ' value="' . __( 'Delete' , 'wp-photo-album-plus' ) . '"' .
2757
- ' />';
2758
  }
2759
  $choice = wppa_opt( 'admins_choice' );
2760
  if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) != 'album' ) {
@@ -2762,50 +2753,47 @@ static $user;
2762
  ( is_user_logged_in() && $choice == 'login' ) ) {
2763
 
2764
  if ( wppa_is_photo_in_zip( $thumb['id'] ) ) {
2765
- $choicelink =
2766
- '<input' .
2767
- ' id="admin-choice-rem-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
2768
- ' type="button"' .
2769
- ' style="float:right;margin-right:6px;text-decoration:line-through;cursor:pointer;"' .
2770
- ' onclick="' .
2771
- 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2772
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo from your zipfile?' , 'wp-photo-album-plus') . '" ) ) ' .
2773
- 'wppaAjaxRemovePhotoFromZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
2774
-
2775
- ' value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"' .
2776
- ' />';
2777
 
2778
  }
2779
  else {
2780
- $choicelink =
2781
- '<input' .
2782
- ' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
2783
- ' type="button"' .
2784
- ' style="float:right;margin-right:6px;cursor:pointer;"' .
2785
- ' onclick="' .
2786
- 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2787
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your selection?' , 'wp-photo-album-plus') . '" ) ) ' .
2788
- 'wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
2789
-
2790
- ' value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"' .
2791
- ' />';
2792
 
2793
  }
2794
  }
2795
  }
2796
  if ( wppa_switch( 'request_info' ) && is_user_logged_in() ) {
2797
- $infolink =
2798
- '<input' .
2799
- ' id="request-info-' . wppa_encrypt_photo( $id ) . '-' . wppa( 'mocc' ) . '"' .
2800
- ' type="button"' .
2801
- ' style="float:right;margin-right:6px;cursor:pointer;"' .
2802
- ' onclick="' .
2803
- 'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2804
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to ask for info on this photo?' , 'wp-photo-album-plus') . '" ) ) ' .
2805
- 'wppaAjaxRequestInfo( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo( $id ).'\'').', false ); return false;' ).'"' .
2806
-
2807
- ' value="' . esc_attr( __( 'Request info', 'wp-photo-album-plus' ) ) . '"' .
2808
- ' />';
2809
  }
2810
  if ( wppa_opt( 'art_monkey_link' ) == 'new' &&
2811
  is_user_logged_in() &&
@@ -2818,18 +2806,18 @@ static $user;
2818
  $url = ( wppa_switch( 'artmonkey_use_source' ) || wppa_is_pdf( $id ) ?
2819
  wppa_get_hires_url( $id ) :
2820
  wppa_get_photo_url( $id ) );
2821
- $downloadlink =
2822
- '<a' .
2823
- ' href="' . esc_attr( $url ) . '"' .
2824
- ' download="' . esc_attr( wppa_get_photo_item( $id, 'filename' ) ) . '"' .
2825
- ' >' .
2826
- '<input' .
2827
- ' type="button"' .
2828
- ' class="wppa-download"' .
2829
- ' style="float:right;margin-right:6px;cursor:pointer;"' .
2830
- ' value="' . esc_attr( __( 'Download', 'wp-photo-album-plus' ) ) . '"' .
2831
- ' />' .
2832
- '</a>';
2833
  }
2834
  }
2835
  if ( $editlink || $dellink || $choicelink || $infolink || $downloadlink ) {
@@ -2894,21 +2882,17 @@ static $user;
2894
  $result .= $desc."','";
2895
  $result .= wppa_encrypt_photo( $id )."','";
2896
  $result .= $id."','";
2897
- //wppa_dbg_msg('id='.$id, 'red');
2898
  $result .= $avgrat."','";
2899
  $result .= $distext."','";
2900
  $result .= $myrat."','";
2901
  $result .= $url."','";
2902
- //wppa_dbg_msg('url='.$url, 'red');
2903
  $result .= $linkurl."','".$linktitle."','".$linktarget."','";
2904
- //wppa_dbg_msg('linkurl='.$linkurl, 'red');
2905
  $result .= wppa( 'in_widget_timeout' )."','";
2906
  $result .= $comment."','";
2907
  $result .= $iptc."','";
2908
  $result .= $exif."','";
2909
  $result .= $lbtitle."','";
2910
  $result .= $shareurl."','"; // Used for history.pushstate()
2911
- //wppa_dbg_msg('shareurl='.$shareurl, 'red');
2912
  $result .= $sharehtml."','"; // The content of the SM ( share ) box
2913
  $result .= $ogdsc."','";
2914
  $result .= $hiresurl."','";
@@ -2919,12 +2903,9 @@ static $user;
2919
  $result .= $poster_url."','";
2920
  $result .= $filename."'";
2921
 
2922
- // This is an ingenious line of code that is going to prevent us from very much trouble.
2923
- // Created by OpaJaap on Jan 15 2012, 14:36 local time. Thanx.
2924
- // Make sure there are no linebreaks in the result that would screw up Javascript.
2925
- return str_replace( array( "\r\n", "\n", "\r" ), " ", $result );
2926
 
2927
- // return $result;
2928
  }
2929
 
2930
  function wppa_get_distext( $discount, $myrat ) {
@@ -3007,11 +2988,6 @@ global $wppa_done;
3007
 
3008
  if ( wppa_get_user() != wppa_get_photo_item( $photo, 'owner' ) ) {
3009
 
3010
- // $iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating
3011
- // WHERE photo = %d
3012
- // AND user = %s",
3013
- // $photo, wppa_get_user( 'display' ) ) );
3014
-
3015
  $bret = wppa_has_user_rated( $photo );
3016
  if ( $bret ) {
3017
  $status = 'approved';
@@ -3066,7 +3042,7 @@ global $wppa_done;
3066
 
3067
  $iret = $wpdb->query( $old_entry );
3068
  if ( $iret ) {
3069
- if ( wppa( 'debug' ) ) echo( '<script type="text/javascript" >alert( "Duplicate comment ignored" )</script>' );
3070
  return;
3071
  }
3072
  $key = wppa_create_comments_entry( array( 'photo' => $photo, 'user' => $user, 'email' => $email, 'comment' => $save_comment, 'status' => $status ) );
@@ -3094,23 +3070,26 @@ global $wppa_done;
3094
  if ( $iret !== false ) {
3095
  if ( $status == 'spam' ) {
3096
  if ( $wrong_captcha ) {
3097
- echo
3098
- '<script type="text/javascript" >' .
3099
- 'alert( "'.__( 'Sorry, you gave a wrong answer.\n\nPlease try again to solve the computation.' , 'wp-photo-album-plus').'" )' .
3100
- '</script>';
3101
  }
3102
  else {
3103
- echo
3104
- '<script type="text/javascript" >' .
3105
- 'alert( "'.__( 'Sorry, your comment is not accepted.' , 'wp-photo-album-plus').'" )' .
3106
- '</script>';
3107
  }
3108
  }
3109
  else {
3110
 
3111
  if ( $cedit ) {
3112
  if ( wppa_switch( 'commentnotify_added' ) ) {
3113
- echo( '<script id="cme" type="text/javascript">alert( "'.__( 'Comment updated' , 'wp-photo-album-plus').'" );jQuery( "#cme" ).html( "" );</script>' );
 
 
 
3114
  }
3115
  }
3116
  else {
@@ -3121,7 +3100,7 @@ global $wppa_done;
3121
  if ( $photo_owner != wppa_get_user() ) {
3122
 
3123
  wppa_add_credit_points( wppa_opt( 'cp_points_comment' ),
3124
- __( 'Photo comment' , 'wp-photo-album-plus'),
3125
  $photo
3126
  );
3127
  }
@@ -3129,7 +3108,7 @@ global $wppa_done;
3129
  // Add points to the owner, if no moderation
3130
  if ( $status == 'approved' ) {
3131
  wppa_add_credit_points( wppa_opt( 'cp_points_comment_appr' ),
3132
- __( 'Photo comment approved' , 'wp-photo-album-plus'),
3133
  $photo,
3134
  '',
3135
  $photo_owner
@@ -3145,17 +3124,18 @@ global $wppa_done;
3145
  }
3146
 
3147
  // Process any pending votes of this user for this photo if rating needs comment, do it anyway, feature may have been on but now off
3148
- // if ( wppa_switch( 'vote_needs_comment' ) ) {
3149
- $iret = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_rating
3150
- SET status = 'publish'
3151
- WHERE photo = %d AND user = %s", $id, wppa_get_user( 'display' ) ) );
3152
 
3153
- if ( $iret ) wppa_rate_photo( $id ); // Recalc ratings for this photo
3154
- // }
3155
 
3156
  // Notify user
3157
  if ( wppa_switch( 'commentnotify_added' ) ) {
3158
- echo( '<script id="cme" type="text/javascript">alert( "'.__( 'Comment added' , 'wp-photo-album-plus').'" );jQuery( "#cme" ).html( "" );</script>' );
 
 
 
3159
  }
3160
  }
3161
  }
@@ -3167,7 +3147,10 @@ global $wppa_done;
3167
  wppa_clear_cache();
3168
  }
3169
  else {
3170
- echo( '<script type="text/javascript" >alert( "'.__( 'Could not process comment.\nProbably timed out.' , 'wp-photo-album-plus').'" )</script>' );
 
 
 
3171
  }
3172
  }
3173
  else { // Empty comment
@@ -3265,16 +3248,6 @@ global $wpdb;
3265
 
3266
  $x = wppa_get_imagex( $id, 'thumb' );
3267
  $y = wppa_get_imagey( $id, 'thumb' );
3268
- /*
3269
- if ( wppa_is_video( $id ) ) {
3270
- $x = wppa_get_videox( $id );
3271
- $y = wppa_get_videoy( $id );
3272
- }
3273
- else {
3274
- $x = wppa_get_thumbx( $id );
3275
- $y = wppa_get_thumby( $id );
3276
- }
3277
- */
3278
 
3279
  if ( $x > $y ) {
3280
  $w = wppa_opt( 'popupsize' );
@@ -3304,7 +3277,7 @@ global $wpdb;
3304
  'height' => $h
3305
  );
3306
  if ( wppa_opt( 'thumb_linktype' ) == 'fullpopup' ) {
3307
- $video_args['events'] = 'onclick="alert( \''.esc_attr( __( 'A video can not be printed or downloaded' , 'wp-photo-album-plus') ).'\' );"';
3308
  }
3309
  $videohtml = wppa_get_video_html( $video_args );
3310
  }
@@ -3695,6 +3668,11 @@ global $blog_id;
3695
  // Need no container in RSS feeds
3696
  if ( is_feed() ) return;
3697
 
 
 
 
 
 
3698
  // Open request?
3699
  if ( $action == 'open' ) {
3700
 
@@ -3704,30 +3682,28 @@ global $blog_id;
3704
  if ( ! defined( 'DOING_WPPA_AJAX' ) ) {
3705
 
3706
  // A modal container
3707
- wppa_out( '<div' .
3708
- ' id="wppa-modal-container-'.wppa( 'mocc' ).'"' .
3709
- ' style="position:relative;z-index:100000;"' .
3710
- ' data-wppa="yes"' .
3711
- ' >' .
3712
- '</div>'
 
3713
  );
3714
 
3715
  // If static maximum in responsive theme, add wrapper
3716
  wppa_container_wrapper( 'open' );
3717
 
3718
- wppa_out( '<div' .
3719
- ' id="wppa-container-'.wppa( 'mocc' ).'"' .
3720
- ' style="width:100%;"' .
3721
- ' class="' .
3722
- 'wppa-container' . ' ' .
3723
- 'wppa-container-' . wppa( 'mocc' ) . ' ' .
3724
- 'wppa-rev-' . wppa( 'revno' ) . ' ' .
3725
- 'wppa-prevrev-' . wppa_opt( 'prevrev' ) . ' ' .
3726
- 'wppa-theme-' . $wppa_version . ' ' .
3727
- 'wppa-api-' . wppa( 'api_version' ) .
3728
- '"' .
3729
- ' >'
3730
- );
3731
  }
3732
 
3733
  // Spinner for Ajax
@@ -3748,7 +3724,7 @@ global $blog_id;
3748
 
3749
  /* Check if wppa.js and jQuery are present */
3750
  if ( ! $wppa_err_displayed && ( WPPA_DEBUG || wppa_get_get( 'debug' ) || WP_DEBUG ) && ! wppa_switch( 'defer_javascript' ) ) {
3751
- wppa_out( '<script type="text/javascript" >/* <![CDATA[ */' );
3752
  wppa_out( "if ( typeof( _wppaSlides ) == 'undefined' ) " .
3753
  "alert( 'There is a problem with your theme. The file wppa.js is not loaded when it is expected ( Errloc = wppa_container ).' );" );
3754
  wppa_out( "if ( typeof( jQuery ) == 'undefined' ) " .
@@ -3759,7 +3735,7 @@ global $blog_id;
3759
 
3760
  /* Check if init is properly done */
3761
  if ( ! wppa_opt( 'fullsize' ) ) {
3762
- wppa_out( '<script type="text/javascript" >/* <![CDATA[ */' );
3763
  wppa_out( "alert( 'The initialisation of wppa+ is not complete yet. " .
3764
  "You will probably see division by zero errors. " .
3765
  "Please run Photo Albums -> Settings admin page Table VIII-A1. ( Errloc = wppa_container ).' );" );
@@ -3774,7 +3750,7 @@ global $blog_id;
3774
  if ( $ok ) {
3775
  wppa_dbg_msg( 'Rating nonce ok' );
3776
  }
3777
- else die( '<b>' . __( 'ERROR: Illegal attempt to enter a rating.' , 'wp-photo-album-plus') . '</b>' );
3778
  }
3779
  }
3780
 
@@ -3786,11 +3762,11 @@ global $blog_id;
3786
  if ( $ok ) {
3787
  wppa_dbg_msg( 'Comment nonce ok' );
3788
  }
3789
- else die( '<b>' . __( 'ERROR: Illegal attempt to enter a comment.' , 'wp-photo-album-plus') . '</b>' );
3790
  }
3791
  }
3792
 
3793
- wppa_out( wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false ) );
3794
 
3795
  if ( wppa_page( 'oneofone' ) ) wppa( 'portrait_only', true );
3796
 
@@ -4049,7 +4025,7 @@ global $cover_count_key;
4049
  if ( $nice ) {
4050
  wppa_out(
4051
  '<div style="clear:both;" ></div>' .
4052
- '<script type="text/javascript" >' .
4053
  'jQuery(document).ready(function(){' .
4054
  'jQuery(".albumlist").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});' .
4055
  '});' .
@@ -4136,8 +4112,6 @@ function wppa_popup() {
4136
  function wppa_run_slidecontainer( $type = '' ) {
4137
  global $thumbs;
4138
 
4139
- // if ( wppa( 'is_filmonly' ) ) return;
4140
-
4141
  $c = is_array( $thumbs ) ? count( $thumbs ) : '0';
4142
  wppa_dbg_msg( 'Running slidecontainer type '.$type.' with '.$c.' elements in thumbs, is_single=' . wppa( 'is_single' ) );
4143
 
@@ -4147,16 +4121,16 @@ global $thumbs;
4147
  $width = $style_a['width'];
4148
  $height = $style_a['height'];
4149
  $imgalt = wppa_get_imgalt( wppa( 'start_photo' ) );
4150
- wppa_out( '<a href="' . get_permalink() . '">' .
4151
- '<img' .
4152
- ' src="' . wppa_get_photo_url( wppa( 'start_photo' ), '', $width, $height ) . '"' .
4153
- ' style="' . $style . '"' .
4154
- ' width="' . $width . '"' .
4155
- ' height="' . $height . '" ' .
4156
- $imgalt .
4157
- ' />' .
4158
- '</a>'
4159
- );
4160
  return;
4161
  }
4162
  elseif ( $type == 'slideshow' ) {
@@ -4204,7 +4178,6 @@ global $thumbs;
4204
  }
4205
  }
4206
 
4207
-
4208
  // How to start if slideonly
4209
  if ( wppa( 'is_slideonly' ) ) {
4210
  if ( wppa_switch( 'start_slideonly' ) ) {
@@ -4237,13 +4210,12 @@ global $thumbs;
4237
 
4238
  // Start command with appropriate $startindex: -2 = at norate, -1 run from first, >=0 still at index
4239
  wppa_js( 'jQuery(document).ready( function() { setTimeout( function(){wppaStartStop( '.wppa( 'mocc' ).', '.$startindex.' );},2) } );' );
4240
-
4241
  }
4242
  else {
4243
- wppa_out( '<span style="color:red;">' .
4244
- 'Error, wppa_run_slidecontainer() called with wrong argument: ' . $type . '. Possible values: \'single\' or \'slideshow\'' .
4245
- '</span>'
4246
- );
4247
  }
4248
  }
4249
 
@@ -4271,7 +4243,7 @@ function wppa_get_preambule() {
4271
 
4272
  function wppa_dummy_bar( $msg = '' ) {
4273
 
4274
- wppa_out( '<div style="margin:4px 0; text-align:center;">'.$msg.'</div>' );
4275
  }
4276
 
4277
  function wppa_rating_count_by_id( $id = '' ) {
@@ -4485,7 +4457,7 @@ function wppa_smx_photo( $stype ) {
4485
 
4486
  // Photo known?
4487
  if ( ! $id ) {
4488
- wppa_log( 'Err', 'Unknown photo id in wppa_smx_photo()', true );
4489
  return;
4490
  }
4491
 
@@ -4520,7 +4492,7 @@ function wppa_smx_photo( $stype ) {
4520
  wppa_out( '
4521
  <div
4522
  id="wppa-container-' . wppa( 'mocc' ) . '"
4523
- style="width:100%;
4524
  class="' . ( wppa( 'align' ) ? 'align' . wppa( 'align' ) : '' ) . '
4525
  wppa-' . $stype . 'photo wppa-' . $stype . 'photo-' . wppa( 'mocc' ) .
4526
  ( $stype == 'm' || $stype == 'x' ? ' wp-caption' : '' ) . '"
@@ -4710,12 +4682,6 @@ global $allphotos;
4710
  }
4711
 
4712
  $name = wppa_sanitize_album_photo_name( $xname );
4713
- /*
4714
- $name = wppa_decode_uri_component( $xname );
4715
- $name = str_replace( '\'', '%', $name ); // A trick for single quotes
4716
- $name = str_replace( '"', '%', $name ); // A trick for double quotes
4717
- $name = stripslashes( $name );
4718
- */
4719
 
4720
  if ( wppa_is_int( $album ) ) {
4721
  $alb = $album;
@@ -4738,10 +4704,10 @@ global $allphotos;
4738
  }
4739
 
4740
  if ( $pid ) {
4741
- wppa_dbg_msg( 'Pid '.$pid.' found for '.$name );
4742
  }
4743
  else {
4744
- wppa_dbg_msg( 'No pid found for '.$name );
4745
  }
4746
  return $pid;
4747
  }
@@ -4758,12 +4724,6 @@ global $allalbums;
4758
  }
4759
 
4760
  $name = wppa_sanitize_album_photo_name( $xname );
4761
- /*
4762
- $name = wppa_decode_uri_component( $xname );
4763
- $name = str_replace( '\'', '%', $name ); // A trick for single quotes
4764
- $name = str_replace( '"', '%', $name ); // A trick for double quotes
4765
- $name = stripslashes( $name );
4766
- */
4767
 
4768
  $query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_albums WHERE sname = %s", $name );
4769
  $albs = $wpdb->get_results( $query, ARRAY_A );
@@ -4812,10 +4772,10 @@ global $allalbums;
4812
  }
4813
 
4814
  if ( $aid ) {
4815
- wppa_dbg_msg( 'Aid '.$aid.' found for '.$name );
4816
  }
4817
  else {
4818
- wppa_dbg_msg( 'No aid found for '.$name );
4819
  }
4820
  return $aid;
4821
  }
@@ -4856,7 +4816,7 @@ global $wppa_upload_succes_id;
4856
  $albumname = __('New Album', 'wp-photo-album-plus');
4857
  }
4858
  $ok = wp_verify_nonce( $nonce, 'wppa-album-check' );
4859
- if ( ! $ok ) die( '<b>' . __( 'ERROR: Illegal attempt to create an album.' , 'wp-photo-album-plus') . '</b>' );
4860
 
4861
  // Check captcha
4862
  if ( wppa_switch( 'user_create_captcha' ) ) {
@@ -4864,7 +4824,7 @@ global $wppa_upload_succes_id;
4864
  $captkey = wppa_get_randseed( 'session' );
4865
 
4866
  if ( ! wppa_check_captcha( $captkey ) ) {
4867
- wppa_alert( __( 'Wrong captcha, please try again' , 'wp-photo-album-plus') );
4868
  return;
4869
  }
4870
  }
@@ -4880,41 +4840,14 @@ global $wppa_upload_succes_id;
4880
  ) );
4881
  if ( $album ) {
4882
  if ( wppa_opt( 'fe_alert' ) == 'upcre' || wppa_opt( 'fe_alert' ) == 'all' ) {
4883
- wppa_alert( sprintf( __( 'Album #%s created' , 'wp-photo-album-plus'), $album ) );
4884
  }
4885
  wppa_invalidate_treecounts( $parent );
4886
  wppa_verify_treecounts_a( $parent );
4887
  wppa_create_pl_htaccess();
4888
-
4889
- /*
4890
- if ( wppa_opt( 'fe_create_ntfy' ) ) {
4891
- $users = explode( ',', wppa_opt( 'fe_create_ntfy' ) );
4892
- if ( ! empty( $users ) ) foreach( $users as $usr ) {
4893
- $user = wppa_get_user_by( 'login', trim( $usr ) );
4894
- if ( ! empty( $user ) ) {
4895
- $cont = array();
4896
- $cont[] = sprintf( __( 'User %s created album #%s with name %s.' ), '<b>' . wppa_get_user() . '</b>', $album, '<b>' . $albumname . '</b>' );
4897
- $cont[] = '<b>' .
4898
- __( 'Description:' ) .
4899
- '</b>' .
4900
- '<br/><br/>' .
4901
- '<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius: 4px;" >' .
4902
- '<em>' .
4903
- strip_tags( wppa_get_post( 'wppa-album-desc' ) ) .
4904
- '</em>' .
4905
- '</blockquote>';
4906
- if ( $parent > '0' ) {
4907
- $cont[] = sprintf( __('The new album is a subalbum of album %s', 'wp-photo-album-plus'), '<b>' . wppa_get_album_name( $parent ) . '</b>' );
4908
- }
4909
- $cont[] = __('You are receiving this email because you are assigned to monitor new album creations.', 'wp-photo-album-plus');
4910
- w ppa_send_mail( $user->user_email, __( 'New useralbum created', 'wp-photo-album-plus'), $cont );
4911
- }
4912
- }
4913
- }
4914
- */
4915
  }
4916
  else {
4917
- wppa_alert( __( 'Could not create album' , 'wp-photo-album-plus') );
4918
  }
4919
  }
4920
  }
@@ -4927,7 +4860,7 @@ global $wppa_upload_succes_id;
4927
  $nonce = wppa_get_post( 'nonce' );
4928
  $ok = wp_verify_nonce( $nonce, 'wppa-check' );
4929
  if ( ! $ok ) {
4930
- die( '<b>' . __( 'ERROR: Illegal attempt to upload a file.' , 'wp-photo-album-plus') . '</b>');
4931
  }
4932
 
4933
  $alb = wppa_get_post( 'wppa-upload-album' );
@@ -5030,7 +4963,6 @@ global $wppa_upload_succes_id;
5030
  }
5031
  $upload_message .= $m;
5032
 
5033
-
5034
  // ADD POINTS
5035
  $points = wppa_opt( 'cp_points_upload' ) * $done;
5036
  $bret = wppa_add_credit_points( $points, __( 'Photo upload' ,'wp-photo-album-plus' ) );
@@ -5092,7 +5024,7 @@ global $wppa_upload_succes_id;
5092
 
5093
  // Redirect to blogpost
5094
  if ( $blogged ) {
5095
- wppa_out( '<script type="text/javascript" >setTimeout( function() { document.location.href=\'' . get_permalink( $post_id ) . '\'; }, 2000 )</script>' );
5096
  }
5097
  }
5098
  }
@@ -5165,13 +5097,13 @@ global $wppa_alert;
5165
 
5166
  // Legal here?
5167
  if ( ! wppa_allow_uploads( $alb ) || ! wppa_allow_user_uploads( $alb ) ) {
5168
- $wppa_alert .= esc_js( __( 'Max uploads reached' , 'wp-photo-album-plus') ) . '.';
5169
  return false;
5170
  }
5171
 
5172
  // No error during upload?
5173
  if ( $file['error'] != '0' ) {
5174
- $wppa_alert .= esc_js( __( 'Error during upload' , 'wp-photo-album-plus') ) . '.';
5175
  return false;
5176
  }
5177
 
@@ -5280,7 +5212,6 @@ global $wppa_alert;
5280
 
5281
  // Done!
5282
  return $id;
5283
-
5284
  }
5285
 
5286
  // If not already an existing audio / video; Forget the id from a previously found item with the same filename.
@@ -5291,13 +5222,13 @@ global $wppa_alert;
5291
  // Is it an image?
5292
  $imgsize = getimagesize( $file['tmp_name'] );
5293
  if ( ! is_array( $imgsize ) ) {
5294
- $wppa_alert .= esc_js( __( 'Uploaded file is not an image' , 'wp-photo-album-plus') ) . '.';
5295
  return false;
5296
  }
5297
 
5298
  // Is it a supported image filetype?
5299
  if ( $imgsize[2] != IMAGETYPE_GIF && $imgsize[2] != IMAGETYPE_JPEG && $imgsize[2] != IMAGETYPE_PNG ) {
5300
- $wppa_alert .= esc_js( sprintf( __( 'Only gif, jpg and png image files are supported. Returned info = %s.' , 'wp-photo-album-plus'), serialize( $imgsize ) ), false, false );
5301
  return false;
5302
  }
5303
 
@@ -5305,7 +5236,7 @@ global $wppa_alert;
5305
  $ms = wppa_opt( 'upload_frontend_minsize' );
5306
  if ( $ms ) { // Min size configured
5307
  if ( $imgsize[0] < $ms && $imgsize[1] < $ms ) {
5308
- $wppa_alert .= esc_js( sprintf( __( 'Uploaded file is smaller than the allowed minimum of %d pixels.' , 'wp-photo-album-plus' ), $ms ) );
5309
  return false;
5310
  }
5311
  }
@@ -5314,7 +5245,7 @@ global $wppa_alert;
5314
  $ms = wppa_opt( 'upload_frontend_maxsize' );
5315
  if ( $ms ) { // Max size configured
5316
  if ( $imgsize[0] > $ms || $imgsize[1] > $ms ) {
5317
- $wppa_alert .= esc_js( sprintf( __( 'Uploaded file is larger than the allowed maximum of %d pixels.' , 'wp-photo-album-plus' ), $ms ) );
5318
  return false;
5319
  }
5320
  }
@@ -5322,21 +5253,11 @@ global $wppa_alert;
5322
  // Check for already exists
5323
  if ( wppa_switch( 'void_dups' ) ) {
5324
  if ( wppa_is_file_duplicate_photo( wppa_sanitize_file_name( $file['name'] ), $alb ) ) {
5325
- $wppa_alert .= esc_js( sprintf( __( 'Uploaded file %s already exists in this album.' , 'wp-photo-album-plus'), wppa_sanitize_file_name( $file['name'] ) ) );
5326
- return false;
5327
- }
5328
- }
5329
- /*
5330
- // Check for max memory needed to rocess image?
5331
- $mayupload = wppa_check_memory_limit( '', $imgsize[0], $imgsize[1] );
5332
- if ( $mayupload === false ) {
5333
- $maxsize = wppa_check_memory_limit( false );
5334
- if ( is_array( $maxsize ) ) {
5335
- $wppa_alert .= esc_js( sprintf( __( 'The image is too big. Max photo size: %d x %d (%2.1f MegaPixel)' , 'wp-photo-album-plus'), $maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 ) ) );
5336
  return false;
5337
  }
5338
  }
5339
- */
5340
  // Find extension from mimetype
5341
  switch( $imgsize[2] ) { // mime type
5342
  case 1: $ext = 'gif'; break;
@@ -5357,12 +5278,6 @@ global $wppa_alert;
5357
  $name = wppa_sanitize_photo_name( $name );
5358
  $desc = balanceTags( wppa_get_post( 'user-desc' ), true );
5359
 
5360
- /* is now in wppa_create_photo_entry
5361
- if ( ! $desc && wppa_switch( 'apply_newphoto_desc' ) ) {
5362
- $desc = wppa_opt( 'newphoto_description' );
5363
- }
5364
- */
5365
-
5366
  // If BlogIt! and no descrption given, use name field - this is for the shortcode used: typ"mphoto"
5367
  if ( ! $desc && isset( $_POST['wppa-blogit'] ) ) {
5368
  $desc = 'w#name';
@@ -5378,7 +5293,7 @@ global $wppa_alert;
5378
  }
5379
 
5380
  if ( ! $id ) {
5381
- $wppa_alert .= esc_js( __( 'Could not insert photo into db.' , 'wp-photo-album-plus') );
5382
  return false;
5383
  }
5384
  else {
@@ -5618,7 +5533,7 @@ global $wpdb;
5618
 
5619
  $switch = ( $weeks > '0' );
5620
 
5621
- $string = __( 'You can upload after' , 'wp-photo-album-plus').' ';
5622
 
5623
  if ( $weeks || $switch ) {
5624
  $string .= sprintf( _n( '%d week', '%d weeks', $weeks, 'wp-photo-album-plus' ), $weeks ).', ';
@@ -5669,28 +5584,31 @@ function wppa_get_lbtitle( $type, $id ) {
5669
  $result = '';
5670
  if ( $do_download ) {
5671
  if ( wppa_opt( 'art_monkey_display' ) == 'button' ) {
5672
- $result .= '<input' .
5673
- ' type="button"' .
5674
- ' title="' . __( 'Download' , 'wp-photo-album-plus') . '"' .
5675
- ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' .
5676
- ' class="wppa-download-button wppa-ovl-button"' .
5677
- ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo($id) .'\' );"' .
5678
- ' value="' . rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' . $dl_name ) .
5679
- '"' .
5680
- ' />';
5681
  }
5682
  else {
5683
- $result .= '<a' .
5684
- ' title="' . __( 'Download' , 'wp-photo-album-plus') . '"' .
5685
- ' style="cursor:pointer;"' .
5686
- ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($id).'\' );"' .
5687
- ' >' .
5688
- rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' . $dl_name ) .
5689
- '</a>';
 
5690
  }
5691
  }
5692
  else {
5693
- if ( $do_name ) $result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_name' ) ) );
 
 
5694
  }
5695
  if ( $do_name && $do_desc ) $result .= '<br />';
5696
  if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
@@ -5705,24 +5623,24 @@ function wppa_get_lbtitle( $type, $id ) {
5705
  }
5706
  }
5707
 
5708
- if ( $do_sm ) $result .= wppa_get_share_html( $thumb['id'], 'lightbox' );
5709
 
5710
  if ( wppa_may_user_fe_edit( $id ) ) {
 
 
5711
  if ( $type == 'slide' ) {
5712
- $parg = esc_js('\''.wppa_encrypt_photo($id).'\'');
5713
- }
5714
- else {
5715
- $parg = '\''.wppa_encrypt_photo($id).'\'';
5716
  }
 
5717
  if ( wppa_opt( 'upload_edit' ) == 'classic' ) {
5718
  $result .= '
5719
- <input' .
5720
- ' type="button"' .
5721
- ' style="float:right; margin-right:6px;"' .
5722
- ' class="wppa-ovl-button"' .
5723
- ' onclick="' . ( $type == 'slide' ? 'wppaStopShow( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' );"' .
5724
- ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
5725
- ' />';
5726
  }
5727
  }
5728
 
@@ -5736,7 +5654,7 @@ function wppa_zoom_in( $id ) {
5736
 
5737
  if ( wppa_switch( 'show_zoomin' ) ) {
5738
  if ( wppa_opt( 'magnifier' ) ) {
5739
- return __( 'Zoom in' , 'wp-photo-album-plus');
5740
  }
5741
  else {
5742
  return esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
@@ -5788,16 +5706,10 @@ global $wpdb;
5788
  }
5789
 
5790
  // Get comment status according to wp discussion rules
5791
- // Reurns 'approved', 'pending' or 'spam'
5792
  function wppa_check_comment( $user, $email, $comment ) {
5793
  global $wpdb;
5794
 
5795
- // // If manual moderation is enabled, skip all checks and return 'pending'.
5796
- // if ( 1 == wppa_get_option( 'moderatecomment' ) ) {
5797
- // wppa_log( 'Com', 'Comment {i}' . $comment . '{/i} held for moderation (1)' );
5798
- // return 'pending';
5799
- // }
5800
-
5801
  // Some other required data
5802
  $user_ip = $_SERVER["REMOTE_ADDR"];
5803
  $ser_agent = $_SERVER["HTTP_USER_AGENT"];
@@ -5806,22 +5718,11 @@ global $wpdb;
5806
  if ( $max_links = wppa_get_option( 'comment_max_links' ) ) {
5807
  $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
5808
 
5809
- /**
5810
- * Filters the number of links found in a comment.
5811
- *
5812
- * @since 3.0.0
5813
- * @since 4.7.0 Added the $comment parameter.
5814
- *
5815
- * @param int $num_links The number of links found.
5816
- * @param string $url Comment author's URL. Included in allowed links total.
5817
- * @param string $comment Content of the comment.
5818
- */
5819
  $num_links = apply_filters( 'comment_max_links_url', $num_links, '', $comment );
5820
 
5821
- /*
5822
- * If the number of links in the comment exceeds the allowed amount,
5823
- * fail the check by returning false.
5824
- */
5825
  if ( $num_links >= $max_links ) {
5826
  wppa_log( 'Com', 'Comment {i}' . $comment . '{/i} held for moderation due to too many links' );
5827
  return 'pending';
@@ -5841,16 +5742,12 @@ global $wpdb;
5841
  if ( empty( $word ) )
5842
  continue;
5843
 
5844
- /*
5845
- * Do some escaping magic so that '#' (number of) characters in the spam
5846
- * words don't break things:
5847
- */
5848
  $word = preg_quote( $word, '#' );
5849
 
5850
- /*
5851
- * Check the comment fields for moderation keywords. If any are found,
5852
- * fail the check for the given field by returning false.
5853
- */
5854
  $pattern = "#$word#i";
5855
  if ( preg_match( $pattern, $user ) ||
5856
  preg_match( $pattern, $email ) ||
@@ -5876,16 +5773,12 @@ global $wpdb;
5876
  if ( empty( $word ) )
5877
  continue;
5878
 
5879
- /*
5880
- * Do some escaping magic so that '#' (number of) characters in the spam
5881
- * words don't break things:
5882
- */
5883
  $word = preg_quote( $word, '#' );
5884
 
5885
- /*
5886
- * Check the comment fields for moderation keywords. If any are found,
5887
- * fail the check for the given field by returning false.
5888
- */
5889
  $pattern = "#$word#i";
5890
  if ( preg_match( $pattern, $user ) ||
5891
  preg_match( $pattern, $email ) ||
@@ -6026,19 +5919,10 @@ global $wppa_lang;
6026
 
6027
  // Cachefile present?
6028
  if ( wppa_is_file( $cache_file ) ) {
 
 
6029
 
6030
- // Expired?
6031
- if ( wppa( 'cache' ) != 'inf' && wppa_filetime( $cache_file ) < ( time() - 60 * wppa( 'cache' ) ) ) {
6032
- wppa_unlink( $cache_file );
6033
- }
6034
-
6035
- // No, use it
6036
- else {
6037
- $timer = wppa_occur_timer( 'show', $_SERVER['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ), true );
6038
- wppa_log( 'fso', 'Reading cachefile ' . str_replace( WPPA_CONTENT_PATH, '...', $cache_file ) );
6039
-
6040
- $cache_data = wppa_get_contents( $cache_file ) . $timer;
6041
- }
6042
  }
6043
  }
6044
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.0.00.023
7
  *
8
  */
9
 
155
  if ( wppa( 'is_tag' ) ) wppa_dbg_msg( 'Is Tag: ' . wppa( 'is_tag' ) );
156
  else wppa_dbg_msg( 'Is NOT Tag' );
157
  wppa( 'page', wppa_get_get( 'page' ) );
158
+
159
  if ( wppa_get_get( 'superview' ) ) {
160
  $wppa_session['superview'] = wppa( 'is_slide' ) ? 'slide': 'thumbs';
161
  $wppa_session['superalbum'] = wppa( 'start_album' );
162
  wppa( 'photos_only', true );
163
  }
164
  wppa( 'is_upldr', wppa_get_get( 'upldr' ) );
165
+
166
  if ( wppa( 'is_upldr' ) ) wppa( 'photos_only', true );
167
  wppa( 'is_owner', wppa_get_get( 'owner' ) );
168
+
169
  if ( wppa( 'is_owner' ) ) {
170
  $albs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_albums
171
  WHERE owner = %s", wppa( 'is_owner' ) ), ARRAY_A );
179
  }
180
  wppa( 'supersearch', strip_tags( wppa_get_get( 'supersearch' ) ) );
181
  $wppa_session['supersearch'] = wppa( 'supersearch' );
182
+
183
  if ( wppa( 'supersearch' ) ) {
184
  $ss_info = explode( ',', wppa( 'supersearch' ) );
185
  if ( $ss_info['0'] == 'a' ) {
194
  // New style calendar and ajax: set is_calendar
195
  if ( substr( wppa_get_get( 'calendar' ), 0, 4 ) == 'real' ) {
196
  wppa( 'calendar', wppa_get_get( 'calendar' ) );
 
 
197
  wppa( 'is_calendar', true );
198
  }
199
  wppa( 'caldate', strip_tags( wppa_get_get( 'caldate' ) ) );
200
  wppa( 'is_inverse', wppa_get_get( 'inv' ) );
201
 
 
 
 
202
  }
203
 
204
  // 2. wppa_albums is called directly. Assume any arg. If not, no worry, system defaults are used == generic
205
  elseif ( $id != '' || $type != '' || $size != '' || $align != '' ) {
 
206
 
207
  // Interprete function args
 
 
208
  if ( $type == 'cover' ) {
209
  wppa( 'is_cover', true );
210
  }
305
  wppa_reset_occurrance();
306
  return $out . $tim;
307
  }
308
+
309
  if ( wppa( 'is_admins_choice' ) ) {
310
  $args = wppa( 'admins_choice_users' );
311
  wppa_admins_choice_box( $args );
313
  wppa_reset_occurrance();
314
  return $out;
315
  }
316
+
317
  if ( wppa( 'bestof' ) ) {
318
  $args = wppa( 'bestof_args' );
319
  wppa_bestof_box( $args );
363
  if ( substr( wppa( 'start_album' ), 0, 1 ) == '#' ) { // Keyword
364
  $keyword = wppa( 'start_album' );
365
  if ( strpos( $keyword, ',' ) ) $keyword = substr( $keyword, 0, strpos( $keyword, ',' ) );
366
+ switch ( $keyword ) {
367
  case '#last': // Last upload
368
  $id = wppa_get_youngest_album_id();
369
  if ( wppa( 'is_cover' ) ) { // To make sure the ordering sequence is ok.
645
  }
646
  $id = implode ( '.', $albs );
647
 
 
 
 
648
  if ( ! $id ) {
649
  $id = '-9'; // Force nothing found
 
 
650
  }
651
  }
652
  wppa( 'is_owner', $owner );
839
  $wppa_session['search_root'] = strval( intval( $_REQUEST['wppa-forceroot'] ) );
840
  wppa( 'is_rootsearch', true );
841
  wppa( 'start_album', strval( intval( $_REQUEST['wppa-forceroot'] ) ) );
 
842
  }
843
 
844
  // No rootsearch, forget previous root
845
  if ( ! wppa( 'is_rootsearch' ) ) {
846
  $wppa_session['search_root'] = '0';
 
847
  }
848
 
849
  wppa_dbg_msg( 'Forceroot='.(isset( $_REQUEST['wppa-forceroot'] )?$_REQUEST['wppa-forceroot']:'none').', is_rootsearch='.wppa('is_rootsearch').', start_album='.wppa('start_album'), 'red');
859
 
860
  // Update session with new searchroot
861
  $wppa_session['search_root'] = wppa( 'start_album' );
 
 
862
  }
863
 
864
  // Update searchroot in search boxes
870
  if ( ! wppa( 'src' ) ) {
871
  $wppa_session['use_searchstring'] = '';
872
  $wppa_session['display_searchstring'] = '';
 
873
  wppa_add( 'src_script', 'jQuery(document).ready(function(){wppaClearSubsearch()});' );
874
  }
875
  else { // Enable subbox
1077
  if ( wppa( 'is_lasten' ) ) return false;
1078
  if ( wppa( 'is_comten' ) ) return false;
1079
  if ( wppa( 'is_featen' ) ) return false;
1080
+ if ( wppa( 'is_tag' ) ) return false;
1081
  if ( wppa( 'photos_only' ) ) return false;
1082
 
1083
  if ( wppa( 'src' ) && wppa_switch( 'photos_only' ) ) return false;
1202
 
1203
  // Check maximum
1204
  if ( is_array( $albums ) && count( $albums ) > wppa_opt( 'max_search_albums' ) && wppa_opt( 'max_search_albums' ) != '0' ) {
1205
+ $alert_text = sprintf( __( 'There are %s albums found. Only the first %s will be shown. Please refine your search criteria.', 'wp-photo-album-plus'),
1206
  count( $albums ),
1207
  wppa_opt( 'max_search_albums' )
1208
  );
2583
  $wait_text = '';
2584
  }
2585
 
 
2586
  // Find comments
2587
+ if ( wppa_is_item_displayable( $alb, 'comments', 'show_comments' ) && ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
2588
+ $comment = wppa_comment_html( $id, $comment_allowed );
2589
+ }
2590
+ else {
2591
+ $comment = 'void';
2592
+ }
2593
 
2594
  // Get the callback url.
2595
  if ( wppa_switch( 'rating_on' ) ) {
2725
  if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
2726
  if ( wppa_may_user_fe_edit( $id ) && wppa_opt( 'upload_edit' ) != '-none-' ) {
2727
  $editlink = '
2728
+ <input
2729
+ type="button"
2730
+ style="float:right;margin-right:6px;cursor:pointer;"
2731
+ onclick="wppaStopShow( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').' );"
2732
+ value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"
2733
+ /><span></span>';
2734
  }
2735
  if ( wppa_may_user_fe_delete( $id ) && $thumb['album'] > 0 ) {
2736
  $dellink = '
2737
+ <input
2738
+ id="wppa-delete-' . wppa_encrypt_photo($thumb['id']) . '"
2739
+ class="wppa-delete-button"
2740
+ type="button"
2741
+ style="float:right; margin-right:6px;cursor:pointer;"
2742
+ onclick="
2743
+ wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2744
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo?', 'wp-photo-album-plus' ) . '" ) )
2745
+ wppaAjaxRemovePhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', true );' ) .
2746
+ '"
2747
+ value="' . __( 'Delete', 'wp-photo-album-plus' ) . '"
2748
+ />';
2749
  }
2750
  $choice = wppa_opt( 'admins_choice' );
2751
  if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) != 'album' ) {
2753
  ( is_user_logged_in() && $choice == 'login' ) ) {
2754
 
2755
  if ( wppa_is_photo_in_zip( $thumb['id'] ) ) {
2756
+ $choicelink = '
2757
+ <input
2758
+ id="admin-choice-rem-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"
2759
+ type="button"
2760
+ style="float:right;margin-right:6px;text-decoration:line-through;cursor:pointer;"
2761
+ onclick="
2762
+ wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2763
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo from your zipfile?', 'wp-photo-album-plus' ) . '" ) )
2764
+ wppaAjaxRemovePhotoFromZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ) . '"
2765
+ value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"
2766
+ />';
 
2767
 
2768
  }
2769
  else {
2770
+ $choicelink = '
2771
+ <input
2772
+ id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"
2773
+ type="button"
2774
+ style="float:right;margin-right:6px;cursor:pointer;"
2775
+ onclick="
2776
+ wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2777
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your selection?' ,'wp-photo-album-plus' ) . '" ) )
2778
+ wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ) . '"
2779
+ value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"
2780
+ />';
 
2781
 
2782
  }
2783
  }
2784
  }
2785
  if ( wppa_switch( 'request_info' ) && is_user_logged_in() ) {
2786
+ $infolink = '
2787
+ <input
2788
+ id="request-info-' . wppa_encrypt_photo( $id ) . '-' . wppa( 'mocc' ) . '"
2789
+ type="button"
2790
+ style="float:right;margin-right:6px;cursor:pointer;"
2791
+ onclick="
2792
+ wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2793
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to ask for info on this photo?' ,'wp-photo-album-plus' ) . '" ) )
2794
+ wppaAjaxRequestInfo( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo( $id ).'\'').', false ); return false;' ) . '"
2795
+ value="' . esc_attr( __( 'Request info', 'wp-photo-album-plus' ) ) . '"
2796
+ />';
 
2797
  }
2798
  if ( wppa_opt( 'art_monkey_link' ) == 'new' &&
2799
  is_user_logged_in() &&
2806
  $url = ( wppa_switch( 'artmonkey_use_source' ) || wppa_is_pdf( $id ) ?
2807
  wppa_get_hires_url( $id ) :
2808
  wppa_get_photo_url( $id ) );
2809
+ $downloadlink = '
2810
+ <a
2811
+ href="' . esc_attr( $url ) . '"
2812
+ download="' . esc_attr( wppa_get_photo_item( $id, 'filename' ) ) . '"
2813
+ >
2814
+ <input
2815
+ type="button"
2816
+ class="wppa-download"
2817
+ style="float:right;margin-right:6px;cursor:pointer;"
2818
+ value="' . esc_attr( __( 'Download', 'wp-photo-album-plus' ) ) . '"
2819
+ />
2820
+ </a>';
2821
  }
2822
  }
2823
  if ( $editlink || $dellink || $choicelink || $infolink || $downloadlink ) {
2882
  $result .= $desc."','";
2883
  $result .= wppa_encrypt_photo( $id )."','";
2884
  $result .= $id."','";
 
2885
  $result .= $avgrat."','";
2886
  $result .= $distext."','";
2887
  $result .= $myrat."','";
2888
  $result .= $url."','";
 
2889
  $result .= $linkurl."','".$linktitle."','".$linktarget."','";
 
2890
  $result .= wppa( 'in_widget_timeout' )."','";
2891
  $result .= $comment."','";
2892
  $result .= $iptc."','";
2893
  $result .= $exif."','";
2894
  $result .= $lbtitle."','";
2895
  $result .= $shareurl."','"; // Used for history.pushstate()
 
2896
  $result .= $sharehtml."','"; // The content of the SM ( share ) box
2897
  $result .= $ogdsc."','";
2898
  $result .= $hiresurl."','";
2903
  $result .= $poster_url."','";
2904
  $result .= $filename."'";
2905
 
2906
+ // Remove excessive spaces and make sure there are no linebreaks in the result that would screw up Javascript.
2907
+ return wppa_compress_html( $result );
 
 
2908
 
 
2909
  }
2910
 
2911
  function wppa_get_distext( $discount, $myrat ) {
2988
 
2989
  if ( wppa_get_user() != wppa_get_photo_item( $photo, 'owner' ) ) {
2990
 
 
 
 
 
 
2991
  $bret = wppa_has_user_rated( $photo );
2992
  if ( $bret ) {
2993
  $status = 'approved';
3042
 
3043
  $iret = $wpdb->query( $old_entry );
3044
  if ( $iret ) {
3045
+ if ( wppa( 'debug' ) ) echo( '<script>alert( "Duplicate comment ignored" )</script>' );
3046
  return;
3047
  }
3048
  $key = wppa_create_comments_entry( array( 'photo' => $photo, 'user' => $user, 'email' => $email, 'comment' => $save_comment, 'status' => $status ) );
3070
  if ( $iret !== false ) {
3071
  if ( $status == 'spam' ) {
3072
  if ( $wrong_captcha ) {
3073
+ echo '
3074
+ <script>
3075
+ alert( "' . __( 'Sorry, you gave a wrong answer.\n\nPlease try again to solve the computation.', 'wp-photo-album-plus' ) . '" );
3076
+ </script>';
3077
  }
3078
  else {
3079
+ echo '
3080
+ <script>
3081
+ alert( "' . __( 'Sorry, your comment is not accepted.', 'wp-photo-album-plus') . '" );
3082
+ </script>';
3083
  }
3084
  }
3085
  else {
3086
 
3087
  if ( $cedit ) {
3088
  if ( wppa_switch( 'commentnotify_added' ) ) {
3089
+ echo '
3090
+ <script id="cme" >
3091
+ alert( "' . __( 'Comment updated', 'wp-photo-album-plus' ).'" );jQuery( "#cme" ).html( "" );
3092
+ </script>';
3093
  }
3094
  }
3095
  else {
3100
  if ( $photo_owner != wppa_get_user() ) {
3101
 
3102
  wppa_add_credit_points( wppa_opt( 'cp_points_comment' ),
3103
+ __( 'Photo comment', 'wp-photo-album-plus'),
3104
  $photo
3105
  );
3106
  }
3108
  // Add points to the owner, if no moderation
3109
  if ( $status == 'approved' ) {
3110
  wppa_add_credit_points( wppa_opt( 'cp_points_comment_appr' ),
3111
+ __( 'Photo comment approved', 'wp-photo-album-plus'),
3112
  $photo,
3113
  '',
3114
  $photo_owner
3124
  }
3125
 
3126
  // Process any pending votes of this user for this photo if rating needs comment, do it anyway, feature may have been on but now off
3127
+ $iret = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_rating
3128
+ SET status = 'publish'
3129
+ WHERE photo = %d AND user = %s", $id, wppa_get_user( 'display' ) ) );
 
3130
 
3131
+ if ( $iret ) wppa_rate_photo( $id ); // Recalc ratings for this photo
 
3132
 
3133
  // Notify user
3134
  if ( wppa_switch( 'commentnotify_added' ) ) {
3135
+ echo '
3136
+ <script id="cme" >
3137
+ alert( "' . __( 'Comment added', 'wp-photo-album-plus' ) . '" );jQuery( "#cme" ).html( "" );
3138
+ </script>';
3139
  }
3140
  }
3141
  }
3147
  wppa_clear_cache();
3148
  }
3149
  else {
3150
+ echo '
3151
+ <script>
3152
+ alert( "' . __( 'Could not process comment.\nProbably timed out.', 'wp-photo-album-plus' ) . '" )
3153
+ </script>';
3154
  }
3155
  }
3156
  else { // Empty comment
3248
 
3249
  $x = wppa_get_imagex( $id, 'thumb' );
3250
  $y = wppa_get_imagey( $id, 'thumb' );
 
 
 
 
 
 
 
 
 
 
3251
 
3252
  if ( $x > $y ) {
3253
  $w = wppa_opt( 'popupsize' );
3277
  'height' => $h
3278
  );
3279
  if ( wppa_opt( 'thumb_linktype' ) == 'fullpopup' ) {
3280
+ $video_args['events'] = 'onclick="alert( \''.esc_attr( __( 'A video can not be printed or downloaded', 'wp-photo-album-plus') ).'\' );"';
3281
  }
3282
  $videohtml = wppa_get_video_html( $video_args );
3283
  }
3668
  // Need no container in RSS feeds
3669
  if ( is_feed() ) return;
3670
 
3671
+ $mocc = wppa( 'mocc' );
3672
+ $revno = wppa( 'revno' );
3673
+ $prevrev = wppa_opt( 'prevrev' );
3674
+ $api = wppa( 'api_version' );
3675
+
3676
  // Open request?
3677
  if ( $action == 'open' ) {
3678
 
3682
  if ( ! defined( 'DOING_WPPA_AJAX' ) ) {
3683
 
3684
  // A modal container
3685
+ wppa_out( '
3686
+ <div
3687
+ id="wppa-modal-container-' . $mocc . '"
3688
+ style="position:relative;z-index:100000;"
3689
+ data-wppa="yes"
3690
+ >
3691
+ </div>'
3692
  );
3693
 
3694
  // If static maximum in responsive theme, add wrapper
3695
  wppa_container_wrapper( 'open' );
3696
 
3697
+ wppa_out( '
3698
+ <div
3699
+ id="wppa-container-' . $mocc . '"
3700
+ style="width:100%;"
3701
+ class="wppa-container wppa-container-' . $mocc . '
3702
+ wppa-rev-' . $revno . '
3703
+ wppa-prevrev-' . $prevrev . '
3704
+ wppa-theme-' . $wppa_version . '
3705
+ wppa-api-' . $api . '"
3706
+ >' );
 
 
 
3707
  }
3708
 
3709
  // Spinner for Ajax
3724
 
3725
  /* Check if wppa.js and jQuery are present */
3726
  if ( ! $wppa_err_displayed && ( WPPA_DEBUG || wppa_get_get( 'debug' ) || WP_DEBUG ) && ! wppa_switch( 'defer_javascript' ) ) {
3727
+ wppa_out( '<script>/* <![CDATA[ */' );
3728
  wppa_out( "if ( typeof( _wppaSlides ) == 'undefined' ) " .
3729
  "alert( 'There is a problem with your theme. The file wppa.js is not loaded when it is expected ( Errloc = wppa_container ).' );" );
3730
  wppa_out( "if ( typeof( jQuery ) == 'undefined' ) " .
3735
 
3736
  /* Check if init is properly done */
3737
  if ( ! wppa_opt( 'fullsize' ) ) {
3738
+ wppa_out( '<script>/* <![CDATA[ */' );
3739
  wppa_out( "alert( 'The initialisation of wppa+ is not complete yet. " .
3740
  "You will probably see division by zero errors. " .
3741
  "Please run Photo Albums -> Settings admin page Table VIII-A1. ( Errloc = wppa_container ).' );" );
3750
  if ( $ok ) {
3751
  wppa_dbg_msg( 'Rating nonce ok' );
3752
  }
3753
+ else die( '<b>' . __( 'ERROR: Illegal attempt to enter a rating.', 'wp-photo-album-plus') . '</b>' );
3754
  }
3755
  }
3756
 
3762
  if ( $ok ) {
3763
  wppa_dbg_msg( 'Comment nonce ok' );
3764
  }
3765
+ else die( '<b>' . __( 'ERROR: Illegal attempt to enter a comment.', 'wp-photo-album-plus') . '</b>' );
3766
  }
3767
  }
3768
 
3769
+ wppa_out( wppa_nonce_field( 'wppa-check', 'wppa-nonce', false, false ) );
3770
 
3771
  if ( wppa_page( 'oneofone' ) ) wppa( 'portrait_only', true );
3772
 
4025
  if ( $nice ) {
4026
  wppa_out(
4027
  '<div style="clear:both;" ></div>' .
4028
+ '<script>' .
4029
  'jQuery(document).ready(function(){' .
4030
  'jQuery(".albumlist").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});' .
4031
  '});' .
4112
  function wppa_run_slidecontainer( $type = '' ) {
4113
  global $thumbs;
4114
 
 
 
4115
  $c = is_array( $thumbs ) ? count( $thumbs ) : '0';
4116
  wppa_dbg_msg( 'Running slidecontainer type '.$type.' with '.$c.' elements in thumbs, is_single=' . wppa( 'is_single' ) );
4117
 
4121
  $width = $style_a['width'];
4122
  $height = $style_a['height'];
4123
  $imgalt = wppa_get_imgalt( wppa( 'start_photo' ) );
4124
+ wppa_out( '
4125
+ <a href="' . get_permalink() . '" >
4126
+ <img
4127
+ src="' . wppa_get_photo_url( wppa( 'start_photo' ), '', $width, $height ) . '"
4128
+ style="' . $style . '"
4129
+ width="' . $width . '"
4130
+ height="' . $height . '" ' .
4131
+ $imgalt . '
4132
+ >
4133
+ </a>' );
4134
  return;
4135
  }
4136
  elseif ( $type == 'slideshow' ) {
4178
  }
4179
  }
4180
 
 
4181
  // How to start if slideonly
4182
  if ( wppa( 'is_slideonly' ) ) {
4183
  if ( wppa_switch( 'start_slideonly' ) ) {
4210
 
4211
  // Start command with appropriate $startindex: -2 = at norate, -1 run from first, >=0 still at index
4212
  wppa_js( 'jQuery(document).ready( function() { setTimeout( function(){wppaStartStop( '.wppa( 'mocc' ).', '.$startindex.' );},2) } );' );
 
4213
  }
4214
  else {
4215
+ wppa_out( '
4216
+ <span style="color:red;">
4217
+ Error, wppa_run_slidecontainer() called with wrong argument: ' . $type . '. Possible values: \'single\' or \'slideshow\'
4218
+ </span>' );
4219
  }
4220
  }
4221
 
4243
 
4244
  function wppa_dummy_bar( $msg = '' ) {
4245
 
4246
+ wppa_out( '<div style="margin:4px 0; text-align:center;">' . $msg . '</div>' );
4247
  }
4248
 
4249
  function wppa_rating_count_by_id( $id = '' ) {
4457
 
4458
  // Photo known?
4459
  if ( ! $id ) {
4460
+ wppa_log( 'Err', 'Unknown photo id in wppa_smx_photo(), type = ' . $stype, true );
4461
  return;
4462
  }
4463
 
4492
  wppa_out( '
4493
  <div
4494
  id="wppa-container-' . wppa( 'mocc' ) . '"
4495
+ style="width:100%;"
4496
  class="' . ( wppa( 'align' ) ? 'align' . wppa( 'align' ) : '' ) . '
4497
  wppa-' . $stype . 'photo wppa-' . $stype . 'photo-' . wppa( 'mocc' ) .
4498
  ( $stype == 'm' || $stype == 'x' ? ' wp-caption' : '' ) . '"
4682
  }
4683
 
4684
  $name = wppa_sanitize_album_photo_name( $xname );
 
 
 
 
 
 
4685
 
4686
  if ( wppa_is_int( $album ) ) {
4687
  $alb = $album;
4704
  }
4705
 
4706
  if ( $pid ) {
4707
+ wppa_dbg_msg( 'Pid ' . $pid . ' found for ' . $name );
4708
  }
4709
  else {
4710
+ wppa_dbg_msg( 'No pid found for ' . $name );
4711
  }
4712
  return $pid;
4713
  }
4724
  }
4725
 
4726
  $name = wppa_sanitize_album_photo_name( $xname );
 
 
 
 
 
 
4727
 
4728
  $query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_albums WHERE sname = %s", $name );
4729
  $albs = $wpdb->get_results( $query, ARRAY_A );
4772
  }
4773
 
4774
  if ( $aid ) {
4775
+ wppa_dbg_msg( 'Aid ' . $aid . ' found for ' . $name );
4776
  }
4777
  else {
4778
+ wppa_dbg_msg( 'No aid found for ' . $name );
4779
  }
4780
  return $aid;
4781
  }
4816
  $albumname = __('New Album', 'wp-photo-album-plus');
4817
  }
4818
  $ok = wp_verify_nonce( $nonce, 'wppa-album-check' );
4819
+ if ( ! $ok ) die( '<b>' . __( 'ERROR: Illegal attempt to create an album.', 'wp-photo-album-plus') . '</b>' );
4820
 
4821
  // Check captcha
4822
  if ( wppa_switch( 'user_create_captcha' ) ) {
4824
  $captkey = wppa_get_randseed( 'session' );
4825
 
4826
  if ( ! wppa_check_captcha( $captkey ) ) {
4827
+ wppa_alert( __( 'Wrong captcha, please try again', 'wp-photo-album-plus') );
4828
  return;
4829
  }
4830
  }
4840
  ) );
4841
  if ( $album ) {
4842
  if ( wppa_opt( 'fe_alert' ) == 'upcre' || wppa_opt( 'fe_alert' ) == 'all' ) {
4843
+ wppa_alert( sprintf( __( 'Album #%s created', 'wp-photo-album-plus'), $album ) );
4844
  }
4845
  wppa_invalidate_treecounts( $parent );
4846
  wppa_verify_treecounts_a( $parent );
4847
  wppa_create_pl_htaccess();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4848
  }
4849
  else {
4850
+ wppa_alert( __( 'Could not create album', 'wp-photo-album-plus') );
4851
  }
4852
  }
4853
  }
4860
  $nonce = wppa_get_post( 'nonce' );
4861
  $ok = wp_verify_nonce( $nonce, 'wppa-check' );
4862
  if ( ! $ok ) {
4863
+ die( '<b>' . __( 'ERROR: Illegal attempt to upload a file.', 'wp-photo-album-plus') . '</b>');
4864
  }
4865
 
4866
  $alb = wppa_get_post( 'wppa-upload-album' );
4963
  }
4964
  $upload_message .= $m;
4965
 
 
4966
  // ADD POINTS
4967
  $points = wppa_opt( 'cp_points_upload' ) * $done;
4968
  $bret = wppa_add_credit_points( $points, __( 'Photo upload' ,'wp-photo-album-plus' ) );
5024
 
5025
  // Redirect to blogpost
5026
  if ( $blogged ) {
5027
+ wppa_out( '<script>setTimeout( function() { document.location.href=\'' . get_permalink( $post_id ) . '\'; }, 2000 )</script>' );
5028
  }
5029
  }
5030
  }
5097
 
5098
  // Legal here?
5099
  if ( ! wppa_allow_uploads( $alb ) || ! wppa_allow_user_uploads( $alb ) ) {
5100
+ $wppa_alert .= esc_js( __( 'Max uploads reached', 'wp-photo-album-plus') ) . '.';
5101
  return false;
5102
  }
5103
 
5104
  // No error during upload?
5105
  if ( $file['error'] != '0' ) {
5106
+ $wppa_alert .= esc_js( __( 'Error during upload', 'wp-photo-album-plus') ) . '.';
5107
  return false;
5108
  }
5109
 
5212
 
5213
  // Done!
5214
  return $id;
 
5215
  }
5216
 
5217
  // If not already an existing audio / video; Forget the id from a previously found item with the same filename.
5222
  // Is it an image?
5223
  $imgsize = getimagesize( $file['tmp_name'] );
5224
  if ( ! is_array( $imgsize ) ) {
5225
+ $wppa_alert .= esc_js( __( 'Uploaded file is not an image', 'wp-photo-album-plus') ) . '.';
5226
  return false;
5227
  }
5228
 
5229
  // Is it a supported image filetype?
5230
  if ( $imgsize[2] != IMAGETYPE_GIF && $imgsize[2] != IMAGETYPE_JPEG && $imgsize[2] != IMAGETYPE_PNG ) {
5231
+ $wppa_alert .= esc_js( sprintf( __( 'Only gif, jpg and png image files are supported. Returned info = %s.', 'wp-photo-album-plus'), serialize( $imgsize ) ), false, false );
5232
  return false;
5233
  }
5234
 
5236
  $ms = wppa_opt( 'upload_frontend_minsize' );
5237
  if ( $ms ) { // Min size configured
5238
  if ( $imgsize[0] < $ms && $imgsize[1] < $ms ) {
5239
+ $wppa_alert .= esc_js( sprintf( __( 'Uploaded file is smaller than the allowed minimum of %d pixels.', 'wp-photo-album-plus' ), $ms ) );
5240
  return false;
5241
  }
5242
  }
5245
  $ms = wppa_opt( 'upload_frontend_maxsize' );
5246
  if ( $ms ) { // Max size configured
5247
  if ( $imgsize[0] > $ms || $imgsize[1] > $ms ) {
5248
+ $wppa_alert .= esc_js( sprintf( __( 'Uploaded file is larger than the allowed maximum of %d pixels.', 'wp-photo-album-plus' ), $ms ) );
5249
  return false;
5250
  }
5251
  }
5253
  // Check for already exists
5254
  if ( wppa_switch( 'void_dups' ) ) {
5255
  if ( wppa_is_file_duplicate_photo( wppa_sanitize_file_name( $file['name'] ), $alb ) ) {
5256
+ $wppa_alert .= esc_js( sprintf( __( 'Uploaded file %s already exists in this album.', 'wp-photo-album-plus'), wppa_sanitize_file_name( $file['name'] ) ) );
 
 
 
 
 
 
 
 
 
 
5257
  return false;
5258
  }
5259
  }
5260
+
5261
  // Find extension from mimetype
5262
  switch( $imgsize[2] ) { // mime type
5263
  case 1: $ext = 'gif'; break;
5278
  $name = wppa_sanitize_photo_name( $name );
5279
  $desc = balanceTags( wppa_get_post( 'user-desc' ), true );
5280
 
 
 
 
 
 
 
5281
  // If BlogIt! and no descrption given, use name field - this is for the shortcode used: typ"mphoto"
5282
  if ( ! $desc && isset( $_POST['wppa-blogit'] ) ) {
5283
  $desc = 'w#name';
5293
  }
5294
 
5295
  if ( ! $id ) {
5296
+ $wppa_alert .= esc_js( __( 'Could not insert photo into db.', 'wp-photo-album-plus') );
5297
  return false;
5298
  }
5299
  else {
5533
 
5534
  $switch = ( $weeks > '0' );
5535
 
5536
+ $string = __( 'You can upload after', 'wp-photo-album-plus').' ';
5537
 
5538
  if ( $weeks || $switch ) {
5539
  $string .= sprintf( _n( '%d week', '%d weeks', $weeks, 'wp-photo-album-plus' ), $weeks ).', ';
5584
  $result = '';
5585
  if ( $do_download ) {
5586
  if ( wppa_opt( 'art_monkey_display' ) == 'button' ) {
5587
+ $result .= '
5588
+ <input
5589
+ type="button"
5590
+ title="' . __( 'Download', 'wp-photo-album-plus') . '"
5591
+ style="cursor:pointer; margin-bottom:0px; max-width:500px;"
5592
+ class="wppa-download-button wppa-ovl-button"
5593
+ onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo( $id ) . '\' );"
5594
+ value="' . rtrim( __( 'Download', 'wp-photo-album-plus') . ' ' . $dl_name ) . '"
5595
+ />';
5596
  }
5597
  else {
5598
+ $result .= '
5599
+ <a
5600
+ title="' . __( 'Download', 'wp-photo-album-plus' ) . '"
5601
+ style="cursor:pointer;"
5602
+ onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($id).'\' );"
5603
+ >' .
5604
+ rtrim( __( 'Download', 'wp-photo-album-plus') . ' ' . $dl_name ) . '
5605
+ </a>';
5606
  }
5607
  }
5608
  else {
5609
+ if ( $do_name ) {
5610
+ $result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_name' ) ) );
5611
+ }
5612
  }
5613
  if ( $do_name && $do_desc ) $result .= '<br />';
5614
  if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
5623
  }
5624
  }
5625
 
5626
+ if ( $do_sm ) $result .= wppa_get_share_html( $id, 'lightbox' );
5627
 
5628
  if ( wppa_may_user_fe_edit( $id ) ) {
5629
+
5630
+ $parg = '\'' . wppa_encrypt_photo( $id ) . '\'';
5631
  if ( $type == 'slide' ) {
5632
+ $parg = esc_js( $parg );
 
 
 
5633
  }
5634
+
5635
  if ( wppa_opt( 'upload_edit' ) == 'classic' ) {
5636
  $result .= '
5637
+ <input
5638
+ type="button"
5639
+ style="float:right; margin-right:6px;"
5640
+ class="wppa-ovl-button"
5641
+ onclick="' . ( $type == 'slide' ? 'wppaStopShow( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' );"
5642
+ value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"
5643
+ />';
5644
  }
5645
  }
5646
 
5654
 
5655
  if ( wppa_switch( 'show_zoomin' ) ) {
5656
  if ( wppa_opt( 'magnifier' ) ) {
5657
+ return __( 'Zoom in', 'wp-photo-album-plus');
5658
  }
5659
  else {
5660
  return esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
5706
  }
5707
 
5708
  // Get comment status according to wp discussion rules
5709
+ // Returns 'approved', 'pending' or 'spam'
5710
  function wppa_check_comment( $user, $email, $comment ) {
5711
  global $wpdb;
5712
 
 
 
 
 
 
 
5713
  // Some other required data
5714
  $user_ip = $_SERVER["REMOTE_ADDR"];
5715
  $ser_agent = $_SERVER["HTTP_USER_AGENT"];
5718
  if ( $max_links = wppa_get_option( 'comment_max_links' ) ) {
5719
  $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
5720
 
5721
+ // Filters the number of links found in a comment.
 
 
 
 
 
 
 
 
 
5722
  $num_links = apply_filters( 'comment_max_links_url', $num_links, '', $comment );
5723
 
5724
+
5725
+ // If the number of links in the comment exceeds the allowed amount, fail the check
 
 
5726
  if ( $num_links >= $max_links ) {
5727
  wppa_log( 'Com', 'Comment {i}' . $comment . '{/i} held for moderation due to too many links' );
5728
  return 'pending';
5742
  if ( empty( $word ) )
5743
  continue;
5744
 
5745
+ // Do some escaping magic so that '#' (number of) characters in the spam
5746
+ // words don't break things:
 
 
5747
  $word = preg_quote( $word, '#' );
5748
 
5749
+ // Check the comment fields for moderation keywords. If any are found,
5750
+ // fail the check
 
 
5751
  $pattern = "#$word#i";
5752
  if ( preg_match( $pattern, $user ) ||
5753
  preg_match( $pattern, $email ) ||
5773
  if ( empty( $word ) )
5774
  continue;
5775
 
5776
+ // Do some escaping magic so that '#' (number of) characters in the spam
5777
+ // words don't break things:
 
 
5778
  $word = preg_quote( $word, '#' );
5779
 
5780
+ // Check the comment fields for moderation keywords. If any are found,
5781
+ // fail the check for the given field by returning false.
 
 
5782
  $pattern = "#$word#i";
5783
  if ( preg_match( $pattern, $user ) ||
5784
  preg_match( $pattern, $email ) ||
5919
 
5920
  // Cachefile present?
5921
  if ( wppa_is_file( $cache_file ) ) {
5922
+ $timer = wppa_occur_timer( 'show', $_SERVER['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ), true );
5923
+ wppa_log( 'fso', 'Reading cachefile ' . str_replace( WPPA_CONTENT_PATH, '...', $cache_file ) );
5924
 
5925
+ $cache_data = wppa_get_contents( $cache_file ) . $timer;
 
 
 
 
 
 
 
 
 
 
 
5926
  }
5927
  }
5928
  }
wppa-gp-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
- * Version 7.3.08
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
@@ -24,7 +24,7 @@ class WppaGpWidget extends WP_Widget {
24
  extract( $args );
25
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
26
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
27
- $cache = $instance['cache'];
28
  $cachefile = wppa_get_widget_cache_path( $this->id );
29
 
30
  // Logged in only and logged out?
@@ -33,23 +33,11 @@ class WppaGpWidget extends WP_Widget {
33
  }
34
 
35
  // Cache?
36
- if ( $cache ) {
37
-
38
- if ( wppa_is_file( $cachefile ) ) {
39
-
40
- // Cache expired?
41
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
42
- wppa_remove_widget_cache_path( $this->id );
43
- }
44
-
45
- // No, use it
46
- else {
47
- echo wppa_get_contents( $cachefile );
48
- echo wppa_widget_timer( 'show', $widget_title, true );
49
- wppa( 'in_widget', false );
50
- return;
51
- }
52
- }
53
  }
54
 
55
  // Other inits
@@ -80,7 +68,7 @@ class WppaGpWidget extends WP_Widget {
80
  }
81
  $result .= $widget_content . $after_widget;
82
 
83
- echo $result;
84
  echo wppa_widget_timer( 'show', $widget_title );
85
 
86
  // Cache?
@@ -136,7 +124,7 @@ class WppaGpWidget extends WP_Widget {
136
 
137
  // Cache
138
  echo
139
- wppa_widget_cache( $this, $instance['cache'] );
140
 
141
  }
142
 
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
+ * Version 8.0.00.024
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
24
  extract( $args );
25
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
26
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
27
+ $cache = ! is_admin() && $instance['cache'];
28
  $cachefile = wppa_get_widget_cache_path( $this->id );
29
 
30
  // Logged in only and logged out?
33
  }
34
 
35
  // Cache?
36
+ if ( $cache && wppa_is_file( $cachefile ) ) {
37
+ echo wppa_get_contents( $cachefile );
38
+ echo wppa_widget_timer( 'show', $widget_title, true );
39
+ wppa( 'in_widget', false );
40
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
 
43
  // Other inits
68
  }
69
  $result .= $widget_content . $after_widget;
70
 
71
+ echo wppa_compress_html( $result );
72
  echo wppa_widget_timer( 'show', $widget_title );
73
 
74
  // Cache?
124
 
125
  // Cache
126
  echo
127
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
128
 
129
  }
130
 
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
- * Version 8.0.00.007
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
@@ -27,7 +27,7 @@ class LasTenWidget extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
- $cache = $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
@@ -36,23 +36,11 @@ class LasTenWidget extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Other inits
@@ -206,7 +194,7 @@ class LasTenWidget extends WP_Widget {
206
  }
207
  $result .= $widget_content . $after_widget;
208
 
209
- echo $result;
210
  echo wppa_widget_timer( 'show', $widget_title );
211
 
212
  // Cache?
@@ -286,12 +274,12 @@ class LasTenWidget extends WP_Widget {
286
 
287
  // Cache
288
  echo
289
- wppa_widget_cache( $this, $instance['cache'] );
290
 
291
  echo
292
  '<p>' .
293
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
294
- ' ' . __( 'Table I-F7 and 8', 'wp-photo-album-plus' ) .
295
  '</p>';
296
 
297
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
+ $cache = ! is_admin() && $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Other inits
194
  }
195
  $result .= $widget_content . $after_widget;
196
 
197
+ echo wppa_compress_html( $result );
198
  echo wppa_widget_timer( 'show', $widget_title );
199
 
200
  // Cache?
274
 
275
  // Cache
276
  echo
277
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
278
 
279
  echo
280
  '<p>' .
281
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
282
+ ' ' . __( 'Basic setings -> Widget -> Items 8 and 9', 'wp-photo-album-plus' ) .
283
  '</p>';
284
 
285
  }
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 8.0.00.019
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -1336,7 +1336,7 @@ global $previous_page_last_id;
1336
 
1337
  $result .= '<div style="clear:both;" ></div>';
1338
  $result .= '</div><!-- #prevnext-a-' . wppa( 'mocc' ) . ' -->';
1339
- wppa_out( wppa_compress_html( $result ) );
1340
  }
1341
 
1342
  // Text
@@ -1439,7 +1439,7 @@ global $previous_page_last_id;
1439
  }
1440
 
1441
  $result .= '</div><!-- #prevnext-a-' . wppa( 'mocc' ) . ' -->';
1442
- wppa_out( wppa_compress_html( $result ) );
1443
  }
1444
  }
1445
 
@@ -1448,22 +1448,24 @@ function wppa_album_download_link( $albumid ) {
1448
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1449
  if ( wppa_switch( 'download_album_is_restricted' ) && ! wppa_user_is( 'administrator' ) ) return; // restricted to admin
1450
 
1451
- $result =
1452
- '<div style="clear:both;" ></div>' .
1453
- '<a' .
1454
- ' onclick="wppaAjaxDownloadAlbum(' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_album( $albumid ) . '\' );"' .
1455
- ' style="cursor:pointer;"' .
1456
- ' class="wppa-album-cover-link"' .
1457
- ' title="' . esc_attr( __('Download', 'wp-photo-album-plus') ).'" ' .
1458
- '>' .
1459
- __( 'Download Album', 'wp-photo-album-plus' ) .
1460
- '</a>' .
1461
- '<img' .
1462
- ' id="dwnspin-' . wppa( 'mocc' ) . '-' . wppa_encrypt_album( $albumid ) . '"' .
1463
- ' src="' . wppa_get_imgdir() . 'spinner.gif"' .
1464
- ' style="margin-left:6px; display:none;"' .
1465
- ' alt="spin"' .
1466
- ' />';
 
 
1467
 
1468
  wppa_out( $result );
1469
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 8.0.00.023
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
1336
 
1337
  $result .= '<div style="clear:both;" ></div>';
1338
  $result .= '</div><!-- #prevnext-a-' . wppa( 'mocc' ) . ' -->';
1339
+ wppa_out( $result );
1340
  }
1341
 
1342
  // Text
1439
  }
1440
 
1441
  $result .= '</div><!-- #prevnext-a-' . wppa( 'mocc' ) . ' -->';
1442
+ wppa_out( $result );
1443
  }
1444
  }
1445
 
1448
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1449
  if ( wppa_switch( 'download_album_is_restricted' ) && ! wppa_user_is( 'administrator' ) ) return; // restricted to admin
1450
 
1451
+ $mocc = wppa( 'mocc' );
1452
+
1453
+ $result = '
1454
+ <div style="clear:both;" ></div>
1455
+ <a
1456
+ onclick="wppaAjaxDownloadAlbum(' . $mocc . ', \'' . wppa_encrypt_album( $albumid ) . '\' );"
1457
+ style="cursor:pointer;"
1458
+ class="wppa-album-cover-link"
1459
+ title="' . esc_attr( __( 'Download', 'wp-photo-album-plus' ) ) . '"
1460
+ >' .
1461
+ __( 'Download Album', 'wp-photo-album-plus' ) . '
1462
+ </a>
1463
+ <img
1464
+ id="dwnspin-' . $mocc . '-' . wppa_encrypt_album( $albumid ) . '"
1465
+ src="' . wppa_get_imgdir() . 'spinner.gif"
1466
+ style="margin-left:6px; display:none;"
1467
+ alt="spin"
1468
+ />';
1469
 
1470
  wppa_out( $result );
1471
  }
wppa-multitag-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
- * Version 7.3.08
7
  *
8
  */
9
 
@@ -27,7 +27,7 @@ class MultitagPhotos extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
- $cache = $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
@@ -36,23 +36,11 @@ class MultitagPhotos extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Other inits
@@ -72,7 +60,7 @@ class MultitagPhotos extends WP_Widget {
72
  }
73
  $result .= $widget_content . $after_widget;
74
 
75
- echo $result;
76
  echo wppa_widget_timer( 'show', $widget_title );
77
 
78
  // Cache?
@@ -145,7 +133,7 @@ class MultitagPhotos extends WP_Widget {
145
 
146
  // Cache
147
  echo
148
- wppa_widget_cache( $this, $instance['cache'] );
149
 
150
  }
151
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
+ $cache = ! is_admin() && $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Other inits
60
  }
61
  $result .= $widget_content . $after_widget;
62
 
63
+ echo wppa_compress_html( $result );
64
  echo wppa_widget_timer( 'show', $widget_title );
65
 
66
  // Cache?
133
 
134
  // Cache
135
  echo
136
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
137
 
138
  }
139
 
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 8.0.00.020
7
  *
8
  */
9
 
@@ -371,7 +371,7 @@ function wppa_load_theme() {
371
  }
372
 
373
  /* LOAD FOOTER REQD DATA */
374
- add_action('wp_footer', 'wppa_load_footer');
375
 
376
  function wppa_load_footer() {
377
  global $wpdb;
@@ -529,24 +529,6 @@ wppaOvlGlobal = ' . ( $lb_global ? '"' . $lb_global . '"' : 'false' ) . ';
529
  ';
530
  echo $data;
531
 
532
-
533
- // The photo views cache
534
- $data = '
535
- <!-- START Viewcounts -->
536
- <script>';
537
-
538
- if ( isset( $wppa_session['photo'] ) ) {
539
- foreach ( array_keys( $wppa_session['photo'] ) as $p ) {
540
- $data .= '
541
- wppaPhotoView[' . $p . '] = true;';
542
- }
543
- }
544
- $data .= '
545
- </script>
546
- <!-- END Vieuwcounts -->';
547
-
548
- echo $data;
549
-
550
  // Debugging, show queries
551
  wppa_dbg_cachecounts('print');
552
 
@@ -693,6 +675,7 @@ wppaImageDirectory = "' . wppa_get_imgdir() . '";
693
  wppaWppaUrl = "' . wppa_get_wppa_url() . '";
694
  wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
695
  wppaAjaxUrl = "' . site_url() . '/wppaajax/";
 
696
  wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
697
  wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
698
  wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
@@ -832,6 +815,21 @@ wppaThumbAspect = ' . $aspect . ';
832
  // Relative urls?
833
  $wppa_js_page_data .= wppa_make_relative( $result );
834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
835
  }
836
 
837
  /* ENABLE RENDERING */
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
371
  }
372
 
373
  /* LOAD FOOTER REQD DATA */
374
+ add_action( 'wp_footer', 'wppa_load_footer', 100 );
375
 
376
  function wppa_load_footer() {
377
  global $wpdb;
529
  ';
530
  echo $data;
531
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  // Debugging, show queries
533
  wppa_dbg_cachecounts('print');
534
 
675
  wppaWppaUrl = "' . wppa_get_wppa_url() . '";
676
  wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
677
  wppaAjaxUrl = "' . site_url() . '/wppaajax/";
678
+ wppaAdminAjaxUrl = "' . site_url() . '/wp-admin/admin-ajax.php/";
679
  wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
680
  wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
681
  wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
815
  // Relative urls?
816
  $wppa_js_page_data .= wppa_make_relative( $result );
817
 
818
+ // The photo views cache
819
+ $wppa_js_page_data .= '
820
+ <!-- START Viewcounts -->
821
+ <script>';
822
+
823
+ if ( isset( $wppa_session['photo'] ) ) {
824
+ foreach ( array_keys( $wppa_session['photo'] ) as $p ) {
825
+ $wppa_js_page_data .= '
826
+ wppaPhotoView[' . $p . '] = true;';
827
+ }
828
+ }
829
+ $wppa_js_page_data .= '
830
+ </script>
831
+ <!-- END Vieuwcounts -->';
832
+
833
  }
834
 
835
  /* ENABLE RENDERING */
wppa-notify-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * notify events to users
6
- * Version 8.0.00.008
7
  */
8
 
9
  class wppaNotifyWidget extends WP_Widget {
@@ -25,36 +25,12 @@ class wppaNotifyWidget extends WP_Widget {
25
  extract( $args );
26
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
27
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
28
- $cache = $instance['cache'];
29
- $cachefile = wppa_get_widget_cache_path( $this->id );
30
 
31
  // Logged in only and logged out?
32
  if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
33
  return;
34
  }
35
 
36
- // Cache?
37
- if ( $cache ) {
38
-
39
- if ( wppa_is_file( $cachefile ) ) {
40
-
41
- // Cache expired?
42
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
43
- wppa_remove_widget_cache_path( $this->id );
44
- }
45
-
46
- // No, use it
47
- else {
48
- echo wppa_get_contents( $cachefile );
49
- echo wppa_widget_timer( 'show', $widget_title, true );
50
- wppa( 'in_widget', false );
51
- return;
52
- }
53
- }
54
- }
55
-
56
- // Other inits
57
-
58
  // Make the widget content
59
  $widget_content = '<!-- WPPA+ notify Widget start -->';
60
  $widget_content .= __( 'Notify me when...', 'wp-photo-album-plus' ) . '<br />';
@@ -208,7 +184,6 @@ class wppaNotifyWidget extends WP_Widget {
208
  </label>
209
  </div>';
210
  }
211
-
212
  }
213
 
214
  // Only show to moderators
@@ -278,14 +253,9 @@ class wppaNotifyWidget extends WP_Widget {
278
  }
279
  $result .= $widget_content . $after_widget;
280
 
281
- echo $result;
282
  echo wppa_widget_timer( 'show', $widget_title );
283
 
284
- // Cache?
285
- if ( $cache ) {
286
- wppa_put_contents( $cachefile, $result );
287
- }
288
-
289
  wppa( 'in_widget', false );
290
  }
291
 
@@ -312,17 +282,6 @@ class wppaNotifyWidget extends WP_Widget {
312
  // Title
313
  echo
314
  wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
315
-
316
- // Cache
317
- // Do not cache this widget. data differs for every visitor
318
- // echo
319
- // wppa_widget_cache( $this, $instance['cache'] );
320
-
321
- echo
322
- '<div style="padding:6px;border:1px solid lightgray;margin-top:2px;" >' .
323
- __( 'You can configure the availability of mailing types in Table IX-M', 'wp-photo-album-plus' ) .
324
- '</div>';
325
-
326
  }
327
 
328
  // Set defaults
3
  * Package: wp-photo-album-plus
4
  *
5
  * notify events to users
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class wppaNotifyWidget extends WP_Widget {
25
  extract( $args );
26
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
27
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
 
 
28
 
29
  // Logged in only and logged out?
30
  if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
31
  return;
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  // Make the widget content
35
  $widget_content = '<!-- WPPA+ notify Widget start -->';
36
  $widget_content .= __( 'Notify me when...', 'wp-photo-album-plus' ) . '<br />';
184
  </label>
185
  </div>';
186
  }
 
187
  }
188
 
189
  // Only show to moderators
253
  }
254
  $result .= $widget_content . $after_widget;
255
 
256
+ echo wppa_compress_html( $result );
257
  echo wppa_widget_timer( 'show', $widget_title );
258
 
 
 
 
 
 
259
  wppa( 'in_widget', false );
260
  }
261
 
282
  // Title
283
  echo
284
  wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
 
 
 
 
 
 
 
 
 
 
 
285
  }
286
 
287
  // Set defaults
wppa-potd-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the photo of the day widget
6
- * Version 8.0.00.019
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -28,7 +28,7 @@ class PhotoOfTheDay extends WP_Widget {
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
- $cache = $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
@@ -37,27 +37,13 @@ class PhotoOfTheDay extends WP_Widget {
37
  }
38
 
39
  // Cache?
40
- if ( $cache ) {
41
-
42
- if ( wppa_is_file( $cachefile ) ) {
43
-
44
- // Cache expired?
45
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
46
- wppa_remove_widget_cache_path( $this->id );
47
- }
48
-
49
- // No, use it
50
- else {
51
- echo wppa_get_contents( $cachefile );
52
- echo wppa_widget_timer( 'show', $widget_title, true );
53
- wppa( 'in_widget', false );
54
- return;
55
- }
56
- }
57
  }
58
 
59
- // Other inits
60
-
61
  // get the photo ($image)
62
  $image = wppa_get_potd();
63
 
@@ -231,7 +217,7 @@ class PhotoOfTheDay extends WP_Widget {
231
  }
232
  $result .= $widget_content . $after_widget;
233
 
234
- echo $result;
235
  echo wppa_widget_timer( 'show', $widget_title );
236
 
237
  // Cache?
@@ -272,7 +258,7 @@ class PhotoOfTheDay extends WP_Widget {
272
 
273
  // Cache
274
  echo
275
- wppa_widget_cache( $this, $instance['cache'] );
276
 
277
  // Explanation
278
  echo
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the photo of the day widget
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
+ $cache = ! is_admin() && $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
37
  }
38
 
39
  // Cache?
40
+ if ( $cache && wppa_is_file( $cachefile ) ) {
41
+ echo wppa_get_contents( $cachefile );
42
+ echo wppa_widget_timer( 'show', $widget_title, true );
43
+ wppa( 'in_widget', false );
44
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
 
 
47
  // get the photo ($image)
48
  $image = wppa_get_potd();
49
 
217
  }
218
  $result .= $widget_content . $after_widget;
219
 
220
+ echo wppa_compress_html( $result );
221
  echo wppa_widget_timer( 'show', $widget_title );
222
 
223
  // Cache?
258
 
259
  // Cache
260
  echo
261
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
262
 
263
  // Explanation
264
  echo
wppa-qr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
- * Version 8.0.00.020
7
  */
8
 
9
  class wppaQRWidget extends WP_Widget {
@@ -26,7 +26,7 @@ class wppaQRWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
- $cache = $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
 
32
  // Logged in only and logged out?
@@ -35,23 +35,11 @@ class wppaQRWidget extends WP_Widget {
35
  }
36
 
37
  // Cache?
38
- if ( $cache ) {
39
-
40
- if ( wppa_is_file( $cachefile ) ) {
41
-
42
- // Cache expired?
43
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
44
- wppa_remove_widget_cache_path( $this->id );
45
- }
46
-
47
- // No, use it
48
- else {
49
- echo wppa_get_contents( $cachefile );
50
- echo wppa_widget_timer( 'show', $widget_title, true );
51
- wppa( 'in_widget', false );
52
- return;
53
- }
54
- }
55
  }
56
 
57
  // Other inits
@@ -103,7 +91,7 @@ class wppaQRWidget extends WP_Widget {
103
  }
104
  $result .= $widget_content . $after_widget;
105
 
106
- echo $result;
107
  echo wppa_widget_timer( 'show', $widget_title );
108
 
109
  // Cache?
@@ -141,15 +129,10 @@ class wppaQRWidget extends WP_Widget {
141
  echo
142
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
143
 
144
- // Cache
145
- // Do not cache QR widget
146
- // echo
147
- // wppa_widget_cache( $this, $instance['cache'] );
148
-
149
  // Explanation
150
  echo
151
  '<p>' .
152
- __( 'You can set the sizes and colors in this widget in the <b>Photo Albums -> Settings</b> admin page Table IX-K1.x.', 'wp-photo-album-plus' ) .
153
  '</p>';
154
 
155
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class wppaQRWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
+ $cache = ! is_admin() && $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
 
32
  // Logged in only and logged out?
35
  }
36
 
37
  // Cache?
38
+ if ( $cache && wppa_is_file( $cachefile ) ) {
39
+ echo wppa_get_contents( $cachefile );
40
+ echo wppa_widget_timer( 'show', $widget_title, true );
41
+ wppa( 'in_widget', false );
42
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  // Other inits
91
  }
92
  $result .= $widget_content . $after_widget;
93
 
94
+ echo wppa_compress_html( $result );
95
  echo wppa_widget_timer( 'show', $widget_title );
96
 
97
  // Cache?
129
  echo
130
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
131
 
 
 
 
 
 
132
  // Explanation
133
  echo
134
  '<p>' .
135
+ __( 'You can set the sizes and colors in this widget in the <b>Photo Albums -> Settings</b> admin page Tab Widgets -> III', 'wp-photo-album-plus' ) .
136
  '</p>';
137
 
138
  }
wppa-search-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
- * Version 8.0.00.007
7
  *
8
  */
9
 
@@ -30,7 +30,7 @@ class SearchPhotos extends WP_Widget {
30
  extract( $args );
31
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
32
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
33
- $cache = $instance['cache'];
34
  $cachefile = wppa_get_widget_cache_path( $this->id );
35
 
36
  // Logged in only and logged out?
@@ -39,23 +39,11 @@ class SearchPhotos extends WP_Widget {
39
  }
40
 
41
  // Cache?
42
- if ( $cache ) {
43
-
44
- if ( wppa_is_file( $cachefile ) ) {
45
-
46
- // Cache expired?
47
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
48
- wppa_remove_widget_cache_path( $this->id );
49
- }
50
-
51
- // No, use it
52
- else {
53
- echo wppa_get_contents( $cachefile );
54
- echo wppa_widget_timer( 'show', $widget_title, true );
55
- wppa( 'in_widget', false );
56
- return;
57
- }
58
- }
59
  }
60
 
61
  // Make the widget content
@@ -77,7 +65,7 @@ class SearchPhotos extends WP_Widget {
77
  }
78
  $result .= $widget_content . $after_widget;
79
 
80
- echo $result;
81
  echo wppa_widget_timer( 'show', $widget_title );
82
 
83
  // Cache?
@@ -224,8 +212,7 @@ class SearchPhotos extends WP_Widget {
224
 
225
  // Cache
226
  echo
227
- wppa_widget_cache( $this, $instance['cache'] );
228
-
229
  }
230
 
231
  // Set defaults
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
30
  extract( $args );
31
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
32
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
33
+ $cache = ! is_admin() && $instance['cache'];
34
  $cachefile = wppa_get_widget_cache_path( $this->id );
35
 
36
  // Logged in only and logged out?
39
  }
40
 
41
  // Cache?
42
+ if ( $cache && wppa_is_file( $cachefile ) ) {
43
+ echo wppa_get_contents( $cachefile );
44
+ echo wppa_widget_timer( 'show', $widget_title, true );
45
+ wppa( 'in_widget', false );
46
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  // Make the widget content
65
  }
66
  $result .= $widget_content . $after_widget;
67
 
68
+ echo wppa_compress_html( $result );
69
  echo wppa_widget_timer( 'show', $widget_title );
70
 
71
  // Cache?
212
 
213
  // Cache
214
  echo
215
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
 
216
  }
217
 
218
  // Set defaults
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 8.0.00.014
7
  *
8
  */
9
 
@@ -202,6 +202,15 @@ global $wppa_error;
202
  $tn = array( WPPA_ALBUMS, WPPA_PHOTOS, WPPA_RATING, WPPA_COMMENTS, WPPA_IPTC, WPPA_EXIF, WPPA_INDEX, WPPA_SESSION );
203
  $tc = array( $create_albums, $create_photos, $create_rating, $create_comments, $create_iptc, $create_exif, $create_index, $create_session );
204
  $idx = 0;
 
 
 
 
 
 
 
 
 
205
  while ( $idx < 8 ) {
206
  dbDelta( $tc[$idx] );
207
  $idx++;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 8.0.00.021
7
  *
8
  */
9
 
202
  $tn = array( WPPA_ALBUMS, WPPA_PHOTOS, WPPA_RATING, WPPA_COMMENTS, WPPA_IPTC, WPPA_EXIF, WPPA_INDEX, WPPA_SESSION );
203
  $tc = array( $create_albums, $create_photos, $create_rating, $create_comments, $create_iptc, $create_exif, $create_index, $create_session );
204
  $idx = 0;
205
+
206
+ // Change longtext into text in existring db
207
+ if ( $old_rev > '100' ) {
208
+ $wpdb->query( "ALTER TABLE $wpdb->wppa_albums CHANGE `custom` `custom` TEXT CHARACTER SET utf8 NOT NULL;" );
209
+ $wpdb->query( "ALTER TABLE $wpdb->wppa_photos CHANGE `custom` `custom` TEXT CHARACTER SET utf8 NOT NULL;" );
210
+ $wpdb->query( "ALTER TABLE $wpdb->wppa_albums CHANGE `description` `description` TEXT CHARACTER SET utf8 NOT NULL;" );
211
+ $wpdb->query( "ALTER TABLE $wpdb->wppa_photos CHANGE `description` `description` TEXT CHARACTER SET utf8 NOT NULL;" );
212
+ }
213
+
214
  while ( $idx < 8 ) {
215
  dbDelta( $tc[$idx] );
216
  $idx++;
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 8.0.00.007
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -34,7 +34,7 @@ class SlideshowWidget extends WP_Widget {
34
  $album = $instance['album'];
35
  $page = in_array( wppa_opt( 'slideonly_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' :
36
  wppa_get_the_landing_page( 'slideonly_widget_linkpage', __( 'Widget landing page', 'wp-photo-album-plus' ) );
37
- $cache = ( wppa_switch( 'defer_javascript' ) ? '0' : $instance['cache'] );
38
  $cachefile = wppa_get_widget_cache_path( $this->id );
39
  $widget_content = '';
40
 
@@ -44,23 +44,11 @@ class SlideshowWidget extends WP_Widget {
44
  }
45
 
46
  // Cache?
47
- if ( $cache ) {
48
-
49
- if ( wppa_is_file( $cachefile ) ) {
50
-
51
- // Cache expired?
52
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
53
- wppa_remove_widget_cache_path( $this->id );
54
- }
55
-
56
- // No, use it
57
- else {
58
- echo wppa_get_contents( $cachefile );
59
- echo wppa_widget_timer( 'show', $widget_title, true );
60
- wppa( 'in_widget', false );
61
- return;
62
- }
63
- }
64
  }
65
 
66
  // Calculate the height if set to 0
@@ -71,64 +59,63 @@ class SlideshowWidget extends WP_Widget {
71
  // Do the widget if we know the album
72
  if ( is_numeric( $album ) && ( wppa_album_exists( $album ) || $album == '-2' ) ) {
73
 
74
- // Show text above slideshow
75
- if ( __( $instance['supertext'] ) ) {
76
- $widget_content .=
77
- '<div style="padding-top:2px; padding-bottom:4px; text-align:center" >' .
78
- __( $instance['supertext'] ) .
79
- '</div>';
80
- }
81
-
82
- // Fill in runtime parameters to tune the slideshow
83
- wppa_reset_occurrance();
84
- if ( $instance['linkurl'] && wppa_opt( 'slideonly_widget_linktype' ) == 'widget' ) {
85
- wppa( 'in_widget_linkurl', $instance['linkurl'] );
86
- wppa( 'in_widget_linktitle', __( $instance['linktitle'] ) );
87
- }
88
- wppa( 'auto_colwidth', false );
89
- wppa( 'in_widget', 'ss' );
90
- wppa( 'in_widget_frame_height', $instance['height'] );
91
- wppa( 'in_widget_frame_width', $instance['width'] );
92
- wppa( 'in_widget_timeout', $instance['timeout'] * 1000 );
93
- wppa( 'portrait_only', wppa_checked( $instance['ponly'] ) );
94
- wppa( 'ss_widget_valign', $instance['valign'] );
95
- wppa( 'film_on', wppa_checked( $instance['film'] ) );
96
- wppa( 'browse_on', wppa_checked( $instance['browse'] ) );
97
- wppa( 'name_on', wppa_checked( $instance['name'] ) );
98
- wppa( 'numbar_on', wppa_checked( $instance['numbar'] ) );
99
- wppa( 'desc_on', wppa_checked( $instance['desc'] ) );
100
- wppa( 'max_slides_in_ss_widget', $instance['maxslides'] );
101
- wppa( 'is_random', wppa_checked( $instance['random'] ) );
102
-
103
- // Including subalbums?
104
- if ( $album > '0' && wppa_checked( $instance['incsubs'] ) ) {
105
- $album = wppa_alb_to_enum_children( $album );
106
- }
107
-
108
- // Open the slideshow container
109
  $widget_content .=
110
- '<div' .
111
- ' style="padding-top:2px; padding-bottom:4px;" ' .
112
- ' data-wppa="yes" >';
 
113
 
114
- // The very slideshow
115
- $widget_content .= wppa_albums( $album, 'slideonly', $instance['width'], 'center' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
- // Close slideshw container
118
- $widget_content .=
119
- '</div>';
 
 
 
 
 
120
 
121
- // Reset runtime parameters
122
- wppa_reset_occurrance();
 
123
 
124
- // Show text below the slideshow
125
- if ( __( $instance['subtext'] ) ) {
126
- $widget_content .=
127
- '<div style="padding-top:2px; padding-bottom:0px; text-align:center" >' .
128
- __( $instance['subtext'] ) .
129
- '</div>';
130
- }
131
 
 
 
 
 
 
 
 
132
  }
133
 
134
  // No album specified
@@ -143,7 +130,7 @@ class SlideshowWidget extends WP_Widget {
143
  }
144
  $result .= $widget_content . $after_widget;
145
 
146
- echo $result;
147
  echo wppa_widget_timer( 'show', $widget_title );
148
 
149
  // Cache?
@@ -351,17 +338,11 @@ class SlideshowWidget extends WP_Widget {
351
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
352
 
353
  // Cache
354
- if ( wppa_switch( 'defer_javascript' ) ) {
355
- echo
356
- '<p>' .
357
- __( 'Caching of this widget is not possible when defer javascript is active (Table IV-A13)', 'wp-photo-album-plus' ) .
358
- '</p>';
359
- }
360
- else {
361
  echo
362
- wppa_widget_cache( $this, $instance['cache'] );
363
  }
364
-
365
  }
366
 
367
  // Set defaults
@@ -387,7 +368,7 @@ class SlideshowWidget extends WP_Widget {
387
  'random' => 'no',
388
  'incsubs' => 'no',
389
  'logonly' => 'no',
390
- 'cache' => '0',
391
  );
392
  return $defaults;
393
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
34
  $album = $instance['album'];
35
  $page = in_array( wppa_opt( 'slideonly_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' :
36
  wppa_get_the_landing_page( 'slideonly_widget_linkpage', __( 'Widget landing page', 'wp-photo-album-plus' ) );
37
+ $cache = ! is_admin() && ! wppa_switch( 'defer_javascript' ) && $instance['cache'];
38
  $cachefile = wppa_get_widget_cache_path( $this->id );
39
  $widget_content = '';
40
 
44
  }
45
 
46
  // Cache?
47
+ if ( $cache && wppa_is_file( $cachefile ) ) {
48
+ echo wppa_get_contents( $cachefile );
49
+ echo wppa_widget_timer( 'show', $widget_title, true );
50
+ wppa( 'in_widget', false );
51
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
  // Calculate the height if set to 0
59
  // Do the widget if we know the album
60
  if ( is_numeric( $album ) && ( wppa_album_exists( $album ) || $album == '-2' ) ) {
61
 
62
+ // Show text above slideshow
63
+ if ( __( $instance['supertext'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  $widget_content .=
65
+ '<div style="padding-top:2px; padding-bottom:4px; text-align:center" >' .
66
+ __( $instance['supertext'] ) .
67
+ '</div>';
68
+ }
69
 
70
+ // Fill in runtime parameters to tune the slideshow
71
+ wppa_reset_occurrance();
72
+ if ( $instance['linkurl'] && wppa_opt( 'slideonly_widget_linktype' ) == 'widget' ) {
73
+ wppa( 'in_widget_linkurl', $instance['linkurl'] );
74
+ wppa( 'in_widget_linktitle', __( $instance['linktitle'] ) );
75
+ }
76
+ wppa( 'auto_colwidth', false );
77
+ wppa( 'in_widget', 'ss' );
78
+ wppa( 'in_widget_frame_height', $instance['height'] );
79
+ wppa( 'in_widget_frame_width', $instance['width'] );
80
+ wppa( 'in_widget_timeout', $instance['timeout'] * 1000 );
81
+ wppa( 'portrait_only', wppa_checked( $instance['ponly'] ) );
82
+ wppa( 'ss_widget_valign', $instance['valign'] );
83
+ wppa( 'film_on', wppa_checked( $instance['film'] ) );
84
+ wppa( 'browse_on', wppa_checked( $instance['browse'] ) );
85
+ wppa( 'name_on', wppa_checked( $instance['name'] ) );
86
+ wppa( 'numbar_on', wppa_checked( $instance['numbar'] ) );
87
+ wppa( 'desc_on', wppa_checked( $instance['desc'] ) );
88
+ wppa( 'max_slides_in_ss_widget', $instance['maxslides'] );
89
+ wppa( 'is_random', wppa_checked( $instance['random'] ) );
90
+
91
+ // Including subalbums?
92
+ if ( $album > '0' && wppa_checked( $instance['incsubs'] ) ) {
93
+ $album = wppa_alb_to_enum_children( $album );
94
+ }
95
 
96
+ // Open the slideshow container
97
+ $widget_content .=
98
+ '<div' .
99
+ ' style="padding-top:2px; padding-bottom:4px;" ' .
100
+ ' data-wppa="yes" >';
101
+
102
+ // The very slideshow
103
+ $widget_content .= wppa_albums( $album, 'slideonly', $instance['width'], 'center' );
104
 
105
+ // Close slideshw container
106
+ $widget_content .=
107
+ '</div>';
108
 
109
+ // Reset runtime parameters
110
+ wppa_reset_occurrance();
 
 
 
 
 
111
 
112
+ // Show text below the slideshow
113
+ if ( __( $instance['subtext'] ) ) {
114
+ $widget_content .=
115
+ '<div style="padding-top:2px; padding-bottom:0px; text-align:center" >' .
116
+ __( $instance['subtext'] ) .
117
+ '</div>';
118
+ }
119
  }
120
 
121
  // No album specified
130
  }
131
  $result .= $widget_content . $after_widget;
132
 
133
+ echo wppa_compress_html( $result );
134
  echo wppa_widget_timer( 'show', $widget_title );
135
 
136
  // Cache?
338
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
339
 
340
  // Cache
341
+ if ( ! wppa_switch( 'defer_javascript' ) ) {
342
+
 
 
 
 
 
343
  echo
344
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
345
  }
 
346
  }
347
 
348
  // Set defaults
368
  'random' => 'no',
369
  'incsubs' => 'no',
370
  'logonly' => 'no',
371
+ 'cache' => '',
372
  );
373
  return $defaults;
374
  }
wppa-stats-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the stats widget
6
- * Version 7.3.03
7
  *
8
  */
9
  class WppaStatsWidget extends WP_Widget {
@@ -26,7 +26,7 @@ class WppaStatsWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
- $cache = $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
  $widget_content = '';
32
 
@@ -36,23 +36,11 @@ class WppaStatsWidget extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Make the widget content
@@ -152,7 +140,7 @@ class WppaStatsWidget extends WP_Widget {
152
  }
153
  $result .= $widget_content . $after_widget;
154
 
155
- echo $result;
156
  echo wppa_widget_timer( 'show', $widget_title );
157
 
158
  // Cache?
@@ -314,7 +302,7 @@ class WppaStatsWidget extends WP_Widget {
314
 
315
  // Cache
316
  echo
317
- wppa_widget_cache( $this, $instance['cache'] );
318
 
319
  }
320
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the stats widget
6
+ * Version 8.0.00.024
7
  *
8
  */
9
  class WppaStatsWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
+ $cache = ! is_admin() && $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
  $widget_content = '';
32
 
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Make the widget content
140
  }
141
  $result .= $widget_content . $after_widget;
142
 
143
+ echo wppa_compress_html( $result );
144
  echo wppa_widget_timer( 'show', $widget_title );
145
 
146
  // Cache?
302
 
303
  // Cache
304
  echo
305
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
306
 
307
  }
308
 
wppa-stereo-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 7.3.03
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
@@ -26,36 +26,12 @@ class wppaStereoWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
- $cache = $instance['cache'];
30
- $cachefile = wppa_get_widget_cache_path( $this->id );
31
 
32
  // Logged in only and logged out?
33
  if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
34
  return;
35
  }
36
 
37
- // Cache?
38
- if ( $cache ) {
39
-
40
- if ( wppa_is_file( $cachefile ) ) {
41
-
42
- // Cache expired?
43
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
44
- wppa_remove_widget_cache_path( $this->id );
45
- }
46
-
47
- // No, use it
48
- else {
49
- echo wppa_get_contents( $cachefile );
50
- echo wppa_widget_timer( 'show', $widget_title, true );
51
- wppa( 'in_widget', false );
52
- return;
53
- }
54
- }
55
- }
56
-
57
- // Other inits
58
-
59
  // Make the widget content
60
  $widget_content = "\n".'<!-- WPPA+ stereo Widget start -->';
61
  $widget_content .= wppa_get_stereo_html();
@@ -69,14 +45,9 @@ class wppaStereoWidget extends WP_Widget {
69
  }
70
  $result .= $widget_content . $after_widget;
71
 
72
- echo $result;
73
  echo wppa_widget_timer( 'show', $widget_title );
74
 
75
- // Cache?
76
- if ( $cache ) {
77
- wppa_put_contents( $cachefile, $result );
78
- }
79
-
80
  wppa( 'in_widget', false );
81
  }
82
 
@@ -89,8 +60,6 @@ class wppaStereoWidget extends WP_Widget {
89
  // Sanitize certain args
90
  $instance['title'] = strip_tags( $instance['title'] );
91
 
92
- wppa_remove_widget_cache_path( $this->id );
93
-
94
  return $instance;
95
  }
96
 
@@ -107,12 +76,6 @@ class wppaStereoWidget extends WP_Widget {
107
  // Loggedin only
108
  echo
109
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
110
-
111
- // Cache
112
- // Do not cache this widget
113
- // echo
114
- // wppa_widget_cache( $this, $instance['cache'] );
115
-
116
  }
117
 
118
  // Set defaults
@@ -120,7 +83,6 @@ class wppaStereoWidget extends WP_Widget {
120
 
121
  $defaults = array( 'title' => __( 'Stereo Photo Settings', 'wp-photo-album-plus ' ),
122
  'logonly' => 'no',
123
- 'cache' => '0',
124
  );
125
  return $defaults;
126
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
 
 
29
 
30
  // Logged in only and logged out?
31
  if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
32
  return;
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  // Make the widget content
36
  $widget_content = "\n".'<!-- WPPA+ stereo Widget start -->';
37
  $widget_content .= wppa_get_stereo_html();
45
  }
46
  $result .= $widget_content . $after_widget;
47
 
48
+ echo wppa_compress_html( $result );
49
  echo wppa_widget_timer( 'show', $widget_title );
50
 
 
 
 
 
 
51
  wppa( 'in_widget', false );
52
  }
53
 
60
  // Sanitize certain args
61
  $instance['title'] = strip_tags( $instance['title'] );
62
 
 
 
63
  return $instance;
64
  }
65
 
76
  // Loggedin only
77
  echo
78
  wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
 
 
 
 
 
 
79
  }
80
 
81
  // Set defaults
83
 
84
  $defaults = array( 'title' => __( 'Stereo Photo Settings', 'wp-photo-album-plus ' ),
85
  'logonly' => 'no',
 
86
  );
87
  return $defaults;
88
  }
wppa-super-view-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
- * Version 7.3.03
7
  */
8
 
9
 
@@ -27,7 +27,7 @@ class WppaSuperView extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
- $cache = $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
@@ -36,23 +36,11 @@ class WppaSuperView extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Other inits
@@ -79,7 +67,7 @@ class WppaSuperView extends WP_Widget {
79
  }
80
  $result .= $widget_content . $after_widget;
81
 
82
- echo $result;
83
  echo wppa_widget_timer( 'show', $widget_title );
84
 
85
  // Cache?
@@ -135,7 +123,7 @@ class WppaSuperView extends WP_Widget {
135
 
136
  // Cache
137
  echo
138
- wppa_widget_cache( $this, $instance['cache'] );
139
 
140
  }
141
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
+ * Version 8.0.00.024
7
  */
8
 
9
 
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
+ $cache = ! is_admin() && $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Other inits
67
  }
68
  $result .= $widget_content . $after_widget;
69
 
70
+ echo wppa_compress_html( $result );
71
  echo wppa_widget_timer( 'show', $widget_title );
72
 
73
  // Cache?
123
 
124
  // Cache
125
  echo
126
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
127
 
128
  }
129
 
wppa-tagcloud-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
- * Version 7.3.08
7
  *
8
  */
9
 
@@ -27,7 +27,7 @@ class TagcloudPhotos extends WP_Widget {
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
- $cache = $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
@@ -36,23 +36,11 @@ class TagcloudPhotos extends WP_Widget {
36
  }
37
 
38
  // Cache?
39
- if ( $cache ) {
40
-
41
- if ( wppa_is_file( $cachefile ) ) {
42
-
43
- // Cache expired?
44
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
45
- wppa_remove_widget_cache_path( $this->id );
46
- }
47
-
48
- // No, use it
49
- else {
50
- echo wppa_get_contents( $cachefile );
51
- echo wppa_widget_timer( 'show', $widget_title, true );
52
- wppa( 'in_widget', false );
53
- return;
54
- }
55
- }
56
  }
57
 
58
  // Other inits
@@ -75,7 +63,7 @@ class TagcloudPhotos extends WP_Widget {
75
  }
76
  $result .= $widget_content . $after_widget;
77
 
78
- echo $result;
79
  echo wppa_widget_timer( 'show', $widget_title );
80
 
81
  // Cache?
@@ -140,7 +128,7 @@ class TagcloudPhotos extends WP_Widget {
140
 
141
  // Cache
142
  echo
143
- wppa_widget_cache( $this, $instance['cache'] );
144
  }
145
 
146
  // Set defaults
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
+ * Version 8.0.00.024
7
  *
8
  */
9
 
27
  extract( $args );
28
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
29
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
30
+ $cache = ! is_admin() && $instance['cache'];
31
  $cachefile = wppa_get_widget_cache_path( $this->id );
32
 
33
  // Logged in only and logged out?
36
  }
37
 
38
  // Cache?
39
+ if ( $cache && wppa_is_file( $cachefile ) ) {
40
+ echo wppa_get_contents( $cachefile );
41
+ echo wppa_widget_timer( 'show', $widget_title, true );
42
+ wppa( 'in_widget', false );
43
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  // Other inits
63
  }
64
  $result .= $widget_content . $after_widget;
65
 
66
+ echo wppa_compress_html( $result );
67
  echo wppa_widget_timer( 'show', $widget_title );
68
 
69
  // Cache?
128
 
129
  // Cache
130
  echo
131
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
132
  }
133
 
134
  // Set defaults
wppa-thumbnail-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
- * Version 8.0.00.007
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
@@ -26,7 +26,7 @@ class ThumbnailWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
- $cache = $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
 
32
  // Logged in only and logged out?
@@ -35,23 +35,11 @@ class ThumbnailWidget extends WP_Widget {
35
  }
36
 
37
  // Cache?
38
- if ( $cache ) {
39
-
40
- if ( wppa_is_file( $cachefile ) ) {
41
-
42
- // Cache expired?
43
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
44
- wppa_remove_widget_cache_path( $this->id );
45
- }
46
-
47
- // No, use it
48
- else {
49
- echo wppa_get_contents( $cachefile );
50
- echo wppa_widget_timer( 'show', $widget_title, true );
51
- wppa( 'in_widget', false );
52
- return;
53
- }
54
- }
55
  }
56
 
57
  // Other inits
@@ -164,7 +152,7 @@ class ThumbnailWidget extends WP_Widget {
164
  }
165
  $result .= $widget_content . $after_widget;
166
 
167
- echo $result;
168
  echo wppa_widget_timer( 'show', $widget_title );
169
 
170
  // Cache?
@@ -255,12 +243,12 @@ class ThumbnailWidget extends WP_Widget {
255
 
256
  // Cache
257
  echo
258
- wppa_widget_cache( $this, $instance['cache'] );
259
 
260
  echo
261
  '<p>' .
262
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
263
- ' ' . __( 'Table I-F5 and 6', 'wp-photo-album-plus' ) .
264
  '</p>';
265
 
266
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
26
  extract( $args );
27
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
28
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
29
+ $cache = ! is_admin() && $instance['cache'];
30
  $cachefile = wppa_get_widget_cache_path( $this->id );
31
 
32
  // Logged in only and logged out?
35
  }
36
 
37
  // Cache?
38
+ if ( $cache && wppa_is_file( $cachefile ) ) {
39
+ echo wppa_get_contents( $cachefile );
40
+ echo wppa_widget_timer( 'show', $widget_title, true );
41
+ wppa( 'in_widget', false );
42
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  // Other inits
152
  }
153
  $result .= $widget_content . $after_widget;
154
 
155
+ echo wppa_compress_html( $result );
156
  echo wppa_widget_timer( 'show', $widget_title );
157
 
158
  // Cache?
243
 
244
  // Cache
245
  echo
246
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
247
 
248
  echo
249
  '<p>' .
250
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
251
+ ' ' . __( 'Tab Widget I items 6 and 7', 'wp-photo-album-plus' ) .
252
  '</p>';
253
 
254
  }
wppa-topten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 7.3.12
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
@@ -40,7 +40,7 @@ class TopTenWidget extends WP_Widget {
40
  $medalsonly = wppa_checked( $instance['medalsonly'] ) ? 'yes' : false;
41
  $showowner = wppa_checked( $instance['showowner'] ) ? 'yes' : false;
42
  $showalbum = wppa_checked( $instance['showalbum'] ) ? 'yes' : false;
43
- $cache = $instance['cache'];
44
  $cachefile = wppa_get_widget_cache_path( $this->id );
45
 
46
  // Logged in only and logged out?
@@ -514,7 +514,7 @@ class TopTenWidget extends WP_Widget {
514
  }
515
  $result .= $widget_content . $after_widget;
516
 
517
- echo $result;
518
  echo wppa_widget_timer( 'show', $widget_title );
519
 
520
  // Cache?
@@ -624,12 +624,12 @@ class TopTenWidget extends WP_Widget {
624
 
625
  // Cache
626
  echo
627
- wppa_widget_cache( $this, $instance['cache'] );
628
 
629
  echo
630
  '<p>' .
631
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
632
- ' ' . __( 'Table I-F1 and 2', 'wp-photo-album-plus' ) .
633
  '</p>';
634
 
635
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
40
  $medalsonly = wppa_checked( $instance['medalsonly'] ) ? 'yes' : false;
41
  $showowner = wppa_checked( $instance['showowner'] ) ? 'yes' : false;
42
  $showalbum = wppa_checked( $instance['showalbum'] ) ? 'yes' : false;
43
+ $cache = ! is_admin() && $instance['cache'];
44
  $cachefile = wppa_get_widget_cache_path( $this->id );
45
 
46
  // Logged in only and logged out?
514
  }
515
  $result .= $widget_content . $after_widget;
516
 
517
+ echo wppa_compress_html( $result );
518
  echo wppa_widget_timer( 'show', $widget_title );
519
 
520
  // Cache?
624
 
625
  // Cache
626
  echo
627
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
628
 
629
  echo
630
  '<p>' .
631
  __( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
632
+ ' ' . __( 'Tab Widget I Items 2 and 3', 'wp-photo-album-plus' ) .
633
  '</p>';
634
 
635
  }
wppa-upldr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
- * Version 8.0.00.007
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -28,7 +28,7 @@ class UpldrWidget extends WP_Widget {
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
- $cache = $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
@@ -37,23 +37,11 @@ class UpldrWidget extends WP_Widget {
37
  }
38
 
39
  // Cache?
40
- if ( $cache ) {
41
-
42
- if ( wppa_is_file( $cachefile ) ) {
43
-
44
- // Cache expired?
45
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
46
- wppa_remove_widget_cache_path( $this->id );
47
- }
48
-
49
- // No, use it
50
- else {
51
- echo wppa_get_contents( $cachefile );
52
- echo wppa_widget_timer( 'show', $widget_title, true );
53
- wppa( 'in_widget', false );
54
- return;
55
- }
56
- }
57
  }
58
 
59
  $page = in_array( 'album', wppa( 'links_no_page' ) ) ? '' : wppa_get_the_landing_page('upldr_widget_linkpage', __('User uploaded photos', 'wp-photo-album-plus'));
@@ -195,7 +183,7 @@ class UpldrWidget extends WP_Widget {
195
  }
196
  $result .= $widget_content . $after_widget;
197
 
198
- echo $result;
199
  echo wppa_widget_timer( 'show', $widget_title );
200
 
201
  // Cache?
@@ -305,8 +293,7 @@ class UpldrWidget extends WP_Widget {
305
 
306
  // Cache
307
  echo
308
- wppa_widget_cache( $this, $instance['cache'] );
309
-
310
  }
311
 
312
  function get_widget_id() {
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
+ * Version 8.0.00.024
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
28
  extract( $args );
29
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
30
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
31
+ $cache = ! is_admin() && $instance['cache'];
32
  $cachefile = wppa_get_widget_cache_path( $this->id );
33
 
34
  // Logged in only and logged out?
37
  }
38
 
39
  // Cache?
40
+ if ( $cache && wppa_is_file( $cachefile ) ) {
41
+ echo wppa_get_contents( $cachefile );
42
+ echo wppa_widget_timer( 'show', $widget_title, true );
43
+ wppa( 'in_widget', false );
44
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  $page = in_array( 'album', wppa( 'links_no_page' ) ) ? '' : wppa_get_the_landing_page('upldr_widget_linkpage', __('User uploaded photos', 'wp-photo-album-plus'));
183
  }
184
  $result .= $widget_content . $after_widget;
185
 
186
+ echo wppa_compress_html( $result );
187
  echo wppa_widget_timer( 'show', $widget_title );
188
 
189
  // Cache?
293
 
294
  // Cache
295
  echo
296
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
 
297
  }
298
 
299
  function get_widget_id() {
wppa-upload-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A wppa widget to upload photos
6
  *
7
- * Version 8.0.00.008
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
@@ -25,7 +25,7 @@ class WppaUploadWidget extends WP_Widget {
25
  extract( $args );
26
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
27
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
28
- $cache = $instance['cache'];
29
  $cachefile = wppa_get_widget_cache_path( $this->id );
30
 
31
  // Logged in only and logged out?
@@ -39,23 +39,11 @@ class WppaUploadWidget extends WP_Widget {
39
  }
40
 
41
  // Cache?
42
- if ( $cache ) {
43
-
44
- if ( wppa_is_file( $cachefile ) ) {
45
-
46
- // Cache expired?
47
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
48
- wppa_remove_widget_cache_path( $this->id );
49
- }
50
-
51
- // No, use it
52
- else {
53
- echo wppa_get_contents( $cachefile );
54
- echo wppa_widget_timer( 'show', $widget_title, true );
55
- wppa( 'in_widget', false );
56
- return;
57
- }
58
- }
59
  }
60
 
61
  $album = $instance['album'];
@@ -103,7 +91,7 @@ class WppaUploadWidget extends WP_Widget {
103
  }
104
  $result .= $widget_content . $after_widget;
105
 
106
- echo $result;
107
  echo wppa_widget_timer( 'show', $widget_title );
108
 
109
  // Cache?
@@ -148,7 +136,7 @@ class WppaUploadWidget extends WP_Widget {
148
 
149
  // Cache
150
  echo
151
- wppa_widget_cache( $this, $instance['cache'] );
152
  }
153
 
154
  // Set defaults
@@ -161,7 +149,6 @@ class WppaUploadWidget extends WP_Widget {
161
  );
162
  return $defaults;
163
  }
164
-
165
  }
166
 
167
  // register WppaUploadWidget
4
  *
5
  * A wppa widget to upload photos
6
  *
7
+ * Version 8.0.00.024
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
25
  extract( $args );
26
  $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
27
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
28
+ $cache = ! is_admin() && $instance['cache'];
29
  $cachefile = wppa_get_widget_cache_path( $this->id );
30
 
31
  // Logged in only and logged out?
39
  }
40
 
41
  // Cache?
42
+ if ( $cache && wppa_is_file( $cachefile ) ) {
43
+ echo wppa_get_contents( $cachefile );
44
+ echo wppa_widget_timer( 'show', $widget_title, true );
45
+ wppa( 'in_widget', false );
46
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  $album = $instance['album'];
91
  }
92
  $result .= $widget_content . $after_widget;
93
 
94
+ echo wppa_compress_html( $result );
95
  echo wppa_widget_timer( 'show', $widget_title );
96
 
97
  // Cache?
136
 
137
  // Cache
138
  echo
139
+ wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
140
  }
141
 
142
  // Set defaults
149
  );
150
  return $defaults;
151
  }
 
152
  }
153
 
154
  // register WppaUploadWidget
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.0.00.016
7
  *
8
  */
9
 
@@ -324,14 +324,14 @@ global $wppa;
324
  if ( $wppa['geo'] == '' ) { // First
325
  $wppa['geo'] = '
326
  <div id="map-canvas-' . wppa( 'mocc' ).'" style="height:' . wppa_opt( 'map_height' ) . 'px; width:100%; padding:0; margin:0; font-size: 10px;" ></div>
327
- <script type="text/javascript" >
328
  if ( typeof ( _wppaLat ) == "undefined" ) { var _wppaLat = new Array(); var _wppaLon = new Array(); }
329
  if ( typeof ( _wppaRealId ) == "undefined" ) { var _wppaRealId = new Array(); }
330
  _wppaLat[' . wppa( 'mocc' ) . '] = new Array(); _wppaLon[' . wppa( 'mocc' ) . '] = new Array();
331
  </script>';
332
  } // End first
333
  $wppa['geo'] .= '
334
- <script type="text/javascript" >
335
  _wppaLat[' . wppa( 'mocc' ) . '][' . $id . '] = ' . $lat . ';
336
  _wppaLon[' . wppa( 'mocc' ) . '][' . $id.'] = ' . $lon . ';
337
  </script>';
@@ -1498,11 +1498,11 @@ function wppa_get_og_desc( $id, $short = false ) {
1498
  if ( $short ) {
1499
  $result = strip_shortcodes( wppa_strip_tags( wppa_html( wppa_get_photo_desc( $id ) ), 'all' ) );
1500
  if ( ! $result ) {
1501
- $result = str_replace( '&amp;', __( 'and' , 'wp-photo-album-plus'), get_bloginfo( 'name' ) );
1502
  }
1503
  }
1504
  else {
1505
- $result = sprintf( __('See this image on %s', 'wp-photo-album-plus'), str_replace( '&amp;', __( 'and' , 'wp-photo-album-plus'), get_bloginfo( 'name' ) ) ) .
1506
  ': ' .
1507
  strip_shortcodes( wppa_strip_tags( wppa_html( wppa_get_photo_desc( $id ) ), 'all' ) );
1508
  }
@@ -3369,7 +3369,6 @@ function wppa_bump_mocc() {
3369
  global $wppa;
3370
 
3371
  $wppa['mocc'] += 1;
3372
-
3373
  }
3374
 
3375
  // This is a nice simple function
@@ -3377,7 +3376,6 @@ function wppa_out( $txt ) {
3377
  global $wppa;
3378
 
3379
  $wppa['out'] .= $txt;
3380
- return;
3381
  }
3382
 
3383
  function wppa_exit() {
@@ -3400,6 +3398,9 @@ function wppa_sanitize_custom_field( $txt ) {
3400
  function wppa_is_photo_in_zip( $id ) {
3401
  global $wpdb;
3402
 
 
 
 
3403
  // Verify existance of zips dir
3404
  $zipsdir = WPPA_UPLOAD_PATH.'/zips/';
3405
  if ( ! wppa_is_dir( $zipsdir ) ) return false;
@@ -5046,12 +5047,15 @@ global $wppa_defaults;
5046
  // Compress html
5047
  function wppa_compress_html( $txt ) {
5048
 
5049
- $result = str_replace( array( "\t", "\r\n", "\n", " ", " " ), " ", $txt );
 
5050
  $result = str_replace( array( " ", " " ), " ", $result );
5051
  $result = str_replace( array( " ", " " ), " ", $result );
5052
  $result = str_replace( " ", " ", $result );
5053
  $result = str_replace( '> <', '><', $result );
5054
  $result = str_replace( '<ul></ul>', '', $result );
 
 
5055
 
5056
  return $result;
5057
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.0.00.023
7
  *
8
  */
9
 
324
  if ( $wppa['geo'] == '' ) { // First
325
  $wppa['geo'] = '
326
  <div id="map-canvas-' . wppa( 'mocc' ).'" style="height:' . wppa_opt( 'map_height' ) . 'px; width:100%; padding:0; margin:0; font-size: 10px;" ></div>
327
+ <script>
328
  if ( typeof ( _wppaLat ) == "undefined" ) { var _wppaLat = new Array(); var _wppaLon = new Array(); }
329
  if ( typeof ( _wppaRealId ) == "undefined" ) { var _wppaRealId = new Array(); }
330
  _wppaLat[' . wppa( 'mocc' ) . '] = new Array(); _wppaLon[' . wppa( 'mocc' ) . '] = new Array();
331
  </script>';
332
  } // End first
333
  $wppa['geo'] .= '
334
+ <script>
335
  _wppaLat[' . wppa( 'mocc' ) . '][' . $id . '] = ' . $lat . ';
336
  _wppaLon[' . wppa( 'mocc' ) . '][' . $id.'] = ' . $lon . ';
337
  </script>';
1498
  if ( $short ) {
1499
  $result = strip_shortcodes( wppa_strip_tags( wppa_html( wppa_get_photo_desc( $id ) ), 'all' ) );
1500
  if ( ! $result ) {
1501
+ $result = str_replace( '&amp;', __( 'and', 'wp-photo-album-plus'), get_bloginfo( 'name' ) );
1502
  }
1503
  }
1504
  else {
1505
+ $result = sprintf( __('See this image on %s', 'wp-photo-album-plus'), str_replace( '&amp;', __( 'and', 'wp-photo-album-plus'), get_bloginfo( 'name' ) ) ) .
1506
  ': ' .
1507
  strip_shortcodes( wppa_strip_tags( wppa_html( wppa_get_photo_desc( $id ) ), 'all' ) );
1508
  }
3369
  global $wppa;
3370
 
3371
  $wppa['mocc'] += 1;
 
3372
  }
3373
 
3374
  // This is a nice simple function
3376
  global $wppa;
3377
 
3378
  $wppa['out'] .= $txt;
 
3379
  }
3380
 
3381
  function wppa_exit() {
3398
  function wppa_is_photo_in_zip( $id ) {
3399
  global $wpdb;
3400
 
3401
+ // We do not zip pdfs
3402
+ if ( wppa_is_pdf( $id ) ) return false;
3403
+
3404
  // Verify existance of zips dir
3405
  $zipsdir = WPPA_UPLOAD_PATH.'/zips/';
3406
  if ( ! wppa_is_dir( $zipsdir ) ) return false;
5047
  // Compress html
5048
  function wppa_compress_html( $txt ) {
5049
 
5050
+ $result = $txt;
5051
+ $result = str_replace( array( "\t", "\r\n", "\n", " ", " " ), " ", $result );
5052
  $result = str_replace( array( " ", " " ), " ", $result );
5053
  $result = str_replace( array( " ", " " ), " ", $result );
5054
  $result = str_replace( " ", " ", $result );
5055
  $result = str_replace( '> <', '><', $result );
5056
  $result = str_replace( '<ul></ul>', '', $result );
5057
+ $result = str_replace( '</script><script>', '', $result );
5058
+ $result = str_replace( '<!--', "\n<!--", $result );
5059
 
5060
  return $result;
5061
  }
wppa-widget-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
- /* Version 7.3.08
6
  /*
7
  */
8
 
@@ -169,7 +169,6 @@ global $wpdb;
169
  return $photos;
170
  }
171
 
172
-
173
  // get the photo of the day
174
  function wppa_get_potd() {
175
  global $wpdb;
@@ -349,30 +348,6 @@ static $potd;
349
  return $result;
350
  }
351
 
352
- // Widget cache dialog
353
- function wppa_widget_cache( $class, $value ) {
354
-
355
- $options = array( __( '--- none ---', 'wp-photo-album-plus' ),
356
- '5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
357
- __( '--- infinite ---', 'wp-photo-album-plus' ),
358
- );
359
- $values = array( '0',
360
- '5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
361
- 'inf'
362
- );
363
- $result = wppa_widget_selection( $class,
364
- 'cache',
365
- $value,
366
- __( 'Select cache expiration time (min)', 'wp-photo-album-plus' ),
367
- $options,
368
- $values,
369
- array(),
370
- '',
371
- __( 'Select --- none --- to disable caching, --- infinite --- for fully smart caching', 'wp-photo-album-plus' )
372
- );
373
- return $result;
374
- }
375
-
376
  // Get widget checkbox html
377
  function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '', $disabled = false, $onchange = '' ) {
378
 
@@ -544,9 +519,14 @@ function wppa_checked( $arg ) {
544
  $result = '';
545
  }
546
 
 
 
 
 
 
547
  // 'yes' or 'on'
548
  elseif ( $arg ) {
549
- $result = ' checked="checked"';
550
  }
551
 
552
  // ''
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
+ /* Version 8.0.00.022
6
  /*
7
  */
8
 
169
  return $photos;
170
  }
171
 
 
172
  // get the photo of the day
173
  function wppa_get_potd() {
174
  global $wpdb;
348
  return $result;
349
  }
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  // Get widget checkbox html
352
  function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '', $disabled = false, $onchange = '' ) {
353
 
519
  $result = '';
520
  }
521
 
522
+ // '0'
523
+ elseif ( $arg == '0' ) {
524
+ $result = '';
525
+ }
526
+
527
  // 'yes' or 'on'
528
  elseif ( $arg ) {
529
+ $result = ' checked';
530
  }
531
 
532
  // ''
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: 8.0.00.020
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/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.0.00.020'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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: 8.0.00.024
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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.00.024'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30