Version Description
= 7.4.00 =
- This version addresses various bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.4.00.002 |
Comparing to | |
See all releases |
Code changes from version 7.4.00.001 to 7.4.00.002
- changelog.txt +3 -1
- js/wppa-ajax-front.js +77 -1
- js/wppa-ajax-front.min.js +1 -1
- readme.txt +1 -1
- wppa-ajax.php +73 -0
- wppa-defaults.php +1 -0
- wppa-functions.php +24 -5
- wppa-mailing.php +2 -2
- wppa-settings-autosave.php +9 -0
- wppa-users.php +4 -1
- wppa-utils.php +1 -1
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -17,7 +17,9 @@ This means that a table line like e.g.
|
|
17 |
* The album table was not switcheable to Collapsable table for non admin users when 'owners only' is active. Fixed.
|
18 |
* Table IX-E21: Extended duplicate removal, now also works on calendars.
|
19 |
* Table IV-A27: Enable Admins choice, is now a selectionbox. You can select 'none', 'admin and superuser' and 'all loggedin'.
|
20 |
-
So the meaning of 'Admins Choice' can now be extended to 'Users Choice'
|
|
|
|
|
21 |
|
22 |
= 7.3.12 =
|
23 |
|
17 |
* The album table was not switcheable to Collapsable table for non admin users when 'owners only' is active. Fixed.
|
18 |
* Table IX-E21: Extended duplicate removal, now also works on calendars.
|
19 |
* Table IV-A27: Enable Admins choice, is now a selectionbox. You can select 'none', 'admin and superuser' and 'all loggedin'.
|
20 |
+
So the meaning of 'Admins Choice' can now be extended to 'Users Choice'.
|
21 |
+
* You can now remove items from the MyChoice zipfile.
|
22 |
+
* New setting: Table IX-A35. Enable request info. Shows a button under the slideshow image to request info by email.
|
23 |
|
24 |
= 7.3.12 =
|
25 |
|
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 = '7.
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
@@ -362,6 +362,45 @@ function wppaAjaxAddPhotoToZip( mocc, id, reload ) {
|
|
362 |
} );
|
363 |
}
|
364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
// Remove admins choice zipfile
|
366 |
function wppaAjaxDeleteMyZip() {
|
367 |
|
@@ -383,6 +422,43 @@ function wppaAjaxDeleteMyZip() {
|
|
383 |
} );
|
384 |
}
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
// Frontend Edit Photo
|
387 |
function wppaEditPhoto( mocc, xid ) {
|
388 |
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaJsAjaxVersion = '7.4.000';
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
362 |
} );
|
363 |
}
|
364 |
|
365 |
+
// Remove photo from zip
|
366 |
+
function wppaAjaxRemovePhotoFromZip( mocc, id, reload ) {
|
367 |
+
|
368 |
+
jQuery.ajax( { url: wppaAjaxUrl,
|
369 |
+
data: 'action=wppa' +
|
370 |
+
'&wppa-action=removefromzip' +
|
371 |
+
'&photo-id=' + id,
|
372 |
+
async: true,
|
373 |
+
type: 'GET',
|
374 |
+
timeout: 60000,
|
375 |
+
success: function( result, status, xhr ) {
|
376 |
+
|
377 |
+
// Adding succeeded?
|
378 |
+
var rtxt = result.split( '||' );
|
379 |
+
if ( rtxt[0] == 'OK' ) {
|
380 |
+
|
381 |
+
// For the thumbnails
|
382 |
+
// jQuery('#admin-choice-'+id+'-'+mocc).html(rtxt[1]);
|
383 |
+
|
384 |
+
// For the slideshow
|
385 |
+
jQuery('#admin-choice-rem-'+id+'-'+mocc).val(rtxt[1]);
|
386 |
+
jQuery('#admin-choice-rem-'+id+'-'+mocc).prop('disabled', true);
|
387 |
+
jQuery('#admin-choice-rem-'+id+'-'+mocc).css('text-decoration', '');
|
388 |
+
}
|
389 |
+
else {
|
390 |
+
alert( result );
|
391 |
+
}
|
392 |
+
|
393 |
+
// Reload
|
394 |
+
if ( reload ) {
|
395 |
+
document.location.reload( true );
|
396 |
+
}
|
397 |
+
},
|
398 |
+
error: function( xhr, status, error ) {
|
399 |
+
wppaConsoleLog( 'wppaAjaxRemovePhotoFromZip failed. Error = ' + error + ', status = ' + status, 'force' );
|
400 |
+
},
|
401 |
+
} );
|
402 |
+
}
|
403 |
+
|
404 |
// Remove admins choice zipfile
|
405 |
function wppaAjaxDeleteMyZip() {
|
406 |
|
422 |
} );
|
423 |
}
|
424 |
|
425 |
+
// Request Info
|
426 |
+
function wppaAjaxRequestInfo( mocc, id, reload ) {
|
427 |
+
|
428 |
+
wppaConsoleLog( 'wppaAjaxRequestInfo started', 'force');
|
429 |
+
|
430 |
+
jQuery.ajax( { url: wppaAjaxUrl,
|
431 |
+
data: 'action=wppa' +
|
432 |
+
'&wppa-action=requestinfo' +
|
433 |
+
'&photo-id=' + id,
|
434 |
+
async: true,
|
435 |
+
type: 'GET',
|
436 |
+
timeout: 60000,
|
437 |
+
success: function( result, status, xhr ) {
|
438 |
+
|
439 |
+
// Request succeeded?
|
440 |
+
var rtxt = result.split( '||' );
|
441 |
+
if ( rtxt[0] == 'OK' ) {
|
442 |
+
|
443 |
+
// For the slideshow
|
444 |
+
jQuery('#request-info-'+id+'-'+mocc).val(rtxt[1]);
|
445 |
+
jQuery('#request-info-'+id+'-'+mocc).prop('disabled', true);
|
446 |
+
}
|
447 |
+
else {
|
448 |
+
alert( result );
|
449 |
+
}
|
450 |
+
|
451 |
+
// Reload
|
452 |
+
if ( reload ) {
|
453 |
+
document.location.reload( true );
|
454 |
+
}
|
455 |
+
},
|
456 |
+
error: function( xhr, status, error ) {
|
457 |
+
wppaConsoleLog( 'wppaAjaxRequestInfo failed. Error = ' + error + ', status = ' + status, 'force' );
|
458 |
+
},
|
459 |
+
} );
|
460 |
+
}
|
461 |
+
|
462 |
// Frontend Edit Photo
|
463 |
function wppaEditPhoto( mocc, xid ) {
|
464 |
|
js/wppa-ajax-front.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsAjaxVersion="7.3.001",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&&i){wppaHis++,i=i.split("&").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function 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" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(a,p,e){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("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){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,o){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){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
|
1 |
+
var wppaJsAjaxVersion="7.4.000",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end"):wppaRenderModal&&i?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(n)})):(jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show()),wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRequestInfo(o,r,n){wppaConsoleLog("wppaAjaxRequestInfo started","force"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRequestInfo failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var p;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),p='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(p),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,p,e){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){var a,e,t;0!=p&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){var p;_wppaValidateComment(t,a)&&(p="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){var p;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}}))}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 7.4.00.
|
6 |
Stable tag: 7.3.12.008
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 7.4.00.002
|
6 |
Stable tag: 7.3.12.008
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
wppa-ajax.php
CHANGED
@@ -750,6 +750,39 @@ global $wppa_log_file;
|
|
750 |
wppa_exit();
|
751 |
break;
|
752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
case 'delmyzip':
|
754 |
|
755 |
// Verify existance of zips dir
|
@@ -767,6 +800,46 @@ global $wppa_log_file;
|
|
767 |
wppa_exit();
|
768 |
break;
|
769 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
case 'makeorigname':
|
771 |
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
|
772 |
$photo = strval( intval( $photo ) );
|
750 |
wppa_exit();
|
751 |
break;
|
752 |
|
753 |
+
case 'removefromzip':
|
754 |
+
|
755 |
+
// Check if the user is allowed to do this
|
756 |
+
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
|
757 |
+
$photo = strval( intval( $photo ) );
|
758 |
+
$choice = wppa_opt( 'admins_choice' );
|
759 |
+
if ( ( wppa_user_is( 'administrator' ) && $choice != 'none' ) ||
|
760 |
+
( is_user_logged_in() && $choice == 'login' ) ) {
|
761 |
+
// Its ok
|
762 |
+
}
|
763 |
+
else {
|
764 |
+
echo 'ER||You are not allowed to do this';
|
765 |
+
wppa_exit();
|
766 |
+
}
|
767 |
+
|
768 |
+
// Compose the users zip filename
|
769 |
+
$zipsdir = WPPA_UPLOAD_PATH.'/zips/';
|
770 |
+
$zipfile = $zipsdir.wppa_get_user().'.zip';
|
771 |
+
|
772 |
+
// Find the photo data
|
773 |
+
$data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
774 |
+
WHERE id = %d", $photo ), ARRAY_A );
|
775 |
+
|
776 |
+
// Remove photo from zip
|
777 |
+
$wppa_zip = new ZipArchive;
|
778 |
+
$wppa_zip->open( $zipfile );
|
779 |
+
$bret = $wppa_zip->deleteName( wppa_fix_poster_ext( $data['filename'], $photo ) );
|
780 |
+
$wppa_zip->close();
|
781 |
+
|
782 |
+
echo 'OK||'.__('Removed', 'wp-photo-album-plus');
|
783 |
+
wppa_exit();
|
784 |
+
break;
|
785 |
+
|
786 |
case 'delmyzip':
|
787 |
|
788 |
// Verify existance of zips dir
|
800 |
wppa_exit();
|
801 |
break;
|
802 |
|
803 |
+
case 'requestinfo':
|
804 |
+
wppa_log('obs', 'Request info '.$photo);
|
805 |
+
// Check if the user is allowed to do this
|
806 |
+
if ( ! is_user_logged_in() ) {
|
807 |
+
echo 'ER||You must be logged in to request info';
|
808 |
+
wppa_exit();
|
809 |
+
}
|
810 |
+
|
811 |
+
// Find the photo
|
812 |
+
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
|
813 |
+
$photo = strval( intval( $photo ) );
|
814 |
+
|
815 |
+
// The mail content
|
816 |
+
$content =
|
817 |
+
sprintf( __( 'User %s requested more info about item #%d (%s)', 'wp-photo-album-plus' ),
|
818 |
+
wppa_get_user( 'display' ),
|
819 |
+
$photo,
|
820 |
+
wppa_get_photo_name( $photo )
|
821 |
+
);
|
822 |
+
|
823 |
+
if ( ! function_exists( 'wppa_send_mail' ) ) {
|
824 |
+
require_once( 'wppa-mailing.php' );
|
825 |
+
}
|
826 |
+
|
827 |
+
// Send the mail
|
828 |
+
wppa_send_mail( array( 'to' => get_bloginfo( 'admin_email' ),
|
829 |
+
'subj' => __('Request for info'),
|
830 |
+
'cont' => $content,
|
831 |
+
'photo' => $photo,
|
832 |
+
'email' => wppa_get_user( 'email' ),
|
833 |
+
'listtype' => 'showemail',
|
834 |
+
'replyurl' => '',
|
835 |
+
'unsubscribe' => '',
|
836 |
+
) );
|
837 |
+
|
838 |
+
// Done
|
839 |
+
echo 'OK||Request issued';
|
840 |
+
wppa_ecit();
|
841 |
+
break;
|
842 |
+
|
843 |
case 'makeorigname':
|
844 |
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
|
845 |
$photo = strval( intval( $photo ) );
|
wppa-defaults.php
CHANGED
@@ -559,6 +559,7 @@ horizrailenabled:false,";
|
|
559 |
'wppa_nicescroll_window' => 'no',
|
560 |
'wppa_nicescroll_opts' => $nso,
|
561 |
'wppa_response_speed' => '0',
|
|
|
562 |
|
563 |
// B Full size and Slideshow
|
564 |
'wppa_fullvalign' => 'center',
|
559 |
'wppa_nicescroll_window' => 'no',
|
560 |
'wppa_nicescroll_opts' => $nso,
|
561 |
'wppa_response_speed' => '0',
|
562 |
+
'wppa_request_info' => 'no',
|
563 |
|
564 |
// B Full size and Slideshow
|
565 |
'wppa_fullvalign' => 'center',
|
wppa-functions.php
CHANGED
@@ -2661,6 +2661,7 @@ static $user;
|
|
2661 |
$editlink = '';
|
2662 |
$dellink = '';
|
2663 |
$choicelink = '';
|
|
|
2664 |
if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
|
2665 |
if ( wppa_may_user_fe_edit( $id ) && wppa_opt( 'upload_edit' ) != '-none-' ) {
|
2666 |
$editlink = '
|
@@ -2693,11 +2694,15 @@ static $user;
|
|
2693 |
if ( wppa_is_photo_in_zip( $thumb['id'] ) ) {
|
2694 |
$choicelink =
|
2695 |
'<input' .
|
2696 |
-
' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
|
2697 |
' type="button"' .
|
2698 |
-
' style="float:right;margin-right:6px;"' .
|
2699 |
-
'
|
2700 |
-
|
|
|
|
|
|
|
|
|
2701 |
' />';
|
2702 |
|
2703 |
}
|
@@ -2717,8 +2722,22 @@ static $user;
|
|
2717 |
|
2718 |
}
|
2719 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2720 |
}
|
2721 |
-
if ( $editlink || $dellink || $choicelink ) $desc = $editlink.$dellink.$choicelink.'<div style="clear:both"></div>'.$desc;
|
2722 |
|
2723 |
if ( in_array( $thumb['status'], array( 'pending', 'scheduled' ) ) ) {
|
2724 |
$desc .= wppa_html( esc_js( wppa_moderate_links( 'slide', $id ) ) );
|
2661 |
$editlink = '';
|
2662 |
$dellink = '';
|
2663 |
$choicelink = '';
|
2664 |
+
$infolink = '';
|
2665 |
if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
|
2666 |
if ( wppa_may_user_fe_edit( $id ) && wppa_opt( 'upload_edit' ) != '-none-' ) {
|
2667 |
$editlink = '
|
2694 |
if ( wppa_is_photo_in_zip( $thumb['id'] ) ) {
|
2695 |
$choicelink =
|
2696 |
'<input' .
|
2697 |
+
' id="admin-choice-rem-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
|
2698 |
' type="button"' .
|
2699 |
+
' style="float:right;margin-right:6px;text-decoration:line-through;"' .
|
2700 |
+
' onclick="' .
|
2701 |
+
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2702 |
+
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo from your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
|
2703 |
+
'wppaAjaxRemovePhotoFromZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
|
2704 |
+
|
2705 |
+
' value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"' .
|
2706 |
' />';
|
2707 |
|
2708 |
}
|
2722 |
|
2723 |
}
|
2724 |
}
|
2725 |
+
if ( wppa_switch( 'request_info' ) && is_user_logged_in() ) {
|
2726 |
+
$infolink =
|
2727 |
+
'<input' .
|
2728 |
+
' id="request-info-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
|
2729 |
+
' type="button"' .
|
2730 |
+
' style="float:right;margin-right:6px;"' .
|
2731 |
+
' onclick="' .
|
2732 |
+
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2733 |
+
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to ask for info on this photo?' , 'wp-photo-album-plus') . '" ) ) ' .
|
2734 |
+
'wppaAjaxRequestInfo( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
|
2735 |
+
|
2736 |
+
' value="' . esc_attr( __( 'Request info', 'wp-photo-album-plus' ) ) . '"' .
|
2737 |
+
' />';
|
2738 |
+
}
|
2739 |
}
|
2740 |
+
if ( $editlink || $dellink || $choicelink || $infolink ) $desc = $editlink.$dellink.$choicelink.$infolink.'<div style="clear:both"></div>'.$desc;
|
2741 |
|
2742 |
if ( in_array( $thumb['status'], array( 'pending', 'scheduled' ) ) ) {
|
2743 |
$desc .= wppa_html( esc_js( wppa_moderate_links( 'slide', $id ) ) );
|
wppa-mailing.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
-
* Version 7.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -944,7 +944,7 @@ function wppa_send_mail( $args ) {
|
|
944 |
}
|
945 |
|
946 |
// Tell the moderator the email address of the originator of the photo/comment
|
947 |
-
if ( $email && substr( $listtype, 0, 8 ) == 'moderate' ) {
|
948 |
|
949 |
$eml = sprintf(__('The visitors email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $email, $email);
|
950 |
$message_part_2 .= '<tr><td colspan="'.$colspan.'" >'.$eml.'</td></tr>';
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
+
* Version 7.4.00
|
8 |
*
|
9 |
*/
|
10 |
|
944 |
}
|
945 |
|
946 |
// Tell the moderator the email address of the originator of the photo/comment
|
947 |
+
if ( $email && substr( $listtype, 0, 8 ) == 'moderate' || $listtype == 'showemail' ) {
|
948 |
|
949 |
$eml = sprintf(__('The visitors email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $email, $email);
|
950 |
$message_part_2 .= '<tr><td colspan="'.$colspan.'" >'.$eml.'</td></tr>';
|
wppa-settings-autosave.php
CHANGED
@@ -4511,6 +4511,15 @@ global $wppa_supported_camara_brands;
|
|
4511 |
$tags = '';
|
4512 |
wppa_setting( $slug, '34', $name, $desc, $html, $help, $clas, $tags );
|
4513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4514 |
}
|
4515 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
|
4516 |
{
|
4511 |
$tags = '';
|
4512 |
wppa_setting( $slug, '34', $name, $desc, $html, $help, $clas, $tags );
|
4513 |
|
4514 |
+
$name = __('Enable request info', 'wp-photo-album-plus');
|
4515 |
+
$desc = __('Shows a button under the slideshow image to request info by email', 'wp-photo-album-plus');
|
4516 |
+
$help = '';
|
4517 |
+
$slug = 'wppa_request_info';
|
4518 |
+
$html = wppa_checkbox( $slug );
|
4519 |
+
$clas = '';
|
4520 |
+
$tags = 'system';
|
4521 |
+
wppa_setting($slug, '35', $name, $desc, $html, $help, $clas, $tags);
|
4522 |
+
|
4523 |
}
|
4524 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
|
4525 |
{
|
wppa-users.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
-
* Version 7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -78,6 +78,9 @@ static $current_user;
|
|
78 |
case 'id':
|
79 |
return $current_user->ID;
|
80 |
break;
|
|
|
|
|
|
|
81 |
case 'firstlast':
|
82 |
return $current_user->user_firstname.' '.$current_user->user_lastname;
|
83 |
break;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
+
* Version 7.4.00
|
7 |
*
|
8 |
*/
|
9 |
|
78 |
case 'id':
|
79 |
return $current_user->ID;
|
80 |
break;
|
81 |
+
case 'email':
|
82 |
+
return $current_user->user_email;
|
83 |
+
break;
|
84 |
case 'firstlast':
|
85 |
return $current_user->user_firstname.' '.$current_user->user_lastname;
|
86 |
break;
|
wppa-utils.php
CHANGED
@@ -2220,7 +2220,7 @@ global $wpdb;
|
|
2220 |
$album = wppa_cache_album( $thumb['album'] );
|
2221 |
$tags = wppa_sanitize_tags( str_replace( array( '\'', '"'), ',', wppa_filter_iptc( wppa_filter_exif( $album['default_tags'], $id ), $id ) ) );
|
2222 |
|
2223 |
-
if ( wppa_switch( '
|
2224 |
$keywords = $wpdb->get_col( "SELECT description FROM $wpdb->wppa_iptc WHERE tag = '2#025' AND photo = $id" );
|
2225 |
if ( $keywords ) {
|
2226 |
foreach( $keywords as $word ) {
|
2220 |
$album = wppa_cache_album( $thumb['album'] );
|
2221 |
$tags = wppa_sanitize_tags( str_replace( array( '\'', '"'), ',', wppa_filter_iptc( wppa_filter_exif( $album['default_tags'], $id ), $id ) ) );
|
2222 |
|
2223 |
+
if ( wppa_switch( 'ipc025_to_tags' ) ) {
|
2224 |
$keywords = $wpdb->get_col( "SELECT description FROM $wpdb->wppa_iptc WHERE tag = '2#025' AND photo = $id" );
|
2225 |
if ( $keywords ) {
|
2226 |
foreach( $keywords as $word ) {
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 7.4.00.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7400'; // WPPA db version
|
27 |
-
global $wppa_api_version; $wppa_api_version = '7.4.00.
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.4.00.002
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7400'; // WPPA db version
|
27 |
+
global $wppa_api_version; $wppa_api_version = '7.4.00.002'; // WPPA software version
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|