WP Photo Album Plus - Version 7.4.00.004

Version Description

= 7.4.00 =

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

Release Info

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

Code changes from version 7.4.00.003 to 7.4.00.004

js/wppa-ajax-front.js CHANGED
@@ -1111,9 +1111,9 @@ function wppaAjaxComment( mocc, id ) {
1111
  // New style front-end edit photo
1112
  function wppaUpdatePhotoNew(id) {
1113
 
1114
- var myItems = [ 'name',
1115
- 'description',
1116
- 'tags',
1117
  'custom_0',
1118
  'custom_1',
1119
  'custom_2',
1111
  // New style front-end edit photo
1112
  function wppaUpdatePhotoNew(id) {
1113
 
1114
+ var myItems = [ 'upn-name',
1115
+ 'upn-description',
1116
+ 'upn-tags',
1117
  'custom_0',
1118
  'custom_1',
1119
  'custom_2',
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="7.4.000",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end"):wppaRenderModal&&i?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+n).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(n)})):(jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show()),wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"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(o,r,n){wppaConsoleLog("wppaAjaxRequestInfo started","force"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r,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)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRequestInfo 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,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,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){wppaConsoleLog("_bumpClickCount success.")},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(r,p){var a,e,t;0!=p&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).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="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");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-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[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-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;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){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[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],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"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){var p;_wppaValidateComment(t,a)&&(p="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()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,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=["name","description","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,o){var p;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}}))}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,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")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="7.4.000",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end"):wppaRenderModal&&i?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+n).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(n)})):(jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show()),wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"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(o,r,n){wppaConsoleLog("wppaAjaxRequestInfo started","force"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r,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)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRequestInfo 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,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,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){wppaConsoleLog("_bumpClickCount success.")},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(r,p){var a,e,t;0!=p&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).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="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");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-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[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-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;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){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[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],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"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){var p;_wppaValidateComment(t,a)&&(p="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()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,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,o){var p;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}}))}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,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")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.4.00.003
6
  Stable tag: 7.3.12.008
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.4.00.004
6
  Stable tag: 7.3.12.008
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
wppa-ajax.php CHANGED
@@ -375,7 +375,7 @@ global $wppa_log_file;
375
  break;
376
 
377
  case 'update-photo-new': // Do the actual edit update
378
-
379
  // Get photo id
380
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
381
  $photo = strval( intval( $photo ) );
@@ -388,21 +388,21 @@ global $wppa_log_file;
388
  if ( ! isset( $_REQUEST['photo-id'] ) ) die( 'Missing required argument' );
389
 
390
  // Name
391
- if ( isset( $_POST['name'] ) ) {
392
- $name = stripslashes( strip_tags( $_POST['name'] ) );
393
  wppa_update_photo( array( 'id' => $photo, 'name' => $name ) );
394
  }
395
 
396
  // Description
397
- if ( isset( $_POST['description'] ) ) {
398
- $desc = str_replace( array( '<br/>','<br>' ), '<br />', $_POST['description'] );
399
  $desc = stripslashes( balanceTags( $desc, true ) );
400
  wppa_update_photo( array( 'id' => $photo, 'description' => $desc ) );
401
  }
402
 
403
  // Tags
404
- if ( isset( $_POST['tags'] ) ) {
405
- $tags = wppa_sanitize_tags( $_POST['tags'] );
406
  wppa_update_photo( array( 'id' => $photo, 'tags' => $tags ) );
407
  wppa_clear_taglist();
408
  }
375
  break;
376
 
377
  case 'update-photo-new': // Do the actual edit update
378
+ wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POST),true)));
379
  // Get photo id
380
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
381
  $photo = strval( intval( $photo ) );
388
  if ( ! isset( $_REQUEST['photo-id'] ) ) die( 'Missing required argument' );
389
 
390
  // Name
391
+ if ( isset( $_POST['upn-name'] ) ) {
392
+ $name = stripslashes( strip_tags( $_POST['upn-name'] ) );
393
  wppa_update_photo( array( 'id' => $photo, 'name' => $name ) );
394
  }
395
 
396
  // Description
397
+ if ( isset( $_POST['upn-description'] ) ) {
398
+ $desc = str_replace( array( '<br/>','<br>' ), '<br />', $_POST['upn-description'] );
399
  $desc = stripslashes( balanceTags( $desc, true ) );
400
  wppa_update_photo( array( 'id' => $photo, 'description' => $desc ) );
401
  }
402
 
403
  // Tags
404
+ if ( isset( $_POST['upn-tags'] ) ) {
405
+ $tags = wppa_sanitize_tags( $_POST['upn-tags'] );
406
  wppa_update_photo( array( 'id' => $photo, 'tags' => $tags ) );
407
  wppa_clear_taglist();
408
  }
wppa-boxes-html.php CHANGED
@@ -606,7 +606,7 @@ global $wppa_supported_camara_brands;
606
  '<select' .
607
  ' id="' . $id . '"' .
608
  ' name="wppa-ss-pa"' .
609
- ' style="margin:2px;padding:0;vertical-align:top;"' .
610
  ' onchange="wppaSuperSearchSelect( ' . wppa('mocc') . ' );"' .
611
  ' size="2"' .
612
  ' >' .
@@ -630,7 +630,7 @@ global $wppa_supported_camara_brands;
630
  '<select' .
631
  ' id="' . $id . '"' .
632
  ' name="wppa-ss-albumopt"' .
633
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
634
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
635
  ' size="' . ( ! empty( $catlist ) ? '3' : '2' ) . '"' .
636
  ' >' .
@@ -663,7 +663,7 @@ global $wppa_supported_camara_brands;
663
  '<select'.
664
  ' id="' . $id . '"' .
665
  ' name="wppa-ss-albumcat"' .
666
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
667
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
668
  ' size="' . ( min( count( $catlist ), '6' ) ) . '"' .
669
  ' multiple' .
@@ -693,7 +693,7 @@ global $wppa_supported_camara_brands;
693
  '<select'.
694
  ' id="' . $id . '"' .
695
  ' name="wppa-ss-albumname"' .
696
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
697
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
698
  ' size="' . ( min( count( $albums ), '6' ) ) . '"' .
699
  ' >';
@@ -717,7 +717,7 @@ global $wppa_supported_camara_brands;
717
  <select'.
718
  ' id="' . $id . '"' .
719
  ' name="wppa-ss-albumtext"' .
720
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
721
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
722
  ' size="' . ( min( count( $albumtxt ), '6' ) ) . '"' .
723
  ' multiple="multiple"' .
@@ -752,7 +752,7 @@ global $wppa_supported_camara_brands;
752
  <select'.
753
  ' id="wppa-ss-photoopt-'.wppa('mocc').'"' .
754
  ' name="wppa-ss-photoopt"' .
755
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
756
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
757
  ' size="' . $n . '"' .
758
  ' >' .
@@ -814,7 +814,7 @@ global $wppa_supported_camara_brands;
814
  <select'.
815
  ' id="' . $id . '"' .
816
  ' name="wppa-ss-photoname"' .
817
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
818
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
819
  ' size="' . min( count( $photonames ), '6' ) . '"' .
820
  ' >';
@@ -838,7 +838,7 @@ global $wppa_supported_camara_brands;
838
  <select'.
839
  ' id="' . $id . '"' .
840
  ' name="wppa-ss-photoowner"' .
841
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
842
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
843
  ' size="' . ( min( count( $ownerlist ), '6' ) ) . '"' .
844
  ' >';
@@ -863,7 +863,7 @@ global $wppa_supported_camara_brands;
863
  <select'.
864
  ' id="' . $id . '"' .
865
  ' name="wppa-ss-phototag"' .
866
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
867
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
868
  ' size="' . ( min( count( $taglist ), '6' ) ) . '"' .
869
  ' multiple' .
@@ -893,7 +893,7 @@ global $wppa_supported_camara_brands;
893
  <select' .
894
  ' id="' . $id . '"' .
895
  ' name="wppa-ss-phototext"' .
896
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
897
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
898
  ' size="' . ( min( count( $phototxt ), '6' ) ) . '"' .
899
  ' multiple="multiple"' .
@@ -922,7 +922,7 @@ global $wppa_supported_camara_brands;
922
  <select' .
923
  ' id="wppa-ss-photoiptc-'.wppa('mocc').'"' .
924
  ' name="wppa-ss-photoiptc"' .
925
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
926
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
927
  ' size="' . min( count( $iptclist ), '6' ) . '"' .
928
  ' >';
@@ -946,7 +946,7 @@ global $wppa_supported_camara_brands;
946
  <select' .
947
  ' id="wppa-ss-iptcopts-'.wppa('mocc').'"' .
948
  ' name="wppa-ss-iptcopts"' .
949
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
950
  ' size="6"' .
951
  ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
952
  ' >
@@ -957,7 +957,7 @@ global $wppa_supported_camara_brands;
957
  <select' .
958
  ' id="wppa-ss-photoexif-'.wppa('mocc').'"' .
959
  ' name="wppa-ss-photoexif"' .
960
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
961
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
962
  ' size="' . min( count( $exiflist ), '6' ) . '"' .
963
  ' >';
@@ -1010,7 +1010,7 @@ global $wppa_supported_camara_brands;
1010
  <select' .
1011
  ' id="wppa-ss-exifopts-'.wppa('mocc').'"' .
1012
  ' name="wppa-ss-exifopts"' .
1013
- ' style="display:none;margin:2px;padding:0;vertical-align:top;"' .
1014
  ' size="6"' .
1015
  ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
1016
  ' >
606
  '<select' .
607
  ' id="' . $id . '"' .
608
  ' name="wppa-ss-pa"' .
609
+ ' style="margin:2px;padding:0;vertical-align:top;float:left;"' .
610
  ' onchange="wppaSuperSearchSelect( ' . wppa('mocc') . ' );"' .
611
  ' size="2"' .
612
  ' >' .
630
  '<select' .
631
  ' id="' . $id . '"' .
632
  ' name="wppa-ss-albumopt"' .
633
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
634
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
635
  ' size="' . ( ! empty( $catlist ) ? '3' : '2' ) . '"' .
636
  ' >' .
663
  '<select'.
664
  ' id="' . $id . '"' .
665
  ' name="wppa-ss-albumcat"' .
666
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
667
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
668
  ' size="' . ( min( count( $catlist ), '6' ) ) . '"' .
669
  ' multiple' .
693
  '<select'.
694
  ' id="' . $id . '"' .
695
  ' name="wppa-ss-albumname"' .
696
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
697
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
698
  ' size="' . ( min( count( $albums ), '6' ) ) . '"' .
699
  ' >';
717
  <select'.
718
  ' id="' . $id . '"' .
719
  ' name="wppa-ss-albumtext"' .
720
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
721
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
722
  ' size="' . ( min( count( $albumtxt ), '6' ) ) . '"' .
723
  ' multiple="multiple"' .
752
  <select'.
753
  ' id="wppa-ss-photoopt-'.wppa('mocc').'"' .
754
  ' name="wppa-ss-photoopt"' .
755
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
756
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
757
  ' size="' . $n . '"' .
758
  ' >' .
814
  <select'.
815
  ' id="' . $id . '"' .
816
  ' name="wppa-ss-photoname"' .
817
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
818
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
819
  ' size="' . min( count( $photonames ), '6' ) . '"' .
820
  ' >';
838
  <select'.
839
  ' id="' . $id . '"' .
840
  ' name="wppa-ss-photoowner"' .
841
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
842
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
843
  ' size="' . ( min( count( $ownerlist ), '6' ) ) . '"' .
844
  ' >';
863
  <select'.
864
  ' id="' . $id . '"' .
865
  ' name="wppa-ss-phototag"' .
866
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
867
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
868
  ' size="' . ( min( count( $taglist ), '6' ) ) . '"' .
869
  ' multiple' .
893
  <select' .
894
  ' id="' . $id . '"' .
895
  ' name="wppa-ss-phototext"' .
896
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
897
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
898
  ' size="' . ( min( count( $phototxt ), '6' ) ) . '"' .
899
  ' multiple="multiple"' .
922
  <select' .
923
  ' id="wppa-ss-photoiptc-'.wppa('mocc').'"' .
924
  ' name="wppa-ss-photoiptc"' .
925
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
926
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
927
  ' size="' . min( count( $iptclist ), '6' ) . '"' .
928
  ' >';
946
  <select' .
947
  ' id="wppa-ss-iptcopts-'.wppa('mocc').'"' .
948
  ' name="wppa-ss-iptcopts"' .
949
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
950
  ' size="6"' .
951
  ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
952
  ' >
957
  <select' .
958
  ' id="wppa-ss-photoexif-'.wppa('mocc').'"' .
959
  ' name="wppa-ss-photoexif"' .
960
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
961
  ' onchange="wppaSuperSearchSelect( '.wppa('mocc').' );"' .
962
  ' size="' . min( count( $exiflist ), '6' ) . '"' .
963
  ' >';
1010
  <select' .
1011
  ' id="wppa-ss-exifopts-'.wppa('mocc').'"' .
1012
  ' name="wppa-ss-exifopts"' .
1013
+ ' style="display:none;margin:2px;padding:0;vertical-align:top;float:left;"' .
1014
  ' size="6"' .
1015
  ' onchange="wppaSuperSearchSelect('.wppa('mocc').')"' .
1016
  ' >
wppa-photo-admin-autosave.php CHANGED
@@ -3561,9 +3561,9 @@ global $wppa_search_stats;
3561
  // New style fron-end edit photo
3562
  function wppa_fe_edit_new_style( $photo ) {
3563
 
3564
- $items = array( 'name',
3565
- 'description',
3566
- 'tags',
3567
  'custom_0',
3568
  'custom_1',
3569
  'custom_2',
@@ -3665,8 +3665,8 @@ function wppa_fe_edit_new_style( $photo ) {
3665
  $value = stripslashes( $custom_data[substr( $items[$idx], -1 )] );
3666
  }
3667
  else {
3668
- $value = wppa_get_photo_item( $photo, $items[$idx] );
3669
- if ( $items[$idx] == 'tags' ) {
3670
  $value = trim( $value, ',' );
3671
  }
3672
  }
3561
  // New style fron-end edit photo
3562
  function wppa_fe_edit_new_style( $photo ) {
3563
 
3564
+ $items = array( 'upn-name',
3565
+ 'upn-description',
3566
+ 'upn-tags',
3567
  'custom_0',
3568
  'custom_1',
3569
  'custom_2',
3665
  $value = stripslashes( $custom_data[substr( $items[$idx], -1 )] );
3666
  }
3667
  else {
3668
+ $value = wppa_get_photo_item( $photo, str_replace( 'upn-', '', $items[$idx] ) );
3669
+ if ( $items[$idx] == 'upn-tags' ) {
3670
  $value = trim( $value, ',' );
3671
  }
3672
  }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 7.4.00.003
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7400'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.4.00.003'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.4.00.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7400'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.4.00.004'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';