Version Description
= 8.1.08 =
- 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.2.03.002 |
Comparing to | |
See all releases |
Code changes from version 8.2.03.001 to 8.2.03.002
- js/wppa-admin-scripts.js +11 -5
- js/wppa-admin-scripts.min.js +1 -1
- wppa-admin-styles.css +5 -1
- wppa-album-admin-autosave.php +129 -92
- wppa-album-covers.php +2 -2
- wppa-maintenance.php +2 -2
- wppa-photo-admin-autosave.php +1395 -1307
- wppa-scripts.php +11 -6
- 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.2.03.
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -883,6 +883,11 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
|
|
883 |
// Done?
|
884 |
if ( wppaAjaxAlbumCount == 0 ) {
|
885 |
jQuery( '#albumstatus-' + album ).html( ArrValues[2] );
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
// Not done yet
|
888 |
else {
|
@@ -1142,7 +1147,9 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
|
|
1142 |
|
1143 |
// Check for recoverable error
|
1144 |
if ( resparr[0].length > 10 ) {
|
1145 |
-
|
|
|
|
|
1146 |
error = true;
|
1147 |
}
|
1148 |
|
@@ -1388,10 +1395,9 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
|
|
1388 |
|
1389 |
function wppaEncode(xtext) {
|
1390 |
|
1391 |
-
|
1392 |
|
1393 |
-
|
1394 |
-
if (typeof(xtext)=='number') return xtext;
|
1395 |
|
1396 |
text = xtext;
|
1397 |
result = text.replace(/#/g, '||HASH||');
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 8.2.03.002
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
883 |
// Done?
|
884 |
if ( wppaAjaxAlbumCount == 0 ) {
|
885 |
jQuery( '#albumstatus-' + album ).html( ArrValues[2] );
|
886 |
+
if ( wppaGetCoverPreview ) {
|
887 |
+
wppaConsoleLog('doing cover', 'force');
|
888 |
+
wppaGetCoverPreview( album, 'cover-preview-'+album );
|
889 |
+
|
890 |
+
}
|
891 |
}
|
892 |
// Not done yet
|
893 |
else {
|
1147 |
|
1148 |
// Check for recoverable error
|
1149 |
if ( resparr[0].length > 10 ) {
|
1150 |
+
var errtxt = resparr[0];
|
1151 |
+
errtxt = errtxt.replace(/>/g,'>');
|
1152 |
+
alert('An error occurred:\n'+errtxt);
|
1153 |
error = true;
|
1154 |
}
|
1155 |
|
1395 |
|
1396 |
function wppaEncode(xtext) {
|
1397 |
|
1398 |
+
if ( typeof(xtext) != 'string' ) return xtext;
|
1399 |
|
1400 |
+
var text, result;
|
|
|
1401 |
|
1402 |
text = xtext;
|
1403 |
result = text.replace(/#/g, '||HASH||');
|
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,p){wppaConsoleLog("imm="+p,"force");var n="",o="",n=e||'<div style="padding-left:5px;" >';a?o=a:aftrer="</div>",wppaFeAjaxLog("in");var r=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p&&(a+="&wppa-immediate=1"),r.open("GET",a,!0),r.send(),r.onreadystatechange=function(){switch(r.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==r.status?("ER"==(e=wppaTrim(r.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=n+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=n+'<span style="color:red;" >Comm error '+r.status+": "+r.statusText+"</span>"+o}}}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),a=a.value||a,wppaAlbumUpdateMatrix[i][3]=a,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);"cover_linktype"==u&&("manual"==i?(jQuery("#link-url-tr").show(),jQuery("#-link-url-tr").hide()):(jQuery("#link-url-tr").hide(),jQuery("#-link-url-tr").show())),"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(document.getElementById(n+"_continue")&&"yes"==document.getElementById(n+"_continue").value?setTimeout("wppaMaintenanceProc('"+n+"', true)",20):(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)))):(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"}),setTimeout(function(){jQuery("#wppa-maintenance-list").niceScroll&&jQuery("#wppa-maintenance-list").niceScroll(".wppa-nicewrap",{})},1e3))}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"),jQuery("#img_"+i.replace("#","H")).attr("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"}),elm=document.getElementById("status-"+e),elm){if("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){wppaConsoleLog("Requesting togo for slug "+n,"force")},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 wppaBulkActionChange(e,t){wppa_setCookie("wppa_bulk_action",e.value,365),"wppa-bulk-move-to"==e.value||"wppa-bulk-copy-to"==e.value?jQuery("#wppa-bulk-album").css("display","inline"):jQuery("#wppa-bulk-album").css("display","none"),"wppa-bulk-status"==e.value?jQuery("#wppa-bulk-status").css("display","inline"):jQuery("#wppa-bulk-status").css("display","none"),"wppa-bulk-owner"==e.value?jQuery("#wppa-bulk-owner").css("display","inline"):jQuery("#wppa-bulk-owner").css("display","none")}function wppaBulkDoitOnClick(){var e=jQuery(".wppa-bulk-photo"),t=0;for(i=0;i<e.length;i++)e[i].checked&&t++;if(0==t)return alert("No photos selected"),!1;var a=document.getElementById("wppa-bulk-action").value;switch(a){case"":return alert("No action selected"),!1;case"wppa-bulk-delete":case"wppa-bulk-delete-immediate":case"wppa-bulk-undelete":break;case"wppa-bulk-move-to":case"wppa-bulk-copy-to":if(0==document.getElementById("wppa-bulk-album").value)return alert("No album selected"),!1;break;case"wppa-bulk-status":if(0==document.getElementById("wppa-bulk-status").value)return alert("No status selected"),!1;break;case"wppa-bulk-owner":if(0==documnet.getElementById("wppa-bulk-owner").value)return alert("No new owner selected"),!1;break;default:return alert("Unimplemented action requested: "+a),!1}return!0}function wppaSetThumbsize(e){e=e.value;wppa_setCookie("wppa_bulk_thumbsize",e,365),jQuery(".wppa-bulk-thumb").css("max-width",e+"px"),jQuery(".wppa-bulk-thumb").css("max-height",e/2+"px"),jQuery(".wppa-bulk-dec").css("height",e/2+"px")}function wppaToggleConfirmDelete(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmDelete","checked",365):wppa_setCookie("wppaConfirmDelete","unchecked",365)}function wppaToggleConfirmMove(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmMove","checked",365):wppa_setCookie("wppaConfirmMove","unchecked",365)}function wppaSetConfirmDelete(e){"checked"==wppa_getCookie("wppaConfirmDelete")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaSetConfirmMove(e){"checked"==wppa_getCookie("wppaConfirmMove")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}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)}function wppaCommentAdminUpdateHref(e){var t=encodeURIComponent(jQuery("#commenttext-"+e).val()),a=jQuery("#href-"+e).attr("href"),p=a.split("commenttext=");p[1]=t,a=p[0]+"commenttext="+p[1],jQuery("#href-"+e).attr("href",a),jQuery("#href-"+e).css("display","inline")}function wppaGetTinyMceContent(e){return"none"!=jQuery("#"+e).css("display")?jQuery("#"+e).val():tinymce.get(e).getContent()}function wppaInitMagick(t){var e,a,p;wppaCropper[t]||(e=document.querySelector("#fs-img-"+t),a=document.getElementById("button-"+t),p="ratio"==wppaImageMagickDefaultAspect?e.naturalWidth/e.naturalHeight:"NaN"==wppaImageMagickDefaultAspect?"":wppaImageMagickDefaultAspect,wppaCropper[t]=new Cropper(e,{zoomable:!1,viewMode:2,background:!1,dragMode:"move",responsive:!0,movable:!1,aspectRatio:p}),a.onclick=function(){var e=wppaCropper[t].getData(!0),e=e.width+"x"+e.height+(e.x<0?"-":"+")+e.x+(e.y<0?"-":"+")+e.y;wppaTryMagick(t,"crop",e)})}jQuery(document).ready(function(){var e;document.getElementById("wppa-bulk-action")&&(e=wppa_getCookie("wppa_bulk_action"),"wppa-bulk-move-to"!=(document.getElementById("wppa-bulk-action").value=e)&&"wppa-bulk-copy-to"!=e||(jQuery("#wppa-bulk-album").css("display","inline"),document.getElementById("wppa-bulk-album").value=wppa_getCookie("wppa_bulk_album")),"wppa-bulk-status"==e&&(jQuery("#wppa-bulk-status").css("display","inline"),document.getElementById("wppa-bulk-status").value=wppa_getCookie("wppa_bulk_status")),"wppa-bulk-owner"==e&&(jQuery("#wppa-bulk-owner").css("display","inline"),document.getElementById("wppa-bulk-owner").value=wppa_getCookie("wppa_bulk_owner")))}),jQuery(document).ready(function(){setTimeout("wppaTestAdminReady()",200)});
|
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,p){wppaConsoleLog("imm="+p,"force");var n="",o="",n=e||'<div style="padding-left:5px;" >';a?o=a:aftrer="</div>",wppaFeAjaxLog("in");var r=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p&&(a+="&wppa-immediate=1"),r.open("GET",a,!0),r.send(),r.onreadystatechange=function(){switch(r.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==r.status?("ER"==(e=wppaTrim(r.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=n+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=n+'<span style="color:red;" >Comm error '+r.status+": "+r.statusText+"</span>"+o}}}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),a=a.value||a,wppaAlbumUpdateMatrix[i][3]=a,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]),wppaGetCoverPreview&&(wppaConsoleLog("doing cover","force"),wppaGetCoverPreview(r,"cover-preview-"+r))):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);"cover_linktype"==u&&("manual"==i?(jQuery("#link-url-tr").show(),jQuery("#-link-url-tr").hide()):(jQuery("#link-url-tr").hide(),jQuery("#-link-url-tr").show())),"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,u){if(!u&&!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")));u||(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()+(u?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p,n=e.split("||"),o=n[1],r=!1;return o?(10<n[0].length&&(p=(p=n[0]).replace(/>/g,">"),alert("An error occurred:\n"+p),r=!0),jQuery("#"+o+"_status").html(n[2]),jQuery("#"+o+"_togo").html(n[3]),jQuery("#"+o+"_button").css("display",""),r||"0"==n[3]?"reload"==n[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+o+"', false)",20):void(document.getElementById(o+"_continue")&&"yes"==document.getElementById(o+"_continue").value?setTimeout("wppaMaintenanceProc('"+o+"', true)",20):(u||jQuery("#"+o+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(o)},1e3)))):(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"}),setTimeout(function(){jQuery("#wppa-maintenance-list").niceScroll&&jQuery("#wppa-maintenance-list").niceScroll(".wppa-nicewrap",{})},1e3))}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"),jQuery("#img_"+i.replace("#","H")).attr("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("string"!=typeof e)return e;var e=e,t=e.replace(/#/g,"||HASH||"),a=(e=t=(e=t).replace(/&/g,"||AMP||")).split("+"),p=0;for(t="";p<a.length;)t+=a[p],++p<a.length&&(t+="||PLUS||");return t}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"}),elm=document.getElementById("status-"+e),elm){if("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){wppaConsoleLog("Requesting togo for slug "+n,"force")},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 wppaBulkActionChange(e,t){wppa_setCookie("wppa_bulk_action",e.value,365),"wppa-bulk-move-to"==e.value||"wppa-bulk-copy-to"==e.value?jQuery("#wppa-bulk-album").css("display","inline"):jQuery("#wppa-bulk-album").css("display","none"),"wppa-bulk-status"==e.value?jQuery("#wppa-bulk-status").css("display","inline"):jQuery("#wppa-bulk-status").css("display","none"),"wppa-bulk-owner"==e.value?jQuery("#wppa-bulk-owner").css("display","inline"):jQuery("#wppa-bulk-owner").css("display","none")}function wppaBulkDoitOnClick(){var e=jQuery(".wppa-bulk-photo"),t=0;for(i=0;i<e.length;i++)e[i].checked&&t++;if(0==t)return alert("No photos selected"),!1;var a=document.getElementById("wppa-bulk-action").value;switch(a){case"":return alert("No action selected"),!1;case"wppa-bulk-delete":case"wppa-bulk-delete-immediate":case"wppa-bulk-undelete":break;case"wppa-bulk-move-to":case"wppa-bulk-copy-to":if(0==document.getElementById("wppa-bulk-album").value)return alert("No album selected"),!1;break;case"wppa-bulk-status":if(0==document.getElementById("wppa-bulk-status").value)return alert("No status selected"),!1;break;case"wppa-bulk-owner":if(0==documnet.getElementById("wppa-bulk-owner").value)return alert("No new owner selected"),!1;break;default:return alert("Unimplemented action requested: "+a),!1}return!0}function wppaSetThumbsize(e){e=e.value;wppa_setCookie("wppa_bulk_thumbsize",e,365),jQuery(".wppa-bulk-thumb").css("max-width",e+"px"),jQuery(".wppa-bulk-thumb").css("max-height",e/2+"px"),jQuery(".wppa-bulk-dec").css("height",e/2+"px")}function wppaToggleConfirmDelete(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmDelete","checked",365):wppa_setCookie("wppaConfirmDelete","unchecked",365)}function wppaToggleConfirmMove(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmMove","checked",365):wppa_setCookie("wppaConfirmMove","unchecked",365)}function wppaSetConfirmDelete(e){"checked"==wppa_getCookie("wppaConfirmDelete")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaSetConfirmMove(e){"checked"==wppa_getCookie("wppaConfirmMove")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}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)}function wppaCommentAdminUpdateHref(e){var t=encodeURIComponent(jQuery("#commenttext-"+e).val()),a=jQuery("#href-"+e).attr("href"),p=a.split("commenttext=");p[1]=t,a=p[0]+"commenttext="+p[1],jQuery("#href-"+e).attr("href",a),jQuery("#href-"+e).css("display","inline")}function wppaGetTinyMceContent(e){return"none"!=jQuery("#"+e).css("display")?jQuery("#"+e).val():tinymce.get(e).getContent()}function wppaInitMagick(t){var e,a,p;wppaCropper[t]||(e=document.querySelector("#fs-img-"+t),a=document.getElementById("button-"+t),p="ratio"==wppaImageMagickDefaultAspect?e.naturalWidth/e.naturalHeight:"NaN"==wppaImageMagickDefaultAspect?"":wppaImageMagickDefaultAspect,wppaCropper[t]=new Cropper(e,{zoomable:!1,viewMode:2,background:!1,dragMode:"move",responsive:!0,movable:!1,aspectRatio:p}),a.onclick=function(){var e=wppaCropper[t].getData(!0),e=e.width+"x"+e.height+(e.x<0?"-":"+")+e.x+(e.y<0?"-":"+")+e.y;wppaTryMagick(t,"crop",e)})}jQuery(document).ready(function(){var e;document.getElementById("wppa-bulk-action")&&(e=wppa_getCookie("wppa_bulk_action"),"wppa-bulk-move-to"!=(document.getElementById("wppa-bulk-action").value=e)&&"wppa-bulk-copy-to"!=e||(jQuery("#wppa-bulk-album").css("display","inline"),document.getElementById("wppa-bulk-album").value=wppa_getCookie("wppa_bulk_album")),"wppa-bulk-status"==e&&(jQuery("#wppa-bulk-status").css("display","inline"),document.getElementById("wppa-bulk-status").value=wppa_getCookie("wppa_bulk_status")),"wppa-bulk-owner"==e&&(jQuery("#wppa-bulk-owner").css("display","inline"),document.getElementById("wppa-bulk-owner").value=wppa_getCookie("wppa_bulk_owner")))}),jQuery(document).ready(function(){setTimeout("wppaTestAdminReady()",200)});
|
wppa-admin-styles.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
-
* version 8.2.
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
@@ -659,3 +659,7 @@ details.hidden {
|
|
659 |
#wppa-action-container-right select:first-of-type {
|
660 |
margin-left: 0;
|
661 |
}
|
|
|
|
|
|
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
+
* version 8.2.03.002
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
659 |
#wppa-action-container-right select:first-of-type {
|
660 |
margin-left: 0;
|
661 |
}
|
662 |
+
|
663 |
+
.wppa-tabcontent {
|
664 |
+
min-height: 530px;
|
665 |
+
}
|
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.2.03.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -495,7 +495,38 @@ global $wppa_revno;
|
|
495 |
else {
|
496 |
alert("' . __( 'Please select a valid panorama mode', 'wp-photo-album-plus' ) . '");
|
497 |
}
|
498 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
|
500 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
501 |
}
|
@@ -1103,33 +1134,6 @@ global $wppa_revno;
|
|
1103 |
</div>' );
|
1104 |
}
|
1105 |
|
1106 |
-
// Schedule for delete
|
1107 |
-
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1108 |
-
$may_change = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
1109 |
-
|
1110 |
-
wppa_echo( '
|
1111 |
-
<div
|
1112 |
-
style="max-width: 500px;margin-right: 4px;">
|
1113 |
-
<label
|
1114 |
-
for="scheduledel">' .
|
1115 |
-
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1116 |
-
</label><br>
|
1117 |
-
<input
|
1118 |
-
type="checkbox"
|
1119 |
-
id="scheduledel"' .
|
1120 |
-
( $scheduledel ? ' checked="checked"' : '' ) .
|
1121 |
-
( $may_change ? '' : ' disabled' ) . '
|
1122 |
-
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
1123 |
-
/>
|
1124 |
-
<input type="hidden" value="" id="wppa-dummy-del" />
|
1125 |
-
<span
|
1126 |
-
class="wppa-datetimedel-' . $id . '"' .
|
1127 |
-
( $albuminfo['scheduledel'] ? '' : ' style="display:none"' ) . '
|
1128 |
-
>' .
|
1129 |
-
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1130 |
-
</span>
|
1131 |
-
</div>' );
|
1132 |
-
}
|
1133 |
wppa_echo( '</div>' );
|
1134 |
}
|
1135 |
// End Section 1: Short settable items, wppa-flex div
|
@@ -1307,39 +1311,6 @@ global $wppa_revno;
|
|
1307 |
wppa_echo( $result );
|
1308 |
}
|
1309 |
|
1310 |
-
|
1311 |
-
// Schedule
|
1312 |
-
{
|
1313 |
-
$result = '
|
1314 |
-
<tr>
|
1315 |
-
<td>' .
|
1316 |
-
__( 'Schedule:', 'wp-photo-album-plus' ) . ' ' .
|
1317 |
-
'<input
|
1318 |
-
type="checkbox"
|
1319 |
-
id="schedule-box"' .
|
1320 |
-
( $albuminfo['scheduledtm'] ? ' checked="checked"' : '' ) . '
|
1321 |
-
onchange="wppaChangeScheduleAlbum(' . $id . ', this );"
|
1322 |
-
/>
|
1323 |
-
</td>
|
1324 |
-
<td>
|
1325 |
-
<input type="hidden" value="" id="wppa-dummy" />
|
1326 |
-
<span
|
1327 |
-
class="wppa-datetime-' . $id . '"' .
|
1328 |
-
( $albuminfo['scheduledtm'] ? '' : ' style="display:none"' ) .
|
1329 |
-
' >' .
|
1330 |
-
wppa_get_date_time_select_html( 'album', $id, true ) .
|
1331 |
-
'</span>
|
1332 |
-
<br>
|
1333 |
-
<span class="description" >' .
|
1334 |
-
__( 'If enabled, new photos will have their status set scheduled for publication on the date/time specified here.', 'wp-photo-album-plus' ) .
|
1335 |
-
'</span>
|
1336 |
-
</td>
|
1337 |
-
<td>
|
1338 |
-
</td>
|
1339 |
-
</tr>';
|
1340 |
-
wppa_echo( $result );
|
1341 |
-
}
|
1342 |
-
|
1343 |
// End Section 2
|
1344 |
wppa_echo( '
|
1345 |
</tbody>
|
@@ -1501,39 +1472,94 @@ global $wppa_revno;
|
|
1501 |
</div>' );
|
1502 |
}
|
1503 |
|
1504 |
-
//
|
1505 |
-
{
|
|
|
1506 |
wppa_echo( '
|
1507 |
<div>
|
1508 |
<label> </label><br>
|
1509 |
<input
|
1510 |
type="button"
|
1511 |
class="wppa-admin-button button"
|
1512 |
-
|
1513 |
-
|
1514 |
-
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1515 |
/>
|
1516 |
</div>' );
|
1517 |
}
|
1518 |
|
1519 |
-
//
|
1520 |
-
if ( wppa_switch( '
|
1521 |
-
|
1522 |
wppa_echo( '
|
1523 |
<div>
|
1524 |
<label> </label><br>
|
1525 |
<input
|
1526 |
type="button"
|
1527 |
class="wppa-admin-button button"
|
1528 |
-
onclick="' . $
|
1529 |
-
value="' . esc_attr( __( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
/>
|
1531 |
</div>' );
|
1532 |
}
|
1533 |
|
1534 |
-
//
|
1535 |
-
if ( wppa_switch( '
|
1536 |
-
$onc = 'if (
|
1537 |
wppa_echo( '
|
1538 |
<div>
|
1539 |
<label> </label><br>
|
@@ -1541,7 +1567,7 @@ global $wppa_revno;
|
|
1541 |
type="button"
|
1542 |
class="wppa-admin-button button"
|
1543 |
onclick="' . $onc . '"
|
1544 |
-
value="' . esc_attr( __( '
|
1545 |
/>
|
1546 |
</div>' );
|
1547 |
}
|
@@ -1561,28 +1587,35 @@ global $wppa_revno;
|
|
1561 |
</div>' );
|
1562 |
}
|
1563 |
|
1564 |
-
//
|
1565 |
-
if (
|
|
|
1566 |
|
1567 |
wppa_echo( '
|
1568 |
-
<div
|
1569 |
-
|
|
|
|
|
|
|
|
|
1570 |
<input
|
1571 |
-
type="
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
|
|
1575 |
/>
|
1576 |
-
<
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
</
|
1583 |
</div>' );
|
1584 |
}
|
1585 |
|
|
|
1586 |
// End wppa-flex div
|
1587 |
wppa_echo( '</div>' );
|
1588 |
|
@@ -1621,7 +1654,7 @@ global $wppa_revno;
|
|
1621 |
<select
|
1622 |
id="covertype"
|
1623 |
style="max-width:200px;"
|
1624 |
-
onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this )"
|
1625 |
title="' . esc_attr( $title ) . '"
|
1626 |
>
|
1627 |
<option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
|
@@ -1778,6 +1811,10 @@ global $wppa_revno;
|
|
1778 |
// End wppa-flex div
|
1779 |
wppa_echo( '</div>' );
|
1780 |
|
|
|
|
|
|
|
|
|
1781 |
// End Tab 4
|
1782 |
wppa_echo( '
|
1783 |
</div>' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.2.03.002
|
7 |
*
|
8 |
*/
|
9 |
|
495 |
else {
|
496 |
alert("' . __( 'Please select a valid panorama mode', 'wp-photo-album-plus' ) . '");
|
497 |
}
|
498 |
+
}
|
499 |
+
|
500 |
+
function wppaGetCoverPreview( albumId, divId ) {
|
501 |
+
|
502 |
+
jQuery.ajax( {
|
503 |
+
|
504 |
+
url: wppaAjaxUrl,
|
505 |
+
data: "action=wppa" +
|
506 |
+
"&wppa-action=getshortcodedrendered" +
|
507 |
+
"&shortcode=[wppa type=\"cover\" album=\""+albumId+"\"]",
|
508 |
+
async: true,
|
509 |
+
type: "GET",
|
510 |
+
timeout: 10000,
|
511 |
+
beforeSend: function( xhr ) {
|
512 |
+
},
|
513 |
+
success: function( result, status, xhr ) {
|
514 |
+
result = result.replace(/\[script/g, "<script");
|
515 |
+
result = result.replace(/\[\/script/g, "</script");
|
516 |
+
result = result.replace(/>/g, ">");
|
517 |
+
jQuery( "#" + divId ).html( result );
|
518 |
+
},
|
519 |
+
error: function( xhr, status, error ) {
|
520 |
+
wppaConsoleLog( "wppaGetCoverPreview failed. Error = " + error + ", status = " + status, "force" );
|
521 |
+
},
|
522 |
+
complete: function( xhr, status, newurl ) {
|
523 |
+
|
524 |
+
}
|
525 |
+
} );
|
526 |
+
}
|
527 |
+
|
528 |
+
jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"+'.$id.' )});
|
529 |
+
';
|
530 |
|
531 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
532 |
}
|
1134 |
</div>' );
|
1135 |
}
|
1136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
wppa_echo( '</div>' );
|
1138 |
}
|
1139 |
// End Section 1: Short settable items, wppa-flex div
|
1311 |
wppa_echo( $result );
|
1312 |
}
|
1313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1314 |
// End Section 2
|
1315 |
wppa_echo( '
|
1316 |
</tbody>
|
1472 |
</div>' );
|
1473 |
}
|
1474 |
|
1475 |
+
// Apply New photo desc
|
1476 |
+
if ( wppa_switch( 'apply_newphoto_desc') ) {
|
1477 |
+
$onc = 'if ( confirm(\'Are you sure you want to set the description of all photos to \n\n'.esc_js(wppa_opt( 'newphoto_description')).'\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&applynewdesc=1\'';
|
1478 |
wppa_echo( '
|
1479 |
<div>
|
1480 |
<label> </label><br>
|
1481 |
<input
|
1482 |
type="button"
|
1483 |
class="wppa-admin-button button"
|
1484 |
+
onclick="' . $onc . '"
|
1485 |
+
value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
|
|
|
1486 |
/>
|
1487 |
</div>' );
|
1488 |
}
|
1489 |
|
1490 |
+
// Set all to pano
|
1491 |
+
if ( wppa_switch( 'enable_panorama' ) ) {
|
1492 |
+
|
1493 |
wppa_echo( '
|
1494 |
<div>
|
1495 |
<label> </label><br>
|
1496 |
<input
|
1497 |
type="button"
|
1498 |
class="wppa-admin-button button"
|
1499 |
+
onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
|
1500 |
+
value="' . esc_attr( __( 'Set all to panorama', 'wp-photo-album-plus' ) ).':"
|
1501 |
+
/>
|
1502 |
+
<select id="pano-opt"
|
1503 |
+
style="">
|
1504 |
+
<option value="9" disabled selected>' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
|
1505 |
+
<option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1506 |
+
<option value="1">' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1507 |
+
<option value="2">' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1508 |
+
</select>
|
1509 |
+
</div>' );
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
// End wppa-flex div
|
1513 |
+
wppa_echo( '</div>' );
|
1514 |
+
|
1515 |
+
// Second line
|
1516 |
+
wppa_echo( '<div class="wppa-flex">' );
|
1517 |
+
|
1518 |
+
// Schedule
|
1519 |
+
{
|
1520 |
+
wppa_echo( '
|
1521 |
+
<div>
|
1522 |
+
<label>' .
|
1523 |
+
__( 'Schedule:', 'wp-photo-album-plus' ) . '
|
1524 |
+
</label><br>
|
1525 |
+
<input
|
1526 |
+
type="checkbox"
|
1527 |
+
id="schedule-box"' .
|
1528 |
+
( $albuminfo['scheduledtm'] ? ' checked="checked"' : '' ) . '
|
1529 |
+
onchange="wppaChangeScheduleAlbum(' . $id . ', this );"
|
1530 |
+
/>
|
1531 |
+
<input type="hidden" value="" id="wppa-dummy" />
|
1532 |
+
<span
|
1533 |
+
class="wppa-datetime-' . $id . '"' .
|
1534 |
+
( $albuminfo['scheduledtm'] ? '' : ' style="display:none"' ) . '
|
1535 |
+
>' .
|
1536 |
+
wppa_get_date_time_select_html( 'album', $id, true ) . '
|
1537 |
+
</span>
|
1538 |
+
<br>
|
1539 |
+
<span class="description" >' .
|
1540 |
+
__( 'New photos will be published on the date/time specified here.', 'wp-photo-album-plus' ) . '
|
1541 |
+
</span>
|
1542 |
+
</div>' );
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
// Schedule all
|
1546 |
+
{
|
1547 |
+
wppa_echo( '
|
1548 |
+
<div>
|
1549 |
+
<label> </label><br>
|
1550 |
+
<input
|
1551 |
+
type="button"
|
1552 |
+
class="wppa-admin-button button"
|
1553 |
+
title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
|
1554 |
+
onclick="wppaTryScheduleAll( ' . $id . ' )"
|
1555 |
+
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1556 |
/>
|
1557 |
</div>' );
|
1558 |
}
|
1559 |
|
1560 |
+
// Reset Ratings
|
1561 |
+
if ( wppa_switch( 'rating_on') ) {
|
1562 |
+
$onc = 'if (confirm(\'' . esc_js( __( 'Are you sure you want to clear the ratings in this album?', 'wp-photo-album-plus' ) ) . '\')) { wppaRefreshAfter(); wppaAjaxUpdateAlbum( ' . $id . ', \'clear_ratings\', 0 ); }';
|
1563 |
wppa_echo( '
|
1564 |
<div>
|
1565 |
<label> </label><br>
|
1567 |
type="button"
|
1568 |
class="wppa-admin-button button"
|
1569 |
onclick="' . $onc . '"
|
1570 |
+
value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
|
1571 |
/>
|
1572 |
</div>' );
|
1573 |
}
|
1587 |
</div>' );
|
1588 |
}
|
1589 |
|
1590 |
+
// Schedule for delete
|
1591 |
+
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1592 |
+
$may_change = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
1593 |
|
1594 |
wppa_echo( '
|
1595 |
+
<div
|
1596 |
+
style="max-width: 500px;margin-right: 4px;">
|
1597 |
+
<label
|
1598 |
+
for="scheduledel">' .
|
1599 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1600 |
+
</label><br>
|
1601 |
<input
|
1602 |
+
type="checkbox"
|
1603 |
+
id="scheduledel"' .
|
1604 |
+
( $scheduledel ? ' checked="checked"' : '' ) .
|
1605 |
+
( $may_change ? '' : ' disabled' ) . '
|
1606 |
+
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
1607 |
/>
|
1608 |
+
<input type="hidden" value="" id="wppa-dummy-del" />
|
1609 |
+
<span
|
1610 |
+
class="wppa-datetimedel-' . $id . '"' .
|
1611 |
+
( $albuminfo['scheduledel'] ? '' : ' style="display:none"' ) . '
|
1612 |
+
>' .
|
1613 |
+
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1614 |
+
</span>
|
1615 |
</div>' );
|
1616 |
}
|
1617 |
|
1618 |
+
|
1619 |
// End wppa-flex div
|
1620 |
wppa_echo( '</div>' );
|
1621 |
|
1654 |
<select
|
1655 |
id="covertype"
|
1656 |
style="max-width:200px;"
|
1657 |
+
onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this.value )"
|
1658 |
title="' . esc_attr( $title ) . '"
|
1659 |
>
|
1660 |
<option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
|
1811 |
// End wppa-flex div
|
1812 |
wppa_echo( '</div>' );
|
1813 |
|
1814 |
+
// wppaGetCoverPreview( albumId, divId )
|
1815 |
+
// Preview album cover
|
1816 |
+
wppa_echo( '<div id="cover-preview-'.$id.'" style="margin-top:12px;clear:both;max-width:600px"></div>' );
|
1817 |
+
|
1818 |
// End Tab 4
|
1819 |
wppa_echo( '
|
1820 |
</div>' );
|
wppa-album-covers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -15,7 +15,7 @@ function wppa_album_cover( $id ) {
|
|
15 |
|
16 |
// Find the album specific cover type
|
17 |
$cover_type = wppa_get_album_item( $id, 'cover_type' );
|
18 |
-
|
19 |
// No type specified (0), use default
|
20 |
if ( ! $cover_type ) {
|
21 |
$cover_type = wppa_opt( 'cover_type' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
+
* Version 8.2.03.002
|
7 |
*
|
8 |
*/
|
9 |
|
15 |
|
16 |
// Find the album specific cover type
|
17 |
$cover_type = wppa_get_album_item( $id, 'cover_type' );
|
18 |
+
wppa_log('obs', 'album covertype='.$cover_type);
|
19 |
// No type specified (0), use default
|
20 |
if ( ! $cover_type ) {
|
21 |
$cover_type = wppa_opt( 'cover_type' );
|
wppa-maintenance.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -227,7 +227,7 @@ global $wppa_endtime;
|
|
227 |
break;
|
228 |
case 'wppa_owner_to_name_proc':
|
229 |
if ( ! wppa_switch( 'owner_to_name' ) ) {
|
230 |
-
wppa_echo( __( 'Feature must be enabled in
|
231 |
wppa_exit();
|
232 |
}
|
233 |
break;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
+
* Version 8.2.03.002
|
7 |
*
|
8 |
*/
|
9 |
|
227 |
break;
|
228 |
case 'wppa_owner_to_name_proc':
|
229 |
if ( ! wppa_switch( 'owner_to_name' ) ) {
|
230 |
+
wppa_echo( __( 'Feature must be enabled in', 'wp-photo-album-plus' ) . ' ' . wppa_setting_path( 'a', 'system', 1, 32 ).'||'.$slug.'||||||' );
|
231 |
wppa_exit();
|
232 |
}
|
233 |
break;
|
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.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -69,6 +69,7 @@ global $wpdb;
|
|
69 |
$page = wppa_get( 'wppa-page', '1' );
|
70 |
if ( ! is_numeric( $page ) ) $page = 1;
|
71 |
$skip = ( $page - '1' ) * $pagesize;
|
|
|
72 |
|
73 |
// Edit the photos in a specific album
|
74 |
if ( $album ) {
|
@@ -102,6 +103,7 @@ global $wpdb;
|
|
102 |
|
103 |
// A physical album
|
104 |
else {
|
|
|
105 |
$counts = wppa_get_treecounts_a( $album, true );
|
106 |
$count = $counts['selfphotos'] + $counts['pendselfphotos'] + $counts['scheduledselfphotos'];
|
107 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
@@ -257,6 +259,7 @@ global $wpdb;
|
|
257 |
else {
|
258 |
|
259 |
// Local js functions
|
|
|
260 |
$the_js = "
|
261 |
function wppaTryMove( id, video ) {
|
262 |
|
@@ -441,32 +444,10 @@ function wppaTryScheduledel( id ) {
|
|
441 |
wppaAjaxUpdatePhoto( id, 'removescheduledel', 0 );
|
442 |
}
|
443 |
}
|
444 |
-
|
445 |
-
function wppaToggleIptc( id, count ) {
|
446 |
-
|
447 |
-
if ( jQuery( '#wppa-iptc-' + id ).css( 'display' ) == 'none' ) {
|
448 |
-
jQuery( '#wppa-iptc-' + id ).show();
|
449 |
-
jQuery( '#wppa-iptc-button-' + id ).val( '" . esc_js( __( 'Hide', 'wp-photo-album-plus' ) ) . " ' + count + ' " . esc_js( __( 'IPTC items', 'wp-photo-album-plus' ) ) . "' );
|
450 |
-
}
|
451 |
-
else {
|
452 |
-
jQuery( '#wppa-iptc-' + id ).hide();
|
453 |
-
jQuery( '#wppa-iptc-button-' + id ).val( '" . esc_js( __( 'Show', 'wp-photo-album-plus' ) ) . " ' + count + ' " . esc_js( __( 'IPTC items', 'wp-photo-album-plus' ) ) . "' );
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
function wppaToggleExif( id, count ) {
|
458 |
-
|
459 |
-
if ( jQuery( '#wppa-exif-' + id ).css( 'display' ) == 'none' ) {
|
460 |
-
jQuery( '#wppa-exif-' + id ).show();
|
461 |
-
jQuery( '#wppa-exif-button-' + id ).val( '" . esc_js( __( 'Hide', 'wp-photo-album-plus' ) ) . " ' + count + ' " . esc_js( __( 'EXIF items', 'wp-photo-album-plus' ) ) . "' );
|
462 |
-
}
|
463 |
-
else {
|
464 |
-
jQuery( '#wppa-exif-' + id ).hide();
|
465 |
-
jQuery( '#wppa-exif-button-' + id ).val( '" . esc_js( __( 'Show', 'wp-photo-album-plus' ) ) . " ' + count + ' " . esc_js( __( 'EXIF items', 'wp-photo-album-plus' ) ) . "' );
|
466 |
-
}
|
467 |
-
}";
|
468 |
|
469 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
|
|
470 |
|
471 |
$mvt = esc_attr( __( 'Move video', 'wp-photo-album-plus' ) );
|
472 |
$mpt = esc_attr( __( 'Move photo', 'wp-photo-album-plus' ) );
|
@@ -585,6 +566,20 @@ function wppaToggleExif( id, count ) {
|
|
585 |
// May user change photo sequence no?
|
586 |
$may_change_porder = wppa_user_is( 'administrator' ) || ! wppa_switch( 'porder_restricted' );
|
587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
|
589 |
// Anchor for scroll to
|
590 |
wppa_echo( '<a id="photo_' . $id . '"></a>' );
|
@@ -605,9 +600,7 @@ function wppaToggleExif( id, count ) {
|
|
605 |
value="' . wp_create_nonce( 'wppa-nonce_' . $id ) . '"
|
606 |
/>' );
|
607 |
|
608 |
-
// Section 1
|
609 |
-
|
610 |
-
// -- Preview thumbnail and photo name ---
|
611 |
{
|
612 |
wppa_echo( '
|
613 |
<div>' );
|
@@ -615,7 +608,8 @@ function wppaToggleExif( id, count ) {
|
|
615 |
reset( $is_video );
|
616 |
$big = str_replace( 'xxx', current( $is_video ), $big );
|
617 |
wppa_echo( '
|
618 |
-
<
|
|
|
619 |
href="' . esc_attr( $big ) . '"
|
620 |
target="_blank"
|
621 |
title="' . esc_attr( __( 'Preview fullsize video' , 'wp-photo-album-plus' ) ) . '"
|
@@ -627,7 +621,8 @@ function wppaToggleExif( id, count ) {
|
|
627 |
'controls' => false,
|
628 |
'use_thumb' => true
|
629 |
) ) . '
|
630 |
-
|
|
|
631 |
}
|
632 |
else {
|
633 |
if ( $has_audio ) {
|
@@ -635,19 +630,21 @@ function wppaToggleExif( id, count ) {
|
|
635 |
$big = wppa_get_photo_url( $id );
|
636 |
}
|
637 |
wppa_echo( '
|
638 |
-
<
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
|
|
|
|
651 |
|
652 |
if ( $has_audio ) {
|
653 |
$audio = wppa_get_audio_html( array( 'id' => $id,
|
@@ -663,866 +660,693 @@ function wppaToggleExif( id, count ) {
|
|
663 |
'</span>' ) );
|
664 |
}
|
665 |
}
|
666 |
-
wppa_echo( '<h1 style="display:inline;
|
667 |
-
wppa_echo( '
|
668 |
-
</div>' );
|
669 |
-
}
|
670 |
-
|
671 |
-
// --- More or less static data ---
|
672 |
-
{
|
673 |
-
wppa_echo( '
|
674 |
-
<div class="wppa-flex">' .
|
675 |
-
|
676 |
-
// ID
|
677 |
-
'<div>
|
678 |
-
<label>' .
|
679 |
-
__( 'Id', 'wp-photo-album-plus' ) . '
|
680 |
-
</label><br>
|
681 |
-
<div class="wppa-ldi">' .
|
682 |
-
strval( intval( $id ) ) . '
|
683 |
-
</div>
|
684 |
-
</div>' .
|
685 |
-
|
686 |
-
// Crypt
|
687 |
-
'<div>
|
688 |
-
<label>' .
|
689 |
-
__( 'Crypt', 'wp-photo-album-plus' ) . '
|
690 |
-
</label><br>
|
691 |
-
<div class="wppa-ldi">' .
|
692 |
-
htmlspecialchars( $crypt ) . '
|
693 |
-
</div>
|
694 |
-
</div>' .
|
695 |
-
|
696 |
-
// Filename
|
697 |
-
'<div style="max-width: 500px;">
|
698 |
-
<label>' .
|
699 |
-
__( 'Filename', 'wp-photo-album-plus' ) . '
|
700 |
-
</label><br>
|
701 |
-
<div class="wppa-ldi">' .
|
702 |
-
htmlspecialchars( $filename ) . '
|
703 |
-
</div>
|
704 |
-
</div>' .
|
705 |
-
|
706 |
-
// Upload
|
707 |
-
'<div>
|
708 |
-
<label>' .
|
709 |
-
__( 'Upload', 'wp-photo-album-plus' ) . '
|
710 |
-
</label><br>
|
711 |
-
<div class="wppa-ldi">' .
|
712 |
-
htmlspecialchars( wppa_local_date( '', $timestamp ) ) . '
|
713 |
-
</div>
|
714 |
-
</div>' );
|
715 |
-
|
716 |
-
// Owner
|
717 |
-
if ( ! $owner_editable ) {
|
718 |
-
wppa_echo( '
|
719 |
-
<div>
|
720 |
-
<label>' .
|
721 |
-
__( 'Owner', 'wp-photo-album-plus' ) . '
|
722 |
-
</label><br>
|
723 |
-
<div class="wppa-ldi">' .
|
724 |
-
htmlspecialchars( $owner ) . '
|
725 |
-
</div>
|
726 |
-
</div>' );
|
727 |
-
}
|
728 |
-
|
729 |
-
// Album
|
730 |
-
{
|
731 |
-
$deleted = false;
|
732 |
-
if ( $album <= '-9' ) {
|
733 |
-
$album = - ( $album + '9' );
|
734 |
-
$deleted = true;
|
735 |
-
}
|
736 |
-
wppa_echo( '
|
737 |
-
<div style="max-width: 500px;margin-right: 4px;">
|
738 |
-
<label>' .
|
739 |
-
__( 'Album', 'wp-photo-album-plus' ) . '
|
740 |
-
</label><br>
|
741 |
-
<div class="wppa-ldi">' .
|
742 |
-
htmlspecialchars( wppa_get_album_name( $album ) ) . '(' . strval( intval( $album ) ) . ')
|
743 |
-
</div>
|
744 |
-
</div>' );
|
745 |
-
}
|
746 |
|
747 |
-
//
|
748 |
{
|
749 |
-
$
|
750 |
-
|
751 |
-
if ( $timestamp >= $modified ) $txt = __( 'Not modified', 'wp-photo-album-plus' );
|
752 |
-
wppa_echo( '
|
753 |
-
<div>
|
754 |
-
<label>' .
|
755 |
-
__( 'Modified', 'wp-photo-album-plus' ) . '
|
756 |
-
</label><br>
|
757 |
-
<div class="wppa-ldi">' .
|
758 |
-
$txt . '
|
759 |
-
</div>
|
760 |
-
</div>' );
|
761 |
-
}
|
762 |
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
__( 'EXIF Date', 'wp-photo-album-plus' ) . '
|
769 |
-
</label><br>
|
770 |
-
<div class="wppa-ldi">' .
|
771 |
-
esc_html( $exifdtm ) . '
|
772 |
-
</div>
|
773 |
-
</div>' );
|
774 |
-
}
|
775 |
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
<div>
|
782 |
-
<label>' .
|
783 |
-
__( 'Location:' , 'wp-photo-album-plus' ) . '
|
784 |
-
</label>
|
785 |
-
<div class="wppa-ldi">' .
|
786 |
-
esc_html( $geo['0'].' '.$geo['1'].'. ' ) . '
|
787 |
-
</div>
|
788 |
-
</div>' );
|
789 |
-
}
|
790 |
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
__( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
|
797 |
-
</label>
|
798 |
-
<div class="wppa-ldi">' .
|
799 |
-
$p_order . '
|
800 |
-
</div>
|
801 |
-
</div>' );
|
802 |
}
|
803 |
|
804 |
-
//
|
805 |
{
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
}
|
812 |
else {
|
813 |
-
$label = __( 'Rating
|
814 |
-
$value =
|
815 |
}
|
816 |
-
}
|
817 |
-
else {
|
818 |
-
$label = __( 'Rating', 'wp-photo-album-plus' );
|
819 |
-
$value = __( 'None', 'wp-photo-album-plus' );
|
820 |
-
}
|
821 |
-
wppa_echo( '
|
822 |
-
<div>
|
823 |
-
<label>' .
|
824 |
-
$label . '
|
825 |
-
</label>
|
826 |
-
<div class="wppa-ldi">' .
|
827 |
-
$value . '
|
828 |
-
</div>
|
829 |
-
</div>' );
|
830 |
-
}
|
831 |
-
|
832 |
-
// Dislikes
|
833 |
-
$dislikes = wppa_dislike_get( $id );
|
834 |
-
if ( $dislikes ) {
|
835 |
-
wppa_echo( '
|
836 |
-
<div>
|
837 |
-
<label>' .
|
838 |
-
__( 'Dislikes', 'wp-photo-album-plus' ) . '
|
839 |
-
</label>
|
840 |
-
<div class="wppa-ldi">' .
|
841 |
-
strval( intval( $dislikes ) ) . '
|
842 |
-
</div>
|
843 |
-
</div>' );
|
844 |
-
}
|
845 |
|
846 |
-
|
847 |
-
|
848 |
-
if ( $pending ) {
|
849 |
-
wppa_echo( '
|
850 |
-
<div>
|
851 |
-
<label>' .
|
852 |
-
__( 'Pending votes', 'wp-photo-album-plus' ) . '
|
853 |
-
</label>
|
854 |
-
<div class="wppa-ldi">' .
|
855 |
-
strval( intval( $pending ) ) . '
|
856 |
-
</div>
|
857 |
-
</div>' );
|
858 |
-
}
|
859 |
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
</label>
|
867 |
-
<div class="wppa-ldi">' .
|
868 |
-
strval( intval( $views ) ) . '
|
869 |
-
</div>
|
870 |
-
</div>' );
|
871 |
-
}
|
872 |
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
</label>
|
880 |
-
<div class="wppa-ldi">' .
|
881 |
-
strval( intval( $clicks ) ) . '
|
882 |
-
</div>
|
883 |
-
</div>' );
|
884 |
}
|
885 |
|
886 |
-
//
|
887 |
{
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
__( 'Downloads', 'wp-photo-album-plus' ) . '
|
892 |
-
</label>
|
893 |
-
<div class="wppa-ldi">' .
|
894 |
-
strval( intval( $dlcount ) ) . '
|
895 |
-
</div>
|
896 |
-
</div>' );
|
897 |
-
}
|
898 |
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
elseif ( $status == 'silver' ) $s = __( 'Silver', 'wp-photo-album-plus' );
|
906 |
-
elseif ( $status == 'bronze' ) $s = __( 'Bronze', 'wp-photo-album-plus' );
|
907 |
-
elseif ( $status == 'scheduled' ) $s = __( 'Scheduled', 'wp-photo-album-plus' );
|
908 |
-
elseif ( $status == 'private' ) $s = __( 'Private', 'wp-photo-album-plus' );
|
909 |
-
wppa_echo( '
|
910 |
-
<div>
|
911 |
-
<label>' .
|
912 |
-
__( 'Status', 'wp-photo-album-plus' ) . '
|
913 |
-
</label>
|
914 |
-
<div class="wppa-ldi">' .
|
915 |
-
$s . '
|
916 |
-
</div>
|
917 |
-
</div>' );
|
918 |
-
}
|
919 |
|
920 |
-
// Schedule for delete
|
921 |
-
if ( ! wppa_user_is( 'administrator' ) && $owner != wppa_get_user() ) {
|
922 |
-
if ( $scheduledel ) {
|
923 |
-
wppa_echo( '
|
924 |
-
<div>
|
925 |
-
<label>' .
|
926 |
-
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
927 |
-
</label>
|
928 |
-
<div class="wppa-ldi">' .
|
929 |
-
wppa_get_date_time_select_html( 'delphoto', $id, false ) . '
|
930 |
-
</div>
|
931 |
-
</div>' );
|
932 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
}
|
934 |
|
935 |
-
|
936 |
</div>' );
|
937 |
}
|
|
|
938 |
|
939 |
-
|
940 |
-
|
|
|
|
|
|
|
941 |
wppa_echo( '
|
942 |
-
|
|
|
|
|
|
|
943 |
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
}
|
958 |
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
}
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
$txt = '
|
997 |
-
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
998 |
-
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
999 |
-
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
1000 |
-
}
|
1001 |
-
else {
|
1002 |
-
$txt = '
|
1003 |
-
<span style="color:red">' .
|
1004 |
-
__( 'Unavailable', 'wp-photo-album-plus' ) . '
|
1005 |
-
</span>';
|
1006 |
-
}
|
1007 |
wppa_echo( '
|
1008 |
-
<div
|
1009 |
-
<label>' .
|
1010 |
-
$lbl . '
|
1011 |
-
</label><br>
|
1012 |
-
<div class="wppa-ldi">' .
|
1013 |
-
$txt . '
|
1014 |
-
</div>
|
1015 |
-
</div>' );
|
1016 |
|
1017 |
-
|
1018 |
-
|
1019 |
-
$lbl = __( 'Thumbnail file', 'wp-photo-album-plus' );
|
1020 |
-
$tp = wppa_get_thumb_path( $id );
|
1021 |
-
if ( is_file( $tp ) ) {
|
1022 |
-
$txt = '
|
1023 |
-
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
1024 |
-
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
1025 |
-
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
1026 |
-
|
1027 |
-
<input
|
1028 |
-
type="checkbox"' .
|
1029 |
-
( $thumblock ? ' checked' : '' ) . '
|
1030 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
1031 |
-
__( 'Locked', 'wp-photo-album-plus' );
|
1032 |
-
}
|
1033 |
-
else {
|
1034 |
-
$txt = '
|
1035 |
-
<span style="color:red">' .
|
1036 |
-
__( 'Unavailable', 'wp-photo-album-plus' ) . '.
|
1037 |
-
</span>';
|
1038 |
-
}
|
1039 |
-
wppa_echo( '
|
1040 |
-
<div style="max-width:300px">
|
1041 |
<label>' .
|
1042 |
-
|
1043 |
</label><br>
|
1044 |
<div class="wppa-ldi">' .
|
1045 |
-
$
|
1046 |
</div>
|
1047 |
-
</div>'
|
1048 |
-
}
|
1049 |
|
1050 |
-
|
1051 |
-
|
1052 |
-
$lbl = __( 'Local CDN files', 'wp-photo-album-plus' );
|
1053 |
-
$txt = '<span id="cdnfiles-' . $id . '">';
|
1054 |
-
|
1055 |
-
$files = wppa_cdn_files( $id );
|
1056 |
-
if ( !empty( $files ) ) {
|
1057 |
-
foreach( $files as $file ) {
|
1058 |
-
if ( basename( $file ) != 'index.php' ) {
|
1059 |
-
$t = explode( '.', basename( $file ) );
|
1060 |
-
$t = explode( '-', $t[0] );
|
1061 |
-
$x = $t[0];
|
1062 |
-
$y = $t[1];
|
1063 |
-
$size = filesize( $file );
|
1064 |
-
$txt .= '
|
1065 |
-
<a
|
1066 |
-
href="' . wppa_cdn_url( $id, $x, $y ) . '"
|
1067 |
-
target="_blank"
|
1068 |
-
>' .
|
1069 |
-
basename( $file ) .
|
1070 |
-
'</a> ' .
|
1071 |
-
sprintf( '%4.2fkB', $size / 1024 ) . '<br>';
|
1072 |
-
}
|
1073 |
-
}
|
1074 |
-
}
|
1075 |
-
else {
|
1076 |
-
$txt .= __( 'None', 'wp-photo-album-plus' );
|
1077 |
-
}
|
1078 |
-
$txt .= '</span>';
|
1079 |
-
wppa_echo( '
|
1080 |
-
<div>
|
1081 |
<label>' .
|
1082 |
-
|
1083 |
</label><br>
|
1084 |
<div class="wppa-ldi">' .
|
1085 |
-
$
|
1086 |
</div>
|
1087 |
-
</div>'
|
1088 |
-
}
|
1089 |
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
// Width
|
1094 |
-
wppa_echo( '
|
1095 |
-
<div>
|
1096 |
<label>' .
|
1097 |
-
__( '
|
1098 |
</label><br>
|
1099 |
-
<
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
value="' . esc_attr( $videox ) . '"
|
1104 |
-
/>px
|
1105 |
-
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
1106 |
-
</div>' );
|
1107 |
|
1108 |
-
|
1109 |
-
|
1110 |
-
<div>
|
1111 |
<label>' .
|
1112 |
-
__( '
|
1113 |
</label><br>
|
1114 |
-
<
|
1115 |
-
|
1116 |
-
|
1117 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
1118 |
-
value="' . esc_attr( $videoy ) . '"
|
1119 |
-
/>px
|
1120 |
-
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) . '
|
1121 |
</div>' );
|
1122 |
|
1123 |
-
//
|
1124 |
-
if ( $
|
1125 |
-
$lbl = __( 'Duration', 'wp-photo-album-plus' );
|
1126 |
-
$duration = intval( $duration * 100 ) / 100;
|
1127 |
-
if ( $duration < 120.0 ) {
|
1128 |
-
$txt = sprintf( __( '%s seconds', 'wp-photo-album-plus' ) ,$duration );
|
1129 |
-
}
|
1130 |
-
else {
|
1131 |
-
$txt = sprintf( __( '%s minutes and %s seconds', 'wp-photo-album-plus' ),
|
1132 |
-
sprintf( '%d', floor( $duration / 60 ) ),
|
1133 |
-
sprintf( '%4.2f', $duration % 60 ) );
|
1134 |
-
}
|
1135 |
wppa_echo( '
|
1136 |
<div>
|
1137 |
<label>' .
|
1138 |
-
|
1139 |
</label><br>
|
1140 |
<div class="wppa-ldi">' .
|
1141 |
-
$
|
1142 |
</div>
|
1143 |
</div>' );
|
1144 |
}
|
1145 |
|
1146 |
-
|
1147 |
-
$
|
1148 |
-
|
1149 |
-
$
|
1150 |
}
|
1151 |
-
wppa_echo( '
|
1152 |
-
<div>
|
1153 |
-
<label>' .
|
1154 |
-
__( 'Formats', 'wp-photo-album-plus' ) . '
|
1155 |
-
</label><br>
|
1156 |
-
<div class="wppa-ldi">' .
|
1157 |
-
$txt . '
|
1158 |
-
</div>
|
1159 |
-
</div>' );
|
1160 |
-
}
|
1161 |
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1167 |
}
|
1168 |
-
wppa_echo( '
|
1169 |
-
<div>
|
1170 |
-
<label>' .
|
1171 |
-
__( 'Formats', 'wp-photo-album-plus' ) . '
|
1172 |
-
</label><br>
|
1173 |
-
<div class="wppa-ldi">' .
|
1174 |
-
$txt . '
|
1175 |
-
</div>
|
1176 |
-
</div>' );
|
1177 |
-
}
|
1178 |
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
</h3>' );
|
1194 |
-
}
|
1195 |
-
|
1196 |
-
|
1197 |
-
wppa_echo( '<!-- Section 2 simple settings -->
|
1198 |
-
<div class="wppa-flex">' );
|
1199 |
-
|
1200 |
-
// Owner
|
1201 |
-
if ( $owner_editable ) {
|
1202 |
-
wppa_echo( '
|
1203 |
-
<div>
|
1204 |
-
<label
|
1205 |
-
for="owner-' . $id . '">' .
|
1206 |
-
__( 'Owned by:', 'wp-photo-album-plus' ) . '
|
1207 |
-
</label><br>
|
1208 |
-
<input
|
1209 |
-
id="owner-' . $id . '"
|
1210 |
-
type="text"
|
1211 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
1212 |
-
value="' . esc_attr( $owner ) . '"
|
1213 |
-
/>
|
1214 |
-
</div>' );
|
1215 |
-
}
|
1216 |
-
|
1217 |
-
// Exif date-time
|
1218 |
-
if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
|
1219 |
-
wppa_echo( '
|
1220 |
-
<div>
|
1221 |
-
<label
|
1222 |
-
for="exifdtm-' . $id . '">' .
|
1223 |
-
__( 'EXIF Date:', 'wp-photo-album-plus' ) . '
|
1224 |
-
</label><br>
|
1225 |
-
<input
|
1226 |
-
id="exifdtm-' . $id . '"
|
1227 |
-
type="text"
|
1228 |
-
style="width:125px"
|
1229 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
|
1230 |
-
value="' . esc_attr( $exifdtm ) . '"
|
1231 |
-
/>
|
1232 |
-
</div>' );
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
// Location
|
1236 |
-
if ( wppa_switch( 'geo_edit' ) ) {
|
1237 |
-
$loc = $location ? $location : '///';
|
1238 |
-
$geo = explode( '/', $loc );
|
1239 |
-
wppa_echo( '
|
1240 |
-
<div>
|
1241 |
-
<label
|
1242 |
-
for="lat-' . $id . '">' .
|
1243 |
-
__( 'Location Lat:' , 'wp-photo-album-plus' ) . esc_html( $geo['0'] ) . '
|
1244 |
-
</label><br>
|
1245 |
-
<input
|
1246 |
-
id="lat-' . $id . '"
|
1247 |
-
type="text"
|
1248 |
-
style="width:100px"
|
1249 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lat\', this.value)"
|
1250 |
-
value="' . esc_attr( $geo['2'] ) . '"
|
1251 |
-
/>
|
1252 |
-
</div>
|
1253 |
-
<div>
|
1254 |
-
<label
|
1255 |
-
for="lon-' . $id . '">' .
|
1256 |
-
__( 'Location Lon:' , 'wp-photo-album-plus' ) . esc_html( $geo['1'] ) . '
|
1257 |
-
</label><br>
|
1258 |
-
<input
|
1259 |
-
id="lon-' . $id . '"
|
1260 |
-
type="text"
|
1261 |
-
style="width:100px"
|
1262 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value)"
|
1263 |
-
value="' . esc_attr( $geo['3'] ) . '"
|
1264 |
-
/>
|
1265 |
-
</div>' );
|
1266 |
-
}
|
1267 |
-
|
1268 |
-
// Changeable p_order
|
1269 |
-
if ( $sortby_orderno && $may_change_porder ) {
|
1270 |
-
wppa_echo( '
|
1271 |
-
<div>
|
1272 |
-
<label
|
1273 |
-
for="porder-' . $id . '">' .
|
1274 |
-
__( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
|
1275 |
-
</label><br>
|
1276 |
-
<input
|
1277 |
-
type="text"
|
1278 |
-
id="porder-' . $id . '"
|
1279 |
-
value="' . esc_attr( $p_order ) . '"
|
1280 |
-
style="width:100px"
|
1281 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
1282 |
-
/>
|
1283 |
-
</div>' );
|
1284 |
-
}
|
1285 |
-
|
1286 |
-
// Status
|
1287 |
-
if ( $may_edit_status ) {
|
1288 |
-
$sel = ' selected';
|
1289 |
-
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
1290 |
-
$dis = ' disabled';
|
1291 |
-
}
|
1292 |
-
else {
|
1293 |
-
$dis = '';
|
1294 |
}
|
1295 |
-
wppa_echo( '
|
1296 |
-
<div>
|
1297 |
-
<label
|
1298 |
-
for="status-' . $id . '">' .
|
1299 |
-
__( 'Status' , 'wp-photo-album-plus' ) . '
|
1300 |
-
</label><br>
|
1301 |
-
<select
|
1302 |
-
id="status-' . $id . '"
|
1303 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'status\', this.value); wppaPhotoStatusChange( ' . $id . ' )">
|
1304 |
-
<option value="pending"' . ( $status == 'pending' ? $sel : '' ) . ' >' .
|
1305 |
-
__( 'Pending', 'wp-photo-album-plus' ) . '
|
1306 |
-
</option>
|
1307 |
-
<option value="publish"' . ( $status =='publish' ? $sel : '' ) . ' >' .
|
1308 |
-
__( 'Publish', 'wp-photo-album-plus' ) . '
|
1309 |
-
</option>
|
1310 |
-
<option value="featured"' . ( $status == 'featured' ? $sel : '' ) . $dis . ' >' .
|
1311 |
-
__( 'Featured', 'wp-photo-album-plus' ) . '
|
1312 |
-
</option>
|
1313 |
-
<option value="gold"' . ( $status == 'gold' ? $sel : '' ) . $dis . ' >' .
|
1314 |
-
__( 'Gold', 'wp-photo-album-plus' ) . '
|
1315 |
-
</option>
|
1316 |
-
<option value="silver"' . ( $status == 'silver' ? $sel : '' ) . $dis . ' >' .
|
1317 |
-
__( 'Silver', 'wp-photo-album-plus' ) . '
|
1318 |
-
</option>
|
1319 |
-
<option value="bronze"' . ( $status == 'bronze' ? $sel : '' ) . $dis . ' >' .
|
1320 |
-
__( 'Bronze', 'wp-photo-album-plus' ) . '
|
1321 |
-
</option>
|
1322 |
-
<option value="scheduled"' . ( $status == 'scheduled' ? $sel : '' ) . $dis . ' >' .
|
1323 |
-
__( 'Scheduled', 'wp-photo-album-plus' ) . '
|
1324 |
-
</option>
|
1325 |
-
<option value="private"' . ( $status == 'private' ? $sel : '' ) . $dis . ' >' .
|
1326 |
-
__( 'Private', 'wp-photo-album-plus' ) . '
|
1327 |
-
</option>
|
1328 |
-
</select>' .
|
1329 |
-
wppa_get_date_time_select_html( 'photo', $id, true ) . '
|
1330 |
-
<span id="psdesc-' . $id . '" class="description" style="display:none">' .
|
1331 |
-
__( 'Note: Featured photos should have a descriptive name; a name a search engine will look for!', 'wp-photo-album-plus' ) . '
|
1332 |
-
</span>
|
1333 |
-
</div>' );
|
1334 |
-
}
|
1335 |
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
<option value="0"' . ( $stereo == '0' ? ' selected' : '' ) . '>' .
|
1349 |
-
__( 'No stereo image', 'wp-photo-album-plus' ) . '
|
1350 |
-
</option>
|
1351 |
-
<option value="1"' . ( $stereo == '1' ? ' selected' : '' ) . '>' .
|
1352 |
-
__( 'Left - right stereo image', 'wp-photo-album-plus' ) . '
|
1353 |
-
</option>
|
1354 |
-
<option value="-1"' . ( $stereo == '-1' ? ' selected' : '' ) . '>' .
|
1355 |
-
__( 'Right - left stereo image', 'wp-photo-album-plus' ) . '
|
1356 |
-
</option>
|
1357 |
-
</select>
|
1358 |
-
</div>' );
|
1359 |
|
1360 |
-
|
1361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1362 |
|
1363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1364 |
|
1365 |
-
|
1366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1367 |
}
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
wppa_echo( '
|
1373 |
-
<
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
wppa_echo( ', ' );
|
1382 |
-
}
|
1383 |
}
|
1384 |
}
|
1385 |
-
|
1386 |
-
|
|
|
1387 |
}
|
1388 |
|
1389 |
-
//
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
|
|
|
|
1393 |
wppa_echo( '
|
1394 |
<div>
|
1395 |
<label
|
1396 |
-
for="
|
1397 |
-
__( '
|
1398 |
</label><br>
|
1399 |
-
<
|
1400 |
-
id="
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
</select>
|
1406 |
</div>' );
|
1407 |
-
|
1408 |
-
$source_file = wppa_get_source_path( $id );
|
1409 |
-
if ( wppa_is_file( $source_file ) ) {
|
1410 |
-
$source_file_sizes = wppa_getimagesize( $source_file );
|
1411 |
-
|
1412 |
-
if ( $panorama == '1' && $source_file_sizes[0] / $source_file_sizes[1] > 2.001 ) {
|
1413 |
-
$t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
|
1414 |
-
wppa_echo( '
|
1415 |
-
<div>
|
1416 |
-
<label
|
1417 |
-
for="make360-' . $id . '">' .
|
1418 |
-
__( 'Make 360 from', 'wp-photo-album-plus' ) . '
|
1419 |
-
</label><br>
|
1420 |
-
<select
|
1421 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'make360\', this.value, true)"
|
1422 |
-
id="make360-' . $id . '"
|
1423 |
-
title="' . esc_attr( __( 'Select the closest angle you originally made the panorama', 'wp-photo-album-plus' ) ) . '">
|
1424 |
-
<option value="">'.__('Select', 'wp-photo-album-plus' ).'</option>' );
|
1425 |
-
foreach( $t as $v ) {
|
1426 |
-
wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected':'').'>'.$v.'°</option>' );
|
1427 |
-
}
|
1428 |
-
wppa_echo( '
|
1429 |
-
<option value="0">' . __( 'Undo', 'wp-photo-album-plus' ) . '</option>
|
1430 |
-
</select>
|
1431 |
-
</div>' );
|
1432 |
-
}
|
1433 |
-
}
|
1434 |
}
|
1435 |
-
}
|
1436 |
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
// Get the current watermark file settings
|
1441 |
-
$temp = wppa_get_water_file_and_pos( $id );
|
1442 |
-
$wmfile = isset( $temp['file'] ) ? $temp['file'] : '';
|
1443 |
-
$wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
|
1444 |
-
|
1445 |
-
$user = wppa_get_user();
|
1446 |
-
$has_source = wppa_is_file( wppa_get_source_path( $id ) );
|
1447 |
-
$can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
|
1448 |
-
if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
|
1449 |
wppa_echo( '
|
1450 |
-
<div
|
1451 |
<label
|
1452 |
-
for="
|
1453 |
-
__( '
|
1454 |
</label><br>
|
1455 |
-
<
|
1456 |
-
id="
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1462 |
<div>
|
1463 |
<label
|
1464 |
-
for="
|
1465 |
-
__( '
|
1466 |
</label><br>
|
1467 |
-
<
|
1468 |
-
id="
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
|
|
1473 |
</div>
|
1474 |
<div>
|
1475 |
-
<label
|
1476 |
-
|
|
|
1477 |
</label><br>
|
1478 |
<input
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
|
|
1483 |
/>
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1489 |
/>
|
1490 |
</div>' );
|
1491 |
}
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1498 |
}
|
1499 |
-
*/
|
1500 |
-
}
|
1501 |
|
1502 |
-
|
1503 |
-
|
1504 |
-
if ( $may_change_delete ) {
|
1505 |
wppa_echo( '
|
1506 |
-
<div style="max-width:
|
1507 |
<label
|
1508 |
-
for="
|
1509 |
-
__( '
|
1510 |
</label><br>
|
1511 |
-
<
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
( $
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1519 |
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1520 |
}
|
1521 |
-
}
|
1522 |
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1526 |
|
1527 |
wppa_echo( '
|
1528 |
<!-- Section 3, Actions -->
|
@@ -1655,40 +1479,6 @@ function wppaToggleExif( id, count ) {
|
|
1655 |
}
|
1656 |
}
|
1657 |
|
1658 |
-
// Remake displayfiles
|
1659 |
-
if ( ! $is_video ) {
|
1660 |
-
wppa_echo( '
|
1661 |
-
<div>
|
1662 |
-
<label>
|
1663 |
-
|
1664 |
-
</label><br>
|
1665 |
-
<input
|
1666 |
-
type="button"
|
1667 |
-
class="wppa-admin-button button"
|
1668 |
-
title="' . esc_attr( __( 'Remake display file and thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1669 |
-
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
1670 |
-
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
1671 |
-
/>
|
1672 |
-
</div>' );
|
1673 |
-
}
|
1674 |
-
|
1675 |
-
// Remake thumbnail
|
1676 |
-
if ( ! $is_video ) {
|
1677 |
-
wppa_echo( '
|
1678 |
-
<div style="max-width:500px;">
|
1679 |
-
<label>
|
1680 |
-
|
1681 |
-
</label><br>
|
1682 |
-
<input
|
1683 |
-
type="button"
|
1684 |
-
class="wppa-admin-button button"
|
1685 |
-
title="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1686 |
-
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
1687 |
-
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1688 |
-
/>
|
1689 |
-
</div>' );
|
1690 |
-
}
|
1691 |
-
|
1692 |
// Delete
|
1693 |
if ( wppa_user_is( 'administrator' ) || wppa_get_photo_item( $id, 'owner' ) == wppa_get_user() ) {
|
1694 |
if ( ! wppa( 'front_edit' ) ) {
|
@@ -1760,364 +1550,15 @@ function wppaToggleExif( id, count ) {
|
|
1760 |
</div>' );
|
1761 |
}
|
1762 |
|
1763 |
-
wppa_echo( '
|
1764 |
-
</div>' );
|
1765 |
-
|
1766 |
-
// Section 3a ImageMagick editing commands
|
1767 |
-
if ( wppa_can_admin_magick( $id ) && ! $quick ) {
|
1768 |
-
|
1769 |
-
wppa_echo( '<div style="padding:0 20px;">
|
1770 |
-
<details class="wppa-sublevel-details">
|
1771 |
-
<summary class="toplevel wppa-summary-sublevel" onclick="if(!jQuery(this).parent().prop(\'open\'))wppaInitMagick(\''.$id.'\')"> '.
|
1772 |
-
__( 'ImageMagick commands', 'wp-photo-album-plus' ) . '
|
1773 |
-
</summary>
|
1774 |
-
|
1775 |
-
<table
|
1776 |
-
class="wppa-table wppa-photo-table"
|
1777 |
-
style="border:1px solid lightgray;margin:2px 20px 20px 0;background-color:#ccc;"
|
1778 |
-
>
|
1779 |
-
<tbody>
|
1780 |
-
<tr>
|
1781 |
-
<td>' .
|
1782 |
-
__( 'The operations are executed upon the display file.', 'wp-photo-album-plus' ) . ' ' .
|
1783 |
-
__( 'A new thumbnail image will be created from the display file.', 'wp-photo-album-plus' ) . '
|
1784 |
-
</td>
|
1785 |
-
</tr>
|
1786 |
-
<tr>
|
1787 |
-
<td>' );
|
1788 |
-
|
1789 |
-
// --- Actions ---
|
1790 |
-
{
|
1791 |
-
// Rotate left
|
1792 |
-
wppa_echo( '
|
1793 |
-
<input
|
1794 |
-
type="button"
|
1795 |
-
class="wppa-admin-button button"
|
1796 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
1797 |
-
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1798 |
-
/>' );
|
1799 |
-
|
1800 |
-
// Rotat 180
|
1801 |
-
wppa_echo( '
|
1802 |
-
<input
|
1803 |
-
type="button"
|
1804 |
-
class="wppa-admin-button button"
|
1805 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
1806 |
-
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1807 |
-
/>' );
|
1808 |
-
|
1809 |
-
// Rotate right
|
1810 |
-
wppa_echo( '
|
1811 |
-
<input
|
1812 |
-
type="button"
|
1813 |
-
class="wppa-admin-button button"
|
1814 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
1815 |
-
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1816 |
-
/>' );
|
1817 |
-
|
1818 |
-
// Flip
|
1819 |
-
wppa_echo( '
|
1820 |
-
<input
|
1821 |
-
type="button"
|
1822 |
-
class="wppa-admin-button button"
|
1823 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
1824 |
-
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1825 |
-
title="-flip"
|
1826 |
-
/>' );
|
1827 |
-
|
1828 |
-
// Flop
|
1829 |
-
wppa_echo( '
|
1830 |
-
<input
|
1831 |
-
type="button"
|
1832 |
-
class="wppa-admin-button button"
|
1833 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
1834 |
-
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
1835 |
-
title="-flop"
|
1836 |
-
/>' );
|
1837 |
-
|
1838 |
-
// Enhance
|
1839 |
-
wppa_echo( '
|
1840 |
-
<input
|
1841 |
-
type="button"
|
1842 |
-
class="wppa-admin-button button"
|
1843 |
-
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
1844 |
-
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
1845 |
-
title="-enhance"
|
1846 |
-
/>' );
|
1847 |
-
|
1848 |
-
// Sharpen
|
1849 |
-
wppa_echo( '
|
1850 |
-
<input
|
1851 |
-
type="button"
|
1852 |
-
class="wppa-admin-button button"
|
1853 |
-
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
1854 |
-
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
1855 |
-
title="-sharpen 0x1"
|
1856 |
-
/>' );
|
1857 |
-
|
1858 |
-
// Blur
|
1859 |
-
wppa_echo( '
|
1860 |
-
<input
|
1861 |
-
type="button"
|
1862 |
-
class="wppa-admin-button button"
|
1863 |
-
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
1864 |
-
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
1865 |
-
title="-blur 0x1"
|
1866 |
-
/>' );
|
1867 |
-
|
1868 |
-
// Auto gamma
|
1869 |
-
wppa_echo( '
|
1870 |
-
<input
|
1871 |
-
type="button"
|
1872 |
-
class="wppa-admin-button button"
|
1873 |
-
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
1874 |
-
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
1875 |
-
title="-auto-gamma"
|
1876 |
-
/>' );
|
1877 |
-
|
1878 |
-
// Auto level
|
1879 |
-
wppa_echo( '
|
1880 |
-
<input
|
1881 |
-
type="button"
|
1882 |
-
class="wppa-admin-button button"
|
1883 |
-
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
1884 |
-
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
1885 |
-
title="-auto-level"
|
1886 |
-
/>' );
|
1887 |
-
|
1888 |
-
// Contrast+
|
1889 |
-
wppa_echo( '
|
1890 |
-
<input
|
1891 |
-
type="button"
|
1892 |
-
class="wppa-admin-button button"
|
1893 |
-
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
1894 |
-
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
1895 |
-
title="-brightness-contrast 0x5"
|
1896 |
-
/>' );
|
1897 |
-
|
1898 |
-
// Contrast-
|
1899 |
-
wppa_echo( '
|
1900 |
-
<input
|
1901 |
-
type="button"
|
1902 |
-
class="wppa-admin-button button"
|
1903 |
-
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
1904 |
-
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
1905 |
-
title="-brightness-contrast 0x-5"
|
1906 |
-
/>' );
|
1907 |
-
|
1908 |
-
// Brightness+
|
1909 |
-
wppa_echo( '
|
1910 |
-
<input
|
1911 |
-
type="button"
|
1912 |
-
class="wppa-admin-button button"
|
1913 |
-
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
1914 |
-
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
1915 |
-
title="-brightness-contrast 5"
|
1916 |
-
/>' );
|
1917 |
-
|
1918 |
-
// Brightness-
|
1919 |
-
wppa_echo( '
|
1920 |
-
<input
|
1921 |
-
type="button"
|
1922 |
-
class="wppa-admin-button button"
|
1923 |
-
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
1924 |
-
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
1925 |
-
title="-brightness-contrast -5"
|
1926 |
-
/>' );
|
1927 |
-
|
1928 |
-
// Despeckle
|
1929 |
-
wppa_echo( '
|
1930 |
-
<input
|
1931 |
-
type="button"
|
1932 |
-
class="wppa-admin-button button"
|
1933 |
-
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
1934 |
-
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
1935 |
-
title="-despeckle"
|
1936 |
-
/>' );
|
1937 |
-
|
1938 |
-
// Lenear gray
|
1939 |
-
wppa_echo( '
|
1940 |
-
<input
|
1941 |
-
type="button"
|
1942 |
-
class="wppa-admin-button button"
|
1943 |
-
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
1944 |
-
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
1945 |
-
title="-colorspace gray"
|
1946 |
-
/>' );
|
1947 |
-
|
1948 |
-
// Non-linear gray
|
1949 |
-
wppa_echo( '
|
1950 |
-
<input
|
1951 |
-
type="button"
|
1952 |
-
class="wppa-admin-button button"
|
1953 |
-
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
1954 |
-
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
1955 |
-
title="-grayscale Rec709Luma"
|
1956 |
-
/>' );
|
1957 |
-
|
1958 |
-
// Charcoal
|
1959 |
-
wppa_echo( '
|
1960 |
-
<input
|
1961 |
-
type="button"
|
1962 |
-
class="wppa-admin-button button"
|
1963 |
-
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
1964 |
-
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
1965 |
-
title="-charcoal"
|
1966 |
-
/>' );
|
1967 |
-
|
1968 |
-
// Paint
|
1969 |
-
wppa_echo( '
|
1970 |
-
<input
|
1971 |
-
type="button"
|
1972 |
-
class="wppa-admin-button button"
|
1973 |
-
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
1974 |
-
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
1975 |
-
title="-paint"
|
1976 |
-
/>' );
|
1977 |
-
|
1978 |
-
// Sepia
|
1979 |
-
wppa_echo( '
|
1980 |
-
<input
|
1981 |
-
type="button"
|
1982 |
-
class="wppa-admin-button button"
|
1983 |
-
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
1984 |
-
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
1985 |
-
title="-sepia-tone 80%"
|
1986 |
-
/>' );
|
1987 |
-
|
1988 |
-
// Show/hide wppa-horizon
|
1989 |
-
wppa_echo( '
|
1990 |
-
<input
|
1991 |
-
type="button"
|
1992 |
-
class="wppa-admin-button button"
|
1993 |
-
onclick="wppaToggleHorizon()"
|
1994 |
-
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
1995 |
-
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
1996 |
-
/>' );
|
1997 |
-
|
1998 |
-
// Anticlock 0.5 deg
|
1999 |
-
wppa_echo( '
|
2000 |
-
<input
|
2001 |
-
type="button"
|
2002 |
-
class="wppa-admin-button button"
|
2003 |
-
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
2004 |
-
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
2005 |
-
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
2006 |
-
/>' );
|
2007 |
-
|
2008 |
-
// Clockwise 0.5 deg
|
2009 |
-
wppa_echo( '
|
2010 |
-
<input
|
2011 |
-
type="button"
|
2012 |
-
class="wppa-admin-button button"
|
2013 |
-
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
2014 |
-
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
2015 |
-
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
2016 |
-
/>' );
|
2017 |
-
|
2018 |
-
// Crop
|
2019 |
-
wppa_echo( '
|
2020 |
-
<input
|
2021 |
-
type="button"
|
2022 |
-
class="wppa-admin-button button"
|
2023 |
-
id="button-' . $id . '"
|
2024 |
-
value="Crop"
|
2025 |
-
title=""
|
2026 |
-
/>' );
|
2027 |
-
|
2028 |
-
// Set cropbox aspect ratio
|
2029 |
-
$ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
|
2030 |
-
$dflt = wppa_opt( 'image_magick_ratio' );
|
2031 |
-
|
2032 |
-
wppa_echo( '
|
2033 |
-
<select
|
2034 |
-
onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
|
2035 |
-
title="' . __( 'Aspect ratio of cropped image', 'wp-photo-album-plus' ) . '"
|
2036 |
-
>
|
2037 |
-
<option value="NaN"' . ( $dflt == 'NaN' ? ' selected' : '' ) . '>' . __( 'free', 'wp-photo-album-plus' ) . '</option>
|
2038 |
-
<option value="' . $ratio . '"' . ( $dflt == 'ratio' ? ' selected' : '' ) . '>' . __( 'original', 'wp-photo-album-plus' ) . '</option>
|
2039 |
-
<option value="1"' . ( $dflt == '1' ? ' selected' : '' ) . '>' . __( 'square', 'wp-photo-album-plus' ) . '</option>
|
2040 |
-
<option value="1.25"' . ( $dflt == '1.25' ? ' selected' : '' ) . '>4:5 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2041 |
-
<option value="1.33333"' . ( $dflt == '1.33333' ? ' selected' : '' ) . '>3:4 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2042 |
-
<option value="1.5"' . ( $dflt == '1.5' ? ' selected' : '' ) . '>2:3 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2043 |
-
<option value="1.6"' . ( $dflt == '1.6' ? ' selected' : '' ) . '>5:8 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2044 |
-
<option value="1.77777"' . ( $dflt == '1.77777' ? ' selected' : '' ) . '>9:16 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2045 |
-
<option value="2"' . ( $dflt == '2' ? ' selected' : '' ) . '>1:2 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2046 |
-
<option value="0.8"' . ( $dflt == '0.8' ? ' selected' : '' ) . '>4:5 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2047 |
-
<option value="0.75"' . ( $dflt == '0.75' ? ' selected' : '' ) . '>3:4 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2048 |
-
<option value="0.66667"' . ( $dflt == '0.66667' ? ' selected' : '' ) . '>2:3 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2049 |
-
<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2050 |
-
<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2051 |
-
<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2052 |
-
</select>' . $br );
|
2053 |
-
|
2054 |
-
if ( $dflt == 'ratio' ) {
|
2055 |
-
$value = $ratio;
|
2056 |
-
}
|
2057 |
-
elseif ( $dflt == 'free' ) {
|
2058 |
-
$value = '';
|
2059 |
-
}
|
2060 |
-
else {
|
2061 |
-
$value = $dflt;
|
2062 |
-
}
|
2063 |
-
|
2064 |
-
// $the_js = 'jQuery(document).ready(function(){wppaCropper[' . $id . '].setAspectRatio(' . $value . ');});';
|
2065 |
-
// wppa_add_inline_script( 'wppa-admin', $the_js );
|
2066 |
-
}
|
2067 |
|
2068 |
-
wppa_echo( '
|
2069 |
-
</td>
|
2070 |
-
</tr>
|
2071 |
-
<tr>
|
2072 |
-
<td>' .
|
2073 |
-
__( '<b>ImageMagick</b> command stack', 'wp-photo-album-plus' ) . ':
|
2074 |
-
<span
|
2075 |
-
id="magickstack-' . strval( intval( $id ) ). '"
|
2076 |
-
style="color:blue"
|
2077 |
-
>' .
|
2078 |
-
sanitize_text_field( $magickstack ) . '
|
2079 |
-
</span>
|
2080 |
-
<input
|
2081 |
-
type="button"
|
2082 |
-
class="wppa-admin-button button"
|
2083 |
-
id="imstackbutton-' . strval( intval( $id ) ) . '"
|
2084 |
-
onclick="wppaTryMagick( ' . strval( intval( $id ) ) . ', \'magickundo\' )"
|
2085 |
-
value="' . esc_attr( __( 'Undo', 'wp-photo-album-plus' ) ) . '"
|
2086 |
-
title="' . esc_attr( __( 'Undo last Magick command', 'wp-photo-album-plus' ) ) . '"
|
2087 |
-
style="margin-left:4px;' . ( $magickstack ? 'display:inline;' : 'display:none;' ) . '"
|
2088 |
-
/>
|
2089 |
-
</td>
|
2090 |
-
</tr>' );
|
2091 |
-
|
2092 |
-
// Fake 'for social media' to use the local file here, not cloudinary. Files from cloudinary do not reload, even with ?ver=...
|
2093 |
-
wppa( 'for_sm', true );
|
2094 |
-
wppa_echo( '
|
2095 |
-
<tr>
|
2096 |
-
<td>
|
2097 |
-
<div
|
2098 |
-
class="wppa-cropper-container-wrapper">
|
2099 |
-
<img
|
2100 |
-
id="fs-img-' . $id . '"
|
2101 |
-
src="' . esc_url( wppa_get_photo_url( $id ) ) . '"
|
2102 |
-
style="float:left;max-width:100%"
|
2103 |
-
/>
|
2104 |
-
</div>
|
2105 |
-
</td>
|
2106 |
-
</tr>
|
2107 |
-
</tbody>
|
2108 |
-
</table>
|
2109 |
-
</details></div>' );
|
2110 |
-
}
|
2111 |
|
2112 |
-
// Reset switch
|
2113 |
-
wppa( 'for_sm', false );
|
2114 |
|
2115 |
// Section 4
|
2116 |
wppa_echo( '
|
2117 |
<!-- Section 4 -->
|
2118 |
<table
|
2119 |
class="wppa-table wppa-photo-table"
|
2120 |
-
style="width:100
|
2121 |
>
|
2122 |
<tbody>' );
|
2123 |
|
@@ -2512,139 +1953,784 @@ function wppaToggleExif( id, count ) {
|
|
2512 |
</tbody>
|
2513 |
</table>' );
|
2514 |
|
2515 |
-
wppa_echo( '<!-- Section 5 -->' );
|
2516 |
-
|
2517 |
-
// IPTC
|
2518 |
-
if ( ! $quick ) {
|
2519 |
-
$iptcs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_iptc
|
2520 |
-
WHERE photo = %s
|
2521 |
-
ORDER BY tag, id", $id ), ARRAY_A );
|
2522 |
-
if ( ! empty( $iptcs ) ) {
|
2523 |
-
wppa_echo( '
|
2524 |
-
<table><tbody><tr><td><input
|
2525 |
-
type="button"
|
2526 |
-
id="wppa-iptc-button-' . $id . '"
|
2527 |
-
class="button button-secundary"
|
2528 |
-
value="' . esc_attr( sprintf( __( 'Show %d IPTC items', 'wp-photo-album-plus' ), count( $iptcs ) ) ) . '"
|
2529 |
-
onclick="wppaToggleIptc( ' . $id . ', ' . count( $iptcs ) . ' )"
|
2530 |
-
/></td></tr></tbody></table>
|
2531 |
-
<table
|
2532 |
-
id="wppa-iptc-' . $id . '"
|
2533 |
-
class="wppa-table wppa-photo-table"
|
2534 |
-
style="clear:both;width:99%;display:none"
|
2535 |
-
>
|
2536 |
-
<thead>
|
2537 |
-
<tr style="font-weight:bold">
|
2538 |
-
<td style="padding:0 4px">' . __( 'IPTC tag', 'wp-photo-album-plus' ) . '</td>
|
2539 |
-
<td style="padding:0 4px">' . __( 'Description', 'wp-photo-album-plus' ) . '</td>
|
2540 |
-
<td style="padding:0 4px">' . __( 'Value', 'wp-photo-album-plus' ) . '</td>
|
2541 |
-
</tr>
|
2542 |
-
</thead>
|
2543 |
-
<tbody>' );
|
2544 |
-
|
2545 |
-
foreach ( $iptcs as $iptc ) {
|
2546 |
|
2547 |
-
|
2548 |
-
|
2549 |
-
<td style="padding:0 4px">' . $iptc['tag'] . '</td>
|
2550 |
-
<td style="padding:0 4px">' . esc_html( wppa_iptc_tagname( $iptc['tag'] ) ) . ':</td>
|
2551 |
-
<td style="padding:0 4px">
|
2552 |
-
<input
|
2553 |
-
type="text"
|
2554 |
-
style="width:500px"
|
2555 |
-
value="' . esc_attr( $iptc['description'] ) . '"
|
2556 |
-
onchange="wppaAjaxUpdateIptc(\'' . $id . '\', \'' . $iptc['id'] . '\', this.value, \'' . $iptc['tag'] . '\')"
|
2557 |
-
/>
|
2558 |
-
</td>
|
2559 |
-
</tr>' );
|
2560 |
-
}
|
2561 |
|
2562 |
-
wppa_echo( '
|
2563 |
-
</tbody>
|
2564 |
-
</table>' );
|
2565 |
-
}
|
2566 |
-
}
|
2567 |
|
2568 |
-
// Exif
|
2569 |
-
if ( ! $quick ) {
|
2570 |
-
$exifs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_exif
|
2571 |
-
WHERE photo = %s
|
2572 |
-
ORDER BY tag, id", $id ), ARRAY_A );
|
2573 |
-
if ( ! empty( $exifs ) ) {
|
2574 |
-
$brand = wppa_get_camera_brand( $id );
|
2575 |
-
wppa_echo( '
|
2576 |
-
<table><tbody><tr><td><input
|
2577 |
-
type="button"
|
2578 |
-
id="wppa-exif-button-' . $id . '"
|
2579 |
-
class="button button-secundary"
|
2580 |
-
value="' . esc_attr( sprintf( __( 'Show %d EXIF items', 'wp-photo-album-plus' ), count( $exifs ) ) ) . '"
|
2581 |
-
onclick="wppaToggleExif( ' . $id . ', ' . count( $exifs ) . ' )"
|
2582 |
-
/></td></tr></tbody></table>
|
2583 |
-
<table
|
2584 |
-
id="wppa-exif-' . $id . '"
|
2585 |
-
class="wppa-table wppa-photo-table"
|
2586 |
-
style="clear:both;width:99%;display:none"
|
2587 |
-
>
|
2588 |
-
<thead>
|
2589 |
-
<tr style="font-weight:bold">
|
2590 |
-
<td style="padding:0 4px">' . __( 'Exif tag', 'wp-photo-album-plus' ) . '</td>
|
2591 |
-
<td style="padding:0 4px">' . __( 'Brand', 'wp-photo-album-plus' ) . '</td>
|
2592 |
-
<td style="padding:0 4px">' . __( 'Description', 'wp-photo-album-plus' ) . '</td>
|
2593 |
-
<td style="padding:0 4px">' . __( 'Raw value', 'wp-photo-album-plus' ) . '</td>
|
2594 |
-
<td style="padding:0 4px">' . __( 'Formatted value', 'wp-photo-album-plus' ) . '</td>
|
2595 |
-
</tr>
|
2596 |
-
</thead>
|
2597 |
-
<tbody>' );
|
2598 |
|
2599 |
-
|
2600 |
-
|
2601 |
-
if ( is_serialized( $desc ) ) {
|
2602 |
-
$desc = 'Array(' . count( wppa_unserialize( $desc ) ) . ')';
|
2603 |
-
}
|
2604 |
-
wppa_echo( '
|
2605 |
-
<tr id="exif-tr-' . $exif['id'] . '">
|
2606 |
-
<td style="padding:0 4px">'.$exif['tag'].'</td>' );
|
2607 |
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'] ) . ':</td>' );
|
2617 |
-
}
|
2618 |
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
}
|
2623 |
-
$formatted_value = wp_kses( wppa_format_exif( $exif['tag'], $exif['description'], $brand ), 'post' );
|
2624 |
-
if ( strlen( $formatted_value ) > 50 ) {
|
2625 |
-
$formatted_value = substr( $formatted_value, 0, 47 ) . '...';
|
2626 |
-
}
|
2627 |
-
wppa_echo( '
|
2628 |
-
<td style="padding:0 4px">' . $raw_value . '</td>
|
2629 |
-
<td style="padding:0 4px">' . $formatted_value . '</td>
|
2630 |
-
</tr>' );
|
2631 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2632 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2633 |
|
2634 |
wppa_echo( '
|
2635 |
</tbody>
|
2636 |
</table>' );
|
2637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2638 |
}
|
2639 |
|
2640 |
-
wppa_echo( '<!-- Section 6 -->' );
|
2641 |
|
2642 |
// Comments
|
2643 |
-
if ( ! $quick ) {
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
|
|
|
|
|
|
|
|
2648 |
wppa_echo( '
|
2649 |
<table
|
2650 |
class="wppa-table wppa-photo-table"
|
@@ -2700,19 +2786,21 @@ function wppaToggleExif( id, count ) {
|
|
2700 |
|
2701 |
wppa_echo( '
|
2702 |
</tbody>
|
2703 |
-
</table>
|
2704 |
-
|
|
|
2705 |
}
|
|
|
2706 |
|
2707 |
wppa_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$id.');' );
|
2708 |
|
2709 |
wppa_echo( '
|
2710 |
-
<div
|
2711 |
</div>
|
2712 |
-
<div style="
|
2713 |
}
|
2714 |
/* End the actual display area for the photo settings */
|
2715 |
-
|
2716 |
} /* foreach photo */
|
2717 |
|
2718 |
wppa_admin_page_links( $page, $pagesize, $count, $link );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.2.03.002
|
7 |
*
|
8 |
*/
|
9 |
|
69 |
$page = wppa_get( 'wppa-page', '1' );
|
70 |
if ( ! is_numeric( $page ) ) $page = 1;
|
71 |
$skip = ( $page - '1' ) * $pagesize;
|
72 |
+
$album_is_obvious = false;
|
73 |
|
74 |
// Edit the photos in a specific album
|
75 |
if ( $album ) {
|
103 |
|
104 |
// A physical album
|
105 |
else {
|
106 |
+
$album_is_obvious = true;
|
107 |
$counts = wppa_get_treecounts_a( $album, true );
|
108 |
$count = $counts['selfphotos'] + $counts['pendselfphotos'] + $counts['scheduledselfphotos'];
|
109 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
259 |
else {
|
260 |
|
261 |
// Local js functions
|
262 |
+
{
|
263 |
$the_js = "
|
264 |
function wppaTryMove( id, video ) {
|
265 |
|
444 |
wppaAjaxUpdatePhoto( id, 'removescheduledel', 0 );
|
445 |
}
|
446 |
}
|
447 |
+
";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
|
449 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
450 |
+
}
|
451 |
|
452 |
$mvt = esc_attr( __( 'Move video', 'wp-photo-album-plus' ) );
|
453 |
$mpt = esc_attr( __( 'Move photo', 'wp-photo-album-plus' ) );
|
566 |
// May user change photo sequence no?
|
567 |
$may_change_porder = wppa_user_is( 'administrator' ) || ! wppa_switch( 'porder_restricted' );
|
568 |
|
569 |
+
// Is there exif data?
|
570 |
+
$exifs = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_exif
|
571 |
+
WHERE photo = %s
|
572 |
+
ORDER BY tag, id", $id ), ARRAY_A );
|
573 |
+
|
574 |
+
// Is there iptc data?
|
575 |
+
$iptcs = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_iptc
|
576 |
+
WHERE photo = %s
|
577 |
+
ORDER BY tag, id", $id ), ARRAY_A );
|
578 |
+
|
579 |
+
// Are there comments?
|
580 |
+
$comments = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_comments
|
581 |
+
WHERE photo = %s
|
582 |
+
ORDER BY timestamp DESC ", $id ), ARRAY_A );
|
583 |
|
584 |
// Anchor for scroll to
|
585 |
wppa_echo( '<a id="photo_' . $id . '"></a>' );
|
600 |
value="' . wp_create_nonce( 'wppa-nonce_' . $id ) . '"
|
601 |
/>' );
|
602 |
|
603 |
+
// Section 1: Preview thumbnail, photo name and stats
|
|
|
|
|
604 |
{
|
605 |
wppa_echo( '
|
606 |
<div>' );
|
608 |
reset( $is_video );
|
609 |
$big = str_replace( 'xxx', current( $is_video ), $big );
|
610 |
wppa_echo( '
|
611 |
+
<div style="float:left; margin-right: 20px;">
|
612 |
+
<a
|
613 |
href="' . esc_attr( $big ) . '"
|
614 |
target="_blank"
|
615 |
title="' . esc_attr( __( 'Preview fullsize video' , 'wp-photo-album-plus' ) ) . '"
|
621 |
'controls' => false,
|
622 |
'use_thumb' => true
|
623 |
) ) . '
|
624 |
+
</a>
|
625 |
+
</div>' );
|
626 |
}
|
627 |
else {
|
628 |
if ( $has_audio ) {
|
630 |
$big = wppa_get_photo_url( $id );
|
631 |
}
|
632 |
wppa_echo( '
|
633 |
+
<div style="float:left; margin-right: 20px;">
|
634 |
+
<a
|
635 |
+
id="thumba-' . $id . '"
|
636 |
+
href="' . esc_attr( $big ) . '"
|
637 |
+
target="_blank"
|
638 |
+
title="' . esc_attr( __( 'Preview fullsize photo', 'wp-photo-album-plus' ) ) . '"
|
639 |
+
>
|
640 |
+
<img
|
641 |
+
id="thumburl-' . $id . '"' .
|
642 |
+
( wppa_lazy() && $count > '1' ? ' data-' : ' ' ) . 'src="' . esc_url( $src ) . '"
|
643 |
+
alt="' . esc_attr( $name ) . '"
|
644 |
+
style="max-width:160px;vertical-align:middle"
|
645 |
+
/>
|
646 |
+
</a>
|
647 |
+
</div>' );
|
648 |
|
649 |
if ( $has_audio ) {
|
650 |
$audio = wppa_get_audio_html( array( 'id' => $id,
|
660 |
'</span>' ) );
|
661 |
}
|
662 |
}
|
663 |
+
wppa_echo( '<h1 style="display:inline;vertical-align:bottom;">' . wppa_get_photo_name( $id ) . '</h1>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
|
665 |
+
// Get the clicks, views and downloads stats
|
666 |
{
|
667 |
+
$th_1 = array();
|
668 |
+
$td_1 = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
669 |
|
670 |
+
// Clicks
|
671 |
+
if ( wppa_switch( 'track_clickcounts' ) ) {
|
672 |
+
$th_1[] = __( 'Clicks', 'wp-photo-album-plus' );
|
673 |
+
$td_1[] = strval( intval( $clicks ) );
|
674 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
|
676 |
+
// Views
|
677 |
+
if ( wppa_switch( 'track_viewcounts' ) ) {
|
678 |
+
$th_1[] = __( 'Views', 'wp-photo-album-plus' );
|
679 |
+
$td_1[] = strval( intval( $views ) );
|
680 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
|
682 |
+
// Downloads. Only photos are downloadable
|
683 |
+
if ( ! wppa_is_multi( $id ) ) {
|
684 |
+
$th_1[] = __( 'Downloads', 'wp-photo-album-plus' );
|
685 |
+
$td_1[] = strval( intval( $dlcount ) );
|
686 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
}
|
688 |
|
689 |
+
// Get the rating stats
|
690 |
{
|
691 |
+
$th_2 = array();
|
692 |
+
$td_2 = array();
|
693 |
+
|
694 |
+
// Rating
|
695 |
+
$entries = wppa_get_rating_count_by_id( $id );
|
696 |
+
if ( $entries ) {
|
697 |
+
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
698 |
+
$label = __( 'Likes', 'wp-photo-album-plus' );
|
699 |
+
$value = strval( intval( $entries ) );
|
700 |
+
}
|
701 |
+
else {
|
702 |
+
$label = __( 'Rating (#, avg)', 'wp-photo-album-plus' );
|
703 |
+
$value = wppa_get_rating_by_id( $id, 'nolabel' );
|
704 |
+
}
|
705 |
}
|
706 |
else {
|
707 |
+
$label = __( 'Rating', 'wp-photo-album-plus' );
|
708 |
+
$value = __( 'None', 'wp-photo-album-plus' );
|
709 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
|
711 |
+
$th_2[] = $label;
|
712 |
+
$td_2[] = $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
|
714 |
+
// Dislikes
|
715 |
+
$dislikes = wppa_dislike_get( $id );
|
716 |
+
if ( $dislikes ) {
|
717 |
+
$th_2[] = __( 'Dislikes', 'wp-photo-album-plus' );
|
718 |
+
$td_2[] = strval( intval( $dislikes ) );
|
719 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
|
721 |
+
// Pending votes
|
722 |
+
$pending = wppa_pendrat_get( $id );
|
723 |
+
if ( $pending ) {
|
724 |
+
$th_2[] = __( 'Pending votes', 'wp-photo-album-plus' );
|
725 |
+
$td_2[] = strval( intval( $pending ) );
|
726 |
+
}
|
|
|
|
|
|
|
|
|
|
|
727 |
}
|
728 |
|
729 |
+
// Display the stats
|
730 |
{
|
731 |
+
$table = '<table>';
|
732 |
+
$header = array(1 => array(), 2 => array());
|
733 |
+
$rows = array(1 => array(), 2 => array());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
734 |
|
735 |
+
for($i=0, $limit = max(count($th_1), count($th_2)); $i < $limit; $i++) {
|
736 |
+
|
737 |
+
$header[1][] .= isset($th_1[$i]) ? $th_1[$i] : '';
|
738 |
+
$header[2][] .= isset($th_2[$i]) ? $th_2[$i] : '';
|
739 |
+
$rows[1][] .= isset($td_1[$i]) ? $td_1[$i] : '';
|
740 |
+
$rows[2][] .= isset($td_2[$i]) ? $td_2[$i] : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
741 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
742 |
}
|
743 |
+
|
744 |
+
$table .= '<thead><tr><th style="min-width: 100px; text-align: left;">' . implode('</th><th style="min-width: 100px; text-align: left;">', $header[1]) . '</th></tr></thead>';
|
745 |
+
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[1]) . '</td></tr></tbody>';
|
746 |
+
$table .= '<thead><tr><th style="text-align: left;">' . implode('</th><th style="text-align: left;">', $header[2]) . '</th></tr></thead>';
|
747 |
+
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[2]) . '</td></tr></tbody>';
|
748 |
+
|
749 |
+
$table .= '</table>';
|
750 |
+
|
751 |
+
wppa_echo( $table );
|
752 |
}
|
753 |
|
754 |
+
wppa_echo( '
|
755 |
</div>' );
|
756 |
}
|
757 |
+
// End Thumbnail area
|
758 |
|
759 |
+
$details = __( 'Photo Details', 'wp-photo-album-plus' );
|
760 |
+
if ( wppa_is_video( $id ) ) $details = __( 'Video Details', 'wp-photo-album-plus' );
|
761 |
+
if ( wppa_is_pdf( $id ) ) $details = __( 'Document Details', 'wp-photo-album-plus' );
|
762 |
+
|
763 |
+
// Open the details area
|
764 |
wppa_echo( '
|
765 |
+
<details class="wppa-toplevel-details">
|
766 |
+
<summary class="toplevel wppa-summary-sublevel"> ' .
|
767 |
+
$details . '
|
768 |
+
</summary>' );
|
769 |
|
770 |
+
// Update status field
|
771 |
+
{
|
772 |
+
wppa_echo( '
|
773 |
+
<h3 style="margin-left:1em">' .
|
774 |
+
__( 'Remark:', 'wp-photo-album-plus' ) . '
|
775 |
+
<span
|
776 |
+
id="remark-' . $id . '"
|
777 |
+
style="font-weight:bold;color:#00AA00">' .
|
778 |
+
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
779 |
+
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) . '
|
780 |
+
</span>
|
781 |
+
</h3>' );
|
782 |
+
}
|
|
|
783 |
|
784 |
+
// The tabs
|
785 |
+
$ptitle = __( 'Photo', 'wp-photo-album-plus' );
|
786 |
+
if ( wppa_is_video( $id ) ) $ptitle = __( 'Video', 'wp-photo-album-plus' );
|
787 |
+
if ( wppa_is_pdf( $id ) ) $ptitle = __( 'Document', 'wp-photo-album-plus' );
|
788 |
+
$result = '
|
789 |
+
<div id="tabs" style="margin-bottom:23px">
|
790 |
+
<ul class="widefat wppa-setting-tabs">
|
791 |
+
<li class="wppa-photoadmin-tab-'.$id.' active" onclick="wppaChangePhotoAdminTab(this,\'#photogeneral-'.$id.'\','.$id.');">' . $ptitle . '</li>
|
792 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photofiles-'.$id.'\','.$id.');">' . __( 'Files', 'wp-photo-album-plus' ) . '</li>';
|
793 |
+
if ( wppa_can_admin_magick( $id ) && ! $quick ) {
|
794 |
+
$result .= '
|
795 |
+
<li
|
796 |
+
class="wppa-photoadmin-tab-'.$id.'"
|
797 |
+
onclick="wppaChangePhotoAdminTab(this,\'#photomagic-'.$id.'\','.$id.');wppaInitMagick(\''.$id.'\');">' .
|
798 |
+
__( 'ImageMagic', 'wp-photo-album-plus' ) . '
|
799 |
+
</li>';
|
800 |
}
|
801 |
+
if ( ! $quick && ! empty( $exifs ) ) {
|
802 |
+
$result .= '
|
803 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photoexif-'.$id.'\','.$id.');">' . __( 'EXIF', 'wp-photo-album-plus' ) . '</li>';
|
804 |
+
}
|
805 |
+
if ( ! $quick && ! empty( $iptcs ) ) {
|
806 |
+
$result .= '
|
807 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photoiptc-'.$id.'\','.$id.');">' . __( 'IPTC', 'wp-photo-album-plus' ) . '</li>';
|
808 |
+
}
|
809 |
+
if ( ! $quick && ! empty( $comments ) ) {
|
810 |
+
$result .= '
|
811 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photocomment-'.$id.'\','.$id.');">' . __( 'Comments', 'wp-photo-album-plus' ) . '</li>';
|
812 |
+
}
|
813 |
+
$result .= '
|
814 |
+
</ul>
|
815 |
+
<div style="clear:both"></div>
|
816 |
+
</div>';
|
817 |
+
wppa_echo( $result );
|
818 |
+
|
819 |
+
// The script for the tabs to operate, we need this only once
|
820 |
+
global $did_add_cpat;
|
821 |
+
if ( ! $did_add_cpat ) {
|
822 |
+
$the_js = '
|
823 |
+
function wppaChangePhotoAdminTab(elm,tabId,itemId) {
|
824 |
+
jQuery(".wppa-photoadmin-tab-"+itemId).removeClass(\'active\');
|
825 |
+
jQuery(elm).addClass(\'active\');
|
826 |
+
jQuery(".wppa-tabcontent-"+itemId).hide();
|
827 |
+
jQuery(tabId).show();
|
828 |
+
}';
|
829 |
+
wppa_add_inline_script( 'wppa-admin', $the_js );
|
830 |
+
$did_add_cpat = true;
|
831 |
+
}
|
832 |
|
833 |
+
// Tab 1 Photo general
|
834 |
+
wppa_echo( '
|
835 |
+
<div
|
836 |
+
id="photogeneral-' . $id . '"
|
837 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
838 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;"
|
839 |
+
>' );
|
840 |
+
|
841 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
wppa_echo( '
|
843 |
+
<div class="wppa-flex">' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
|
845 |
+
// ID
|
846 |
+
'<div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
<label>' .
|
848 |
+
__( 'Id', 'wp-photo-album-plus' ) . '
|
849 |
</label><br>
|
850 |
<div class="wppa-ldi">' .
|
851 |
+
strval( intval( $id ) ) . '
|
852 |
</div>
|
853 |
+
</div>' .
|
|
|
854 |
|
855 |
+
// Crypt
|
856 |
+
'<div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
857 |
<label>' .
|
858 |
+
__( 'Crypt', 'wp-photo-album-plus' ) . '
|
859 |
</label><br>
|
860 |
<div class="wppa-ldi">' .
|
861 |
+
htmlspecialchars( $crypt ) . '
|
862 |
</div>
|
863 |
+
</div>' .
|
|
|
864 |
|
865 |
+
// Filename
|
866 |
+
'<div style="max-width: 500px;">
|
|
|
|
|
|
|
|
|
867 |
<label>' .
|
868 |
+
__( 'Filename', 'wp-photo-album-plus' ) . '
|
869 |
</label><br>
|
870 |
+
<div class="wppa-ldi">' .
|
871 |
+
htmlspecialchars( $filename ) . '
|
872 |
+
</div>
|
873 |
+
</div>' .
|
|
|
|
|
|
|
|
|
874 |
|
875 |
+
|
876 |
+
// Upload
|
877 |
+
'<div>
|
878 |
<label>' .
|
879 |
+
__( 'Upload', 'wp-photo-album-plus' ) . '
|
880 |
</label><br>
|
881 |
+
<div class="wppa-ldi">' .
|
882 |
+
htmlspecialchars( wppa_local_date( '', $timestamp ) ) . '
|
883 |
+
</div>
|
|
|
|
|
|
|
|
|
884 |
</div>' );
|
885 |
|
886 |
+
// Owner
|
887 |
+
if ( ! $owner_editable ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
888 |
wppa_echo( '
|
889 |
<div>
|
890 |
<label>' .
|
891 |
+
__( 'Owner', 'wp-photo-album-plus' ) . '
|
892 |
</label><br>
|
893 |
<div class="wppa-ldi">' .
|
894 |
+
htmlspecialchars( $owner ) . '
|
895 |
</div>
|
896 |
</div>' );
|
897 |
}
|
898 |
|
899 |
+
$deleted = false;
|
900 |
+
if ( $album <= '-9' ) {
|
901 |
+
$album = - ( $album + '9' );
|
902 |
+
$deleted = true;
|
903 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
904 |
|
905 |
+
// Album. Show album only when it is not evident
|
906 |
+
if ( ! $album_is_obvious ) {
|
907 |
+
wppa_echo( '
|
908 |
+
<div style="max-width: 500px;margin-right: 4px;">
|
909 |
+
<label>' .
|
910 |
+
__( 'Album', 'wp-photo-album-plus' ) . '
|
911 |
+
</label><br>
|
912 |
+
<div class="wppa-ldi">' .
|
913 |
+
htmlspecialchars( wppa_get_album_name( $album ) ) . '(' . strval( intval( $album ) ) . ')
|
914 |
+
</div>
|
915 |
+
</div>' );
|
916 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
917 |
|
918 |
+
// Modified
|
919 |
+
{
|
920 |
+
$txt = wppa_local_date( '', $modified );
|
921 |
+
if ( $deleted ) $txt = __( 'Trashed', 'wp-photo-album-plus' );
|
922 |
+
if ( $timestamp >= $modified ) $txt = __( 'Not modified', 'wp-photo-album-plus' );
|
923 |
+
wppa_echo( '
|
924 |
+
<div>
|
925 |
+
<label>' .
|
926 |
+
__( 'Modified', 'wp-photo-album-plus' ) . '
|
927 |
+
</label><br>
|
928 |
+
<div class="wppa-ldi">' .
|
929 |
+
$txt . '
|
930 |
+
</div>
|
931 |
+
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
|
934 |
+
// Exif
|
935 |
+
if ( ! wppa_user_is( 'administrator' ) ) {
|
936 |
+
wppa_echo( '
|
937 |
+
<div>
|
938 |
+
<label>' .
|
939 |
+
__( 'EXIF Date', 'wp-photo-album-plus' ) . '
|
940 |
+
</label><br>
|
941 |
+
<div class="wppa-ldi">' .
|
942 |
+
esc_html( $exifdtm ) . '
|
943 |
+
</div>
|
944 |
+
</div>' );
|
945 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
946 |
|
947 |
+
// Location
|
948 |
+
if ( $photo['location'] && ! wppa_switch( 'geo_edit' ) ) {
|
949 |
+
$loc = $location ? $location : '///';
|
950 |
+
$geo = explode( '/', $loc );
|
951 |
+
wppa_echo( '
|
952 |
+
<div>
|
953 |
+
<label>' .
|
954 |
+
__( 'Location:' , 'wp-photo-album-plus' ) . '
|
955 |
+
</label>
|
956 |
+
<div class="wppa-ldi">' .
|
957 |
+
esc_html( $geo['0'].' '.$geo['1'].'. ' ) . '
|
958 |
+
</div>
|
959 |
+
</div>' );
|
960 |
+
}
|
961 |
|
962 |
+
// P_order
|
963 |
+
if ( $sortby_orderno && ! $may_change_porder ) {
|
964 |
+
wppa_echo( '
|
965 |
+
<div>
|
966 |
+
<label>' .
|
967 |
+
__( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
|
968 |
+
</label>
|
969 |
+
<div class="wppa-ldi">' .
|
970 |
+
$p_order . '
|
971 |
+
</div>
|
972 |
+
</div>' );
|
973 |
+
}
|
974 |
|
975 |
+
// Status
|
976 |
+
if ( ! $may_edit_status ) {
|
977 |
+
if ( $status == 'pending' ) $s = __( 'Pending', 'wp-photo-album-plus' );
|
978 |
+
elseif ( $status == 'publish' ) $s = __( 'Publish', 'wp-photo-album-plus' );
|
979 |
+
elseif ( $status == 'featured' ) $s = __( 'Featured', 'wp-photo-album-plus' );
|
980 |
+
elseif ( $status == 'gold' ) $s = __( 'Gold', 'wp-photo-album-plus' );
|
981 |
+
elseif ( $status == 'silver' ) $s = __( 'Silver', 'wp-photo-album-plus' );
|
982 |
+
elseif ( $status == 'bronze' ) $s = __( 'Bronze', 'wp-photo-album-plus' );
|
983 |
+
elseif ( $status == 'scheduled' ) $s = __( 'Scheduled', 'wp-photo-album-plus' );
|
984 |
+
elseif ( $status == 'private' ) $s = __( 'Private', 'wp-photo-album-plus' );
|
985 |
+
wppa_echo( '
|
986 |
+
<div>
|
987 |
+
<label>' .
|
988 |
+
__( 'Status', 'wp-photo-album-plus' ) . '
|
989 |
+
</label>
|
990 |
+
<div class="wppa-ldi">' .
|
991 |
+
$s . '
|
992 |
+
</div>
|
993 |
+
</div>' );
|
994 |
}
|
995 |
+
|
996 |
+
// Schedule for delete
|
997 |
+
if ( ! wppa_user_is( 'administrator' ) && $owner != wppa_get_user() ) {
|
998 |
+
if ( $scheduledel ) {
|
999 |
wppa_echo( '
|
1000 |
+
<div>
|
1001 |
+
<label>' .
|
1002 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1003 |
+
</label>
|
1004 |
+
<div class="wppa-ldi">' .
|
1005 |
+
wppa_get_date_time_select_html( 'delphoto', $id, false ) . '
|
1006 |
+
</div>
|
1007 |
+
</div>' );
|
|
|
|
|
1008 |
}
|
1009 |
}
|
1010 |
+
|
1011 |
+
// End flex div
|
1012 |
+
wppa_echo( '</div>' );
|
1013 |
}
|
1014 |
|
1015 |
+
// Tab 1 Section 2
|
1016 |
+
wppa_echo( '
|
1017 |
+
<div class="wppa-flex">' );
|
1018 |
+
|
1019 |
+
// Owner
|
1020 |
+
if ( $owner_editable ) {
|
1021 |
wppa_echo( '
|
1022 |
<div>
|
1023 |
<label
|
1024 |
+
for="owner-' . $id . '">' .
|
1025 |
+
__( 'Owned by:', 'wp-photo-album-plus' ) . '
|
1026 |
</label><br>
|
1027 |
+
<input
|
1028 |
+
id="owner-' . $id . '"
|
1029 |
+
type="text"
|
1030 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
1031 |
+
value="' . esc_attr( $owner ) . '"
|
1032 |
+
/>
|
|
|
1033 |
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1034 |
}
|
|
|
1035 |
|
1036 |
+
// Exif date-time
|
1037 |
+
if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1038 |
wppa_echo( '
|
1039 |
+
<div>
|
1040 |
<label
|
1041 |
+
for="exifdtm-' . $id . '">' .
|
1042 |
+
__( 'EXIF Date:', 'wp-photo-album-plus' ) . '
|
1043 |
</label><br>
|
1044 |
+
<input
|
1045 |
+
id="exifdtm-' . $id . '"
|
1046 |
+
type="text"
|
1047 |
+
style="width:125px"
|
1048 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
|
1049 |
+
value="' . esc_attr( $exifdtm ) . '"
|
1050 |
+
/>
|
1051 |
+
</div>' );
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
// Location
|
1055 |
+
if ( wppa_switch( 'geo_edit' ) ) {
|
1056 |
+
$loc = $location ? $location : '///';
|
1057 |
+
$geo = explode( '/', $loc );
|
1058 |
+
wppa_echo( '
|
1059 |
<div>
|
1060 |
<label
|
1061 |
+
for="lat-' . $id . '">' .
|
1062 |
+
__( 'Location Lat:' , 'wp-photo-album-plus' ) . esc_html( $geo['0'] ) . '
|
1063 |
</label><br>
|
1064 |
+
<input
|
1065 |
+
id="lat-' . $id . '"
|
1066 |
+
type="text"
|
1067 |
+
style="width:100px"
|
1068 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lat\', this.value)"
|
1069 |
+
value="' . esc_attr( $geo['2'] ) . '"
|
1070 |
+
/>
|
1071 |
</div>
|
1072 |
<div>
|
1073 |
+
<label
|
1074 |
+
for="lon-' . $id . '">' .
|
1075 |
+
__( 'Location Lon:' , 'wp-photo-album-plus' ) . esc_html( $geo['1'] ) . '
|
1076 |
</label><br>
|
1077 |
<input
|
1078 |
+
id="lon-' . $id . '"
|
1079 |
+
type="text"
|
1080 |
+
style="width:100px"
|
1081 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value)"
|
1082 |
+
value="' . esc_attr( $geo['3'] ) . '"
|
1083 |
/>
|
1084 |
+
</div>' );
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
// Changeable p_order
|
1088 |
+
if ( $sortby_orderno && $may_change_porder ) {
|
1089 |
+
wppa_echo( '
|
1090 |
+
<div>
|
1091 |
+
<label
|
1092 |
+
for="porder-' . $id . '">' .
|
1093 |
+
__( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
|
1094 |
+
</label><br>
|
1095 |
+
<input
|
1096 |
+
type="text"
|
1097 |
+
id="porder-' . $id . '"
|
1098 |
+
value="' . esc_attr( $p_order ) . '"
|
1099 |
+
style="width:100px"
|
1100 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
1101 |
/>
|
1102 |
</div>' );
|
1103 |
}
|
1104 |
+
|
1105 |
+
// Status
|
1106 |
+
if ( $may_edit_status ) {
|
1107 |
+
$sel = ' selected';
|
1108 |
+
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
1109 |
+
$dis = ' disabled';
|
1110 |
+
}
|
1111 |
+
else {
|
1112 |
+
$dis = '';
|
1113 |
+
}
|
1114 |
+
wppa_echo( '
|
1115 |
+
<div>
|
1116 |
+
<label
|
1117 |
+
for="status-' . $id . '">' .
|
1118 |
+
__( 'Status' , 'wp-photo-album-plus' ) . '
|
1119 |
+
</label><br>
|
1120 |
+
<select
|
1121 |
+
id="status-' . $id . '"
|
1122 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'status\', this.value); wppaPhotoStatusChange( ' . $id . ' )">
|
1123 |
+
<option value="pending"' . ( $status == 'pending' ? $sel : '' ) . ' >' .
|
1124 |
+
__( 'Pending', 'wp-photo-album-plus' ) . '
|
1125 |
+
</option>
|
1126 |
+
<option value="publish"' . ( $status =='publish' ? $sel : '' ) . ' >' .
|
1127 |
+
__( 'Publish', 'wp-photo-album-plus' ) . '
|
1128 |
+
</option>
|
1129 |
+
<option value="featured"' . ( $status == 'featured' ? $sel : '' ) . $dis . ' >' .
|
1130 |
+
__( 'Featured', 'wp-photo-album-plus' ) . '
|
1131 |
+
</option>
|
1132 |
+
<option value="gold"' . ( $status == 'gold' ? $sel : '' ) . $dis . ' >' .
|
1133 |
+
__( 'Gold', 'wp-photo-album-plus' ) . '
|
1134 |
+
</option>
|
1135 |
+
<option value="silver"' . ( $status == 'silver' ? $sel : '' ) . $dis . ' >' .
|
1136 |
+
__( 'Silver', 'wp-photo-album-plus' ) . '
|
1137 |
+
</option>
|
1138 |
+
<option value="bronze"' . ( $status == 'bronze' ? $sel : '' ) . $dis . ' >' .
|
1139 |
+
__( 'Bronze', 'wp-photo-album-plus' ) . '
|
1140 |
+
</option>
|
1141 |
+
<option value="scheduled"' . ( $status == 'scheduled' ? $sel : '' ) . $dis . ' >' .
|
1142 |
+
__( 'Scheduled', 'wp-photo-album-plus' ) . '
|
1143 |
+
</option>
|
1144 |
+
<option value="private"' . ( $status == 'private' ? $sel : '' ) . $dis . ' >' .
|
1145 |
+
__( 'Private', 'wp-photo-album-plus' ) . '
|
1146 |
+
</option>
|
1147 |
+
</select>' .
|
1148 |
+
wppa_get_date_time_select_html( 'photo', $id, true ) . '
|
1149 |
+
|
1150 |
+
</div>' );
|
1151 |
}
|
|
|
|
|
1152 |
|
1153 |
+
// Stereo
|
1154 |
+
if ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) {
|
|
|
1155 |
wppa_echo( '
|
1156 |
+
<div style="max-width:250px;">
|
1157 |
<label
|
1158 |
+
for="stereo-' . $id . '">' .
|
1159 |
+
__( 'Stereophoto', 'wp-photo-album-plus' ) . '
|
1160 |
</label><br>
|
1161 |
+
<select
|
1162 |
+
id="stereo-' . $id . '"
|
1163 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'stereo\', this.value, true)"
|
1164 |
+
>
|
1165 |
+
<option value="0"' . ( $stereo == '0' ? ' selected' : '' ) . '>' .
|
1166 |
+
__( 'No stereo image', 'wp-photo-album-plus' ) . '
|
1167 |
+
</option>
|
1168 |
+
<option value="1"' . ( $stereo == '1' ? ' selected' : '' ) . '>' .
|
1169 |
+
__( 'Left - right stereo image', 'wp-photo-album-plus' ) . '
|
1170 |
+
</option>
|
1171 |
+
<option value="-1"' . ( $stereo == '-1' ? ' selected' : '' ) . '>' .
|
1172 |
+
__( 'Right - left stereo image', 'wp-photo-album-plus' ) . '
|
1173 |
+
</option>
|
1174 |
+
</select>
|
1175 |
</div>' );
|
1176 |
+
|
1177 |
+
/*
|
1178 |
+
__( 'Images:', 'wp-photo-album-plus' ) . ' ' );
|
1179 |
+
|
1180 |
+
$files = wppa_glob( WPPA_UPLOAD_PATH . '/stereo/' . $id . '-*.*' );
|
1181 |
+
|
1182 |
+
if ( empty( $files ) ) {
|
1183 |
+
wppa_echo( __( 'None', 'wp-photo-album-plus' ) . '. ' );
|
1184 |
+
}
|
1185 |
+
else {
|
1186 |
+
sort( $files );
|
1187 |
+
$c = 0;
|
1188 |
+
foreach ( $files as $file ) {
|
1189 |
+
wppa_echo( '
|
1190 |
+
<a href="' . str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $file ) . '" target="_blank">' .
|
1191 |
+
basename( $file ) . '
|
1192 |
+
</a>' );
|
1193 |
+
$c++;
|
1194 |
+
if ( $c == count( $files ) ) {
|
1195 |
+
wppa_echo( '. ' );
|
1196 |
+
}
|
1197 |
+
else {
|
1198 |
+
wppa_echo( ', ' );
|
1199 |
+
}
|
1200 |
+
}
|
1201 |
+
}
|
1202 |
+
wppa_echo( $br );
|
1203 |
+
*/
|
1204 |
}
|
|
|
1205 |
|
1206 |
+
// Panorama
|
1207 |
+
if ( wppa_switch( 'enable_panorama' ) && ! $b_is_video ) {
|
1208 |
+
$can_panorama = $photoy && $photox / $photoy >= 1.999;
|
1209 |
+
if ( $can_panorama ) {
|
1210 |
+
wppa_echo( '
|
1211 |
+
<div>
|
1212 |
+
<label
|
1213 |
+
for="panorama-' . $id . '">' .
|
1214 |
+
__( 'Panorama', 'wp-photo-album-plus' ) . '
|
1215 |
+
</label><br>
|
1216 |
+
<select
|
1217 |
+
id="panorama-' . $id . '"
|
1218 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this.value, true )">
|
1219 |
+
<option value="0"' . ( $panorama == '0' ? ' selected' : '' ) . '>' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1220 |
+
<option value="1"' . ( $panorama == '1' ? ' selected' : '' ) . '>' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1221 |
+
<option value="2"' . ( $panorama == '2' ? ' selected' : '' ) . '>' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1222 |
+
</select>
|
1223 |
+
</div>' );
|
1224 |
+
|
1225 |
+
$source_file = wppa_get_source_path( $id );
|
1226 |
+
if ( wppa_is_file( $source_file ) ) {
|
1227 |
+
$source_file_sizes = wppa_getimagesize( $source_file );
|
1228 |
+
|
1229 |
+
if ( $panorama == '1' && $source_file_sizes[0] / $source_file_sizes[1] > 2.001 ) {
|
1230 |
+
$t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
|
1231 |
+
wppa_echo( '
|
1232 |
+
<div>
|
1233 |
+
<label
|
1234 |
+
for="make360-' . $id . '">' .
|
1235 |
+
__( 'Make 360 from', 'wp-photo-album-plus' ) . '
|
1236 |
+
</label><br>
|
1237 |
+
<select
|
1238 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'make360\', this.value, true)"
|
1239 |
+
id="make360-' . $id . '"
|
1240 |
+
title="' . esc_attr( __( 'Select the closest angle you originally made the panorama', 'wp-photo-album-plus' ) ) . '">
|
1241 |
+
<option value="">'.__('Select', 'wp-photo-album-plus' ).'</option>' );
|
1242 |
+
foreach( $t as $v ) {
|
1243 |
+
wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected':'').'>'.$v.'°</option>' );
|
1244 |
+
}
|
1245 |
+
wppa_echo( '
|
1246 |
+
<option value="0">' . __( 'Undo', 'wp-photo-album-plus' ) . '</option>
|
1247 |
+
</select>
|
1248 |
+
</div>' );
|
1249 |
+
}
|
1250 |
+
}
|
1251 |
+
}
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
// Watermark
|
1255 |
+
if ( wppa_switch( 'watermark_on' ) ) {
|
1256 |
+
|
1257 |
+
// Get the current watermark file settings
|
1258 |
+
$temp = wppa_get_water_file_and_pos( $id );
|
1259 |
+
$wmfile = isset( $temp['file'] ) ? $temp['file'] : '';
|
1260 |
+
$wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
|
1261 |
+
|
1262 |
+
$user = wppa_get_user();
|
1263 |
+
$has_source = wppa_is_file( wppa_get_source_path( $id ) );
|
1264 |
+
$can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
|
1265 |
+
if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
|
1266 |
+
wppa_echo( '
|
1267 |
+
<div style="max-width:250px;">
|
1268 |
+
<label
|
1269 |
+
for="wmfsel_' . $id . '">' .
|
1270 |
+
__( 'Watermark', 'wp-photo-album-plus' ) . '
|
1271 |
+
</label><br>
|
1272 |
+
<select
|
1273 |
+
id="wmfsel_' . $id . '"
|
1274 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_file_' . $user . '\', this.value)"
|
1275 |
+
>' .
|
1276 |
+
wppa_watermark_file_select( 'user', $album ) . '
|
1277 |
+
</select>
|
1278 |
+
</div>
|
1279 |
+
<div>
|
1280 |
+
<label
|
1281 |
+
for="wmpsel_' . $id . '">' .
|
1282 |
+
__( 'Position', 'wp-photo-album-plus' ) . '
|
1283 |
+
</label><br>
|
1284 |
+
<select
|
1285 |
+
id="wmpsel_' . $id . '"
|
1286 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this.value)"
|
1287 |
+
>' .
|
1288 |
+
wppa_watermark_pos_select( 'user', $album ) . '
|
1289 |
+
</select>
|
1290 |
+
</div>
|
1291 |
+
<div>
|
1292 |
+
<label>
|
1293 |
+
|
1294 |
+
</label><br>
|
1295 |
+
<input
|
1296 |
+
type="button"
|
1297 |
+
class="button wppa-admin-button"
|
1298 |
+
value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"
|
1299 |
+
onclick="wppaTryWatermark( ' . $id . ', ' . $has_source . ', ' . $can_remove . ' )"
|
1300 |
+
/>
|
1301 |
+
<img
|
1302 |
+
id="wppa-water-spin-' . $id . '"
|
1303 |
+
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1304 |
+
alt="Spin"
|
1305 |
+
style="visibility:hidden"
|
1306 |
+
/>
|
1307 |
+
</div>' );
|
1308 |
+
}
|
1309 |
+
/*
|
1310 |
+
elseif ( basename( $wmfile ) != '--- none ---' ) {
|
1311 |
+
wppa_echo(
|
1312 |
+
__( 'Watermark:', 'wp-photo-album-plus' ) . ' ' .
|
1313 |
+
__( 'File:', 'wp-photo-album-plus' ) . ' ' . strip_tags( basename( $wmfile ) ) . ' ' .
|
1314 |
+
__( 'Pos:', 'wp-photo-album-plus' ) . ' ' . strip_tags( $wmpos ) );
|
1315 |
+
}
|
1316 |
+
*/
|
1317 |
+
}
|
1318 |
+
|
1319 |
+
// Schedule for delete
|
1320 |
+
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1321 |
+
if ( $may_change_delete ) {
|
1322 |
+
wppa_echo( '
|
1323 |
+
<div style="max-width: 500px;">
|
1324 |
+
<label
|
1325 |
+
for="scheduledel-' . $id . '">' .
|
1326 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1327 |
+
</label><br>
|
1328 |
+
<input
|
1329 |
+
type="checkbox"
|
1330 |
+
id="scheduledel-' . $id . '"' .
|
1331 |
+
( $scheduledel ? ' checked' : '' ) .
|
1332 |
+
( $may_change_delete ? '' : ' disabled' ) . '
|
1333 |
+
onchange="wppaTryScheduledel( ' . $id . ' )"
|
1334 |
+
/> ' .
|
1335 |
+
wppa_get_date_time_select_html( 'delphoto', $id, true ) . '
|
1336 |
+
</div>' );
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
|
1341 |
+
|
1342 |
+
// End Tab1 Section 2
|
1343 |
+
wppa_echo( '</div>' );
|
1344 |
+
|
1345 |
+
wppa_echo( '<span id="psdesc-' . $id . '" class="description" style="margin-left:12px;display:none">' .
|
1346 |
+
__( 'Note: Featured photos should have a descriptive name; a name a search engine will look for!', 'wp-photo-album-plus' ) . '
|
1347 |
+
</span>' );
|
1348 |
+
|
1349 |
+
|
1350 |
|
1351 |
wppa_echo( '
|
1352 |
<!-- Section 3, Actions -->
|
1479 |
}
|
1480 |
}
|
1481 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1482 |
// Delete
|
1483 |
if ( wppa_user_is( 'administrator' ) || wppa_get_photo_item( $id, 'owner' ) == wppa_get_user() ) {
|
1484 |
if ( ! wppa( 'front_edit' ) ) {
|
1550 |
</div>' );
|
1551 |
}
|
1552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1554 |
|
|
|
|
|
1555 |
|
1556 |
// Section 4
|
1557 |
wppa_echo( '
|
1558 |
<!-- Section 4 -->
|
1559 |
<table
|
1560 |
class="wppa-table wppa-photo-table"
|
1561 |
+
style="width:100%;margin-top:20px"
|
1562 |
>
|
1563 |
<tbody>' );
|
1564 |
|
1953 |
</tbody>
|
1954 |
</table>' );
|
1955 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1956 |
|
1957 |
+
wppa_echo( '
|
1958 |
+
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1959 |
|
|
|
|
|
|
|
|
|
|
|
1960 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1961 |
|
1962 |
+
// End Tab 1
|
1963 |
+
wppa_echo( '</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
1964 |
|
1965 |
+
// Tab 2 Files
|
1966 |
+
{
|
1967 |
+
wppa_echo( '
|
1968 |
+
<div
|
1969 |
+
id="photofiles-' . $id . '"
|
1970 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
1971 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
1972 |
+
>' );
|
|
|
|
|
1973 |
|
1974 |
+
{
|
1975 |
+
wppa_echo( '
|
1976 |
+
<div class="wppa-flex">' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1977 |
|
1978 |
+
// Pdf
|
1979 |
+
if ( wppa_is_pdf( $id ) ) {
|
1980 |
+
$sp = wppa_get_source_path( $id );
|
1981 |
+
$fs = wppa_get_filesize( $sp );
|
1982 |
+
wppa_echo( '
|
1983 |
+
<div>
|
1984 |
+
<label>' .
|
1985 |
+
__( 'Document file', 'wp-photo-album-plus' ) . '
|
1986 |
+
</label><br>
|
1987 |
+
<div class="wppa-ldi">' .
|
1988 |
+
$fs . '
|
1989 |
+
</div>
|
1990 |
+
</div>' );
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
// Source
|
1994 |
+
$sp = wppa_get_o1_source_path( $id );
|
1995 |
+
if ( ! wppa_is_file( $sp ) ) {
|
1996 |
+
$sp = wppa_get_source_path( $id );
|
1997 |
+
}
|
1998 |
+
if ( wppa_is_pdf( $id ) ) {
|
1999 |
+
$sp = wppa_strip_ext( $sp ) . '.jpg';
|
2000 |
+
if ( ! wppa_is_file( $sp ) ) {
|
2001 |
+
$sp = wppa_strip_ext( $sp ) . '.png';
|
2002 |
+
}
|
2003 |
+
}
|
2004 |
+
if ( is_file( $sp ) ) {
|
2005 |
+
$ima = getimagesize( $sp );
|
2006 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.' . $br;
|
2007 |
+
}
|
2008 |
+
else {
|
2009 |
+
$txt = __( 'Unavailable', 'wp-photo-album-plus' );
|
2010 |
+
}
|
2011 |
+
wppa_echo( '
|
2012 |
+
<div style="max-width:300px">
|
2013 |
+
<label>' .
|
2014 |
+
__( 'Source file', 'wp-photo-album-plus' ) . '
|
2015 |
+
</label><br>
|
2016 |
+
<div class="wppa-ldi">' .
|
2017 |
+
$txt . '
|
2018 |
+
</div>
|
2019 |
+
</div>' );
|
2020 |
+
|
2021 |
+
// Display
|
2022 |
+
if ( $is_video || $has_audio ) {
|
2023 |
+
$lbl = __( 'Poster file', 'wp-photo-album-plus' );
|
2024 |
+
}
|
2025 |
+
else {
|
2026 |
+
$lbl = __( 'Display file', 'wp-photo-album-plus' );
|
2027 |
+
}
|
2028 |
+
$dp = wppa_get_photo_path( $id );
|
2029 |
+
if ( is_file( $dp ) ) {
|
2030 |
+
$txt = '
|
2031 |
+
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
2032 |
+
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
2033 |
+
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
2034 |
+
}
|
2035 |
+
else {
|
2036 |
+
$txt = '
|
2037 |
+
<span style="color:red">' .
|
2038 |
+
__( 'Unavailable', 'wp-photo-album-plus' ) . '
|
2039 |
+
</span>';
|
2040 |
+
}
|
2041 |
+
wppa_echo( '
|
2042 |
+
<div style="max-width:300px">
|
2043 |
+
<label>' .
|
2044 |
+
$lbl . '
|
2045 |
+
</label><br>
|
2046 |
+
<div class="wppa-ldi">' .
|
2047 |
+
$txt . '
|
2048 |
+
</div>
|
2049 |
+
</div>' );
|
2050 |
+
|
2051 |
+
// Thumbnail
|
2052 |
+
if ( ! $is_video ) {
|
2053 |
+
$lbl = __( 'Thumbnail file', 'wp-photo-album-plus' );
|
2054 |
+
$tp = wppa_get_thumb_path( $id );
|
2055 |
+
if ( is_file( $tp ) ) {
|
2056 |
+
$txt = '
|
2057 |
+
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
2058 |
+
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
2059 |
+
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
2060 |
+
|
2061 |
+
<input
|
2062 |
+
type="checkbox"' .
|
2063 |
+
( $thumblock ? ' checked' : '' ) . '
|
2064 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
2065 |
+
__( 'Locked', 'wp-photo-album-plus' );
|
2066 |
+
}
|
2067 |
+
else {
|
2068 |
+
$txt = '
|
2069 |
+
<span style="color:red">' .
|
2070 |
+
__( 'Unavailable', 'wp-photo-album-plus' ) . '.
|
2071 |
+
</span>';
|
2072 |
+
}
|
2073 |
+
wppa_echo( '
|
2074 |
+
<div style="max-width:300px">
|
2075 |
+
<label>' .
|
2076 |
+
$lbl . '
|
2077 |
+
</label><br>
|
2078 |
+
<div class="wppa-ldi">' .
|
2079 |
+
$txt . '
|
2080 |
+
</div>
|
2081 |
+
</div>' );
|
2082 |
+
}
|
2083 |
+
|
2084 |
+
// Local CDN
|
2085 |
+
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
2086 |
+
$lbl = __( 'Local CDN files', 'wp-photo-album-plus' );
|
2087 |
+
$txt = '<span id="cdnfiles-' . $id . '">';
|
2088 |
+
|
2089 |
+
$files = wppa_cdn_files( $id );
|
2090 |
+
if ( !empty( $files ) ) {
|
2091 |
+
foreach( $files as $file ) {
|
2092 |
+
if ( basename( $file ) != 'index.php' ) {
|
2093 |
+
$t = explode( '.', basename( $file ) );
|
2094 |
+
$t = explode( '-', $t[0] );
|
2095 |
+
$x = $t[0];
|
2096 |
+
$y = $t[1];
|
2097 |
+
$size = filesize( $file );
|
2098 |
+
$txt .= '
|
2099 |
+
<a
|
2100 |
+
href="' . wppa_cdn_url( $id, $x, $y ) . '"
|
2101 |
+
target="_blank"
|
2102 |
+
>' .
|
2103 |
+
basename( $file ) .
|
2104 |
+
'</a> ' .
|
2105 |
+
sprintf( '%4.2fkB', $size / 1024 ) . '<br>';
|
2106 |
+
}
|
2107 |
+
}
|
2108 |
+
}
|
2109 |
+
else {
|
2110 |
+
$txt .= __( 'None', 'wp-photo-album-plus' );
|
2111 |
+
}
|
2112 |
+
$txt .= '</span>';
|
2113 |
+
wppa_echo( '
|
2114 |
+
<div>
|
2115 |
+
<label>' .
|
2116 |
+
$lbl . '
|
2117 |
+
</label><br>
|
2118 |
+
<div class="wppa-ldi">' .
|
2119 |
+
$txt . '
|
2120 |
+
</div>
|
2121 |
+
</div>' );
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
// Video
|
2125 |
+
if ( $b_is_video ) {
|
2126 |
+
|
2127 |
+
// Width
|
2128 |
+
wppa_echo( '
|
2129 |
+
<div>
|
2130 |
+
<label>' .
|
2131 |
+
__( 'Video width', 'wp-photo-album-plus' ) . '
|
2132 |
+
</label><br>
|
2133 |
+
<input
|
2134 |
+
type="text"
|
2135 |
+
style="width:50px;margin:0 4px"
|
2136 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
2137 |
+
value="' . esc_attr( $videox ) . '"
|
2138 |
+
/>px
|
2139 |
+
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
2140 |
+
</div>' );
|
2141 |
+
|
2142 |
+
// Height
|
2143 |
+
wppa_echo( '
|
2144 |
+
<div>
|
2145 |
+
<label>' .
|
2146 |
+
__( 'Video height', 'wp-photo-album-plus' ) . '
|
2147 |
+
</label><br>
|
2148 |
+
<input
|
2149 |
+
type="text"
|
2150 |
+
style="width:50px;margin:0 4px"
|
2151 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
2152 |
+
value="' . esc_attr( $videoy ) . '"
|
2153 |
+
/>px
|
2154 |
+
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) . '
|
2155 |
+
</div>' );
|
2156 |
+
|
2157 |
+
// Duratiuon
|
2158 |
+
if ( $duration ) {
|
2159 |
+
$lbl = __( 'Duration', 'wp-photo-album-plus' );
|
2160 |
+
$duration = intval( $duration * 100 ) / 100;
|
2161 |
+
if ( $duration < 120.0 ) {
|
2162 |
+
$txt = sprintf( __( '%s seconds', 'wp-photo-album-plus' ) ,$duration );
|
2163 |
}
|
2164 |
+
else {
|
2165 |
+
$txt = sprintf( __( '%s minutes and %s seconds', 'wp-photo-album-plus' ),
|
2166 |
+
sprintf( '%d', floor( $duration / 60 ) ),
|
2167 |
+
sprintf( '%4.2f', $duration % 60 ) );
|
2168 |
+
}
|
2169 |
+
wppa_echo( '
|
2170 |
+
<div>
|
2171 |
+
<label>' .
|
2172 |
+
$lbl . '
|
2173 |
+
</label><br>
|
2174 |
+
<div class="wppa-ldi">' .
|
2175 |
+
$txt . '
|
2176 |
+
</div>
|
2177 |
+
</div>' );
|
2178 |
+
}
|
2179 |
+
|
2180 |
+
// Formats
|
2181 |
+
$txt = '';
|
2182 |
+
foreach ( $is_video as $fmt ) {
|
2183 |
+
$txt .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
2184 |
+
}
|
2185 |
+
wppa_echo( '
|
2186 |
+
<div>
|
2187 |
+
<label>' .
|
2188 |
+
__( 'Formats', 'wp-photo-album-plus' ) . '
|
2189 |
+
</label><br>
|
2190 |
+
<div class="wppa-ldi">' .
|
2191 |
+
$txt . '
|
2192 |
+
</div>
|
2193 |
+
</div>' );
|
2194 |
+
}
|
2195 |
+
|
2196 |
+
// Audio
|
2197 |
+
if ( $b_has_audio ) {
|
2198 |
+
$txt = '';
|
2199 |
+
foreach ( $has_audio as $fmt ) {
|
2200 |
+
$txt .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
2201 |
+
}
|
2202 |
+
wppa_echo( '
|
2203 |
+
<div>
|
2204 |
+
<label>' .
|
2205 |
+
__( 'Formats', 'wp-photo-album-plus' ) . '
|
2206 |
+
</label><br>
|
2207 |
+
<div class="wppa-ldi">' .
|
2208 |
+
$txt . '
|
2209 |
+
</div>
|
2210 |
+
</div>' );
|
2211 |
+
}
|
2212 |
+
|
2213 |
+
// End flex div
|
2214 |
+
wppa_echo( '</div>' );
|
2215 |
+
|
2216 |
+
wppa_echo( '<div class="wppa-flex">' );
|
2217 |
+
|
2218 |
+
// Remake displayfiles
|
2219 |
+
if ( ! $is_video ) {
|
2220 |
+
wppa_echo( '
|
2221 |
+
<div>
|
2222 |
+
<label>
|
2223 |
+
|
2224 |
+
</label><br>
|
2225 |
+
<input
|
2226 |
+
type="button"
|
2227 |
+
class="wppa-admin-button button"
|
2228 |
+
title="' . esc_attr( __( 'Remake display file and thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2229 |
+
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
2230 |
+
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
2231 |
+
/>
|
2232 |
+
</div>' );
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
// Remake thumbnail
|
2236 |
+
if ( ! $is_video ) {
|
2237 |
+
wppa_echo( '
|
2238 |
+
<div style="max-width:500px;">
|
2239 |
+
<label>
|
2240 |
+
|
2241 |
+
</label><br>
|
2242 |
+
<input
|
2243 |
+
type="button"
|
2244 |
+
class="wppa-admin-button button"
|
2245 |
+
title="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2246 |
+
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
2247 |
+
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2248 |
+
/>
|
2249 |
+
</div>' );
|
2250 |
+
}
|
2251 |
+
|
2252 |
+
// End flex div
|
2253 |
+
wppa_echo( '</div>' );
|
2254 |
+
|
2255 |
+
// End Tab 2
|
2256 |
+
wppa_echo( '</div>' );
|
2257 |
+
}
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
// Tab 3 ImageMagick
|
2261 |
+
if ( wppa_can_admin_magick( $id ) && ! $quick ) {
|
2262 |
+
wppa_echo( '
|
2263 |
+
<div
|
2264 |
+
id="photomagic-' . $id . '"
|
2265 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2266 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
2267 |
+
>' );
|
2268 |
+
|
2269 |
+
{
|
2270 |
+
|
2271 |
+
// Explanation
|
2272 |
+
wppa_echo( '
|
2273 |
+
<h2 class="description" style="margin:1em">' .
|
2274 |
+
__( 'The operations are executed upon the display file.', 'wp-photo-album-plus' ) . ' ' .
|
2275 |
+
__( 'A new thumbnail image will be created from the display file.', 'wp-photo-album-plus' ) . '
|
2276 |
+
</h2>' );
|
2277 |
+
|
2278 |
+
// --- Actions ---
|
2279 |
+
wppa_echo( '
|
2280 |
+
<div class="wppa-flex">' );
|
2281 |
+
|
2282 |
+
{
|
2283 |
+
// Rotate left
|
2284 |
+
wppa_echo( '
|
2285 |
+
<input
|
2286 |
+
type="button"
|
2287 |
+
class="wppa-admin-button button"
|
2288 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
2289 |
+
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
2290 |
+
/>' );
|
2291 |
+
|
2292 |
+
// Rotat 180
|
2293 |
+
wppa_echo( '
|
2294 |
+
<input
|
2295 |
+
type="button"
|
2296 |
+
class="wppa-admin-button button"
|
2297 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
2298 |
+
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
2299 |
+
/>' );
|
2300 |
+
|
2301 |
+
// Rotate right
|
2302 |
+
wppa_echo( '
|
2303 |
+
<input
|
2304 |
+
type="button"
|
2305 |
+
class="wppa-admin-button button"
|
2306 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
2307 |
+
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
2308 |
+
/>' );
|
2309 |
+
|
2310 |
+
// Flip
|
2311 |
+
wppa_echo( '
|
2312 |
+
<input
|
2313 |
+
type="button"
|
2314 |
+
class="wppa-admin-button button"
|
2315 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
2316 |
+
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
2317 |
+
title="-flip"
|
2318 |
+
/>' );
|
2319 |
+
|
2320 |
+
// Flop
|
2321 |
+
wppa_echo( '
|
2322 |
+
<input
|
2323 |
+
type="button"
|
2324 |
+
class="wppa-admin-button button"
|
2325 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
2326 |
+
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
2327 |
+
title="-flop"
|
2328 |
+
/>' );
|
2329 |
+
|
2330 |
+
// Enhance
|
2331 |
+
wppa_echo( '
|
2332 |
+
<input
|
2333 |
+
type="button"
|
2334 |
+
class="wppa-admin-button button"
|
2335 |
+
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
2336 |
+
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
2337 |
+
title="-enhance"
|
2338 |
+
/>' );
|
2339 |
+
|
2340 |
+
// Sharpen
|
2341 |
+
wppa_echo( '
|
2342 |
+
<input
|
2343 |
+
type="button"
|
2344 |
+
class="wppa-admin-button button"
|
2345 |
+
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
2346 |
+
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
2347 |
+
title="-sharpen 0x1"
|
2348 |
+
/>' );
|
2349 |
+
|
2350 |
+
// Blur
|
2351 |
+
wppa_echo( '
|
2352 |
+
<input
|
2353 |
+
type="button"
|
2354 |
+
class="wppa-admin-button button"
|
2355 |
+
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
2356 |
+
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
2357 |
+
title="-blur 0x1"
|
2358 |
+
/>' );
|
2359 |
+
|
2360 |
+
// Auto gamma
|
2361 |
+
wppa_echo( '
|
2362 |
+
<input
|
2363 |
+
type="button"
|
2364 |
+
class="wppa-admin-button button"
|
2365 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
2366 |
+
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
2367 |
+
title="-auto-gamma"
|
2368 |
+
/>' );
|
2369 |
+
|
2370 |
+
// Auto level
|
2371 |
+
wppa_echo( '
|
2372 |
+
<input
|
2373 |
+
type="button"
|
2374 |
+
class="wppa-admin-button button"
|
2375 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
2376 |
+
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
2377 |
+
title="-auto-level"
|
2378 |
+
/>' );
|
2379 |
+
|
2380 |
+
// Contrast+
|
2381 |
+
wppa_echo( '
|
2382 |
+
<input
|
2383 |
+
type="button"
|
2384 |
+
class="wppa-admin-button button"
|
2385 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
2386 |
+
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
2387 |
+
title="-brightness-contrast 0x5"
|
2388 |
+
/>' );
|
2389 |
+
|
2390 |
+
// Contrast-
|
2391 |
+
wppa_echo( '
|
2392 |
+
<input
|
2393 |
+
type="button"
|
2394 |
+
class="wppa-admin-button button"
|
2395 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
2396 |
+
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
2397 |
+
title="-brightness-contrast 0x-5"
|
2398 |
+
/>' );
|
2399 |
+
|
2400 |
+
// Brightness+
|
2401 |
+
wppa_echo( '
|
2402 |
+
<input
|
2403 |
+
type="button"
|
2404 |
+
class="wppa-admin-button button"
|
2405 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
2406 |
+
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
2407 |
+
title="-brightness-contrast 5"
|
2408 |
+
/>' );
|
2409 |
+
|
2410 |
+
// Brightness-
|
2411 |
+
wppa_echo( '
|
2412 |
+
<input
|
2413 |
+
type="button"
|
2414 |
+
class="wppa-admin-button button"
|
2415 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
2416 |
+
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
2417 |
+
title="-brightness-contrast -5"
|
2418 |
+
/>' );
|
2419 |
+
|
2420 |
+
// Despeckle
|
2421 |
+
wppa_echo( '
|
2422 |
+
<input
|
2423 |
+
type="button"
|
2424 |
+
class="wppa-admin-button button"
|
2425 |
+
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
2426 |
+
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
2427 |
+
title="-despeckle"
|
2428 |
+
/>' );
|
2429 |
+
|
2430 |
+
// Lenear gray
|
2431 |
+
wppa_echo( '
|
2432 |
+
<input
|
2433 |
+
type="button"
|
2434 |
+
class="wppa-admin-button button"
|
2435 |
+
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
2436 |
+
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
2437 |
+
title="-colorspace gray"
|
2438 |
+
/>' );
|
2439 |
+
|
2440 |
+
// Non-linear gray
|
2441 |
+
wppa_echo( '
|
2442 |
+
<input
|
2443 |
+
type="button"
|
2444 |
+
class="wppa-admin-button button"
|
2445 |
+
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
2446 |
+
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
2447 |
+
title="-grayscale Rec709Luma"
|
2448 |
+
/>' );
|
2449 |
+
|
2450 |
+
// Charcoal
|
2451 |
+
wppa_echo( '
|
2452 |
+
<input
|
2453 |
+
type="button"
|
2454 |
+
class="wppa-admin-button button"
|
2455 |
+
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
2456 |
+
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
2457 |
+
title="-charcoal"
|
2458 |
+
/>' );
|
2459 |
+
|
2460 |
+
// Paint
|
2461 |
+
wppa_echo( '
|
2462 |
+
<input
|
2463 |
+
type="button"
|
2464 |
+
class="wppa-admin-button button"
|
2465 |
+
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
2466 |
+
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
2467 |
+
title="-paint"
|
2468 |
+
/>' );
|
2469 |
+
|
2470 |
+
// Sepia
|
2471 |
+
wppa_echo( '
|
2472 |
+
<input
|
2473 |
+
type="button"
|
2474 |
+
class="wppa-admin-button button"
|
2475 |
+
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
2476 |
+
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
2477 |
+
title="-sepia-tone 80%"
|
2478 |
+
/>' );
|
2479 |
+
|
2480 |
+
// Show/hide wppa-horizon
|
2481 |
+
wppa_echo( '
|
2482 |
+
<input
|
2483 |
+
type="button"
|
2484 |
+
class="wppa-admin-button button"
|
2485 |
+
onclick="wppaToggleHorizon()"
|
2486 |
+
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
2487 |
+
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
2488 |
+
/>' );
|
2489 |
+
|
2490 |
+
// Anticlock 0.5 deg
|
2491 |
+
wppa_echo( '
|
2492 |
+
<input
|
2493 |
+
type="button"
|
2494 |
+
class="wppa-admin-button button"
|
2495 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
2496 |
+
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
2497 |
+
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
2498 |
+
/>' );
|
2499 |
+
|
2500 |
+
// Clockwise 0.5 deg
|
2501 |
+
wppa_echo( '
|
2502 |
+
<input
|
2503 |
+
type="button"
|
2504 |
+
class="wppa-admin-button button"
|
2505 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
2506 |
+
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
2507 |
+
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
2508 |
+
/>' );
|
2509 |
+
|
2510 |
+
// Crop
|
2511 |
+
wppa_echo( '
|
2512 |
+
<input
|
2513 |
+
type="button"
|
2514 |
+
class="wppa-admin-button button"
|
2515 |
+
id="button-' . $id . '"
|
2516 |
+
value="Crop"
|
2517 |
+
title=""
|
2518 |
+
/>' );
|
2519 |
+
|
2520 |
+
// Set cropbox aspect ratio
|
2521 |
+
$ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
|
2522 |
+
$dflt = wppa_opt( 'image_magick_ratio' );
|
2523 |
+
|
2524 |
+
wppa_echo( '
|
2525 |
+
<select
|
2526 |
+
onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
|
2527 |
+
title="' . __( 'Aspect ratio of cropped image', 'wp-photo-album-plus' ) . '"
|
2528 |
+
>
|
2529 |
+
<option value="NaN"' . ( $dflt == 'NaN' ? ' selected' : '' ) . '>' . __( 'free', 'wp-photo-album-plus' ) . '</option>
|
2530 |
+
<option value="' . $ratio . '"' . ( $dflt == 'ratio' ? ' selected' : '' ) . '>' . __( 'original', 'wp-photo-album-plus' ) . '</option>
|
2531 |
+
<option value="1"' . ( $dflt == '1' ? ' selected' : '' ) . '>' . __( 'square', 'wp-photo-album-plus' ) . '</option>
|
2532 |
+
<option value="1.25"' . ( $dflt == '1.25' ? ' selected' : '' ) . '>4:5 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2533 |
+
<option value="1.33333"' . ( $dflt == '1.33333' ? ' selected' : '' ) . '>3:4 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2534 |
+
<option value="1.5"' . ( $dflt == '1.5' ? ' selected' : '' ) . '>2:3 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2535 |
+
<option value="1.6"' . ( $dflt == '1.6' ? ' selected' : '' ) . '>5:8 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2536 |
+
<option value="1.77777"' . ( $dflt == '1.77777' ? ' selected' : '' ) . '>9:16 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2537 |
+
<option value="2"' . ( $dflt == '2' ? ' selected' : '' ) . '>1:2 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2538 |
+
<option value="0.8"' . ( $dflt == '0.8' ? ' selected' : '' ) . '>4:5 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2539 |
+
<option value="0.75"' . ( $dflt == '0.75' ? ' selected' : '' ) . '>3:4 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2540 |
+
<option value="0.66667"' . ( $dflt == '0.66667' ? ' selected' : '' ) . '>2:3 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2541 |
+
<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2542 |
+
<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2543 |
+
<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2544 |
+
</select>' . $br );
|
2545 |
+
|
2546 |
+
if ( $dflt == 'ratio' ) {
|
2547 |
+
$value = $ratio;
|
2548 |
+
}
|
2549 |
+
elseif ( $dflt == 'free' ) {
|
2550 |
+
$value = '';
|
2551 |
+
}
|
2552 |
+
else {
|
2553 |
+
$value = $dflt;
|
2554 |
+
}
|
2555 |
+
|
2556 |
+
// $the_js = 'jQuery(document).ready(function(){wppaCropper[' . $id . '].setAspectRatio(' . $value . ');});';
|
2557 |
+
// wppa_add_inline_script( 'wppa-admin', $the_js );
|
2558 |
+
}
|
2559 |
+
|
2560 |
+
// End flex div
|
2561 |
+
wppa_echo( '</div>' );
|
2562 |
+
|
2563 |
+
// Command stack
|
2564 |
+
wppa_echo( '
|
2565 |
+
<h2 class="description" style="margin:1em">' .
|
2566 |
+
__( '<b>ImageMagick</b> command stack', 'wp-photo-album-plus' ) . ':
|
2567 |
+
<span
|
2568 |
+
id="magickstack-' . strval( intval( $id ) ). '"
|
2569 |
+
style="color:blue"
|
2570 |
+
>' .
|
2571 |
+
sanitize_text_field( $magickstack ) . '
|
2572 |
+
</span>
|
2573 |
+
<input
|
2574 |
+
type="button"
|
2575 |
+
class="wppa-admin-button button"
|
2576 |
+
id="imstackbutton-' . strval( intval( $id ) ) . '"
|
2577 |
+
onclick="wppaTryMagick( ' . strval( intval( $id ) ) . ', \'magickundo\' )"
|
2578 |
+
value="' . esc_attr( __( 'Undo', 'wp-photo-album-plus' ) ) . '"
|
2579 |
+
title="' . esc_attr( __( 'Undo last Magick command', 'wp-photo-album-plus' ) ) . '"
|
2580 |
+
style="margin-left:4px;' . ( $magickstack ? 'display:inline;' : 'display:none;' ) . '"
|
2581 |
+
/>
|
2582 |
+
</h2>' );
|
2583 |
+
|
2584 |
+
// Cropper container
|
2585 |
+
// Fake 'for social media' to use the local file here, not cloudinary. Files from cloudinary do not reload, even with ?ver=...
|
2586 |
+
wppa( 'for_sm', true );
|
2587 |
+
wppa_echo( '
|
2588 |
+
<div
|
2589 |
+
class="wppa-cropper-container-wrapper">
|
2590 |
+
<img
|
2591 |
+
id="fs-img-' . $id . '"
|
2592 |
+
src="' . esc_url( wppa_get_photo_url( $id ) ) . '"
|
2593 |
+
style="float:left;max-width:100%"
|
2594 |
+
/>
|
2595 |
+
</div>' );
|
2596 |
+
|
2597 |
+
// Reset switch
|
2598 |
+
wppa( 'for_sm', false );
|
2599 |
+
}
|
2600 |
+
|
2601 |
+
// End Tab 3
|
2602 |
+
wppa_echo( '</div>' );
|
2603 |
+
}
|
2604 |
+
|
2605 |
+
|
2606 |
+
|
2607 |
+
|
2608 |
+
// Tab 5 Photo IPTC
|
2609 |
+
if ( ! $quick && ! empty( $iptcs ) ) {
|
2610 |
+
|
2611 |
+
wppa_echo( '
|
2612 |
+
<div
|
2613 |
+
id="photoiptc-' . $id . '"
|
2614 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2615 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
2616 |
+
>' );
|
2617 |
+
|
2618 |
+
wppa_echo( '
|
2619 |
+
<table
|
2620 |
+
id="wppa-iptc-' . $id . '"
|
2621 |
+
class="wppa-table wppa-photo-table"
|
2622 |
+
style="clear:both;width:99%;"
|
2623 |
+
>
|
2624 |
+
<thead>
|
2625 |
+
<tr style="font-weight:bold">
|
2626 |
+
<td style="padding:0 4px">' . __( 'IPTC tag', 'wp-photo-album-plus' ) . '</td>
|
2627 |
+
<td style="padding:0 4px">' . __( 'Description', 'wp-photo-album-plus' ) . '</td>
|
2628 |
+
<td style="padding:0 4px">' . __( 'Value', 'wp-photo-album-plus' ) . '</td>
|
2629 |
+
</tr>
|
2630 |
+
</thead>
|
2631 |
+
<tbody>' );
|
2632 |
+
|
2633 |
+
foreach ( $iptcs as $iptc ) {
|
2634 |
+
wppa_echo( '
|
2635 |
+
<tr id="iptc-tr-' . $iptc['id'] . '">
|
2636 |
+
<td style="padding:0 4px">' . $iptc['tag'] . '</td>
|
2637 |
+
<td style="padding:0 4px">' . esc_html( wppa_iptc_tagname( $iptc['tag'] ) ) . ':</td>
|
2638 |
+
<td style="padding:0 4px">
|
2639 |
+
<input
|
2640 |
+
type="text"
|
2641 |
+
style="width:500px"
|
2642 |
+
value="' . esc_attr( $iptc['description'] ) . '"
|
2643 |
+
onchange="wppaAjaxUpdateIptc(\'' . $id . '\', \'' . $iptc['id'] . '\', this.value, \'' . $iptc['tag'] . '\')"
|
2644 |
+
/>
|
2645 |
+
</td>
|
2646 |
+
</tr>' );
|
2647 |
+
}
|
2648 |
|
2649 |
wppa_echo( '
|
2650 |
</tbody>
|
2651 |
</table>' );
|
2652 |
+
wppa_echo( '</div>' ); // End tab 5 IPTC
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
// Tab 4 Photo EXIF
|
2656 |
+
if ( ! $quick && ! empty( $exifs ) ) {
|
2657 |
+
|
2658 |
+
wppa_echo( '
|
2659 |
+
<div
|
2660 |
+
id="photoexif-' . $id . '"
|
2661 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2662 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
2663 |
+
>' );
|
2664 |
+
|
2665 |
+
$brand = wppa_get_camera_brand( $id );
|
2666 |
+
wppa_echo( '
|
2667 |
+
<table
|
2668 |
+
id="wppa-exif-' . $id . '"
|
2669 |
+
class="wppa-table wppa-photo-table"
|
2670 |
+
style="clear:both;width:99%;"
|
2671 |
+
>
|
2672 |
+
<thead>
|
2673 |
+
<tr style="font-weight:bold">
|
2674 |
+
<td style="padding:0 4px">' . __( 'Exif tag', 'wp-photo-album-plus' ) . '</td>
|
2675 |
+
<td style="padding:0 4px">' . __( 'Brand', 'wp-photo-album-plus' ) . '</td>
|
2676 |
+
<td style="padding:0 4px">' . __( 'Description', 'wp-photo-album-plus' ) . '</td>
|
2677 |
+
<td style="padding:0 4px">' . __( 'Raw value', 'wp-photo-album-plus' ) . '</td>
|
2678 |
+
<td style="padding:0 4px">' . __( 'Formatted value', 'wp-photo-album-plus' ) . '</td>
|
2679 |
+
</tr>
|
2680 |
+
</thead>
|
2681 |
+
<tbody>' );
|
2682 |
+
|
2683 |
+
foreach ( $exifs as $exif ) {
|
2684 |
+
$desc = $exif['description'];
|
2685 |
+
if ( is_serialized( $desc ) ) {
|
2686 |
+
$desc = 'Array(' . count( wppa_unserialize( $desc ) ) . ')';
|
2687 |
+
}
|
2688 |
+
wppa_echo( '
|
2689 |
+
<tr id="exif-tr-' . $exif['id'] . '">
|
2690 |
+
<td style="padding:0 4px">'.$exif['tag'].'</td>' );
|
2691 |
+
|
2692 |
+
if ( $brand && $exif['brand'] ) {
|
2693 |
+
wppa_echo( '
|
2694 |
+
<td style="padding:0 4px">' . $brand . '</td>
|
2695 |
+
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'], $brand, 'brandonly' ) . ':</td>' );
|
2696 |
+
}
|
2697 |
+
else {
|
2698 |
+
wppa_echo( '
|
2699 |
+
<td style="padding:0 4px"></td>
|
2700 |
+
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'] ) . ':</td>' );
|
2701 |
+
}
|
2702 |
+
|
2703 |
+
$raw_value = wp_kses( $desc, 'post' );
|
2704 |
+
if ( strlen( $raw_value ) > 50 ) {
|
2705 |
+
$raw_value = substr( $raw_value, 0, 47 ) . '...';
|
2706 |
+
}
|
2707 |
+
$formatted_value = wp_kses( wppa_format_exif( $exif['tag'], $exif['description'], $brand ), 'post' );
|
2708 |
+
if ( strlen( $formatted_value ) > 50 ) {
|
2709 |
+
$formatted_value = substr( $formatted_value, 0, 47 ) . '...';
|
2710 |
+
}
|
2711 |
+
wppa_echo( '
|
2712 |
+
<td style="padding:0 4px">' . $raw_value . '</td>
|
2713 |
+
<td style="padding:0 4px">' . $formatted_value . '</td>
|
2714 |
+
</tr>' );
|
2715 |
+
}
|
2716 |
+
|
2717 |
+
wppa_echo( '
|
2718 |
+
</tbody>
|
2719 |
+
</table><div style="clear:both"></div>' );
|
2720 |
+
wppa_echo( '</div>' );
|
2721 |
}
|
2722 |
|
|
|
2723 |
|
2724 |
// Comments
|
2725 |
+
if ( ! $quick && ! empty( $comments ) ) {
|
2726 |
+
|
2727 |
+
wppa_echo( '
|
2728 |
+
<div
|
2729 |
+
id="photocomment-' . $id . '"
|
2730 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2731 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
2732 |
+
>' );
|
2733 |
+
|
2734 |
wppa_echo( '
|
2735 |
<table
|
2736 |
class="wppa-table wppa-photo-table"
|
2786 |
|
2787 |
wppa_echo( '
|
2788 |
</tbody>
|
2789 |
+
</table>
|
2790 |
+
<div class="clear"></div>
|
2791 |
+
</div>' );
|
2792 |
}
|
2793 |
+
// }
|
2794 |
|
2795 |
wppa_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$id.');' );
|
2796 |
|
2797 |
wppa_echo( '
|
2798 |
+
<div class="clear"></div>
|
2799 |
</div>
|
2800 |
+
<div class="clear" style="margin-top:7px"></div>' );
|
2801 |
}
|
2802 |
/* End the actual display area for the photo settings */
|
2803 |
+
wppa_echo( '</details>');
|
2804 |
} /* foreach photo */
|
2805 |
|
2806 |
wppa_admin_page_links( $page, $pagesize, $count, $link );
|
wppa-scripts.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
-
* Version 8.2.
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
@@ -474,7 +474,7 @@ global $wpdb;
|
|
474 |
wppaTextAdminOnly = "' . __( 'Show to admin only?', 'wp-photo-album-plus' ) . '",
|
475 |
wppaTextUpload = "' . __( 'WPPA+ upload', 'wp-photo-album-plus' ) . '",
|
476 |
wppaTextPotd = "' . __( 'WPPA+ Potd', 'wp-photo-album-plus' ) . '",
|
477 |
-
wppaTextPhotoOfTheDay = "' . __( 'WPPA Photo of the day','wp-photo-album-plus' ) . '"
|
478 |
|
479 |
// Tinymce photo
|
480 |
if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
|
@@ -487,7 +487,7 @@ global $wpdb;
|
|
487 |
// Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
|
488 |
wppa( 'in_widget', true );
|
489 |
|
490 |
-
$result .= '
|
491 |
wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
|
492 |
wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";';
|
493 |
|
@@ -504,9 +504,14 @@ global $wpdb;
|
|
504 |
}
|
505 |
|
506 |
// Format
|
507 |
-
$result = wppa_compress_js( $result );
|
508 |
-
|
509 |
-
wp_add_inline_script('wppa-admin', $result);
|
|
|
|
|
|
|
|
|
|
|
510 |
|
511 |
}
|
512 |
add_action( 'wp_head', 'wppa_initialize_javascript', 2 );
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
+
* Version 8.2.03.002
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
474 |
wppaTextAdminOnly = "' . __( 'Show to admin only?', 'wp-photo-album-plus' ) . '",
|
475 |
wppaTextUpload = "' . __( 'WPPA+ upload', 'wp-photo-album-plus' ) . '",
|
476 |
wppaTextPotd = "' . __( 'WPPA+ Potd', 'wp-photo-album-plus' ) . '",
|
477 |
+
wppaTextPhotoOfTheDay = "' . __( 'WPPA Photo of the day','wp-photo-album-plus' ) . '";';
|
478 |
|
479 |
// Tinymce photo
|
480 |
if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
|
487 |
// Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
|
488 |
wppa( 'in_widget', true );
|
489 |
|
490 |
+
$result .= 'var
|
491 |
wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
|
492 |
wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";';
|
493 |
|
504 |
}
|
505 |
|
506 |
// Format
|
507 |
+
// $result = wppa_compress_js( $result );
|
508 |
+
// if ( is_admin() ) {
|
509 |
+
// if ( wp_add_inline_script( 'wppa-admin', $result ) ) return;
|
510 |
+
// }
|
511 |
+
|
512 |
+
// if ( wp_add_inline_script( 'jquery-core', $result ) ) return;
|
513 |
+
|
514 |
+
echo( '<script>' . $result . '</script>' );
|
515 |
|
516 |
}
|
517 |
add_action( 'wp_head', 'wppa_initialize_javascript', 2 );
|
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.2.03.
|
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.2.03.
|
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.2.03.002
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
+
$wppa_api_version = '8.2.03.002'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|