WP Photo Album Plus - Version 6.8.05

Version Description

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

Release Info

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

Code changes from version 6.8.04 to 6.8.05

changelog.txt CHANGED
@@ -1,5 +1,23 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 6.8.04 =
4
 
5
  = Bug Fixes =
@@ -14,7 +32,7 @@ WP Photo Album Plus Changelog
14
 
15
  = Other Changes =
16
 
17
- * Bestof images in the box-version are now displayed like default thumbnails so the horizontal placement now behaves responsive.
18
  The height shortcode attribute is now treated as the maximum for the width and the height.
19
  * Corrected and enhanced the explanationbox on the Photo Albums -> Upload Photos admin page.
20
  * Improved lightbox performance (speed).
1
  WP Photo Album Plus Changelog
2
 
3
+ = 6.8.05 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * LasTen widget showed deleted photos until they were actually removed from the system. Fixed.
8
+
9
+ = New Features =
10
+
11
+ * Table IV-F12: Comment db agreement. Places a checkbox on the commentform to agree that the information will be stored in a db.
12
+ * Lightbox global (see Table IV-G5) now also works upon images in wpForo forums.
13
+
14
+ = Other Changes =
15
+
16
+ * Lightbox global now shows the title and the caption of the wp image as subtext on the lightbox display.
17
+ * Photo owners now have the right to remove their own photos if Table VII-D2.7 is ticked;
18
+ they do no longer need the right to edit photo information to be able to delete.
19
+ * You can set a maximum time for frontend edit in Table VII-D2.2.1 and for frontend delete in Table VII-D2.8
20
+
21
  = 6.8.04 =
22
 
23
  = Bug Fixes =
32
 
33
  = Other Changes =
34
 
35
+ * Bestof images in the box-version are now displayed like default thumbnails so the horizontal placement now behaves responsive.
36
  The height shortcode attribute is now treated as the maximum for the width and the height.
37
  * Corrected and enhanced the explanationbox on the Photo Albums -> Upload Photos admin page.
38
  * Improved lightbox performance (speed).
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 = '6.7.07';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -970,6 +970,9 @@ function wppaAjaxComment( mocc, id ) {
970
  if ( typeof ( jQuery( "#wppa-returnurl-"+mocc ).val() ) != 'undefined' ) {
971
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
972
  }
 
 
 
973
 
974
  // Do the ajax commit
975
  jQuery.ajax( { url: wppaAjaxUrl,
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '6.8.05';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
970
  if ( typeof ( jQuery( "#wppa-returnurl-"+mocc ).val() ) != 'undefined' ) {
971
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
972
  }
973
+ if ( jQuery( "#db-agree-" + mocc ).prop( 'checked' ) ) {
974
+ data += '&db-agree=yes';
975
+ }
976
 
977
  // Do the ajax commit
978
  jQuery.ajax( { url: wppaAjaxUrl,
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoAjaxRender(a,p,e,t,o,r){parseInt(o)>0&&o!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+a+", '"+p+"', '"+e+"', '"+t+"', "+o+" )",100):(wppaRenderAdd=t,""!=wppaLang&&(p+="&lang="+wppaLang),wppaAutoColumnWidth[a]&&(p+="&resp=1"),r&&_wppaCurIdx[a]&&_wppaId[a][_wppaCurIdx[a]]&&(p+="&wppa-hilite="+_wppaId[a][_wppaCurIdx[a]]),wppaCanAjaxRender||!e?jQuery.ajax({url:p,async:!0,type:"GET",timeout:6e4,beforeSend:function(p){_wppaSSRuns[a]&&_wppaStop(a),jQuery("#wppa-ajax-spin-"+a).fadeIn()},success:function(p,t,o){if(wppaRenderAdd)jQuery(wppaRenderAdd+p).insertBefore("#wppa-container-"+a+"-end");else if(wppaRenderModal&&e){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).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(a)})}else jQuery("#wppa-container-"+a).html(p),jQuery("#wppa-button-hide-"+a).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:a,type:"html",html:p},"",e),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(p){try{history.replaceState({page:wppaHis,occur:a,type:"html"},"",e),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=a)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+e,"force"),wppaQRUpdate(e)),wppaColWidth[a]=0,_wppaDoAutocol(a);var n=p.indexOf("<script"),i=p.lastIndexOf("<script");-1==n?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+n+" last at "+i,"force")},error:function(p,t,o){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+o+", status = "+t,"force"),document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)},complete:function(p,e,t){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+a).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+a).stop().fadeOut(),setTimeout(function(){jQuery(window).trigger("resize")},250)}}):(document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)))}function wppaAjaxApprovePhoto(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){rtxt=t.split("||"),"OK"==rtxt[0]?e?(jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),wppaNext(a)):(jQuery(".wppa-approve-"+p).css("display","none"),jQuery(".thumbnail-frame-photo-"+p).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+p).css("text-decoration","line-through")):alert(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p.split("||")[0]?(jQuery(".wppa-approve-"+a).css("display","none"),jQuery(".wppa-comment-"+a).css("display","none")):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){var n=t.split("||");"OK"==n[0]?(jQuery("#admin-choice-"+p+"-"+a).html(n[1]),jQuery("#admin-choice-"+p+"-"+a).val(n[1]),jQuery("#admin-choice-"+p+"-"+a).prop("disabled",!0)):alert(t),e&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip 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 wppaEditPhoto(a,p){var e=String(p),t="Edit Photo "+e,o=wppaEditPhotoWidth;screen.availWidth<o&&(o=screen.availWidth);var r;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+e+"&moccur="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+o+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>");var p='<meta name="viewport" content="width='+o+'" ><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" /><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><title>'+t+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(p,e,t){if("classic"==wppaUploadEdit&&r.document.write(p),"new"==wppaUploadEdit){var o={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(o).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,t){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+e+'" )<\/script>'),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o=jQuery("."+a),r=[],n="",i=jQuery("#"+e).val(),c=0,u=0,s="";c<o.length;)o[c].selected&&(r[u]=o[c].value,u++),c++;""!=(n=jQuery("#"+p).val())&&(r[u]=n),s=r.join(),""==n&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+s+"&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){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(a){wppaBumpViewCount&&(wppaPhotoView[a]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(p,e,t){wppaPhotoView[a]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+p+"&wppa-occur="+a+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(e,t,o){jQuery("#wppa-vote-button-"+a+"-"+p).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(a,p){if(0!=p&&!_wppaSSRuns[a]){var e=_wppaId[a][_wppaCurIdx[a]],t=_wppaMyr[a][_wppaCurIdx[a]],o=_wppaWaitTexts[a][_wppaCurIdx[a]];o.length>0?alert(o):0!=t&&wppaRatingOnce||t<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+e+"&wppa-occur="+a+"&wppa-index="+_wppaCurIdx[a]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#wppa-rate-"+a+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+a+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"spinner.gif")},success:function(p,e,t){var o=p.split("||");if(0==o[0])900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(a)):alert("Error Code="+o[1]+"\n\n"+o[2]);else{if(o[7]&&"likes"==o[7]){var r=o[4].split("|");jQuery("#wppa-like-"+a).attr("title",r[0]),jQuery("#wppa-liketext-"+a).html(r[1]),"1"==o[3]?jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]}else _wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(a),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7]);wppaNextOnCallback&&_wppaNextOnCallback(a)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(a,p,e,t){0!=p&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(t){jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+e+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(o,r,n){wppaConsoleLog(o,"force");var i=o.split("||");if(0==i[0])900==i[1]?alert(i[2]):alert("Error Code="+i[1]+"\n\n"+i[2]),jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"cross.png");else{if(i[7]&&"likes"==i[7]){var c=i[4].split("|");return jQuery("#wppa-like-0").attr("title",c[0]),jQuery("#wppa-liketext-0").html(c[1]),"1"==i[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+a+"-"+e).attr("title",c[0]),jQuery("#wppa-liketext-"+a+"-"+e).html(c[1]),void("1"==i[3]?jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(e,i[4],".wppa-avg-"),_wppaSetRd(e,i[3],".wppa-rate-"),t)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]),"zip"==wppaArtMonkyLink&&(document.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(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#dwnspin-"+a+"-"+p).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(e,t,o){jQuery("#dwnspin-"+a+"-"+p).css("display","none")}})}function wppaAjaxComment(a,p){if(_wppaValidateComment(a,p)){var e="action=wppa&wppa-action=do-comment&photo-id="+p+"&comname="+jQuery("#wppa-comname-"+a).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+a).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+a).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val()+"&moccur="+a;void 0!==jQuery("#wppa-comemail-"+a).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+a).val()),void 0!==jQuery("#wppa-comment-edit-"+a).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+a).val()),void 0!==jQuery("#wppa-returnurl-"+a).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+a).val())),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(p){jQuery("#wppa-comment-spin-"+a).css("display","inline")},success:function(p,e,t){p=p.replace(/\\/g,""),jQuery("#wppa-comments-"+a).html(p),_wppaCurIdx[a]&&(_wppaCommentHtml[a][_wppaCurIdx[a]]=p),wppaOpenComments(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(p,e,t){jQuery("#wppa-comment-spin-"+a).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){a.length>0&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxSetQrCodeSrc(a,p){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var e="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,success:function(a,e,t){document.getElementById(p).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}var wppaJsAjaxVersion="6.7.07",wppaRenderAdd=!1,wppaWaitForCounter=0,wppaLastQrcodeUrl="";wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="6.8.05",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(a,p,e,t,o,r){parseInt(o)>0&&o!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+a+", '"+p+"', '"+e+"', '"+t+"', "+o+" )",100):(wppaRenderAdd=t,""!=wppaLang&&(p+="&lang="+wppaLang),wppaAutoColumnWidth[a]&&(p+="&resp=1"),r&&_wppaCurIdx[a]&&_wppaId[a][_wppaCurIdx[a]]&&(p+="&wppa-hilite="+_wppaId[a][_wppaCurIdx[a]]),wppaCanAjaxRender||!e?jQuery.ajax({url:p,async:!0,type:"GET",timeout:6e4,beforeSend:function(p){_wppaSSRuns[a]&&_wppaStop(a),jQuery("#wppa-ajax-spin-"+a).fadeIn()},success:function(p,t,o){if(wppaRenderAdd)jQuery(wppaRenderAdd+p).insertBefore("#wppa-container-"+a+"-end");else if(wppaRenderModal&&e){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).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(a)})}else jQuery("#wppa-container-"+a).html(p),jQuery("#wppa-button-hide-"+a).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:a,type:"html",html:p},"",e),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(p){try{history.replaceState({page:wppaHis,occur:a,type:"html"},"",e),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=a)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+e,"force"),wppaQRUpdate(e)),wppaColWidth[a]=0,_wppaDoAutocol(a);var n=p.indexOf("<script"),i=p.lastIndexOf("<script");-1==n?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+n+" last at "+i,"force")},error:function(p,t,o){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+o+", status = "+t,"force"),document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)},complete:function(p,e,t){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+a).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+a).stop().fadeOut(),setTimeout(function(){jQuery(window).trigger("resize")},250)}}):(document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)))}function wppaAjaxApprovePhoto(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){rtxt=t.split("||"),"OK"==rtxt[0]?e?(jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),wppaNext(a)):(jQuery(".wppa-approve-"+p).css("display","none"),jQuery(".thumbnail-frame-photo-"+p).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+p).css("text-decoration","line-through")):alert(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p.split("||")[0]?(jQuery(".wppa-approve-"+a).css("display","none"),jQuery(".wppa-comment-"+a).css("display","none")):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){var n=t.split("||");"OK"==n[0]?(jQuery("#admin-choice-"+p+"-"+a).html(n[1]),jQuery("#admin-choice-"+p+"-"+a).val(n[1]),jQuery("#admin-choice-"+p+"-"+a).prop("disabled",!0)):alert(t),e&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip 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 wppaEditPhoto(a,p){var e,t=String(p),o="Edit Photo "+t,r=wppaEditPhotoWidth;screen.availWidth<r&&(r=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(e=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+r+", height=512",!0)).document.write("<! DOCTYPE html>"),e.document.write("<html>"),e.document.write("<head>");var p='<meta name="viewport" content="width='+r+'" ><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" /><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><title>'+o+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';e.document.write(p),e.document.write("</head>"),e.document.write("<body>")}},success:function(p,t,o){if("classic"==wppaUploadEdit&&e.document.write(p),"new"==wppaUploadEdit){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).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,t){"classic"==wppaUploadEdit&&e.document.write(p+" "+t),wppaConsoleLog("wppaEditPhoto failed. Error = "+t+", status = "+p,"force")},complete:function(a,p,o){"classic"==wppaUploadEdit&&(e.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),e.document.write("</body>"),e.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+p).val())&&(i[s]=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(a){wppaBumpViewCount&&(wppaPhotoView[a]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(p,e,t){wppaPhotoView[a]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+p+"&wppa-occur="+a+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(e,t,o){jQuery("#wppa-vote-button-"+a+"-"+p).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(a,p){if(0!=p&&!_wppaSSRuns[a]){var e=_wppaId[a][_wppaCurIdx[a]],t=_wppaMyr[a][_wppaCurIdx[a]],o=_wppaWaitTexts[a][_wppaCurIdx[a]];o.length>0?alert(o):0!=t&&wppaRatingOnce||t<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+e+"&wppa-occur="+a+"&wppa-index="+_wppaCurIdx[a]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#wppa-rate-"+a+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+a+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"spinner.gif")},success:function(p,e,t){var o=p.split("||");if(0==o[0])900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(a)):alert("Error Code="+o[1]+"\n\n"+o[2]);else{if(o[7]&&"likes"==o[7]){var r=o[4].split("|");jQuery("#wppa-like-"+a).attr("title",r[0]),jQuery("#wppa-liketext-"+a).html(r[1]),"1"==o[3]?jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]}else _wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(a),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7]);wppaNextOnCallback&&_wppaNextOnCallback(a)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(a,p,e,t){0!=p&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(t){jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+e+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(o,r,n){wppaConsoleLog(o,"force");var i=o.split("||");if(0==i[0])900==i[1]?alert(i[2]):alert("Error Code="+i[1]+"\n\n"+i[2]),jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"cross.png");else{if(i[7]&&"likes"==i[7]){var c=i[4].split("|");return jQuery("#wppa-like-0").attr("title",c[0]),jQuery("#wppa-liketext-0").html(c[1]),"1"==i[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+a+"-"+e).attr("title",c[0]),jQuery("#wppa-liketext-"+a+"-"+e).html(c[1]),void("1"==i[3]?jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(e,i[4],".wppa-avg-"),_wppaSetRd(e,i[3],".wppa-rate-"),t)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]),"zip"==wppaArtMonkyLink&&(document.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(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#dwnspin-"+a+"-"+p).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(e,t,o){jQuery("#dwnspin-"+a+"-"+p).css("display","none")}})}function wppaAjaxComment(a,p){if(_wppaValidateComment(a,p)){var e="action=wppa&wppa-action=do-comment&photo-id="+p+"&comname="+jQuery("#wppa-comname-"+a).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+a).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+a).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val()+"&moccur="+a;void 0!==jQuery("#wppa-comemail-"+a).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+a).val()),void 0!==jQuery("#wppa-comment-edit-"+a).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+a).val()),void 0!==jQuery("#wppa-returnurl-"+a).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+a).val())),jQuery("#db-agree-"+a).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(p){jQuery("#wppa-comment-spin-"+a).css("display","inline")},success:function(p,e,t){p=p.replace(/\\/g,""),jQuery("#wppa-comments-"+a).html(p),_wppaCurIdx[a]&&(_wppaCommentHtml[a][_wppaCurIdx[a]]=p),wppaOpenComments(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(p,e,t){jQuery("#wppa-comment-spin-"+a).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){a.length>0&&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,p){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var e="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,success:function(a,e,t){document.getElementById(p).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '6.7.06';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -1238,6 +1238,18 @@ wppaConsoleLog( 'wppaOvlOnClick' );
1238
  function wppaInitOverlay() {
1239
  wppaConsoleLog( 'wppaInitOverlay' );
1240
 
 
 
 
 
 
 
 
 
 
 
 
 
1241
  if ( wppaOvlMode == '' ) {
1242
  wppaOvlMode = wppaOvlModeInitial;
1243
  }
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.8.05';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
1238
  function wppaInitOverlay() {
1239
  wppaConsoleLog( 'wppaInitOverlay' );
1240
 
1241
+ // First find subtitles for non-wppa images
1242
+ jQuery( '.wp-caption' ).each( function() {
1243
+ var div = jQuery( this );
1244
+ var title = div.find( 'IMG[alt]' ).attr( 'alt' ) || '';
1245
+ var description = div.find( '.wp-caption-text' ).html() || '';
1246
+ var a = div.find( 'a' );
1247
+ var lbtitle = title + '<br>' + description;
1248
+ if ( ! a.attr( 'data-lbtitle' ) ) {
1249
+ a.attr( 'data-lbtitle', lbtitle );
1250
+ }
1251
+ });
1252
+
1253
  if ( wppaOvlMode == '' ) {
1254
  wppaOvlMode = wppaOvlModeInitial;
1255
  }
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaLightboxVersion="6.7.06",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(a[1]){var e,t,o=a[1],l=jQuery("a"),i=0;for(t=0;t<l.length;t++)e=l[t],(a=!!jQuery(e).attr("data-rel")&&jQuery(e).attr("data-rel").split("[")).length>1&&"wppa"==a[0]&&a[1]==o&&(wppaOvlUrls[i]=e.href,jQuery(e).attr("data-lbtitle")?wppaOvlTitles[i]=wppaRepairScriptTags(jQuery(e).attr("data-lbtitle")):wppaOvlTitles[i]=wppaRepairScriptTags(e.title),wppaOvlAlts[i]=jQuery(e).attr("data-alt")?jQuery(e).attr("data-alt"):"",wppaOvlVideoHtmls[i]=jQuery(e).attr("data-videohtml")?decodeURI(jQuery(e).attr("data-videohtml")):"",wppaOvlAudioHtmls[i]=jQuery(e).attr("data-audiohtml")?decodeURI(jQuery(e).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[i]=jQuery(e).attr("data-videonatwidth")?jQuery(e).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[i]=jQuery(e).attr("data-videonatheight")?jQuery(e).attr("data-videonatheight"):"",e.href==p.href&&(wppaOvlIdx=i),i++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",10);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>");var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,w,n,d,r=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(n=(i=(r-3*wppaOvlBorderWidth)/o)<(w=v/l)?i:w)<1&&(o=parseInt(o*n),l=parseInt(l*n));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),d=v-s-20-2*wppaOvlBorderWidth):d=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(d*o/l),h=(wppaOvlPadTop,parseInt((r-u)/2),u);l<d&&(wppaOvlPadTop+(d-l)/2,parseInt((r-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}function wppaOvlFormatFull(){var p,a,e;if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!0}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1),!1)}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,0==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100)}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaLightboxVersion="6.8.05",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(a[1]){var e,t,o=a[1],l=jQuery("a"),i=0;for(t=0;t<l.length;t++)e=l[t],(a=!!jQuery(e).attr("data-rel")&&jQuery(e).attr("data-rel").split("[")).length>1&&"wppa"==a[0]&&a[1]==o&&(wppaOvlUrls[i]=e.href,jQuery(e).attr("data-lbtitle")?wppaOvlTitles[i]=wppaRepairScriptTags(jQuery(e).attr("data-lbtitle")):wppaOvlTitles[i]=wppaRepairScriptTags(e.title),wppaOvlAlts[i]=jQuery(e).attr("data-alt")?jQuery(e).attr("data-alt"):"",wppaOvlVideoHtmls[i]=jQuery(e).attr("data-videohtml")?decodeURI(jQuery(e).attr("data-videohtml")):"",wppaOvlAudioHtmls[i]=jQuery(e).attr("data-audiohtml")?decodeURI(jQuery(e).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[i]=jQuery(e).attr("data-videonatwidth")?jQuery(e).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[i]=jQuery(e).attr("data-videonatheight")?jQuery(e).attr("data-videonatheight"):"",e.href==p.href&&(wppaOvlIdx=i),i++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",10);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>");var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,w,n,d,r=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(n=(i=(r-3*wppaOvlBorderWidth)/o)<(w=v/l)?i:w)<1&&(o=parseInt(o*n),l=parseInt(l*n));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),d=v-s-20-2*wppaOvlBorderWidth):d=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(d*o/l),h=(wppaOvlPadTop,parseInt((r-u)/2),u);l<d&&(wppaOvlPadTop+(d-l)/2,parseInt((r-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}function wppaOvlFormatFull(){var p,a,e;if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!0}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1),!1)}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,0==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100)}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.8.04
6
- Stable tag: 6.8.03
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -128,6 +128,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
 
131
  = 6.8.04 =
132
 
133
  * This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 6.8.05
6
+ Stable tag: 6.8.04
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
128
 
129
  == Upgrade Notice ==
130
 
131
+ = 6.8.05 =
132
+
133
+ * This version addresses various minor bug fixes and feture requests.
134
+
135
  = 6.8.04 =
136
 
137
  * This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.8.01
6
  *
7
  */
8
 
@@ -358,13 +358,24 @@ global $wppa_log_file;
358
  require_once 'wppa-non-admin.php';
359
  }
360
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  wppa( 'mocc', $_REQUEST['moccur'] );
362
  wppa( 'comment_photo', isset( $_REQUEST['photo-id'] ) ? $_REQUEST['photo-id'] : '0' );
363
  wppa( 'comment_id', isset( $_REQUEST['comment-edit'] ) ? $_REQUEST['comment-edit'] : '0' );
364
 
365
  $comment_allowed = ( ! wppa_switch( 'comment_login' ) || is_user_logged_in() );
366
- if ( wppa_switch( 'show_comments' ) && $comment_allowed ) {
367
- // if ( wppa_switch( 'search_comments' ) ) wppa_index_remove( 'photo', $_REQUEST['photo-id'] );
368
  wppa_do_comment( $_REQUEST['photo-id'] ); // Process the comment
369
  if ( wppa_switch( 'search_comments' ) ) wppa_index_update( 'photo', $_REQUEST['photo-id'] );
370
  }
@@ -428,39 +439,31 @@ global $wppa_log_file;
428
  wppa_exit();
429
 
430
  case 'remove':
431
- if ( isset( $_REQUEST['photo-id'] ) ) { // Remove photo
 
 
432
  if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
433
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
434
  }
435
  else {
436
  $photo = $_REQUEST['photo-id'];
437
  }
438
- if ( wppa_may_user_fe_edit( $photo ) ) { // Frontend edit may also delete
439
  wppa_delete_photo( $photo );
440
  echo 'OK||'.__( 'Photo removed' , 'wp-photo-album-plus');
441
  wppa_exit();
442
  }
443
  }
444
- if ( ! current_user_can( 'wppa_moderate' ) && ! current_user_can( 'wppa_comments' ) ) {
445
- _e( 'You do not have the rights to moderate photos this way' , 'wp-photo-album-plus');
446
- wppa_exit();
447
- }
448
- if ( isset( $_REQUEST['photo-id'] ) ) { // Remove photo
449
- if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
450
- $photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
451
- }
452
- else {
453
- $photo = $_REQUEST['photo-id'];
454
- }
455
- if ( ! current_user_can( 'wppa_moderate' ) ) {
456
- _e( 'Security check failure' , 'wp-photo-album-plus');
457
  wppa_exit();
458
  }
459
- wppa_delete_photo( $photo );
460
- echo 'OK||'.__( 'Photo removed' , 'wp-photo-album-plus');
461
- wppa_exit();
462
- }
463
- if ( isset( $_REQUEST['comment-id'] ) ) { // Remove comment
464
  $photo = $wpdb->get_var( $wpdb->prepare( "SELECT `photo` FROM `" . WPPA_COMMENTS . "` WHERE `id` = %s", $_REQUEST['comment-id'] ) );
465
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM `".WPPA_COMMENTS."` WHERE `id`= %s", $_REQUEST['comment-id'] ) );
466
  if ( $iret ) {
@@ -472,6 +475,8 @@ global $wppa_log_file;
472
  else _e( 'Could not remove comment' , 'wp-photo-album-plus');
473
  wppa_exit();
474
  }
 
 
475
  _e( 'Unexpected error' , 'wp-photo-album-plus');
476
  wppa_exit();
477
 
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.8.05
6
  *
7
  */
8
 
358
  require_once 'wppa-non-admin.php';
359
  }
360
 
361
+ // If db agree required, see if it is present
362
+ $doit = true;
363
+ if ( wppa_switch( 'comment_need_db_agree' ) ) {
364
+ if ( ! isset( $_REQUEST['db-agree'] ) ) {
365
+ echo
366
+ '<script type="text/javascript">' .
367
+ 'alert( "' . esc_js( __( 'Your comment needs your agreement for database storage', 'wp-photo-album-plus' ) ) . '" )' .
368
+ '</script>';
369
+ $doit = false;
370
+ }
371
+ }
372
+
373
  wppa( 'mocc', $_REQUEST['moccur'] );
374
  wppa( 'comment_photo', isset( $_REQUEST['photo-id'] ) ? $_REQUEST['photo-id'] : '0' );
375
  wppa( 'comment_id', isset( $_REQUEST['comment-edit'] ) ? $_REQUEST['comment-edit'] : '0' );
376
 
377
  $comment_allowed = ( ! wppa_switch( 'comment_login' ) || is_user_logged_in() );
378
+ if ( wppa_switch( 'show_comments' ) && $comment_allowed && $doit ) {
 
379
  wppa_do_comment( $_REQUEST['photo-id'] ); // Process the comment
380
  if ( wppa_switch( 'search_comments' ) ) wppa_index_update( 'photo', $_REQUEST['photo-id'] );
381
  }
439
  wppa_exit();
440
 
441
  case 'remove':
442
+
443
+ // Remove photo
444
+ if ( isset( $_REQUEST['photo-id'] ) ) {
445
  if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
446
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
447
  }
448
  else {
449
  $photo = $_REQUEST['photo-id'];
450
  }
451
+ if ( wppa_may_user_fe_delete( $photo ) ) {
452
  wppa_delete_photo( $photo );
453
  echo 'OK||'.__( 'Photo removed' , 'wp-photo-album-plus');
454
  wppa_exit();
455
  }
456
  }
457
+
458
+ // Remove comment
459
+ elseif ( isset( $_REQUEST['comment-id'] ) ) {
460
+
461
+ // Am i allowed to do this?
462
+ if ( ! current_user_can( 'wppa_moderate' ) && ! current_user_can( 'wppa_comments' ) ) {
463
+ _e( 'You do not have the rights to moderate photos this way' , 'wp-photo-album-plus');
 
 
 
 
 
 
464
  wppa_exit();
465
  }
466
+
 
 
 
 
467
  $photo = $wpdb->get_var( $wpdb->prepare( "SELECT `photo` FROM `" . WPPA_COMMENTS . "` WHERE `id` = %s", $_REQUEST['comment-id'] ) );
468
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM `".WPPA_COMMENTS."` WHERE `id`= %s", $_REQUEST['comment-id'] ) );
469
  if ( $iret ) {
475
  else _e( 'Could not remove comment' , 'wp-photo-album-plus');
476
  wppa_exit();
477
  }
478
+
479
+ // Remove request issued, but it is not a photo and not a comment
480
  _e( 'Unexpected error' , 'wp-photo-album-plus');
481
  wppa_exit();
482
 
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 6.8.03
7
  *
8
  */
9
 
@@ -2425,6 +2425,7 @@ global $wpdb;
2425
  wppa_delete_album_source( $id );
2426
  wppa_index_remove( 'album', $id );
2427
  wppa_clear_catlist();
 
2428
 
2429
  $msg = __( 'Album Deleted.' , 'wp-photo-album-plus');
2430
  if ( wppa( 'ajax' ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 6.8.05
7
  *
8
  */
9
 
2425
  wppa_delete_album_source( $id );
2426
  wppa_index_remove( 'album', $id );
2427
  wppa_clear_catlist();
2428
+ wppa_clear_cache();
2429
 
2430
  $msg = __( 'Album Deleted.' , 'wp-photo-album-plus');
2431
  if ( wppa( 'ajax' ) ) {
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 6.7.02
7
  *
8
  */
9
 
@@ -805,7 +805,7 @@ global $wpdb;
805
 
806
  // A single coverphoto
807
  // Output goes directly to wppa_out()
808
- function wppa_the_coverphoto( $albumid, $image, $src, $photo_pos, $photolink, $title, $imgattr_a, $events ) {
809
  global $wpdb;
810
 
811
  if ( ! $image ) {
@@ -816,9 +816,11 @@ global $wpdb;
816
  $src = wppa_fix_poster_ext( $src, $image['id'] );
817
  }
818
 
819
- $imgattr = $imgattr_a['style'];
820
- $imgwidth = $imgattr_a['width'];
821
- $imgheight = $imgattr_a['height'];
 
 
822
  $frmwidth = $imgwidth + '10'; // + 2 * 1 border + 2 * 4 padding
823
 
824
  // Find the photo frame style
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 6.8.05
7
  *
8
  */
9
 
805
 
806
  // A single coverphoto
807
  // Output goes directly to wppa_out()
808
+ function wppa_the_coverphoto( $albumid, $image, $src, $photo_pos, $photolink, $title, $imgattr_a = array(), $events ) {
809
  global $wpdb;
810
 
811
  if ( ! $image ) {
816
  $src = wppa_fix_poster_ext( $src, $image['id'] );
817
  }
818
 
819
+ $imgattr = isset( $imgattr_a['style'] ) ? $imgattr_a['style'] : '';
820
+ $imgwidth = isset( $imgattr_a['width'] ) ? $imgattr_a['width'] : '';
821
+ if ( ! $imgwidth ) $imgwidth = '0';
822
+ $imgheight = isset( $imgattr_a['height'] ) ? $imgattr_a['height'] : '';
823
+ if ( ! $imgheight ) $imgheight = '0';
824
  $frmwidth = $imgwidth + '10'; // + 2 * 1 border + 2 * 4 padding
825
 
826
  // Find the photo frame style
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -3812,6 +3812,20 @@ global $wpdb;
3812
  '</textarea>' .
3813
  '</td>' .
3814
  '</tr>' .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3815
  '</tbody>' .
3816
  '</table>' .
3817
  '</form>' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.8.05
7
  *
8
  */
9
 
3812
  '</textarea>' .
3813
  '</td>' .
3814
  '</tr>' .
3815
+ '<tr>' .
3816
+ '<td>' .
3817
+ '</td>' .
3818
+ '<td>' .
3819
+ ( wppa_switch( 'comment_need_db_agree' ) ?
3820
+ '<input type="checkbox" id="db-agree-' . wppa( 'mocc' ) . '" name="db-agree" style="float:left;" >' .
3821
+ ' ' .
3822
+ '<label for="db-agree-' . wppa( 'mocc' ) . '" style="float:left;" >' .
3823
+ '&nbsp;' .
3824
+ sprintf( __( 'I agree that the information above will be stored in a database along with my %s', 'wp-photo-album-plus' ),
3825
+ is_user_logged_in() ? __( 'login name', 'wp-photo-album-plus' ) : __( 'ip address', 'wp-photo-album-plus' ) ) .
3826
+ '</label>' : '' ) .
3827
+ '</td>' .
3828
+ '</tr>' .
3829
  '</tbody>' .
3830
  '</table>' .
3831
  '</form>' .
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 6.8.04
7
  *
8
  *
9
  */
@@ -272,7 +272,7 @@ global $wpdb;
272
 
273
  $outbuf = ob_get_clean();
274
  if ( $outbuf ) {
275
- wppa_log( 'dbg', 'Cron ' . $slug . ' unexpected output: ' . $outbuf );
276
  }
277
  }
278
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 6.8.05
7
  *
8
  *
9
  */
272
 
273
  $outbuf = ob_get_clean();
274
  if ( $outbuf ) {
275
+ wppa_log( 'dbg', 'Cron unexpected output: ' . $outbuf );
276
  }
277
  }
278
 
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -477,6 +477,9 @@ if ( get_option( 'wppa_enable_shortcode_wppa_set', 'no' ) == 'yes' ) {
477
  // Add filter for the use of our lightbox implementation for non wppa+ images
478
  add_filter( 'the_content', 'wppa_lightbox_global' );
479
 
 
 
 
480
  function wppa_lightbox_global( $content ) {
481
 
482
  if ( wppa_switch( 'lightbox_global' ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 6.8.05
7
  *
8
  */
9
 
477
  // Add filter for the use of our lightbox implementation for non wppa+ images
478
  add_filter( 'the_content', 'wppa_lightbox_global' );
479
 
480
+ // Add filter for wpForo posts
481
+ add_filter( 'wpforo_content_after', 'wppa_lightbox_global' );
482
+
483
  function wppa_lightbox_global( $content ) {
484
 
485
  if ( wppa_switch( 'lightbox_global' ) ) {
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -332,6 +332,9 @@ function wppa_get_photo_desc( $id, $xargs = array() ) {
332
  if ( $args['doshortcodes'] ) $desc = do_shortcode( $desc ); // Do shortcodes if wanted
333
  else $desc = strip_shortcodes( $desc ); // Remove shortcodes if not wanted
334
 
 
 
 
335
  $desc = wppa_html( $desc ); // Enable html
336
  $desc = balanceTags( $desc, true ); // Balance tags
337
  $desc = wppa_filter_iptc( $desc, $id ); // Render IPTC tags
@@ -339,9 +342,6 @@ function wppa_get_photo_desc( $id, $xargs = array() ) {
339
  $desc = make_clickable( $desc ); // Auto make a tags for links
340
  $desc = convert_smilies( $desc ); // Make smilies visible
341
 
342
- // Other keywords
343
- $desc = wppa_translate_photo_keywords( $id, $desc );
344
-
345
  // CMTooltipGlossary on board?
346
  $desc = wppa_filter_glossary( $desc );
347
 
@@ -372,13 +372,13 @@ function wppa_translate_photo_keywords( $id, $text ) {
372
 
373
  // Urls
374
  $w_url = wppa_get_lores_url( $id );
375
- $result = str_replace( 'w#url', '<a href="' . esc_attr( $w_url ) . ' ">' . $w_url . '</a> ', $result );
376
  $w_hrurl = wppa_get_hires_url( $id );
377
- $result = str_replace( 'w#hrurl', '<a href="' . esc_attr( $w_hrurl ) . ' ">' . $w_hrurl . '</a> ', $result );
378
  $w_tnurl = wppa_get_tnres_url( $id );
379
- $result = str_replace( 'w#tnurl', '<a href="' . esc_attr( $w_tnurl ) . ' ">' . $w_tnurl . '</a> ', $result );
380
  $w_pl = wppa_get_source_pl( $id );
381
- $result = str_replace( 'w#pl', '<a href="' . esc_attr( $w_pl ) . ' ">' . $w_pl . '</a> ', $result );
382
 
383
  // Rating
384
  $result = str_replace( 'w#rating', wppa_get_rating_by_id( $id, 'nolabel' ), $result );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 6.8.05
7
  *
8
  */
9
 
332
  if ( $args['doshortcodes'] ) $desc = do_shortcode( $desc ); // Do shortcodes if wanted
333
  else $desc = strip_shortcodes( $desc ); // Remove shortcodes if not wanted
334
 
335
+ // Other keywords
336
+ $desc = wppa_translate_photo_keywords( $id, $desc );
337
+
338
  $desc = wppa_html( $desc ); // Enable html
339
  $desc = balanceTags( $desc, true ); // Balance tags
340
  $desc = wppa_filter_iptc( $desc, $id ); // Render IPTC tags
342
  $desc = make_clickable( $desc ); // Auto make a tags for links
343
  $desc = convert_smilies( $desc ); // Make smilies visible
344
 
 
 
 
345
  // CMTooltipGlossary on board?
346
  $desc = wppa_filter_glossary( $desc );
347
 
372
 
373
  // Urls
374
  $w_url = wppa_get_lores_url( $id );
375
+ $result = str_replace( 'w#url', $w_url, $result );
376
  $w_hrurl = wppa_get_hires_url( $id );
377
+ $result = str_replace( 'w#hrurl', $w_hrurl, $result );
378
  $w_tnurl = wppa_get_tnres_url( $id );
379
+ $result = str_replace( 'w#tnurl', $w_tnurl, $result );
380
  $w_pl = wppa_get_source_pl( $id );
381
+ $result = str_replace( 'w#pl', $w_pl, $result );
382
 
383
  // Rating
384
  $result = str_replace( 'w#rating', wppa_get_rating_by_id( $id, 'nolabel' ), $result );
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
- * Version 6.8.04
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
@@ -86,7 +86,7 @@ class LasTenWidget extends WP_Widget {
86
  $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE (".$newtime.") AND `album` IN ( ".$album." ) AND ( `status` <> 'pending' AND `status` <> 'scheduled' ) ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
87
  }
88
  else {
89
- $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE (".$newtime.") AND `status` <> 'pending' AND `status` <> 'scheduled' ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
90
  }
91
  }
92
  else {
@@ -94,7 +94,7 @@ class LasTenWidget extends WP_Widget {
94
  $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE `album` IN ( ".$album." ) AND ( `status` <> 'pending' AND `status` <> 'scheduled' ) ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
95
  }
96
  else {
97
- $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE `status` <> 'pending' AND `status` <> 'scheduled' ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
98
  }
99
  }
100
 
@@ -168,7 +168,7 @@ class LasTenWidget extends WP_Widget {
168
  if ( $instance['album'] != '-99' ) $instance['albumenum'] = '';
169
  $instance['timesince'] = $new_instance['timesince'];
170
  $instance['display'] = $new_instance['display'];
171
- $instance['includesubs'] = $new_instance['includesubs'];
172
 
173
  return $instance;
174
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
+ * Version 6.8.05
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
86
  $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE (".$newtime.") AND `album` IN ( ".$album." ) AND ( `status` <> 'pending' AND `status` <> 'scheduled' ) ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
87
  }
88
  else {
89
+ $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE (".$newtime.") AND `album` > 0 AND `status` <> 'pending' AND `status` <> 'scheduled' ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
90
  }
91
  }
92
  else {
94
  $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE `album` IN ( ".$album." ) AND ( `status` <> 'pending' AND `status` <> 'scheduled' ) ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
95
  }
96
  else {
97
+ $q = "SELECT * FROM `".WPPA_PHOTOS."` WHERE `album` > 0 AND `status` <> 'pending' AND `status` <> 'scheduled' ORDER BY `" . $order_by . "` DESC LIMIT " . $max;
98
  }
99
  }
100
 
168
  if ( $instance['album'] != '-99' ) $instance['albumenum'] = '';
169
  $instance['timesince'] = $new_instance['timesince'];
170
  $instance['display'] = $new_instance['display'];
171
+ $instance['includesubs'] = isset( $new_instance['includesubs'] ) ? $new_instance['includesubs'] : false;
172
 
173
  return $instance;
174
  }
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -1089,7 +1089,6 @@ global $wppa_timestamp_start;
1089
  case 'wppa_append_to_photodesc':
1090
  case 'wppa_remove_from_photodesc':
1091
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
1092
- // update_option( 'wppa_remake_index_photos_status', __('Required', 'wp-photo-album-plus') );
1093
  break;
1094
  case 'wppa_regen_thumbs':
1095
  wppa_bump_thumb_rev();
@@ -1105,8 +1104,7 @@ global $wppa_timestamp_start;
1105
  case 'wppa_edit_tag':
1106
  wppa_clear_taglist();
1107
  if ( wppa_switch( 'search_tags' ) ) {
1108
- wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
1109
- // update_option( 'wppa_remake_index_photos_status', __('Required', 'wp-photo-album-plus') );
1110
  }
1111
  $reload = 'reload';
1112
  break;
@@ -1130,8 +1128,6 @@ global $wppa_timestamp_start;
1130
 
1131
  }
1132
 
1133
- // wppa_save_session();
1134
-
1135
  if ( wppa_is_cron() ) {
1136
  if ( get_option( $slug . '_ad_inf' ) == 'yes' ) {
1137
  wppa_schedule_maintenance_proc( $slug );
@@ -1142,13 +1138,8 @@ global $wppa_timestamp_start;
1142
  if ( $outbuf ) {
1143
  wppa_log( 'dbg', 'Cron ' . $slug . ' unexpected output: ' . $outbuf );
1144
  }
1145
-
1146
- // // To prevent: End of script output before headers: wp-cron.php
1147
- // header( "HTTP/1.0 200 OK" );
1148
- // exit( 0 ); // return;
1149
  }
1150
  else {
1151
- // header( "HTTP/1.0 200 OK" );
1152
  return $errtxt.'||'.$slug.'||'.$status.'||'.$togo.'||'.$reload;
1153
  }
1154
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.8.05
7
  *
8
  */
9
 
1089
  case 'wppa_append_to_photodesc':
1090
  case 'wppa_remove_from_photodesc':
1091
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
 
1092
  break;
1093
  case 'wppa_regen_thumbs':
1094
  wppa_bump_thumb_rev();
1104
  case 'wppa_edit_tag':
1105
  wppa_clear_taglist();
1106
  if ( wppa_switch( 'search_tags' ) ) {
1107
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
 
1108
  }
1109
  $reload = 'reload';
1110
  break;
1128
 
1129
  }
1130
 
 
 
1131
  if ( wppa_is_cron() ) {
1132
  if ( get_option( $slug . '_ad_inf' ) == 'yes' ) {
1133
  wppa_schedule_maintenance_proc( $slug );
1138
  if ( $outbuf ) {
1139
  wppa_log( 'dbg', 'Cron ' . $slug . ' unexpected output: ' . $outbuf );
1140
  }
 
 
 
 
1141
  }
1142
  else {
 
1143
  return $errtxt.'||'.$slug.'||'.$status.'||'.$togo.'||'.$reload;
1144
  }
1145
  }
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 6.8.04
7
  *
8
  */
9
 
@@ -165,11 +165,7 @@ echo '
165
  // To make sure we are on a page that contains at least [wppa] we check for Get var 'wppa-album'.
166
  // This also narrows the selection of featured photos to those that exist in the current album.
167
  $done = array();
168
- $album = '';
169
- if ( isset( $_REQUEST['album'] ) ) $album = $_REQUEST['album'];
170
- elseif ( isset( $_REQUEST['wppa-album'] ) ) $album = $_REQUEST['wppa-album'];
171
- $album = strip_tags( $album );
172
- if ( strlen( $album == 12 ) ) $album = wppa_get_get( 'album' );
173
 
174
  if ( $album ) {
175
  if ( wppa_switch( 'meta_page' ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.8.05
7
  *
8
  */
9
 
165
  // To make sure we are on a page that contains at least [wppa] we check for Get var 'wppa-album'.
166
  // This also narrows the selection of featured photos to those that exist in the current album.
167
  $done = array();
168
+ $album = wppa_get_get( 'album' );
 
 
 
 
169
 
170
  if ( $album ) {
171
  if ( wppa_switch( 'meta_page' ) ) {
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 6.7.12
7
  *
8
  */
9
 
@@ -139,7 +139,7 @@ function wppa_get_picture_html( $args ) {
139
  $result .=
140
  '<a' .
141
  ' href="' . $link['url'] . '"' .
142
- ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.$lbtitle.'"' : '' ) .
143
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
144
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
145
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 6.8.05
7
  *
8
  */
9
 
139
  $result .=
140
  '<a' .
141
  ' href="' . $link['url'] . '"' .
142
+ ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.esc_attr($lbtitle).'"' : '' ) .
143
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
144
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
145
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
wppa-search-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -74,8 +74,8 @@ class SearchPhotos extends WP_Widget {
74
  $instance['sub'] = isset( $new_instance['sub'] ) ? $new_instance['sub'] : false;
75
  $instance['album'] = $new_instance['album'];
76
  $instance['landingpage'] = $new_instance['landingpage'];
77
- $instance['catbox'] = $new_instance['catbox'];
78
- $instance['selboxes'] = $new_instance['selboxes'];
79
 
80
  return $instance;
81
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
+ * Version 6.8.05
7
  *
8
  */
9
 
74
  $instance['sub'] = isset( $new_instance['sub'] ) ? $new_instance['sub'] : false;
75
  $instance['album'] = $new_instance['album'];
76
  $instance['landingpage'] = $new_instance['landingpage'];
77
+ $instance['catbox'] = isset( $new_instance['catbox'] ) ? $new_instance['catbox'] : false;
78
+ $instance['selboxes'] = isset( $new_instance['selboxes'] ) ? $new_instance['selboxes'] : false;
79
 
80
  return $instance;
81
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -4879,6 +4879,15 @@ global $wppa_supported_camara_brands;
4879
  $tags = 'comment,layout';
4880
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
4881
 
 
 
 
 
 
 
 
 
 
4882
  }
4883
  wppa_setting_subheader( 'G', '1', __( 'Lightbox related settings. These settings have effect only when Table IX-J3 is set to wppa' , 'wp-photo-album-plus') );
4884
  {
@@ -6839,6 +6848,25 @@ global $wppa_supported_camara_brands;
6839
  $tags = 'access,system,upload';
6840
  wppa_setting($slug, '2.2', $name, $desc, $html, $help, $clas, $tags);
6841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6842
  $name = __('Fe Edit Theme CSS', 'wp-photo-album-plus');
6843
  $desc = __('The front-end edit photo dialog uses the theme CSS.', 'wp-photo-album-plus');
6844
  $help = esc_js(__('This setting has effect when Table VII D2.1 is set to \'classic\' only.', 'wp-photo-album-plus'));
@@ -6898,6 +6926,25 @@ global $wppa_supported_camara_brands;
6898
  $tags = 'access,system,upload';
6899
  wppa_setting($slug, '2.7', $name, $desc, $html, $help, $clas, $tags);
6900
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6901
  $name = __('Uploader Moderate Comment', 'wp-photo-album-plus');
6902
  $desc = __('The owner of the photo can moderate the photos comments.', 'wp-photo-album-plus');
6903
  $help = esc_js(__('This setting requires "Uploader edit" to be enabled also.', 'wp-photo-album-plus'));
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.8.05
7
  *
8
  */
9
 
4879
  $tags = 'comment,layout';
4880
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
4881
 
4882
+ $name = __('Comment db agreement', 'wp-photo-album-plus');
4883
+ $desc = __('User needs to tick a checkbox to agree db storage', 'wp-photo-album-plus');
4884
+ $help = '';
4885
+ $slug = 'wppa_comment_need_db_agree';
4886
+ $html = wppa_checkbox($slug);
4887
+ $clas = 'wppa_comment_';
4888
+ $tags = 'comment,layout';
4889
+ wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
4890
+
4891
  }
4892
  wppa_setting_subheader( 'G', '1', __( 'Lightbox related settings. These settings have effect only when Table IX-J3 is set to wppa' , 'wp-photo-album-plus') );
4893
  {
6848
  $tags = 'access,system,upload';
6849
  wppa_setting($slug, '2.2', $name, $desc, $html, $help, $clas, $tags);
6850
 
6851
+ $name = __('Fe Edit period', 'wp-photo-album-plus');
6852
+ $desc = __('The time since upload the user can edit photo info', 'wp-photo-album-plus');
6853
+ $help = __('Frontend Edit should be set in order to have effect', 'wp-photo-album-plus');
6854
+ $help .= '. ' . __('This limit does not apply for administrators and superusers', 'wp-photo-album-plus');
6855
+ $slug = 'wppa_upload_edit_period';
6856
+ $opts = array( __('15 minutes', 'wp-photo-album-plus'),
6857
+ __('one hour', 'wp-photo-album-plus'),
6858
+ __('three hours', 'wp-photo-album-plus'),
6859
+ __('one day', 'wp-photo-album-plus'),
6860
+ __('for ever', 'wp-photo-album-plus'),
6861
+ );
6862
+ $vals = array( 900, 3600, 10800, 86400, 0 );
6863
+ $html1 = wppa_select($slug, $opts, $vals);
6864
+ $html2 = '';
6865
+ $html = array( $html1, $html2 );
6866
+ $clas = '';
6867
+ $tags = 'access,system,upload';
6868
+ wppa_setting($slug, '2.2.1', $name, $desc, $html, $help, $clas, $tags);
6869
+
6870
  $name = __('Fe Edit Theme CSS', 'wp-photo-album-plus');
6871
  $desc = __('The front-end edit photo dialog uses the theme CSS.', 'wp-photo-album-plus');
6872
  $help = esc_js(__('This setting has effect when Table VII D2.1 is set to \'classic\' only.', 'wp-photo-album-plus'));
6926
  $tags = 'access,system,upload';
6927
  wppa_setting($slug, '2.7', $name, $desc, $html, $help, $clas, $tags);
6928
 
6929
+ $name = __('Fe Delete period', 'wp-photo-album-plus');
6930
+ $desc = __('The time since upload the user can delete the photo', 'wp-photo-album-plus');
6931
+ $help = __('Frontend Delete should be set in order to have effect', 'wp-photo-album-plus');
6932
+ $help .= '. ' . __('This limit does not apply for administrators and superusers', 'wp-photo-album-plus');
6933
+ $slug = 'wppa_upload_delete_period';
6934
+ $opts = array( __('15 minutes', 'wp-photo-album-plus'),
6935
+ __('one hour', 'wp-photo-album-plus'),
6936
+ __('three hours', 'wp-photo-album-plus'),
6937
+ __('one day', 'wp-photo-album-plus'),
6938
+ __('for ever', 'wp-photo-album-plus'),
6939
+ );
6940
+ $vals = array( 900, 3600, 10800, 86400, 0 );
6941
+ $html1 = wppa_select($slug, $opts, $vals);
6942
+ $html2 = '';
6943
+ $html = array( $html1, $html2 );
6944
+ $clas = '';
6945
+ $tags = 'access,system,upload';
6946
+ wppa_setting($slug, '2.8', $name, $desc, $html, $help, $clas, $tags);
6947
+
6948
  $name = __('Uploader Moderate Comment', 'wp-photo-album-plus');
6949
  $desc = __('The owner of the photo can moderate the photos comments.', 'wp-photo-album-plus');
6950
  $help = esc_js(__('This setting requires "Uploader edit" to be enabled also.', 'wp-photo-album-plus'));
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -1276,6 +1276,7 @@ Hide Camera info
1276
  'wppa_comment_smiley_picker' => 'no',
1277
  'wppa_mail_upl_email' => 'yes',
1278
  'wppa_comment_clickable' => 'no',
 
1279
 
1280
  // G Overlay
1281
  'wppa_ovl_opacity' => '80',
@@ -1453,6 +1454,7 @@ Hide Camera info
1453
  'wppa_mail_on_approve' => 'no',
1454
  'wppa_upload_edit' => '-none-',
1455
  'wppa_upload_edit_users' => 'admin',
 
1456
  'wppa_upload_edit_theme_css' => 'no',
1457
  'wppa_fe_edit_name' => 'yes',
1458
  'wppa_fe_edit_desc' => 'yes',
@@ -1460,6 +1462,7 @@ Hide Camera info
1460
  'wppa_fe_edit_button' => __( 'Edit', 'wp-photo-album-plus' ),
1461
  'wppa_fe_edit_caption' => __( 'Edit photo information', 'wp-photo-album-plus' ),
1462
  'wppa_upload_delete' => 'no',
 
1463
  'wppa_owner_moderate_comment' => 'no',
1464
  'wppa_upload_notify' => 'no',
1465
  'wppa_upload_backend_notify' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.8.05
7
  *
8
  */
9
 
1276
  'wppa_comment_smiley_picker' => 'no',
1277
  'wppa_mail_upl_email' => 'yes',
1278
  'wppa_comment_clickable' => 'no',
1279
+ 'wppa_comment_need_db_agree' => 'no',
1280
 
1281
  // G Overlay
1282
  'wppa_ovl_opacity' => '80',
1454
  'wppa_mail_on_approve' => 'no',
1455
  'wppa_upload_edit' => '-none-',
1456
  'wppa_upload_edit_users' => 'admin',
1457
+ 'wppa_upload_edit_period' => '0',
1458
  'wppa_upload_edit_theme_css' => 'no',
1459
  'wppa_fe_edit_name' => 'yes',
1460
  'wppa_fe_edit_desc' => 'yes',
1462
  'wppa_fe_edit_button' => __( 'Edit', 'wp-photo-album-plus' ),
1463
  'wppa_fe_edit_caption' => __( 'Edit photo information', 'wp-photo-album-plus' ),
1464
  'wppa_upload_delete' => 'no',
1465
+ 'wppa_upload_delete_period' => '0',
1466
  'wppa_owner_moderate_comment' => 'no',
1467
  'wppa_upload_notify' => 'no',
1468
  'wppa_upload_backend_notify' => 'no',
wppa-users.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
- * Version 6.8.0
7
  *
8
  */
9
 
@@ -292,7 +292,21 @@ function wppa_may_user_fe_edit( $id ) {
292
  switch( wppa_opt( 'upload_edit_users') ) {
293
 
294
  case 'owner':
295
- if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  break;
297
 
298
  }
@@ -312,7 +326,19 @@ function wppa_may_user_fe_delete( $id ) {
312
  // If owner and owners may delete?
313
  if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) {
314
  if ( wppa_switch( 'upload_delete' ) ) {
315
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
316
  }
317
  }
318
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
+ * Version 6.8.05
7
  *
8
  */
9
 
292
  switch( wppa_opt( 'upload_edit_users') ) {
293
 
294
  case 'owner':
295
+ if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) {
296
+ if ( wppa_opt( 'upload_edit_period' ) ) {
297
+ $up = wppa_get_photo_item( $id, 'timestamp' );
298
+ $to = $up + wppa_opt( 'upload_edit_period' );
299
+ if ( time() < $to ) {
300
+ return true;
301
+ }
302
+ else {
303
+ return false;
304
+ }
305
+ }
306
+ else {
307
+ return true;
308
+ }
309
+ }
310
  break;
311
 
312
  }
326
  // If owner and owners may delete?
327
  if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) {
328
  if ( wppa_switch( 'upload_delete' ) ) {
329
+ if ( wppa_opt( 'upload_delete_period' ) ) {
330
+ $up = wppa_get_photo_item( $id, 'timestamp' );
331
+ $to = $up + wppa_opt( 'upload_delete_period' );
332
+ if ( time() < $to ) {
333
+ return true;
334
+ }
335
+ else {
336
+ return false;
337
+ }
338
+ }
339
+ else {
340
+ return true;
341
+ }
342
  }
343
  }
344
 
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 6.8.00
7
  *
8
  */
9
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 6.8.05
7
  *
8
  */
9
 
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.8.04
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6804'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-8-04-007'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.8.05
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6805'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-8-05-004'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );