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.004 |
Comparing to | |
See all releases |
Code changes from version 8.2.02.010 to 8.2.03.004
- js/wppa-admin-scripts.js +14 -5
- js/wppa-admin-scripts.min.js +1 -1
- readme.txt +1 -1
- wppa-admin-styles.css +33 -1
- wppa-admin.php +4 -3
- wppa-ajax.php +4 -2
- wppa-album-admin-autosave.php +952 -769
- wppa-album-covers.php +2 -2
- wppa-cache.php +1 -1
- wppa-filter.php +2 -1
- wppa-functions.php +8 -20
- wppa-init.php +2 -2
- wppa-maintenance.php +2 -2
- wppa-photo-admin-autosave.php +2129 -1647
- wppa-scripts.php +2 -2
- wppa-settings-autosave.php +30 -30
- wppa-utils.php +3 -3
- 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.
|
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 {
|
@@ -918,9 +923,11 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
|
|
918 |
if ( actionslug == 'cover_linktype' ) {
|
919 |
if ( value == 'manual' ) {
|
920 |
jQuery( '#link-url-tr' ).show();
|
|
|
921 |
}
|
922 |
else {
|
923 |
jQuery( '#link-url-tr' ).hide();
|
|
|
924 |
}
|
925 |
}
|
926 |
|
@@ -950,6 +957,7 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
|
|
950 |
// Update monitor
|
951 |
wppaAjaxUpdateAlbumMonitor( isTmce ); // Check for more to do
|
952 |
|
|
|
953 |
},
|
954 |
error: function( xhr, status, error ) {
|
955 |
|
@@ -1139,7 +1147,9 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
|
|
1139 |
|
1140 |
// Check for recoverable error
|
1141 |
if ( resparr[0].length > 10 ) {
|
1142 |
-
|
|
|
|
|
1143 |
error = true;
|
1144 |
}
|
1145 |
|
@@ -1385,10 +1395,9 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
|
|
1385 |
|
1386 |
function wppaEncode(xtext) {
|
1387 |
|
1388 |
-
|
1389 |
|
1390 |
-
|
1391 |
-
if (typeof(xtext)=='number') return xtext;
|
1392 |
|
1393 |
text = xtext;
|
1394 |
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 {
|
923 |
if ( actionslug == 'cover_linktype' ) {
|
924 |
if ( value == 'manual' ) {
|
925 |
jQuery( '#link-url-tr' ).show();
|
926 |
+
jQuery( '#-link-url-tr' ).hide();
|
927 |
}
|
928 |
else {
|
929 |
jQuery( '#link-url-tr' ).hide();
|
930 |
+
jQuery( '#-link-url-tr' ).show();
|
931 |
}
|
932 |
}
|
933 |
|
957 |
// Update monitor
|
958 |
wppaAjaxUpdateAlbumMonitor( isTmce ); // Check for more to do
|
959 |
|
960 |
+
|
961 |
},
|
962 |
error: function( xhr, status, error ) {
|
963 |
|
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()),"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)});
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
|
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.5
|
8 |
-
Stable tag: 8.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.5
|
8 |
+
Stable tag: 8.2.02.010
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
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 |
{
|
@@ -583,6 +583,17 @@ details.hidden {
|
|
583 |
margin:0 -10;
|
584 |
}
|
585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
.wppa-flex {
|
587 |
display: flex;
|
588 |
flex-flow: row wrap;
|
@@ -602,6 +613,23 @@ details.hidden {
|
|
602 |
margin-bottom: 10px;
|
603 |
}
|
604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
/* like disabled input */
|
606 |
.wppa-ldi {
|
607 |
font-size: 1.2em;
|
@@ -659,3 +687,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.004
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
583 |
margin:0 -10;
|
584 |
}
|
585 |
|
586 |
+
.wppa-flex-column {
|
587 |
+
display: flex;
|
588 |
+
flex-flow: column wrap;
|
589 |
+
align-items: stretch;
|
590 |
+
row-gap: 20px;
|
591 |
+
grid-row-gap: 20px;
|
592 |
+
row-gap: 20px;
|
593 |
+
padding: 10px;
|
594 |
+
|
595 |
+
}
|
596 |
+
|
597 |
.wppa-flex {
|
598 |
display: flex;
|
599 |
flex-flow: row wrap;
|
613 |
margin-bottom: 10px;
|
614 |
}
|
615 |
|
616 |
+
.wppa-fieldset {
|
617 |
+
box-shadow: 0 0 0 transparent;
|
618 |
+
border-radius: 4px;
|
619 |
+
border: 1px solid #8c8f94;
|
620 |
+
color: #2c3338;
|
621 |
+
padding: 8px;
|
622 |
+
max-width: 900px;
|
623 |
+
}
|
624 |
+
.left {
|
625 |
+
float:left;
|
626 |
+
}
|
627 |
+
|
628 |
+
.wppa-legend {
|
629 |
+
padding:0 8px;
|
630 |
+
font-weight: 600;
|
631 |
+
}
|
632 |
+
|
633 |
/* like disabled input */
|
634 |
.wppa-ldi {
|
635 |
font-size: 1.2em;
|
687 |
#wppa-action-container-right select:first-of-type {
|
688 |
margin-left: 0;
|
689 |
}
|
690 |
+
|
691 |
+
.wppa-tabcontent {
|
692 |
+
min-height: 530px;
|
693 |
+
}
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -266,10 +266,11 @@ function wppa_edit_sequence() {
|
|
266 |
// General purpose admin functions
|
267 |
require_once 'wppa-admin-functions.php';
|
268 |
|
269 |
-
|
|
|
270 |
require_once 'wppa-tinymce-shortcodes.php';
|
271 |
require_once 'wppa-tinymce-photo.php';
|
272 |
-
|
273 |
|
274 |
if ( strpos( $_SERVER['REQUEST_URI'], 'widgets' ) === false ) {
|
275 |
require_once 'wppa-gutenberg-photo.php';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.2.03.004
|
7 |
*
|
8 |
*/
|
9 |
|
266 |
// General purpose admin functions
|
267 |
require_once 'wppa-admin-functions.php';
|
268 |
|
269 |
+
if ( ! isset( $_REQUEST['page'] ) || ( $_REQUEST['page'] != 'wppa_options' && $_REQUEST['page'] != 'wppa_admin_menu' ) ) {
|
270 |
+
|
271 |
require_once 'wppa-tinymce-shortcodes.php';
|
272 |
require_once 'wppa-tinymce-photo.php';
|
273 |
+
}
|
274 |
|
275 |
if ( strpos( $_SERVER['REQUEST_URI'], 'widgets' ) === false ) {
|
276 |
require_once 'wppa-gutenberg-photo.php';
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 8.2.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1076,6 +1076,7 @@ global $wppa;
|
|
1076 |
$result = str_replace( 'onclick="', 'onclick="return false;', $result );
|
1077 |
$result = str_replace( '<script', '[script', $result );
|
1078 |
$result = str_replace( '</script', '[/script', $result );
|
|
|
1079 |
|
1080 |
wppa_echo ( '
|
1081 |
<div
|
@@ -3717,7 +3718,8 @@ global $wppa;
|
|
3717 |
if ( $ca ) update_option ( 'wppa_crypt_albums_status', 'Required' );
|
3718 |
if ( $cp ) update_option ( 'wppa_crypt_photos_status', 'Required' );
|
3719 |
wppa( 'error', '4711' );
|
3720 |
-
$alert .= __( 'You renew Album and Photo crypt codes first before you can switch to encrypted urls. See
|
|
|
3721 |
}
|
3722 |
if ( wppa_switch( 'use_photo_names_in_urls' ) ) {
|
3723 |
$alert .= ' ' . __( 'Photo names in urls will be switched off.', 'wp-photo-album-plus' );
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.2.03.004
|
6 |
*
|
7 |
*/
|
8 |
|
1076 |
$result = str_replace( 'onclick="', 'onclick="return false;', $result );
|
1077 |
$result = str_replace( '<script', '[script', $result );
|
1078 |
$result = str_replace( '</script', '[/script', $result );
|
1079 |
+
$result = str_replace( ['cursor:pointer', 'cursor: pointer'], 'cursor:help', $result );
|
1080 |
|
1081 |
wppa_echo ( '
|
1082 |
<div
|
3718 |
if ( $ca ) update_option ( 'wppa_crypt_albums_status', 'Required' );
|
3719 |
if ( $cp ) update_option ( 'wppa_crypt_photos_status', 'Required' );
|
3720 |
wppa( 'error', '4711' );
|
3721 |
+
$alert .= sprintf( __( 'You have to renew Album and Photo crypt codes first before you can switch to encrypted urls. See %s.', 'wp-photo-album-plus' ), wppa_setting_path( 'a', 'maintenance', '1', ['18','19'] ) );
|
3722 |
+
// Maintenance I, items 18 and 20
|
3723 |
}
|
3724 |
if ( wppa_switch( 'use_photo_names_in_urls' ) ) {
|
3725 |
$alert .= ' ' . __( 'Photo names in urls will be switched off.', 'wp-photo-album-plus' );
|
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.
|
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 |
}
|
@@ -579,7 +610,7 @@ global $wppa_revno;
|
|
579 |
</div>'); // end action-container
|
580 |
/* End header */
|
581 |
|
582 |
-
/* Main
|
583 |
wppa_echo( '
|
584 |
<details class="wppa-toplevel-details">
|
585 |
<summary class="toplevel wppa-summary-toplevel"> ' .
|
@@ -594,13 +625,26 @@ global $wppa_revno;
|
|
594 |
<br>' . __( 'The <b style="color:#070" >Remark</b> fields keep you informed on the actions taken at the background.', 'wp-photo-album-plus' ) . '
|
595 |
</h2>' );
|
596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
// The tabs
|
598 |
wppa_echo('
|
599 |
<div id="tabs" style="margin-bottom:23px">
|
600 |
<ul class="widefat wppa-setting-tabs">
|
601 |
-
<li class="wppa-albumadmin-tab active" onclick="wppaChangeAlbumAdminTab(this,\'#albumitem-' . $id . '\');">' . __( '
|
602 |
-
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#subalbumitem-' . $id . '\');">' . __( '
|
603 |
-
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumactions-' . $id . '\');">' . __( '
|
|
|
|
|
604 |
</ul>
|
605 |
<div style="clear:both"></div>
|
606 |
</div>');
|
@@ -620,17 +664,23 @@ global $wppa_revno;
|
|
620 |
<div
|
621 |
id="albumitem-' . $id . '"
|
622 |
class="wppa-table-wrap wppa-tabcontent"
|
623 |
-
style="
|
624 |
>' );
|
625 |
|
626 |
// Section 0: More or less static data
|
627 |
{
|
628 |
-
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
631 |
|
632 |
// Album number, crypt, timestamp and modified
|
633 |
-
'
|
|
|
634 |
<label>' .
|
635 |
__( 'Album number', 'wp-photo-album-plus' ) . '
|
636 |
</label><br>
|
@@ -638,41 +688,43 @@ global $wppa_revno;
|
|
638 |
$id . '
|
639 |
</div>
|
640 |
</div>
|
641 |
-
<div>
|
642 |
<label>' .
|
643 |
-
__( '
|
644 |
</label><br>
|
645 |
<div class="wppa-ldi">' .
|
646 |
$crypt . '
|
647 |
</div>
|
648 |
</div>
|
649 |
-
<div>
|
650 |
<label>' .
|
651 |
__( 'Created', 'wp-photo-album-plus' ) . '
|
652 |
</label><br>
|
653 |
<div class="wppa-ldi">' .
|
654 |
wppa_local_date( '', $timestamp ) . '
|
655 |
</div>
|
656 |
-
</div>
|
657 |
-
|
|
|
|
|
658 |
<label>' .
|
659 |
__( 'Modified', 'wp-photo-album-plus' ) . '
|
660 |
</label><br>
|
661 |
-
<div class="wppa-ldi">';
|
662 |
if ( $modified > $timestamp ) {
|
663 |
-
|
664 |
}
|
665 |
else {
|
666 |
-
|
667 |
}
|
668 |
-
|
669 |
</div>
|
670 |
-
</div>';
|
671 |
|
672 |
// Views
|
673 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
674 |
-
|
675 |
-
<div>
|
676 |
<label>' .
|
677 |
__( 'Album Views', 'wp-photo-album-plus' ) . '
|
678 |
</label><br>
|
@@ -680,43 +732,44 @@ global $wppa_revno;
|
|
680 |
$views . '
|
681 |
</div>
|
682 |
</div>
|
683 |
-
<div>
|
684 |
<label>' .
|
685 |
__( 'Photo views', 'wp-photo-album-plus' ) . '
|
686 |
</label><br>
|
687 |
<div class="wppa-ldi">' .
|
688 |
$pviews . '
|
689 |
</div>
|
690 |
-
</div>';
|
691 |
if ( $nsub ) {
|
692 |
-
|
693 |
-
<div>
|
694 |
<label>' .
|
695 |
__( 'Inc subalbums', 'wp-photo-album-plus' ) . '
|
696 |
</label><br>
|
697 |
<div class="wppa-ldi">' .
|
698 |
$tpviews . '
|
699 |
</div>
|
700 |
-
</div>';
|
701 |
}
|
702 |
}
|
703 |
|
704 |
// Clicks
|
705 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
706 |
$click_arr = $wpdb->get_col( "SELECT clicks FROM $wpdb->wppa_photos WHERE album = $id" );
|
707 |
-
|
708 |
-
<div>
|
709 |
<label>' .
|
710 |
-
__( 'Clicks
|
711 |
</label><br>
|
712 |
<div class="wppa-ldi">' .
|
713 |
array_sum( $click_arr ) . '
|
714 |
</div>
|
715 |
-
</div>';
|
716 |
}
|
717 |
|
718 |
-
|
719 |
-
|
|
|
720 |
}
|
721 |
|
722 |
// Section 1: Short settable items
|
@@ -725,13 +778,19 @@ global $wppa_revno;
|
|
725 |
<!-- Album Section 1 simple settings -->
|
726 |
<div class="wppa-flex">' );
|
727 |
|
|
|
|
|
|
|
|
|
|
|
|
|
728 |
// Owner
|
729 |
{
|
730 |
$result = '
|
731 |
-
<div>
|
732 |
<label
|
733 |
for="albumowner">' .
|
734 |
-
__( 'Owned by
|
735 |
</label><br>';
|
736 |
|
737 |
if ( ! wppa_user_is( 'administrator' ) ) {
|
@@ -783,7 +842,7 @@ global $wppa_revno;
|
|
783 |
// Order # -->
|
784 |
{
|
785 |
wppa_echo( '
|
786 |
-
<div>
|
787 |
<label
|
788 |
for="albumseqno">' .
|
789 |
__( 'Sequence number', 'wp-photo-album-plus' ) . '
|
@@ -805,7 +864,7 @@ global $wppa_revno;
|
|
805 |
__( 'Publish: visible for all, Private: visible for logged in only, Hidden: visible for admin only', 'wp-photo-album-plus' );
|
806 |
|
807 |
wppa_echo( '
|
808 |
-
<div>
|
809 |
<label
|
810 |
for="albumstatus">' .
|
811 |
__( 'Status', 'wp-photo-album-plus' ) . '
|
@@ -831,7 +890,7 @@ global $wppa_revno;
|
|
831 |
// Parent
|
832 |
{
|
833 |
$result = '
|
834 |
-
<div>
|
835 |
<label
|
836 |
for="wppa-parsel">' .
|
837 |
__( 'Parent album', 'wp-photo-album-plus' ) . '
|
@@ -886,28 +945,28 @@ global $wppa_revno;
|
|
886 |
// P-order-by
|
887 |
if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
888 |
$result = '
|
889 |
-
<div
|
890 |
style="max-width: 200px;margin-right: 4px;">
|
891 |
<label
|
892 |
for="photo-order"
|
893 |
>' .
|
894 |
|
895 |
-
__( 'Photo
|
896 |
</label><br>';
|
897 |
$options = array( __( '--- default ---', 'wp-photo-album-plus' ),
|
898 |
-
__( '
|
899 |
__( 'Name', 'wp-photo-album-plus' ),
|
900 |
__( 'Random', 'wp-photo-album-plus' ),
|
901 |
__( 'Rating mean value', 'wp-photo-album-plus' ),
|
902 |
__( 'Number of votes', 'wp-photo-album-plus' ),
|
903 |
__( 'Timestamp', 'wp-photo-album-plus' ),
|
904 |
__( 'EXIF Date', 'wp-photo-album-plus' ),
|
905 |
-
__( '
|
906 |
-
__( 'Name
|
907 |
-
__( 'Rating mean value
|
908 |
-
__( 'Number of votes
|
909 |
-
__( 'Timestamp
|
910 |
-
__( 'EXIF Date
|
911 |
);
|
912 |
$values = array( '0',
|
913 |
'1',
|
@@ -952,59 +1011,13 @@ global $wppa_revno;
|
|
952 |
wppa_echo( $result );
|
953 |
}
|
954 |
|
955 |
-
// Subalbum order
|
956 |
-
{
|
957 |
-
$sel = ' selected';
|
958 |
-
$opts = array(
|
959 |
-
__( '--- default ---', 'wp-photo-album-plus' ),
|
960 |
-
__( 'Random', 'wp-photo-album-plus' ),
|
961 |
-
__( 'Order #', 'wp-photo-album-plus' ),
|
962 |
-
__( 'Order # reverse', 'wp-photo-album-plus' ),
|
963 |
-
__( 'Name', 'wp-photo-album-plus' ),
|
964 |
-
__( 'Name reverse', 'wp-photo-album-plus' ),
|
965 |
-
__( 'Timestamp', 'wp-photo-album-plus' ),
|
966 |
-
__( 'Timestamp reverse', 'wp-photo-album-plus' ),
|
967 |
-
);
|
968 |
-
$vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
|
969 |
-
|
970 |
-
$df = wppa_opt( 'list_albums_by' );
|
971 |
-
if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
|
972 |
-
else foreach( array_keys( $vals ) as $key ) {
|
973 |
-
if ( $df == $vals[$key] ) {
|
974 |
-
$dflt = $opts[$key];
|
975 |
-
}
|
976 |
-
}
|
977 |
-
|
978 |
-
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
|
979 |
-
|
980 |
-
$result = '
|
981 |
-
<div>
|
982 |
-
<label
|
983 |
-
for="subalbumorder">' .
|
984 |
-
__( 'Subalbum sort order', 'wp-photo-album-plus' ) . '
|
985 |
-
</label><br>
|
986 |
-
<select
|
987 |
-
id="subalbumorder"
|
988 |
-
style="max-width:200px;"
|
989 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'suba_order_by\', this )"
|
990 |
-
title="' . esc_attr( $title ) . '"
|
991 |
-
>';
|
992 |
-
for ( $i = 0; $i < 7; $i++ ) {
|
993 |
-
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
994 |
-
}
|
995 |
-
$result .= '
|
996 |
-
</select>
|
997 |
-
</div>';
|
998 |
-
wppa_echo( $result );
|
999 |
-
}
|
1000 |
-
|
1001 |
// Alternative thumbnail size
|
1002 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1003 |
$title = sprintf( __( 'The alternate thumbnail size is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'thumbs', 1, 2 ), wppa_opt( 'thumbsize_alt' ) );
|
1004 |
|
1005 |
$sel = ' selected';
|
1006 |
wppa_echo( '
|
1007 |
-
<div
|
1008 |
style="max-width: 200px;margin-right: 4px;">
|
1009 |
<label
|
1010 |
for="altthumb">' .
|
@@ -1025,67 +1038,13 @@ global $wppa_revno;
|
|
1025 |
</div>' );
|
1026 |
}
|
1027 |
|
1028 |
-
// Cover type
|
1029 |
-
if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1030 |
-
$sel = ' selected';
|
1031 |
-
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'covers', 3, 4 ), wppa_opt( 'cover_type' ) );
|
1032 |
-
|
1033 |
-
wppa_echo( '
|
1034 |
-
<div
|
1035 |
-
style="max-width: 200px;margin-right: 4px;">
|
1036 |
-
<label
|
1037 |
-
for="covertype">' .
|
1038 |
-
__( 'Cover Type', 'wp-photo-album-plus' ) . '
|
1039 |
-
</label><br>
|
1040 |
-
<select
|
1041 |
-
id="covertype"
|
1042 |
-
style="max-width:200px;"
|
1043 |
-
onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this )"
|
1044 |
-
title="' . esc_attr( $title ) . '"
|
1045 |
-
>
|
1046 |
-
<option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
|
1047 |
-
__( '--- default ---', 'wp-photo-album-plus' ) . '
|
1048 |
-
</option>
|
1049 |
-
<option value="default"' . ( $cover_type == 'default' ? $sel : '' ) . ' >' .
|
1050 |
-
__( 'Standard', 'wp-photo-album-plus' ) . '
|
1051 |
-
</option>
|
1052 |
-
<option value="longdesc"' . ( $cover_type == 'longdesc' ? $sel : '' ) . ' >' .
|
1053 |
-
__( 'Long Descriptions', 'wp-photo-album-plus' ) . '
|
1054 |
-
</option>
|
1055 |
-
<option value="imagefactory"' . ( $cover_type == 'imagefactory' ? $sel : '' ) . ' >' .
|
1056 |
-
__( 'Image Factory', 'wp-photo-album-plus' ) . '
|
1057 |
-
</option>
|
1058 |
-
<option value="default-mcr"' . ( $cover_type == 'default-mcr' ? $sel : '' ) . ' >' .
|
1059 |
-
__( 'Standard mcr', 'wp-photo-album-plus' ) . '
|
1060 |
-
</option>
|
1061 |
-
<option value="longdesc-mcr"' . ( $cover_type == 'longdesc-mcr' ? $sel : '' ) . ' >' .
|
1062 |
-
__( 'Long Descriptions mcr', 'wp-photo-album-plus' ) . '
|
1063 |
-
</option>
|
1064 |
-
<option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
|
1065 |
-
__( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
|
1066 |
-
</option>
|
1067 |
-
</select>
|
1068 |
-
</div>' );
|
1069 |
-
}
|
1070 |
-
|
1071 |
-
// Cover photo
|
1072 |
-
{
|
1073 |
-
wppa_echo( '
|
1074 |
-
<div>
|
1075 |
-
<label>' .
|
1076 |
-
__( 'Cover Photo:', 'wp-photo-album-plus' ) . '
|
1077 |
-
</label><br>' .
|
1078 |
-
wppa_main_photo( $main_photo, $cover_type ) . '
|
1079 |
-
</div>' );
|
1080 |
-
}
|
1081 |
-
|
1082 |
// Upload limit
|
1083 |
{
|
1084 |
$result = '
|
1085 |
-
<div>
|
1086 |
<label
|
1087 |
for="upload_limit_count">' .
|
1088 |
-
__( 'Upload limit
|
1089 |
</label><br>';
|
1090 |
$lims = explode( '/', $upload_limit );
|
1091 |
if ( ! is_array( $lims ) ) {
|
@@ -1142,7 +1101,7 @@ global $wppa_revno;
|
|
1142 |
__( 'This setting overrules all other limits that may apply to this album or its (grand)children.', 'wp-photo-album-plus' ) . ' ' .
|
1143 |
__( '0 means no limit.', 'wp-photo-album-plus' );
|
1144 |
wppa_echo( '
|
1145 |
-
<div>
|
1146 |
<label
|
1147 |
for="uploadlimittree">' .
|
1148 |
__( 'Tree upload limit', 'wp-photo-album-plus' ) . '
|
@@ -1158,153 +1117,15 @@ global $wppa_revno;
|
|
1158 |
</div>' );
|
1159 |
}
|
1160 |
|
1161 |
-
// Need this the next 5 items
|
1162 |
-
{
|
1163 |
-
$yes = __( 'yes', 'wp-photo-album-plus' );
|
1164 |
-
$no = __( 'no', 'wp-photo-album-plus' );
|
1165 |
-
$def = __( 'default', 'wp-photo-album-plus' );
|
1166 |
-
}
|
1167 |
-
|
1168 |
-
// Zoomable
|
1169 |
-
{
|
1170 |
-
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
1171 |
-
sprintf( __( 'The default is set in %s and is currently %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'photos', 1, 4 ), ( wppa_switch( 'zoom_on' ) ? $yes : $no ) );
|
1172 |
-
|
1173 |
-
wppa_echo( '
|
1174 |
-
<div>
|
1175 |
-
<label
|
1176 |
-
for="zoomable">' .
|
1177 |
-
__( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
|
1178 |
-
</label><br>
|
1179 |
-
<select
|
1180 |
-
id="zoomable"
|
1181 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )"
|
1182 |
-
title="' . esc_attr( $title ) . '" >
|
1183 |
-
<option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
|
1184 |
-
<option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
|
1185 |
-
<option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
|
1186 |
-
</select>
|
1187 |
-
</div>' );
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
// Overrulable display options / next 4 items
|
1191 |
-
{
|
1192 |
-
if ( $displayopts ) {
|
1193 |
-
$disp_opt = explode( ',', $displayopts );
|
1194 |
-
}
|
1195 |
-
for ( $i = 0; $i < 4; $i++ ) {
|
1196 |
-
if ( ! isset( $disp_opt[$i] ) ) {
|
1197 |
-
$disp_opt[$i] = '0';
|
1198 |
-
}
|
1199 |
-
}
|
1200 |
-
$title_head = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . '
' .
|
1201 |
-
__( 'The defaults are set in', 'wp-photo-album-plus' ). ':
';
|
1202 |
-
}
|
1203 |
-
|
1204 |
-
// Display name
|
1205 |
-
{
|
1206 |
-
$title = $title_head .
|
1207 |
-
wppa_setting_path( 'b', 'slide', 1, 17, wppa_switch( 'show_full_name' ) ? $yes : $no ) . ',
' .
|
1208 |
-
wppa_setting_path( 'b', 'thumbs', 2, 1, wppa_switch( 'thumb_text_name' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1209 |
-
wppa_setting_path( 'b', 'lightbox', 1, 3, wppa_switch( 'ovl_name' ) ? $yes : $no ) . '.';
|
1210 |
-
|
1211 |
-
wppa_echo( '
|
1212 |
-
<div>
|
1213 |
-
<label
|
1214 |
-
for="showname">' .
|
1215 |
-
__( 'Show names:', 'wp-photo-album-plus' ) . '
|
1216 |
-
</label><br>
|
1217 |
-
<select
|
1218 |
-
id="showname"
|
1219 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )"
|
1220 |
-
title="' . esc_attr( $title ) . '">
|
1221 |
-
<option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
|
1222 |
-
<option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
|
1223 |
-
<option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
|
1224 |
-
</select>
|
1225 |
-
</div>' );
|
1226 |
-
}
|
1227 |
-
|
1228 |
-
// Display description
|
1229 |
-
{
|
1230 |
-
$title = $title_head .
|
1231 |
-
wppa_setting_path( 'b', 'slide', 1, 20, wppa_switch( 'show_full_desc' ) ? $yes : $no ) . ',
' .
|
1232 |
-
wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_desc' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1233 |
-
wppa_setting_path( 'b', 'lightbox', 1, 4, wppa_switch( 'ovl_desc' ) ? $yes : $no ) . '.';
|
1234 |
-
|
1235 |
-
wppa_echo( '
|
1236 |
-
<div>
|
1237 |
-
<label
|
1238 |
-
for="showdesc">' .
|
1239 |
-
__( 'Show descriptions:', 'wp-photo-album-plus' ) . '
|
1240 |
-
</label><br>
|
1241 |
-
<select
|
1242 |
-
id="showdesc"
|
1243 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )"
|
1244 |
-
title="' . esc_attr( $title ) . '" >
|
1245 |
-
<option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
|
1246 |
-
<option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
|
1247 |
-
<option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
|
1248 |
-
</select>
|
1249 |
-
</div>' );
|
1250 |
-
}
|
1251 |
-
|
1252 |
-
// Display rating
|
1253 |
-
{
|
1254 |
-
$title = $title_head .
|
1255 |
-
wppa_setting_path( 'b', 'general', 1, 5, wppa_switch( 'rating_on' ) ? $yes : $no ) . ',
' .
|
1256 |
-
wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_rating' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1257 |
-
wppa_setting_path( 'b', 'lightbox', 1, 5, wppa_switch( 'ovl_rating' ) ? $yes : $no ) . '.';
|
1258 |
-
|
1259 |
-
wppa_echo( '
|
1260 |
-
<div>
|
1261 |
-
<label
|
1262 |
-
for="showrating">' .
|
1263 |
-
__( 'Show rating:', 'wp-photo-album-plus' ) . '
|
1264 |
-
</label><br>
|
1265 |
-
<select
|
1266 |
-
id="showrating"
|
1267 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )"
|
1268 |
-
title="' . esc_attr( $title ) . '" >
|
1269 |
-
<option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
|
1270 |
-
<option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
|
1271 |
-
<option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
|
1272 |
-
</select>
|
1273 |
-
</div>' );
|
1274 |
-
}
|
1275 |
-
|
1276 |
-
// Display comments
|
1277 |
-
{
|
1278 |
-
$title = $title_head .
|
1279 |
-
wppa_setting_path( 'b', 'general', 1, 4, wppa_switch( 'show_comments' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1280 |
-
wppa_setting_path( 'b', 'thumbs', 2, 4, wppa_switch( 'thumb_text_comcount' ) ? $yes : $no ) . '.';
|
1281 |
-
|
1282 |
-
wppa_echo( '
|
1283 |
-
<div>
|
1284 |
-
<label
|
1285 |
-
for="showcomments">' .
|
1286 |
-
__( 'Show comments:', 'wp-photo-album-plus' ) . '
|
1287 |
-
</label><br>
|
1288 |
-
<select
|
1289 |
-
id="showcomments"
|
1290 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )"
|
1291 |
-
title="' . esc_attr( $title ) . '" >
|
1292 |
-
<option value="0"'.($disp_opt[3]=='0'?' selected': '').'>' . $def . '</option>
|
1293 |
-
<option value="1"'.($disp_opt[3]=='1'?' selected': '').'>' . $yes . '</option>
|
1294 |
-
<option value="-1"'.($disp_opt[3]=='-1'?' selected': '').'>' . $no . '</option>
|
1295 |
-
</select>
|
1296 |
-
</div>' );
|
1297 |
-
}
|
1298 |
-
|
1299 |
// Watermark
|
1300 |
if ( wppa_switch( 'watermark_on' ) ) {
|
1301 |
|
1302 |
wppa_echo( '
|
1303 |
-
<div
|
1304 |
style="max-width: 200px;margin-right: 4px;">
|
1305 |
<label
|
1306 |
for="watermarkfile">' .
|
1307 |
-
__( 'Watermark file
|
1308 |
</label><br>
|
1309 |
<select
|
1310 |
id="watermarkfile"
|
@@ -1313,11 +1134,11 @@ global $wppa_revno;
|
|
1313 |
wppa_watermark_file_select( 'album', $id ) . '
|
1314 |
</select>
|
1315 |
</div>
|
1316 |
-
<div
|
1317 |
style="max-width: 200px;margin-right: 4px;">
|
1318 |
<label
|
1319 |
for="watermarkpos">' .
|
1320 |
-
__( 'Watermark pos
|
1321 |
</label><br>
|
1322 |
<select
|
1323 |
id="watermarkpos"
|
@@ -1328,417 +1149,243 @@ global $wppa_revno;
|
|
1328 |
</div>' );
|
1329 |
}
|
1330 |
|
1331 |
-
|
1332 |
-
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1333 |
-
$may_change = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
1334 |
-
|
1335 |
-
wppa_echo( '
|
1336 |
-
<div
|
1337 |
-
style="max-width: 500px;margin-right: 4px;">
|
1338 |
-
<label
|
1339 |
-
for="scheduledel">' .
|
1340 |
-
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1341 |
-
</label><br>
|
1342 |
-
<input
|
1343 |
-
type="checkbox"
|
1344 |
-
id="scheduledel"' .
|
1345 |
-
( $scheduledel ? ' checked="checked"' : '' ) .
|
1346 |
-
( $may_change ? '' : ' disabled' ) . '
|
1347 |
-
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
1348 |
-
/>
|
1349 |
-
<input type="hidden" value="" id="wppa-dummy-del" />
|
1350 |
-
<span
|
1351 |
-
class="wppa-datetimedel-' . $id . '"' .
|
1352 |
-
( $albuminfo['scheduledel'] ? '' : ' style="display:none"' ) . '
|
1353 |
-
>' .
|
1354 |
-
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1355 |
-
</span>
|
1356 |
-
</div>' );
|
1357 |
-
}
|
1358 |
wppa_echo( '</div>' );
|
1359 |
}
|
1360 |
// End Section 1: Short settable items, wppa-flex div
|
1361 |
|
|
|
|
|
|
|
1362 |
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
__( '
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
__( 'Type the name of the album. Do not leave this empty.', 'wp-photo-album-plus' ) . '
|
1399 |
-
</span>
|
1400 |
-
<span style="float:right">' .
|
1401 |
-
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
1402 |
-
</span>
|
1403 |
-
</td>
|
1404 |
-
<td>
|
1405 |
-
</td>
|
1406 |
-
</tr>' );
|
1407 |
-
}
|
1408 |
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
array( 'wpautop' => true,
|
1426 |
-
'media_buttons' => false,
|
1427 |
-
'textarea_rows' => '6',
|
1428 |
-
'tinymce' => true
|
1429 |
-
)
|
1430 |
-
);
|
1431 |
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1445 |
}
|
1446 |
-
|
1447 |
-
// Textarea
|
1448 |
else {
|
1449 |
-
|
1450 |
-
<
|
1451 |
-
style="width:100%;height:60px;"
|
1452 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'description\', this )"
|
1453 |
-
>' .
|
1454 |
-
esc_textarea( stripslashes( $description ) ) . '
|
1455 |
-
</textarea>' );
|
1456 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1457 |
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
|
|
1463 |
}
|
1464 |
-
|
1465 |
-
|
1466 |
-
{
|
1467 |
-
$result = '
|
1468 |
-
<tr>
|
1469 |
-
<td>' .
|
1470 |
-
__( 'Categories:', 'wp-photo-album-plus' ) . '
|
1471 |
-
</td>
|
1472 |
-
<td>
|
1473 |
-
<input
|
1474 |
-
id="cats"
|
1475 |
-
type="text"
|
1476 |
-
style="width:100%;"
|
1477 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', this )"
|
1478 |
-
value="' . esc_attr( $cats ) . '"
|
1479 |
-
/>
|
1480 |
-
<br>
|
1481 |
-
<span class="description" >' .
|
1482 |
-
__( 'Separate categories with commas.', 'wp-photo-album-plus' ) . '
|
1483 |
-
</span>
|
1484 |
-
<select
|
1485 |
-
onchange="wppaAddCat( this.value, \'cats\' ); wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', document.getElementById( \'cats\' ) )"
|
1486 |
-
>';
|
1487 |
-
$catlist = wppa_get_catlist();
|
1488 |
-
if ( is_array( $catlist ) ) {
|
1489 |
-
$result .= '
|
1490 |
-
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
1491 |
-
foreach ( $catlist as $cat ) {
|
1492 |
-
$result .= '
|
1493 |
-
<option value="' . esc_attr( $cat['cat'] ) . '" >' . htmlspecialchars( $cat['cat'] ) . '</option>';
|
1494 |
-
}
|
1495 |
-
}
|
1496 |
-
else {
|
1497 |
-
$result .= '
|
1498 |
-
<option value="0" >' . __( 'No categories yet', 'wp-photo-album-plus' ) . '</option>';
|
1499 |
-
}
|
1500 |
-
$result .= '
|
1501 |
-
</select>
|
1502 |
-
</td>
|
1503 |
-
<td>
|
1504 |
-
</td>
|
1505 |
-
</tr>';
|
1506 |
-
wppa_echo( $result );
|
1507 |
}
|
1508 |
|
1509 |
-
//
|
1510 |
-
|
1511 |
-
|
1512 |
-
<
|
1513 |
-
|
1514 |
-
|
1515 |
-
</td>
|
1516 |
-
<td>
|
1517 |
-
<input
|
1518 |
-
type="text"
|
1519 |
-
id="default_tags"
|
1520 |
-
value="' . esc_attr( $default_tags ) . '"
|
1521 |
-
style="width:100%"
|
1522 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'default_tags\', this )"
|
1523 |
-
/>
|
1524 |
-
<br>
|
1525 |
-
<span class="description">' .
|
1526 |
-
__( 'Enter the tags that you want to be assigned to new photos in this album.', 'wp-photo-album-plus' ) . '
|
1527 |
-
</span>
|
1528 |
-
</td>
|
1529 |
-
<td>
|
1530 |
-
</td>
|
1531 |
-
</tr>' );
|
1532 |
-
}
|
1533 |
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
else {
|
1542 |
-
$custom_data = array( '', '', '', '', '', '', '', '', '', '' );
|
1543 |
-
}
|
1544 |
-
foreach( array_keys( $custom_data ) as $key ) {
|
1545 |
-
if ( wppa_opt( 'album_custom_caption_' . $key ) ) {
|
1546 |
-
$result .= '
|
1547 |
<tr>
|
1548 |
-
<td>
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1555 |
<input
|
1556 |
type="text"
|
1557 |
-
style="width:100
|
1558 |
id="album_custom_' . $key . '-' . $id . '"
|
1559 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'album_custom_' . $key . '\', this
|
1560 |
value="' . esc_attr( stripslashes( $custom_data[$key] ) ) . '"
|
1561 |
/>
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1569 |
}
|
1570 |
-
}
|
1571 |
-
wppa_echo( $result );
|
1572 |
-
}
|
1573 |
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
$sel = ' selected';
|
1583 |
-
$lt = $cover_linktype;
|
1584 |
-
$result .= '
|
1585 |
-
<select onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
|
1586 |
-
<option value="content"' . ( $lt == 'content' ? $sel : '' ) . ' >' . __( 'the subalbums and thumbnails', 'wp-photo-album-plus' ) . '</option>
|
1587 |
-
<option value="albums"' . ( $lt == 'albums' ? $sel : '' ) . ' >' . __( 'the subalbums', 'wp-photo-album-plus' ) . '</option>
|
1588 |
-
<option value="thumbs"' . ( $lt == 'thumbs' ? $sel : '' ) . ' >' . __( 'the thumbnails', 'wp-photo-album-plus' ) . '</option>
|
1589 |
-
<option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
|
1590 |
-
<option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
|
1591 |
-
<option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
|
1592 |
-
<option value="manual"' . ( $lt == 'manual' ? $sel : '' ) . ' >' . __( 'manually entered', 'wp-photo-album-plus' ) . '</option>
|
1593 |
-
</select>
|
1594 |
-
<br>
|
1595 |
-
<span class="description">';
|
1596 |
-
if ( wppa_switch( 'auto_page' ) ) {
|
1597 |
-
$result .= __( 'If you select "the link page with a clean url", select an Auto Page of one of the photos in this album.', 'wp-photo-album-plus' );
|
1598 |
-
}
|
1599 |
-
else {
|
1600 |
-
$result .= __( 'If you select "the link page with a clean url", make sure you enter the correct shortcode on the target page.', 'wp-photo-album-plus' );
|
1601 |
-
}
|
1602 |
-
$result .= '
|
1603 |
-
</span>
|
1604 |
-
</td>
|
1605 |
-
<td>
|
1606 |
-
</td>
|
1607 |
-
</tr>';
|
1608 |
-
wppa_echo( $result );
|
1609 |
-
}
|
1610 |
-
|
1611 |
-
// Manually entered link
|
1612 |
-
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1613 |
-
$result = '
|
1614 |
-
<tr
|
1615 |
-
id="link-url-tr"
|
1616 |
-
style="' . ( $cover_linktype == 'manual' ? '' : 'display:none' ) . '"
|
1617 |
-
>
|
1618 |
-
<td>
|
1619 |
-
' . __( 'Link target (url):', 'wp-photo-album-plus' ) . '
|
1620 |
-
</td>
|
1621 |
-
<td>
|
1622 |
-
<input
|
1623 |
-
type="text"
|
1624 |
-
id="cover_link"
|
1625 |
-
value="' . esc_attr( $cover_link ) . '"
|
1626 |
-
style="width:100%"
|
1627 |
-
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cover_link\', this )"
|
1628 |
-
/>
|
1629 |
-
<br>
|
1630 |
-
<span class="description">' .
|
1631 |
-
__( 'Enter the url you want the title to link to when you selected Link type manually entered.', 'wp-photo-album-plus' ) . '
|
1632 |
-
</span>
|
1633 |
-
</td>
|
1634 |
-
<td>
|
1635 |
-
</td>
|
1636 |
-
</tr>';
|
1637 |
-
wppa_echo( $result );
|
1638 |
-
}
|
1639 |
-
|
1640 |
-
// Link page
|
1641 |
-
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1642 |
-
$result = '
|
1643 |
-
<tr>
|
1644 |
-
<td>
|
1645 |
-
' . __( 'Link to:', 'wp-photo-album-plus' ) . '
|
1646 |
-
</td>
|
1647 |
-
<td>';
|
1648 |
-
$query = "SELECT ID, post_type, post_title, post_date FROM $wpdb->posts
|
1649 |
-
WHERE ( post_type = 'page' OR post_type = 'post' )
|
1650 |
-
AND post_status = 'publish'
|
1651 |
-
ORDER BY post_title ASC";
|
1652 |
-
$pages = $wpdb->get_results( $query, ARRAY_A );
|
1653 |
-
if ( empty( $pages ) ) {
|
1654 |
-
_e( 'There are no posts/pages (yet) to link to.', 'wp-photo-album-plus' );
|
1655 |
-
}
|
1656 |
-
else {
|
1657 |
-
$linkpage = $albuminfo['cover_linkpage'];
|
1658 |
-
if ( ! is_numeric( $linkpage ) ) {
|
1659 |
-
$linkpage = '0';
|
1660 |
-
}
|
1661 |
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
>
|
1667 |
-
<option value="0"' . ( $linkpage == '0' ? $sel : '' ) . ' >' .
|
1668 |
-
__( '--- the same page or post ---', 'wp-photo-album-plus' ) .
|
1669 |
-
'</option>';
|
1670 |
-
foreach ( $pages as $page ) {
|
1671 |
-
$result .= '
|
1672 |
-
<option
|
1673 |
-
value="' . $page['ID'] . '"' .
|
1674 |
-
( $linkpage == $page['ID'] ? ' selected' : '' ) . '>' .
|
1675 |
-
__( htmlspecialchars( $page['post_title'] ) ) .
|
1676 |
-
( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
|
1677 |
-
'</option>';
|
1678 |
-
}
|
1679 |
-
$result .= '
|
1680 |
-
</select>
|
1681 |
-
<br>
|
1682 |
-
<span class="description" >' .
|
1683 |
-
__( 'If you want, you can link the title to a WP page or post instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
|
1684 |
-
'</span>';
|
1685 |
-
}
|
1686 |
-
$result .= '
|
1687 |
-
</td>
|
1688 |
-
<td>
|
1689 |
-
</td>
|
1690 |
-
</tr>';
|
1691 |
-
wppa_echo( $result );
|
1692 |
-
}
|
1693 |
|
1694 |
-
// Schedule
|
1695 |
-
{
|
1696 |
-
$result = '
|
1697 |
-
<tr>
|
1698 |
-
<td>' .
|
1699 |
-
__( 'Schedule:', 'wp-photo-album-plus' ) . ' ' .
|
1700 |
-
'<input
|
1701 |
-
type="checkbox"
|
1702 |
-
id="schedule-box"' .
|
1703 |
-
( $albuminfo['scheduledtm'] ? ' checked="checked"' : '' ) . '
|
1704 |
-
onchange="wppaChangeScheduleAlbum(' . $id . ', this );"
|
1705 |
-
/>
|
1706 |
-
</td>
|
1707 |
-
<td>
|
1708 |
-
<input type="hidden" value="" id="wppa-dummy" />
|
1709 |
-
<span
|
1710 |
-
class="wppa-datetime-' . $id . '"' .
|
1711 |
-
( $albuminfo['scheduledtm'] ? '' : ' style="display:none"' ) .
|
1712 |
-
' >' .
|
1713 |
-
wppa_get_date_time_select_html( 'album', $id, true ) .
|
1714 |
-
'</span>
|
1715 |
-
<br>
|
1716 |
-
<span class="description" >' .
|
1717 |
-
__( 'If enabled, new photos will have their status set scheduled for publication on the date/time specified here.', 'wp-photo-album-plus' ) .
|
1718 |
-
'</span>
|
1719 |
-
</td>
|
1720 |
-
<td>
|
1721 |
-
</td>
|
1722 |
-
</tr>';
|
1723 |
-
wppa_echo( $result );
|
1724 |
-
}
|
1725 |
|
1726 |
-
|
1727 |
-
|
1728 |
-
</tbody>
|
1729 |
-
</table>' );
|
1730 |
-
}
|
1731 |
|
1732 |
// End Tab 1
|
1733 |
wppa_echo( '
|
1734 |
</div>' ); // Tab 1
|
1735 |
|
1736 |
|
1737 |
-
// Tab 2:
|
1738 |
wppa_echo( '
|
1739 |
<div id="subalbumitem-' . $id . '"
|
1740 |
class="wppa-table-wrap wppa-tabcontent"
|
1741 |
-
style="
|
1742 |
>' );
|
1743 |
|
1744 |
// Explanation
|
@@ -1815,120 +1462,594 @@ global $wppa_revno;
|
|
1815 |
/>' );
|
1816 |
}
|
1817 |
|
1818 |
-
// Subalbums sequence
|
1819 |
-
if ( $has_children ) {
|
1820 |
-
wppa_album_sequence( $edit_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1821 |
}
|
1822 |
|
1823 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1824 |
wppa_echo( '
|
1825 |
</div>' );
|
1826 |
|
1827 |
-
|
1828 |
-
// Tab 3: Album Actions
|
1829 |
wppa_echo( '
|
1830 |
<div
|
1831 |
-
id="
|
1832 |
class="wppa-table-wrap wppa-tabcontent"
|
1833 |
-
style="
|
1834 |
>' );
|
1835 |
|
1836 |
// Explanation
|
1837 |
wppa_echo( '
|
1838 |
<h2 class="description" style="margin:1em">' .
|
1839 |
-
__( 'The following
|
1840 |
</h2>' );
|
1841 |
|
1842 |
-
|
1843 |
-
{
|
1844 |
-
wppa_echo( '
|
1845 |
-
<input
|
1846 |
-
type="button"
|
1847 |
-
class="wppa-admin-button button"
|
1848 |
-
title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
|
1849 |
-
onclick="wppaTryApplyDeftags( ' . $id . ' )"
|
1850 |
-
value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
|
1851 |
-
/>
|
1852 |
-
<input
|
1853 |
-
type="button"
|
1854 |
-
class="wppa-admin-button button"
|
1855 |
-
title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
|
1856 |
-
onclick="wppaTryAddDeftags( ' . $id . ' )"
|
1857 |
-
value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
|
1858 |
-
/>' );
|
1859 |
-
}
|
1860 |
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
|
1868 |
-
onclick="wppaTryScheduleAll( ' . $id . ' )"
|
1869 |
-
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1870 |
-
/>' );
|
1871 |
-
}
|
1872 |
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
<input
|
1878 |
-
type="button"
|
1879 |
-
class="wppa-admin-button button"
|
1880 |
-
onclick="' . $onc . '"
|
1881 |
-
value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
|
1882 |
-
/>' );
|
1883 |
-
}
|
1884 |
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
|
|
|
|
|
|
|
|
|
|
1896 |
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
|
|
|
|
1908 |
|
1909 |
-
|
1910 |
-
|
|
|
|
|
|
|
|
|
1911 |
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
|
|
1927 |
|
1928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1929 |
wppa_echo( '
|
1930 |
</div>' );
|
1931 |
|
|
|
1932 |
// End of outer details block
|
1933 |
wppa_echo( '
|
1934 |
</details>' );
|
@@ -1943,7 +2064,7 @@ global $wppa_revno;
|
|
1943 |
if ( wppa_get( 'bulk' ) )
|
1944 |
$result = __( 'Copy / move / delete / edit name / edit description / change status', 'wp-photo-album-plus' );
|
1945 |
elseif ( wppa_get( 'seq' ) )
|
1946 |
-
$result = __( 'Change sequence
|
1947 |
elseif ( wppa_get( 'quick' ) )
|
1948 |
$result = __( 'Edit photo information except copy and move', 'wp-photo-album-plus' );
|
1949 |
elseif ( is_numeric( wppa_get( 'edit-id' ) ) ) {
|
@@ -2039,7 +2160,7 @@ global $wppa_revno;
|
|
2039 |
<img src="' . WPPA_URL . '/img/albumdel32.png" />
|
2040 |
<h1 style="display:inline">' . __( 'Delete Album', 'wp-photo-album-plus' ) . '</h1>
|
2041 |
|
2042 |
-
<p>' . __( 'Album
|
2043 |
<p>' . __( 'Are you sure you want to delete this album?', 'wp-photo-album-plus' ) . '<br>' .
|
2044 |
__( 'Press Delete to continue, and Cancel to go back.', 'wp-photo-album-plus' ) . '
|
2045 |
</p>
|
@@ -2048,7 +2169,7 @@ global $wppa_revno;
|
|
2048 |
<h2>' .
|
2049 |
__( 'What would you like to do with photos currently in the album?', 'wp-photo-album-plus' ) . '<br>
|
2050 |
<input type="radio" name="wppa-del-photos" value="delete" checked="checked" />' . __( 'Delete', 'wp-photo-album-plus' ) . '<br>
|
2051 |
-
<input type="radio" name="wppa-del-photos" value="move" />' . __( 'Move to
|
2052 |
<select name="wppa-move-album">' .
|
2053 |
wppa_album_select_a( array( 'checkaccess' => true,
|
2054 |
'path' => true,
|
@@ -2823,7 +2944,7 @@ global $wpdb;
|
|
2823 |
style="min-width: 100px;"
|
2824 |
>
|
2825 |
<a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
|
2826 |
-
__( '
|
2827 |
( $order == 'a_order' && $reverse ? $upimg : $downimg ) . '
|
2828 |
</a>
|
2829 |
</td>
|
@@ -3494,31 +3615,91 @@ global $wpdb;
|
|
3494 |
}
|
3495 |
}
|
3496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3497 |
// Check album order
|
3498 |
if ( $albumorder_col != 'a_order' ) {
|
3499 |
if ( $parent == '0') {
|
3500 |
$result = '
|
3501 |
<br>' .
|
3502 |
-
esc_html__( 'You can edit top-level album sequence number here when you set the album sequence to "
|
3503 |
}
|
3504 |
else {
|
3505 |
$result = '
|
3506 |
<br>' .
|
3507 |
-
esc_html__( 'You can edit subalbum sequence number here when you set the album sequence to "
|
3508 |
}
|
3509 |
$result .= '<br>';
|
3510 |
|
3511 |
wppa_echo( $result );
|
3512 |
-
return;
|
3513 |
}
|
3514 |
|
|
|
|
|
3515 |
$result = '
|
|
|
|
|
|
|
|
|
3516 |
<h2 style="margin:1em">' .
|
3517 |
-
__( 'Manage album
|
3518 |
-
|
3519 |
<small>
|
3520 |
<i>' .
|
3521 |
-
__( 'Change sequence
|
3522 |
</i>' .
|
3523 |
__( 'Do not leave this page unless the bar is entirely green.', 'wp-photo-album-plus' ) . '
|
3524 |
</small>
|
@@ -3569,7 +3750,8 @@ global $wpdb;
|
|
3569 |
</td>
|
3570 |
</tr>
|
3571 |
</tbody>
|
3572 |
-
</table>
|
|
|
3573 |
wppa_echo( $result );
|
3574 |
|
3575 |
|
@@ -3817,8 +3999,8 @@ global $wpdb;
|
|
3817 |
</table>
|
3818 |
</div>
|
3819 |
<div style="float:right; width:25%">
|
3820 |
-
<span> ' . __( 'Id
|
3821 |
-
<span> - ' . __( 'Ord
|
3822 |
<span id="wppa-album-seqno-' . $albid . '" > ' . $album['a_order'] . '</span>
|
3823 |
<br>
|
3824 |
<a href="' . wppa_ea_url( $albid ) . '" style="position:absolute;bottom:0">' . __( 'Edit', 'wp-photo-album-plus' ) . '</a>
|
@@ -3831,6 +4013,7 @@ global $wpdb;
|
|
3831 |
$result .= '
|
3832 |
</div>
|
3833 |
<div style="clear:both;"></div>
|
|
|
3834 |
</div>';
|
3835 |
|
3836 |
wppa_echo( $result );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.2.03.004
|
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 |
}
|
610 |
</div>'); // end action-container
|
611 |
/* End header */
|
612 |
|
613 |
+
/* Main body album admin */
|
614 |
wppa_echo( '
|
615 |
<details class="wppa-toplevel-details">
|
616 |
<summary class="toplevel wppa-summary-toplevel"> ' .
|
625 |
<br>' . __( 'The <b style="color:#070" >Remark</b> fields keep you informed on the actions taken at the background.', 'wp-photo-album-plus' ) . '
|
626 |
</h2>' );
|
627 |
|
628 |
+
// Status - Remark - field
|
629 |
+
wppa_echo( '
|
630 |
+
<h3 style="margin-left:1em">' .
|
631 |
+
esc_html__( 'Remark', 'wp-photo-album-plus' ) . ':
|
632 |
+
<span
|
633 |
+
id="albumstatus-' . $id . '"
|
634 |
+
style="font-weight:bold;color:#00AA00">' .
|
635 |
+
esc_html( $remark ) . '
|
636 |
+
</span>
|
637 |
+
</h3>' );
|
638 |
+
|
639 |
// The tabs
|
640 |
wppa_echo('
|
641 |
<div id="tabs" style="margin-bottom:23px">
|
642 |
<ul class="widefat wppa-setting-tabs">
|
643 |
+
<li class="wppa-albumadmin-tab active" onclick="wppaChangeAlbumAdminTab(this,\'#albumitem-' . $id . '\');">' . __( 'Album', 'wp-photo-album-plus' ) . '</li>
|
644 |
+
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#subalbumitem-' . $id . '\');">' . __( 'Related', 'wp-photo-album-plus' ) . '</li>
|
645 |
+
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumactions-' . $id . '\');">' . __( 'Content', 'wp-photo-album-plus' ) . '</li>
|
646 |
+
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumcovers-' . $id . '\');">' . __( 'Cover', 'wp-photo-album-plus' ) . '</li>
|
647 |
+
<li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#itemdisplay-' . $id . '\');">' . __( 'Display', 'wp-photo-album-plus' ) . '</li>
|
648 |
</ul>
|
649 |
<div style="clear:both"></div>
|
650 |
</div>');
|
664 |
<div
|
665 |
id="albumitem-' . $id . '"
|
666 |
class="wppa-table-wrap wppa-tabcontent"
|
667 |
+
style="position:relative;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
|
668 |
>' );
|
669 |
|
670 |
// Section 0: More or less static data
|
671 |
{
|
672 |
+
wppa_echo( '
|
673 |
+
<div class="wppa-flex">' );
|
674 |
+
|
675 |
+
wppa_echo( '
|
676 |
+
<fieldset class="wppa-fieldset" style="width:100%">
|
677 |
+
<legend class="wppa-legend">' .
|
678 |
+
__( 'Unchangeable items', 'wp-photo-album-plus' ) . '
|
679 |
+
</legend>' );
|
680 |
|
681 |
// Album number, crypt, timestamp and modified
|
682 |
+
wppa_echo( '
|
683 |
+
<div class="left">
|
684 |
<label>' .
|
685 |
__( 'Album number', 'wp-photo-album-plus' ) . '
|
686 |
</label><br>
|
688 |
$id . '
|
689 |
</div>
|
690 |
</div>
|
691 |
+
<div class="left">
|
692 |
<label>' .
|
693 |
+
__( 'Encrypted', 'wp-photo-album-plus' ) . '
|
694 |
</label><br>
|
695 |
<div class="wppa-ldi">' .
|
696 |
$crypt . '
|
697 |
</div>
|
698 |
</div>
|
699 |
+
<div class="left">
|
700 |
<label>' .
|
701 |
__( 'Created', 'wp-photo-album-plus' ) . '
|
702 |
</label><br>
|
703 |
<div class="wppa-ldi">' .
|
704 |
wppa_local_date( '', $timestamp ) . '
|
705 |
</div>
|
706 |
+
</div>' );
|
707 |
+
|
708 |
+
wppa_echo( '
|
709 |
+
<div class="left">
|
710 |
<label>' .
|
711 |
__( 'Modified', 'wp-photo-album-plus' ) . '
|
712 |
</label><br>
|
713 |
+
<div class="wppa-ldi">' );
|
714 |
if ( $modified > $timestamp ) {
|
715 |
+
wppa_echo( wppa_local_date( '', $modified ) );
|
716 |
}
|
717 |
else {
|
718 |
+
wppa_echo( __( 'Not modified', 'wp-photo-album-plus' ) );
|
719 |
}
|
720 |
+
wppa_echo( '
|
721 |
</div>
|
722 |
+
</div>' );
|
723 |
|
724 |
// Views
|
725 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
726 |
+
wppa_echo( '
|
727 |
+
<div class="left">
|
728 |
<label>' .
|
729 |
__( 'Album Views', 'wp-photo-album-plus' ) . '
|
730 |
</label><br>
|
732 |
$views . '
|
733 |
</div>
|
734 |
</div>
|
735 |
+
<div class="left">
|
736 |
<label>' .
|
737 |
__( 'Photo views', 'wp-photo-album-plus' ) . '
|
738 |
</label><br>
|
739 |
<div class="wppa-ldi">' .
|
740 |
$pviews . '
|
741 |
</div>
|
742 |
+
</div>' );
|
743 |
if ( $nsub ) {
|
744 |
+
wppa_echo( '
|
745 |
+
<div class="left">
|
746 |
<label>' .
|
747 |
__( 'Inc subalbums', 'wp-photo-album-plus' ) . '
|
748 |
</label><br>
|
749 |
<div class="wppa-ldi">' .
|
750 |
$tpviews . '
|
751 |
</div>
|
752 |
+
</div>' );
|
753 |
}
|
754 |
}
|
755 |
|
756 |
// Clicks
|
757 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
758 |
$click_arr = $wpdb->get_col( "SELECT clicks FROM $wpdb->wppa_photos WHERE album = $id" );
|
759 |
+
wppa_echo( '
|
760 |
+
<div class="left">
|
761 |
<label>' .
|
762 |
+
__( 'Clicks', 'wp-photo-album-plus' ) . '
|
763 |
</label><br>
|
764 |
<div class="wppa-ldi">' .
|
765 |
array_sum( $click_arr ) . '
|
766 |
</div>
|
767 |
+
</div>' );
|
768 |
}
|
769 |
|
770 |
+
wppa_echo( '</fieldset>' );
|
771 |
+
|
772 |
+
wppa_echo( '</div>' );
|
773 |
}
|
774 |
|
775 |
// Section 1: Short settable items
|
778 |
<!-- Album Section 1 simple settings -->
|
779 |
<div class="wppa-flex">' );
|
780 |
|
781 |
+
wppa_echo( '
|
782 |
+
<fieldset class="wppa-fieldset" style="width:100%">
|
783 |
+
<legend class="wppa-legend">' .
|
784 |
+
__( 'Changeable items', 'wp-photo-album-plus' ) . '
|
785 |
+
</legend>' );
|
786 |
+
|
787 |
// Owner
|
788 |
{
|
789 |
$result = '
|
790 |
+
<div class="left">
|
791 |
<label
|
792 |
for="albumowner">' .
|
793 |
+
__( 'Owned by', 'wp-photo-album-plus' ) . '
|
794 |
</label><br>';
|
795 |
|
796 |
if ( ! wppa_user_is( 'administrator' ) ) {
|
842 |
// Order # -->
|
843 |
{
|
844 |
wppa_echo( '
|
845 |
+
<div class="left">
|
846 |
<label
|
847 |
for="albumseqno">' .
|
848 |
__( 'Sequence number', 'wp-photo-album-plus' ) . '
|
864 |
__( 'Publish: visible for all, Private: visible for logged in only, Hidden: visible for admin only', 'wp-photo-album-plus' );
|
865 |
|
866 |
wppa_echo( '
|
867 |
+
<div class="left">
|
868 |
<label
|
869 |
for="albumstatus">' .
|
870 |
__( 'Status', 'wp-photo-album-plus' ) . '
|
890 |
// Parent
|
891 |
{
|
892 |
$result = '
|
893 |
+
<div class="left">
|
894 |
<label
|
895 |
for="wppa-parsel">' .
|
896 |
__( 'Parent album', 'wp-photo-album-plus' ) . '
|
945 |
// P-order-by
|
946 |
if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
947 |
$result = '
|
948 |
+
<div class="left"
|
949 |
style="max-width: 200px;margin-right: 4px;">
|
950 |
<label
|
951 |
for="photo-order"
|
952 |
>' .
|
953 |
|
954 |
+
__( 'Photo sequence', 'wp-photo-album-plus' ) . '
|
955 |
</label><br>';
|
956 |
$options = array( __( '--- default ---', 'wp-photo-album-plus' ),
|
957 |
+
__( 'Sequence #', 'wp-photo-album-plus' ),
|
958 |
__( 'Name', 'wp-photo-album-plus' ),
|
959 |
__( 'Random', 'wp-photo-album-plus' ),
|
960 |
__( 'Rating mean value', 'wp-photo-album-plus' ),
|
961 |
__( 'Number of votes', 'wp-photo-album-plus' ),
|
962 |
__( 'Timestamp', 'wp-photo-album-plus' ),
|
963 |
__( 'EXIF Date', 'wp-photo-album-plus' ),
|
964 |
+
__( 'Sequence # descending', 'wp-photo-album-plus' ),
|
965 |
+
__( 'Name descending', 'wp-photo-album-plus' ),
|
966 |
+
__( 'Rating mean value descending', 'wp-photo-album-plus' ),
|
967 |
+
__( 'Number of votes descending', 'wp-photo-album-plus' ),
|
968 |
+
__( 'Timestamp descending', 'wp-photo-album-plus' ),
|
969 |
+
__( 'EXIF Date descending', 'wp-photo-album-plus' )
|
970 |
);
|
971 |
$values = array( '0',
|
972 |
'1',
|
1011 |
wppa_echo( $result );
|
1012 |
}
|
1013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
// Alternative thumbnail size
|
1015 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1016 |
$title = sprintf( __( 'The alternate thumbnail size is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'thumbs', 1, 2 ), wppa_opt( 'thumbsize_alt' ) );
|
1017 |
|
1018 |
$sel = ' selected';
|
1019 |
wppa_echo( '
|
1020 |
+
<div class="left"
|
1021 |
style="max-width: 200px;margin-right: 4px;">
|
1022 |
<label
|
1023 |
for="altthumb">' .
|
1038 |
</div>' );
|
1039 |
}
|
1040 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1041 |
// Upload limit
|
1042 |
{
|
1043 |
$result = '
|
1044 |
+
<div class="left">
|
1045 |
<label
|
1046 |
for="upload_limit_count">' .
|
1047 |
+
__( 'Upload limit', 'wp-photo-album-plus' ) . '
|
1048 |
</label><br>';
|
1049 |
$lims = explode( '/', $upload_limit );
|
1050 |
if ( ! is_array( $lims ) ) {
|
1101 |
__( 'This setting overrules all other limits that may apply to this album or its (grand)children.', 'wp-photo-album-plus' ) . ' ' .
|
1102 |
__( '0 means no limit.', 'wp-photo-album-plus' );
|
1103 |
wppa_echo( '
|
1104 |
+
<div class="left">
|
1105 |
<label
|
1106 |
for="uploadlimittree">' .
|
1107 |
__( 'Tree upload limit', 'wp-photo-album-plus' ) . '
|
1117 |
</div>' );
|
1118 |
}
|
1119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1120 |
// Watermark
|
1121 |
if ( wppa_switch( 'watermark_on' ) ) {
|
1122 |
|
1123 |
wppa_echo( '
|
1124 |
+
<div class="left"
|
1125 |
style="max-width: 200px;margin-right: 4px;">
|
1126 |
<label
|
1127 |
for="watermarkfile">' .
|
1128 |
+
__( 'Watermark file', 'wp-photo-album-plus' ) . '
|
1129 |
</label><br>
|
1130 |
<select
|
1131 |
id="watermarkfile"
|
1134 |
wppa_watermark_file_select( 'album', $id ) . '
|
1135 |
</select>
|
1136 |
</div>
|
1137 |
+
<div class="left"
|
1138 |
style="max-width: 200px;margin-right: 4px;">
|
1139 |
<label
|
1140 |
for="watermarkpos">' .
|
1141 |
+
__( 'Watermark pos', 'wp-photo-album-plus' ) . '
|
1142 |
</label><br>
|
1143 |
<select
|
1144 |
id="watermarkpos"
|
1149 |
</div>' );
|
1150 |
}
|
1151 |
|
1152 |
+
wppa_echo( '</fieldset>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1153 |
wppa_echo( '</div>' );
|
1154 |
}
|
1155 |
// End Section 1: Short settable items, wppa-flex div
|
1156 |
|
1157 |
+
// Section 2: name, description, custom, flex column
|
1158 |
+
wppa_echo( '
|
1159 |
+
<div class="wppa-flex-column">' );
|
1160 |
|
1161 |
+
// Name
|
1162 |
+
{
|
1163 |
+
wppa_echo( '
|
1164 |
+
<fieldset class="wppa-fieldset">
|
1165 |
+
<legend class="wppa-legend">' .
|
1166 |
+
__( 'Name', 'wp-photo-album-plus' ) . '
|
1167 |
+
</legend>
|
1168 |
+
<input
|
1169 |
+
type="text"
|
1170 |
+
style="width:100%;"
|
1171 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'name\', this )"
|
1172 |
+
value="' . esc_attr( $name ) . '"
|
1173 |
+
/>
|
1174 |
+
<span class="description" >' .
|
1175 |
+
__( 'Type the name of the album. Do not leave this empty.', 'wp-photo-album-plus' ) . '
|
1176 |
+
</span>
|
1177 |
+
<span style="float:right">' .
|
1178 |
+
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
1179 |
+
</span>
|
1180 |
+
</fieldset>' );
|
1181 |
+
}
|
1182 |
|
1183 |
+
// Description
|
1184 |
+
{
|
1185 |
+
wppa_echo( '
|
1186 |
+
<fieldset class="wppa-fieldset">
|
1187 |
+
<legend class="wppa-legend">' .
|
1188 |
+
__( 'Description', 'wp-photo-album-plus' ) . '
|
1189 |
+
</legend>' );
|
1190 |
+
|
1191 |
+
// WP Editor
|
1192 |
+
if ( wppa_switch( 'use_wp_editor') ) {
|
1193 |
+
|
1194 |
+
// Echos itsself, has no return option
|
1195 |
+
wp_editor( $description,
|
1196 |
+
'wppaalbumdesc',
|
1197 |
+
array( 'wpautop' => true,
|
1198 |
+
'media_buttons' => false,
|
1199 |
+
'textarea_rows' => '6',
|
1200 |
+
'tinymce' => true
|
1201 |
+
)
|
1202 |
+
);
|
1203 |
|
1204 |
+
wppa_echo( '
|
1205 |
+
<input
|
1206 |
+
style="margin-top: 8px;"
|
1207 |
+
type="button"
|
1208 |
+
class="button button-secondary"
|
1209 |
+
value="' . esc_attr( __( 'Update Album description', 'wp-photo-album-plus' ) ) . '"
|
1210 |
+
onclick="wppaAjaxUpdateAlbum( ' . $id . ', \'description\', wppaGetTinyMceContent(\'wppaalbumdesc\') )"
|
1211 |
+
/>
|
1212 |
+
<img
|
1213 |
+
id="wppa-album-spin"
|
1214 |
+
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1215 |
+
alt="Spin"
|
1216 |
+
style="visibility:hidden"
|
1217 |
+
/>' );
|
1218 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
|
1220 |
+
// Textarea
|
1221 |
+
else {
|
1222 |
+
wppa_echo( '
|
1223 |
+
<div>
|
1224 |
+
<label style="font-weight: 600;">' . __( 'Description', 'wp-photo-album-plus' ) . '</label><br>
|
1225 |
+
<textarea
|
1226 |
+
style="width:100%;height:60px;"
|
1227 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'description\', this )"
|
1228 |
+
>' .
|
1229 |
+
esc_textarea( stripslashes( $description ) ) . '
|
1230 |
+
</textarea>
|
1231 |
+
</div>' );
|
1232 |
+
}
|
1233 |
+
wppa_echo( '
|
1234 |
+
</fieldset>' );
|
1235 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1236 |
|
1237 |
+
// Categories
|
1238 |
+
{
|
1239 |
+
$result = '
|
1240 |
+
<fieldset class="wppa-fieldset">
|
1241 |
+
<legend class="wppa-legend">' .
|
1242 |
+
__( 'Categories', 'wp-photo-album-plus' ) . '
|
1243 |
+
</legend>
|
1244 |
+
<input
|
1245 |
+
id="cats"
|
1246 |
+
type="text"
|
1247 |
+
style="width:100%;"
|
1248 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', this )"
|
1249 |
+
value="' . esc_attr( $cats ) . '"
|
1250 |
+
/>
|
1251 |
+
<div style="margin: 8px 0;">
|
1252 |
+
<span class="description" >' .
|
1253 |
+
__( 'Separate categories with commas.', 'wp-photo-album-plus' ) . '
|
1254 |
+
</span>
|
1255 |
+
<select
|
1256 |
+
onchange="wppaAddCat( this.value, \'cats\' ); wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', document.getElementById( \'cats\' ) )"
|
1257 |
+
>';
|
1258 |
+
$catlist = wppa_get_catlist();
|
1259 |
+
if ( is_array( $catlist ) ) {
|
1260 |
+
$result .= '
|
1261 |
+
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
1262 |
+
foreach ( $catlist as $cat ) {
|
1263 |
+
$result .= '
|
1264 |
+
<option value="' . esc_attr( $cat['cat'] ) . '" >' . htmlspecialchars( $cat['cat'] ) . '</option>';
|
1265 |
+
}
|
1266 |
}
|
|
|
|
|
1267 |
else {
|
1268 |
+
$result .= '
|
1269 |
+
<option value="0" >' . __( 'No categories yet', 'wp-photo-album-plus' ) . '</option>';
|
|
|
|
|
|
|
|
|
|
|
1270 |
}
|
1271 |
+
$result .= '
|
1272 |
+
</select>
|
1273 |
+
</div>
|
1274 |
+
</fieldset>';
|
1275 |
+
wppa_echo( $result );
|
1276 |
+
}
|
1277 |
|
1278 |
+
// Custom
|
1279 |
+
if ( wppa_switch( 'album_custom_fields' ) ) {
|
1280 |
+
$result = '';
|
1281 |
+
$custom = wppa_get_album_item( $edit_id, 'custom' );
|
1282 |
+
if ( $custom ) {
|
1283 |
+
$custom_data = wppa_unserialize( $custom );
|
1284 |
}
|
1285 |
+
else {
|
1286 |
+
$custom_data = array( '', '', '', '', '', '', '', '', '', '' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1287 |
}
|
1288 |
|
1289 |
+
// Open fieldset
|
1290 |
+
wppa_echo( '
|
1291 |
+
<fieldset class="wppa-fieldset">
|
1292 |
+
<legend class="wppa-legend">' .
|
1293 |
+
__( 'Custom data fields', 'wp-photo-album-plus' ) . '
|
1294 |
+
</legend>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1295 |
|
1296 |
+
/*
|
1297 |
+
wppa_echo( '
|
1298 |
+
<table class="wppa-table" style="width:100%">
|
1299 |
+
<colgroup style="width:160px" />
|
1300 |
+
<colgroup />
|
1301 |
+
<colgroup style="width:60px" />
|
1302 |
+
<thead>
|
|
|
|
|
|
|
|
|
|
|
|
|
1303 |
<tr>
|
1304 |
+
<td>' . __( 'Caption', 'wp-photo-album-plus' ) . '<span style="float:right">(' . __( 'keyword', 'wp-photo-album-plus' ) . ')</span></td>
|
1305 |
+
<td>' . __( 'Custom content', 'wp-photo-album-plus' ) . '</td>
|
1306 |
+
<td>(' . __( 'keyword', 'wp-photo-album-plus' ) . ')</td>
|
1307 |
+
</tr>
|
1308 |
+
</thead>
|
1309 |
+
<tbody>' );
|
1310 |
+
*/
|
1311 |
+
|
1312 |
+
foreach( array_keys( $custom_data ) as $key ) {
|
1313 |
+
if ( wppa_opt( 'album_custom_caption_' . $key ) ) {
|
1314 |
+
|
1315 |
+
wppa_echo( '
|
1316 |
+
<div>
|
1317 |
+
<label>
|
1318 |
+
<span style="float:left">' .
|
1319 |
+
apply_filters( 'translate_text', wppa_opt( 'album_custom_caption_' . $key ) ) . ' (w#cc' . $key . ')
|
1320 |
+
</span>
|
1321 |
+
<span style="float:right">
|
1322 |
+
(w#cd' . $key . ')
|
1323 |
+
</span>
|
1324 |
+
</label><br>
|
1325 |
<input
|
1326 |
type="text"
|
1327 |
+
style="width:100%"
|
1328 |
id="album_custom_' . $key . '-' . $id . '"
|
1329 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'album_custom_' . $key . '\', this.value)"
|
1330 |
value="' . esc_attr( stripslashes( $custom_data[$key] ) ) . '"
|
1331 |
/>
|
1332 |
+
<div>' );
|
1333 |
+
/*
|
1334 |
+
wppa_echo( '
|
1335 |
+
<tr>
|
1336 |
+
<td>
|
1337 |
+
' . apply_filters( 'translate_text', wppa_opt( 'album_custom_caption_' . $key ) ) . '
|
1338 |
+
<small style="float:right" >
|
1339 |
+
(w#cc' . $key . ')
|
1340 |
+
</small>
|
1341 |
+
</td>
|
1342 |
+
<td>
|
1343 |
+
<input
|
1344 |
+
type="text"
|
1345 |
+
style="width:100%"
|
1346 |
+
id="album_custom_' . $key . '-' . $id . '"
|
1347 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'album_custom_' . $key . '\', this );"
|
1348 |
+
value="' . esc_attr( stripslashes( $custom_data[$key] ) ) . '"
|
1349 |
+
/>
|
1350 |
+
</td>
|
1351 |
+
<td>
|
1352 |
+
<small>
|
1353 |
+
(w#cd' . $key . ')
|
1354 |
+
</small>
|
1355 |
+
</td>
|
1356 |
+
</tr>' );
|
1357 |
+
*/
|
1358 |
+
}
|
1359 |
}
|
|
|
|
|
|
|
1360 |
|
1361 |
+
/*
|
1362 |
+
wppa_echo( '
|
1363 |
+
</tbody>
|
1364 |
+
</table>
|
1365 |
+
</fieldset>' );
|
1366 |
+
*/
|
1367 |
+
wppa_echo( '</fieldset>' );
|
1368 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1369 |
|
1370 |
+
// End Section 2
|
1371 |
+
wppa_echo( '
|
1372 |
+
</tbody>
|
1373 |
+
</table>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
+
// End flex column
|
1377 |
+
wppa_echo( '</div>' );
|
|
|
|
|
|
|
1378 |
|
1379 |
// End Tab 1
|
1380 |
wppa_echo( '
|
1381 |
</div>' ); // Tab 1
|
1382 |
|
1383 |
|
1384 |
+
// Tab 2: Related albums
|
1385 |
wppa_echo( '
|
1386 |
<div id="subalbumitem-' . $id . '"
|
1387 |
class="wppa-table-wrap wppa-tabcontent"
|
1388 |
+
style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
|
1389 |
>' );
|
1390 |
|
1391 |
// Explanation
|
1462 |
/>' );
|
1463 |
}
|
1464 |
|
1465 |
+
// Subalbums sequence
|
1466 |
+
if ( $has_children ) {
|
1467 |
+
wppa_album_sequence( $edit_id );
|
1468 |
+
}
|
1469 |
+
|
1470 |
+
// End Tab 2
|
1471 |
+
wppa_echo( '
|
1472 |
+
</div>' );
|
1473 |
+
|
1474 |
+
|
1475 |
+
// Tab 3: Album Actions
|
1476 |
+
wppa_echo( '
|
1477 |
+
<div
|
1478 |
+
id="albumactions-' . $id . '"
|
1479 |
+
class="wppa-table-wrap wppa-tabcontent"
|
1480 |
+
style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
|
1481 |
+
>' );
|
1482 |
+
|
1483 |
+
// Explanation
|
1484 |
+
wppa_echo( '
|
1485 |
+
<h2 class="description" style="margin:1em">' .
|
1486 |
+
__( 'The following buttons perform actions onto all items in this album', 'wp-photo-album-plus' ) . '
|
1487 |
+
</h2>' );
|
1488 |
+
|
1489 |
+
wppa_echo( '<div class="wppa-flex">' );
|
1490 |
+
|
1491 |
+
// Default photo tags
|
1492 |
+
{
|
1493 |
+
wppa_echo( '
|
1494 |
+
<div>
|
1495 |
+
<label>' .
|
1496 |
+
__( 'Default photo tags', 'wp-photo-album-plus' ) . '
|
1497 |
+
</label><br>
|
1498 |
+
<input
|
1499 |
+
type="text"
|
1500 |
+
id="default_tags"
|
1501 |
+
value="' . esc_attr( $default_tags ) . '"
|
1502 |
+
style="width:100%"
|
1503 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'default_tags\', this )"
|
1504 |
+
/>
|
1505 |
+
<br>
|
1506 |
+
<span class="description">' .
|
1507 |
+
__( 'Enter the tags that you want to be assigned to new photos in this album.', 'wp-photo-album-plus' ) . '
|
1508 |
+
</span>
|
1509 |
+
</div>' );
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
// Apply default tags
|
1513 |
+
{
|
1514 |
+
wppa_echo( '
|
1515 |
+
<div>
|
1516 |
+
<label> </label><br>
|
1517 |
+
<input
|
1518 |
+
type="button"
|
1519 |
+
class="wppa-admin-button button"
|
1520 |
+
title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
|
1521 |
+
onclick="wppaTryApplyDeftags( ' . $id . ' )"
|
1522 |
+
value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
|
1523 |
+
/>
|
1524 |
+
<input
|
1525 |
+
type="button"
|
1526 |
+
class="wppa-admin-button button"
|
1527 |
+
title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
|
1528 |
+
onclick="wppaTryAddDeftags( ' . $id . ' )"
|
1529 |
+
value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
|
1530 |
+
/>
|
1531 |
+
</div>' );
|
1532 |
+
}
|
1533 |
+
|
1534 |
+
// Apply New photo desc
|
1535 |
+
if ( wppa_switch( 'apply_newphoto_desc') ) {
|
1536 |
+
$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\'';
|
1537 |
+
wppa_echo( '
|
1538 |
+
<div>
|
1539 |
+
<label> </label><br>
|
1540 |
+
<input
|
1541 |
+
type="button"
|
1542 |
+
class="wppa-admin-button button"
|
1543 |
+
onclick="' . $onc . '"
|
1544 |
+
value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
|
1545 |
+
/>
|
1546 |
+
</div>' );
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
// Set all to pano
|
1550 |
+
if ( wppa_switch( 'enable_panorama' ) ) {
|
1551 |
+
|
1552 |
+
wppa_echo( '
|
1553 |
+
<div>
|
1554 |
+
<label> </label><br>
|
1555 |
+
<input
|
1556 |
+
type="button"
|
1557 |
+
class="wppa-admin-button button"
|
1558 |
+
onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
|
1559 |
+
value="' . esc_attr( __( 'Set all to panorama', 'wp-photo-album-plus' ) ).':"
|
1560 |
+
/>
|
1561 |
+
<select id="pano-opt"
|
1562 |
+
style="">
|
1563 |
+
<option value="9" disabled selected>' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
|
1564 |
+
<option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1565 |
+
<option value="1">' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1566 |
+
<option value="2">' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1567 |
+
</select>
|
1568 |
+
</div>' );
|
1569 |
+
}
|
1570 |
+
|
1571 |
+
// End wppa-flex div
|
1572 |
+
wppa_echo( '</div>' );
|
1573 |
+
|
1574 |
+
// Second line
|
1575 |
+
wppa_echo( '<div class="wppa-flex">' );
|
1576 |
+
|
1577 |
+
// Schedule
|
1578 |
+
{
|
1579 |
+
wppa_echo( '
|
1580 |
+
<div style="flex-basis: 30em; ">
|
1581 |
+
<label
|
1582 |
+
for="schedule-box">' .
|
1583 |
+
__( 'Schedule', 'wp-photo-album-plus' ) . '
|
1584 |
+
</label><br>
|
1585 |
+
<input
|
1586 |
+
type="checkbox"
|
1587 |
+
id="schedule-box"' .
|
1588 |
+
( $albuminfo['scheduledtm'] ? ' checked="checked"' : '' ) . '
|
1589 |
+
onchange="wppaChangeScheduleAlbum(' . $id . ', this );"
|
1590 |
+
style="margin: 5px 4px 9px 0;"
|
1591 |
+
/>
|
1592 |
+
<input type="hidden" value="" id="wppa-dummy" style="min-height: 28px;"/>
|
1593 |
+
<span
|
1594 |
+
class="wppa-datetime-' . $id . '"' .
|
1595 |
+
( $albuminfo['scheduledtm'] ? '' : ' style="display:none"' ) . '
|
1596 |
+
>' .
|
1597 |
+
wppa_get_date_time_select_html( 'album', $id, true ) . '
|
1598 |
+
</span>
|
1599 |
+
<br>
|
1600 |
+
<span class="description" >' .
|
1601 |
+
__( 'New photos will be published on the date/time specified here.', 'wp-photo-album-plus' ) . '
|
1602 |
+
</span>
|
1603 |
+
</div>' );
|
1604 |
+
}
|
1605 |
+
|
1606 |
+
// Schedule all
|
1607 |
+
{
|
1608 |
+
wppa_echo( '
|
1609 |
+
<div>
|
1610 |
+
<label> </label><br>
|
1611 |
+
<input
|
1612 |
+
type="button"
|
1613 |
+
class="wppa-admin-button button"
|
1614 |
+
title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
|
1615 |
+
onclick="wppaTryScheduleAll( ' . $id . ' )"
|
1616 |
+
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1617 |
+
/>
|
1618 |
+
</div>' );
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
// Reset Ratings
|
1622 |
+
if ( wppa_switch( 'rating_on') ) {
|
1623 |
+
$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 ); }';
|
1624 |
+
wppa_echo( '
|
1625 |
+
<div>
|
1626 |
+
<label> </label><br>
|
1627 |
+
<input
|
1628 |
+
type="button"
|
1629 |
+
class="wppa-admin-button button"
|
1630 |
+
onclick="' . $onc . '"
|
1631 |
+
value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
|
1632 |
+
/>
|
1633 |
+
</div>' );
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
// Remake all
|
1637 |
+
if ( wppa_user_is( 'administrator' ) ) {
|
1638 |
+
$onc = 'if ( confirm(\'Are you sure you want to remake the files for all photos in this album?\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&remakealbum=1\'';
|
1639 |
+
wppa_echo( '
|
1640 |
+
<div>
|
1641 |
+
<label> </label><br>
|
1642 |
+
<input
|
1643 |
+
type="button"
|
1644 |
+
class="wppa-admin-button button"
|
1645 |
+
onclick="' . $onc . '"
|
1646 |
+
value="' . esc_attr( __( 'Remake all', 'wp-photo-album-plus' ) ) . '"
|
1647 |
+
/>
|
1648 |
+
</div>' );
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
// Schedule for delete
|
1652 |
+
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1653 |
+
$may_change = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
1654 |
+
|
1655 |
+
wppa_echo( '
|
1656 |
+
<div style="flex-basis: 30em; ">
|
1657 |
+
<label
|
1658 |
+
for="scheduledel">' .
|
1659 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1660 |
+
</label><br>
|
1661 |
+
<input
|
1662 |
+
type="checkbox"
|
1663 |
+
style="margin: 5px 4px 9px 0;"
|
1664 |
+
id="scheduledel"' .
|
1665 |
+
( $scheduledel ? ' checked="checked"' : '' ) .
|
1666 |
+
( $may_change ? '' : ' disabled' ) . '
|
1667 |
+
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
1668 |
+
/>
|
1669 |
+
<input type="hidden" value="" id="wppa-dummy-del" />
|
1670 |
+
<span
|
1671 |
+
class="wppa-datetimedel-' . $id . '"' .
|
1672 |
+
( $albuminfo['scheduledel'] ? '' : ' style="display:none"' ) . '
|
1673 |
+
>' .
|
1674 |
+
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1675 |
+
</span>
|
1676 |
+
</div>' );
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
// End wppa-flex div
|
1680 |
+
wppa_echo( '</div>' );
|
1681 |
+
|
1682 |
+
// End Tab 3
|
1683 |
+
wppa_echo( '
|
1684 |
+
</div>' );
|
1685 |
+
|
1686 |
+
// Tab 4 ALbum cover settings
|
1687 |
+
wppa_echo( '
|
1688 |
+
<div
|
1689 |
+
id="albumcovers-' . $id . '"
|
1690 |
+
class="wppa-table-wrap wppa-tabcontent"
|
1691 |
+
style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
|
1692 |
+
>' );
|
1693 |
+
|
1694 |
+
// Explanation
|
1695 |
+
wppa_echo( '
|
1696 |
+
<h2 class="description" style="margin:1em">' .
|
1697 |
+
__( 'The following settings apply to the album cover', 'wp-photo-album-plus' ) . '
|
1698 |
+
</h2>' );
|
1699 |
+
|
1700 |
+
wppa_echo( '<div class="wppa-flex">' );
|
1701 |
+
|
1702 |
+
// Cover type
|
1703 |
+
if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1704 |
+
$sel = ' selected';
|
1705 |
+
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'covers', 3, 4 ), wppa_opt( 'cover_type' ) );
|
1706 |
+
|
1707 |
+
wppa_echo( '
|
1708 |
+
<div
|
1709 |
+
style="max-width: 200px;margin-right: 4px;">
|
1710 |
+
<label
|
1711 |
+
for="covertype">' .
|
1712 |
+
__( 'Cover Type', 'wp-photo-album-plus' ) . '
|
1713 |
+
</label><br>
|
1714 |
+
<select
|
1715 |
+
id="covertype"
|
1716 |
+
style="max-width:200px;"
|
1717 |
+
onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this.value )"
|
1718 |
+
title="' . esc_attr( $title ) . '"
|
1719 |
+
>
|
1720 |
+
<option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
|
1721 |
+
__( '--- default ---', 'wp-photo-album-plus' ) . '
|
1722 |
+
</option>
|
1723 |
+
<option value="default"' . ( $cover_type == 'default' ? $sel : '' ) . ' >' .
|
1724 |
+
__( 'Standard', 'wp-photo-album-plus' ) . '
|
1725 |
+
</option>
|
1726 |
+
<option value="longdesc"' . ( $cover_type == 'longdesc' ? $sel : '' ) . ' >' .
|
1727 |
+
__( 'Long Descriptions', 'wp-photo-album-plus' ) . '
|
1728 |
+
</option>
|
1729 |
+
<option value="imagefactory"' . ( $cover_type == 'imagefactory' ? $sel : '' ) . ' >' .
|
1730 |
+
__( 'Image Factory', 'wp-photo-album-plus' ) . '
|
1731 |
+
</option>
|
1732 |
+
<option value="default-mcr"' . ( $cover_type == 'default-mcr' ? $sel : '' ) . ' >' .
|
1733 |
+
__( 'Standard mcr', 'wp-photo-album-plus' ) . '
|
1734 |
+
</option>
|
1735 |
+
<option value="longdesc-mcr"' . ( $cover_type == 'longdesc-mcr' ? $sel : '' ) . ' >' .
|
1736 |
+
__( 'Long Descriptions mcr', 'wp-photo-album-plus' ) . '
|
1737 |
+
</option>
|
1738 |
+
<option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
|
1739 |
+
__( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
|
1740 |
+
</option>
|
1741 |
+
</select>
|
1742 |
+
</div>' );
|
1743 |
+
}
|
1744 |
+
|
1745 |
+
// Cover photo
|
1746 |
+
{
|
1747 |
+
wppa_echo( '
|
1748 |
+
<div>
|
1749 |
+
<label>' .
|
1750 |
+
__( 'Cover Photo', 'wp-photo-album-plus' ) . '
|
1751 |
+
</label><br>' .
|
1752 |
+
wppa_main_photo( $main_photo, $cover_type ) . '
|
1753 |
+
</div>' );
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
// Link type
|
1757 |
+
{
|
1758 |
+
$result = '
|
1759 |
+
<div>
|
1760 |
+
<label>' .
|
1761 |
+
__( 'Link type', 'wp-photo-album-plus' ) . '
|
1762 |
+
</label><br>';
|
1763 |
+
$sel = ' selected';
|
1764 |
+
$lt = $cover_linktype;
|
1765 |
+
if ( wppa_switch( 'auto_page' ) ) {
|
1766 |
+
$title = __( 'If you select "the link page with a clean url", select an Auto Page of one of the photos in this album.', 'wp-photo-album-plus' );
|
1767 |
+
}
|
1768 |
+
else {
|
1769 |
+
$title = __( 'If you select "the link page with a clean url", make sure you enter the correct shortcode on the target page.', 'wp-photo-album-plus' );
|
1770 |
+
}
|
1771 |
+
$result .= '
|
1772 |
+
<select
|
1773 |
+
title="' . esc_attr( $title ) . '"
|
1774 |
+
onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
|
1775 |
+
<option value="content"' . ( $lt == 'content' ? $sel : '' ) . ' >' . __( 'the subalbums and thumbnails', 'wp-photo-album-plus' ) . '</option>
|
1776 |
+
<option value="albums"' . ( $lt == 'albums' ? $sel : '' ) . ' >' . __( 'the subalbums', 'wp-photo-album-plus' ) . '</option>
|
1777 |
+
<option value="thumbs"' . ( $lt == 'thumbs' ? $sel : '' ) . ' >' . __( 'the thumbnails', 'wp-photo-album-plus' ) . '</option>
|
1778 |
+
<option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
|
1779 |
+
<option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
|
1780 |
+
<option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
|
1781 |
+
<option value="manual"' . ( $lt == 'manual' ? $sel : '' ) . ' >' . __( 'manually entered', 'wp-photo-album-plus' ) . '</option>
|
1782 |
+
</select>
|
1783 |
+
<br>
|
1784 |
+
<span class="description">';
|
1785 |
+
|
1786 |
+
$result .= '
|
1787 |
+
</span>
|
1788 |
+
</div>';
|
1789 |
+
wppa_echo( $result );
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
// Manually entered link
|
1793 |
+
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1794 |
+
$result = '
|
1795 |
+
<div
|
1796 |
+
id="link-url-tr"
|
1797 |
+
style="' . ( $cover_linktype == 'manual' ? '' : 'display:none' ) . '"
|
1798 |
+
>
|
1799 |
+
<label>' .
|
1800 |
+
__( 'Link target (url)', 'wp-photo-album-plus' ) . '
|
1801 |
+
</label><br>';
|
1802 |
+
$title = __( 'Enter the url you want the title to link to when you selected Link type manually entered.', 'wp-photo-album-plus' );
|
1803 |
+
$result .= '
|
1804 |
+
<input
|
1805 |
+
type="text"
|
1806 |
+
title="' . $title . '"
|
1807 |
+
id="cover_link"
|
1808 |
+
value="' . esc_attr( $cover_link ) . '"
|
1809 |
+
style="width:100%"
|
1810 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cover_link\', this )"
|
1811 |
+
/>
|
1812 |
+
</div>';
|
1813 |
+
wppa_echo( $result );
|
1814 |
}
|
1815 |
|
1816 |
+
// Link page
|
1817 |
+
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1818 |
+
$result = '
|
1819 |
+
<div
|
1820 |
+
id="-link-url-tr"
|
1821 |
+
style="' . ( $cover_linktype != 'manual' ? '' : 'display:none' ) . '"
|
1822 |
+
>
|
1823 |
+
<label>' .
|
1824 |
+
__( 'Link to', 'wp-photo-album-plus' ) . '
|
1825 |
+
</label><br>';
|
1826 |
+
$query = "SELECT ID, post_type, post_title, post_date FROM $wpdb->posts
|
1827 |
+
WHERE ( post_type = 'page' OR post_type = 'post' )
|
1828 |
+
AND post_status = 'publish'
|
1829 |
+
ORDER BY post_title ASC";
|
1830 |
+
$pages = $wpdb->get_results( $query, ARRAY_A );
|
1831 |
+
if ( empty( $pages ) ) {
|
1832 |
+
$result .= __( 'There are no posts/pages (yet) to link to.', 'wp-photo-album-plus' );
|
1833 |
+
}
|
1834 |
+
else {
|
1835 |
+
$linkpage = $albuminfo['cover_linkpage'];
|
1836 |
+
if ( ! is_numeric( $linkpage ) ) {
|
1837 |
+
$linkpage = '0';
|
1838 |
+
}
|
1839 |
+
$title = __( 'If you want, you can link the title to a WP page or post instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
|
1840 |
+
|
1841 |
+
$result .= '
|
1842 |
+
<select
|
1843 |
+
onchange="wppaAjaxUpdateAlbum( '. $id . ' , \'cover_linkpage\', this )"
|
1844 |
+
title="' . esc_attr( $title ) . '"
|
1845 |
+
style="max-width:100%;"
|
1846 |
+
>
|
1847 |
+
<option value="0"' . ( $linkpage == '0' ? $sel : '' ) . ' >' .
|
1848 |
+
__( '--- the same page or post ---', 'wp-photo-album-plus' ) .
|
1849 |
+
'</option>';
|
1850 |
+
foreach ( $pages as $page ) {
|
1851 |
+
$result .= '
|
1852 |
+
<option
|
1853 |
+
value="' . $page['ID'] . '"' .
|
1854 |
+
( $linkpage == $page['ID'] ? ' selected' : '' ) . '>' .
|
1855 |
+
__( htmlspecialchars( $page['post_title'] ) ) .
|
1856 |
+
( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
|
1857 |
+
'</option>';
|
1858 |
+
}
|
1859 |
+
$result .= '
|
1860 |
+
</select>';
|
1861 |
+
|
1862 |
+
|
1863 |
+
|
1864 |
+
}
|
1865 |
+
$result .= '
|
1866 |
+
</div>';
|
1867 |
+
|
1868 |
+
wppa_echo( $result );
|
1869 |
+
}
|
1870 |
+
|
1871 |
+
// End wppa-flex div
|
1872 |
+
wppa_echo( '</div>' );
|
1873 |
+
|
1874 |
+
wppa_echo( '
|
1875 |
+
<fieldset class="wppa-fieldset">
|
1876 |
+
<legend style="padding:0 8px;font-weight: 600;">' .
|
1877 |
+
__( 'Preview', 'wp-photo-album-plus' ) . '
|
1878 |
+
</legend>' );
|
1879 |
+
|
1880 |
+
// wppaGetCoverPreview( albumId, divId )
|
1881 |
+
// Preview album cover
|
1882 |
+
wppa_echo( '<div id="cover-preview-'.$id.'" style="margin-top:12px;clear:both;max-width:100%"></div>' );
|
1883 |
+
|
1884 |
+
wppa_echo('</fieldset>');
|
1885 |
+
|
1886 |
+
// End Tab 4
|
1887 |
wppa_echo( '
|
1888 |
</div>' );
|
1889 |
|
1890 |
+
// Tab 5 Display
|
|
|
1891 |
wppa_echo( '
|
1892 |
<div
|
1893 |
+
id="itemdisplay-' . $id . '"
|
1894 |
class="wppa-table-wrap wppa-tabcontent"
|
1895 |
+
style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
|
1896 |
>' );
|
1897 |
|
1898 |
// Explanation
|
1899 |
wppa_echo( '
|
1900 |
<h2 class="description" style="margin:1em">' .
|
1901 |
+
__( 'The following settings can overrule systemwide settings on a per album basis', 'wp-photo-album-plus' ) . '
|
1902 |
</h2>' );
|
1903 |
|
1904 |
+
wppa_echo( '<div class="wppa-flex">' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1905 |
|
1906 |
+
// Need this the next 5 items
|
1907 |
+
{
|
1908 |
+
$yes = __( 'yes', 'wp-photo-album-plus' );
|
1909 |
+
$no = __( 'no', 'wp-photo-album-plus' );
|
1910 |
+
$def = __( 'default', 'wp-photo-album-plus' );
|
1911 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1912 |
|
1913 |
+
// Zoomable
|
1914 |
+
{
|
1915 |
+
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
1916 |
+
sprintf( __( 'The default is set in %s and is currently %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'photos', 1, 4 ), ( wppa_switch( 'zoom_on' ) ? $yes : $no ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1917 |
|
1918 |
+
wppa_echo( '
|
1919 |
+
<div>
|
1920 |
+
<label
|
1921 |
+
for="zoomable">' .
|
1922 |
+
__( 'Photos are zoomable', 'wp-photo-album-plus' ) . '
|
1923 |
+
</label><br>
|
1924 |
+
<select
|
1925 |
+
id="zoomable"
|
1926 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )"
|
1927 |
+
title="' . esc_attr( $title ) . '" >
|
1928 |
+
<option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
|
1929 |
+
<option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
|
1930 |
+
<option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
|
1931 |
+
</select>
|
1932 |
+
</div>' );
|
1933 |
+
}
|
1934 |
|
1935 |
+
// Overrulable display options / next 4 items
|
1936 |
+
{
|
1937 |
+
if ( $displayopts ) {
|
1938 |
+
$disp_opt = explode( ',', $displayopts );
|
1939 |
+
}
|
1940 |
+
for ( $i = 0; $i < 4; $i++ ) {
|
1941 |
+
if ( ! isset( $disp_opt[$i] ) ) {
|
1942 |
+
$disp_opt[$i] = '0';
|
1943 |
+
}
|
1944 |
+
}
|
1945 |
+
$title_head = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . '
' .
|
1946 |
+
__( 'The defaults are set in', 'wp-photo-album-plus' ). ':
';
|
1947 |
+
}
|
1948 |
|
1949 |
+
// Display name
|
1950 |
+
{
|
1951 |
+
$title = $title_head .
|
1952 |
+
wppa_setting_path( 'b', 'slide', 1, 17, wppa_switch( 'show_full_name' ) ? $yes : $no ) . ',
' .
|
1953 |
+
wppa_setting_path( 'b', 'thumbs', 2, 1, wppa_switch( 'thumb_text_name' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1954 |
+
wppa_setting_path( 'b', 'lightbox', 1, 3, wppa_switch( 'ovl_name' ) ? $yes : $no ) . '.';
|
1955 |
|
1956 |
+
wppa_echo( '
|
1957 |
+
<div>
|
1958 |
+
<label
|
1959 |
+
for="showname">' .
|
1960 |
+
__( 'Show names', 'wp-photo-album-plus' ) . '
|
1961 |
+
</label><br>
|
1962 |
+
<select
|
1963 |
+
id="showname"
|
1964 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )"
|
1965 |
+
title="' . esc_attr( $title ) . '">
|
1966 |
+
<option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
|
1967 |
+
<option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
|
1968 |
+
<option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
|
1969 |
+
</select>
|
1970 |
+
</div>' );
|
1971 |
+
}
|
1972 |
|
1973 |
+
// Display description
|
1974 |
+
{
|
1975 |
+
$title = $title_head .
|
1976 |
+
wppa_setting_path( 'b', 'slide', 1, 20, wppa_switch( 'show_full_desc' ) ? $yes : $no ) . ',
' .
|
1977 |
+
wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_desc' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
1978 |
+
wppa_setting_path( 'b', 'lightbox', 1, 4, wppa_switch( 'ovl_desc' ) ? $yes : $no ) . '.';
|
1979 |
+
|
1980 |
+
wppa_echo( '
|
1981 |
+
<div>
|
1982 |
+
<label
|
1983 |
+
for="showdesc">' .
|
1984 |
+
__( 'Show descriptions', 'wp-photo-album-plus' ) . '
|
1985 |
+
</label><br>
|
1986 |
+
<select
|
1987 |
+
id="showdesc"
|
1988 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )"
|
1989 |
+
title="' . esc_attr( $title ) . '" >
|
1990 |
+
<option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
|
1991 |
+
<option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
|
1992 |
+
<option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
|
1993 |
+
</select>
|
1994 |
+
</div>' );
|
1995 |
+
}
|
1996 |
+
|
1997 |
+
// Display rating
|
1998 |
+
{
|
1999 |
+
$title = $title_head .
|
2000 |
+
wppa_setting_path( 'b', 'general', 1, 5, wppa_switch( 'rating_on' ) ? $yes : $no ) . ',
' .
|
2001 |
+
wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_rating' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
2002 |
+
wppa_setting_path( 'b', 'lightbox', 1, 5, wppa_switch( 'ovl_rating' ) ? $yes : $no ) . '.';
|
2003 |
+
|
2004 |
+
wppa_echo( '
|
2005 |
+
<div>
|
2006 |
+
<label
|
2007 |
+
for="showrating">' .
|
2008 |
+
__( 'Show rating', 'wp-photo-album-plus' ) . '
|
2009 |
+
</label><br>
|
2010 |
+
<select
|
2011 |
+
id="showrating"
|
2012 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )"
|
2013 |
+
title="' . esc_attr( $title ) . '" >
|
2014 |
+
<option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
|
2015 |
+
<option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
|
2016 |
+
<option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
|
2017 |
+
</select>
|
2018 |
+
</div>' );
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
// Display comments
|
2022 |
+
{
|
2023 |
+
$title = $title_head .
|
2024 |
+
wppa_setting_path( 'b', 'general', 1, 4, wppa_switch( 'show_comments' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '
' .
|
2025 |
+
wppa_setting_path( 'b', 'thumbs', 2, 4, wppa_switch( 'thumb_text_comcount' ) ? $yes : $no ) . '.';
|
2026 |
+
|
2027 |
+
wppa_echo( '
|
2028 |
+
<div>
|
2029 |
+
<label
|
2030 |
+
for="showcomments">' .
|
2031 |
+
__( 'Show comments', 'wp-photo-album-plus' ) . '
|
2032 |
+
</label><br>
|
2033 |
+
<select
|
2034 |
+
id="showcomments"
|
2035 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )"
|
2036 |
+
title="' . esc_attr( $title ) . '" >
|
2037 |
+
<option value="0"'.($disp_opt[3]=='0'?' selected': '').'>' . $def . '</option>
|
2038 |
+
<option value="1"'.($disp_opt[3]=='1'?' selected': '').'>' . $yes . '</option>
|
2039 |
+
<option value="-1"'.($disp_opt[3]=='-1'?' selected': '').'>' . $no . '</option>
|
2040 |
+
</select>
|
2041 |
+
</div>' );
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
|
2045 |
+
// End wppa-flex div
|
2046 |
+
wppa_echo( '</div>' );
|
2047 |
+
|
2048 |
+
// End Tab 5
|
2049 |
wppa_echo( '
|
2050 |
</div>' );
|
2051 |
|
2052 |
+
|
2053 |
// End of outer details block
|
2054 |
wppa_echo( '
|
2055 |
</details>' );
|
2064 |
if ( wppa_get( 'bulk' ) )
|
2065 |
$result = __( 'Copy / move / delete / edit name / edit description / change status', 'wp-photo-album-plus' );
|
2066 |
elseif ( wppa_get( 'seq' ) )
|
2067 |
+
$result = __( 'Change item sequence by drag and drop', 'wp-photo-album-plus' );
|
2068 |
elseif ( wppa_get( 'quick' ) )
|
2069 |
$result = __( 'Edit photo information except copy and move', 'wp-photo-album-plus' );
|
2070 |
elseif ( is_numeric( wppa_get( 'edit-id' ) ) ) {
|
2160 |
<img src="' . WPPA_URL . '/img/albumdel32.png" />
|
2161 |
<h1 style="display:inline">' . __( 'Delete Album', 'wp-photo-album-plus' ) . '</h1>
|
2162 |
|
2163 |
+
<p>' . __( 'Album', 'wp-photo-album-plus' ) . '<b>' . htmlspecialchars( wppa_get_album_name( wppa_get( 'edit-id' ) ) ) . '</b></p>
|
2164 |
<p>' . __( 'Are you sure you want to delete this album?', 'wp-photo-album-plus' ) . '<br>' .
|
2165 |
__( 'Press Delete to continue, and Cancel to go back.', 'wp-photo-album-plus' ) . '
|
2166 |
</p>
|
2169 |
<h2>' .
|
2170 |
__( 'What would you like to do with photos currently in the album?', 'wp-photo-album-plus' ) . '<br>
|
2171 |
<input type="radio" name="wppa-del-photos" value="delete" checked="checked" />' . __( 'Delete', 'wp-photo-album-plus' ) . '<br>
|
2172 |
+
<input type="radio" name="wppa-del-photos" value="move" />' . __( 'Move to', 'wp-photo-album-plus' ) . '
|
2173 |
<select name="wppa-move-album">' .
|
2174 |
wppa_album_select_a( array( 'checkaccess' => true,
|
2175 |
'path' => true,
|
2944 |
style="min-width: 100px;"
|
2945 |
>
|
2946 |
<a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
|
2947 |
+
__( 'Sequence', 'wp-photo-album-plus' ) .
|
2948 |
( $order == 'a_order' && $reverse ? $upimg : $downimg ) . '
|
2949 |
</a>
|
2950 |
</td>
|
3615 |
}
|
3616 |
}
|
3617 |
|
3618 |
+
// Subalbum order
|
3619 |
+
{
|
3620 |
+
$sel = ' selected';
|
3621 |
+
$opts = array(
|
3622 |
+
__( '--- default ---', 'wp-photo-album-plus' ),
|
3623 |
+
__( 'Random', 'wp-photo-album-plus' ),
|
3624 |
+
__( 'Sequence #', 'wp-photo-album-plus' ),
|
3625 |
+
__( 'Sequence # descending', 'wp-photo-album-plus' ),
|
3626 |
+
__( 'Name', 'wp-photo-album-plus' ),
|
3627 |
+
__( 'Name descending', 'wp-photo-album-plus' ),
|
3628 |
+
__( 'Timestamp', 'wp-photo-album-plus' ),
|
3629 |
+
__( 'Timestamp descending', 'wp-photo-album-plus' ),
|
3630 |
+
);
|
3631 |
+
$vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
|
3632 |
+
|
3633 |
+
$df = wppa_opt( 'list_albums_by' );
|
3634 |
+
if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
|
3635 |
+
else foreach( array_keys( $vals ) as $key ) {
|
3636 |
+
if ( $df == $vals[$key] ) {
|
3637 |
+
$dflt = $opts[$key];
|
3638 |
+
}
|
3639 |
+
}
|
3640 |
+
}
|
3641 |
+
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
|
3642 |
+
$suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
|
3643 |
+
$result = '
|
3644 |
+
<div style="margin-left:6px">
|
3645 |
+
<label
|
3646 |
+
for="subalbumorder">' .
|
3647 |
+
__( 'Subalbum sequence method', 'wp-photo-album-plus' ) . '
|
3648 |
+
</label><br>
|
3649 |
+
<select
|
3650 |
+
id="subalbumorder"
|
3651 |
+
style="max-width:200px;"
|
3652 |
+
onchange="
|
3653 |
+
wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
|
3654 |
+
var ord=Math.abs(jQuery(this).val());
|
3655 |
+
var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
|
3656 |
+
if (ord == 1 || (ord == 0 && dft == 1)) {
|
3657 |
+
jQuery(\'#wppa-album-sequence\').show();
|
3658 |
+
}
|
3659 |
+
else {
|
3660 |
+
jQuery(\'#wppa-album-sequence\').hide();
|
3661 |
+
}"
|
3662 |
+
title="' . esc_attr( $title ) . '"
|
3663 |
+
>';
|
3664 |
+
for ( $i = 0; $i < 7; $i++ ) {
|
3665 |
+
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
3666 |
+
}
|
3667 |
+
$result .= '
|
3668 |
+
</select>
|
3669 |
+
</div>';
|
3670 |
+
wppa_echo( $result );
|
3671 |
+
|
3672 |
// Check album order
|
3673 |
if ( $albumorder_col != 'a_order' ) {
|
3674 |
if ( $parent == '0') {
|
3675 |
$result = '
|
3676 |
<br>' .
|
3677 |
+
esc_html__( 'You can edit top-level album sequence number here when you set the album sequence method to "Sequence #" or "Sequence # descending" in Basic settings -> Misc -> I -> Item 1.' );
|
3678 |
}
|
3679 |
else {
|
3680 |
$result = '
|
3681 |
<br>' .
|
3682 |
+
esc_html__( 'You can edit subalbum sequence number here when you set the album sequence to "Sequence #" or "Sequence # descending" in the "Subalbum sequence method" selection box above.' );
|
3683 |
}
|
3684 |
$result .= '<br>';
|
3685 |
|
3686 |
wppa_echo( $result );
|
3687 |
+
// return;
|
3688 |
}
|
3689 |
|
3690 |
+
|
3691 |
+
|
3692 |
$result = '
|
3693 |
+
<div
|
3694 |
+
style="' . ( $albumorder_col != 'a_order' ? 'display:none' : '' ) . '"
|
3695 |
+
id="wppa-album-sequence"
|
3696 |
+
>
|
3697 |
<h2 style="margin:1em">' .
|
3698 |
+
__( 'Manage album sequence', 'wp-photo-album-plus' ) . '
|
3699 |
-
|
3700 |
<small>
|
3701 |
<i>' .
|
3702 |
+
__( 'Change album sequence by drag and drop, or use the up/down arrows.', 'wp-photo-album-plus' ) . '
|
3703 |
</i>' .
|
3704 |
__( 'Do not leave this page unless the bar is entirely green.', 'wp-photo-album-plus' ) . '
|
3705 |
</small>
|
3750 |
</td>
|
3751 |
</tr>
|
3752 |
</tbody>
|
3753 |
+
</table>
|
3754 |
+
';
|
3755 |
wppa_echo( $result );
|
3756 |
|
3757 |
|
3999 |
</table>
|
4000 |
</div>
|
4001 |
<div style="float:right; width:25%">
|
4002 |
+
<span> ' . __( 'Id' , 'wp-photo-album-plus' ) . ' ' . $albid . '</span>
|
4003 |
+
<span> - ' . __( 'Ord' , 'wp-photo-album-plus' ) . '</span>
|
4004 |
<span id="wppa-album-seqno-' . $albid . '" > ' . $album['a_order'] . '</span>
|
4005 |
<br>
|
4006 |
<a href="' . wppa_ea_url( $albid ) . '" style="position:absolute;bottom:0">' . __( 'Edit', 'wp-photo-album-plus' ) . '</a>
|
4013 |
$result .= '
|
4014 |
</div>
|
4015 |
<div style="clear:both;"></div>
|
4016 |
+
</div>
|
4017 |
</div>';
|
4018 |
|
4019 |
wppa_echo( $result );
|
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-cache.php
CHANGED
@@ -493,7 +493,7 @@ global $wpdb;
|
|
493 |
<thead style="font-weight:bold">
|
494 |
<tr>
|
495 |
<td colspan="3" ><h3 style="margin:0.1em">' . __( 'File data', 'wp-photo-album-plus' ) . '</h3></td>
|
496 |
-
<td colspan="4" style="border-left:1px solid #c3c4c7"><h3 style="margin:0.1em">' . __( '
|
497 |
</tr>
|
498 |
<tr>
|
499 |
<td><b>' . __( 'Name', 'wp-photo-album-plus' ) . '</b></td>
|
493 |
<thead style="font-weight:bold">
|
494 |
<tr>
|
495 |
<td colspan="3" ><h3 style="margin:0.1em">' . __( 'File data', 'wp-photo-album-plus' ) . '</h3></td>
|
496 |
+
<td colspan="4" style="border-left:1px solid #c3c4c7"><h3 style="margin:0.1em">' . __( 'Dependencies', 'wp-photo-album-plus' ) . '</h3></td>
|
497 |
</tr>
|
498 |
<tr>
|
499 |
<td><b>' . __( 'Name', 'wp-photo-album-plus' ) . '</b></td>
|
wppa-filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
-
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -902,6 +902,7 @@ global $photos_used;
|
|
902 |
function wppa_you_can_not( $xaction, $xtype, $useless = true ) {
|
903 |
$action = __( $xaction, 'wp-photo-album-plus' );
|
904 |
$type = __( $xtype, 'wp-photo-album-plus' );
|
|
|
905 |
$result = sprintf( __( 'You can not %1s a %2s shortcode display.', 'wp-photo-album-plus' ), $action, $type ) .
|
906 |
( $useless ? ' ' . __( 'It is useless anyway.', 'wp-photo-album-plus' ) : '' );
|
907 |
wppa_log( 'dbg', $result );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version: 8.2.03.003
|
7 |
*
|
8 |
*/
|
9 |
|
902 |
function wppa_you_can_not( $xaction, $xtype, $useless = true ) {
|
903 |
$action = __( $xaction, 'wp-photo-album-plus' );
|
904 |
$type = __( $xtype, 'wp-photo-album-plus' );
|
905 |
+
/* translators: Example: You can not delay a single image shortcode display */
|
906 |
$result = sprintf( __( 'You can not %1s a %2s shortcode display.', 'wp-photo-album-plus' ), $action, $type ) .
|
907 |
( $useless ? ' ' . __( 'It is useless anyway.', 'wp-photo-album-plus' ) : '' );
|
908 |
wppa_log( 'dbg', $result );
|
wppa-functions.php
CHANGED
@@ -3047,32 +3047,20 @@ function wppa_get_slide_desc( $id ) {
|
|
3047 |
|
3048 |
function wppa_get_slide_name_a( $id ) {
|
3049 |
|
3050 |
-
$name = '';
|
3051 |
-
$fullname = '';
|
3052 |
$alb = wppa_get_photo_item( $id, 'album' );
|
3053 |
$disp = wppa_is_item_displayable( $alb, 'name', 'show_full_name' );
|
3054 |
|
3055 |
if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
|
3056 |
$name = esc_js( wppa_get_photo_name( $id ) );
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
'escjs' => true,
|
3064 |
-
'showname' => true,
|
3065 |
-
'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
|
3066 |
-
) );
|
3067 |
-
}
|
3068 |
-
if ( ! $fullname ) {
|
3069 |
-
$fullname = ' ';
|
3070 |
-
}
|
3071 |
-
}
|
3072 |
-
else {
|
3073 |
-
$fullname = 'void';
|
3074 |
}
|
3075 |
-
$name;
|
3076 |
|
3077 |
return array( 'name' => $name, 'fullname' => $fullname );
|
3078 |
}
|
3047 |
|
3048 |
function wppa_get_slide_name_a( $id ) {
|
3049 |
|
3050 |
+
$name = ' ';
|
3051 |
+
$fullname = ' ';
|
3052 |
$alb = wppa_get_photo_item( $id, 'album' );
|
3053 |
$disp = wppa_is_item_displayable( $alb, 'name', 'show_full_name' );
|
3054 |
|
3055 |
if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
|
3056 |
$name = esc_js( wppa_get_photo_name( $id ) );
|
3057 |
+
$fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
|
3058 |
+
'addmedal' => true,
|
3059 |
+
'escjs' => true,
|
3060 |
+
'showname' => true,
|
3061 |
+
'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
|
3062 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3063 |
}
|
|
|
3064 |
|
3065 |
return array( 'name' => $name, 'fullname' => $fullname );
|
3066 |
}
|
wppa-init.php
CHANGED
@@ -333,7 +333,7 @@ global $wpdb;
|
|
333 |
}
|
334 |
|
335 |
function wppa_tag_message() {
|
336 |
-
wppa_error_message( __('The tags system needs to be converted. Please run <i>Photo Albums -> Settings ->
|
337 |
}
|
338 |
|
339 |
function wppa_check_cat_system() {
|
@@ -356,7 +356,7 @@ global $wpdb;
|
|
356 |
}
|
357 |
|
358 |
function wppa_cat_message() {
|
359 |
-
wppa_error_message( __('The cats system needs to be converted. Please run <i>Photo Albums -> Settings ->
|
360 |
}
|
361 |
|
362 |
// Print admin messages on config conflicts
|
333 |
}
|
334 |
|
335 |
function wppa_tag_message() {
|
336 |
+
wppa_error_message( sprintf( __('The tags system needs to be converted. Please run <i>Photo Albums -> Settings -> %s</i>' , 'wp-photo-album-plus' ), wppa_setting_path( 'a', 'maintenance', '2', '22' ) ) );
|
337 |
}
|
338 |
|
339 |
function wppa_check_cat_system() {
|
356 |
}
|
357 |
|
358 |
function wppa_cat_message() {
|
359 |
+
wppa_error_message( sprintf( __('The cats system needs to be converted. Please run <i>Photo Albums -> Settings -> %s</i>' , 'wp-photo-album-plus' ), wppa_setting_path( 'a', 'maintenance', '2', '23' ) ) );
|
360 |
}
|
361 |
|
362 |
// Print admin messages on config conflicts
|
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' ) );
|
@@ -529,6 +510,7 @@ function wppaToggleExif( id, count ) {
|
|
529 |
$b_is_video = empty( $is_video ) ? 0 : 1; // boolean
|
530 |
$has_audio = wppa_has_audio( $id ); // returns array of extensions
|
531 |
$b_has_audio = empty( $has_audio ) ? 0 : 1; // boolean
|
|
|
532 |
|
533 |
$br = wppa_is_phone() ? '<br>' : ' ';
|
534 |
|
@@ -579,12 +561,27 @@ function wppaToggleExif( id, count ) {
|
|
579 |
else {
|
580 |
$may_edit_status = false;
|
581 |
}
|
|
|
582 |
// May user change planned delete item?
|
583 |
$may_change_delete = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
584 |
|
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 +602,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 +610,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,27 +623,61 @@ function wppaToggleExif( id, count ) {
|
|
627 |
'controls' => false,
|
628 |
'use_thumb' => true
|
629 |
) ) . '
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
else {
|
633 |
if ( $has_audio ) {
|
634 |
$src = wppa_get_thumb_url( $id );
|
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,
|
@@ -655,879 +685,721 @@ function wppaToggleExif( id, count ) {
|
|
655 |
'width' => '160',
|
656 |
'controls' => true
|
657 |
) );
|
|
|
|
|
658 |
wppa_echo( '
|
659 |
<br>' .
|
660 |
( $audio ? $audio :
|
661 |
'<span style="color:red">' .
|
662 |
esc_html__( 'Audio disabled', 'wp-photo-album-plus' ) .
|
663 |
'</span>' ) );
|
664 |
-
}
|
665 |
-
}
|
666 |
-
wppa_echo( '<h1 style="display:inline;margin-left:20px;vertical-align:bottom;">' . wppa_get_photo_name( $id ) . '</h1>' );
|
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 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
|
|
728 |
|
729 |
-
// Album
|
730 |
-
{
|
731 |
-
$deleted = false;
|
732 |
-
if ( $album <= '-9' ) {
|
733 |
-
$album = - ( $album + '9' );
|
734 |
-
$deleted = true;
|
735 |
}
|
736 |
-
|
737 |
-
|
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 |
-
|
942 |
-
<div class="wppa-flex">' );
|
943 |
-
|
944 |
-
// Pdf
|
945 |
-
if ( wppa_is_pdf( $id ) ) {
|
946 |
-
$sp = wppa_get_source_path( $id );
|
947 |
-
$fs = wppa_get_filesize( $sp );
|
948 |
-
wppa_echo( '
|
949 |
-
<div>
|
950 |
-
<label>' .
|
951 |
-
__( 'Document file', 'wp-photo-album-plus' ) . '
|
952 |
-
</label><br>
|
953 |
-
<div class="wppa-ldi">' .
|
954 |
-
$fs . '
|
955 |
-
</div>
|
956 |
-
</div>' );
|
957 |
-
}
|
958 |
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
$sp = wppa_strip_ext( $sp ) . '.jpg';
|
966 |
-
if ( ! wppa_is_file( $sp ) ) {
|
967 |
-
$sp = wppa_strip_ext( $sp ) . '.png';
|
968 |
-
}
|
969 |
-
}
|
970 |
-
if ( is_file( $sp ) ) {
|
971 |
-
$ima = getimagesize( $sp );
|
972 |
-
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.' . $br;
|
973 |
-
}
|
974 |
-
else {
|
975 |
-
$txt = __( 'Unavailable', 'wp-photo-album-plus' );
|
976 |
-
}
|
977 |
-
wppa_echo( '
|
978 |
-
<div style="max-width:300px">
|
979 |
-
<label>' .
|
980 |
-
__( 'Source file', 'wp-photo-album-plus' ) . '
|
981 |
-
</label><br>
|
982 |
-
<div class="wppa-ldi">' .
|
983 |
-
$txt . '
|
984 |
-
</div>
|
985 |
-
</div>' );
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
}
|
1001 |
-
else {
|
1002 |
-
$txt = '
|
1003 |
-
<span style="color:red">' .
|
1004 |
-
__( 'Unavailable', 'wp-photo-album-plus' ) . '
|
1005 |
-
</span>';
|
1006 |
-
}
|
1007 |
-
wppa_echo( '
|
1008 |
-
<div style="max-width:300px">
|
1009 |
-
<label>' .
|
1010 |
-
$lbl . '
|
1011 |
-
</label><br>
|
1012 |
-
<div class="wppa-ldi">' .
|
1013 |
-
$txt . '
|
1014 |
-
</div>
|
1015 |
-
</div>' );
|
1016 |
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
|
|
1032 |
}
|
1033 |
-
|
1034 |
-
$
|
1035 |
-
<
|
1036 |
-
__( 'Unavailable', 'wp-photo-album-plus' ) . '.
|
1037 |
-
</span>';
|
1038 |
}
|
1039 |
-
|
1040 |
-
|
1041 |
-
<
|
1042 |
-
$lbl . '
|
1043 |
-
</label><br>
|
1044 |
-
<div class="wppa-ldi">' .
|
1045 |
-
$txt . '
|
1046 |
-
</div>
|
1047 |
-
</div>' );
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
// Local CDN
|
1051 |
-
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
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 |
-
|
1076 |
-
$
|
|
|
1077 |
}
|
1078 |
-
$
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
|
1090 |
-
|
1091 |
-
|
|
|
|
|
|
|
|
|
|
|
1092 |
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
<label>' .
|
1097 |
-
__( 'Video width', 'wp-photo-album-plus' ) . '
|
1098 |
-
</label><br>
|
1099 |
-
<input
|
1100 |
-
type="text"
|
1101 |
-
style="width:50px;margin:0 4px"
|
1102 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
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 |
-
// Height
|
1109 |
wppa_echo( '
|
1110 |
-
<
|
1111 |
-
<
|
1112 |
-
__( '
|
1113 |
-
</
|
1114 |
-
<input
|
1115 |
-
type="text"
|
1116 |
-
style="width:50px;margin:0 4px"
|
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 ( $duration ) {
|
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 |
-
// Formats
|
1147 |
-
$txt = '';
|
1148 |
-
foreach ( $is_video as $fmt ) {
|
1149 |
-
$txt .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
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 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
__( 'Formats', 'wp-photo-album-plus' ) . '
|
1172 |
-
</label><br>
|
1173 |
-
<div class="wppa-ldi">' .
|
1174 |
-
$txt . '
|
1175 |
-
</div>
|
1176 |
-
</div>' );
|
1177 |
-
}
|
1178 |
-
|
1179 |
-
wppa_echo( '</div>' );
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
// Update status field
|
1183 |
-
{
|
1184 |
-
wppa_echo( '
|
1185 |
-
<h3 style="margin-left:1em">' .
|
1186 |
-
__( 'Remark:', 'wp-photo-album-plus' ) . '
|
1187 |
-
<span
|
1188 |
-
id="remark-' . $id . '"
|
1189 |
-
style="font-weight:bold;color:#00AA00">' .
|
1190 |
-
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
1191 |
-
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) . '
|
1192 |
-
</span>
|
1193 |
-
</h3>' );
|
1194 |
-
}
|
1195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1196 |
|
1197 |
-
wppa_echo( '<!-- Section 2 simple settings -->
|
1198 |
-
<div class="wppa-flex">' );
|
1199 |
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
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 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
|
1230 |
-
value="' . esc_attr( $exifdtm ) . '"
|
1231 |
-
/>
|
1232 |
-
</div>' );
|
1233 |
-
}
|
1234 |
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
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 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
style="width:100px"
|
1281 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
1282 |
-
/>
|
1283 |
-
</div>' );
|
1284 |
-
}
|
1285 |
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
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 |
-
// Watermark
|
1438 |
-
if ( wppa_switch( 'watermark_on' ) ) {
|
1439 |
|
1440 |
-
//
|
1441 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 -->
|
1529 |
<div class="wppa-flex">' );
|
1530 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1531 |
// Move/copy
|
1532 |
if ( ! $quick ) {
|
1533 |
|
@@ -1547,22 +1419,22 @@ function wppaToggleExif( id, count ) {
|
|
1547 |
}
|
1548 |
|
1549 |
wppa_echo( '
|
1550 |
-
<div style="max-width:400px
|
1551 |
<label>' .
|
1552 |
-
__( 'Target album for copy/move
|
1553 |
</label><br>
|
1554 |
<select
|
1555 |
id="target-' . $id . '"
|
1556 |
-
style="max-width:
|
1557 |
$album_select[$album] . '
|
1558 |
</select>
|
1559 |
</div>' );
|
1560 |
}
|
1561 |
else {
|
1562 |
wppa_echo( '
|
1563 |
-
<div>
|
1564 |
<label>' .
|
1565 |
-
__( 'Target album for copy/move
|
1566 |
</label><br>
|
1567 |
<input
|
1568 |
id="target-' . $id . '"
|
@@ -1574,7 +1446,7 @@ function wppaToggleExif( id, count ) {
|
|
1574 |
}
|
1575 |
|
1576 |
wppa_echo( '
|
1577 |
-
<div style="max-width:500px
|
1578 |
<label>
|
1579 |
|
1580 |
</label><br>
|
@@ -1597,7 +1469,7 @@ function wppaToggleExif( id, count ) {
|
|
1597 |
if ( ! $b_is_video ) {
|
1598 |
if ( ! wppa_can_admin_magick( $id ) ) {
|
1599 |
wppa_echo( '
|
1600 |
-
<div>
|
1601 |
<label>
|
1602 |
|
1603 |
</label><br>
|
@@ -1608,7 +1480,7 @@ function wppaToggleExif( id, count ) {
|
|
1608 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1609 |
/>
|
1610 |
</div>
|
1611 |
-
<div>
|
1612 |
<label>
|
1613 |
|
1614 |
</label><br>
|
@@ -1619,7 +1491,7 @@ function wppaToggleExif( id, count ) {
|
|
1619 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1620 |
/>
|
1621 |
</div>
|
1622 |
-
<div>
|
1623 |
<label>
|
1624 |
|
1625 |
</label><br>
|
@@ -1630,7 +1502,7 @@ function wppaToggleExif( id, count ) {
|
|
1630 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1631 |
/>
|
1632 |
</div>
|
1633 |
-
<div>
|
1634 |
<label>
|
1635 |
|
1636 |
</label><br>
|
@@ -1641,7 +1513,7 @@ function wppaToggleExif( id, count ) {
|
|
1641 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1642 |
/>
|
1643 |
</div>
|
1644 |
-
<div>
|
1645 |
<label>
|
1646 |
|
1647 |
</label><br>
|
@@ -1655,45 +1527,11 @@ 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' ) ) {
|
1695 |
wppa_echo( '
|
1696 |
-
<div>
|
1697 |
<label>
|
1698 |
|
1699 |
</label><br>
|
@@ -1710,7 +1548,7 @@ function wppaToggleExif( id, count ) {
|
|
1710 |
|
1711 |
if ( $deleted ) {
|
1712 |
wppa_echo( '
|
1713 |
-
<div>
|
1714 |
<label>
|
1715 |
|
1716 |
</label><br>
|
@@ -1729,7 +1567,7 @@ function wppaToggleExif( id, count ) {
|
|
1729 |
// Re-upload
|
1730 |
if ( wppa_user_is( 'administrator' ) || ! wppa_switch( 'reup_is_restricted' ) ) {
|
1731 |
wppa_echo( '
|
1732 |
-
<div style="max-width:500px;">
|
1733 |
<label>
|
1734 |
|
1735 |
</label><br>
|
@@ -1760,778 +1598,1421 @@ function wppaToggleExif( id, count ) {
|
|
1760 |
</div>' );
|
1761 |
}
|
1762 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1763 |
wppa_echo( '
|
1764 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1765 |
|
1766 |
-
|
1767 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1768 |
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
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 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1817 |
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1827 |
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1837 |
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
1855 |
-
title="-sharpen 0x1"
|
1856 |
-
/>' );
|
1857 |
|
1858 |
-
|
1859 |
-
|
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 |
-
<
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1877 |
|
1878 |
-
|
1879 |
-
|
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 |
-
|
1889 |
-
|
1890 |
-
|
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 |
-
|
1899 |
-
|
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 |
-
|
1929 |
-
|
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 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
/>' );
|
1947 |
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
|
|
1957 |
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
|
|
|
|
|
|
1967 |
|
1968 |
-
|
1969 |
-
|
1970 |
-
<
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1977 |
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
|
|
|
|
|
|
|
|
|
|
1987 |
|
1988 |
-
|
1989 |
-
|
1990 |
-
<
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1997 |
|
1998 |
-
|
1999 |
-
|
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 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017 |
|
2018 |
-
|
2019 |
-
|
2020 |
-
<input
|
2021 |
-
type="button"
|
2022 |
-
class="wppa-admin-button button"
|
2023 |
-
id="button-' . $id . '"
|
2024 |
-
value="Crop"
|
2025 |
-
title=""
|
2026 |
-
/>' );
|
2027 |
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
|
|
|
|
2031 |
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
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 |
-
|
2058 |
-
$
|
|
|
|
|
|
|
|
|
|
|
2059 |
}
|
2060 |
-
|
2061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2062 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2063 |
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2067 |
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
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 |
-
//
|
2093 |
-
wppa( 'for_sm', true );
|
2094 |
wppa_echo( '
|
2095 |
-
<
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
style="float:left;max-width:100%"
|
2103 |
-
/>
|
2104 |
-
</div>
|
2105 |
-
</td>
|
2106 |
-
</tr>
|
2107 |
-
</tbody>
|
2108 |
-
</table>
|
2109 |
-
</details></div>' );
|
2110 |
-
}
|
2111 |
|
2112 |
-
|
2113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2114 |
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
// Name
|
2125 |
-
wppa_echo( '
|
2126 |
-
<tr>
|
2127 |
-
<td>' .
|
2128 |
-
__( 'Photoname:' , 'wp-photo-album-plus' ) . '
|
2129 |
-
</td>
|
2130 |
-
<td>
|
2131 |
-
<input
|
2132 |
-
type="text"
|
2133 |
-
style="width:100%"
|
2134 |
-
id="pname-' . $id . '"
|
2135 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'name\', this.value)"
|
2136 |
-
value="' . esc_attr( stripslashes( $name ) ) . '"
|
2137 |
-
/>
|
2138 |
-
<br>
|
2139 |
-
<span style="float:right">' .
|
2140 |
-
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
2141 |
-
</span>
|
2142 |
-
</td>
|
2143 |
-
<td>
|
2144 |
-
</td>
|
2145 |
-
</tr>' );
|
2146 |
|
2147 |
-
|
2148 |
-
if ( ! wppa_switch( 'desc_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
2149 |
wppa_echo( '
|
2150 |
-
<
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
$alfaid = wppa_alfa_id( $id );
|
2158 |
-
wppa_echo( '<td>' );
|
2159 |
-
wp_editor( $description,
|
2160 |
-
'wppaphotodesc'.$alfaid,
|
2161 |
-
array( 'wpautop' => true,
|
2162 |
-
'media_buttons' => false,
|
2163 |
-
'textarea_rows' => '6',
|
2164 |
-
'tinymce' => true
|
2165 |
-
)
|
2166 |
-
);
|
2167 |
-
wppa_echo( '
|
2168 |
-
<input
|
2169 |
-
type="button"
|
2170 |
-
style="clear:left"
|
2171 |
-
class="button button-secundary"
|
2172 |
-
value="' . esc_attr( __( 'Update Photo description', 'wp-photo-album-plus' ) ) . '"
|
2173 |
-
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'description\', wppaGetTinyMceContent(\'wppaphotodesc' . $alfaid . '\') )"
|
2174 |
-
/>
|
2175 |
-
<img
|
2176 |
-
id="wppa-photo-spin-' . $id . '"
|
2177 |
-
src="' . wppa_get_imgdir() . 'spinner.gif"
|
2178 |
-
style="visibility:hidden"
|
2179 |
-
/>
|
2180 |
-
</td>
|
2181 |
-
<td>
|
2182 |
-
</td>' );
|
2183 |
-
}
|
2184 |
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
</textarea>
|
2195 |
-
</td>
|
2196 |
-
<td>
|
2197 |
-
</td>' );
|
2198 |
-
}
|
2199 |
|
2200 |
-
|
2201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2202 |
|
2203 |
-
|
2204 |
-
else {
|
2205 |
wppa_echo( '
|
2206 |
-
<
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
readonly
|
2214 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'description\', this.value)"
|
2215 |
-
>' .
|
2216 |
-
esc_textarea( stripslashes( $description ) ) . '
|
2217 |
-
</textarea>
|
2218 |
-
</td>
|
2219 |
-
<td>
|
2220 |
-
</td>
|
2221 |
-
</tr>' );
|
2222 |
-
}
|
2223 |
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
id="tags-' . $id . '"
|
2234 |
-
type="text"
|
2235 |
-
style="width:100%"
|
2236 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', this.value)"
|
2237 |
-
value="' . esc_attr( $tags ) . '"' .
|
2238 |
-
( $allowed ? '' : ' readonly="readonly"' ) . '
|
2239 |
-
/>' );
|
2240 |
-
if ( $allowed ) {
|
2241 |
-
wppa_echo( '
|
2242 |
-
<br>
|
2243 |
-
<span class="description">' .
|
2244 |
-
__( 'Separate tags with commas.', 'wp-photo-album-plus' ) . '
|
2245 |
-
</span>' );
|
2246 |
-
}
|
2247 |
-
wppa_echo( '
|
2248 |
-
<select
|
2249 |
-
onchange="wppaAddTag( this.value, \'tags-' . $id . '\' ); wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', document.getElementById( \'tags-' . $id . '\' ).value )">' );
|
2250 |
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
}
|
2261 |
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
wppa_echo( '<option value="' . esc_attr( $tag['tag'] ) . '">' . htmlspecialchars( $tag['tag'] ) . '</option>' );
|
2266 |
-
}
|
2267 |
-
if ( ! $allowed ) {
|
2268 |
-
wppa_echo( '<option value="-clear-">' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>' );
|
2269 |
-
}
|
2270 |
-
}
|
2271 |
-
else {
|
2272 |
-
wppa_echo( '<option value="0">' . __( 'No tags yet', 'wp-photo-album-plus' ) . '</option>' );
|
2273 |
-
}
|
2274 |
-
wppa_echo( '
|
2275 |
-
</select>
|
2276 |
-
</td>
|
2277 |
-
<td>
|
2278 |
-
</td>
|
2279 |
-
</tr>' );
|
2280 |
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2286 |
}
|
2287 |
else {
|
2288 |
-
$
|
2289 |
}
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
<tr>
|
2294 |
-
<td>' .
|
2295 |
-
apply_filters( 'translate_text', wppa_opt( 'custom_caption_' . $key ) ) . '
|
2296 |
-
<small style="float:right">
|
2297 |
-
(w#cc' . $key . ')
|
2298 |
-
</small>:
|
2299 |
-
</td>
|
2300 |
-
<td>
|
2301 |
-
<input
|
2302 |
-
type="text"
|
2303 |
-
style="width:100%"
|
2304 |
-
id="custom_' . $key . '-' . $id . '"
|
2305 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'custom_' . $key . '\', this.value)"
|
2306 |
-
value="' . esc_attr( stripslashes( $custom_data[$key] ) ) . '"
|
2307 |
-
/>
|
2308 |
-
</td>
|
2309 |
-
<td>
|
2310 |
-
<small>(w#cd' . $key . ')</small>
|
2311 |
-
</td>
|
2312 |
-
</tr>' );
|
2313 |
-
}
|
2314 |
}
|
2315 |
-
}
|
2316 |
|
2317 |
-
//
|
2318 |
-
|
2319 |
-
$appl = get_permalink( wppa_get_the_auto_page( $id ) );
|
2320 |
-
wppa_echo( '
|
2321 |
-
<tr>
|
2322 |
-
<td>' .
|
2323 |
-
__( 'Autopage Permalink:', 'wp-photo-album-plus' ) . '
|
2324 |
-
</td>
|
2325 |
-
<td>
|
2326 |
-
<a href="' . $appl . '" target="_blank">' .
|
2327 |
-
$appl . '
|
2328 |
-
</a>
|
2329 |
-
</td>
|
2330 |
-
<td>
|
2331 |
-
</td>
|
2332 |
-
</tr>' );
|
2333 |
-
}
|
2334 |
|
2335 |
-
//
|
2336 |
-
|
2337 |
-
|
2338 |
-
<
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
>
|
2356 |
-
<option
|
2357 |
-
value="_self"' .
|
2358 |
-
( $linktarget == '_self' ? ' selected' : '' ) . '
|
2359 |
-
>' .
|
2360 |
-
__( 'Same tab', 'wp-photo-album-plus' ) . '
|
2361 |
-
</option>
|
2362 |
-
<option
|
2363 |
-
value="_blank"' .
|
2364 |
-
( $linktarget == '_blank' ? ' selected' : '' ) . '
|
2365 |
-
>' .
|
2366 |
-
__( 'New tab', 'wp-photo-album-plus' ) . '
|
2367 |
-
</option>
|
2368 |
-
</select>
|
2369 |
-
<input
|
2370 |
-
type="button"
|
2371 |
-
class="button wppa-admin-button"
|
2372 |
-
onclick="window.open( jQuery( \'#pislink-' . $id . '\' ).val(), jQuery( \'#pistarget-' . $id . '\' ).val() )"
|
2373 |
-
value="' . __( 'Tryit!', 'wp-photo-album-plus' ) . '"
|
2374 |
-
/>
|
2375 |
-
</td>
|
2376 |
-
</tr>' );
|
2377 |
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
/>' );
|
2391 |
-
if ( current_user_can( 'wppa_settings' ) ) {
|
2392 |
-
wppa_echo( '
|
2393 |
-
<br>
|
2394 |
-
<span class="description">' .
|
2395 |
-
sprintf( __( 'If you want this link to be used, check \'PS Overrule\' checkbox in %s.' , 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'links', 2 ) ) . '
|
2396 |
-
</span>' );
|
2397 |
-
}
|
2398 |
-
wppa_echo( '
|
2399 |
-
</td>
|
2400 |
-
<td>
|
2401 |
-
</td>
|
2402 |
-
</tr>' );
|
2403 |
-
}
|
2404 |
|
2405 |
-
//
|
2406 |
-
|
2407 |
-
wppa_echo( '
|
2408 |
-
<tr>
|
2409 |
-
<td>' .
|
2410 |
-
__( 'HTML Alt attribute:' , 'wp-photo-album-plus' ) . '
|
2411 |
-
</td>
|
2412 |
-
<td>
|
2413 |
-
<input
|
2414 |
-
type="text"
|
2415 |
-
style="width:100%"
|
2416 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'alt\', this.value)"
|
2417 |
-
value="' . esc_attr( $alt ) . '"
|
2418 |
-
/>
|
2419 |
-
</td>
|
2420 |
-
<td>
|
2421 |
-
</td>
|
2422 |
-
</tr>' );
|
2423 |
}
|
2424 |
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
// Shortcode
|
2429 |
-
if ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) {
|
2430 |
-
wppa_echo( '
|
2431 |
-
<tr>
|
2432 |
-
<td>' .
|
2433 |
-
__( 'Single image shortcode', 'wp-photo-album-plus' ) . ':
|
2434 |
-
</td>
|
2435 |
-
<td>
|
2436 |
-
[wppa type="photo" photo="' . $id .'"]
|
2437 |
-
</td>
|
2438 |
-
<td>
|
2439 |
-
<small>' .
|
2440 |
-
sprintf( __( 'See %s The documentation %s for more shortcode options.', 'wp-photo-album-plus' ),
|
2441 |
-
'<a href="https://wppa.nl/shortcode-reference/" target="_blank">',
|
2442 |
-
'</a>'
|
2443 |
-
) . '
|
2444 |
-
</small>
|
2445 |
-
</td>
|
2446 |
-
</tr>' );
|
2447 |
-
}
|
2448 |
|
2449 |
-
// Source permalink
|
2450 |
-
if ( is_file( wppa_get_source_path( $id ) ) ) {
|
2451 |
-
$spl = wppa_get_source_pl( $id );
|
2452 |
-
wppa_echo( '
|
2453 |
-
<tr>
|
2454 |
-
<td>' .
|
2455 |
-
__( 'Permalink', 'wp-photo-album-plus' ) . ':
|
2456 |
-
</td>
|
2457 |
-
<td>
|
2458 |
-
<a href="' . esc_attr( $spl ) . '" target="_blank">' . htmlspecialchars( $spl ) . '</a>
|
2459 |
-
</td>
|
2460 |
-
<td>
|
2461 |
-
</td>
|
2462 |
-
</tr>' );
|
2463 |
-
}
|
2464 |
|
2465 |
-
|
2466 |
-
|
2467 |
-
wppa_echo( '
|
2468 |
-
<tr>
|
2469 |
-
<td>' .
|
2470 |
-
__( 'High resolution url', 'wp-photo-album-plus' ) . ':
|
2471 |
-
</td>
|
2472 |
-
<td>
|
2473 |
-
<a href="' . esc_attr( $hru ) . '" target="_blank">' . $hru . '</a>
|
2474 |
-
</td>
|
2475 |
-
<td>
|
2476 |
-
</td>
|
2477 |
-
</tr>' );
|
2478 |
-
|
2479 |
-
// Display file
|
2480 |
-
if ( is_file( wppa_get_photo_path( $id ) ) ) {
|
2481 |
-
$lru = wppa_fix_poster_ext( wppa_get_lores_url( $id ), $id );
|
2482 |
-
wppa_echo( '
|
2483 |
-
<tr>
|
2484 |
-
<td>' .
|
2485 |
-
__( 'Display file url', 'wp-photo-album-plus' ) . ':
|
2486 |
-
</td>
|
2487 |
-
<td>
|
2488 |
-
<a href="' . esc_attr( $lru ) . '" target="_blank">' . $lru . '</a>
|
2489 |
-
</td>
|
2490 |
-
<td>
|
2491 |
-
</td>
|
2492 |
-
</tr>' );
|
2493 |
-
}
|
2494 |
|
2495 |
-
// Thumbnail
|
2496 |
-
if ( is_file( wppa_get_thumb_path( $id ) ) ) {
|
2497 |
-
$tnu = wppa_fix_poster_ext( wppa_get_tnres_url( $id ), $id );
|
2498 |
-
wppa_echo( '
|
2499 |
-
<tr>
|
2500 |
-
<td>' .
|
2501 |
-
__( 'Thumbnail file url', 'wp-photo-album-plus' ) . ':
|
2502 |
-
</td>
|
2503 |
-
<td>
|
2504 |
-
<a href="' . esc_attr( $tnu ) . '" target="_blank">' . $tnu . '</a>
|
2505 |
-
</td>
|
2506 |
-
<td>
|
2507 |
-
</td>
|
2508 |
-
</tr>' );
|
2509 |
-
}
|
2510 |
-
}
|
2511 |
wppa_echo( '
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
|
|
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%;
|
2535 |
>
|
2536 |
<thead>
|
2537 |
<tr style="font-weight:bold">
|
@@ -2542,48 +3023,44 @@ function wppaToggleExif( id, count ) {
|
|
2542 |
</thead>
|
2543 |
<tbody>' );
|
2544 |
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
<
|
2549 |
-
|
2550 |
-
|
2551 |
-
<
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
}
|
2561 |
|
2562 |
wppa_echo( '
|
2563 |
</tbody>
|
2564 |
</table>' );
|
2565 |
-
|
2566 |
}
|
2567 |
|
2568 |
-
//
|
2569 |
-
if ( ! $quick ) {
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
|
|
|
|
|
|
|
|
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%;
|
2587 |
>
|
2588 |
<thead>
|
2589 |
<tr style="font-weight:bold">
|
@@ -2596,55 +3073,57 @@ function wppaToggleExif( id, count ) {
|
|
2596 |
</thead>
|
2597 |
<tbody>' );
|
2598 |
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
if ( $brand && $exif['brand'] ) {
|
2609 |
-
wppa_echo( '
|
2610 |
-
<td style="padding:0 4px">' . $brand . '</td>
|
2611 |
-
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'], $brand, 'brandonly' ) . ':</td>' );
|
2612 |
-
}
|
2613 |
-
else {
|
2614 |
-
wppa_echo( '
|
2615 |
-
<td style="padding:0 4px"></td>
|
2616 |
-
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'] ) . ':</td>' );
|
2617 |
-
}
|
2618 |
|
2619 |
-
|
2620 |
-
if ( strlen( $raw_value ) > 50 ) {
|
2621 |
-
$raw_value = substr( $raw_value, 0, 47 ) . '...';
|
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">' . $
|
2629 |
-
<td style="padding:0 4px">' . $
|
2630 |
-
|
|
|
|
|
|
|
|
|
|
|
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,18 +3179,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 |
|
@@ -2966,7 +3448,7 @@ function wppaTryMove( id, video ) {
|
|
2966 |
<form action="' . $link . '&wppa-page=' . $page . '#manage-photos" method="post">' .
|
2967 |
wp_nonce_field( 'wppa-bulk', 'wppa-bulk' ) . '
|
2968 |
<h1>
|
2969 |
-
<span style="font-weight:bold">' . __( 'Bulk action
|
2970 |
<select id="wppa-bulk-action" name="wppa-bulk-action" onchange="wppaBulkActionChange( this, \'bulk-album\' )">
|
2971 |
<option value=""></option>';
|
2972 |
if ( $album == 'trash' ) {
|
@@ -3221,7 +3703,7 @@ function wppaTryMove( id, video ) {
|
|
3221 |
}
|
3222 |
|
3223 |
wppa_echo(
|
3224 |
-
'<br>' . __( 'Target album for move to
|
3225 |
'<select' .
|
3226 |
' id="target-' . $id . '"' .
|
3227 |
' onchange="wppaTryMove(' . $id . ', ' . ( wppa_is_video( $id ) ? 'true' : 'false' ) . ')"' .
|
@@ -3403,7 +3885,7 @@ global $wpdb;
|
|
3403 |
}';
|
3404 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
3405 |
|
3406 |
-
if ( ! $is_p_order ) wppa_warning_message( __( 'Setting photo sequence
|
3407 |
<div class="widefat wppa-photo-admin-sortable" style="border-color:#cccccc">
|
3408 |
<ul id="sortable">
|
3409 |
<?php foreach ( $photos as $photo ) {
|
@@ -3465,7 +3947,7 @@ global $wpdb;
|
|
3465 |
<span style="margin-left:15px;float:left"><?php wppa_echo( __( 'Id: ' , 'wp-photo-album-plus' ).$photo['id'] )?></span>
|
3466 |
<?php if ( wppa_is_video( $photo['id'] ) )_e('Video', 'wp-photo-album-plus' ); ?>
|
3467 |
<?php if ( wppa_has_audio( $photo['id'] ) ) _e('Audio', 'wp-photo-album-plus' ); ?>
|
3468 |
-
<span style="float:right; margin-right:15px"><?php wppa_echo( __( '
|
3469 |
</div>
|
3470 |
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id'] ) ?>" value="<?php wppa_echo( wp_create_nonce( 'wppa-nonce_'.$photo['id'] ) ); ?>" />
|
3471 |
<input type="hidden" class="wppa-sort-item" value="<?php wppa_echo( $photo['id'] ) ?>" />
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.2.03.004
|
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' ) );
|
510 |
$b_is_video = empty( $is_video ) ? 0 : 1; // boolean
|
511 |
$has_audio = wppa_has_audio( $id ); // returns array of extensions
|
512 |
$b_has_audio = empty( $has_audio ) ? 0 : 1; // boolean
|
513 |
+
$is_pdf = wppa_is_pdf( $id );
|
514 |
|
515 |
$br = wppa_is_phone() ? '<br>' : ' ';
|
516 |
|
561 |
else {
|
562 |
$may_edit_status = false;
|
563 |
}
|
564 |
+
|
565 |
// May user change planned delete item?
|
566 |
$may_change_delete = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
|
567 |
|
568 |
// May user change photo sequence no?
|
569 |
$may_change_porder = wppa_user_is( 'administrator' ) || ! wppa_switch( 'porder_restricted' );
|
570 |
|
571 |
+
// Is there exif data?
|
572 |
+
$exifs = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_exif
|
573 |
+
WHERE photo = %s
|
574 |
+
ORDER BY tag, id", $id ), ARRAY_A );
|
575 |
+
|
576 |
+
// Is there iptc data?
|
577 |
+
$iptcs = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_iptc
|
578 |
+
WHERE photo = %s
|
579 |
+
ORDER BY tag, id", $id ), ARRAY_A );
|
580 |
+
|
581 |
+
// Are there comments?
|
582 |
+
$comments = $quick ? array() : $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_comments
|
583 |
+
WHERE photo = %s
|
584 |
+
ORDER BY timestamp DESC ", $id ), ARRAY_A );
|
585 |
|
586 |
// Anchor for scroll to
|
587 |
wppa_echo( '<a id="photo_' . $id . '"></a>' );
|
602 |
value="' . wp_create_nonce( 'wppa-nonce_' . $id ) . '"
|
603 |
/>' );
|
604 |
|
605 |
+
// Section 1: Preview thumbnail, photo name and stats
|
|
|
|
|
606 |
{
|
607 |
wppa_echo( '
|
608 |
<div>' );
|
610 |
reset( $is_video );
|
611 |
$big = str_replace( 'xxx', current( $is_video ), $big );
|
612 |
wppa_echo( '
|
613 |
+
<div style="float:left; margin-right: 20px;">
|
614 |
+
<a
|
615 |
href="' . esc_attr( $big ) . '"
|
616 |
target="_blank"
|
617 |
title="' . esc_attr( __( 'Preview fullsize video' , 'wp-photo-album-plus' ) ) . '"
|
623 |
'controls' => false,
|
624 |
'use_thumb' => true
|
625 |
) ) . '
|
626 |
+
</a>' );
|
627 |
+
|
628 |
+
// Duratiuon
|
629 |
+
if ( $is_video && $duration ) {
|
630 |
+
$lbl = __( 'Duration', 'wp-photo-album-plus' );
|
631 |
+
$duration = intval( $duration * 100 ) / 100;
|
632 |
+
if ( $duration < 120.0 ) {
|
633 |
+
$txt = sprintf( __( '%s seconds', 'wp-photo-album-plus' ) ,$duration );
|
634 |
+
}
|
635 |
+
else {
|
636 |
+
$txt = sprintf( __( '%s minutes and %s seconds', 'wp-photo-album-plus' ),
|
637 |
+
sprintf( '%d', floor( $duration / 60 ) ),
|
638 |
+
sprintf( '%d', $duration % 60 ) );
|
639 |
+
}
|
640 |
+
wppa_echo( '<br>' . $lbl . ': ' . $txt . '' );
|
641 |
+
}
|
642 |
+
|
643 |
+
wppa_echo( '</div>' );
|
644 |
}
|
645 |
else {
|
646 |
if ( $has_audio ) {
|
647 |
$src = wppa_get_thumb_url( $id );
|
648 |
$big = wppa_get_photo_url( $id );
|
649 |
+
|
650 |
+
// If no duration stored, try to find it and store it
|
651 |
+
if ( ! $duration ) {
|
652 |
+
$file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp3';
|
653 |
+
if ( wppa_is_file( $file ) ) {
|
654 |
+
if ( function_exists( 'wp_read_audio_metadata' ) ) {
|
655 |
+
$mp3info = wp_read_audio_metadata( $file );
|
656 |
+
if ( $mp3info ) {
|
657 |
+
$duration = $mp3info['length'];
|
658 |
+
if ( $duration ) {
|
659 |
+
wppa_update_photo( [ 'id' => $id, 'duration' => $duration ] );
|
660 |
+
}
|
661 |
+
}
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
665 |
}
|
666 |
wppa_echo( '
|
667 |
+
<div style="float:left; margin-right: 20px;">
|
668 |
+
<a
|
669 |
+
id="thumba-' . $id . '"
|
670 |
+
href="' . esc_attr( $big ) . '"
|
671 |
+
target="_blank"
|
672 |
+
title="' . esc_attr( __( 'Preview fullsize photo', 'wp-photo-album-plus' ) ) . '"
|
673 |
+
>
|
674 |
+
<img
|
675 |
+
id="thumburl-' . $id . '"' .
|
676 |
+
( wppa_lazy() && $count > '1' ? ' data-' : ' ' ) . 'src="' . esc_url( $src ) . '"
|
677 |
+
alt="' . esc_attr( $name ) . '"
|
678 |
+
style="max-width:160px;vertical-align:middle"
|
679 |
+
/>
|
680 |
+
</a>' );
|
681 |
|
682 |
if ( $has_audio ) {
|
683 |
$audio = wppa_get_audio_html( array( 'id' => $id,
|
685 |
'width' => '160',
|
686 |
'controls' => true
|
687 |
) );
|
688 |
+
|
689 |
+
|
690 |
wppa_echo( '
|
691 |
<br>' .
|
692 |
( $audio ? $audio :
|
693 |
'<span style="color:red">' .
|
694 |
esc_html__( 'Audio disabled', 'wp-photo-album-plus' ) .
|
695 |
'</span>' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
|
697 |
+
if ( $duration ) {
|
698 |
+
$lbl = __( 'Duration', 'wp-photo-album-plus' );
|
699 |
+
$duration = intval( $duration * 100 ) / 100;
|
700 |
+
if ( $duration < 120.0 ) {
|
701 |
+
$txt = sprintf( __( '%s seconds', 'wp-photo-album-plus' ) ,$duration );
|
702 |
+
}
|
703 |
+
else {
|
704 |
+
$txt = sprintf( __( '%s minutes and %s seconds', 'wp-photo-album-plus' ),
|
705 |
+
sprintf( '%d', floor( $duration / 60 ) ),
|
706 |
+
sprintf( '%d', $duration % 60 ) );
|
707 |
+
}
|
708 |
+
wppa_echo( '<br>' . $lbl . ': ' . $txt . '' );
|
709 |
+
}
|
710 |
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
}
|
712 |
+
|
713 |
+
wppa_echo( '</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
}
|
715 |
+
wppa_echo( '<h1 style="display:inline;vertical-align:bottom;">' . wppa_get_photo_name( $id ) . '</h1>' );
|
716 |
|
717 |
+
// Get the clicks, views and downloads stats
|
718 |
{
|
719 |
+
$th_1 = array();
|
720 |
+
$td_1 = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
|
722 |
+
// Clicks
|
723 |
+
if ( wppa_switch( 'track_clickcounts' ) ) {
|
724 |
+
$th_1[] = __( 'Clicks', 'wp-photo-album-plus' );
|
725 |
+
$td_1[] = strval( intval( $clicks ) );
|
726 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
|
728 |
+
// Views
|
729 |
+
if ( wppa_switch( 'track_viewcounts' ) ) {
|
730 |
+
$th_1[] = __( 'Views', 'wp-photo-album-plus' );
|
731 |
+
$td_1[] = strval( intval( $views ) );
|
732 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
733 |
|
734 |
+
// Downloads. Only photos are downloadable
|
735 |
+
if ( ! wppa_is_multi( $id ) ) {
|
736 |
+
$th_1[] = __( 'Downloads', 'wp-photo-album-plus' );
|
737 |
+
$td_1[] = strval( intval( $dlcount ) );
|
738 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
739 |
}
|
740 |
|
741 |
+
// Get the rating stats
|
742 |
{
|
743 |
+
$th_2 = array();
|
744 |
+
$td_2 = array();
|
745 |
+
|
746 |
+
// Rating
|
747 |
+
$entries = wppa_get_rating_count_by_id( $id );
|
748 |
+
if ( $entries ) {
|
749 |
+
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
750 |
+
$label = __( 'Likes', 'wp-photo-album-plus' );
|
751 |
+
$value = strval( intval( $entries ) );
|
752 |
+
}
|
753 |
+
else {
|
754 |
+
$label = __( 'Rating (#, avg)', 'wp-photo-album-plus' );
|
755 |
+
$value = wppa_get_rating_by_id( $id, 'nolabel' );
|
756 |
+
}
|
757 |
}
|
758 |
else {
|
759 |
+
$label = __( 'Rating', 'wp-photo-album-plus' );
|
760 |
+
$value = __( 'None', 'wp-photo-album-plus' );
|
761 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
762 |
|
763 |
+
$th_2[] = $label;
|
764 |
+
$td_2[] = $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
765 |
|
766 |
+
// Dislikes
|
767 |
+
$dislikes = wppa_dislike_get( $id );
|
768 |
+
if ( $dislikes ) {
|
769 |
+
$th_2[] = __( 'Dislikes', 'wp-photo-album-plus' );
|
770 |
+
$td_2[] = strval( intval( $dislikes ) );
|
771 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
|
773 |
+
// Pending votes
|
774 |
+
$pending = wppa_pendrat_get( $id );
|
775 |
+
if ( $pending ) {
|
776 |
+
$th_2[] = __( 'Pending votes', 'wp-photo-album-plus' );
|
777 |
+
$td_2[] = strval( intval( $pending ) );
|
778 |
+
}
|
|
|
|
|
|
|
|
|
|
|
779 |
}
|
780 |
|
781 |
+
// Display the stats
|
782 |
{
|
783 |
+
$table = '<table>';
|
784 |
+
$header = array(1 => array(), 2 => array());
|
785 |
+
$rows = array(1 => array(), 2 => array());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
|
787 |
+
for($i=0, $limit = max(count($th_1), count($th_2)); $i < $limit; $i++) {
|
788 |
+
|
789 |
+
$header[1][] .= isset($th_1[$i]) ? $th_1[$i] : '';
|
790 |
+
$header[2][] .= isset($th_2[$i]) ? $th_2[$i] : '';
|
791 |
+
$rows[1][] .= isset($td_1[$i]) ? $td_1[$i] : '';
|
792 |
+
$rows[2][] .= isset($td_2[$i]) ? $td_2[$i] : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
}
|
795 |
+
|
796 |
+
$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>';
|
797 |
+
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[1]) . '</td></tr></tbody>';
|
798 |
+
$table .= '<thead><tr><th style="text-align: left;">' . implode('</th><th style="text-align: left;">', $header[2]) . '</th></tr></thead>';
|
799 |
+
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[2]) . '</td></tr></tbody>';
|
800 |
+
|
801 |
+
$table .= '</table>';
|
802 |
+
|
803 |
+
wppa_echo( $table );
|
804 |
}
|
805 |
|
806 |
+
wppa_echo( '
|
807 |
</div>' );
|
808 |
}
|
809 |
+
// End Thumbnail area
|
810 |
|
811 |
+
$details = __( 'Photo Details', 'wp-photo-album-plus' );
|
812 |
+
if ( wppa_is_video( $id ) ) $details = __( 'Video Details', 'wp-photo-album-plus' );
|
813 |
+
if ( wppa_is_pdf( $id ) ) $details = __( 'Document Details', 'wp-photo-album-plus' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
814 |
|
815 |
+
// Open the details area
|
816 |
+
wppa_echo( '
|
817 |
+
<details class="wppa-toplevel-details">
|
818 |
+
<summary class="toplevel wppa-summary-sublevel"> ' .
|
819 |
+
$details . '
|
820 |
+
</summary>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
|
822 |
+
// Update status field
|
823 |
+
{
|
824 |
+
wppa_echo( '
|
825 |
+
<h3 style="margin-left:1em">' .
|
826 |
+
__( 'Remark', 'wp-photo-album-plus' ) . '
|
827 |
+
<span
|
828 |
+
id="remark-' . $id . '"
|
829 |
+
style="font-weight:bold;color:#00AA00">' .
|
830 |
+
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
831 |
+
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) . '
|
832 |
+
</span>
|
833 |
+
</h3>' );
|
834 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
835 |
|
836 |
+
// The tabs
|
837 |
+
$ptitle = __( 'Photo', 'wp-photo-album-plus' );
|
838 |
+
if ( wppa_is_video( $id ) ) $ptitle = __( 'Video', 'wp-photo-album-plus' );
|
839 |
+
if ( wppa_is_pdf( $id ) ) $ptitle = __( 'Document', 'wp-photo-album-plus' );
|
840 |
+
$result = '
|
841 |
+
<div id="tabs" style="margin-bottom:23px">
|
842 |
+
<ul class="widefat wppa-setting-tabs">
|
843 |
+
<li class="wppa-photoadmin-tab-'.$id.' active" onclick="wppaChangePhotoAdminTab(this,\'#photogeneral-'.$id.'\','.$id.');">' . $ptitle . '</li>
|
844 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photofiles-'.$id.'\','.$id.');">' . __( 'Files', 'wp-photo-album-plus' ) . '</li>';
|
845 |
+
if ( wppa_can_admin_magick( $id ) && ! $quick ) {
|
846 |
+
$result .= '
|
847 |
+
<li
|
848 |
+
class="wppa-photoadmin-tab-'.$id.'"
|
849 |
+
onclick="wppaChangePhotoAdminTab(this,\'#photomagic-'.$id.'\','.$id.');wppaInitMagick(\''.$id.'\');">' .
|
850 |
+
__( 'ImageMagic', 'wp-photo-album-plus' ) . '
|
851 |
+
</li>';
|
852 |
}
|
853 |
+
if ( ! $quick && ! empty( $exifs ) ) {
|
854 |
+
$result .= '
|
855 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photoexif-'.$id.'\','.$id.');">' . __( 'EXIF', 'wp-photo-album-plus' ) . '</li>';
|
|
|
|
|
856 |
}
|
857 |
+
if ( ! $quick && ! empty( $iptcs ) ) {
|
858 |
+
$result .= '
|
859 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photoiptc-'.$id.'\','.$id.');">' . __( 'IPTC', 'wp-photo-album-plus' ) . '</li>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
}
|
861 |
+
if ( ! $quick && ! empty( $comments ) ) {
|
862 |
+
$result .= '
|
863 |
+
<li class="wppa-photoadmin-tab-'.$id.'" onclick="wppaChangePhotoAdminTab(this,\'#photocomment-'.$id.'\','.$id.');">' . __( 'Comments', 'wp-photo-album-plus' ) . '</li>';
|
864 |
}
|
865 |
+
$result .= '
|
866 |
+
</ul>
|
867 |
+
<div style="clear:both"></div>
|
868 |
+
</div>';
|
869 |
+
wppa_echo( $result );
|
870 |
+
|
871 |
+
// The script for the tabs to operate, we need this only once
|
872 |
+
global $did_add_cpat;
|
873 |
+
if ( ! $did_add_cpat ) {
|
874 |
+
$the_js = '
|
875 |
+
function wppaChangePhotoAdminTab(elm,tabId,itemId) {
|
876 |
+
jQuery(".wppa-photoadmin-tab-"+itemId).removeClass(\'active\');
|
877 |
+
jQuery(elm).addClass(\'active\');
|
878 |
+
jQuery(".wppa-tabcontent-"+itemId).hide();
|
879 |
+
jQuery(tabId).show();
|
880 |
+
}';
|
881 |
+
wppa_add_inline_script( 'wppa-admin', $the_js );
|
882 |
+
$did_add_cpat = true;
|
883 |
+
}
|
884 |
|
885 |
+
// Tab 1 Photo general
|
886 |
+
wppa_echo( '
|
887 |
+
<div
|
888 |
+
id="photogeneral-' . $id . '"
|
889 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
890 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;"
|
891 |
+
>' );
|
892 |
|
893 |
+
{
|
894 |
+
wppa_echo( '
|
895 |
+
<div class="wppa-flex">' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
|
|
|
897 |
wppa_echo( '
|
898 |
+
<fieldset class="wppa-fieldset" style="width:100%">
|
899 |
+
<legend class="wppa-legend">' .
|
900 |
+
__( 'Unchangeable items', 'wp-photo-album-plus' ) . '
|
901 |
+
</legend>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
|
903 |
+
// ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
904 |
wppa_echo( '
|
905 |
+
<div class="left">
|
906 |
<label>' .
|
907 |
+
__( 'Id', 'wp-photo-album-plus' ) . '
|
908 |
</label><br>
|
909 |
<div class="wppa-ldi">' .
|
910 |
+
strval( intval( $id ) ) . '
|
911 |
</div>
|
912 |
+
</div>' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
913 |
|
914 |
+
// Crypt
|
915 |
+
'<div class="left">
|
916 |
+
<label>' .
|
917 |
+
__( 'Encrypted', 'wp-photo-album-plus' ) . '
|
918 |
+
</label><br>
|
919 |
+
<div class="wppa-ldi">' .
|
920 |
+
htmlspecialchars( $crypt ) . '
|
921 |
+
</div>
|
922 |
+
</div>' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
923 |
|
924 |
+
// Filename
|
925 |
+
'<div class="left">
|
926 |
+
<label>' .
|
927 |
+
__( 'Filename', 'wp-photo-album-plus' ) . '
|
928 |
+
</label><br>
|
929 |
+
<div class="wppa-ldi">' .
|
930 |
+
htmlspecialchars( $filename ) . '
|
931 |
+
</div>
|
932 |
+
</div>' .
|
933 |
|
|
|
|
|
934 |
|
935 |
+
// Upload
|
936 |
+
'<div class="left">
|
937 |
+
<label>' .
|
938 |
+
__( 'Upload', 'wp-photo-album-plus' ) . '
|
939 |
+
</label><br>
|
940 |
+
<div class="wppa-ldi">' .
|
941 |
+
htmlspecialchars( wppa_local_date( '', $timestamp ) ) . '
|
942 |
+
</div>
|
943 |
+
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
944 |
|
945 |
+
// Owner
|
946 |
+
if ( ! $owner_editable ) {
|
947 |
+
wppa_echo( '
|
948 |
+
<div class="left">
|
949 |
+
<label>' .
|
950 |
+
__( 'Owner', 'wp-photo-album-plus' ) . '
|
951 |
+
</label><br>
|
952 |
+
<div class="wppa-ldi">' .
|
953 |
+
htmlspecialchars( $owner ) . '
|
954 |
+
</div>
|
955 |
+
</div>' );
|
956 |
+
}
|
|
|
|
|
|
|
|
|
|
|
957 |
|
958 |
+
$deleted = false;
|
959 |
+
if ( $album <= '-9' ) {
|
960 |
+
$album = - ( $album + '9' );
|
961 |
+
$deleted = true;
|
962 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
963 |
|
964 |
+
// Album. Show album only when it is not evident
|
965 |
+
if ( ! $album_is_obvious ) {
|
966 |
+
wppa_echo( '
|
967 |
+
<div class="left" style="margin-right: 4px;">
|
968 |
+
<label>' .
|
969 |
+
__( 'Album', 'wp-photo-album-plus' ) . '
|
970 |
+
</label><br>
|
971 |
+
<div class="wppa-ldi">' .
|
972 |
+
htmlspecialchars( wppa_get_album_name( $album ) ) . '(' . strval( intval( $album ) ) . ')
|
973 |
+
</div>
|
974 |
+
</div>' );
|
975 |
+
}
|
|
|
|
|
|
|
|
|
|
|
976 |
|
977 |
+
// Modified
|
978 |
+
{
|
979 |
+
$txt = wppa_local_date( '', $modified );
|
980 |
+
if ( $deleted ) $txt = __( 'Trashed', 'wp-photo-album-plus' );
|
981 |
+
if ( $timestamp >= $modified ) $txt = __( 'Not modified', 'wp-photo-album-plus' );
|
982 |
+
wppa_echo( '
|
983 |
+
<div class="left">
|
984 |
+
<label>' .
|
985 |
+
__( 'Modified', 'wp-photo-album-plus' ) . '
|
986 |
+
</label><br>
|
987 |
+
<div class="wppa-ldi">' .
|
988 |
+
$txt . '
|
989 |
+
</div>
|
990 |
+
</div>' );
|
991 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
992 |
|
993 |
+
// Exif
|
994 |
+
if ( ! wppa_user_is( 'administrator' ) ) {
|
995 |
+
wppa_echo( '
|
996 |
+
<div class="left">
|
997 |
+
<label>' .
|
998 |
+
__( 'EXIF Date', 'wp-photo-album-plus' ) . '
|
999 |
+
</label><br>
|
1000 |
+
<div class="wppa-ldi">' .
|
1001 |
+
esc_html( $exifdtm ) . '
|
1002 |
+
</div>
|
1003 |
+
</div>' );
|
1004 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1005 |
|
1006 |
+
// Location
|
1007 |
+
if ( $photo['location'] && ! wppa_switch( 'geo_edit' ) ) {
|
1008 |
+
$loc = $location ? $location : '///';
|
1009 |
+
$geo = explode( '/', $loc );
|
1010 |
+
wppa_echo( '
|
1011 |
+
<div class="left">
|
1012 |
+
<label>' .
|
1013 |
+
__( 'Location' , 'wp-photo-album-plus' ) . '
|
1014 |
+
</label>
|
1015 |
+
<div class="wppa-ldi">' .
|
1016 |
+
esc_html( $geo['0'].' '.$geo['1'].'. ' ) . '
|
1017 |
+
</div>
|
1018 |
+
</div>' );
|
1019 |
+
}
|
1020 |
|
1021 |
+
// P_order
|
1022 |
+
if ( $sortby_orderno && ! $may_change_porder ) {
|
1023 |
+
wppa_echo( '
|
1024 |
+
<div class="left">
|
1025 |
+
<label>' .
|
1026 |
+
__( 'Photo sequence #', 'wp-photo-album-plus' ) . '
|
1027 |
+
</label>
|
1028 |
+
<div class="wppa-ldi">' .
|
1029 |
+
$p_order . '
|
1030 |
+
</div>
|
1031 |
+
</div>' );
|
1032 |
+
}
|
1033 |
|
1034 |
+
// Status
|
1035 |
+
if ( ! $may_edit_status ) {
|
1036 |
+
if ( $status == 'pending' ) $s = __( 'Pending', 'wp-photo-album-plus' );
|
1037 |
+
elseif ( $status == 'publish' ) $s = __( 'Publish', 'wp-photo-album-plus' );
|
1038 |
+
elseif ( $status == 'featured' ) $s = __( 'Featured', 'wp-photo-album-plus' );
|
1039 |
+
elseif ( $status == 'gold' ) $s = __( 'Gold', 'wp-photo-album-plus' );
|
1040 |
+
elseif ( $status == 'silver' ) $s = __( 'Silver', 'wp-photo-album-plus' );
|
1041 |
+
elseif ( $status == 'bronze' ) $s = __( 'Bronze', 'wp-photo-album-plus' );
|
1042 |
+
elseif ( $status == 'scheduled' ) $s = __( 'Scheduled', 'wp-photo-album-plus' );
|
1043 |
+
elseif ( $status == 'private' ) $s = __( 'Private', 'wp-photo-album-plus' );
|
1044 |
wppa_echo( '
|
1045 |
+
<div class="left">
|
1046 |
+
<label>' .
|
1047 |
+
__( 'Status', 'wp-photo-album-plus' ) . '
|
1048 |
+
</label>
|
1049 |
+
<div class="wppa-ldi">' .
|
1050 |
+
$s . '
|
1051 |
+
</div>
|
1052 |
+
</div>' );
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
// Schedule for delete
|
1056 |
+
if ( ! wppa_user_is( 'administrator' ) && $owner != wppa_get_user() ) {
|
1057 |
+
if ( $scheduledel ) {
|
1058 |
+
wppa_echo( '
|
1059 |
+
<div class="left">
|
1060 |
+
<label>' .
|
1061 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1062 |
+
</label>
|
1063 |
+
<div class="wppa-ldi">' .
|
1064 |
+
wppa_get_date_time_select_html( 'delphoto', $id, false ) . '
|
1065 |
+
</div>
|
1066 |
+
</div>' );
|
1067 |
}
|
1068 |
}
|
1069 |
+
|
1070 |
+
// End fieldset
|
1071 |
+
wppa_echo( '</fieldset>' );
|
1072 |
+
|
1073 |
+
// End flex div
|
1074 |
+
wppa_echo( '</div>' );
|
1075 |
}
|
1076 |
|
1077 |
+
// Tab 1 Section 2
|
1078 |
+
wppa_echo( '
|
1079 |
+
<div class="wppa-flex">' );
|
1080 |
+
|
1081 |
+
wppa_echo( '
|
1082 |
+
<fieldset class="wppa-fieldset" style="width:100%">
|
1083 |
+
<legend class="wppa-legend">' .
|
1084 |
+
__( 'Changeable items', 'wp-photo-album-plus' ) . '
|
1085 |
+
</legend>' );
|
1086 |
+
|
1087 |
+
// Owner
|
1088 |
+
if ( $owner_editable ) {
|
1089 |
wppa_echo( '
|
1090 |
+
<div class="left">
|
1091 |
<label
|
1092 |
+
for="owner-' . $id . '">' .
|
1093 |
+
__( 'Owned by', 'wp-photo-album-plus' ) . '
|
1094 |
</label><br>
|
1095 |
+
<input
|
1096 |
+
style="max-width:150px"
|
1097 |
+
id="owner-' . $id . '"
|
1098 |
+
type="text"
|
1099 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
1100 |
+
value="' . esc_attr( $owner ) . '"
|
1101 |
+
/>
|
1102 |
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1103 |
}
|
|
|
|
|
|
|
|
|
1104 |
|
1105 |
+
// Exif date-time
|
1106 |
+
if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1107 |
wppa_echo( '
|
1108 |
+
<div class="left">
|
1109 |
<label
|
1110 |
+
for="exifdtm-' . $id . '">' .
|
1111 |
+
__( 'EXIF Date', 'wp-photo-album-plus' ) . '
|
1112 |
</label><br>
|
1113 |
+
<input
|
1114 |
+
id="exifdtm-' . $id . '"
|
1115 |
+
type="text"
|
1116 |
+
style="width:125px"
|
1117 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
|
1118 |
+
value="' . esc_attr( $exifdtm ) . '"
|
1119 |
+
/>
|
1120 |
+
</div>' );
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
// Location
|
1124 |
+
if ( wppa_switch( 'geo_edit' ) ) {
|
1125 |
+
$loc = $location ? $location : '///';
|
1126 |
+
$geo = explode( '/', $loc );
|
1127 |
+
wppa_echo( '
|
1128 |
+
<div class="left">
|
1129 |
<label
|
1130 |
+
for="lat-' . $id . '">' .
|
1131 |
+
__( 'Location Lat' , 'wp-photo-album-plus' ) . esc_html( $geo['0'] ) . '
|
1132 |
</label><br>
|
1133 |
+
<input
|
1134 |
+
id="lat-' . $id . '"
|
1135 |
+
type="text"
|
1136 |
+
style="width:100px"
|
1137 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lat\', this.value)"
|
1138 |
+
value="' . esc_attr( $geo['2'] ) . '"
|
1139 |
+
/>
|
1140 |
</div>
|
1141 |
+
<div class="left">
|
1142 |
+
<label
|
1143 |
+
for="lon-' . $id . '">' .
|
1144 |
+
__( 'Location Lon' , 'wp-photo-album-plus' ) . esc_html( $geo['1'] ) . '
|
1145 |
</label><br>
|
1146 |
<input
|
1147 |
+
id="lon-' . $id . '"
|
1148 |
+
type="text"
|
1149 |
+
style="width:100px"
|
1150 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value)"
|
1151 |
+
value="' . esc_attr( $geo['3'] ) . '"
|
1152 |
/>
|
1153 |
+
</div>' );
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
// Changeable p_order
|
1157 |
+
if ( $sortby_orderno && $may_change_porder ) {
|
1158 |
+
wppa_echo( '
|
1159 |
+
<div class="left">
|
1160 |
+
<label
|
1161 |
+
for="porder-' . $id . '">' .
|
1162 |
+
__( 'Photo sequence #', 'wp-photo-album-plus' ) . '
|
1163 |
+
</label><br>
|
1164 |
+
<input
|
1165 |
+
type="text"
|
1166 |
+
id="porder-' . $id . '"
|
1167 |
+
value="' . esc_attr( $p_order ) . '"
|
1168 |
+
style="width:100px"
|
1169 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
1170 |
/>
|
1171 |
</div>' );
|
1172 |
}
|
1173 |
+
|
1174 |
+
// Status
|
1175 |
+
if ( $may_edit_status ) {
|
1176 |
+
$sel = ' selected';
|
1177 |
+
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
1178 |
+
$dis = ' disabled';
|
1179 |
+
}
|
1180 |
+
else {
|
1181 |
+
$dis = '';
|
1182 |
+
}
|
1183 |
+
wppa_echo( '
|
1184 |
+
<div class="left">
|
1185 |
+
<label
|
1186 |
+
for="status-' . $id . '">' .
|
1187 |
+
__( 'Status' , 'wp-photo-album-plus' ) . '
|
1188 |
+
</label><br>
|
1189 |
+
<select
|
1190 |
+
style="vertical-align:inherit"
|
1191 |
+
id="status-' . $id . '"
|
1192 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'status\', this.value); wppaPhotoStatusChange( ' . $id . ' )">
|
1193 |
+
<option value="pending"' . ( $status == 'pending' ? $sel : '' ) . ' >' .
|
1194 |
+
__( 'Pending', 'wp-photo-album-plus' ) . '
|
1195 |
+
</option>
|
1196 |
+
<option value="publish"' . ( $status =='publish' ? $sel : '' ) . ' >' .
|
1197 |
+
__( 'Publish', 'wp-photo-album-plus' ) . '
|
1198 |
+
</option>
|
1199 |
+
<option value="featured"' . ( $status == 'featured' ? $sel : '' ) . $dis . ' >' .
|
1200 |
+
__( 'Featured', 'wp-photo-album-plus' ) . '
|
1201 |
+
</option>
|
1202 |
+
<option value="gold"' . ( $status == 'gold' ? $sel : '' ) . $dis . ' >' .
|
1203 |
+
__( 'Gold', 'wp-photo-album-plus' ) . '
|
1204 |
+
</option>
|
1205 |
+
<option value="silver"' . ( $status == 'silver' ? $sel : '' ) . $dis . ' >' .
|
1206 |
+
__( 'Silver', 'wp-photo-album-plus' ) . '
|
1207 |
+
</option>
|
1208 |
+
<option value="bronze"' . ( $status == 'bronze' ? $sel : '' ) . $dis . ' >' .
|
1209 |
+
__( 'Bronze', 'wp-photo-album-plus' ) . '
|
1210 |
+
</option>
|
1211 |
+
<option value="scheduled"' . ( $status == 'scheduled' ? $sel : '' ) . $dis . ' >' .
|
1212 |
+
__( 'Scheduled', 'wp-photo-album-plus' ) . '
|
1213 |
+
</option>
|
1214 |
+
<option value="private"' . ( $status == 'private' ? $sel : '' ) . $dis . ' >' .
|
1215 |
+
__( 'Private', 'wp-photo-album-plus' ) . '
|
1216 |
+
</option>
|
1217 |
+
</select>' .
|
1218 |
+
wppa_get_date_time_select_html( 'photo', $id, true ) . '
|
1219 |
+
|
1220 |
+
</div>' );
|
1221 |
}
|
|
|
|
|
1222 |
|
1223 |
+
// Stereo
|
1224 |
+
if ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) {
|
|
|
1225 |
wppa_echo( '
|
1226 |
+
<div class="left" style="max-width:250px;">
|
1227 |
<label
|
1228 |
+
for="stereo-' . $id . '">' .
|
1229 |
+
__( 'Stereophoto', 'wp-photo-album-plus' ) . '
|
1230 |
</label><br>
|
1231 |
+
<select
|
1232 |
+
id="stereo-' . $id . '"
|
1233 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'stereo\', this.value, true)"
|
1234 |
+
>
|
1235 |
+
<option value="0"' . ( $stereo == '0' ? ' selected' : '' ) . '>' .
|
1236 |
+
__( 'No stereo image', 'wp-photo-album-plus' ) . '
|
1237 |
+
</option>
|
1238 |
+
<option value="1"' . ( $stereo == '1' ? ' selected' : '' ) . '>' .
|
1239 |
+
__( 'Left - right stereo image', 'wp-photo-album-plus' ) . '
|
1240 |
+
</option>
|
1241 |
+
<option value="-1"' . ( $stereo == '-1' ? ' selected' : '' ) . '>' .
|
1242 |
+
__( 'Right - left stereo image', 'wp-photo-album-plus' ) . '
|
1243 |
+
</option>
|
1244 |
+
</select>
|
1245 |
</div>' );
|
1246 |
}
|
|
|
1247 |
|
1248 |
+
// Panorama
|
1249 |
+
if ( wppa_switch( 'enable_panorama' ) && ! $b_is_video ) {
|
1250 |
+
$can_panorama = $photoy && $photox / $photoy >= 1.999;
|
1251 |
+
if ( $can_panorama ) {
|
1252 |
+
wppa_echo( '
|
1253 |
+
<div class="left">
|
1254 |
+
<label
|
1255 |
+
for="panorama-' . $id . '">' .
|
1256 |
+
__( 'Panorama', 'wp-photo-album-plus' ) . '
|
1257 |
+
</label><br>
|
1258 |
+
<select
|
1259 |
+
id="panorama-' . $id . '"
|
1260 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this.value, true )">
|
1261 |
+
<option value="0"' . ( $panorama == '0' ? ' selected' : '' ) . '>' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1262 |
+
<option value="1"' . ( $panorama == '1' ? ' selected' : '' ) . '>' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1263 |
+
<option value="2"' . ( $panorama == '2' ? ' selected' : '' ) . '>' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1264 |
+
</select>
|
1265 |
+
</div>' );
|
1266 |
+
|
1267 |
+
$source_file = wppa_get_source_path( $id );
|
1268 |
+
if ( wppa_is_file( $source_file ) ) {
|
1269 |
+
$source_file_sizes = wppa_getimagesize( $source_file );
|
1270 |
+
|
1271 |
+
if ( $panorama == '1' && $source_file_sizes[0] / $source_file_sizes[1] > 2.001 ) {
|
1272 |
+
$t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
|
1273 |
+
wppa_echo( '
|
1274 |
+
<div class="left">
|
1275 |
+
<label
|
1276 |
+
for="make360-' . $id . '">' .
|
1277 |
+
__( 'Make 360 from', 'wp-photo-album-plus' ) . '
|
1278 |
+
</label><br>
|
1279 |
+
<select
|
1280 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'make360\', this.value, true)"
|
1281 |
+
id="make360-' . $id . '"
|
1282 |
+
title="' . esc_attr( __( 'Select the closest angle you originally made the panorama', 'wp-photo-album-plus' ) ) . '">
|
1283 |
+
<option value="">'.__('Select', 'wp-photo-album-plus' ).'</option>' );
|
1284 |
+
foreach( $t as $v ) {
|
1285 |
+
wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected':'').'>'.$v.'°</option>' );
|
1286 |
+
}
|
1287 |
+
wppa_echo( '
|
1288 |
+
<option value="0">' . __( 'Undo', 'wp-photo-album-plus' ) . '</option>
|
1289 |
+
</select>
|
1290 |
+
</div>' );
|
1291 |
+
}
|
1292 |
+
}
|
1293 |
+
}
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
// Watermark
|
1297 |
+
if ( wppa_switch( 'watermark_on' ) ) {
|
1298 |
+
|
1299 |
+
// Get the current watermark file settings
|
1300 |
+
$temp = wppa_get_water_file_and_pos( $id );
|
1301 |
+
$wmfile = isset( $temp['file'] ) ? $temp['file'] : '';
|
1302 |
+
$wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
|
1303 |
+
|
1304 |
+
$user = wppa_get_user();
|
1305 |
+
$has_source = wppa_is_file( wppa_get_source_path( $id ) );
|
1306 |
+
$can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
|
1307 |
+
if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
|
1308 |
+
wppa_echo( '
|
1309 |
+
<div class="left" style="max-width:250px;">
|
1310 |
+
<label
|
1311 |
+
for="wmfsel_' . $id . '">' .
|
1312 |
+
__( 'Watermark', 'wp-photo-album-plus' ) . '
|
1313 |
+
</label><br>
|
1314 |
+
<select
|
1315 |
+
id="wmfsel_' . $id . '"
|
1316 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_file_' . $user . '\', this.value)"
|
1317 |
+
>' .
|
1318 |
+
wppa_watermark_file_select( 'user', $album ) . '
|
1319 |
+
</select>
|
1320 |
+
</div>
|
1321 |
+
<div class="left">
|
1322 |
+
<label
|
1323 |
+
for="wmpsel_' . $id . '">' .
|
1324 |
+
__( 'Position', 'wp-photo-album-plus' ) . '
|
1325 |
+
</label><br>
|
1326 |
+
<select
|
1327 |
+
id="wmpsel_' . $id . '"
|
1328 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this.value)"
|
1329 |
+
>' .
|
1330 |
+
wppa_watermark_pos_select( 'user', $album ) . '
|
1331 |
+
</select>
|
1332 |
+
</div>
|
1333 |
+
<div class="left">
|
1334 |
+
<label>
|
1335 |
+
|
1336 |
+
</label><br>
|
1337 |
+
<input
|
1338 |
+
type="button"
|
1339 |
+
class="button wppa-admin-button"
|
1340 |
+
value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"
|
1341 |
+
onclick="wppaTryWatermark( ' . $id . ', ' . $has_source . ', ' . $can_remove . ' )"
|
1342 |
+
/>
|
1343 |
+
<img
|
1344 |
+
id="wppa-water-spin-' . $id . '"
|
1345 |
+
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1346 |
+
alt="Spin"
|
1347 |
+
style="visibility:hidden"
|
1348 |
+
/>
|
1349 |
+
</div>' );
|
1350 |
+
}
|
1351 |
+
/*
|
1352 |
+
elseif ( basename( $wmfile ) != '--- none ---' ) {
|
1353 |
+
wppa_echo(
|
1354 |
+
__( 'Watermark', 'wp-photo-album-plus' ) . ' ' .
|
1355 |
+
__( 'File', 'wp-photo-album-plus' ) . ' ' . strip_tags( basename( $wmfile ) ) . ' ' .
|
1356 |
+
__( 'Pos', 'wp-photo-album-plus' ) . ' ' . strip_tags( $wmpos ) );
|
1357 |
+
}
|
1358 |
+
*/
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
// Schedule for delete
|
1362 |
+
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
1363 |
+
if ( $may_change_delete ) {
|
1364 |
+
wppa_echo( '
|
1365 |
+
<div class="left" style="max-width: 500px;">
|
1366 |
+
<label
|
1367 |
+
for="scheduledel-' . $id . '">' .
|
1368 |
+
__( 'Delete at', 'wp-photo-album-plus' ) . '
|
1369 |
+
</label><br>
|
1370 |
+
<input
|
1371 |
+
type="checkbox"
|
1372 |
+
id="scheduledel-' . $id . '"' .
|
1373 |
+
( $scheduledel ? ' checked' : '' ) .
|
1374 |
+
( $may_change_delete ? '' : ' disabled' ) . '
|
1375 |
+
onchange="wppaTryScheduledel( ' . $id . ' )"
|
1376 |
+
/> ' .
|
1377 |
+
wppa_get_date_time_select_html( 'delphoto', $id, true ) . '
|
1378 |
+
</div>' );
|
1379 |
+
}
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
|
1383 |
+
|
1384 |
+
wppa_echo( '<div id="psdesc-' . $id . '" class="description clear" style="margin-top:6px;display:none">' .
|
1385 |
+
__( 'Note: Featured photos should have a descriptive name, a name a search engine will look for!', 'wp-photo-album-plus' ) . '
|
1386 |
+
</div>' );
|
1387 |
+
|
1388 |
+
wppa_echo( '</fieldset>' );
|
1389 |
+
|
1390 |
+
// End Tab1 Section 2
|
1391 |
+
wppa_echo( '</div>' );
|
1392 |
|
1393 |
wppa_echo( '
|
1394 |
<!-- Section 3, Actions -->
|
1395 |
<div class="wppa-flex">' );
|
1396 |
|
1397 |
+
wppa_echo( '
|
1398 |
+
<fieldset class="wppa-fieldset" style="width:100%">
|
1399 |
+
<legend class="wppa-legend">' .
|
1400 |
+
__( 'Actions', 'wp-photo-album-plus' ) . '
|
1401 |
+
</legend>' );
|
1402 |
+
|
1403 |
// Move/copy
|
1404 |
if ( ! $quick ) {
|
1405 |
|
1419 |
}
|
1420 |
|
1421 |
wppa_echo( '
|
1422 |
+
<div class="left" style="max-width:400px">
|
1423 |
<label>' .
|
1424 |
+
__( 'Target album for copy/move', 'wp-photo-album-plus' ) . '
|
1425 |
</label><br>
|
1426 |
<select
|
1427 |
id="target-' . $id . '"
|
1428 |
+
style="max-width:250px">' .
|
1429 |
$album_select[$album] . '
|
1430 |
</select>
|
1431 |
</div>' );
|
1432 |
}
|
1433 |
else {
|
1434 |
wppa_echo( '
|
1435 |
+
<div class="left">
|
1436 |
<label>' .
|
1437 |
+
__( 'Target album for copy/move', 'wp-photo-album-plus' ) . '
|
1438 |
</label><br>
|
1439 |
<input
|
1440 |
id="target-' . $id . '"
|
1446 |
}
|
1447 |
|
1448 |
wppa_echo( '
|
1449 |
+
<div class="left" style="max-width:500px">
|
1450 |
<label>
|
1451 |
|
1452 |
</label><br>
|
1469 |
if ( ! $b_is_video ) {
|
1470 |
if ( ! wppa_can_admin_magick( $id ) ) {
|
1471 |
wppa_echo( '
|
1472 |
+
<div class="left">
|
1473 |
<label>
|
1474 |
|
1475 |
</label><br>
|
1480 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1481 |
/>
|
1482 |
</div>
|
1483 |
+
<div class="left">
|
1484 |
<label>
|
1485 |
|
1486 |
</label><br>
|
1491 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1492 |
/>
|
1493 |
</div>
|
1494 |
+
<div class="left">
|
1495 |
<label>
|
1496 |
|
1497 |
</label><br>
|
1502 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1503 |
/>
|
1504 |
</div>
|
1505 |
+
<div class="left">
|
1506 |
<label>
|
1507 |
|
1508 |
</label><br>
|
1513 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1514 |
/>
|
1515 |
</div>
|
1516 |
+
<div class="left">
|
1517 |
<label>
|
1518 |
|
1519 |
</label><br>
|
1527 |
}
|
1528 |
}
|
1529 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
// Delete
|
1531 |
if ( wppa_user_is( 'administrator' ) || wppa_get_photo_item( $id, 'owner' ) == wppa_get_user() ) {
|
1532 |
if ( ! wppa( 'front_edit' ) ) {
|
1533 |
wppa_echo( '
|
1534 |
+
<div class="left">
|
1535 |
<label>
|
1536 |
|
1537 |
</label><br>
|
1548 |
|
1549 |
if ( $deleted ) {
|
1550 |
wppa_echo( '
|
1551 |
+
<div class="left">
|
1552 |
<label>
|
1553 |
|
1554 |
</label><br>
|
1567 |
// Re-upload
|
1568 |
if ( wppa_user_is( 'administrator' ) || ! wppa_switch( 'reup_is_restricted' ) ) {
|
1569 |
wppa_echo( '
|
1570 |
+
<div class="left" style="max-width:500px;">
|
1571 |
<label>
|
1572 |
|
1573 |
</label><br>
|
1598 |
</div>' );
|
1599 |
}
|
1600 |
|
1601 |
+
wppa_echo( '</fieldset>' );
|
1602 |
+
|
1603 |
+
// End flex div
|
1604 |
+
wppa_echo( '</div>' );
|
1605 |
+
|
1606 |
+
// Section 4
|
1607 |
+
wppa_echo( '
|
1608 |
+
<div class="wppa-flex-column">' );
|
1609 |
+
|
1610 |
+
// Name
|
1611 |
wppa_echo( '
|
1612 |
+
<fieldset class="wppa-fieldset">
|
1613 |
+
<legend class="wppa-legend">' .
|
1614 |
+
__( 'Name', 'wp-photo-album-plus' ) . '
|
1615 |
+
</legend>
|
1616 |
+
<input
|
1617 |
+
type="text"
|
1618 |
+
style="width:100%"
|
1619 |
+
id="pname-' . $id . '"
|
1620 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'name\', this.value)"
|
1621 |
+
value="' . esc_attr( stripslashes( $name ) ) . '"
|
1622 |
+
/>
|
1623 |
+
<br>
|
1624 |
+
<span style="float:right">' .
|
1625 |
+
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
1626 |
+
</span>
|
1627 |
+
</fieldset>' );
|
1628 |
+
|
1629 |
+
// Description editable
|
1630 |
+
if ( ! wppa_switch( 'desc_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1631 |
+
wppa_echo( '
|
1632 |
+
<fieldset class="wppa-fieldset">
|
1633 |
+
<legend class="wppa-legend">' .
|
1634 |
+
__( 'Description', 'wp-photo-album-plus' ) . '
|
1635 |
+
</legend>' );
|
1636 |
+
|
1637 |
+
// WP editor
|
1638 |
+
if ( wppa_switch( 'use_wp_editor' ) ) {
|
1639 |
+
$alfaid = wppa_alfa_id( $id );
|
1640 |
+
|
1641 |
+
wp_editor( $description,
|
1642 |
+
'wppaphotodesc'.$alfaid,
|
1643 |
+
array( 'wpautop' => true,
|
1644 |
+
'media_buttons' => false,
|
1645 |
+
'textarea_rows' => '6',
|
1646 |
+
'tinymce' => true
|
1647 |
+
)
|
1648 |
+
);
|
1649 |
|
1650 |
+
wppa_echo( '
|
1651 |
+
<input
|
1652 |
+
type="button"
|
1653 |
+
style="clear:left"
|
1654 |
+
class="button button-secundary"
|
1655 |
+
value="' . esc_attr( __( 'Update Photo description', 'wp-photo-album-plus' ) ) . '"
|
1656 |
+
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'description\', wppaGetTinyMceContent(\'wppaphotodesc' . $alfaid . '\') )"
|
1657 |
+
/>
|
1658 |
+
<img
|
1659 |
+
id="wppa-photo-spin-' . $id . '"
|
1660 |
+
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1661 |
+
style="visibility:hidden"
|
1662 |
+
/>' );
|
1663 |
+
}
|
1664 |
|
1665 |
+
// Textarea
|
1666 |
+
else {
|
1667 |
+
wppa_echo( '
|
1668 |
+
<div>
|
1669 |
+
<textarea
|
1670 |
+
style="width:100%;height:60px"
|
1671 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'description\', this.value)"
|
1672 |
+
>' .
|
1673 |
+
esc_textarea( stripslashes( $description ) ) . '
|
1674 |
+
</textarea>
|
1675 |
+
</div>' );
|
1676 |
+
}
|
1677 |
+
wppa_echo( '
|
1678 |
+
</fieldset>' );
|
1679 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1680 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1681 |
|
1682 |
+
// Description not editable
|
1683 |
+
else {
|
1684 |
+
wppa_echo( '
|
1685 |
+
<fieldset class="wppa-fieldset">
|
1686 |
+
<legend class="wppa-legend">' .
|
1687 |
+
__( 'Description', 'wp-photo-album-plus' ) . '
|
1688 |
+
</legend>
|
1689 |
+
<textarea
|
1690 |
+
style="width:100%;height:60px"
|
1691 |
+
readonly
|
1692 |
+
>' .
|
1693 |
+
esc_textarea( stripslashes( $description ) ) . '
|
1694 |
+
</textarea>
|
1695 |
+
</fieldset>' );
|
1696 |
+
}
|
1697 |
|
1698 |
+
// Tags
|
1699 |
+
{
|
1700 |
+
$allowed = ! wppa_switch( 'newtags_is_restricted' ) || wppa_user_is( 'administrator' );
|
1701 |
+
wppa_echo( '
|
1702 |
+
<fieldset class="wppa-fieldset">
|
1703 |
+
<legend class="wppa-legend">' .
|
1704 |
+
__( 'Tags', 'wp-photo-album-plus' ) . '
|
1705 |
+
</legend>
|
1706 |
+
<input
|
1707 |
+
id="tags-' . $id . '"
|
1708 |
+
type="text"
|
1709 |
+
style="width:100%"
|
1710 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', this.value)"
|
1711 |
+
value="' . esc_attr( $tags ) . '"' .
|
1712 |
+
( $allowed ? '' : ' readonly="readonly"' ) . '
|
1713 |
+
/>' );
|
1714 |
+
if ( $allowed ) {
|
1715 |
+
wppa_echo( '
|
1716 |
+
<br>
|
1717 |
+
<span class="description">' .
|
1718 |
+
__( 'Separate tags with commas.', 'wp-photo-album-plus' ) . '
|
1719 |
+
</span>' );
|
1720 |
+
}
|
1721 |
+
wppa_echo( '
|
1722 |
+
<select
|
1723 |
+
onchange="wppaAddTag( this.value, \'tags-' . $id . '\' ); wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', document.getElementById( \'tags-' . $id . '\' ).value )">' );
|
1724 |
+
|
1725 |
+
if ( wppa_switch( 'predef_tags_only' ) ) {
|
1726 |
+
$keys = explode( ',', trim( wppa_opt( 'minimum_tags' ) ) );
|
1727 |
+
$taglist = array();
|
1728 |
+
foreach ( $keys as $key ) {
|
1729 |
+
$taglist[$key]['tag'] = $key;
|
1730 |
+
}
|
1731 |
+
}
|
1732 |
+
else {
|
1733 |
+
$taglist = wppa_get_taglist();
|
1734 |
+
}
|
1735 |
|
1736 |
+
if ( is_array( $taglist ) ) {
|
1737 |
+
wppa_echo( '<option value="">' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>' );
|
1738 |
+
foreach ( $taglist as $tag ) {
|
1739 |
+
wppa_echo( '<option value="' . esc_attr( $tag['tag'] ) . '">' . htmlspecialchars( $tag['tag'] ) . '</option>' );
|
1740 |
+
}
|
1741 |
+
if ( ! $allowed ) {
|
1742 |
+
wppa_echo( '<option value="-clear-">' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>' );
|
1743 |
+
}
|
1744 |
+
}
|
1745 |
+
else {
|
1746 |
+
wppa_echo( '<option value="0">' . __( 'No tags yet', 'wp-photo-album-plus' ) . '</option>' );
|
1747 |
+
}
|
1748 |
+
wppa_echo( '
|
1749 |
+
</select>
|
1750 |
+
</fieldset>' );
|
1751 |
+
}
|
1752 |
|
1753 |
+
// Custom
|
1754 |
+
if ( wppa_switch( 'custom_fields' ) ) {
|
1755 |
+
$custom = wppa_get_photo_item( $photo['id'], 'custom' );
|
1756 |
+
if ( $custom ) {
|
1757 |
+
$custom_data = wppa_unserialize( $custom );
|
1758 |
+
}
|
1759 |
+
else {
|
1760 |
+
$custom_data = array( '', '', '', '', '', '', '', '', '', '' );
|
1761 |
+
}
|
1762 |
|
1763 |
+
// Open fieldset
|
1764 |
+
wppa_echo( '
|
1765 |
+
<fieldset class="wppa-fieldset">
|
1766 |
+
<legend class="wppa-legend">' .
|
1767 |
+
__( 'Custom data fields', 'wp-photo-album-plus' ) . '
|
1768 |
+
</legend>' );
|
|
|
|
|
|
|
1769 |
|
1770 |
+
foreach( array_keys( $custom_data ) as $key ) {
|
1771 |
+
if ( wppa_opt( 'custom_caption_' . $key ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1772 |
|
|
|
1773 |
wppa_echo( '
|
1774 |
+
<div>
|
1775 |
+
<label>
|
1776 |
+
<span style="float:left">' .
|
1777 |
+
apply_filters( 'translate_text', wppa_opt( 'custom_caption_' . $key ) ) . ' (w#cc' . $key . ')
|
1778 |
+
</span>
|
1779 |
+
<span style="float:right">
|
1780 |
+
(w#cd' . $key . ')
|
1781 |
+
</span>
|
1782 |
+
</label><br>
|
1783 |
+
<input
|
1784 |
+
type="text"
|
1785 |
+
style="width:100%"
|
1786 |
+
id="custom_' . $key . '-' . $id . '"
|
1787 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'custom_' . $key . '\', this.value)"
|
1788 |
+
value="' . esc_attr( stripslashes( $custom_data[$key] ) ) . '"
|
1789 |
+
/>
|
1790 |
+
<div>' );
|
1791 |
|
1792 |
+
}
|
1793 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1794 |
|
1795 |
+
wppa_echo( '
|
1796 |
+
</fieldset>' );
|
1797 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1798 |
|
1799 |
+
wppa_echo( '
|
1800 |
+
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1802 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1803 |
|
1804 |
+
// End Tab 1
|
1805 |
+
wppa_echo( '</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1806 |
|
1807 |
+
// Tab 2 Files
|
1808 |
+
{
|
1809 |
+
wppa_echo( '
|
1810 |
+
<div
|
1811 |
+
id="photofiles-' . $id . '"
|
1812 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
1813 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
1814 |
+
>' );
|
|
|
1815 |
|
1816 |
+
{
|
1817 |
+
wppa_echo( '
|
1818 |
+
<table class="wppa-table">
|
1819 |
+
<thead>
|
1820 |
+
<td>' . __( 'Type', 'wp-photo-album-plus' ) . '</td>
|
1821 |
+
<td>' . __( 'Size', 'wp-photo-album-plus' ) . '</td>
|
1822 |
+
<td>' . __( 'Path', 'wp-photo-album-plus' ) . '</td>
|
1823 |
+
<td>' . __( 'Url', 'wp-photo-album-plus' ) . '</td>
|
1824 |
+
</thead>
|
1825 |
+
<tbody>' );
|
1826 |
|
1827 |
+
// Video
|
1828 |
+
if ( $b_is_video ) {
|
1829 |
+
|
1830 |
+
$formats = '';
|
1831 |
+
$paths = '';
|
1832 |
+
$urls = '';
|
1833 |
+
foreach ( $is_video as $fmt ) {
|
1834 |
+
$formats .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
1835 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
1836 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) );
|
1837 |
+
$urls .= '<a href="'. $url .'" target="_blank">' . $url . '<br>';
|
1838 |
+
}
|
1839 |
|
1840 |
+
wppa_echo( '
|
1841 |
+
<tr>
|
1842 |
+
<td>' .
|
1843 |
+
$formats . '
|
1844 |
+
</td>
|
1845 |
+
<td>
|
1846 |
+
<input
|
1847 |
+
type="text"
|
1848 |
+
style="width:50px;margin:0 4px;padding-left:8px!important"
|
1849 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
1850 |
+
value="' . esc_attr( $videox ) . '"
|
1851 |
+
/>px W' .
|
1852 |
+
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
1853 |
+
<input
|
1854 |
+
type="text"
|
1855 |
+
style="width:50px;margin:0 4px;padding-left:8px!important"
|
1856 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
1857 |
+
value="' . esc_attr( $videoy ) . '"
|
1858 |
+
/>px H' .
|
1859 |
+
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) . '
|
1860 |
+
</td>
|
1861 |
+
<td>' .
|
1862 |
+
$paths . '
|
1863 |
+
</td>
|
1864 |
+
<td>' .
|
1865 |
+
$urls . '
|
1866 |
+
</td>
|
1867 |
+
</tr>' );
|
1868 |
+
}
|
1869 |
|
1870 |
+
// Audio
|
1871 |
+
if ( $b_has_audio ) {
|
1872 |
+
|
1873 |
+
$formats = '';
|
1874 |
+
$sizes = '';
|
1875 |
+
$paths = '';
|
1876 |
+
$urls = '';
|
1877 |
+
foreach ( $has_audio as $fmt ) {
|
1878 |
+
$formats .= $fmt . '<br>';
|
1879 |
+
$sizes .= wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
1880 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
1881 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) );
|
1882 |
+
$urls .= '<a href="'. $url .'" target="_blank">' . $url . '<br>';
|
1883 |
+
}
|
1884 |
|
1885 |
+
wppa_echo( '
|
1886 |
+
<tr>
|
1887 |
+
<td>' .
|
1888 |
+
$formats . '
|
1889 |
+
</td>
|
1890 |
+
<td>' .
|
1891 |
+
$sizes . '
|
1892 |
+
</td>
|
1893 |
+
<td>' .
|
1894 |
+
$paths . '
|
1895 |
+
</td>
|
1896 |
+
<td>' .
|
1897 |
+
$urls . '
|
1898 |
+
</td>
|
1899 |
+
</tr>' );
|
1900 |
+
}
|
1901 |
|
1902 |
+
// Pdf
|
1903 |
+
if ( $is_pdf ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1904 |
|
1905 |
+
// Source
|
1906 |
+
$sp = wppa_get_source_path( $id );
|
1907 |
+
$fs = wppa_get_filesize( $sp );
|
1908 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp );
|
1909 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp );
|
1910 |
+
wppa_echo( '
|
1911 |
+
<tr>
|
1912 |
+
<td>' .
|
1913 |
+
__( 'Document file', 'wp-photo-album-plus' ) . '
|
1914 |
+
</td>
|
1915 |
+
<td>' .
|
1916 |
+
$fs . '
|
1917 |
+
</td>
|
1918 |
+
<td>' .
|
1919 |
+
$path . '
|
1920 |
+
</td>
|
1921 |
+
<td>
|
1922 |
+
<a href="'.$url.'" target="_blank">' .
|
1923 |
+
$url . '
|
1924 |
+
</a>
|
1925 |
+
</td>
|
1926 |
+
</tr>' );
|
1927 |
+
}
|
1928 |
|
1929 |
+
// Non pdf source_file
|
1930 |
+
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1931 |
|
1932 |
+
// Source
|
1933 |
+
$sp = wppa_get_source_path( $id );
|
1934 |
+
$o1sp = wppa_get_o1_source_path( $id );
|
1935 |
+
$files = [];
|
1936 |
+
if ( wppa_is_file( $sp ) || wppa_is_file( $o1sp ) ) {
|
1937 |
|
1938 |
+
if ( is_file( $sp ) ) {
|
1939 |
+
$ima = getimagesize( $sp );
|
1940 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.';
|
1941 |
+
$files[] = ['name' => __( 'Source', 'wp-photo-album-plus' ),
|
1942 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp ),
|
1943 |
+
'size' => $txt,
|
1944 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp )];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1945 |
}
|
1946 |
+
if ( is_file( $o1sp ) ) {
|
1947 |
+
$ima = getimagesize( $o1sp );
|
1948 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $o1sp ) . '.';
|
1949 |
+
$files[] = ['name' => __( 'Oriented source', 'wp-photo-album-plus' ),
|
1950 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $o1sp ),
|
1951 |
+
'size' => $txt,
|
1952 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $o1sp )];
|
1953 |
}
|
1954 |
+
|
1955 |
+
foreach( $files as $file ) {
|
1956 |
+
wppa_echo( '
|
1957 |
+
<tr>
|
1958 |
+
<td>' .
|
1959 |
+
$file['name'] . '
|
1960 |
+
</td>
|
1961 |
+
<td>' .
|
1962 |
+
$file['size'] . '
|
1963 |
+
</td>
|
1964 |
+
<td>' .
|
1965 |
+
$file['path'] . '
|
1966 |
+
</td>
|
1967 |
+
<td>
|
1968 |
+
<a href="'.$file['url'].'" target="_blank">' .
|
1969 |
+
$file['url'] . '
|
1970 |
+
</a>
|
1971 |
+
</td>
|
1972 |
+
</tr>' );
|
1973 |
+
}
|
1974 |
+
}
|
1975 |
+
}
|
1976 |
+
|
1977 |
+
// Poster
|
1978 |
+
if ( $is_pdf || $b_is_video ) {
|
1979 |
+
|
1980 |
+
// Poster
|
1981 |
+
$sp = wppa_fix_poster_ext( wppa_get_source_path( $id ), $id );
|
1982 |
+
$dsp = wppa_fix_poster_ext( wppa_get_photo_path( $id ), $id );
|
1983 |
+
$files = [];
|
1984 |
+
if ( wppa_is_file( $sp ) || wppa_is_file( $dsp ) ) {
|
1985 |
+
|
1986 |
+
if ( wppa_is_file( $sp ) ) {
|
1987 |
+
$ima = getimagesize( $sp );
|
1988 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.';
|
1989 |
+
$files[] = ['name' => __( 'Poster source', 'wp-photo-album-plus' ),
|
1990 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp ),
|
1991 |
+
'size' => $txt,
|
1992 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp )];
|
1993 |
}
|
1994 |
+
if ( wppa_is_file( $dsp ) ) {
|
1995 |
+
$ima = getimagesize( $dsp );
|
1996 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $dsp ) . '.';
|
1997 |
+
$files[] = ['name' => __( 'Poster display', 'wp-photo-album-plus' ),
|
1998 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dsp ),
|
1999 |
+
'size' => $txt,
|
2000 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dsp )];
|
2001 |
+
}
|
2002 |
+
|
2003 |
+
foreach( $files as $file ) {
|
2004 |
+
wppa_echo( '
|
2005 |
+
<tr>
|
2006 |
+
<td>' .
|
2007 |
+
$file['name'] . '
|
2008 |
+
</td>
|
2009 |
+
<td>' .
|
2010 |
+
$file['size'] . '
|
2011 |
+
</td>
|
2012 |
+
<td>' .
|
2013 |
+
$file['path'] . '
|
2014 |
+
</td>
|
2015 |
+
<td>
|
2016 |
+
<a href="'.$file['url'].'" target="_blank">' .
|
2017 |
+
$file['url'] . '
|
2018 |
+
</a>
|
2019 |
+
</td>
|
2020 |
+
</tr>' );
|
2021 |
+
}
|
2022 |
+
}
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
// Non video, non pdf Display
|
2026 |
+
if ( ! $b_is_video && ! $is_pdf ) {
|
2027 |
+
$dp = wppa_get_photo_path( $id );
|
2028 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dp );
|
2029 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dp );
|
2030 |
+
|
2031 |
+
if ( is_file( $dp ) ) {
|
2032 |
+
|
2033 |
+
$txt = '
|
2034 |
+
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
2035 |
+
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
2036 |
+
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
2037 |
+
|
2038 |
+
wppa_echo( '
|
2039 |
+
<tr>
|
2040 |
+
<td>' .
|
2041 |
+
__( 'Display file', 'wp-photo-album-plus' ) . '
|
2042 |
+
</td>
|
2043 |
+
<td>' .
|
2044 |
+
$txt . '
|
2045 |
+
</td>
|
2046 |
+
<td>' .
|
2047 |
+
$path . '
|
2048 |
+
</td>
|
2049 |
+
<td>
|
2050 |
+
<a href="'.$url.'" target="_blank">' .
|
2051 |
+
$url . '
|
2052 |
+
</a>
|
2053 |
+
</td>
|
2054 |
+
</tr>' );
|
2055 |
+
}
|
2056 |
+
}
|
2057 |
+
|
2058 |
+
// Thumbnail
|
2059 |
+
if ( true ) {
|
2060 |
+
$tp = wppa_get_thumb_path( $id );
|
2061 |
+
if ( is_file( $tp ) ) {
|
2062 |
+
$txt = '
|
2063 |
+
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
2064 |
+
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
2065 |
+
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
2066 |
+
|
2067 |
+
<input
|
2068 |
+
type="checkbox"' .
|
2069 |
+
( $thumblock ? ' checked' : '' ) . '
|
2070 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
2071 |
+
__( 'Locked', 'wp-photo-album-plus' );
|
2072 |
+
|
2073 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $tp );
|
2074 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $tp );
|
2075 |
+
|
2076 |
+
wppa_echo( '
|
2077 |
+
<tr>
|
2078 |
+
<td>' .
|
2079 |
+
__( 'Thumbnail', 'wp-photo-album-plus' ) . '
|
2080 |
+
</td>
|
2081 |
+
<td>' .
|
2082 |
+
$txt . '
|
2083 |
+
</td>
|
2084 |
+
<td>' .
|
2085 |
+
$path . '
|
2086 |
+
</td>
|
2087 |
+
<td>
|
2088 |
+
<a href="'.$url.'" target="_blank">' .
|
2089 |
+
$url . '
|
2090 |
+
</a>
|
2091 |
+
</td>
|
2092 |
+
</tr>' );
|
2093 |
+
}
|
2094 |
+
}
|
2095 |
+
|
2096 |
+
// Local CDN
|
2097 |
+
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
2098 |
+
|
2099 |
+
$files = wppa_cdn_files( $id );
|
2100 |
+
if ( !empty( $files ) ) {
|
2101 |
+
|
2102 |
+
$txt = '<span id="cdnfiles-' . $id . '">';
|
2103 |
+
$paths = '';
|
2104 |
+
$urls = '';
|
2105 |
+
|
2106 |
+
foreach( $files as $file ) {
|
2107 |
+
if ( basename( $file ) != 'index.php' ) {
|
2108 |
+
$t = explode( '.', basename( $file ) );
|
2109 |
+
$t = explode( '-', $t[0] );
|
2110 |
+
$x = $t[0];
|
2111 |
+
$y = $t[1];
|
2112 |
+
$size = filesize( $file );
|
2113 |
+
|
2114 |
+
$txt .=
|
2115 |
+
|
2116 |
+
str_replace( '-', ' x ', wppa_strip_ext( basename( $file ) ) ) . ': ' .
|
2117 |
+
|
2118 |
+
sprintf( '(%4.2fkB)', $size / 1024 ) . '<br>';
|
2119 |
+
|
2120 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', $file ) . '<br>';
|
2121 |
+
|
2122 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $file );
|
2123 |
+
$urls .= '<a href="'.$url.'" target="_blank">' . $file . '</a><br>';
|
2124 |
+
}
|
2125 |
+
}
|
2126 |
+
$txt .= '</span>';
|
2127 |
+
|
2128 |
+
wppa_echo( '
|
2129 |
+
<tr>
|
2130 |
+
<td style="line-height:20px">' .
|
2131 |
+
__( 'Local CDN', 'wp-photo-album-plus' ) . '
|
2132 |
+
</td>
|
2133 |
+
<td style="line-height:20px">' .
|
2134 |
+
$txt . '
|
2135 |
+
</td>
|
2136 |
+
<td style="line-height:20px">' .
|
2137 |
+
$paths . '
|
2138 |
+
</td>
|
2139 |
+
<td style="line-height:20px">' .
|
2140 |
+
$urls . '
|
2141 |
+
</td>
|
2142 |
+
</tr>' );
|
2143 |
+
}
|
2144 |
+
}
|
2145 |
+
/*
|
2146 |
+
$lbl = __( 'Local CDN files', 'wp-photo-album-plus' );
|
2147 |
+
$txt = '<span id="cdnfiles-' . $id . '">';
|
2148 |
+
|
2149 |
+
$files = wppa_cdn_files( $id );
|
2150 |
+
if ( !empty( $files ) ) {
|
2151 |
+
foreach( $files as $file ) {
|
2152 |
+
if ( basename( $file ) != 'index.php' ) {
|
2153 |
+
$t = explode( '.', basename( $file ) );
|
2154 |
+
$t = explode( '-', $t[0] );
|
2155 |
+
$x = $t[0];
|
2156 |
+
$y = $t[1];
|
2157 |
+
$size = filesize( $file );
|
2158 |
+
$txt .= '
|
2159 |
+
<a
|
2160 |
+
href="' . wppa_cdn_url( $id, $x, $y ) . '"
|
2161 |
+
target="_blank"
|
2162 |
+
>' .
|
2163 |
+
basename( $file ) .
|
2164 |
+
'</a> ' .
|
2165 |
+
sprintf( '%4.2fkB', $size / 1024 ) . '<br>';
|
2166 |
+
}
|
2167 |
+
}
|
2168 |
+
}
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
*/
|
2172 |
+
|
2173 |
+
wppa_echo( '
|
2174 |
+
</tbody>
|
2175 |
+
</table>' );
|
2176 |
+
}
|
2177 |
+
/*
|
2178 |
+
// Pdf
|
2179 |
+
if ( wppa_is_pdf( $id ) ) {
|
2180 |
+
$sp = wppa_get_source_path( $id );
|
2181 |
+
$fs = wppa_get_filesize( $sp );
|
2182 |
+
wppa_echo( '
|
2183 |
+
<div>
|
2184 |
+
<label>' .
|
2185 |
+
__( 'Document file', 'wp-photo-album-plus' ) . '
|
2186 |
+
</label><br>
|
2187 |
+
<div class="wppa-ldi">' .
|
2188 |
+
$fs . '
|
2189 |
+
</div>
|
2190 |
+
</div>' );
|
2191 |
+
}
|
2192 |
+
*/
|
2193 |
+
/*
|
2194 |
+
// Source
|
2195 |
+
$sp = wppa_get_o1_source_path( $id );
|
2196 |
+
if ( ! wppa_is_file( $sp ) ) {
|
2197 |
+
$sp = wppa_get_source_path( $id );
|
2198 |
+
}
|
2199 |
+
if ( wppa_is_pdf( $id ) ) {
|
2200 |
+
$sp = wppa_strip_ext( $sp ) . '.jpg';
|
2201 |
+
if ( ! wppa_is_file( $sp ) ) {
|
2202 |
+
$sp = wppa_strip_ext( $sp ) . '.png';
|
2203 |
+
}
|
2204 |
+
}
|
2205 |
+
if ( is_file( $sp ) ) {
|
2206 |
+
$ima = getimagesize( $sp );
|
2207 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.' . $br;
|
2208 |
+
}
|
2209 |
+
else {
|
2210 |
+
$txt = __( 'Unavailable', 'wp-photo-album-plus' );
|
2211 |
+
}
|
2212 |
+
wppa_echo( '
|
2213 |
+
<div style="max-width:300px">
|
2214 |
+
<label>' .
|
2215 |
+
__( 'Source file', 'wp-photo-album-plus' ) . '
|
2216 |
+
</label><br>
|
2217 |
+
<div class="wppa-ldi">' .
|
2218 |
+
$txt . '
|
2219 |
+
</div>
|
2220 |
+
</div>' );
|
2221 |
+
*/
|
2222 |
+
/*
|
2223 |
+
// Display
|
2224 |
+
if ( $is_video || $has_audio ) {
|
2225 |
+
$lbl = __( 'Poster file', 'wp-photo-album-plus' );
|
2226 |
+
}
|
2227 |
+
else {
|
2228 |
+
$lbl = __( 'Display file', 'wp-photo-album-plus' );
|
2229 |
+
}
|
2230 |
+
$dp = wppa_get_photo_path( $id );
|
2231 |
+
if ( is_file( $dp ) ) {
|
2232 |
+
$txt = '
|
2233 |
+
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
2234 |
+
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
2235 |
+
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
2236 |
+
}
|
2237 |
+
else {
|
2238 |
+
$txt = '
|
2239 |
+
<span style="color:red">' .
|
2240 |
+
__( 'Unavailable', 'wp-photo-album-plus' ) . '
|
2241 |
+
</span>';
|
2242 |
+
}
|
2243 |
+
wppa_echo( '
|
2244 |
+
<div style="max-width:300px">
|
2245 |
+
<label>' .
|
2246 |
+
$lbl . '
|
2247 |
+
</label><br>
|
2248 |
+
<div class="wppa-ldi">' .
|
2249 |
+
$txt . '
|
2250 |
+
</div>
|
2251 |
+
</div>' );
|
2252 |
+
*/
|
2253 |
+
/*
|
2254 |
+
// Thumbnail
|
2255 |
+
if ( ! $is_video ) {
|
2256 |
+
$lbl = __( 'Thumbnail file', 'wp-photo-album-plus' );
|
2257 |
+
$tp = wppa_get_thumb_path( $id );
|
2258 |
+
if ( is_file( $tp ) ) {
|
2259 |
+
$txt = '
|
2260 |
+
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
2261 |
+
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
2262 |
+
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
2263 |
+
|
2264 |
+
<input
|
2265 |
+
type="checkbox"' .
|
2266 |
+
( $thumblock ? ' checked' : '' ) . '
|
2267 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
2268 |
+
__( 'Locked', 'wp-photo-album-plus' );
|
2269 |
+
}
|
2270 |
+
else {
|
2271 |
+
$txt = '
|
2272 |
+
<span style="color:red">' .
|
2273 |
+
__( 'Unavailable', 'wp-photo-album-plus' ) . '.
|
2274 |
+
</span>';
|
2275 |
+
}
|
2276 |
+
wppa_echo( '
|
2277 |
+
<div style="max-width:300px">
|
2278 |
+
<label>' .
|
2279 |
+
$lbl . '
|
2280 |
+
</label><br>
|
2281 |
+
<div class="wppa-ldi">' .
|
2282 |
+
$txt . '
|
2283 |
+
</div>
|
2284 |
+
</div>' );
|
2285 |
+
}
|
2286 |
+
|
2287 |
+
// Local CDN
|
2288 |
+
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
2289 |
+
$lbl = __( 'Local CDN files', 'wp-photo-album-plus' );
|
2290 |
+
$txt = '<span id="cdnfiles-' . $id . '">';
|
2291 |
+
|
2292 |
+
$files = wppa_cdn_files( $id );
|
2293 |
+
if ( !empty( $files ) ) {
|
2294 |
+
foreach( $files as $file ) {
|
2295 |
+
if ( basename( $file ) != 'index.php' ) {
|
2296 |
+
$t = explode( '.', basename( $file ) );
|
2297 |
+
$t = explode( '-', $t[0] );
|
2298 |
+
$x = $t[0];
|
2299 |
+
$y = $t[1];
|
2300 |
+
$size = filesize( $file );
|
2301 |
+
$txt .= '
|
2302 |
+
<a
|
2303 |
+
href="' . wppa_cdn_url( $id, $x, $y ) . '"
|
2304 |
+
target="_blank"
|
2305 |
+
>' .
|
2306 |
+
basename( $file ) .
|
2307 |
+
'</a> ' .
|
2308 |
+
sprintf( '%4.2fkB', $size / 1024 ) . '<br>';
|
2309 |
+
}
|
2310 |
+
}
|
2311 |
+
}
|
2312 |
+
else {
|
2313 |
+
$txt .= __( 'None', 'wp-photo-album-plus' );
|
2314 |
+
}
|
2315 |
+
$txt .= '</span>';
|
2316 |
+
wppa_echo( '
|
2317 |
+
<div>
|
2318 |
+
<label>' .
|
2319 |
+
$lbl . '
|
2320 |
+
</label><br>
|
2321 |
+
<div class="wppa-ldi">' .
|
2322 |
+
$txt . '
|
2323 |
+
</div>
|
2324 |
+
</div>' );
|
2325 |
+
}
|
2326 |
+
|
2327 |
+
// Video
|
2328 |
+
if ( $b_is_video ) {
|
2329 |
+
|
2330 |
+
// Width
|
2331 |
+
wppa_echo( '
|
2332 |
+
<div>
|
2333 |
+
<label>' .
|
2334 |
+
__( 'Video width', 'wp-photo-album-plus' ) . '
|
2335 |
+
</label><br>
|
2336 |
+
<input
|
2337 |
+
type="text"
|
2338 |
+
style="width:50px;margin:0 4px"
|
2339 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
2340 |
+
value="' . esc_attr( $videox ) . '"
|
2341 |
+
/>px
|
2342 |
+
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
2343 |
+
</div>' );
|
2344 |
+
|
2345 |
+
// Height
|
2346 |
+
wppa_echo( '
|
2347 |
+
<div>
|
2348 |
+
<label>' .
|
2349 |
+
__( 'Video height', 'wp-photo-album-plus' ) . '
|
2350 |
+
</label><br>
|
2351 |
+
<input
|
2352 |
+
type="text"
|
2353 |
+
style="width:50px;margin:0 4px"
|
2354 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
2355 |
+
value="' . esc_attr( $videoy ) . '"
|
2356 |
+
/>px
|
2357 |
+
<br>' . sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) . '
|
2358 |
+
</div>' );
|
2359 |
+
|
2360 |
+
// Formats
|
2361 |
+
$txt = '';
|
2362 |
+
foreach ( $is_video as $fmt ) {
|
2363 |
+
$txt .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
2364 |
+
}
|
2365 |
+
wppa_echo( '
|
2366 |
+
<div>
|
2367 |
+
<label>' .
|
2368 |
+
__( 'Formats', 'wp-photo-album-plus' ) . '
|
2369 |
+
</label><br>
|
2370 |
+
<div class="wppa-ldi">' .
|
2371 |
+
$txt . '
|
2372 |
+
</div>
|
2373 |
+
</div>' );
|
2374 |
+
}
|
2375 |
+
|
2376 |
+
// Audio
|
2377 |
+
if ( $b_has_audio ) {
|
2378 |
+
$txt = '';
|
2379 |
+
foreach ( $has_audio as $fmt ) {
|
2380 |
+
$txt .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
2381 |
+
}
|
2382 |
+
wppa_echo( '
|
2383 |
+
<div>
|
2384 |
+
<label>' .
|
2385 |
+
__( 'Formats', 'wp-photo-album-plus' ) . '
|
2386 |
+
</label><br>
|
2387 |
+
<div class="wppa-ldi">' .
|
2388 |
+
$txt . '
|
2389 |
+
</div>
|
2390 |
+
</div>' );
|
2391 |
+
}
|
2392 |
+
|
2393 |
+
// End flex div
|
2394 |
+
wppa_echo( '</div>' );
|
2395 |
+
|
2396 |
+
wppa_echo( '<div class="wppa-flex">' );
|
2397 |
+
|
2398 |
+
// Remake displayfiles
|
2399 |
+
if ( ! $is_video ) {
|
2400 |
+
wppa_echo( '
|
2401 |
+
<div>
|
2402 |
+
<label>
|
2403 |
+
|
2404 |
+
</label><br>
|
2405 |
+
<input
|
2406 |
+
type="button"
|
2407 |
+
class="wppa-admin-button button"
|
2408 |
+
title="' . esc_attr( __( 'Remake display file and thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2409 |
+
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
2410 |
+
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
2411 |
+
/>
|
2412 |
+
</div>' );
|
2413 |
+
}
|
2414 |
+
|
2415 |
+
// Remake thumbnail
|
2416 |
+
if ( ! $is_video ) {
|
2417 |
+
wppa_echo( '
|
2418 |
+
<div style="max-width:500px;">
|
2419 |
+
<label>
|
2420 |
+
|
2421 |
+
</label><br>
|
2422 |
+
<input
|
2423 |
+
type="button"
|
2424 |
+
class="wppa-admin-button button"
|
2425 |
+
title="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2426 |
+
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
2427 |
+
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2428 |
+
/>
|
2429 |
+
</div>' );
|
2430 |
+
}
|
2431 |
+
|
2432 |
+
// End flex div
|
2433 |
+
wppa_echo( '</div>' );
|
2434 |
+
|
2435 |
+
// Links to files
|
2436 |
+
wppa_echo( '<div>' );
|
2437 |
+
|
2438 |
+
wppa_echo( '
|
2439 |
+
<table class="wppa-table">' );
|
2440 |
+
|
2441 |
+
// -- Auto Page --
|
2442 |
+
if ( wppa_switch( 'auto_page' ) && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) {
|
2443 |
+
$appl = get_permalink( wppa_get_the_auto_page( $id ) );
|
2444 |
+
wppa_echo( '
|
2445 |
+
<tr>
|
2446 |
+
<th>' .
|
2447 |
+
__( 'Autopage Permalink', 'wp-photo-album-plus' ) . '
|
2448 |
+
</th>
|
2449 |
+
<td>
|
2450 |
+
<a href="' . $appl . '" target="_blank">' .
|
2451 |
+
$appl . '
|
2452 |
+
</a>
|
2453 |
+
</td>
|
2454 |
+
<td>
|
2455 |
+
</td>
|
2456 |
+
</tr>' );
|
2457 |
+
}
|
2458 |
+
|
2459 |
+
// -- Link url --
|
2460 |
+
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
2461 |
+
wppa_echo( '
|
2462 |
+
<tr>
|
2463 |
+
<th>' .
|
2464 |
+
__( 'Photo specific link url', 'wp-photo-album-plus' ) . '
|
2465 |
+
</th>
|
2466 |
+
<td>
|
2467 |
+
<input
|
2468 |
+
type="text"
|
2469 |
+
id="pislink-' . $id . '"
|
2470 |
+
style="width:100%"
|
2471 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'linkurl\', this.value)"
|
2472 |
+
value="' . esc_attr( $linkurl ) . '"
|
2473 |
+
/>
|
2474 |
+
</td>
|
2475 |
+
<td>
|
2476 |
+
<select
|
2477 |
+
id="pistarget-' . $id . '"
|
2478 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'linktarget\', this.value)"
|
2479 |
+
>
|
2480 |
+
<option
|
2481 |
+
value="_self"' .
|
2482 |
+
( $linktarget == '_self' ? ' selected' : '' ) . '
|
2483 |
+
>' .
|
2484 |
+
__( 'Same tab', 'wp-photo-album-plus' ) . '
|
2485 |
+
</option>
|
2486 |
+
<option
|
2487 |
+
value="_blank"' .
|
2488 |
+
( $linktarget == '_blank' ? ' selected' : '' ) . '
|
2489 |
+
>' .
|
2490 |
+
__( 'New tab', 'wp-photo-album-plus' ) . '
|
2491 |
+
</option>
|
2492 |
+
</select>
|
2493 |
+
<input
|
2494 |
+
type="button"
|
2495 |
+
class="button wppa-admin-button"
|
2496 |
+
onclick="window.open( jQuery( \'#pislink-' . $id . '\' ).val(), jQuery( \'#pistarget-' . $id . '\' ).val() )"
|
2497 |
+
value="' . __( 'Tryit!', 'wp-photo-album-plus' ) . '"
|
2498 |
+
/>
|
2499 |
+
</td>
|
2500 |
+
</tr>' );
|
2501 |
+
|
2502 |
+
// -- Link title --
|
2503 |
+
wppa_echo( '
|
2504 |
+
<tr>
|
2505 |
+
<th>' .
|
2506 |
+
__( 'Photo specific link title', 'wp-photo-album-plus' ) . '
|
2507 |
+
</th>
|
2508 |
+
<td>
|
2509 |
+
<input
|
2510 |
+
type="text"
|
2511 |
+
style="width:100%"
|
2512 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'linktitle\', this.value)"
|
2513 |
+
value="' . esc_attr( $linktitle ) . '"
|
2514 |
+
/>' );
|
2515 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
2516 |
+
wppa_echo( '
|
2517 |
+
<br>
|
2518 |
+
<span class="description">' .
|
2519 |
+
sprintf( __( 'If you want this link to be used, check \'PS Overrule\' checkbox in %s.' , 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'links', 2 ) ) . '
|
2520 |
+
</span>' );
|
2521 |
+
}
|
2522 |
+
wppa_echo( '
|
2523 |
+
</td>
|
2524 |
+
<td>
|
2525 |
+
</td>
|
2526 |
+
</tr>' );
|
2527 |
+
}
|
2528 |
+
|
2529 |
+
// -- Custom ALT field --
|
2530 |
+
if ( wppa_opt( 'alt_type' ) == 'custom' ) {
|
2531 |
+
wppa_echo( '
|
2532 |
+
<tr>
|
2533 |
+
<th>' .
|
2534 |
+
__( 'HTML Alt attribute' , 'wp-photo-album-plus' ) . '
|
2535 |
+
</th>
|
2536 |
+
<td>
|
2537 |
+
<input
|
2538 |
+
type="text"
|
2539 |
+
style="width:100%"
|
2540 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'alt\', this.value)"
|
2541 |
+
value="' . esc_attr( $alt ) . '"
|
2542 |
+
/>
|
2543 |
+
</td>
|
2544 |
+
<td>
|
2545 |
+
</td>
|
2546 |
+
</tr>' );
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
// If Quick, skip the following items for speed and space
|
2550 |
+
if ( ! $quick ) {
|
2551 |
+
|
2552 |
+
// Shortcode
|
2553 |
+
if ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) {
|
2554 |
+
wppa_echo( '
|
2555 |
+
<tr>
|
2556 |
+
<th>' .
|
2557 |
+
__( 'Single image shortcode', 'wp-photo-album-plus' ) . ':
|
2558 |
+
</th>
|
2559 |
+
<td>
|
2560 |
+
[wppa type="photo" photo="' . $id .'"]
|
2561 |
+
</td>
|
2562 |
+
<td>
|
2563 |
+
<small>' .
|
2564 |
+
sprintf( __( 'See %s The documentation %s for more shortcode options.', 'wp-photo-album-plus' ),
|
2565 |
+
'<a href="https://wppa.nl/shortcode-reference/" target="_blank">',
|
2566 |
+
'</a>'
|
2567 |
+
) . '
|
2568 |
+
</small>
|
2569 |
+
</td>
|
2570 |
+
</tr>' );
|
2571 |
+
}
|
2572 |
+
|
2573 |
+
// Source permalink
|
2574 |
+
if ( is_file( wppa_get_source_path( $id ) ) ) {
|
2575 |
+
$spl = wppa_get_source_pl( $id );
|
2576 |
+
wppa_echo( '
|
2577 |
+
<tr>
|
2578 |
+
<th>' .
|
2579 |
+
__( 'Permalink', 'wp-photo-album-plus' ) . ':
|
2580 |
+
</th>
|
2581 |
+
<td>
|
2582 |
+
<a href="' . esc_attr( $spl ) . '" target="_blank">' . htmlspecialchars( $spl ) . '</a>
|
2583 |
+
</td>
|
2584 |
+
<td>
|
2585 |
+
</td>
|
2586 |
+
</tr>' );
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
// High resolution url
|
2590 |
+
if ( $is_video ) {
|
2591 |
+
reset( $is_video );
|
2592 |
+
$fmt = current( $is_video );
|
2593 |
+
$hru = wppa_strip_ext( wppa_get_photo_path( $id, false ) ) . '.' . $fmt;
|
2594 |
+
$hru = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $hru );
|
2595 |
+
}
|
2596 |
+
else {
|
2597 |
+
$hru = htmlspecialchars( wppa_get_hires_url( $id ) );
|
2598 |
+
}
|
2599 |
+
wppa_echo( '
|
2600 |
+
<tr>
|
2601 |
+
<th>' .
|
2602 |
+
__( 'High resolution url', 'wp-photo-album-plus' ) . ':
|
2603 |
+
</th>
|
2604 |
+
<td>
|
2605 |
+
<a href="' . esc_attr( $hru ) . '" target="_blank">' . $hru . '</a>
|
2606 |
+
</td>
|
2607 |
+
<td>
|
2608 |
+
</td>
|
2609 |
+
</tr>' );
|
2610 |
+
|
2611 |
+
// Display file
|
2612 |
+
if ( is_file( wppa_get_photo_path( $id ) ) ) {
|
2613 |
+
$lru = wppa_fix_poster_ext( wppa_get_lores_url( $id ), $id );
|
2614 |
+
wppa_echo( '
|
2615 |
+
<tr>
|
2616 |
+
<th>' .
|
2617 |
+
__( 'Display file url', 'wp-photo-album-plus' ) . ':
|
2618 |
+
</th>
|
2619 |
+
<td>
|
2620 |
+
<a href="' . esc_attr( $lru ) . '" target="_blank">' . $lru . '</a>
|
2621 |
+
</td>
|
2622 |
+
<td>
|
2623 |
+
</td>
|
2624 |
+
</tr>' );
|
2625 |
+
}
|
2626 |
+
|
2627 |
+
// Thumbnail
|
2628 |
+
if ( is_file( wppa_get_thumb_path( $id ) ) ) {
|
2629 |
+
$tnu = wppa_fix_poster_ext( wppa_get_tnres_url( $id ), $id );
|
2630 |
+
wppa_echo( '
|
2631 |
+
<tr>
|
2632 |
+
<th>' .
|
2633 |
+
__( 'Thumbnail file url', 'wp-photo-album-plus' ) . ':
|
2634 |
+
</th>
|
2635 |
+
<td>
|
2636 |
+
<a href="' . esc_attr( $tnu ) . '" target="_blank">' . $tnu . '</a>
|
2637 |
+
</td>
|
2638 |
+
<td>
|
2639 |
+
</td>
|
2640 |
+
</tr>' );
|
2641 |
+
}
|
2642 |
+
}
|
2643 |
+
|
2644 |
+
wppa_echo( '</table>' );
|
2645 |
+
|
2646 |
+
// End Links to files
|
2647 |
+
wppa_echo( '</div>' );
|
2648 |
+
|
2649 |
+
*/
|
2650 |
+
|
2651 |
+
// End Tab 2
|
2652 |
+
wppa_echo( '</div>' );
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
// Tab 3 ImageMagick
|
2656 |
+
if ( wppa_can_admin_magick( $id ) && ! $quick ) {
|
2657 |
+
wppa_echo( '
|
2658 |
+
<div
|
2659 |
+
id="photomagic-' . $id . '"
|
2660 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2661 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
2662 |
+
>' );
|
2663 |
+
|
2664 |
+
{
|
2665 |
+
|
2666 |
+
// Explanation
|
2667 |
+
wppa_echo( '
|
2668 |
+
<h2 class="description" style="margin:1em">' .
|
2669 |
+
__( 'The operations are executed upon the display file.', 'wp-photo-album-plus' ) . ' ' .
|
2670 |
+
__( 'A new thumbnail image will be created from the display file.', 'wp-photo-album-plus' ) . '
|
2671 |
+
</h2>' );
|
2672 |
+
|
2673 |
+
// --- Actions ---
|
2674 |
+
wppa_echo( '
|
2675 |
+
<div class="wppa-flex">' );
|
2676 |
+
|
2677 |
+
{
|
2678 |
+
// Rotate left
|
2679 |
+
wppa_echo( '
|
2680 |
+
<input
|
2681 |
+
type="button"
|
2682 |
+
class="wppa-admin-button button"
|
2683 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
2684 |
+
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
2685 |
+
/>' );
|
2686 |
+
|
2687 |
+
// Rotat 180
|
2688 |
+
wppa_echo( '
|
2689 |
+
<input
|
2690 |
+
type="button"
|
2691 |
+
class="wppa-admin-button button"
|
2692 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
2693 |
+
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
2694 |
+
/>' );
|
2695 |
+
|
2696 |
+
// Rotate right
|
2697 |
+
wppa_echo( '
|
2698 |
+
<input
|
2699 |
+
type="button"
|
2700 |
+
class="wppa-admin-button button"
|
2701 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
2702 |
+
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
2703 |
+
/>' );
|
2704 |
+
|
2705 |
+
// Flip
|
2706 |
+
wppa_echo( '
|
2707 |
+
<input
|
2708 |
+
type="button"
|
2709 |
+
class="wppa-admin-button button"
|
2710 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
2711 |
+
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
2712 |
+
title="-flip"
|
2713 |
+
/>' );
|
2714 |
+
|
2715 |
+
// Flop
|
2716 |
+
wppa_echo( '
|
2717 |
+
<input
|
2718 |
+
type="button"
|
2719 |
+
class="wppa-admin-button button"
|
2720 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
2721 |
+
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
2722 |
+
title="-flop"
|
2723 |
+
/>' );
|
2724 |
+
|
2725 |
+
// Enhance
|
2726 |
+
wppa_echo( '
|
2727 |
+
<input
|
2728 |
+
type="button"
|
2729 |
+
class="wppa-admin-button button"
|
2730 |
+
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
2731 |
+
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
2732 |
+
title="-enhance"
|
2733 |
+
/>' );
|
2734 |
+
|
2735 |
+
// Sharpen
|
2736 |
+
wppa_echo( '
|
2737 |
+
<input
|
2738 |
+
type="button"
|
2739 |
+
class="wppa-admin-button button"
|
2740 |
+
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
2741 |
+
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
2742 |
+
title="-sharpen 0x1"
|
2743 |
+
/>' );
|
2744 |
+
|
2745 |
+
// Blur
|
2746 |
+
wppa_echo( '
|
2747 |
+
<input
|
2748 |
+
type="button"
|
2749 |
+
class="wppa-admin-button button"
|
2750 |
+
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
2751 |
+
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
2752 |
+
title="-blur 0x1"
|
2753 |
+
/>' );
|
2754 |
+
|
2755 |
+
// Auto gamma
|
2756 |
+
wppa_echo( '
|
2757 |
+
<input
|
2758 |
+
type="button"
|
2759 |
+
class="wppa-admin-button button"
|
2760 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
2761 |
+
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
2762 |
+
title="-auto-gamma"
|
2763 |
+
/>' );
|
2764 |
+
|
2765 |
+
// Auto level
|
2766 |
+
wppa_echo( '
|
2767 |
+
<input
|
2768 |
+
type="button"
|
2769 |
+
class="wppa-admin-button button"
|
2770 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
2771 |
+
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
2772 |
+
title="-auto-level"
|
2773 |
+
/>' );
|
2774 |
+
|
2775 |
+
// Contrast+
|
2776 |
+
wppa_echo( '
|
2777 |
+
<input
|
2778 |
+
type="button"
|
2779 |
+
class="wppa-admin-button button"
|
2780 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
2781 |
+
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
2782 |
+
title="-brightness-contrast 0x5"
|
2783 |
+
/>' );
|
2784 |
+
|
2785 |
+
// Contrast-
|
2786 |
+
wppa_echo( '
|
2787 |
+
<input
|
2788 |
+
type="button"
|
2789 |
+
class="wppa-admin-button button"
|
2790 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
2791 |
+
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
2792 |
+
title="-brightness-contrast 0x-5"
|
2793 |
+
/>' );
|
2794 |
+
|
2795 |
+
// Brightness+
|
2796 |
+
wppa_echo( '
|
2797 |
+
<input
|
2798 |
+
type="button"
|
2799 |
+
class="wppa-admin-button button"
|
2800 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
2801 |
+
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
2802 |
+
title="-brightness-contrast 5"
|
2803 |
+
/>' );
|
2804 |
|
2805 |
+
// Brightness-
|
2806 |
+
wppa_echo( '
|
2807 |
+
<input
|
2808 |
+
type="button"
|
2809 |
+
class="wppa-admin-button button"
|
2810 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
2811 |
+
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
2812 |
+
title="-brightness-contrast -5"
|
2813 |
+
/>' );
|
2814 |
|
2815 |
+
// Despeckle
|
2816 |
+
wppa_echo( '
|
2817 |
+
<input
|
2818 |
+
type="button"
|
2819 |
+
class="wppa-admin-button button"
|
2820 |
+
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
2821 |
+
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
2822 |
+
title="-despeckle"
|
2823 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2824 |
|
2825 |
+
// Lenear gray
|
|
|
2826 |
wppa_echo( '
|
2827 |
+
<input
|
2828 |
+
type="button"
|
2829 |
+
class="wppa-admin-button button"
|
2830 |
+
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
2831 |
+
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
2832 |
+
title="-colorspace gray"
|
2833 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2834 |
|
2835 |
+
// Non-linear gray
|
2836 |
+
wppa_echo( '
|
2837 |
+
<input
|
2838 |
+
type="button"
|
2839 |
+
class="wppa-admin-button button"
|
2840 |
+
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
2841 |
+
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
2842 |
+
title="-grayscale Rec709Luma"
|
2843 |
+
/>' );
|
2844 |
|
2845 |
+
// Charcoal
|
2846 |
+
wppa_echo( '
|
2847 |
+
<input
|
2848 |
+
type="button"
|
2849 |
+
class="wppa-admin-button button"
|
2850 |
+
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
2851 |
+
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
2852 |
+
title="-charcoal"
|
2853 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2854 |
|
2855 |
+
// Paint
|
|
|
2856 |
wppa_echo( '
|
2857 |
+
<input
|
2858 |
+
type="button"
|
2859 |
+
class="wppa-admin-button button"
|
2860 |
+
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
2861 |
+
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
2862 |
+
title="-paint"
|
2863 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2864 |
|
2865 |
+
// Sepia
|
2866 |
+
wppa_echo( '
|
2867 |
+
<input
|
2868 |
+
type="button"
|
2869 |
+
class="wppa-admin-button button"
|
2870 |
+
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
2871 |
+
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
2872 |
+
title="-sepia-tone 80%"
|
2873 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
2874 |
|
2875 |
+
// Show/hide wppa-horizon
|
2876 |
+
wppa_echo( '
|
2877 |
+
<input
|
2878 |
+
type="button"
|
2879 |
+
class="wppa-admin-button button"
|
2880 |
+
onclick="wppaToggleHorizon()"
|
2881 |
+
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
2882 |
+
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
2883 |
+
/>' );
|
2884 |
|
2885 |
+
// Anticlock 0.5 deg
|
|
|
2886 |
wppa_echo( '
|
2887 |
+
<input
|
2888 |
+
type="button"
|
2889 |
+
class="wppa-admin-button button"
|
2890 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
2891 |
+
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
2892 |
+
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
2893 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2894 |
|
2895 |
+
// Clockwise 0.5 deg
|
2896 |
+
wppa_echo( '
|
2897 |
+
<input
|
2898 |
+
type="button"
|
2899 |
+
class="wppa-admin-button button"
|
2900 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
2901 |
+
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
2902 |
+
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
2903 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2904 |
|
2905 |
+
// Crop
|
2906 |
+
wppa_echo( '
|
2907 |
+
<input
|
2908 |
+
type="button"
|
2909 |
+
class="wppa-admin-button button"
|
2910 |
+
id="button-' . $id . '"
|
2911 |
+
value="Crop"
|
2912 |
+
title=""
|
2913 |
+
/>' );
|
|
|
2914 |
|
2915 |
+
// Set cropbox aspect ratio
|
2916 |
+
$ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
|
2917 |
+
$dflt = wppa_opt( 'image_magick_ratio' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2918 |
|
2919 |
+
wppa_echo( '
|
2920 |
+
<select
|
2921 |
+
onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
|
2922 |
+
title="' . __( 'Aspect ratio of cropped image', 'wp-photo-album-plus' ) . '"
|
2923 |
+
>
|
2924 |
+
<option value="NaN"' . ( $dflt == 'NaN' ? ' selected' : '' ) . '>' . __( 'free', 'wp-photo-album-plus' ) . '</option>
|
2925 |
+
<option value="' . $ratio . '"' . ( $dflt == 'ratio' ? ' selected' : '' ) . '>' . __( 'original', 'wp-photo-album-plus' ) . '</option>
|
2926 |
+
<option value="1"' . ( $dflt == '1' ? ' selected' : '' ) . '>' . __( 'square', 'wp-photo-album-plus' ) . '</option>
|
2927 |
+
<option value="1.25"' . ( $dflt == '1.25' ? ' selected' : '' ) . '>4:5 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2928 |
+
<option value="1.33333"' . ( $dflt == '1.33333' ? ' selected' : '' ) . '>3:4 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2929 |
+
<option value="1.5"' . ( $dflt == '1.5' ? ' selected' : '' ) . '>2:3 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2930 |
+
<option value="1.6"' . ( $dflt == '1.6' ? ' selected' : '' ) . '>5:8 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2931 |
+
<option value="1.77777"' . ( $dflt == '1.77777' ? ' selected' : '' ) . '>9:16 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2932 |
+
<option value="2"' . ( $dflt == '2' ? ' selected' : '' ) . '>1:2 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2933 |
+
<option value="0.8"' . ( $dflt == '0.8' ? ' selected' : '' ) . '>4:5 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2934 |
+
<option value="0.75"' . ( $dflt == '0.75' ? ' selected' : '' ) . '>3:4 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2935 |
+
<option value="0.66667"' . ( $dflt == '0.66667' ? ' selected' : '' ) . '>2:3 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2936 |
+
<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2937 |
+
<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2938 |
+
<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2939 |
+
</select>' . $br );
|
2940 |
+
|
2941 |
+
if ( $dflt == 'ratio' ) {
|
2942 |
+
$value = $ratio;
|
2943 |
+
}
|
2944 |
+
elseif ( $dflt == 'free' ) {
|
2945 |
+
$value = '';
|
2946 |
}
|
2947 |
else {
|
2948 |
+
$value = $dflt;
|
2949 |
}
|
2950 |
+
|
2951 |
+
// $the_js = 'jQuery(document).ready(function(){wppaCropper[' . $id . '].setAspectRatio(' . $value . ');});';
|
2952 |
+
// wppa_add_inline_script( 'wppa-admin', $the_js );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2953 |
}
|
|
|
2954 |
|
2955 |
+
// End flex div
|
2956 |
+
wppa_echo( '</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2957 |
|
2958 |
+
// Command stack
|
2959 |
+
wppa_echo( '
|
2960 |
+
<h2 class="description" style="margin:1em">' .
|
2961 |
+
__( '<b>ImageMagick</b> command stack', 'wp-photo-album-plus' ) . ':
|
2962 |
+
<span
|
2963 |
+
id="magickstack-' . strval( intval( $id ) ). '"
|
2964 |
+
style="color:blue"
|
2965 |
+
>' .
|
2966 |
+
sanitize_text_field( $magickstack ) . '
|
2967 |
+
</span>
|
2968 |
+
<input
|
2969 |
+
type="button"
|
2970 |
+
class="wppa-admin-button button"
|
2971 |
+
id="imstackbutton-' . strval( intval( $id ) ) . '"
|
2972 |
+
onclick="wppaTryMagick( ' . strval( intval( $id ) ) . ', \'magickundo\' )"
|
2973 |
+
value="' . esc_attr( __( 'Undo', 'wp-photo-album-plus' ) ) . '"
|
2974 |
+
title="' . esc_attr( __( 'Undo last Magick command', 'wp-photo-album-plus' ) ) . '"
|
2975 |
+
style="margin-left:4px;' . ( $magickstack ? 'display:inline;' : 'display:none;' ) . '"
|
2976 |
+
/>
|
2977 |
+
</h2>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2978 |
|
2979 |
+
// Cropper container
|
2980 |
+
// Fake 'for social media' to use the local file here, not cloudinary. Files from cloudinary do not reload, even with ?ver=...
|
2981 |
+
wppa( 'for_sm', true );
|
2982 |
+
wppa_echo( '
|
2983 |
+
<div
|
2984 |
+
class="wppa-cropper-container-wrapper">
|
2985 |
+
<img
|
2986 |
+
id="fs-img-' . $id . '"
|
2987 |
+
src="' . esc_url( wppa_get_photo_url( $id ) ) . '"
|
2988 |
+
style="float:left;max-width:100%"
|
2989 |
+
/>
|
2990 |
+
</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2991 |
|
2992 |
+
// Reset switch
|
2993 |
+
wppa( 'for_sm', false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2994 |
}
|
2995 |
|
2996 |
+
// End Tab 3
|
2997 |
+
wppa_echo( '</div>' );
|
2998 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2999 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3000 |
|
3001 |
+
// Tab 5 Photo IPTC
|
3002 |
+
if ( ! $quick && ! empty( $iptcs ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3004 |
wppa_echo( '
|
3005 |
+
<div
|
3006 |
+
id="photoiptc-' . $id . '"
|
3007 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
3008 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
3009 |
+
>' );
|
3010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3011 |
wppa_echo( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3012 |
<table
|
3013 |
id="wppa-iptc-' . $id . '"
|
3014 |
class="wppa-table wppa-photo-table"
|
3015 |
+
style="clear:both;width:99%;"
|
3016 |
>
|
3017 |
<thead>
|
3018 |
<tr style="font-weight:bold">
|
3023 |
</thead>
|
3024 |
<tbody>' );
|
3025 |
|
3026 |
+
foreach ( $iptcs as $iptc ) {
|
3027 |
+
wppa_echo( '
|
3028 |
+
<tr id="iptc-tr-' . $iptc['id'] . '">
|
3029 |
+
<td style="padding:0 4px">' . $iptc['tag'] . '</td>
|
3030 |
+
<td style="padding:0 4px">' . esc_html( wppa_iptc_tagname( $iptc['tag'] ) ) . ':</td>
|
3031 |
+
<td style="padding:0 4px">
|
3032 |
+
<input
|
3033 |
+
type="text"
|
3034 |
+
style="width:500px"
|
3035 |
+
value="' . esc_attr( $iptc['description'] ) . '"
|
3036 |
+
onchange="wppaAjaxUpdateIptc(\'' . $id . '\', \'' . $iptc['id'] . '\', this.value, \'' . $iptc['tag'] . '\')"
|
3037 |
+
/>
|
3038 |
+
</td>
|
3039 |
+
</tr>' );
|
3040 |
+
}
|
|
|
3041 |
|
3042 |
wppa_echo( '
|
3043 |
</tbody>
|
3044 |
</table>' );
|
3045 |
+
wppa_echo( '</div>' ); // End tab 5 IPTC
|
3046 |
}
|
3047 |
|
3048 |
+
// Tab 4 Photo EXIF
|
3049 |
+
if ( ! $quick && ! empty( $exifs ) ) {
|
3050 |
+
|
3051 |
+
wppa_echo( '
|
3052 |
+
<div
|
3053 |
+
id="photoexif-' . $id . '"
|
3054 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
3055 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
3056 |
+
>' );
|
3057 |
+
|
3058 |
$brand = wppa_get_camera_brand( $id );
|
3059 |
wppa_echo( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3060 |
<table
|
3061 |
id="wppa-exif-' . $id . '"
|
3062 |
class="wppa-table wppa-photo-table"
|
3063 |
+
style="clear:both;width:99%;"
|
3064 |
>
|
3065 |
<thead>
|
3066 |
<tr style="font-weight:bold">
|
3073 |
</thead>
|
3074 |
<tbody>' );
|
3075 |
|
3076 |
+
foreach ( $exifs as $exif ) {
|
3077 |
+
$desc = $exif['description'];
|
3078 |
+
if ( is_serialized( $desc ) ) {
|
3079 |
+
$desc = 'Array(' . count( wppa_unserialize( $desc ) ) . ')';
|
3080 |
+
}
|
3081 |
+
wppa_echo( '
|
3082 |
+
<tr id="exif-tr-' . $exif['id'] . '">
|
3083 |
+
<td style="padding:0 4px">'.$exif['tag'].'</td>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3084 |
|
3085 |
+
if ( $brand && $exif['brand'] ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3086 |
wppa_echo( '
|
3087 |
+
<td style="padding:0 4px">' . $brand . '</td>
|
3088 |
+
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'], $brand, 'brandonly' ) . ':</td>' );
|
3089 |
+
}
|
3090 |
+
else {
|
3091 |
+
wppa_echo( '
|
3092 |
+
<td style="padding:0 4px"></td>
|
3093 |
+
<td style="padding:0 4px">' . wppa_exif_tagname( $exif['tag'] ) . ':</td>' );
|
3094 |
+
}
|
3095 |
|
3096 |
+
$raw_value = wp_kses( $desc, 'post' );
|
3097 |
+
if ( strlen( $raw_value ) > 50 ) {
|
3098 |
+
$raw_value = substr( $raw_value, 0, 47 ) . '...';
|
3099 |
+
}
|
3100 |
+
$formatted_value = wp_kses( wppa_format_exif( $exif['tag'], $exif['description'], $brand ), 'post' );
|
3101 |
+
if ( strlen( $formatted_value ) > 50 ) {
|
3102 |
+
$formatted_value = substr( $formatted_value, 0, 47 ) . '...';
|
3103 |
+
}
|
3104 |
+
wppa_echo( '
|
3105 |
+
<td style="padding:0 4px">' . $raw_value . '</td>
|
3106 |
+
<td style="padding:0 4px">' . $formatted_value . '</td>
|
3107 |
+
</tr>' );
|
3108 |
+
}
|
3109 |
|
3110 |
wppa_echo( '
|
3111 |
</tbody>
|
3112 |
+
</table><div style="clear:both"></div>' );
|
3113 |
+
wppa_echo( '</div>' );
|
3114 |
}
|
3115 |
|
|
|
3116 |
|
3117 |
// Comments
|
3118 |
+
if ( ! $quick && ! empty( $comments ) ) {
|
3119 |
+
|
3120 |
+
wppa_echo( '
|
3121 |
+
<div
|
3122 |
+
id="photocomment-' . $id . '"
|
3123 |
+
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
3124 |
+
style="position:relative;padding-bottom:12px;padding-left:12px;display:none"
|
3125 |
+
>' );
|
3126 |
+
|
3127 |
wppa_echo( '
|
3128 |
<table
|
3129 |
class="wppa-table wppa-photo-table"
|
3179 |
|
3180 |
wppa_echo( '
|
3181 |
</tbody>
|
3182 |
+
</table>
|
3183 |
+
<div class="clear"></div>
|
3184 |
+
</div>' );
|
3185 |
}
|
3186 |
|
3187 |
wppa_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$id.');' );
|
3188 |
|
3189 |
wppa_echo( '
|
3190 |
+
<div class="clear"></div>
|
3191 |
</div>
|
3192 |
+
<div class="clear" style="margin-top:7px"></div>' );
|
3193 |
}
|
3194 |
+
|
3195 |
/* End the actual display area for the photo settings */
|
3196 |
+
wppa_echo( '</details>');
|
3197 |
|
3198 |
} /* foreach photo */
|
3199 |
|
3448 |
<form action="' . $link . '&wppa-page=' . $page . '#manage-photos" method="post">' .
|
3449 |
wp_nonce_field( 'wppa-bulk', 'wppa-bulk' ) . '
|
3450 |
<h1>
|
3451 |
+
<span style="font-weight:bold">' . __( 'Bulk action', 'wp-photo-album-plus' ) . '</span>
|
3452 |
<select id="wppa-bulk-action" name="wppa-bulk-action" onchange="wppaBulkActionChange( this, \'bulk-album\' )">
|
3453 |
<option value=""></option>';
|
3454 |
if ( $album == 'trash' ) {
|
3703 |
}
|
3704 |
|
3705 |
wppa_echo(
|
3706 |
+
'<br>' . __( 'Target album for move to', 'wp-photo-album-plus' ) . '<br>' .
|
3707 |
'<select' .
|
3708 |
' id="target-' . $id . '"' .
|
3709 |
' onchange="wppaTryMove(' . $id . ', ' . ( wppa_is_video( $id ) ? 'true' : 'false' ) . ')"' .
|
3885 |
}';
|
3886 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
3887 |
|
3888 |
+
if ( ! $is_p_order ) wppa_warning_message( __( 'Setting photo sequence has only effect if the photo sequence method is set to <b>Sequence #</b>' , 'wp-photo-album-plus' ) ) ?>
|
3889 |
<div class="widefat wppa-photo-admin-sortable" style="border-color:#cccccc">
|
3890 |
<ul id="sortable">
|
3891 |
<?php foreach ( $photos as $photo ) {
|
3947 |
<span style="margin-left:15px;float:left"><?php wppa_echo( __( 'Id: ' , 'wp-photo-album-plus' ).$photo['id'] )?></span>
|
3948 |
<?php if ( wppa_is_video( $photo['id'] ) )_e('Video', 'wp-photo-album-plus' ); ?>
|
3949 |
<?php if ( wppa_has_audio( $photo['id'] ) ) _e('Audio', 'wp-photo-album-plus' ); ?>
|
3950 |
+
<span style="float:right; margin-right:15px"><?php wppa_echo( __( 'Seq: ' , 'wp-photo-album-plus' ).'<span id="wppa-seqno-'.$photo['id'].'">'.$photo['p_order'] ) ?></span>
|
3951 |
</div>
|
3952 |
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id'] ) ?>" value="<?php wppa_echo( wp_create_nonce( 'wppa-nonce_'.$photo['id'] ) ); ?>" />
|
3953 |
<input type="hidden" class="wppa-sort-item" value="<?php wppa_echo( $photo['id'] ) ?>" />
|
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
|
@@ -510,7 +510,7 @@ global $wpdb;
|
|
510 |
// }
|
511 |
|
512 |
// if ( wp_add_inline_script( 'jquery-core', $result ) ) return;
|
513 |
-
|
514 |
echo( '<script>' . $result . '</script>' );
|
515 |
|
516 |
}
|
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
|
510 |
// }
|
511 |
|
512 |
// if ( wp_add_inline_script( 'jquery-core', $result ) ) return;
|
513 |
+
|
514 |
echo( '<script>' . $result . '</script>' );
|
515 |
|
516 |
}
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2166,10 +2166,10 @@ global $wppa_subtab_names;
|
|
2166 |
__( 'day.', 'wp-photo-album-plus' ),
|
2167 |
__( 'week.', 'wp-photo-album-plus' ),
|
2168 |
__( 'month.', 'wp-photo-album-plus' ),
|
2169 |
-
__( 'day of week is
|
2170 |
-
__( 'day of month is
|
2171 |
-
__( 'day of year is
|
2172 |
-
__( 'week number is
|
2173 |
);
|
2174 |
$vals = array( '0',
|
2175 |
'1',
|
@@ -2212,7 +2212,7 @@ global $wppa_subtab_names;
|
|
2212 |
}
|
2213 |
|
2214 |
$name = __( 'Day offset:', 'wp-photo-album-plus' );
|
2215 |
-
$desc = __( 'The difference between daynumber and photo
|
2216 |
$slug = 'wppa_potd_offset';
|
2217 |
$opts = array();
|
2218 |
$day = '0';
|
@@ -2231,7 +2231,7 @@ global $wppa_subtab_names;
|
|
2231 |
$photo_order += $n_days;
|
2232 |
}
|
2233 |
|
2234 |
-
$html .= sprintf( __( 'Todays photo
|
2235 |
wppa_setting_new( $slug, '14', $name, $desc, $html );
|
2236 |
|
2237 |
}
|
@@ -3184,7 +3184,7 @@ global $wppa_subtab_names;
|
|
3184 |
__('StartStop', 'wp-photo-album-plus' ),
|
3185 |
__('SlideFrame', 'wp-photo-album-plus' ),
|
3186 |
__('Name', 'wp-photo-album-plus' ),
|
3187 |
-
__('
|
3188 |
__('Custom', 'wp-photo-album-plus' ),
|
3189 |
__('Rating', 'wp-photo-album-plus' ),
|
3190 |
__('FilmStrip', 'wp-photo-album-plus' ),
|
@@ -3265,7 +3265,7 @@ global $wppa_subtab_names;
|
|
3265 |
}
|
3266 |
|
3267 |
$name = __('Swap Namedesc', 'wp-photo-album-plus' );
|
3268 |
-
$desc = __('Swap the
|
3269 |
$help = '';
|
3270 |
$slug = 'wppa_swap_namedesc';
|
3271 |
$html = wppa_checkbox($slug,'wppaRefreshAfter()');
|
@@ -3798,7 +3798,7 @@ global $wppa_subtab_names;
|
|
3798 |
$name = __('Last comment first', 'wp-photo-album-plus' );
|
3799 |
$desc = __('Display the newest comment on top.', 'wp-photo-album-plus' );
|
3800 |
$help = __('If checked: Display the newest comment on top.', 'wp-photo-album-plus' );
|
3801 |
-
$help .= '<br>'.(__('If unchecked, the comments are listed in the
|
3802 |
$slug = 'wppa_comments_desc';
|
3803 |
$html = wppa_checkbox($slug);
|
3804 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
@@ -3922,7 +3922,7 @@ global $wppa_subtab_names;
|
|
3922 |
$slug2 = 'wppa_list_comments';
|
3923 |
$opts = array( 'Email', 'Name', 'Timestamp' );
|
3924 |
$vals = array( 'email', 'name', 'timestamp' );
|
3925 |
-
$html1 = '<small style="float:left">'.__('
|
3926 |
$html2 = wppa_popup_button( $slug2, '30' );
|
3927 |
$html = $html1 . '<span style="float:left"> </span>' .$html2;
|
3928 |
wppa_setting_new($slug1, '16', $name, $desc, $html, $help);
|
@@ -7336,7 +7336,7 @@ global $wppa_subtab_names;
|
|
7336 |
$help = __('The maximum number of albums a user can create when he is not admin', 'wp-photo-album-plus' );
|
7337 |
$help .= '<br>'.__('A number of 0 means No limit', 'wp-photo-album-plus' );
|
7338 |
$slug = 'wppa_max_albums';
|
7339 |
-
$html1 = wppa_input($slug, '50px', '', 'albums');
|
7340 |
$html2 = '';
|
7341 |
$html = array( $html1, $html2 );
|
7342 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_switch( 'user_create_on' ));
|
@@ -7635,9 +7635,9 @@ global $wppa_subtab_names;
|
|
7635 |
$html = wppa_checkbox($slug);
|
7636 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
7637 |
|
7638 |
-
$name = __('Photo
|
7639 |
-
$desc = __('Changing <b>Photo
|
7640 |
-
$help = __('If checked: Photo
|
7641 |
$slug = 'wppa_porder_restricted';
|
7642 |
$html = wppa_checkbox($slug);
|
7643 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
@@ -8616,7 +8616,7 @@ global $wppa_subtab_names;
|
|
8616 |
|
8617 |
$name = __('Leading zeroes', 'wp-photo-album-plus' );
|
8618 |
$desc = __('If photoname numeric, add leading zeros', 'wp-photo-album-plus' );
|
8619 |
-
$help = __('You can extend the name with leading zeros, so alphabetic sort becomes equal to numeric sort
|
8620 |
$slug1 = 'wppa_zero_numbers';
|
8621 |
$slug2 = 'wppa_leading_zeros';
|
8622 |
$html1 = wppa_input( $slug1, '50px' ).__('Total chars', 'wp-photo-album-plus' );
|
@@ -9661,17 +9661,17 @@ global $wppa_subtab_names;
|
|
9661 |
wppa_setting_box_header_new($tab);
|
9662 |
|
9663 |
$name = __('Album sequence default', 'wp-photo-album-plus' );
|
9664 |
-
$desc = __('Album
|
9665 |
-
$help = __('Specify the way the albums should be
|
9666 |
$slug = 'wppa_list_albums_by';
|
9667 |
$opts = array( __('--- none ---', 'wp-photo-album-plus' ),
|
9668 |
-
__('
|
9669 |
__('Name', 'wp-photo-album-plus' ),
|
9670 |
__('Random', 'wp-photo-album-plus' ),
|
9671 |
__('Timestamp', 'wp-photo-album-plus' ),
|
9672 |
-
__('
|
9673 |
-
__('Name
|
9674 |
-
__('Timestamp
|
9675 |
);
|
9676 |
$vals = array( '0',
|
9677 |
'1',
|
@@ -9686,23 +9686,23 @@ global $wppa_subtab_names;
|
|
9686 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
9687 |
|
9688 |
$name = __('Photo sequence default', 'wp-photo-album-plus' );
|
9689 |
-
$desc = __('Photo
|
9690 |
$help = __('Specify the way the photos should be ordered. This is the default setting. You can overrule the default sorting order on a per album basis.', 'wp-photo-album-plus' );
|
9691 |
$slug = 'wppa_list_photos_by';
|
9692 |
$opts = array( __('--- none ---', 'wp-photo-album-plus' ),
|
9693 |
-
__('
|
9694 |
__('Name', 'wp-photo-album-plus' ),
|
9695 |
__('Random', 'wp-photo-album-plus' ),
|
9696 |
__('Rating mean value', 'wp-photo-album-plus' ),
|
9697 |
__('Number of votes', 'wp-photo-album-plus' ),
|
9698 |
__('Timestamp', 'wp-photo-album-plus' ),
|
9699 |
__('EXIF Date', 'wp-photo-album-plus' ),
|
9700 |
-
__('
|
9701 |
-
__('Name
|
9702 |
-
__('Rating mean value
|
9703 |
-
__('Number of votes
|
9704 |
-
__('Timestamp
|
9705 |
-
__('EXIF Date
|
9706 |
);
|
9707 |
$vals = array( '0',
|
9708 |
'1',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.2.03.004
|
7 |
*
|
8 |
*/
|
9 |
|
2166 |
__( 'day.', 'wp-photo-album-plus' ),
|
2167 |
__( 'week.', 'wp-photo-album-plus' ),
|
2168 |
__( 'month.', 'wp-photo-album-plus' ),
|
2169 |
+
__( 'day of week is sequence #', 'wp-photo-album-plus' ),
|
2170 |
+
__( 'day of month is sequence #', 'wp-photo-album-plus' ),
|
2171 |
+
__( 'day of year is sequence #', 'wp-photo-album-plus' ),
|
2172 |
+
__( 'week number is sequence #', 'wp-photo-album-plus' ),
|
2173 |
);
|
2174 |
$vals = array( '0',
|
2175 |
'1',
|
2212 |
}
|
2213 |
|
2214 |
$name = __( 'Day offset:', 'wp-photo-album-plus' );
|
2215 |
+
$desc = __( 'The difference between daynumber and photo sequence number.', 'wp-photo-album-plus' );
|
2216 |
$slug = 'wppa_potd_offset';
|
2217 |
$opts = array();
|
2218 |
$day = '0';
|
2231 |
$photo_order += $n_days;
|
2232 |
}
|
2233 |
|
2234 |
+
$html .= sprintf( __( 'Todays photo sequence # = %s.', 'wp-photo-album-plus' ), $photo_order );
|
2235 |
wppa_setting_new( $slug, '14', $name, $desc, $html );
|
2236 |
|
2237 |
}
|
3184 |
__('StartStop', 'wp-photo-album-plus' ),
|
3185 |
__('SlideFrame', 'wp-photo-album-plus' ),
|
3186 |
__('Name', 'wp-photo-album-plus' ),
|
3187 |
+
__('Description', 'wp-photo-album-plus' ),
|
3188 |
__('Custom', 'wp-photo-album-plus' ),
|
3189 |
__('Rating', 'wp-photo-album-plus' ),
|
3190 |
__('FilmStrip', 'wp-photo-album-plus' ),
|
3265 |
}
|
3266 |
|
3267 |
$name = __('Swap Namedesc', 'wp-photo-album-plus' );
|
3268 |
+
$desc = __('Swap the sequence of name and description', 'wp-photo-album-plus' );
|
3269 |
$help = '';
|
3270 |
$slug = 'wppa_swap_namedesc';
|
3271 |
$html = wppa_checkbox($slug,'wppaRefreshAfter()');
|
3798 |
$name = __('Last comment first', 'wp-photo-album-plus' );
|
3799 |
$desc = __('Display the newest comment on top.', 'wp-photo-album-plus' );
|
3800 |
$help = __('If checked: Display the newest comment on top.', 'wp-photo-album-plus' );
|
3801 |
+
$help .= '<br>'.(__('If unchecked, the comments are listed in the sequence they were entered.', 'wp-photo-album-plus' ));
|
3802 |
$slug = 'wppa_comments_desc';
|
3803 |
$html = wppa_checkbox($slug);
|
3804 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
3922 |
$slug2 = 'wppa_list_comments';
|
3923 |
$opts = array( 'Email', 'Name', 'Timestamp' );
|
3924 |
$vals = array( 'email', 'name', 'timestamp' );
|
3925 |
+
$html1 = '<small style="float:left">'.__('Sequence method:', 'wp-photo-album-plus' ).'</small>'.wppa_select($slug1, $opts, $vals);
|
3926 |
$html2 = wppa_popup_button( $slug2, '30' );
|
3927 |
$html = $html1 . '<span style="float:left"> </span>' .$html2;
|
3928 |
wppa_setting_new($slug1, '16', $name, $desc, $html, $help);
|
7336 |
$help = __('The maximum number of albums a user can create when he is not admin', 'wp-photo-album-plus' );
|
7337 |
$help .= '<br>'.__('A number of 0 means No limit', 'wp-photo-album-plus' );
|
7338 |
$slug = 'wppa_max_albums';
|
7339 |
+
$html1 = wppa_input( $slug, '50px', '', __( 'albums', 'wp-photo-album-plus' ) );
|
7340 |
$html2 = '';
|
7341 |
$html = array( $html1, $html2 );
|
7342 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_switch( 'user_create_on' ));
|
7635 |
$html = wppa_checkbox($slug);
|
7636 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
7637 |
|
7638 |
+
$name = __('Photo sequence is restricted', 'wp-photo-album-plus' );
|
7639 |
+
$desc = __('Changing <b>Photo sequence</b> is a restricted action.', 'wp-photo-album-plus' );
|
7640 |
+
$help = __('If checked: Photo sequence method and sequence # can not be set in album and photo admin by users not having admin rights.', 'wp-photo-album-plus' );
|
7641 |
$slug = 'wppa_porder_restricted';
|
7642 |
$html = wppa_checkbox($slug);
|
7643 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
8616 |
|
8617 |
$name = __('Leading zeroes', 'wp-photo-album-plus' );
|
8618 |
$desc = __('If photoname numeric, add leading zeros', 'wp-photo-album-plus' );
|
8619 |
+
$help = __('You can extend the name with leading zeros, so alphabetic sort becomes equal to numeric sort sequence.', 'wp-photo-album-plus' );
|
8620 |
$slug1 = 'wppa_zero_numbers';
|
8621 |
$slug2 = 'wppa_leading_zeros';
|
8622 |
$html1 = wppa_input( $slug1, '50px' ).__('Total chars', 'wp-photo-album-plus' );
|
9661 |
wppa_setting_box_header_new($tab);
|
9662 |
|
9663 |
$name = __('Album sequence default', 'wp-photo-album-plus' );
|
9664 |
+
$desc = __('Album sequence method.', 'wp-photo-album-plus' );
|
9665 |
+
$help = __('Specify the way the albums should be sequenced.', 'wp-photo-album-plus' );
|
9666 |
$slug = 'wppa_list_albums_by';
|
9667 |
$opts = array( __('--- none ---', 'wp-photo-album-plus' ),
|
9668 |
+
__('Sequence #', 'wp-photo-album-plus' ),
|
9669 |
__('Name', 'wp-photo-album-plus' ),
|
9670 |
__('Random', 'wp-photo-album-plus' ),
|
9671 |
__('Timestamp', 'wp-photo-album-plus' ),
|
9672 |
+
__('Sequence # descending', 'wp-photo-album-plus' ),
|
9673 |
+
__('Name descending', 'wp-photo-album-plus' ),
|
9674 |
+
__('Timestamp descending', 'wp-photo-album-plus' ),
|
9675 |
);
|
9676 |
$vals = array( '0',
|
9677 |
'1',
|
9686 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
9687 |
|
9688 |
$name = __('Photo sequence default', 'wp-photo-album-plus' );
|
9689 |
+
$desc = __('Photo sequence method.', 'wp-photo-album-plus' );
|
9690 |
$help = __('Specify the way the photos should be ordered. This is the default setting. You can overrule the default sorting order on a per album basis.', 'wp-photo-album-plus' );
|
9691 |
$slug = 'wppa_list_photos_by';
|
9692 |
$opts = array( __('--- none ---', 'wp-photo-album-plus' ),
|
9693 |
+
__('Sequence #', 'wp-photo-album-plus' ),
|
9694 |
__('Name', 'wp-photo-album-plus' ),
|
9695 |
__('Random', 'wp-photo-album-plus' ),
|
9696 |
__('Rating mean value', 'wp-photo-album-plus' ),
|
9697 |
__('Number of votes', 'wp-photo-album-plus' ),
|
9698 |
__('Timestamp', 'wp-photo-album-plus' ),
|
9699 |
__('EXIF Date', 'wp-photo-album-plus' ),
|
9700 |
+
__('Sequence # descending', 'wp-photo-album-plus' ),
|
9701 |
+
__('Name descending', 'wp-photo-album-plus' ),
|
9702 |
+
__('Rating mean value descending', 'wp-photo-album-plus' ),
|
9703 |
+
__('Number of votes descending', 'wp-photo-album-plus' ),
|
9704 |
+
__('Timestamp descending', 'wp-photo-album-plus' ),
|
9705 |
+
__('EXIF Date descending', 'wp-photo-album-plus' )
|
9706 |
);
|
9707 |
$vals = array( '0',
|
9708 |
'1',
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5036,8 +5036,8 @@ function wppa_compress_html( $txt, $keeplinebreaks = false ) {
|
|
5036 |
}
|
5037 |
|
5038 |
// Now do the other comprssions
|
5039 |
-
$from = array( "> <", "<ul></ul>", "<!--", '" >', '
|
5040 |
-
$to = array( "><", "", "\n<!--", '">', '
|
5041 |
|
5042 |
$result = str_replace( $from, $to, $result );
|
5043 |
return $result;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 8.2.03.004
|
7 |
*
|
8 |
*/
|
9 |
|
5036 |
}
|
5037 |
|
5038 |
// Now do the other comprssions
|
5039 |
+
$from = array( "> <", "<ul></ul>", "<!--", '" >', '&', 'style=" ', '"/>', ' style=""', 'px;;' );
|
5040 |
+
$to = array( "><", "", "\n<!--", '">', '&', 'style="', '" />', ' ', 'px;' );
|
5041 |
|
5042 |
$result = str_replace( $from, $to, $result );
|
5043 |
return $result;
|
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.
|
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.
|
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.004
|
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.004'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|