WP Photo Album Plus - Version 7.0.00.005

Version Description

= 7.0.00 =

  • Shortcode generators for Gutenberg added
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Use the WPPA+ Notify widget.

= 6.9.21 =

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

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

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

= 6.9.16 =

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

= 6.9.15 =

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

= 6.9.14 =

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

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

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

= 6.9.05 =

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

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

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

= 6.9.02 =

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

= 6.9.01 =

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

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

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

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.0.00.003 to 7.0.00.005

changelog.txt CHANGED
@@ -2,14 +2,20 @@ WP Photo Album Plus Changelog
2
 
3
  = 7.0.00 =
4
 
 
 
 
 
5
  = New Features =
6
 
7
  * Shortcode generators for Gutenberg added.
 
8
 
9
  = Other Changes =
10
 
11
  * Removed Table IX-A14. Frontend code is now always loaded.
12
  * Removed script to shortcode conversion warning and tool.
 
13
 
14
  = 6.9.21 =
15
 
2
 
3
  = 7.0.00 =
4
 
5
+ = Bug Fixes =
6
+
7
+ * [wppa type="slphoto" photo="#last"] did not work. Fixed.
8
+
9
  = New Features =
10
 
11
  * Shortcode generators for Gutenberg added.
12
+ * New widget: WPPA+ Notify. Users can subscribe/unsubscribe for various mailings.
13
 
14
  = Other Changes =
15
 
16
  * Removed Table IX-A14. Frontend code is now always loaded.
17
  * Removed script to shortcode conversion warning and tool.
18
+ * The shortcode generators now produce self-closing shortcodes, i.e. without [/wppa].
19
 
20
  = 6.9.21 =
21
 
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.9.05';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -1101,5 +1101,30 @@ function wppaAjaxSetQrCodeSrc( url, elm ) {
1101
  } );
1102
  }
1103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1104
  // Log we're in.
1105
  wppaConsoleLog( 'wppa-ajax-front.js version '+wppaJsAjaxVersion+' loaded.', 'force' );
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '7.0.00';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
1101
  } );
1102
  }
1103
 
1104
+ // Add/remove a user to a mailinglist
1105
+ function wppaAjaxNotify( elm, list ) {
1106
+
1107
+ var onoff = jQuery( elm ).prop( 'checked' ) ? 'on' : 'off';
1108
+ var myData = 'action=wppa' +
1109
+ '&wppa-action=mailinglist' +
1110
+ '&wppa-ntfy-nonce=' + jQuery( '#wppa-ntfy-nonce' ).val() +
1111
+ '&list=' + list +
1112
+ '&onoff=' + onoff;
1113
+
1114
+ jQuery.ajax( { url: wppaAjaxUrl,
1115
+ data: myData,
1116
+ async: true,
1117
+ type: 'POST',
1118
+ timeout: 10000,
1119
+ success: function( result, status, xhr ) {
1120
+ alert( result );
1121
+ },
1122
+ error: function( xhr, status, error ) {
1123
+ wppaConsoleLog( 'wppaAjaxNotify failed. Error = ' + error + ', status = ' + status, 'force' );
1124
+ }
1125
+ } );
1126
+ }
1127
+
1128
+
1129
  // Log we're in.
1130
  wppaConsoleLog( 'wppa-ajax-front.js version '+wppaJsAjaxVersion+' loaded.', 'force' );
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="6.9.05",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){if(wppaRenderAdd)jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end");else if(wppaRenderModal&&i){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(n)})}else jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n);var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n)},complete:function(a,p,e){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n)))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function 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(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>");var p='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><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>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(a,p,e){if("classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}},error:function(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("</body>"),r.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(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){if(0!=p&&!_wppaSSRuns[r]){var a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],t=_wppaWaitTexts[r][_wppaCurIdx[r]];0<t.length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+t[1]+"\n\n"+t[2]);else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");jQuery("#wppa-like-"+r).attr("title",o[0]),jQuery("#wppa-liketext-"+r).html(o[1]),"1"==t[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]}else _wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7]);wppaNextOnCallback&&_wppaNextOnCallback(r)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){if(_wppaValidateComment(t,a)){var p="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t;void 0!==jQuery("#wppa-comemail-"+t).val()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){document.getElementById(t).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="7.0.00",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){if(wppaRenderAdd)jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end");else if(wppaRenderModal&&i){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(n)})}else jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n);var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n)},complete:function(a,p,e){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n)))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function 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(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>");var p='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><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>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(a,p,e){if("classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}},error:function(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("</body>"),r.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(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){if(0!=p&&!_wppaSSRuns[r]){var a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],t=_wppaWaitTexts[r][_wppaCurIdx[r]];0<t.length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+t[1]+"\n\n"+t[2]);else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");jQuery("#wppa-like-"+r).attr("title",o[0]),jQuery("#wppa-liketext-"+r).html(o[1]),"1"==t[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]}else _wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7]);wppaNextOnCallback&&_wppaNextOnCallback(r)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){if(_wppaValidateComment(t,a)){var p="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t;void 0!==jQuery("#wppa-comemail-"+t).val()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){document.getElementById(t).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
js/wppa-gutenberg-wppa.js CHANGED
@@ -69,7 +69,7 @@ jQuery(document).ready(function(){
69
  var shortcode = props.attributes.shortcode || '';
70
 
71
  if ( shortcode.length ) {
72
- return shortcode;
73
  }
74
  },
75
  } );
@@ -651,7 +651,7 @@ function wppaGalleryEvaluate() {
651
  }
652
 
653
  if ( shortcodeOk ) {
654
- result = shortcode;
655
  }
656
  else {
657
  result = '';
69
  var shortcode = props.attributes.shortcode || '';
70
 
71
  if ( shortcode.length ) {
72
+ return shortcode.replace( /@/g, '#' );
73
  }
74
  },
75
  } );
651
  }
652
 
653
  if ( shortcodeOk ) {
654
+ result = shortcode.replace( /#/g, '@' );
655
  }
656
  else {
657
  result = '';
js/wppa-tinymce-shortcodes.js CHANGED
@@ -2,7 +2,7 @@
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
- * Version 6.8.00
6
  *
7
  */
8
 
@@ -554,6 +554,7 @@ function wppaGalleryEvaluate() {
554
  shortcode += ' align="'+align+'"';
555
  }
556
 
 
557
  // Extract comment
558
  var t = document.getElementById('wppagallery-shortcode-preview').value;
559
  t = t.replace(/&quot;/g, '"');
@@ -561,9 +562,10 @@ function wppaGalleryEvaluate() {
561
  t = t[1];
562
  t = t.split('[');
563
  var shortcodeComment = t[0];
 
564
 
565
  // Close
566
- shortcode += ']'+shortcodeComment+'[/wppa]';
567
 
568
  // Display shortcode
569
  shortcode = shortcode.replace(/"/g, '&quot;');
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
+ * Version 7.0.00
6
  *
7
  */
8
 
554
  shortcode += ' align="'+align+'"';
555
  }
556
 
557
+ /*
558
  // Extract comment
559
  var t = document.getElementById('wppagallery-shortcode-preview').value;
560
  t = t.replace(/&quot;/g, '"');
562
  t = t[1];
563
  t = t.split('[');
564
  var shortcodeComment = t[0];
565
+ */
566
 
567
  // Close
568
+ shortcode += ']';
569
 
570
  // Display shortcode
571
  shortcode = shortcode.replace(/"/g, '&quot;');
js/wppa-tinymce-shortcodes.min.js CHANGED
@@ -1 +1 @@
1
- function wppaGalleryEvaluate(){var e=!0;jQuery("#wppagallery-galery-type-tr").hide(),jQuery("#wppagallery-slides-type-tr").hide(),jQuery("#wppagallery-single-type-tr").hide(),jQuery("#wppagallery-search-type-tr").hide(),jQuery("#wppagallery-miscel-type-tr").hide(),jQuery("#wppagallery-album-type-tr").hide(),jQuery("#wppagallery-album-real-tr").hide(),jQuery("#wppagallery-album-real-search-tr").hide(),jQuery("#wppagallery-album-realopt-tr").hide(),jQuery("#wppagallery-album-virt-tr").hide(),jQuery("#wppagallery-album-virt-cover-tr").hide(),jQuery("#wppagallery-owner-tr").hide(),jQuery("#wppagallery-owner-parent-tr").hide(),jQuery("#wppagallery-album-parent-tr").hide(),jQuery("#wppagallery-album-count-tr").hide(),jQuery("#wppagallery-photo-count-tr").hide(),jQuery("#wppagallery-albumcat-tr").hide(),jQuery("#wppagallery-photo-tr").hide(),jQuery("#wppagallery-photo-preview-tr").hide(),jQuery("#wppagallery-phototags-tr").hide(),jQuery("#wppagallery-search-tr").hide(),jQuery("#wppagallery-taglist-tr").hide(),jQuery("#wppagallery-album-super-tr").hide(),jQuery("#wppagallery-calendar-tr").hide(),jQuery("#wppagallery-tags-cats-tr").hide(),jQuery("#wppagallery-landing-tr").hide(),jQuery("#wppagallery-rootalbum-tr").hide(),jQuery("#wppagallery-admins-tr").hide();var a,r,l="[wppa",p="",t="",y="",o="",u="",s="",w="",g="",c="",i="",h="",n="",d="",j="",Q=!1,m=!1,b=!1,v=!1,k=!1,f=!1,E=!1,x=!1,I=!1,P=!1,T="",S="",N="",A="",B="",C=!1,G=!1,z="",D="0",M="0",_="",q="none",L="";switch(jQuery("select").css("color","#700"),jQuery("#wppagallery-album-parent-parent").css("color","#070"),jQuery("#wppagallery-align").css("color","#070"),p=jQuery("#wppagallery-top-type").val(),wppaIsEmpty(p)||jQuery("#wppagallery-top-type").css("color","#070"),p){case"galerytype":jQuery("#wppagallery-galery-type-tr").show(),t=jQuery("#wppagallery-galery-type").val(),Q=!0,b=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(t)||(jQuery("#wppagallery-galery-type").css("color","#070"),y=t);break;case"slidestype":jQuery("#wppagallery-slides-type-tr").show(),t=jQuery("#wppagallery-slides-type").val(),m=!0,b=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(t)||(jQuery("#wppagallery-slides-type").css("color","#070"),o=t);break;case"singletype":jQuery("#wppagallery-single-type-tr").show(),t=jQuery("#wppagallery-single-type").val(),v=!0,jQuery("#wppagallery-photo-tr").show(),wppaIsEmpty(t)||jQuery("#wppagallery-single-type").css("color","#070");break;case"searchtype":switch(jQuery("#wppagallery-search-type-tr").show(),t=jQuery("#wppagallery-search-type").val(),I=!0,s=t,wppaIsEmpty(t)||jQuery("#wppagallery-search-type").css("color","#070"),t){case"search":jQuery("#wppagallery-search-tr").show(),jQuery("#wppagallery-root").prop("checked")&&jQuery("#wppagallery-rootalbum-tr").show(),M=jQuery("#wppagallery-rootalbum").val(),jQuery("#wppagallery-landing-tr").show(),D=jQuery("#wppagallery-landing").val();break;case"supersearch":break;case"tagcloud":case"multitag":if(jQuery("#wppagallery-taglist-tr").show(),!jQuery("#wppagallery-alltags").prop("checked")){E=!0,jQuery("#wppagallery-seltags").show(),r=jQuery(".wppagallery-taglist-tags");R=[];for(O=0,a=0;O<r.length;)r[O].selected&&(R[a]=r[O].value,a++),O++;T=wppaArrayToEnum(R,",")}break;case"superview":jQuery("#wppagallery-album-super-tr").show(),g=jQuery("#wppagallery-album-super-parent").val();break;case"calendar":jQuery("#wppagallery-calendar-tr").show(),jQuery("#wppagallery-album-super-tr").show(),B=jQuery("#wppagallery-calendar-type").val(),C=jQuery("#wppagallery-calendar-reverse").prop("checked"),G=jQuery("#wppagallery-calendar-allopen").prop("checked"),c=jQuery("#wppagallery-album-super-parent").val()}break;case"misceltype":switch(jQuery("#wppagallery-miscel-type-tr").show(),t=jQuery("#wppagallery-miscel-type").val(),P=!0,wppaIsEmpty(t)||jQuery("#wppagallery-miscel-type").css("color","#070"),t){case"generic":w=t;break;case"upload":w=t,jQuery("#wppagallery-album-realopt-tr").show(),g=(g=jQuery("#wppagallery-album-realopt").val()).toString().replace(/,/g,".");break;case"landing":case"stereo":w=t;break;case"choice":w=t,jQuery("#wppagallery-admins-tr").show(),_=wppaGetSelectionEnumByClass(".wppagallery-admin",",")}}if(wppaIsEmpty(t)||(l+=' type="'+t+'"'),b)switch(u=jQuery("#wppagallery-album-type").val(),wppaIsEmpty(u)||jQuery("#wppagallery-album-type").css("color","#070"),u){case"real":if(jQuery("#wppagallery-album-real-tr").show(),jQuery("#wppagallery-album-real-search-tr").show(),jQuery("#wppagallery-album-real-search"))if(jQuery("#wppagallery-album-real-search").val()){var H=jQuery("#wppagallery-album-real-search").val().toLowerCase();if(!wppaIsEmpty(H)&&(albums=jQuery(".wppagallery-album-r"),albums.length>0))for(var O=0;O<albums.length;)-1==albums[O].innerHTML.toLowerCase().search(H)?(jQuery(albums[O]).removeAttr("selected"),jQuery(albums[O]).hide()):jQuery(albums[O]).show(),O++}else jQuery(".wppagallery-album-r").show();g=(g=jQuery("#wppagallery-album-real").val()).toString().replace(/,/g,".");break;case"virtual":if("cover"==t?(jQuery("#wppagallery-album-virt-cover-tr").show(),g=jQuery("#wppagallery-album-virt-cover").val()):(jQuery("#wppagallery-album-virt-tr").show(),g=jQuery("#wppagallery-album-virt").val()),!wppaIsEmpty(g))switch(jQuery("#wppagallery-album-virt").css("color","#070"),g){case"#topten":case"#lasten":case"#featen":case"#comten":jQuery("#wppagallery-album-realopt-tr").show(),jQuery(".wppagallery-album-ropt").length>0?c=wppaGetSelectionEnumByClass(".wppagallery-album-ropt","."):-1!=(c=jQuery("#wppagallery-album-realopt").val()).indexOf(",")&&(parr=c.split(","),c=wppaArrayToEnum(parr,".")),""==c&&(c="0"),jQuery("#wppagallery-photo-count-tr").show(),i=jQuery("#wppagallery-photo-count").val();break;case"#tags":jQuery("#wppagallery-phototags-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),z="or"==jQuery("[name=andor]:checked").val()?";":",",f=!0,r=jQuery(".wppagallery-phototags");var R=[];for(O=0,a=0;O<r.length;)r[O].selected&&(R[a]=r[O].value,a++),O++;N=wppaArrayToEnum(R,z);break;case"#last":jQuery("#wppagallery-album-parent-tr").show(),c=jQuery("#wppagallery-album-parent-parent").val(),jQuery("#wppagallery-album-count-tr").show(),i=jQuery("#wppagallery-album-count").val();break;case"#cat":jQuery("#wppagallery-albumcat-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),z="or"==jQuery("[name=andor]:checked").val()?";":",",x=!0,r=jQuery(".wppagallery-albumcat");var U=[];for(O=0,a=0;O<r.length;)r[O].selected&&(U[a]=r[O].value,a++),O++;A=wppaArrayToEnum(U,z);break;case"#owner":case"#upldr":jQuery("#wppagallery-owner-tr").show(),k=!0,S=jQuery("#wppagallery-owner").val(),wppaIsEmpty(S)||(jQuery("#wppagallery-owner").css("color","#070"),jQuery("#wppagallery-owner-parent-tr").show(),c=(c=wppaGetSelectionEnumByClass(".wppagallery-album-p",".")).toString().replace("zero","0"));break;case"#all":break;default:null!=g&&alert(wppaUIERR+": "+g)}break;default:g=""}wppaIsEmpty(g)||(l+=' album="'+g,""!=S&&(l+=","+S),""==c&&""!=i&&(c="0"),""!=c&&(l+=","+c),""!=i&&(l+=","+i),""!=N&&(l+=","+N),""!=A&&(l+=","+A),l+='"'),v&&(h=jQuery("#wppagallery-photo").val())&&(n=(n=(n=h.replace(/\//g,"")).split("."))[0],jQuery("#wppagallery-photo-preview-tr").show(),wppaTinyMcePhotoPreview(h),l+=' photo="'+n+'"',jQuery("#wppagallery-photo").css("color","#070")),"search"==t&&(d=jQuery("#wppagallery-sub").prop("checked"),j=jQuery("#wppagallery-root").prop("checked"),d&&(l+=' sub="1"'),j&&(l+="0"!=M?' root="#'+M+'"':' root="1"'),"0"!=D&&(l+=' landing="'+D+'"')),"tagcloud"!=t&&"multitag"!=t||""!=T&&(l+=' taglist="'+T+'"'),"calendar"==t&&(l+=' calendar="'+B+'"',c&&(l+=' album="'+c+'"'),C&&(l+=' reverse="1"'),G&&(l+=' all="1"')),"choice"==t&&_.length>0&&(l+=' admin="'+_+'"');var W=document.getElementById("wppagallery-size").value,X=W.split(",");if(X[1]?"auto"==X[0]&&parseInt(X[1])==X[1]&&X[1]>100?jQuery("#wppagallery-size").css("color","#070"):(W=0,jQuery("#wppagallery-size").css("color","#700")):(""!=W&&"auto"!=W&&parseInt(W)!=W&&(W=0,jQuery("#wppagallery-size").css("color","#700")),W<0&&(W=-W),W<100&&(W/=100),jQuery("#wppagallery-size").css("color","#070")),0!=W&&(l+=' size="'+W+'"'),"none"!=(q=jQuery("#wppagallery-align").val())&&(l+=' align="'+q+'"'),l+="]"+(r=(r=(r=(r=(r=document.getElementById("wppagallery-shortcode-preview").value).replace(/&quot;/g,'"')).split("]"))[1]).split("["))[0]+"[/wppa]",l=l.replace(/"/g,"&quot;"),L='<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+l+'" />',jQuery("#wppagallery-shortcode-preview-container").html(L),!(e=!(""==g&&b||""==h&&v||""==S&&k||""==T&&E||""==y&&Q||""==o&&m||""==s&&I||""==w&&P||""==N&&f||""==A&&x))){var F="";""==g&&b&&(F+="Need album\n"),""==h&&v&&(F+="Need photo\n"),""==S&&k&&(F+="Need owner"),""==T&&E&&(F+="Need taglist"),""==y&&Q&&(F+="Need galType"),""==o&&m&&(F+="Need slideType"),""==s&&I&&(F+="Need searchType"),""==w&&P&&(F+="Need miscType"),""==N&&f&&(F+="Need tags"),""==A&&x&&(F+="Need cats")}e?(jQuery("#wppagallery-submit").show(),jQuery("#wppagallery-submit-notok").hide()):(jQuery("#wppagallery-submit").hide(),jQuery("#wppagallery-submit-notok").show())}function wppaTinyMcePhotoPreview(e){if("#potd"==e)jQuery("#wppagallery-photo-preview").html(wppaNoPreview);else if(-1!=e.indexOf("xxx")){var a=e.replace("xxx","");jQuery("#wppagallery-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+a+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+a+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'webm" type="video/webm"></video>')}else jQuery("#wppagallery-photo-preview").html('<img src="'+wppaPhotoDirectory+e+'" style="max-width:400px; max-height:300px;" />')}tinymce.PluginManager.add("wppagallery",function(e,a){e.addButton("wppa_gallery_button",{image:wppaImageDirectory+"albumnew32.png",tooltip:"WPPA+ Shortcode Generator",onclick:function(){var e=jQuery(window).width(),a=jQuery(window).height(),r=720<e?720:e;r-=80,a=jQuery(window).height(),a-=120,tb_show("WPPA+ Shortcode Generator","#TB_inline?width="+r+"&height="+a+"&inlineId=wppagallery-form")}})}),jQuery(function(){var e=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcedialog";e.open("GET",a,!0),e.send(),e.onreadystatechange=function(){if(4==e.readyState&&404!=e.status){var a=e.responseText,r=jQuery(a);r.find("table");r.appendTo("body").hide(),r.find("#wppagallery-submit").click(function(){newShortcode=document.getElementById("wppagallery-shortcode-preview").value,newShortcode=newShortcode.replace(/&quot;/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),tb_remove()})}}});
1
+ function wppaGalleryEvaluate(){var e;jQuery("#wppagallery-galery-type-tr").hide(),jQuery("#wppagallery-slides-type-tr").hide(),jQuery("#wppagallery-single-type-tr").hide(),jQuery("#wppagallery-search-type-tr").hide(),jQuery("#wppagallery-miscel-type-tr").hide(),jQuery("#wppagallery-album-type-tr").hide(),jQuery("#wppagallery-album-real-tr").hide(),jQuery("#wppagallery-album-real-search-tr").hide(),jQuery("#wppagallery-album-realopt-tr").hide(),jQuery("#wppagallery-album-virt-tr").hide(),jQuery("#wppagallery-album-virt-cover-tr").hide(),jQuery("#wppagallery-owner-tr").hide(),jQuery("#wppagallery-owner-parent-tr").hide(),jQuery("#wppagallery-album-parent-tr").hide(),jQuery("#wppagallery-album-count-tr").hide(),jQuery("#wppagallery-photo-count-tr").hide(),jQuery("#wppagallery-albumcat-tr").hide(),jQuery("#wppagallery-photo-tr").hide(),jQuery("#wppagallery-photo-preview-tr").hide(),jQuery("#wppagallery-phototags-tr").hide(),jQuery("#wppagallery-search-tr").hide(),jQuery("#wppagallery-taglist-tr").hide(),jQuery("#wppagallery-album-super-tr").hide(),jQuery("#wppagallery-calendar-tr").hide(),jQuery("#wppagallery-tags-cats-tr").hide(),jQuery("#wppagallery-landing-tr").hide(),jQuery("#wppagallery-rootalbum-tr").hide(),jQuery("#wppagallery-admins-tr").hide();var a,r,l,p,y,t="[wppa",o="",u="",s="",w="",g="",c="",i="",h="",n="",d="",j="",Q=!1,m=!1,b=!1,v=!1,k=!1,f=!1,E=!1,x=!1,I=!1,P=!1,T="",S="",N="",A="",C="",G=!1,z=!1,B="",D="0",M="0",_="";switch(jQuery("select").css("color","#700"),jQuery("#wppagallery-album-parent-parent").css("color","#070"),jQuery("#wppagallery-align").css("color","#070"),a=jQuery("#wppagallery-top-type").val(),wppaIsEmpty(a)||jQuery("#wppagallery-top-type").css("color","#070"),a){case"galerytype":jQuery("#wppagallery-galery-type-tr").show(),o=jQuery("#wppagallery-galery-type").val(),b=Q=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-galery-type").css("color","#070"),u=o);break;case"slidestype":jQuery("#wppagallery-slides-type-tr").show(),o=jQuery("#wppagallery-slides-type").val(),b=m=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-slides-type").css("color","#070"),s=o);break;case"singletype":jQuery("#wppagallery-single-type-tr").show(),o=jQuery("#wppagallery-single-type").val(),v=!0,jQuery("#wppagallery-photo-tr").show(),wppaIsEmpty(o)||jQuery("#wppagallery-single-type").css("color","#070");break;case"searchtype":switch(jQuery("#wppagallery-search-type-tr").show(),I=!0,g=o=jQuery("#wppagallery-search-type").val(),wppaIsEmpty(o)||jQuery("#wppagallery-search-type").css("color","#070"),o){case"search":jQuery("#wppagallery-search-tr").show(),jQuery("#wppagallery-root").prop("checked")&&jQuery("#wppagallery-rootalbum-tr").show(),M=jQuery("#wppagallery-rootalbum").val(),jQuery("#wppagallery-landing-tr").show(),D=jQuery("#wppagallery-landing").val();break;case"supersearch":break;case"tagcloud":case"multitag":if(jQuery("#wppagallery-taglist-tr").show(),!jQuery("#wppagallery-alltags").prop("checked")){E=!0,jQuery("#wppagallery-seltags").show(),l=jQuery(".wppagallery-taglist-tags");var L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;T=wppaArrayToEnum(L,",")}break;case"superview":jQuery("#wppagallery-album-super-tr").show(),i=jQuery("#wppagallery-album-super-parent").val();break;case"calendar":jQuery("#wppagallery-calendar-tr").show(),jQuery("#wppagallery-album-super-tr").show(),C=jQuery("#wppagallery-calendar-type").val(),G=jQuery("#wppagallery-calendar-reverse").prop("checked"),z=jQuery("#wppagallery-calendar-allopen").prop("checked"),h=jQuery("#wppagallery-album-super-parent").val()}break;case"misceltype":switch(jQuery("#wppagallery-miscel-type-tr").show(),o=jQuery("#wppagallery-miscel-type").val(),P=!0,wppaIsEmpty(o)||jQuery("#wppagallery-miscel-type").css("color","#070"),o){case"generic":c=o;break;case"upload":c=o,jQuery("#wppagallery-album-realopt-tr").show(),i=(i=jQuery("#wppagallery-album-realopt").val()).toString().replace(/,/g,".");break;case"landing":case"stereo":c=o;break;case"choice":c=o,jQuery("#wppagallery-admins-tr").show(),_=wppaGetSelectionEnumByClass(".wppagallery-admin",",")}}if(wppaIsEmpty(o)||(t+=' type="'+o+'"'),b)switch(w=jQuery("#wppagallery-album-type").val(),wppaIsEmpty(w)||jQuery("#wppagallery-album-type").css("color","#070"),w){case"real":if(jQuery("#wppagallery-album-real-tr").show(),jQuery("#wppagallery-album-real-search-tr").show(),jQuery("#wppagallery-album-real-search"))if(jQuery("#wppagallery-album-real-search").val()){var q=jQuery("#wppagallery-album-real-search").val().toLowerCase();if(!wppaIsEmpty(q)&&(albums=jQuery(".wppagallery-album-r"),0<albums.length))for(var H=0;H<albums.length;){-1==albums[H].innerHTML.toLowerCase().search(q)?(jQuery(albums[H]).removeAttr("selected"),jQuery(albums[H]).hide()):jQuery(albums[H]).show(),H++}}else jQuery(".wppagallery-album-r").show();i=(i=jQuery("#wppagallery-album-real").val()).toString().replace(/,/g,".");break;case"virtual":if("cover"==o?(jQuery("#wppagallery-album-virt-cover-tr").show(),i=jQuery("#wppagallery-album-virt-cover").val()):(jQuery("#wppagallery-album-virt-tr").show(),i=jQuery("#wppagallery-album-virt").val()),!wppaIsEmpty(i))switch(jQuery("#wppagallery-album-virt").css("color","#070"),i){case"#topten":case"#lasten":case"#featen":case"#comten":jQuery("#wppagallery-album-realopt-tr").show(),0<jQuery(".wppagallery-album-ropt").length?h=wppaGetSelectionEnumByClass(".wppagallery-album-ropt","."):-1!=(h=jQuery("#wppagallery-album-realopt").val()).indexOf(",")&&(parr=h.split(","),h=wppaArrayToEnum(parr,".")),""==h&&(h="0"),jQuery("#wppagallery-photo-count-tr").show(),n=jQuery("#wppagallery-photo-count").val();break;case"#tags":jQuery("#wppagallery-phototags-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",f=!0,l=jQuery(".wppagallery-phototags");L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;N=wppaArrayToEnum(L,B);break;case"#last":jQuery("#wppagallery-album-parent-tr").show(),h=jQuery("#wppagallery-album-parent-parent").val(),jQuery("#wppagallery-album-count-tr").show(),n=jQuery("#wppagallery-album-count").val();break;case"#cat":jQuery("#wppagallery-albumcat-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",x=!0,l=jQuery(".wppagallery-albumcat");var O=[];for(r=H=0;H<l.length;)l[H].selected&&(O[r]=l[H].value,r++),H++;A=wppaArrayToEnum(O,B);break;case"#owner":case"#upldr":jQuery("#wppagallery-owner-tr").show(),k=!0,S=jQuery("#wppagallery-owner").val(),wppaIsEmpty(S)||(jQuery("#wppagallery-owner").css("color","#070"),jQuery("#wppagallery-owner-parent-tr").show(),h=(h=wppaGetSelectionEnumByClass(".wppagallery-album-p",".")).toString().replace("zero","0"));break;case"#all":break;default:null!=i&&alert(wppaUIERR+": "+i)}break;default:i=""}wppaIsEmpty(i)||(t+=' album="'+i,""!=S&&(t+=","+S),""==h&&""!=n&&(h="0"),""!=h&&(t+=","+h),""!=n&&(t+=","+n),""!=N&&(t+=","+N),""!=A&&(t+=","+A),t+='"'),v&&(d=jQuery("#wppagallery-photo").val())&&(j=(j=(j=d.replace(/\//g,"")).split("."))[0],jQuery("#wppagallery-photo-preview-tr").show(),wppaTinyMcePhotoPreview(d),t+=' photo="'+j+'"',jQuery("#wppagallery-photo").css("color","#070")),"search"==o&&(jQuery("#wppagallery-sub").prop("checked")&&(t+=' sub="1"'),jQuery("#wppagallery-root").prop("checked")&&(t+="0"!=M?' root="#'+M+'"':' root="1"'),"0"!=D&&(t+=' landing="'+D+'"')),"tagcloud"!=o&&"multitag"!=o||""!=T&&(t+=' taglist="'+T+'"'),"calendar"==o&&(t+=' calendar="'+C+'"',h&&(t+=' album="'+h+'"'),G&&(t+=' reverse="1"'),z&&(t+=' all="1"')),"choice"==o&&0<_.length&&(t+=' admin="'+_+'"');var R=document.getElementById("wppagallery-size").value,U=R.split(",");if(U[1]?"auto"==U[0]&&parseInt(U[1])==U[1]&&100<U[1]?jQuery("#wppagallery-size").css("color","#070"):(R=0,jQuery("#wppagallery-size").css("color","#700")):(""!=R&&"auto"!=R&&parseInt(R)!=R&&(R=0,jQuery("#wppagallery-size").css("color","#700")),R<0&&(R=-R),R<100&&(R/=100),jQuery("#wppagallery-size").css("color","#070")),0!=R&&(t+=' size="'+R+'"'),"none"!=(p=jQuery("#wppagallery-align").val())&&(t+=' align="'+p+'"'),y='<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(t=(t+="]").replace(/"/g,"&quot;"))+'" />',jQuery("#wppagallery-shortcode-preview-container").html(y),!(e=!(""==i&&b||""==d&&v||""==S&&k||""==T&&E||""==u&&Q||""==s&&m||""==g&&I||""==c&&P||""==N&&f||""==A&&x))){""==i&&b&&"Need album\n",""==d&&v&&"Need photo\n",""==S&&k&&"Need owner",""==T&&E&&"Need taglist",""==u&&Q&&"Need galType",""==s&&m&&"Need slideType",""==g&&I&&"Need searchType",""==c&&P&&"Need miscType",""==N&&f&&"Need tags",""==A&&x&&"Need cats"}e?(jQuery("#wppagallery-submit").show(),jQuery("#wppagallery-submit-notok").hide()):(jQuery("#wppagallery-submit").hide(),jQuery("#wppagallery-submit-notok").show())}function wppaTinyMcePhotoPreview(e){if("#potd"==e)jQuery("#wppagallery-photo-preview").html(wppaNoPreview);else if(-1!=e.indexOf("xxx")){var a=e.replace("xxx","");jQuery("#wppagallery-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+a+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+a+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'webm" type="video/webm"></video>')}else jQuery("#wppagallery-photo-preview").html('<img src="'+wppaPhotoDirectory+e+'" style="max-width:400px; max-height:300px;" />')}tinymce.PluginManager.add("wppagallery",function(e,a){e.addButton("wppa_gallery_button",{image:wppaImageDirectory+"albumnew32.png",tooltip:"WPPA+ Shortcode Generator",onclick:function(){var e=jQuery(window).width(),a=jQuery(window).height(),r=720<e?720:e;r-=80,a=jQuery(window).height(),a-=120,tb_show("WPPA+ Shortcode Generator","#TB_inline?width="+r+"&height="+a+"&inlineId=wppagallery-form")}})}),jQuery(function(){var r=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcedialog";r.open("GET",e,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState&&404!=r.status){var e=r.responseText,a=jQuery(e);a.find("table");a.appendTo("body").hide(),a.find("#wppagallery-submit").click(function(){newShortcode=document.getElementById("wppagallery-shortcode-preview").value,newShortcode=newShortcode.replace(/&quot;/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),tb_remove()})}}});
readme.txt CHANGED
@@ -140,6 +140,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
140
  = 7.0.00 =
141
 
142
  * Shortcode generators for Gutenberg added
 
 
 
 
143
 
144
  = 6.9.21 =
145
 
140
  = 7.0.00 =
141
 
142
  * Shortcode generators for Gutenberg added
143
+ * This version addresses various minor bug fixes and feature requests.
144
+ * This version addresses various security issues.
145
+ * To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised.
146
+ Use the WPPA+ Notify widget.
147
 
148
  = 6.9.21 =
149
 
wppa-admin.php CHANGED
@@ -109,7 +109,7 @@ global $wppa_api_version;
109
  wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
110
  wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa.js', array(), $wppa_api_version );
111
  wp_enqueue_script( 'wppa-slideshow', WPPA_URL . '/js/wppa-slideshow.js', array(), $wppa_api_version );
112
- // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
113
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
114
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
115
  /*
@@ -481,17 +481,24 @@ global $wpdb;
481
  if ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin/post.php' ) !== false &&
482
  strpos( $_SERVER['REQUEST_URI'], 'action=edit' ) !== false ) {
483
 
 
 
484
  // Get posts with wppa block_categories
485
  $posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->posts}
486
- WHERE post_content LIKE %s
487
- OR post_content LIKE %s",
 
 
488
  '%' . $wpdb->esc_like( 'wp:wppa/gutenberg-photo' ) . '%',
489
  '%' . $wpdb->esc_like( 'wp:wppa/gutenberg-wppa' ) . '%' ), ARRAY_A );
490
- foreach( $posts as $post ) {
491
- $new_content = str_replace( array( 'wp:wppa/gutenberg-photo', 'wp:wppa/gutenberg-wppa' ), 'wp:shortcode', $post['post_content'] );
492
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts}
493
- SET post_content = %s
494
- WHERE ID = %d", $new_content, $post['ID'] ) );
 
 
 
495
  }
496
  }
497
  }
109
  wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
110
  wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa.js', array(), $wppa_api_version );
111
  wp_enqueue_script( 'wppa-slideshow', WPPA_URL . '/js/wppa-slideshow.js', array(), $wppa_api_version );
112
+ wp_enqueue_script( 'wppa-ajax-front', WPPA_URL . '/js/wppa-ajax-front.js', array(), $wppa_api_version );
113
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
114
  // wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
115
  /*
481
  if ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin/post.php' ) !== false &&
482
  strpos( $_SERVER['REQUEST_URI'], 'action=edit' ) !== false ) {
483
 
484
+ $post = strval( intval ( $_GET['post'] ) );
485
+
486
  // Get posts with wppa block_categories
487
  $posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->posts}
488
+ WHERE ID = %d
489
+ AND ( post_content LIKE %s
490
+ OR post_content LIKE %s )",
491
+ $post,
492
  '%' . $wpdb->esc_like( 'wp:wppa/gutenberg-photo' ) . '%',
493
  '%' . $wpdb->esc_like( 'wp:wppa/gutenberg-wppa' ) . '%' ), ARRAY_A );
494
+
495
+ if ( ! empty( $posts ) ) {
496
+ foreach( $posts as $post ) {
497
+ $new_content = str_replace( array( 'wp:wppa/gutenberg-photo', 'wp:wppa/gutenberg-wppa' ), 'wp:shortcode', $post['post_content'] );
498
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts}
499
+ SET post_content = %s
500
+ WHERE ID = %d", $new_content, $post['ID'] ) );
501
+ }
502
  }
503
  }
504
  }
wppa-admins-choice-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
- * Version 6.9.12
7
  *
8
  */
9
 
@@ -19,12 +19,6 @@ class AdminsChoice extends WP_Widget {
19
  function widget($args, $instance) {
20
  global $widget_content;
21
 
22
- require_once(dirname(__FILE__) . '/wppa-links.php');
23
- require_once(dirname(__FILE__) . '/wppa-styles.php');
24
- require_once(dirname(__FILE__) . '/wppa-functions.php');
25
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
26
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
27
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
28
  wppa_initialize_runtime();
29
 
30
  wppa( 'in_widget', 'admins-choice' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
+ * Version 7.0.00
7
  *
8
  */
9
 
19
  function widget($args, $instance) {
20
  global $widget_content;
21
 
 
 
 
 
 
 
22
  wppa_initialize_runtime();
23
 
24
  wppa( 'in_widget', 'admins-choice' );
wppa-ajax.php CHANGED
@@ -56,8 +56,62 @@ global $wppa_log_file;
56
  }
57
 
58
  switch ( $wppa_action ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  case 'getqrcode':
60
- //wppa_log( 'obs', 'Ajax getqrcode for '.$_REQUEST['url'] );
61
  $nonce = $_REQUEST['wppa-qr-nonce'];
62
  if ( ! wp_verify_nonce( $nonce, 'wppa-qr-nonce' ) ) {
63
  die( 'Security check falure' );
@@ -791,8 +845,9 @@ global $wppa_log_file;
791
 
792
  case 'getshortcodedrendered':
793
  $shortcode = stripslashes( $_REQUEST['shortcode'] );
 
794
  $occ = strval( intval ( $_REQUEST['moccur'] ) );
795
- wppa_log( 'Obs', 'Shortcode request from Gutenberg: ' . $shortcode . ', occ=' . $occ );
796
  global $wppa_opt;
797
  $wppa_opt['wppa_lazy'] = 'no';
798
  $wppa_opt['wppa_inline_css'] = 'yes';
@@ -2062,7 +2117,9 @@ global $wppa_log_file;
2062
  '<b>' . wppa_get_photo_item( $photo, 'name' ) . '</b>',
2063
  '<b>' . wppa_get_album_name( wppa_get_photo_item( $photo, 'album' ) ) . '</b>'
2064
  );
2065
- wppa_send_mail( $to, $subj, $cont, $photo, 'void' );
 
 
2066
  }
2067
  }
2068
  }
56
  }
57
 
58
  switch ( $wppa_action ) {
59
+ case 'mailinglist':
60
+
61
+ // Sanitize input
62
+ $nonce = isset( $_REQUEST['wppa-ntfy-nonce'] ) ? strip_tags( stripslashes( $_REQUEST['wppa-ntfy-nonce'] ) ) : '';
63
+ $list_type = isset( $_REQUEST['list'] ) ? strip_tags( stripslashes( $_REQUEST['list'] ) ) : '';
64
+ $onoff = isset( $_REQUEST['onoff'] ) ? strip_tags( stripslashes( $_REQUEST['onoff'] ) ) : '';
65
+
66
+ // Check nonce
67
+ if ( ! wp_verify_nonce( $nonce, 'wppa-ntfy-nonce' ) ) {
68
+ _e( 'Security check failure', 'wp-photo-album-plus' );
69
+ wppa_exit();
70
+ }
71
+
72
+ // Existing list type?
73
+ if ( ! in_array( $list_type, array( 'newalbum', 'photoapproved' ) ) ) {
74
+ _e( 'Requested mailinglist does not exist', 'wp-photo-album-plus' );
75
+ wppa_exit();
76
+ }
77
+
78
+ // On/Off valid?
79
+ if ( ! in_array( $onoff, array( 'on', 'off' ) ) ) {
80
+ _e( 'Invalid data found', 'wp-photo-album-plus' );
81
+ wppa_exit();
82
+ }
83
+
84
+ // Prepare additional data
85
+ $list_type_text = array( 'newalbum' => __( 'new albums', 'wp-photo-album-plus' ),
86
+ 'photoapproved' => __( 'photo approved', 'wp-photo-album-plus'),
87
+ );
88
+ $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
89
+ $userarray = wppa_index_string_to_array( $mailinglist );
90
+
91
+ // Dispatch on list type
92
+ switch( $list_type ) {
93
+ case 'newalbum':
94
+ case 'photoapproved':
95
+
96
+ if ( $onoff == 'on' ) {
97
+ $userarray[] = wppa_get_user( 'id' );
98
+ $msg = sprintf( __( 'You have been added to the mailinglist for %s', 'wp-photo-album-plus' ), $list_type_text[$list_type] );
99
+ }
100
+ else {
101
+ $userarray = array_diff( $userarray, array( wppa_get_user( 'id' ) ) );
102
+ $msg = sprintf( __( 'You have been removed from the mailinglist for %s', 'wp-photo-album-plus' ), $list_type_text[$list_type] );
103
+ }
104
+ $mailinglist = wppa_index_array_to_string( $userarray );
105
+ update_option( 'wppa_mailinglist_' . $list_type, $mailinglist );
106
+ echo $msg;
107
+ break;
108
+
109
+ default:
110
+ _e( 'Requested mailinglist is not implemented', 'wp-photo-album-plus' );
111
+ }
112
+ wppa_exit();
113
+ break;
114
  case 'getqrcode':
 
115
  $nonce = $_REQUEST['wppa-qr-nonce'];
116
  if ( ! wp_verify_nonce( $nonce, 'wppa-qr-nonce' ) ) {
117
  die( 'Security check falure' );
845
 
846
  case 'getshortcodedrendered':
847
  $shortcode = stripslashes( $_REQUEST['shortcode'] );
848
+ $shortcode = str_replace( '@', '#', $shortcode );
849
  $occ = strval( intval ( $_REQUEST['moccur'] ) );
850
+ // wppa_log( 'Obs', 'Shortcode request from Gutenberg: ' . $shortcode . ', occ=' . $occ );
851
  global $wppa_opt;
852
  $wppa_opt['wppa_lazy'] = 'no';
853
  $wppa_opt['wppa_inline_css'] = 'yes';
2117
  '<b>' . wppa_get_photo_item( $photo, 'name' ) . '</b>',
2118
  '<b>' . wppa_get_album_name( wppa_get_photo_item( $photo, 'album' ) ) . '</b>'
2119
  );
2120
+ if ( wppa_is_user_in_mailinglist( $owner, 'photoapproved' ) ) {
2121
+ wppa_send_mail( $to, $subj, $cont, $photo, 'void' );
2122
+ }
2123
  }
2124
  }
2125
  }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.9.21
7
  *
8
  */
9
 
@@ -649,6 +649,7 @@ global $wppa_session;
649
  break;
650
  case '#last': // Last upload
651
  $id = wppa_get_youngest_photo_id();
 
652
  break;
653
  default:
654
  wppa_dbg_msg( 'Unrecognized photo keyword found: ' . wppa( 'single_photo' ), 'red', 'force' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.0.00
7
  *
8
  */
9
 
649
  break;
650
  case '#last': // Last upload
651
  $id = wppa_get_youngest_photo_id();
652
+ wppa( 'start_photo', $id );
653
  break;
654
  default:
655
  wppa_dbg_msg( 'Unrecognized photo keyword found: ' . wppa( 'single_photo' ), 'red', 'force' );
wppa-gutenberg-wppa.php CHANGED
@@ -220,7 +220,7 @@ global $wpdb;
220
  '<td>'.
221
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
222
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
223
- '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
224
  '<option value="#topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
225
  '<option value="#lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
226
  '<option value="#featen" >'.__('A random selection of featured photos', 'wp-photo-album-plus').'</option>'.
220
  '<td>'.
221
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
222
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
223
+ '<option value="#last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
224
  '<option value="#topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
225
  '<option value="#lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
226
  '<option value="#featen" >'.__('A random selection of featured photos', 'wp-photo-album-plus').'</option>'.
wppa-import.php CHANGED
@@ -2583,6 +2583,10 @@ global $wppa_supported_audio_extensions;
2583
  }
2584
  }
2585
  }
 
 
 
 
2586
  $photos_processed_csv ++;
2587
  }
2588
  wppa_log( 'dbg', 'Processed: ' . $data_arr[0] );
@@ -2617,6 +2621,8 @@ global $wppa_supported_audio_extensions;
2617
  fclose( $handle );
2618
  fclose( $write_handle );
2619
 
 
 
2620
  $csvcount++;
2621
 
2622
  // Remove tempfile
2583
  }
2584
  }
2585
  }
2586
+
2587
+ // Reset index dtm
2588
+ wppa_update_photo( array( 'id' => $photo['id'], 'indexdtm' => '' ) );
2589
+
2590
  $photos_processed_csv ++;
2591
  }
2592
  wppa_log( 'dbg', 'Processed: ' . $data_arr[0] );
2621
  fclose( $handle );
2622
  fclose( $write_handle );
2623
 
2624
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
2625
+
2626
  $csvcount++;
2627
 
2628
  // Remove tempfile
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 6.9.21
7
  *
8
  *
9
  */
@@ -372,6 +372,7 @@ function wppa_index_array_to_string( $array ) {
372
 
373
  // Remove dups and sort
374
  $array = array_unique( $array, SORT_NUMERIC );
 
375
 
376
  // Build string
377
  $result = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 7.0.00
7
  *
8
  *
9
  */
372
 
373
  // Remove dups and sort
374
  $array = array_unique( $array, SORT_NUMERIC );
375
+ sort( $array, SORT_NUMERIC );
376
 
377
  // Build string
378
  $result = '';
wppa-init.php CHANGED
@@ -29,6 +29,7 @@ require_once 'wppa-album-navigator-widget.php';
29
  require_once 'wppa-stereo-widget.php';
30
  require_once 'wppa-admins-choice-widget.php';
31
  require_once 'wppa-stats-widget.php';
 
32
 
33
  /* COMMON FUNCTIONS */
34
  require_once 'wppa-common-functions.php';
@@ -57,6 +58,7 @@ require_once 'wppa-maintenance.php';
57
  require_once 'wppa-tinymce-common.php';
58
  require_once 'wppa-local-cdn.php';
59
  require_once 'wppa-wrappers.php';
 
60
 
61
  /* Required for widget displays at back-end */
62
  require_once 'wppa-links.php';
29
  require_once 'wppa-stereo-widget.php';
30
  require_once 'wppa-admins-choice-widget.php';
31
  require_once 'wppa-stats-widget.php';
32
+ require_once 'wppa-notify-widget.php';
33
 
34
  /* COMMON FUNCTIONS */
35
  require_once 'wppa-common-functions.php';
58
  require_once 'wppa-tinymce-common.php';
59
  require_once 'wppa-local-cdn.php';
60
  require_once 'wppa-wrappers.php';
61
+ require_once 'wppa-mailing.php';
62
 
63
  /* Required for widget displays at back-end */
64
  require_once 'wppa-links.php';
wppa-mailing.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-mailing.php
3
+ * Package: wp-photo-album-plus
4
+ *
5
+ * Contains mailing functions
6
+ *
7
+ * Version 7.0.00
8
+ *
9
+ */
10
+
11
+
12
+ add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 1 );
13
+
14
+ // Call this function to schedule a mailinglist emission
15
+ function wppa_schedule_mailinglist( $type ) {
16
+
17
+ wp_schedule_single_event( time() + 600, 'wppa_do_mailinglist_cron', array( $type ) );
18
+
19
+ }
20
+
21
+ // Send the mails for a mailinglist
22
+ function wppa_do_mailinglist( $type ) {
23
+
24
+ // Get mailinglist user ids
25
+ $mailinglist = get_option( 'wppa_mailinglist_' . $type, '' );
26
+ $userarray = wppa_index_string_to_array( $mailinglist );
27
+
28
+ // Mailinglist empty?
29
+ if ( empty( $userarray ) ) {
30
+ return;
31
+ }
32
+
33
+ // Dispatch on type of mailinglist
34
+ switch( $type ) {
35
+ case 'newalbum':
36
+
37
+ // Get the last added album id
38
+ $alb = wppa_get_youngest_album_id();
39
+
40
+ // If album removed, quit
41
+ $lastkey = get_option( 'wppa_' . WPPA_ALBUMS . '_lastkey' );
42
+ if ( $lastkey != $alb ) {
43
+ return false;
44
+ }
45
+
46
+ // Get teh album items we need
47
+ $name = wppa_get_album_name( $alb );
48
+ $desc = wppa_get_album_desc( $alb );
49
+
50
+ // The blog
51
+ $blog = get_bloginfo( 'name' );
52
+
53
+ // The callback url if any
54
+ $link = get_option( 'wppa_mailinglist_newalbum_link', '' );
55
+
56
+ // Process all subscribed users
57
+ foreach( $userarray as $usr ) {
58
+
59
+ $user = get_user_by( 'ID', $usr );
60
+
61
+ // The content of the mail
62
+ $content =
63
+ sprintf( __( 'A new album: %s has been created on %s', 'wp-photo-album-plus' ),
64
+ '<b>' . $name . '</b>',
65
+ '<b>' . $blog . '</b>' );
66
+
67
+ if ( $desc ) {
68
+ $content .=
69
+ '<br /><br />' . __( 'Description', 'wp-photo-album-plus' ) . ':<br /><br />' .
70
+ '<em>' . $desc . '</em><br />';
71
+ }
72
+
73
+ if ( $link ) {
74
+ $content .=
75
+ '<br />' .
76
+ sprintf( __( 'You can see the content %shere%s', 'wp-photo-album-plus' ), '<a href="' . esc_url( $link ) . '" >', '</a>' );
77
+ }
78
+
79
+ // Send the mail
80
+ wppa_send_mail( $user->user_email, __( 'New album created', 'wp-photo-album-plus' ), $content, '0', 'void' );
81
+ }
82
+ break;
83
+
84
+ default:
85
+ wppa_log( 'Err', 'Unimplemented mailinglist type found: ' . $type, true );
86
+ }
87
+ }
88
+
89
+ // Is current user in mailinglist?
90
+ function wppa_am_i_in_mailinglist( $list ) {
91
+
92
+ $my_user_id = wppa_get_user( 'id' );
93
+ return wppa_is_user_in_mailinglist( $my_user_id, $list );
94
+ }
95
+
96
+ // Is a given user in a certain mailinglist?
97
+ // @1: user, id (numeric), or login name
98
+ // @2: list, slug indicating list type
99
+ function wppa_is_user_in_mailinglist( $usr, $list ) {
100
+
101
+ if ( is_numeric( $usr ) ) {
102
+ $user_id = $usr;
103
+ }
104
+ else {
105
+ $user = get_user_by( 'login', $usr );
106
+ if ( $user ) {
107
+ $user_id = $user->ID;
108
+ }
109
+ else {
110
+ $user_id = '0';
111
+ }
112
+ }
113
+ $mailinglist = get_option( 'wppa_mailinglist_' . $list, '' );
114
+ $userarray = wppa_index_string_to_array( $mailinglist );
115
+ return ( in_array( $user_id, $userarray ) );
116
+ }
wppa-notify-widget.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-notify-widget.php
3
+ * Package: wp-photo-album-plus
4
+ *
5
+ * notify events to users
6
+ * Version 7.0.00
7
+ */
8
+
9
+ class wppaNotifyWidget extends WP_Widget {
10
+
11
+ /** constructor */
12
+ function __construct() {
13
+ $widget_ops = array( 'classname' => 'wppa_notify_widget', 'description' => __( 'Let users select if they want to get emails on selected events', 'wp-photo-album-plus' ) );
14
+ parent::__construct( 'wppa_notify_widget', __( 'WPPA+ Notify Me', 'wp-photo-album-plus' ), $widget_ops );
15
+ }
16
+
17
+ /** @see WP_Widget::widget */
18
+ function widget( $args, $instance ) {
19
+
20
+ extract( $args );
21
+
22
+ $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Notify me', 'wp-photo-album-plus' ),
23
+ 'newalbum' => 'no',
24
+ 'newalbumlink' => '',
25
+ 'photoapproved' => 'no',
26
+ 'logonly' => 'yes',
27
+ ) );
28
+ // Logged in only and logged out?
29
+ if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
30
+ return;
31
+ }
32
+
33
+ $widget_title = apply_filters( 'widget_title', $instance['title'] );
34
+ $widget_content = '<!-- WPPA+ notify Widget start -->';
35
+
36
+ $widget_content .= __( 'Notyfy me when...', 'wp-photo-album-plus' ) . '<br />';
37
+
38
+ // New album
39
+ if ( wppa_switch( 'mail_new_album' ) ) {
40
+ $in_list = wppa_am_i_in_mailinglist( 'newalbum' );
41
+ $widget_content .= '
42
+ <input
43
+ id="wppa-newalbum-notify"
44
+ type="checkbox"
45
+ style="float:left;" ' .
46
+ ( $in_list ? 'checked="checked" ' : ' ' ) .
47
+ 'onchange="wppaAjaxNotify(this,\'newalbum\');"
48
+ />
49
+ <label
50
+ for="wppa-newalbum-notify"
51
+ style="float:left;padding-left:4px;"
52
+ > ' .
53
+ __( 'A new album is created', 'wp-photo-album-plus' ) . '
54
+ </label>
55
+ <br />';
56
+
57
+ }
58
+
59
+ // Photo approved
60
+ if ( wppa_switch( 'mail_on_approve' ) ) {
61
+ $in_list = wppa_am_i_in_mailinglist( 'photoapproved' );
62
+ $widget_content .= '
63
+ <input
64
+ id="wppa-newalbum-notify"
65
+ type="checkbox"
66
+ style="float:left;" ' .
67
+ ( $in_list ? 'checked="checked" ' : ' ' ) .
68
+ 'onchange="wppaAjaxNotify(this,\'photoapproved\');"
69
+ />
70
+ <label
71
+ for="wppa-newalbum-notify"
72
+ style="float:left;padding-left:4px;"
73
+ > ' .
74
+ __( 'My photo is approved', 'wp-photo-album-plus' ) . '
75
+ </label>
76
+ <br />';
77
+
78
+ }
79
+
80
+ $widget_content .= '<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />';
81
+ $widget_content .= '<div style="clear:both" ></div>';
82
+ $widget_content .= "\n".'<!-- WPPA+ notify Widget end -->';
83
+
84
+ echo "\n" . $before_widget;
85
+ if ( ! empty( $widget_title ) ) {
86
+
87
+ echo "\n" . $before_title . $widget_title . $after_title;
88
+ }
89
+ echo $widget_content . $after_widget;
90
+ }
91
+
92
+ /** @see WP_Widget::update */
93
+ function update( $new_instance, $old_instance ) {
94
+ $instance = $old_instance;
95
+
96
+ // Defaults
97
+ $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Notify me', 'wp-photo-album-plus' ),
98
+ 'newalbum' => 'no',
99
+ 'newalbumlink' => '',
100
+ 'photoapproved' => 'no',
101
+ 'logonly' => 'yes',
102
+ ) );
103
+
104
+
105
+ $instance['title'] = strip_tags( $new_instance['title'] );
106
+ $instance['newalbum'] = strip_tags( $new_instance['newalbum'] );
107
+ $instance['newalbumlink'] = $new_instance['newalbumlink'];
108
+ $instance['photoapproved'] = $new_instance['photoapproved'];
109
+ $instance['logonly'] = $new_instance['logonly'];
110
+
111
+ return $instance;
112
+ }
113
+
114
+ /** @see WP_Widget::form */
115
+ function form( $instance ) {
116
+
117
+ //Defaults
118
+ $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Notify me', 'wp-photo-album-plus' ),
119
+ 'newalbum' => 'no',
120
+ 'newalbumlink' => '',
121
+ 'photoapproved' => 'no',
122
+ 'logonly' => 'yes',
123
+ ) );
124
+
125
+ // Title
126
+ echo
127
+ wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
128
+
129
+ // Notify when new album created
130
+ echo
131
+ wppa_widget_checkbox( $this,
132
+ 'newalbum',
133
+ wppa_switch( 'wppa_mail_new_album' ) ? 'yes' : 'no',
134
+ __( 'New album created', 'wp-photo-album-plus'),
135
+ __( 'See Table IX-D19 and 20: Mail on new album', 'wp-photo-album-plus'),
136
+ 'disabled' );
137
+
138
+ // Notify when photo approved
139
+ echo
140
+ wppa_widget_checkbox( $this,
141
+ 'photoapproved',
142
+ wppa_switch( 'mail_on_approve' ) ? 'yes' : 'no',
143
+ __( 'Photo approved', 'wp-photo-album-plus' ),
144
+ __( 'See Table VII-B7.2: Notify approve photo', 'wp-photo-album-plus' ),
145
+ 'disabled' );
146
+
147
+ //
148
+
149
+
150
+ // Loggedin only
151
+ echo
152
+ wppa_widget_checkbox( $this,
153
+ 'logonly',
154
+ 'yes',
155
+ __( 'Show to logged in visitors only', 'wp-photo-album-plus' ),
156
+ __( 'We only mail to registered users', 'wp-photo-album-plus' ),
157
+ 'disabled' );
158
+
159
+
160
+
161
+ }
162
+
163
+ } // class wppaNotifyWidget
164
+
165
+ // register wppaNotifyWidget widget
166
+ add_action( 'widgets_init', 'wppa_register_wppaNotifyWidget' );
167
+
168
+ function wppa_register_wppaNotifyWidget() {
169
+ register_widget( "wppaNotifyWidget" );
170
+ }
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 6.9.16
6
  *
7
  */
8
 
@@ -322,7 +322,7 @@ global $wpdb;
322
  wppa_copy( $file, $newimage );
323
  }
324
  }
325
- wppa_log('dbg', 'Max memory used: ' . sprintf( '%6.2f MB', memory_get_peak_usage( true ) / ( 1024 * 1024 ) ) );
326
  }
327
 
328
  // No resize on upload checked
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 7.0.00
6
  *
7
  */
8
 
322
  wppa_copy( $file, $newimage );
323
  }
324
  }
325
+ // wppa_log('dbg', 'Max memory used: ' . sprintf( '%6.2f MB', memory_get_peak_usage( true ) / ( 1024 * 1024 ) ) );
326
  }
327
 
328
  // No resize on upload checked
wppa-settings-autosave.php CHANGED
@@ -1525,21 +1525,21 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
1525
  $desc = __('Select the size of the magnifier cursor.', 'wp-photo-album-plus');
1526
  $help = '';
1527
  $slug = 'wppa_magnifier';
1528
- $options = array( __('small', 'wp-photo-album-plus'),
1529
- __('medium', 'wp-photo-album-plus'),
1530
- __('large', 'wp-photo-album-plus'),
1531
  __('pointer (hand)', 'wp-photo-album-plus'),
1532
  __('--- none ---', 'wp-photo-album-plus')
1533
  );
1534
- $values = array( 'magnifier-small.png',
1535
- 'magnifier-medium.png',
1536
- 'magnifier-large.png',
1537
  'pointer',
1538
  ''
1539
  );
1540
  $onchange = 'jQuery(\'#wppa-cursor\').attr(\'alt\', jQuery(\'#magnifier\').val() );
1541
  document.getElementById(\'wppa-cursor\').src=wppaImageDirectory+document.getElementById(\'magnifier\').value;';
1542
- $html = wppa_select( $slug, $options, $values, $onchange ) .
1543
  '&nbsp;&nbsp;<img id="wppa-cursor" src="'.wppa_get_imgdir().wppa_opt( substr( $slug, 5 ) ).'" />';
1544
  $clas = '';
1545
  $tags = 'lightbox,size,layout';
@@ -8630,8 +8630,8 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
8630
  $desc = __('The number of albums per page on the Edit Album admin page.', 'wp-photo-album-plus');
8631
  $help = '';
8632
  $slug = 'wppa_album_admin_pagesize';
8633
- $opts = array( '10', '20', '50', '100', '200', '500', '700', '1000' );
8634
- $vals = array( '10', '20', '50', '100', '200', '500', '700', '1000' );
8635
  $html = wppa_select($slug, $opts, $vals);
8636
  $clas = '';
8637
  $tags = 'system,page';
@@ -9279,6 +9279,27 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
9279
  );
9280
  $html = wppa_select($slug, $opts, $vals);
9281
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9282
  }
9283
  wppa_setting_subheader( 'E', '1', __( 'Search Albums and Photos related settings' , 'wp-photo-album-plus') );
9284
  {
1525
  $desc = __('Select the size of the magnifier cursor.', 'wp-photo-album-plus');
1526
  $help = '';
1527
  $slug = 'wppa_magnifier';
1528
+ $options = array( __('small', 'wp-photo-album-plus'),
1529
+ __('medium', 'wp-photo-album-plus'),
1530
+ __('large', 'wp-photo-album-plus'),
1531
  __('pointer (hand)', 'wp-photo-album-plus'),
1532
  __('--- none ---', 'wp-photo-album-plus')
1533
  );
1534
+ $values = array( 'magnifier-small.png',
1535
+ 'magnifier-medium.png',
1536
+ 'magnifier-large.png',
1537
  'pointer',
1538
  ''
1539
  );
1540
  $onchange = 'jQuery(\'#wppa-cursor\').attr(\'alt\', jQuery(\'#magnifier\').val() );
1541
  document.getElementById(\'wppa-cursor\').src=wppaImageDirectory+document.getElementById(\'magnifier\').value;';
1542
+ $html = wppa_select( $slug, $options, $values, $onchange ) .
1543
  '&nbsp;&nbsp;<img id="wppa-cursor" src="'.wppa_get_imgdir().wppa_opt( substr( $slug, 5 ) ).'" />';
1544
  $clas = '';
1545
  $tags = 'lightbox,size,layout';
8630
  $desc = __('The number of albums per page on the Edit Album admin page.', 'wp-photo-album-plus');
8631
  $help = '';
8632
  $slug = 'wppa_album_admin_pagesize';
8633
+ $opts = array( '10', '20', '50', '100', '200', '500', '700', '1000', '1500', '2000' );
8634
+ $vals = array( '10', '20', '50', '100', '200', '500', '700', '1000', '1500', '2000' );
8635
  $html = wppa_select($slug, $opts, $vals);
8636
  $clas = '';
8637
  $tags = 'system,page';
9279
  );
9280
  $html = wppa_select($slug, $opts, $vals);
9281
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
9282
+
9283
+ $name = __('Mail on new album', 'wp-photo-album-plus');
9284
+ $desc = __('Enable mailing users when a new album is created', 'wp-photo-album-plus');
9285
+ $help = __('Use the WPPA+ Notify Me widget', 'wp-photo-album-plus');
9286
+ $slug = 'wppa_mail_new_album';
9287
+ $html = wppa_checkbox($slug);
9288
+ $clas = '';
9289
+ $tags = 'mail';
9290
+ wppa_setting($slug, '19', $name, $desc, $html, $help, $clas, $tags);
9291
+
9292
+ $name = __('New album email callback url', 'wp-photo-album-plus');
9293
+ $desc = __('The link in the email to the new album', 'wp-photo-album-plus');
9294
+ $help = __( 'Recommendation', 'wp-photo-album-plus' ) . ': ' .
9295
+ __( 'Create a page with shortcode', 'wp-photo-album-plus' ) .
9296
+ '<b>[wppa type="thumbs" album="#last"]</b>. ' .
9297
+ __( 'The email will contain a link to this page, so the users will have quick access to the latest album', 'wp-photo-album-plus' );
9298
+ $slug = 'wppa_mailinglist_newalbum_link';
9299
+ $html = wppa_input($slug, '90%'); //$width, $minwidth = '', $text = '', $onchange = '', $placeholder = '') {
9300
+ $clas = '';
9301
+ $tags = 'mail';
9302
+ wppa_setting($slug, '20', $name, $desc, $html, $help, $clas, $tags);
9303
  }
9304
  wppa_setting_subheader( 'E', '1', __( 'Search Albums and Photos related settings' , 'wp-photo-album-plus') );
9305
  {
wppa-setup.php CHANGED
@@ -1730,6 +1730,8 @@ cursorborder:'2px solid transparent',";
1730
  'wppa_frontend_album_public' => 'no',
1731
  'wppa_optimize_new' => 'no',
1732
  'wppa_default_album_linktype' => 'content',
 
 
1733
 
1734
  // E Search
1735
  'wppa_search_linkpage' => '0', // 1
1730
  'wppa_frontend_album_public' => 'no',
1731
  'wppa_optimize_new' => 'no',
1732
  'wppa_default_album_linktype' => 'content',
1733
+ 'wppa_mail_new_album' => 'no',
1734
+ 'wppa_mailinglist_newalbum_link' => '',
1735
 
1736
  // E Search
1737
  'wppa_search_linkpage' => '0', // 1
wppa-statistics.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Functions for counts etc
6
  * Common use front and admin
7
- * Version 6.9.21
8
  *
9
  */
10
 
@@ -254,12 +254,14 @@ global $wppa_session;
254
  $wppa_session[$type][$id] = true; // Mark as viewed
255
  if ( $type == 'album' ) {
256
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_albums WHERE id = %d", $id ) );
257
- $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_albums SET views = %d WHERE id = %d", $count+1, $id ) );
 
258
  wppa_log( 'dbg', 'Bumped viewcount for album ' . $id . ' to ' . $count );
259
  }
260
  else {
261
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_photos WHERE id = %d", $id ) );
262
- $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET views = %d WHERE id = %d", $count+1, $id ) );
 
263
  wppa_log( 'dbg', 'Bumped viewcount for photo ' . $id . ' to ' . $count );
264
  }
265
 
4
  *
5
  * Functions for counts etc
6
  * Common use front and admin
7
+ * Version 7.0.00
8
  *
9
  */
10
 
254
  $wppa_session[$type][$id] = true; // Mark as viewed
255
  if ( $type == 'album' ) {
256
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_albums WHERE id = %d", $id ) );
257
+ $count++;
258
+ $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_albums SET views = %d WHERE id = %d", $count, $id ) );
259
  wppa_log( 'dbg', 'Bumped viewcount for album ' . $id . ' to ' . $count );
260
  }
261
  else {
262
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM $wpdb->wppa_photos WHERE id = %d", $id ) );
263
+ $count++;
264
+ $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET views = %d WHERE id = %d", $count, $id ) );
265
  wppa_log( 'dbg', 'Bumped viewcount for photo ' . $id . ' to ' . $count );
266
  }
267
 
wppa-tinymce-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 6.9.21
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
@@ -283,7 +283,7 @@ global $wpdb;
283
  '<td>'.
284
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
285
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
286
- '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
287
  '<option value="#owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
288
  '<option value="#cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
289
  '<option value="#all" >'.__('All albums in the system', 'wp-photo-album-plus').'</option>'.
@@ -692,7 +692,7 @@ global $wpdb;
692
  '<div id="wppagallery-shortcode-preview-container" >'.
693
  '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="[wppa]Any comment[/wppa]" />'.
694
  '</div>'.
695
- '<div><small>'.__('This is a preview of the shortcode that is being generated. You may edit the comment', 'wp-photo-album-plus').'</small></div>'.
696
  '<p class="submit">'.
697
  '<input type="button" id="wppagallery-submit" class="button-primary" value="'.__('Insert Shortcode', 'wp-photo-album-plus').'" name="submit" />&nbsp;'.
698
  '<input type="button" id="wppagallery-submit-notok" class="button-secundary" value="'.__('Insert Shortcode', 'wp-photo-album-plus').'" onclick="alert(\''.esc_js(__('Please complete the shortcode specs', 'wp-photo-album-plus')).'\')" />&nbsp;'.
2
  /* wppa-tinymce-shortcodes.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 7.0.00
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) )
283
  '<td>'.
284
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
285
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
286
+ '<option value="#last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
287
  '<option value="#owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
288
  '<option value="#cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
289
  '<option value="#all" >'.__('All albums in the system', 'wp-photo-album-plus').'</option>'.
692
  '<div id="wppagallery-shortcode-preview-container" >'.
693
  '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="[wppa]Any comment[/wppa]" />'.
694
  '</div>'.
695
+ '<div><small>'.__( 'This is a preview of the shortcode that is being generated.', 'wp-photo-album-plus' ).'</small></div>'.
696
  '<p class="submit">'.
697
  '<input type="button" id="wppagallery-submit" class="button-primary" value="'.__('Insert Shortcode', 'wp-photo-album-plus').'" name="submit" />&nbsp;'.
698
  '<input type="button" id="wppagallery-submit-notok" class="button-secundary" value="'.__('Insert Shortcode', 'wp-photo-album-plus').'" onclick="alert(\''.esc_js(__('Please complete the shortcode specs', 'wp-photo-album-plus')).'\')" />&nbsp;'.
wppa-utils.php CHANGED
@@ -4959,4 +4959,3 @@ function wppa_rename_files_sanitized( $root ) {
4959
  }
4960
  }
4961
  }
4962
-
4959
  }
4960
  }
4961
  }
 
wppa-widget-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
- /* Version 6.9.21
6
  /*
7
  */
8
 
@@ -327,7 +327,7 @@ static $potd;
327
  }
328
 
329
  // Get widget checkbox html
330
- function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '' ) {
331
 
332
  $result =
333
  '<p style="clear:both;" >' .
@@ -336,6 +336,7 @@ function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '' ) {
336
  ' name="' . $class->get_field_name( $item ) . '"' .
337
  ' type="checkbox"' .
338
  wppa_checked( $value ) .
 
339
  ' />&nbsp;' .
340
  '<label' .
341
  ' for="' . $class->get_field_id( $item ) . '"' .
@@ -538,4 +539,4 @@ function wppa_log_potd( $id ) {
538
  // Save result
539
  update_option( 'wppa_potd_log_data', $his );
540
  }
541
- }
2
  /* wppa-widget-functions.php
3
  /* Package: wp-photo-album-plus
4
  /*
5
+ /* Version 7.0.00
6
  /*
7
  */
8
 
327
  }
328
 
329
  // Get widget checkbox html
330
+ function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '', $disabled = false ) {
331
 
332
  $result =
333
  '<p style="clear:both;" >' .
336
  ' name="' . $class->get_field_name( $item ) . '"' .
337
  ' type="checkbox"' .
338
  wppa_checked( $value ) .
339
+ ( $disabled ? ' disabled="disabled"' : '' ) .
340
  ' />&nbsp;' .
341
  '<label' .
342
  ' for="' . $class->get_field_id( $item ) . '"' .
539
  // Save result
540
  update_option( 'wppa_potd_log_data', $his );
541
  }
542
+ }
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.9.21
7
  *
8
  */
9
 
@@ -454,6 +454,7 @@ global $wpdb;
454
  // Update index
455
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
456
  wppa_clear_cache();
 
457
 
458
  return $args['id'];
459
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 7.0.00
7
  *
8
  */
9
 
454
  // Update index
455
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
456
  wppa_clear_cache();
457
+ wppa_schedule_mailinglist( 'newalbum' );
458
 
459
  return $args['id'];
460
  }
wppa.php CHANGED
@@ -23,7 +23,7 @@ global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7000'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7-0-00-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7000'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7-0-00-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );