Version Description
= 8.0.10 =
- This version addresses various bug fixes, feature requests and security fixes.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.1.00.003 |
Comparing to | |
See all releases |
Code changes from version 8.1.00.002 to 8.1.00.003
- js/wppa-admin-scripts.js +15 -1
- js/wppa-admin-scripts.min.js +1 -1
- wppa-admin-functions.php +2 -16
- wppa-admin.php +22 -21
- wppa-ajax.php +3 -17
- wppa-album-admin-autosave.php +75 -72
- wppa-boxes-html.php +3 -5
- wppa-defaults.php +1 -2
- wppa-filter.php +12 -1
- wppa-functions.php +1 -13
- wppa-input.php +2 -1
- wppa-photo-admin-autosave.php +4 -3
- wppa-scripts.php +7 -7
- wppa-settings-autosave.php +13 -39
- wppa.php +2 -2
js/wppa-admin-scripts.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
-
/* Version 8.1.00.
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -1916,3 +1916,17 @@ function wppaAjaxReplaceLog() {
|
|
1916 |
}
|
1917 |
});
|
1918 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 8.1.00.003
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
1916 |
}
|
1917 |
});
|
1918 |
}
|
1919 |
+
|
1920 |
+
// Hide admin spinner
|
1921 |
+
jQuery(document).ready( function() {
|
1922 |
+
setTimeout( "wppaTestAdminReady()", 200 );
|
1923 |
+
});
|
1924 |
+
function wppaTestAdminReady() {
|
1925 |
+
if ( document.readyState === "complete" ) {
|
1926 |
+
jQuery( "#wppa-admin-spinner" ).fadeOut();
|
1927 |
+
}
|
1928 |
+
else {
|
1929 |
+
setTimeout( "wppaTestAdminReady()", 200 );
|
1930 |
+
}
|
1931 |
+
}
|
1932 |
+
|
js/wppa-admin-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},i.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a:aftrer="</div>",wppaFeAjaxLog("in");var o=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,o.open("GET",a,!0),o.send(),o.onreadystatechange=function(){switch(o.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==o.status?("ER"==(e=wppaTrim(o.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+o.status+": "+o.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),wppaAlbumUpdateMatrix[i][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[i][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,i,l,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(i),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}))}function wppaAjaxUpdateOptionValue(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+i).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,i=0;i<e.length;)0!=(a=e[i].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),i++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}
|
1 |
+
function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},i.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a:aftrer="</div>",wppaFeAjaxLog("in");var o=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,o.open("GET",a,!0),o.send(),o.onreadystatechange=function(){switch(o.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==o.status?("ER"==(e=wppaTrim(o.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+o.status+": "+o.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),wppaAlbumUpdateMatrix[i][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[i][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,i,l,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(i),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}))}function wppaAjaxUpdateOptionValue(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+i).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,i=0;i<e.length;)0!=(a=e[i].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),i++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}function wppaTestAdminReady(){"complete"===document.readyState?jQuery("#wppa-admin-spinner").fadeOut():setTimeout("wppaTestAdminReady()",200)}jQuery(document).ready(function(){setTimeout("wppaTestAdminReady()",200)});
|
wppa-admin-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
-
* Version 8.0.09.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -934,21 +934,7 @@ function wppa_admin_spinner() {
|
|
934 |
'margin-top:-33px;' .
|
935 |
'z-index:9999999;' .
|
936 |
'"' .
|
937 |
-
' />'
|
938 |
-
'<script type="text/javascript" >' .
|
939 |
-
/* 'jQuery( "#wppa-admin-spinner" ).css( { left:(screen.width/2-33),top:(screen.height/2-33) } );' . */
|
940 |
-
'jQuery(document).ready( function() { ' .
|
941 |
-
'setTimeout( "wppaTestAdminReady()", 200 ); ' .
|
942 |
-
'} );' .
|
943 |
-
'function wppaTestAdminReady() { ' .
|
944 |
-
' if ( document.readyState === "complete" ) {' .
|
945 |
-
'jQuery( "#wppa-admin-spinner" ).fadeOut(); ' .
|
946 |
-
' } else { ' .
|
947 |
-
' setTimeout( "wppaTestAdminReady()", 200 ); ' .
|
948 |
-
'}' .
|
949 |
-
'}' .
|
950 |
-
'</script>';
|
951 |
-
|
952 |
echo $result;
|
953 |
}
|
954 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
+
* Version 8.0.09.003
|
7 |
*
|
8 |
*/
|
9 |
|
934 |
'margin-top:-33px;' .
|
935 |
'z-index:9999999;' .
|
936 |
'"' .
|
937 |
+
' />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
938 |
echo $result;
|
939 |
}
|
940 |
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -103,29 +103,31 @@ add_action( 'admin_init', 'wppa_admin_scripts' );
|
|
103 |
|
104 |
function wppa_admin_scripts() {
|
105 |
global $wppa_api_version;
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
else {
|
112 |
-
wp_register_script( '
|
113 |
}
|
114 |
-
|
115 |
-
wp_enqueue_script( '
|
116 |
-
|
117 |
-
wp_enqueue_script( '
|
118 |
-
|
119 |
-
wp_enqueue_script( '
|
120 |
-
|
121 |
-
|
122 |
-
wp_enqueue_script( 'wppa-slideshow', WPPA_URL . '/js/wppa-slideshow.js', array(), $wppa_api_version );
|
123 |
-
wp_enqueue_script( 'wppa-ajax-front', WPPA_URL . '/js/wppa-ajax-front.js', array(), $wppa_api_version );
|
124 |
-
wp_enqueue_script( 'wppa-zoom', WPPA_URL . '/js/wppa-zoom.js', array(), $wppa_api_version );
|
125 |
-
wp_enqueue_script( 'wppa-spheric', WPPA_URL . '/js/wppa-spheric.js', array(), $wppa_api_version );
|
126 |
-
wp_enqueue_script( 'wppa-three', WPPA_URL . '/vendor/three/three.min.js', array(), $wppa_api_version );
|
127 |
if ( wppa_can_magick() ) {
|
128 |
-
wp_enqueue_script( 'cropperjs', WPPA_URL . '/vendor/cropperjs/dist/cropper.min.js',
|
129 |
}
|
130 |
|
131 |
wp_enqueue_style( 'wp-jquery-ui-dialog' );
|
@@ -178,7 +180,6 @@ function wppa_page_import() {
|
|
178 |
wppa_grant_albums();
|
179 |
wppa_rename_files_sanitized( WPPA_DEPOT_PATH );
|
180 |
require_once 'wppa-import.php';
|
181 |
-
echo '<script type="text/javascript" >/* <![CDATA[ */wppa_import = "'.__('Import', 'wp-photo-album-plus').'"; wppa_update = "'.__('Update', 'wp-photo-album-plus').'";/* ]]> */</script>';
|
182 |
_wppa_page_import();
|
183 |
}
|
184 |
// Moderate admin page
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
103 |
|
104 |
function wppa_admin_scripts() {
|
105 |
global $wppa_api_version;
|
106 |
+
|
107 |
+
$depts = array(
|
108 |
+
'jquery',
|
109 |
+
'jquery-ui-sortable',
|
110 |
+
'jquery-ui-dialog',
|
111 |
+
'jquery-form',
|
112 |
+
'jquery-masonry',
|
113 |
+
);
|
114 |
+
|
115 |
+
if ( wppa_is_file( WPPA_PATH.'/js/wppa-admin-scripts.min.js' ) ) {
|
116 |
+
wp_enqueue_script( 'wppa-admin', WPPA_URL.'/js/wppa-admin-scripts.min.js', $depts, $wppa_api_version, true );
|
117 |
}
|
118 |
else {
|
119 |
+
wp_register_script( 'wppa-admin', WPPA_URL.'/js/wppa-admin-scripts.js', $depts, $wppa_api_version, true );
|
120 |
}
|
121 |
+
wp_enqueue_script( 'wppa-upload', WPPA_URL.'/js/wppa-multifile-compressed.js', '', $wppa_api_version, true );
|
122 |
+
wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js',$depts, $wppa_api_version );
|
123 |
+
wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa.js', $depts, $wppa_api_version );
|
124 |
+
wp_enqueue_script( 'wppa-slideshow', WPPA_URL . '/js/wppa-slideshow.js', $depts, $wppa_api_version );
|
125 |
+
wp_enqueue_script( 'wppa-ajax-front', WPPA_URL . '/js/wppa-ajax-front.js', $depts, $wppa_api_version );
|
126 |
+
wp_enqueue_script( 'wppa-zoom', WPPA_URL . '/js/wppa-zoom.js', $depts, $wppa_api_version );
|
127 |
+
wp_enqueue_script( 'wppa-spheric', WPPA_URL . '/js/wppa-spheric.js', $depts, $wppa_api_version );
|
128 |
+
wp_enqueue_script( 'wppa-three', WPPA_URL . '/vendor/three/three.min.js', $depts, $wppa_api_version );
|
|
|
|
|
|
|
|
|
|
|
129 |
if ( wppa_can_magick() ) {
|
130 |
+
wp_enqueue_script( 'cropperjs', WPPA_URL . '/vendor/cropperjs/dist/cropper.min.js', $depts, $wppa_api_version );
|
131 |
}
|
132 |
|
133 |
wp_enqueue_style( 'wp-jquery-ui-dialog' );
|
180 |
wppa_grant_albums();
|
181 |
wppa_rename_files_sanitized( WPPA_DEPOT_PATH );
|
182 |
require_once 'wppa-import.php';
|
|
|
183 |
_wppa_page_import();
|
184 |
}
|
185 |
// Moderate admin page
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 8.1.00.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -501,18 +501,6 @@ global $wppa;
|
|
501 |
wppa_secfail( '72' );
|
502 |
}
|
503 |
|
504 |
-
// If db agree required, see if it is present
|
505 |
-
$doit = true;
|
506 |
-
if ( wppa_switch( 'comment_need_db_agree' ) ) {
|
507 |
-
if ( wppa_get( 'db-agree' ) ) {
|
508 |
-
echo
|
509 |
-
'<script type="text/javascript" >' .
|
510 |
-
'alert( "' . esc_js( __( 'Your comment needs your agreement for database storage', 'wp-photo-album-plus' ) ) . '" )' .
|
511 |
-
'</script>';
|
512 |
-
$doit = false;
|
513 |
-
}
|
514 |
-
}
|
515 |
-
|
516 |
wppa( 'mocc', $mocc );
|
517 |
wppa( 'comment_photo', $photoid );
|
518 |
wppa( 'comment_id', $commentid );
|
@@ -1111,9 +1099,7 @@ global $wppa;
|
|
1111 |
__('Links and buttons will not work in this preview', 'wp-photo-album-plus') .
|
1112 |
')</i></div>' .
|
1113 |
$result .
|
1114 |
-
'</div>
|
1115 |
-
<script>_wppaDoAutocol(' . $wppa['mocc'] . ');</script>';
|
1116 |
-
|
1117 |
wppa_exit();
|
1118 |
break;
|
1119 |
|
@@ -1528,7 +1514,7 @@ global $wppa;
|
|
1528 |
$mem = memory_get_peak_usage( true ) / 1024 / 1024;
|
1529 |
|
1530 |
$msg = sprintf( 'WPPA Ajax render: db queries: WP:%d, WPPA+: %d in %4.2f seconds, using %4.2f MB memory max', $nq_1, $nq_2 - $nq_1, $tim_2 - $tim_1, $mem );
|
1531 |
-
|
1532 |
break;
|
1533 |
|
1534 |
case 'delete-photo':
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.1.00.003
|
6 |
*
|
7 |
*/
|
8 |
|
501 |
wppa_secfail( '72' );
|
502 |
}
|
503 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
wppa( 'mocc', $mocc );
|
505 |
wppa( 'comment_photo', $photoid );
|
506 |
wppa( 'comment_id', $commentid );
|
1099 |
__('Links and buttons will not work in this preview', 'wp-photo-album-plus') .
|
1100 |
')</i></div>' .
|
1101 |
$result .
|
1102 |
+
'</div>';
|
|
|
|
|
1103 |
wppa_exit();
|
1104 |
break;
|
1105 |
|
1514 |
$mem = memory_get_peak_usage( true ) / 1024 / 1024;
|
1515 |
|
1516 |
$msg = sprintf( 'WPPA Ajax render: db queries: WP:%d, WPPA+: %d in %4.2f seconds, using %4.2f MB memory max', $nq_1, $nq_2 - $nq_1, $tim_2 - $tim_1, $mem );
|
1517 |
+
wppa_log( 'ajx', $msg );
|
1518 |
break;
|
1519 |
|
1520 |
case 'delete-photo':
|
wppa-album-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -288,18 +288,21 @@ global $wppa_revno;
|
|
288 |
}
|
289 |
}
|
290 |
|
|
|
|
|
291 |
// Set all to pano
|
292 |
$timeup = false;
|
293 |
$pano = wppa_get( 'pano-val', '9' );
|
294 |
if ( in_array( $pano, array( '0', '1', '2' ) ) ) {
|
295 |
|
296 |
-
$last = get_option( 'wppa_last_pano_set', '0' );
|
297 |
$done = '0';
|
298 |
$todo = $wpdb->get_results( $wpdb->prepare( "SELECT id, photox, photoy, panorama, angle FROM $wpdb->wppa_photos
|
299 |
WHERE album = %d
|
300 |
-
|
301 |
AND ext = 'jpg'
|
302 |
-
|
|
|
303 |
$tot = count( $todo );
|
304 |
|
305 |
if ( $tot ) foreach( $todo as $item ) {
|
@@ -356,18 +359,18 @@ global $wppa_revno;
|
|
356 |
wppa_remake_files( '', $id );
|
357 |
wppa_get_photox( $id, true );
|
358 |
wppa_get_photoy( $id, true );
|
359 |
-
|
360 |
$done++;
|
361 |
|
362 |
if ( ! in_array( $pano, array( '0', '1', '2' ) ) ) {
|
363 |
-
$
|
364 |
}
|
365 |
elseif ( $done == $tot ) {
|
366 |
-
$
|
367 |
-
|
368 |
}
|
369 |
else {
|
370 |
-
$
|
371 |
}
|
372 |
}
|
373 |
|
@@ -375,17 +378,13 @@ global $wppa_revno;
|
|
375 |
$timeup = wppa_is_time_up() && ( $done != $tot );
|
376 |
if ( $timeup ) break;
|
377 |
}
|
|
|
|
|
|
|
378 |
|
379 |
if ( $timeup ) {
|
380 |
-
$
|
381 |
}
|
382 |
-
|
383 |
-
echo '
|
384 |
-
<script>
|
385 |
-
jQuery(document).ready(function(){
|
386 |
-
jQuery("#albumstatus-'.$edit_id.'").html("'.$status.'");
|
387 |
-
}); ' . ( $timeup ? 'setTimeout(function(){document.location.reload();}, 10000);' : '' ) . '
|
388 |
-
</script>';
|
389 |
}
|
390 |
|
391 |
// Get the album information
|
@@ -424,6 +423,7 @@ global $wppa_revno;
|
|
424 |
$tpviews = $treecounts['treephotoviews'];
|
425 |
$nsub = $treecounts['selfalbums'];
|
426 |
|
|
|
427 |
// Open the photo album admin page
|
428 |
echo
|
429 |
'<div class="wrap">';
|
@@ -431,9 +431,8 @@ global $wppa_revno;
|
|
431 |
// The spinner to indicate busyness
|
432 |
wppa_admin_spinner();
|
433 |
|
434 |
-
// Local js functions
|
435 |
-
|
436 |
-
<script>
|
437 |
function wppaTryInheritCats( id ) {
|
438 |
|
439 |
var query = "' . esc_js( __( 'Are you sure you want to inherit categories to all (grand)children of this album?', 'wp-photo-album-plus' ) ) . '";
|
@@ -497,9 +496,9 @@ global $wppa_revno;
|
|
497 |
else {
|
498 |
alert("' . __( 'Please select a valid panorama mode', 'wp-photo-album-plus' ) . '");
|
499 |
}
|
500 |
-
}
|
501 |
|
502 |
-
|
503 |
|
504 |
// The header
|
505 |
echo '
|
@@ -1043,7 +1042,7 @@ global $wppa_revno;
|
|
1043 |
id="albumstatus-' . $id . '"
|
1044 |
style="font-weight:bold;color:#00AA00;"
|
1045 |
>' .
|
1046 |
-
|
1047 |
</span>';
|
1048 |
|
1049 |
|
@@ -1787,16 +1786,16 @@ global $wppa_revno;
|
|
1787 |
type="button"
|
1788 |
value="' . esc_attr( __( 'Go', 'wp-photo-album-plus' ) ) . '"
|
1789 |
onclick="wppaGoEditAlbNo();"
|
1790 |
-
/>
|
1791 |
-
|
|
|
1792 |
function wppaGoEditAlbNo() {
|
1793 |
var id = document.getElementById("wppa-edit-albid").value;
|
1794 |
var nonce = "' . wp_create_nonce( 'wppa-nonce' ) .'";
|
1795 |
var href = "' . get_admin_url() . 'admin.php?page=wppa_admin_menu&wppa-nonce="+nonce+"&tab=edit&edit-id="+id;
|
1796 |
document.location.href=href;
|
1797 |
-
}
|
1798 |
-
|
1799 |
-
';
|
1800 |
|
1801 |
?>
|
1802 |
|
@@ -2658,23 +2657,23 @@ global $wpdb;
|
|
2658 |
</tfoot>
|
2659 |
|
2660 |
</table>
|
2661 |
-
|
2662 |
-
|
2663 |
function checkArrows() {
|
2664 |
-
elms = jQuery(
|
2665 |
for(i=0;i<elms.length;i++) {
|
2666 |
elm = elms[i];
|
2667 |
-
if ( elm.parentNode.parentNode.style.display ==
|
2668 |
}
|
2669 |
-
elms = jQuery(
|
2670 |
for(i=0;i<elms.length;i++) {
|
2671 |
elm = elms[i];
|
2672 |
-
if ( elm.parentNode.parentNode.style.display ==
|
2673 |
}
|
2674 |
-
}
|
2675 |
-
|
|
|
2676 |
|
2677 |
-
<?php
|
2678 |
wppa_album_table_pagination( $page, $count );
|
2679 |
wppa_album_admin_footer();
|
2680 |
|
@@ -2942,17 +2941,16 @@ global $wpdb;
|
|
2942 |
|
2943 |
// Open subalbums by clicking the open button if it was before (cookie), and if it is visible (!)
|
2944 |
if ( wppa_get_cookie( 'alb-arrow-' . $id ) == 'on' ) {
|
2945 |
-
|
2946 |
-
|
2947 |
-
jQuery(
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
</script>';
|
2956 |
}
|
2957 |
}
|
2958 |
|
@@ -3366,7 +3364,9 @@ global $wpdb;
|
|
3366 |
text-align:center;
|
3367 |
}
|
3368 |
</style>
|
3369 |
-
|
|
|
|
|
3370 |
jQuery( function() {
|
3371 |
jQuery( "#sortable-albums" ).sortable( {
|
3372 |
cursor: "move",
|
@@ -3395,7 +3395,7 @@ global $wpdb;
|
|
3395 |
// Init
|
3396 |
var ids = jQuery( ".wppa-sort-item-albums" );
|
3397 |
var seq = jQuery( ".wppa-sort-seqn-albums" );
|
3398 |
-
var descend =
|
3399 |
|
3400 |
// Mark needs update
|
3401 |
var idx = 0;
|
@@ -3406,7 +3406,7 @@ global $wpdb;
|
|
3406 |
var oldvalue = seq[idx].value;
|
3407 |
var album = ids[idx].value;
|
3408 |
if ( newvalue != oldvalue ) {
|
3409 |
-
jQuery(
|
3410 |
}
|
3411 |
idx++;
|
3412 |
}
|
@@ -3421,7 +3421,7 @@ global $wpdb;
|
|
3421 |
var album = ids[idx].value;
|
3422 |
if ( newvalue != oldvalue ) {
|
3423 |
wppaDoSeqUpdateAlbum( album, newvalue );
|
3424 |
-
jQuery(
|
3425 |
wppaLastAlbum = album;
|
3426 |
}
|
3427 |
idx++;
|
@@ -3430,40 +3430,40 @@ global $wpdb;
|
|
3430 |
|
3431 |
function wppaDoSeqUpdateAlbum( album, seqno ) {
|
3432 |
|
3433 |
-
var data =
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
var xmlhttp = new XMLHttpRequest();
|
3440 |
|
3441 |
xmlhttp.onreadystatechange = function() {
|
3442 |
if ( xmlhttp.readyState == 4 && xmlhttp.status != 404 ) {
|
3443 |
var ArrValues = xmlhttp.responseText.split( "||" );
|
3444 |
-
if ( ArrValues[0] !=
|
3445 |
-
alert(
|
3446 |
}
|
3447 |
switch ( ArrValues[1] ) {
|
3448 |
-
case
|
3449 |
var i = seqno - 1;
|
3450 |
-
var descend = <?php if ( $is_descending ) echo
|
3451 |
if ( descend ) {
|
3452 |
i = <?php echo count( $albums ) ?> - seqno;
|
3453 |
}
|
3454 |
-
jQuery(
|
3455 |
if ( wppaRenumberPending ) {
|
3456 |
-
jQuery(
|
3457 |
}
|
3458 |
else {
|
3459 |
-
jQuery(
|
3460 |
}
|
3461 |
if ( wppaLastAlbum = album ) {
|
3462 |
wppaRenumberBusy = false;
|
3463 |
}
|
3464 |
break;
|
3465 |
default: // Any error
|
3466 |
-
jQuery(
|
3467 |
break;
|
3468 |
}
|
3469 |
wppaAjaxInProgress--;
|
@@ -3480,16 +3480,19 @@ global $wpdb;
|
|
3480 |
}
|
3481 |
}
|
3482 |
}
|
3483 |
-
xmlhttp.open(
|
3484 |
xmlhttp.setRequestHeader( "Content-type","application/x-www-form-urlencoded" );
|
3485 |
xmlhttp.send( data );
|
3486 |
wppaAjaxInProgress++;
|
3487 |
|
3488 |
-
jQuery( "#wppa-sort-seqn-albums-" + album ).prop(
|
3489 |
-
var spinnerhtml =
|
3490 |
-
jQuery(
|
3491 |
-
}
|
3492 |
-
|
|
|
|
|
|
|
3493 |
|
3494 |
<br />
|
3495 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
288 |
}
|
289 |
}
|
290 |
|
291 |
+
$remark = sprintf( __( 'Album %s is not modified yet', 'wp-photo-album-plus' ), $edit_id );
|
292 |
+
|
293 |
// Set all to pano
|
294 |
$timeup = false;
|
295 |
$pano = wppa_get( 'pano-val', '9' );
|
296 |
if ( in_array( $pano, array( '0', '1', '2' ) ) ) {
|
297 |
|
298 |
+
// $last = get_option( 'wppa_last_pano_set', '0' );
|
299 |
$done = '0';
|
300 |
$todo = $wpdb->get_results( $wpdb->prepare( "SELECT id, photox, photoy, panorama, angle FROM $wpdb->wppa_photos
|
301 |
WHERE album = %d
|
302 |
+
|
303 |
AND ext = 'jpg'
|
304 |
+
AND panorama <> %d
|
305 |
+
ORDER BY id", $edit_id, $pano ), ARRAY_A );
|
306 |
$tot = count( $todo );
|
307 |
|
308 |
if ( $tot ) foreach( $todo as $item ) {
|
359 |
wppa_remake_files( '', $id );
|
360 |
wppa_get_photox( $id, true );
|
361 |
wppa_get_photoy( $id, true );
|
362 |
+
// update_option( 'wppa_last_pano_set', $id );
|
363 |
$done++;
|
364 |
|
365 |
if ( ! in_array( $pano, array( '0', '1', '2' ) ) ) {
|
366 |
+
$remark = __( 'No items processed', 'wp-photo-album-plus' );
|
367 |
}
|
368 |
elseif ( $done == $tot ) {
|
369 |
+
$remark = __( 'All applicable items processed', 'wp-photo-album-plus' );
|
370 |
+
// delete_option( 'wppa_last_pano_set' );
|
371 |
}
|
372 |
else {
|
373 |
+
$remark = sprintf( __( '%1d items out of %2d processed', 'wp-photo-album-plus' ), $done, $tot );
|
374 |
}
|
375 |
}
|
376 |
|
378 |
$timeup = wppa_is_time_up() && ( $done != $tot );
|
379 |
if ( $timeup ) break;
|
380 |
}
|
381 |
+
else {
|
382 |
+
$remark = __( 'No items to process', 'wp-photo-album-plus' );
|
383 |
+
}
|
384 |
|
385 |
if ( $timeup ) {
|
386 |
+
$remark .= ' ' . __( 'No time left, please reload the page to continue.', 'wp-photo-album-plus' );
|
387 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
}
|
389 |
|
390 |
// Get the album information
|
423 |
$tpviews = $treecounts['treephotoviews'];
|
424 |
$nsub = $treecounts['selfalbums'];
|
425 |
|
426 |
+
|
427 |
// Open the photo album admin page
|
428 |
echo
|
429 |
'<div class="wrap">';
|
431 |
// The spinner to indicate busyness
|
432 |
wppa_admin_spinner();
|
433 |
|
434 |
+
// Local js functions
|
435 |
+
$the_js = '
|
|
|
436 |
function wppaTryInheritCats( id ) {
|
437 |
|
438 |
var query = "' . esc_js( __( 'Are you sure you want to inherit categories to all (grand)children of this album?', 'wp-photo-album-plus' ) ) . '";
|
496 |
else {
|
497 |
alert("' . __( 'Please select a valid panorama mode', 'wp-photo-album-plus' ) . '");
|
498 |
}
|
499 |
+
}';
|
500 |
|
501 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
502 |
|
503 |
// The header
|
504 |
echo '
|
1042 |
id="albumstatus-' . $id . '"
|
1043 |
style="font-weight:bold;color:#00AA00;"
|
1044 |
>' .
|
1045 |
+
esc_html( $remark ) . '
|
1046 |
</span>';
|
1047 |
|
1048 |
|
1786 |
type="button"
|
1787 |
value="' . esc_attr( __( 'Go', 'wp-photo-album-plus' ) ) . '"
|
1788 |
onclick="wppaGoEditAlbNo();"
|
1789 |
+
/>';
|
1790 |
+
|
1791 |
+
$the_js = '
|
1792 |
function wppaGoEditAlbNo() {
|
1793 |
var id = document.getElementById("wppa-edit-albid").value;
|
1794 |
var nonce = "' . wp_create_nonce( 'wppa-nonce' ) .'";
|
1795 |
var href = "' . get_admin_url() . 'admin.php?page=wppa_admin_menu&wppa-nonce="+nonce+"&tab=edit&edit-id="+id;
|
1796 |
document.location.href=href;
|
1797 |
+
};';
|
1798 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
|
|
1799 |
|
1800 |
?>
|
1801 |
|
2657 |
</tfoot>
|
2658 |
|
2659 |
</table>
|
2660 |
+
<?php
|
2661 |
+
$the_js = '
|
2662 |
function checkArrows() {
|
2663 |
+
elms = jQuery(".alb-arrow-off");
|
2664 |
for(i=0;i<elms.length;i++) {
|
2665 |
elm = elms[i];
|
2666 |
+
if ( elm.parentNode.parentNode.style.display == "none" ) elm.style.display = "none";
|
2667 |
}
|
2668 |
+
elms = jQuery(".alb-arrow-on");
|
2669 |
for(i=0;i<elms.length;i++) {
|
2670 |
elm = elms[i];
|
2671 |
+
if ( elm.parentNode.parentNode.style.display == "none" ) elm.style.display = "";
|
2672 |
}
|
2673 |
+
}';
|
2674 |
+
|
2675 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
2676 |
|
|
|
2677 |
wppa_album_table_pagination( $page, $count );
|
2678 |
wppa_album_admin_footer();
|
2679 |
|
2941 |
|
2942 |
// Open subalbums by clicking the open button if it was before (cookie), and if it is visible (!)
|
2943 |
if ( wppa_get_cookie( 'alb-arrow-' . $id ) == 'on' ) {
|
2944 |
+
$the_js = '
|
2945 |
+
jQuery(document).ready(function(){
|
2946 |
+
if (jQuery("#alb-'.$id.'").css("display")!=="none") {
|
2947 |
+
jQuery("#alb-arrow-on-'.$id.'").trigger("click");
|
2948 |
+
}
|
2949 |
+
else {
|
2950 |
+
wppa_setCookie("alb-arrow-'.$id.'","off",365);
|
2951 |
+
}
|
2952 |
+
});';
|
2953 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
|
|
2954 |
}
|
2955 |
}
|
2956 |
|
3364 |
text-align:center;
|
3365 |
}
|
3366 |
</style>
|
3367 |
+
|
3368 |
+
<?php
|
3369 |
+
$the_js = '
|
3370 |
jQuery( function() {
|
3371 |
jQuery( "#sortable-albums" ).sortable( {
|
3372 |
cursor: "move",
|
3395 |
// Init
|
3396 |
var ids = jQuery( ".wppa-sort-item-albums" );
|
3397 |
var seq = jQuery( ".wppa-sort-seqn-albums" );
|
3398 |
+
var descend = ' . ( $is_descending ? 'true' : 'false' ) . ';
|
3399 |
|
3400 |
// Mark needs update
|
3401 |
var idx = 0;
|
3406 |
var oldvalue = seq[idx].value;
|
3407 |
var album = ids[idx].value;
|
3408 |
if ( newvalue != oldvalue ) {
|
3409 |
+
jQuery( "#wppa-pb-"+idx ).css({backgroundColor:"orange"});
|
3410 |
}
|
3411 |
idx++;
|
3412 |
}
|
3421 |
var album = ids[idx].value;
|
3422 |
if ( newvalue != oldvalue ) {
|
3423 |
wppaDoSeqUpdateAlbum( album, newvalue );
|
3424 |
+
jQuery( "#wppa-pb-"+idx ).css({backgroundColor:"yellow"});
|
3425 |
wppaLastAlbum = album;
|
3426 |
}
|
3427 |
idx++;
|
3430 |
|
3431 |
function wppaDoSeqUpdateAlbum( album, seqno ) {
|
3432 |
|
3433 |
+
var data = "action=wppa" +
|
3434 |
+
"&wppa-action=update-album" +
|
3435 |
+
"&album-id=" + album +
|
3436 |
+
"&item=a_order" +
|
3437 |
+
"&wppa-nonce=" + document.getElementById( "album-nonce-" + album ).value +
|
3438 |
+
"&value=" + seqno;
|
3439 |
var xmlhttp = new XMLHttpRequest();
|
3440 |
|
3441 |
xmlhttp.onreadystatechange = function() {
|
3442 |
if ( xmlhttp.readyState == 4 && xmlhttp.status != 404 ) {
|
3443 |
var ArrValues = xmlhttp.responseText.split( "||" );
|
3444 |
+
if ( ArrValues[0] != "" ) {
|
3445 |
+
alert( "The server returned unexpected output:\n" + ArrValues[0] );
|
3446 |
}
|
3447 |
switch ( ArrValues[1] ) {
|
3448 |
+
case "0": // No error
|
3449 |
var i = seqno - 1;
|
3450 |
+
var descend = <?php if ( $is_descending ) echo "true"; else echo "false" ?>;
|
3451 |
if ( descend ) {
|
3452 |
i = <?php echo count( $albums ) ?> - seqno;
|
3453 |
}
|
3454 |
+
jQuery( "#wppa-album-seqno-" + album ).html( seqno );
|
3455 |
if ( wppaRenumberPending ) {
|
3456 |
+
jQuery( "#wppa-pb-"+i ).css({backgroundColor:"orange"});
|
3457 |
}
|
3458 |
else {
|
3459 |
+
jQuery( "#wppa-pb-"+i ).css({backgroundColor:"green"});
|
3460 |
}
|
3461 |
if ( wppaLastAlbum = album ) {
|
3462 |
wppaRenumberBusy = false;
|
3463 |
}
|
3464 |
break;
|
3465 |
default: // Any error
|
3466 |
+
jQuery( "#wppa-album-seqno-" + album ).html( "<span style="color"red" >Err:" + ArrValues[1] + "</span>" );
|
3467 |
break;
|
3468 |
}
|
3469 |
wppaAjaxInProgress--;
|
3480 |
}
|
3481 |
}
|
3482 |
}
|
3483 |
+
xmlhttp.open( "POST",wppaAjaxUrl,true );
|
3484 |
xmlhttp.setRequestHeader( "Content-type","application/x-www-form-urlencoded" );
|
3485 |
xmlhttp.send( data );
|
3486 |
wppaAjaxInProgress++;
|
3487 |
|
3488 |
+
jQuery( "#wppa-sort-seqn-albums-" + album ).prop( "value", seqno ); // set hidden value to new value to prevent duplicate action
|
3489 |
+
var spinnerhtml = "<img src=\'" + wppaImageDirectory + "spinner.gif\' />";
|
3490 |
+
jQuery( "#wppa-album-seqno-" + album ).html( spinnerhtml );
|
3491 |
+
}';
|
3492 |
+
|
3493 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
3494 |
+
|
3495 |
+
?>
|
3496 |
|
3497 |
<br />
|
3498 |
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -4411,8 +4411,7 @@ global $wpdb;
|
|
4411 |
style="background-color:transparent;"
|
4412 |
>' .
|
4413 |
$smily_html .
|
4414 |
-
$comment_input .
|
4415 |
-
( wppa_switch( 'comment_need_db_agree' ) ? $dbconfirm_html : '' ) . '
|
4416 |
</td>
|
4417 |
<tr>
|
4418 |
<tr>
|
@@ -4460,8 +4459,7 @@ global $wpdb;
|
|
4460 |
</td>
|
4461 |
<td>' .
|
4462 |
$smily_html .
|
4463 |
-
$comment_input .
|
4464 |
-
( wppa_switch( 'comment_need_db_agree' ) ? $dbconfirm_html : '' ) . '
|
4465 |
</td>
|
4466 |
</tr>';
|
4467 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
4411 |
style="background-color:transparent;"
|
4412 |
>' .
|
4413 |
$smily_html .
|
4414 |
+
$comment_input . '
|
|
|
4415 |
</td>
|
4416 |
<tr>
|
4417 |
<tr>
|
4459 |
</td>
|
4460 |
<td>' .
|
4461 |
$smily_html .
|
4462 |
+
$comment_input . '
|
|
|
4463 |
</td>
|
4464 |
</tr>';
|
4465 |
}
|
wppa-defaults.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -611,7 +611,6 @@ horizrailenabled:false,";
|
|
611 |
'wppa_comten_alt_thumbsize' => '75',
|
612 |
'wppa_comment_smiley_picker' => 'no',
|
613 |
'wppa_comment_clickable' => 'no',
|
614 |
-
'wppa_comment_need_db_agree' => 'no',
|
615 |
'wppa_comment_need_vote' => 'no',
|
616 |
|
617 |
// G Overlay
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
611 |
'wppa_comten_alt_thumbsize' => '75',
|
612 |
'wppa_comment_smiley_picker' => 'no',
|
613 |
'wppa_comment_clickable' => 'no',
|
|
|
614 |
'wppa_comment_need_vote' => 'no',
|
615 |
|
616 |
// G Overlay
|
wppa-filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
-
* Version 8.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -288,6 +288,17 @@ global $other_deps;
|
|
288 |
break;
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
// Displatch on type
|
292 |
switch ( $type ) {
|
293 |
case 'version':
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
288 |
break;
|
289 |
}
|
290 |
|
291 |
+
// If album="#tags,#me", translate #me to displayname
|
292 |
+
if ( $atts['album'] == '#tags,#me' ) {
|
293 |
+
if ( is_user_logged_in() ) {
|
294 |
+
$unam = wppa_get_user( 'display' );
|
295 |
+
}
|
296 |
+
else {
|
297 |
+
$unam = '';
|
298 |
+
}
|
299 |
+
$atts['album'] = '#tags,' . $unam;
|
300 |
+
}
|
301 |
+
|
302 |
// Displatch on type
|
303 |
switch ( $type ) {
|
304 |
case 'version':
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1552,18 +1552,6 @@ global $wppa_session;
|
|
1552 |
// Tagcloud or multitag? Tags do not look at album
|
1553 |
elseif ( wppa( 'is_tag' ) ) {
|
1554 |
|
1555 |
-
// Translate #me tag to current user id
|
1556 |
-
if ( strpos( wppa( 'is_tag' ), '#me' ) !== false ) {
|
1557 |
-
$uid = wppa_get_user( 'id' );
|
1558 |
-
if ( ! is_numeric( $uid ) ) { // Not logged in?
|
1559 |
-
$uid = '';
|
1560 |
-
}
|
1561 |
-
else {
|
1562 |
-
$uid = 'user-'.$uid;
|
1563 |
-
}
|
1564 |
-
wppa( 'is_tag', str_replace( '#me', $uid, wppa( 'is_tag' ) ) );
|
1565 |
-
}
|
1566 |
-
|
1567 |
// Init
|
1568 |
$andor = 'AND';
|
1569 |
if ( strpos( wppa( 'is_tag' ), ';' ) ) $andor = 'OR';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
1552 |
// Tagcloud or multitag? Tags do not look at album
|
1553 |
elseif ( wppa( 'is_tag' ) ) {
|
1554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1555 |
// Init
|
1556 |
$andor = 'AND';
|
1557 |
if ( strpos( wppa( 'is_tag' ), ';' ) ) $andor = 'OR';
|
wppa-input.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions for sanitizing and formatting user input
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -134,6 +134,7 @@ function wppa_get_get_filter( $name ) {
|
|
134 |
case 'export-submit':
|
135 |
case 'blogit':
|
136 |
case 'cron':
|
|
|
137 |
$result = 'bool';
|
138 |
break;
|
139 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions for sanitizing and formatting user input
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
134 |
case 'export-submit':
|
135 |
case 'blogit':
|
136 |
case 'cron':
|
137 |
+
case 'seq':
|
138 |
$result = 'bool';
|
139 |
break;
|
140 |
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2492,8 +2492,9 @@ function wppaToggleExif( id, count ) {
|
|
2492 |
}
|
2493 |
}
|
2494 |
|
|
|
|
|
2495 |
echo
|
2496 |
-
'<script>wppaPhotoStatusChange( ' . $id . ' )</script>' .
|
2497 |
'<div style="clear:both;"></div>' .
|
2498 |
'</div>' .
|
2499 |
'<div style="clear:both;margin-top:7px;"></div>';
|
@@ -3140,7 +3141,7 @@ function wppaSetConfirmMove( id ) {
|
|
3140 |
<!-- Remark -->
|
3141 |
<td id="remark-<?php echo $photo['id'] ?>" style="width:25%;" >
|
3142 |
<?php _e( 'Not modified' , 'wp-photo-album-plus') ?>
|
3143 |
-
|
3144 |
</td>
|
3145 |
</tr>
|
3146 |
<?php } ?>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
2492 |
}
|
2493 |
}
|
2494 |
|
2495 |
+
wp_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$id.');' );
|
2496 |
+
|
2497 |
echo
|
|
|
2498 |
'<div style="clear:both;"></div>' .
|
2499 |
'</div>' .
|
2500 |
'<div style="clear:both;margin-top:7px;"></div>';
|
3141 |
<!-- Remark -->
|
3142 |
<td id="remark-<?php echo $photo['id'] ?>" style="width:25%;" >
|
3143 |
<?php _e( 'Not modified' , 'wp-photo-album-plus') ?>
|
3144 |
+
<?php wp_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$photo['id'].');' ); ?>
|
3145 |
</td>
|
3146 |
</tr>
|
3147 |
<?php } ?>
|
wppa-scripts.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
-
* Version 8.0.10.
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
@@ -238,10 +238,10 @@ global $wpdb;
|
|
238 |
/* admin-scripts.js */
|
239 |
$result .= '
|
240 |
wppa_moveup_url = "#",
|
241 |
-
wppa_import = "Import",
|
242 |
-
wppa_update = "Update",
|
243 |
-
wppaUploadToThisAlbum = "Upload to this album",
|
244 |
-
wppaCloseText = "' . __( 'Close!', 'wp-photo-album-plus' ) . '",
|
245 |
wppaCropper = [],';
|
246 |
|
247 |
// Find ajax url
|
@@ -552,7 +552,7 @@ global $wppa_opt;
|
|
552 |
$all_file = dirname( __FILE__ ) . '/js/wppa-all.js';
|
553 |
if ( wppa_is_file( $all_file ) ) {
|
554 |
$js_ver = date( "ymd-Gis", filemtime( $all_file ) );
|
555 |
-
wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa-all.js', $js_depts, $js_ver, false );
|
556 |
}
|
557 |
|
558 |
// No all file, do them one by one
|
@@ -700,10 +700,10 @@ function wppa_compress_js( $txt ) {
|
|
700 |
// Decide if we do defer js
|
701 |
function wppa_is_defer() {
|
702 |
|
|
|
703 |
if ( ! wppa_switch( 'defer_javascript' ) ) return false;
|
704 |
if ( wppa( 'ajax' ) ) return false;
|
705 |
if ( wppa( 'cron' ) ) return false;
|
706 |
-
if ( is_admin() ) return false;
|
707 |
if ( wppa( 'is_slide' ) || wppa( 'is_slideonly' ) || wppa( 'is_filmonly' ) ) return false;
|
708 |
return true;
|
709 |
}
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
+
* Version 8.0.10.003
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
238 |
/* admin-scripts.js */
|
239 |
$result .= '
|
240 |
wppa_moveup_url = "#",
|
241 |
+
wppa_import = "' . esc_js( __( 'Import', 'wp-photo-album-plus' ) ) . '",
|
242 |
+
wppa_update = "' . esc_js( __( 'Update', 'wp-photo-album-plus' ) ) . '",
|
243 |
+
wppaUploadToThisAlbum = "' . esc_js( __( 'Upload to this album', 'wp-photo-album-plus' ) ) . '",
|
244 |
+
wppaCloseText = "' . esc_js( __( 'Close!', 'wp-photo-album-plus' ) ) . '",
|
245 |
wppaCropper = [],';
|
246 |
|
247 |
// Find ajax url
|
552 |
$all_file = dirname( __FILE__ ) . '/js/wppa-all.js';
|
553 |
if ( wppa_is_file( $all_file ) ) {
|
554 |
$js_ver = date( "ymd-Gis", filemtime( $all_file ) );
|
555 |
+
wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa-all.js', $js_depts, $js_ver, $footer ); //false );
|
556 |
}
|
557 |
|
558 |
// No all file, do them one by one
|
700 |
// Decide if we do defer js
|
701 |
function wppa_is_defer() {
|
702 |
|
703 |
+
if ( is_admin() ) return true;
|
704 |
if ( ! wppa_switch( 'defer_javascript' ) ) return false;
|
705 |
if ( wppa( 'ajax' ) ) return false;
|
706 |
if ( wppa( 'cron' ) ) return false;
|
|
|
707 |
if ( wppa( 'is_slide' ) || wppa( 'is_slideonly' ) || wppa( 'is_filmonly' ) ) return false;
|
708 |
return true;
|
709 |
}
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -268,16 +268,8 @@ global $wppa_subtab_names;
|
|
268 |
wppa_ok_message('Done! wppa_delete_all_from_cloudinary');
|
269 |
}
|
270 |
else {
|
271 |
-
wppa_ok_message('Not yet Done! wppa_delete_all_from_cloudinary' .
|
272 |
-
'<br />
|
273 |
-
echo
|
274 |
-
'<script type="text/javascript" >' .
|
275 |
-
'document.location=' .
|
276 |
-
'document.location+"&' .
|
277 |
-
'wppa-settings-submit=Doit&' .
|
278 |
-
'wppa-nonce=' . wp_create_nonce( 'wppa-nonce' ) . '&' .
|
279 |
-
'wppa-key=' . $key . '"' .
|
280 |
-
'</script>';
|
281 |
}
|
282 |
break;
|
283 |
|
@@ -287,16 +279,8 @@ global $wppa_subtab_names;
|
|
287 |
wppa_ok_message('Done! wppa_delete_derived_from_cloudinary');
|
288 |
}
|
289 |
else {
|
290 |
-
wppa_ok_message('Not yet Done! wppa_delete_derived_from_cloudinary' .
|
291 |
-
'<br />
|
292 |
-
echo
|
293 |
-
'<script type="text/javascript" >' .
|
294 |
-
'document.location=' .
|
295 |
-
'document.location+"&' .
|
296 |
-
'wppa-settings-submit=Doit&' .
|
297 |
-
'wppa-nonce=' . wp_create_nonce( 'wppa-nonce' ) . '&' .
|
298 |
-
'wppa-key=' . $key . '"' .
|
299 |
-
'</script>';
|
300 |
}
|
301 |
break;
|
302 |
|
@@ -692,9 +676,9 @@ global $wppa_subtab_names;
|
|
692 |
|
693 |
// The js
|
694 |
{
|
695 |
-
|
696 |
-
|
697 |
-
function wppaSettingTab(tab) {
|
698 |
jQuery(".wppa-setting-tabs li").removeClass("active");
|
699 |
jQuery("#wppa-setting-tab-"+tab).addClass("active");
|
700 |
if ( tab == 99 ) {
|
@@ -786,8 +770,9 @@ global $wppa_subtab_names;
|
|
786 |
if (jQuery(".' . $subtab . '").attr("data-inactive") == "1") jQuery(".' . $subtab . '").trigger("click");
|
787 |
},100)});' : ''
|
788 |
) .
|
789 |
-
( $tab == 'watermark' ? 'jQuery(document).ready(function(){wppaCheckFontPreview();});' : '' )
|
790 |
-
|
|
|
791 |
}
|
792 |
|
793 |
// Open the content area
|
@@ -1347,11 +1332,7 @@ global $wppa_subtab_names;
|
|
1347 |
wppa_setting_new($slug, '9', $name, $desc, $html, $help);
|
1348 |
|
1349 |
wppa_setting_box_footer_new();
|
1350 |
-
|
1351 |
-
<script type="text/javascript" >
|
1352 |
-
wppaAjaxGetSpinnerHtml( "normal", "wppa-spin-pre-1" );
|
1353 |
-
wppaAjaxGetSpinnerHtml( "lightbox", "wppa-spin-pre-2" );
|
1354 |
-
</script>';
|
1355 |
}
|
1356 |
// Multimedia icon and stubfile specifications
|
1357 |
if ( wppa_switch( 'enable_audio' ) || wppa_switch( 'enable_video' ) || wppa_switch( 'enable_pdf' ) )
|
@@ -3748,7 +3729,7 @@ global $wppa_subtab_names;
|
|
3748 |
$html = wppa_select( $slug, $opts, $vals, $onchange ) .
|
3749 |
' <img id="wppa-cursor" src="'.wppa_get_imgdir().wppa_opt( substr( $slug, 5 ) ).'" />';
|
3750 |
wppa_setting_new($slug, '14', $name, $desc, $html, $help);
|
3751 |
-
|
3752 |
|
3753 |
$name = __('Border width', 'wp-photo-album-plus');
|
3754 |
$desc = __('Border width for lightbox display.', 'wp-photo-album-plus');
|
@@ -3975,13 +3956,6 @@ global $wppa_subtab_names;
|
|
3975 |
$html = wppa_checkbox($slug);
|
3976 |
wppa_setting_new($slug, '10', $name, $desc, $html, $help);
|
3977 |
|
3978 |
-
$name = __('Comment db agreement', 'wp-photo-album-plus');
|
3979 |
-
$desc = __('User needs to tick a checkbox to agree db storage', 'wp-photo-album-plus');
|
3980 |
-
$help = '';
|
3981 |
-
$slug = 'wppa_comment_need_db_agree';
|
3982 |
-
$html = wppa_checkbox($slug);
|
3983 |
-
wppa_setting_new($slug, '11', $name, $desc, $html, $help);
|
3984 |
-
|
3985 |
$name = __('Comment needs vote', 'wp-photo-album-plus');
|
3986 |
$desc = __('User needs to give a rating to get his comment published', 'wp-photo-album-plus');
|
3987 |
$help = '';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.00.003
|
7 |
*
|
8 |
*/
|
9 |
|
268 |
wppa_ok_message('Done! wppa_delete_all_from_cloudinary');
|
269 |
}
|
270 |
else {
|
271 |
+
wppa_ok_message( 'Not yet Done! wppa_delete_all_from_cloudinary' .
|
272 |
+
'<br />Please restart' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
break;
|
275 |
|
279 |
wppa_ok_message('Done! wppa_delete_derived_from_cloudinary');
|
280 |
}
|
281 |
else {
|
282 |
+
wppa_ok_message( 'Not yet Done! wppa_delete_derived_from_cloudinary' .
|
283 |
+
'<br />Please restart' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
}
|
285 |
break;
|
286 |
|
676 |
|
677 |
// The js
|
678 |
{
|
679 |
+
$the_js =
|
680 |
+
|
681 |
+
'function wppaSettingTab(tab) {
|
682 |
jQuery(".wppa-setting-tabs li").removeClass("active");
|
683 |
jQuery("#wppa-setting-tab-"+tab).addClass("active");
|
684 |
if ( tab == 99 ) {
|
770 |
if (jQuery(".' . $subtab . '").attr("data-inactive") == "1") jQuery(".' . $subtab . '").trigger("click");
|
771 |
},100)});' : ''
|
772 |
) .
|
773 |
+
( $tab == 'watermark' ? 'jQuery(document).ready(function(){wppaCheckFontPreview();});' : '' );
|
774 |
+
|
775 |
+
wp_add_inline_script( 'wppa-admin', $the_js );
|
776 |
}
|
777 |
|
778 |
// Open the content area
|
1332 |
wppa_setting_new($slug, '9', $name, $desc, $html, $help);
|
1333 |
|
1334 |
wppa_setting_box_footer_new();
|
1335 |
+
wp_add_inline_script( 'wppa-admin', 'wppaAjaxGetSpinnerHtml( "normal", "wppa-spin-pre-1" );wppaAjaxGetSpinnerHtml( "lightbox", "wppa-spin-pre-2" )' );
|
|
|
|
|
|
|
|
|
1336 |
}
|
1337 |
// Multimedia icon and stubfile specifications
|
1338 |
if ( wppa_switch( 'enable_audio' ) || wppa_switch( 'enable_video' ) || wppa_switch( 'enable_pdf' ) )
|
3729 |
$html = wppa_select( $slug, $opts, $vals, $onchange ) .
|
3730 |
' <img id="wppa-cursor" src="'.wppa_get_imgdir().wppa_opt( substr( $slug, 5 ) ).'" />';
|
3731 |
wppa_setting_new($slug, '14', $name, $desc, $html, $help);
|
3732 |
+
wp_add_inline_script( 'wppa-admin', $onchange );
|
3733 |
|
3734 |
$name = __('Border width', 'wp-photo-album-plus');
|
3735 |
$desc = __('Border width for lightbox display.', 'wp-photo-album-plus');
|
3956 |
$html = wppa_checkbox($slug);
|
3957 |
wppa_setting_new($slug, '10', $name, $desc, $html, $help);
|
3958 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3959 |
$name = __('Comment needs vote', 'wp-photo-album-plus');
|
3960 |
$desc = __('User needs to give a rating to get his comment published', 'wp-photo-album-plus');
|
3961 |
$help = '';
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 8.1.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_api_version;
|
27 |
-
$wppa_api_version = '8.1.00.
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 8.1.00.003
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
+
$wppa_api_version = '8.1.00.003'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|