Version Description
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 6.4.11 |
Comparing to | |
See all releases |
Code changes from version 6.4.10 to 6.4.11
- js/wppa-admin-scripts.js +56 -0
- js/wppa-ajax-front.js +12 -7
- js/wppa-ajax-front.min.js +3 -3
- js/wppa.js +25 -8
- js/wppa.min.js +6 -3
- readme.txt +22 -4
- theme/wppa-style.css +4 -3
- wppa-admin.php +2 -2
- wppa-ajax.php +94 -18
- wppa-album-admin-autosave.php +4 -4
- wppa-boxes-html.php +120 -120
- wppa-functions.php +59 -74
- wppa-non-admin.php +3 -1
- wppa-photo-admin-autosave.php +164 -2
- wppa-photo-files.php +4 -4
- wppa-settings-autosave.php +78 -10
- wppa-setup.php +33 -6
- wppa-thumbnails.php +62 -50
- wppa-upload-widget.php +10 -2
- wppa-upload.php +8 -1
- wppa-users.php +53 -1
- wppa-utils.php +3 -1
- wppa.php +3 -3
js/wppa-admin-scripts.js
CHANGED
@@ -1139,6 +1139,60 @@ function wppaAjaxUpdatePhotoMonitor() {
|
|
1139 |
}
|
1140 |
}
|
1141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1142 |
function _wppaAjaxUpdatePhoto(photo, actionslug, value, refresh) {
|
1143 |
|
1144 |
wppaFeAjaxLog('in');
|
@@ -1786,6 +1840,8 @@ function wppaGetXmlHttp() {
|
|
1786 |
function wppaPhotoStatusChange(id) {
|
1787 |
// Init
|
1788 |
jQuery('#psdesc-'+id).css({display: 'none'});
|
|
|
|
|
1789 |
elm = document.getElementById('status-'+id);
|
1790 |
|
1791 |
if ( elm.value == 'pending' || elm.value == 'scheduled' ) {
|
1139 |
}
|
1140 |
}
|
1141 |
|
1142 |
+
// New style front-end edit photo
|
1143 |
+
function wppaUpdatePhotoNew(id) {
|
1144 |
+
|
1145 |
+
var myItems = [ 'name',
|
1146 |
+
'description',
|
1147 |
+
'tags',
|
1148 |
+
'custom_0',
|
1149 |
+
'custom_1',
|
1150 |
+
'custom_2',
|
1151 |
+
'custom_3',
|
1152 |
+
'custom_4',
|
1153 |
+
'custom_5',
|
1154 |
+
'custom_6',
|
1155 |
+
'custom_7',
|
1156 |
+
'custom_8',
|
1157 |
+
'custom_9'
|
1158 |
+
];
|
1159 |
+
|
1160 |
+
var myData = 'action=wppa' +
|
1161 |
+
'&wppa-action=update-photo-new' +
|
1162 |
+
'&photo-id=' + id +
|
1163 |
+
'&wppa-nonce=' + jQuery('#wppa-nonce').val();
|
1164 |
+
|
1165 |
+
var i = 0;
|
1166 |
+
while ( i < myItems.length ) {
|
1167 |
+
if ( typeof(jQuery('#'+myItems[i] ).val() ) != 'undefined' ) {
|
1168 |
+
myData += '&' + myItems[i] + '=' + jQuery('#'+myItems[i]).val();
|
1169 |
+
}
|
1170 |
+
i++;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
jQuery.ajax( { url: wppaAjaxUrl,
|
1174 |
+
data: myData,
|
1175 |
+
async: false,
|
1176 |
+
type: 'POST',
|
1177 |
+
timeout: 10000,
|
1178 |
+
beforeSend: function( xhr ) {
|
1179 |
+
|
1180 |
+
},
|
1181 |
+
success: function( result, status, xhr ) {
|
1182 |
+
if ( result.length > 0 ) { alert(result); }
|
1183 |
+
},
|
1184 |
+
error: function( xhr, status, error ) {
|
1185 |
+
alert(result);
|
1186 |
+
|
1187 |
+
wppaConsoleLog( 'wppaUpdatePhotoNew failed. Error = ' + error + ', status = ' + status, 'force' );
|
1188 |
+
},
|
1189 |
+
complete: function( xhr, status, newurl ) {
|
1190 |
+
|
1191 |
+
}
|
1192 |
+
} );
|
1193 |
+
|
1194 |
+
}
|
1195 |
+
|
1196 |
function _wppaAjaxUpdatePhoto(photo, actionslug, value, refresh) {
|
1197 |
|
1198 |
wppaFeAjaxLog('in');
|
1840 |
function wppaPhotoStatusChange(id) {
|
1841 |
// Init
|
1842 |
jQuery('#psdesc-'+id).css({display: 'none'});
|
1843 |
+
if ( ! jQuery('#status-'+id) ) return;
|
1844 |
+
|
1845 |
elm = document.getElementById('status-'+id);
|
1846 |
|
1847 |
if ( elm.value == 'pending' || elm.value == 'scheduled' ) {
|
js/wppa-ajax-front.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
-
var wppaJsAjaxVersion = '6.4.
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
@@ -301,16 +301,17 @@ function wppaAjaxDeleteMyZip() {
|
|
301 |
}
|
302 |
|
303 |
// Frontend Edit Photo
|
304 |
-
function wppaEditPhoto( mocc,
|
305 |
|
|
|
306 |
var name = 'Edit Photo '+id;
|
307 |
var desc = '';
|
308 |
-
var width = 960;
|
309 |
var height = 512;
|
310 |
|
311 |
if ( screen.availWidth < width ) width = screen.availWidth;
|
312 |
|
313 |
-
var wnd = window.open( "", "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=
|
314 |
|
315 |
jQuery.ajax( { url: wppaAjaxUrl,
|
316 |
data: 'action=wppa' +
|
@@ -325,13 +326,17 @@ function wppaEditPhoto( mocc, id ) {
|
|
325 |
wnd.document.write( '<html>' );
|
326 |
wnd.document.write( '<head>' );
|
327 |
// The following is one statement that fixes a bug in opera
|
328 |
-
|
|
|
|
|
329 |
'<style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style>'+
|
330 |
'<script type="text/javascript" src="'+wppaIncludeUrl+'/js/jquery/jquery.js?ver='+wppaVersion+'"></script>'+
|
331 |
'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-utils.js?ver='+wppaVersion+'"></script>'+
|
332 |
'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-admin-scripts.js?ver='+wppaVersion+'"></script>'+
|
333 |
'<title>'+name+'</title>'+
|
334 |
-
'<script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";</script>'
|
|
|
|
|
335 |
wnd.document.write( '</head>' );
|
336 |
wnd.document.write( '<body>' ); // onunload="window.opener.location.reload()">' ); // This does not work in Opera
|
337 |
|
@@ -344,7 +349,7 @@ function wppaEditPhoto( mocc, id ) {
|
|
344 |
wppaConsoleLog( 'wppaEditPhoto failed. Error = ' + error + ', status = ' + status, 'force' );
|
345 |
},
|
346 |
complete: function( xhr, status, newurl ) {
|
347 |
-
|
348 |
wnd.document.write( '</body>' );
|
349 |
wnd.document.write( '</html>' );
|
350 |
}
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaJsAjaxVersion = '6.4.11';
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
301 |
}
|
302 |
|
303 |
// Frontend Edit Photo
|
304 |
+
function wppaEditPhoto( mocc, xid ) {
|
305 |
|
306 |
+
var id = String(xid);
|
307 |
var name = 'Edit Photo '+id;
|
308 |
var desc = '';
|
309 |
+
var width = wppaEditPhotoWidth; //960;
|
310 |
var height = 512;
|
311 |
|
312 |
if ( screen.availWidth < width ) width = screen.availWidth;
|
313 |
|
314 |
+
var wnd = window.open( "", "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width="+width+", height="+height, true );
|
315 |
|
316 |
jQuery.ajax( { url: wppaAjaxUrl,
|
317 |
data: 'action=wppa' +
|
326 |
wnd.document.write( '<html>' );
|
327 |
wnd.document.write( '<head>' );
|
328 |
// The following is one statement that fixes a bug in opera
|
329 |
+
var myHead = '<meta name="viewport" content="width=320" >' +
|
330 |
+
'<link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+'/wppa-admin-styles.css?ver='+wppaVersion+'" type="text/css" media="all" />'+
|
331 |
+
'<link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" />'+
|
332 |
'<style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style>'+
|
333 |
'<script type="text/javascript" src="'+wppaIncludeUrl+'/js/jquery/jquery.js?ver='+wppaVersion+'"></script>'+
|
334 |
'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-utils.js?ver='+wppaVersion+'"></script>'+
|
335 |
'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-admin-scripts.js?ver='+wppaVersion+'"></script>'+
|
336 |
'<title>'+name+'</title>'+
|
337 |
+
'<script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";</script>';
|
338 |
+
// alert(myHead);
|
339 |
+
wnd.document.write( myHead );
|
340 |
wnd.document.write( '</head>' );
|
341 |
wnd.document.write( '<body>' ); // onunload="window.opener.location.reload()">' ); // This does not work in Opera
|
342 |
|
349 |
wppaConsoleLog( 'wppaEditPhoto failed. Error = ' + error + ', status = ' + status, 'force' );
|
350 |
},
|
351 |
complete: function( xhr, status, newurl ) {
|
352 |
+
// wnd.document.write( '<script>wppaPhotoStatusChange( "'+id+'" )</script>' );
|
353 |
wnd.document.write( '</body>' );
|
354 |
wnd.document.write( '</html>' );
|
355 |
}
|
js/wppa-ajax-front.min.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
//
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
-
//
|
6 |
|
7 |
-
var wppaJsAjaxVersion='6.4.
|
8 |
wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).css('display','');},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
|
9 |
else{jQuery('#wppa-container-'+mocc).html(result);}
|
10 |
if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
|
@@ -27,7 +27,7 @@ function wppaAjaxAddPhotoToZip(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data
|
|
27 |
else{alert(result);}
|
28 |
if(reload){document.location.reload(true);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxAddPhotoToZip failed. Error = '+error+', status = '+status,'force');},});}
|
29 |
function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=delmyzip',async:true,type:'GET',timeout:60000,success:function(result,status,xhr){document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDeleteMyZip failed. Error = '+error+', status = '+status,'force');},});}
|
30 |
-
function wppaEditPhoto(mocc,
|
31 |
function wppaPrevTags(tagsSel,tagsEdit,tagsAlbum,tagsPrev){var sel=jQuery('.'+tagsSel);var selArr=[];var editTag='';var album=jQuery('#'+tagsAlbum).val();var i=0;var j=0;var tags='';while(i<sel.length){if(sel[i].selected){selArr[j]=sel[i].value;j++;}
|
32 |
i++;}
|
33 |
editTag=jQuery('#'+tagsEdit).val();if(editTag!=''){selArr[j]=editTag;}
|
2 |
//
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
+
//
|
6 |
|
7 |
+
var wppaJsAjaxVersion='6.4.11';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
|
8 |
wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).css('display','');},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
|
9 |
else{jQuery('#wppa-container-'+mocc).html(result);}
|
10 |
if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
|
27 |
else{alert(result);}
|
28 |
if(reload){document.location.reload(true);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxAddPhotoToZip failed. Error = '+error+', status = '+status,'force');},});}
|
29 |
function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=delmyzip',async:true,type:'GET',timeout:60000,success:function(result,status,xhr){document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDeleteMyZip failed. Error = '+error+', status = '+status,'force');},});}
|
30 |
+
function wppaEditPhoto(mocc,xid){var id=String(xid);var name='Edit Photo '+id;var desc='';var width=wppaEditPhotoWidth;var height=512;if(screen.availWidth<width)width=screen.availWidth;var wnd=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width="+width+", height="+height,true);jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=front-edit'+'&photo-id='+id+'&moccur='+mocc,async:true,type:'POST',timeout:60000,beforeSend:function(xhr){wnd.document.write('<! DOCTYPE html>');wnd.document.write('<html>');wnd.document.write('<head>');var myHead='<meta name="viewport" content="width=320" >'+'<link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+'/wppa-admin-styles.css?ver='+wppaVersion+'" type="text/css" media="all" />'+'<link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" />'+'<style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style>'+'<script type="text/javascript" src="'+wppaIncludeUrl+'/js/jquery/jquery.js?ver='+wppaVersion+'"></script>'+'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-utils.js?ver='+wppaVersion+'"></script>'+'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-admin-scripts.js?ver='+wppaVersion+'"></script>'+'<title>'+name+'</title>'+'<script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";</script>';wnd.document.write(myHead);wnd.document.write('</head>');wnd.document.write('<body>');},success:function(result,status,xhr){wnd.document.write(result);},error:function(xhr,status,error){wnd.document.write(status+' '+error);wppaConsoleLog('wppaEditPhoto failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){wnd.document.write('</body>');wnd.document.write('</html>');}});}
|
31 |
function wppaPrevTags(tagsSel,tagsEdit,tagsAlbum,tagsPrev){var sel=jQuery('.'+tagsSel);var selArr=[];var editTag='';var album=jQuery('#'+tagsAlbum).val();var i=0;var j=0;var tags='';while(i<sel.length){if(sel[i].selected){selArr[j]=sel[i].value;j++;}
|
32 |
i++;}
|
33 |
editTag=jQuery('#'+tagsEdit).val();if(editTag!=''){selArr[j]=editTag;}
|
js/wppa.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
-
var wppaJsVersion = '6.4.
|
6 |
|
7 |
// Important notice:
|
8 |
// All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
|
@@ -143,6 +143,8 @@ var wppaStartPauseSymbolSize = '64';
|
|
143 |
var wppaStartPauseSymbolBradius = '32';
|
144 |
var wppaStopSymbolSize = '48';
|
145 |
var wppaStopSumbolBradius = '24';
|
|
|
|
|
146 |
|
147 |
// 'Internal' variables ( private )
|
148 |
var _wppaId = [];
|
@@ -443,10 +445,18 @@ function _wppaDoAutocol( mocc ) {
|
|
443 |
}
|
444 |
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',MCRWidth - wppaTextFrameDelta );
|
445 |
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( 'width',MCRWidth - wppaBoxDelta );
|
|
|
446 |
}
|
447 |
else { // One cover: full width, 0 covers don't care
|
448 |
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',w - wppaTextFrameDelta );
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
|
452 |
// Thumbnail area
|
@@ -484,12 +494,6 @@ function _wppaDoAutocol( mocc ) {
|
|
484 |
// Fix bug in ie and chrome
|
485 |
wppaSetMasHorFrameWidthsForIeAndChrome(mocc);
|
486 |
|
487 |
-
// User upload
|
488 |
-
jQuery( ".wppa-file-"+mocc ).css( 'width',w - 16 );
|
489 |
-
|
490 |
-
// User upload responsive covers
|
491 |
-
jQuery( ".wppa-file-mcr-"+mocc ).css( 'width', MCRWidth - wppaBoxDelta - 6 );
|
492 |
-
|
493 |
// Slide
|
494 |
wppaFormatSlide( mocc );
|
495 |
|
@@ -1245,5 +1249,18 @@ function wppaEnableSubsearch() {
|
|
1245 |
}
|
1246 |
}
|
1247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1248 |
// Say we're in
|
1249 |
wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
+
var wppaJsVersion = '6.4.11';
|
6 |
|
7 |
// Important notice:
|
8 |
// All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
|
143 |
var wppaStartPauseSymbolBradius = '32';
|
144 |
var wppaStopSymbolSize = '48';
|
145 |
var wppaStopSumbolBradius = '24';
|
146 |
+
var wppaEditPhotoWidth = '960';
|
147 |
+
var wppaThemeStyles = '';
|
148 |
|
149 |
// 'Internal' variables ( private )
|
150 |
var _wppaId = [];
|
445 |
}
|
446 |
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',MCRWidth - wppaTextFrameDelta );
|
447 |
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( 'width',MCRWidth - wppaBoxDelta );
|
448 |
+
// jQuery( ".wppa-fe-upl-mcr-"+mocc ).css( 'width',MCRWidth - wppaBoxDelta - 4 );
|
449 |
}
|
450 |
else { // One cover: full width, 0 covers don't care
|
451 |
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',w - wppaTextFrameDelta );
|
452 |
+
var myCss = {
|
453 |
+
'width' : ( w - wppaBoxDelta ),
|
454 |
+
'maxWidth' : ( w - wppaBoxDelta ),
|
455 |
+
'marginLeft': '0px',
|
456 |
+
'float' : 'left'
|
457 |
+
}
|
458 |
+
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( myCss );
|
459 |
+
// jQuery( ".wppa-fe-upl-mcr-"+mocc ).css( myCss );
|
460 |
}
|
461 |
|
462 |
// Thumbnail area
|
494 |
// Fix bug in ie and chrome
|
495 |
wppaSetMasHorFrameWidthsForIeAndChrome(mocc);
|
496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
// Slide
|
498 |
wppaFormatSlide( mocc );
|
499 |
|
1249 |
}
|
1250 |
}
|
1251 |
|
1252 |
+
function wppaDisplaySelectedFiles(id) {
|
1253 |
+
var theFiles = jQuery('#'+id);
|
1254 |
+
var i = 0;
|
1255 |
+
var result = '';
|
1256 |
+
|
1257 |
+
while ( i<theFiles[0].files.length ) {
|
1258 |
+
result += theFiles[0].files[i].name+' ';
|
1259 |
+
i++;
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
jQuery('#'+id+'-display').val(result);
|
1263 |
+
}
|
1264 |
+
|
1265 |
// Say we're in
|
1266 |
wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
|
js/wppa.min.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
|
6 |
-
var wppaJsVersion='6.4.
|
7 |
_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}});jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax()){wppaCanAjaxRender=true;}
|
8 |
if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
|
9 |
wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
|
@@ -22,10 +22,11 @@ return w*wppaAutoColumnFrac[mocc];}
|
|
22 |
function _wppaDoAutocol(mocc){wppaConsoleLog('Doing autocol '+mocc);if(!wppaAutoColumnWidth[mocc])return;var w;var h;w=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=w;jQuery(".wppa-container-"+mocc).css('width',w);jQuery(".wppa-asym-text-frame-"+mocc).css('width',w-wppaTextFrameDelta);jQuery(".wppa-cover-box-"+mocc).css('width',w-wppaBoxDelta);var exists=jQuery(".wppa-cover-box-mcr-"+mocc);var MCRWidth;if(exists.length>1){var nCovers=parseInt((w+8)/(wppaMaxCoverWidth+8))+1;var coverMax1=nCovers-1;MCRWidth=parseInt(((w+8)/nCovers)-8);var idx=0;while(idx<exists.length){var col=idx%nCovers;switch(col){case 0:jQuery(exists[idx]).css({'marginLeft':'0px','clear':'both','float':'left'});break;case coverMax1:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'right'});break;default:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'left'});}
|
23 |
idx++;}
|
24 |
jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',MCRWidth-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+mocc).css('width',MCRWidth-wppaBoxDelta);}
|
25 |
-
else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);
|
|
|
26 |
jQuery(".wppa-thumb-area-"+mocc).css('width',w-wppaThumbnailAreaDelta);if(wppaThumbSpaceAuto){var tfw=parseInt(jQuery(".thumbnail-frame-"+mocc).css('width'));if(tfw){var minspc=wppaMinThumbSpace;var weff=w-wppaThumbnailAreaDelta-7;var nthumbs=parseInt(weff/(tfw+minspc));var availsp=weff-nthumbs*tfw;var newspc=parseInt(0.5+availsp/(nthumbs+1));jQuery(".thumbnail-frame-"+mocc).css({marginLeft:newspc});}}
|
27 |
jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-20);var row=1;var rowHeightPix;var rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');while(rowHeightPerc){rowHeightPix=rowHeightPerc*(w-wppaThumbnailAreaDelta)/100;jQuery('#wppa-mas-h-'+row+'-'+mocc).css('height',rowHeightPix);row++;rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');}
|
28 |
-
wppaSetMasHorFrameWidthsForIeAndChrome(mocc);
|
29 |
else{jQuery('#prev-arrow-'+mocc).html(wppaPreviousPhoto);jQuery('#next-arrow-'+mocc).html(wppaNextPhoto);jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}}
|
30 |
jQuery(".wppa-sphoto-"+mocc).css('width',w);jQuery(".wppa-simg-"+mocc).css('width',w-2*wppaSlideBorderWidth);jQuery(".wppa-simg-"+mocc).css('height','');jQuery(".wppa-mphoto-"+mocc).css('width',w+10);jQuery(".wppa-mimg-"+mocc).css('width',w);jQuery(".wppa-mimg-"+mocc).css('height','');}
|
31 |
function wppaSetMasHorFrameWidthsForIeAndChrome(mocc){var frames=jQuery('.wppa-mas-h-'+mocc);var tnm=wppaMinThumbSpace;for(var i=0;i<frames.length;i++){var img=wppaGetChildI(frames[i]);if(img){if(img.nodeName=='IMG'){if(!img.complete){setTimeout('wppaSetMasHorFrameWidthsForIeAndChrome( '+mocc+' )',400);return;}}
|
@@ -109,4 +110,6 @@ function wppaSubboxChange(elm){if(jQuery(elm).attr('checked')=='checked'){var it
|
|
109 |
function wppaClearSubsearch(){var items=jQuery(".wppa-display-searchstring");var i=0;while(i<items.length){jQuery(items[i]).html('');i++;}
|
110 |
items=jQuery(".wppa-search-sub-box");i=0;while(i<items.length){jQuery(items[i]).attr('disabled','disabled');i++;}}
|
111 |
function wppaEnableSubsearch(){var items=jQuery(".wppa-search-sub-box");var i=0;while(i<items.length){jQuery(items[i]).removeAttr('disabled');i++;}}
|
|
|
|
|
112 |
wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.','force');
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
|
6 |
+
var wppaJsVersion='6.4.11';var wppaVersion='0';var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaSlower;var wppaFaster;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaStartSymbolUrl='';var wppaPauseSymbolUrl='';var wppaStopSymbolUrl='';var wppaStartPauseSymbolSize='64';var wppaStartPauseSymbolBradius='32';var wppaStopSymbolSize='48';var wppaStopSumbolBradius='24';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlLeftSymbolUrl;var wppaOvlRightSymbolUrl;var wppaLeftRightSymbolSize=32;var wppaLeftRightSymbolBradius=4;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';jQuery(document).ready(function(){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
|
7 |
_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}});jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax()){wppaCanAjaxRender=true;}
|
8 |
if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
|
9 |
wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
|
22 |
function _wppaDoAutocol(mocc){wppaConsoleLog('Doing autocol '+mocc);if(!wppaAutoColumnWidth[mocc])return;var w;var h;w=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=w;jQuery(".wppa-container-"+mocc).css('width',w);jQuery(".wppa-asym-text-frame-"+mocc).css('width',w-wppaTextFrameDelta);jQuery(".wppa-cover-box-"+mocc).css('width',w-wppaBoxDelta);var exists=jQuery(".wppa-cover-box-mcr-"+mocc);var MCRWidth;if(exists.length>1){var nCovers=parseInt((w+8)/(wppaMaxCoverWidth+8))+1;var coverMax1=nCovers-1;MCRWidth=parseInt(((w+8)/nCovers)-8);var idx=0;while(idx<exists.length){var col=idx%nCovers;switch(col){case 0:jQuery(exists[idx]).css({'marginLeft':'0px','clear':'both','float':'left'});break;case coverMax1:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'right'});break;default:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'left'});}
|
23 |
idx++;}
|
24 |
jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',MCRWidth-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+mocc).css('width',MCRWidth-wppaBoxDelta);}
|
25 |
+
else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);var myCss={'width':(w-wppaBoxDelta),'maxWidth':(w-wppaBoxDelta),'marginLeft':'0px','float':'left'}
|
26 |
+
jQuery(".wppa-cover-box-mcr-"+mocc).css(myCss);}
|
27 |
jQuery(".wppa-thumb-area-"+mocc).css('width',w-wppaThumbnailAreaDelta);if(wppaThumbSpaceAuto){var tfw=parseInt(jQuery(".thumbnail-frame-"+mocc).css('width'));if(tfw){var minspc=wppaMinThumbSpace;var weff=w-wppaThumbnailAreaDelta-7;var nthumbs=parseInt(weff/(tfw+minspc));var availsp=weff-nthumbs*tfw;var newspc=parseInt(0.5+availsp/(nthumbs+1));jQuery(".thumbnail-frame-"+mocc).css({marginLeft:newspc});}}
|
28 |
jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-20);var row=1;var rowHeightPix;var rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');while(rowHeightPerc){rowHeightPix=rowHeightPerc*(w-wppaThumbnailAreaDelta)/100;jQuery('#wppa-mas-h-'+row+'-'+mocc).css('height',rowHeightPix);row++;rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');}
|
29 |
+
wppaSetMasHorFrameWidthsForIeAndChrome(mocc);wppaFormatSlide(mocc);jQuery("#audio-slide-"+mocc).css('width',w-wppaBoxDelta-6);jQuery(".wppa-comment-textarea-"+mocc).css('width',w*0.7);wppaFilmStripLength[mocc]=w-wppaFilmStripAreaDelta[mocc];jQuery("#filmwindow-"+mocc).css('width',wppaFilmStripLength[mocc]);_wppaAdjustFilmstrip(mocc);if(!wppaIsMini[mocc]&&typeof(_wppaSlides[mocc])!='undefined'){if(wppaColWidth[mocc]<wppaMiniTreshold){jQuery('#prev-arrow-'+mocc).html(wppaPrevP);jQuery('#next-arrow-'+mocc).html(wppaNextP);jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
|
30 |
else{jQuery('#prev-arrow-'+mocc).html(wppaPreviousPhoto);jQuery('#next-arrow-'+mocc).html(wppaNextPhoto);jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}}
|
31 |
jQuery(".wppa-sphoto-"+mocc).css('width',w);jQuery(".wppa-simg-"+mocc).css('width',w-2*wppaSlideBorderWidth);jQuery(".wppa-simg-"+mocc).css('height','');jQuery(".wppa-mphoto-"+mocc).css('width',w+10);jQuery(".wppa-mimg-"+mocc).css('width',w);jQuery(".wppa-mimg-"+mocc).css('height','');}
|
32 |
function wppaSetMasHorFrameWidthsForIeAndChrome(mocc){var frames=jQuery('.wppa-mas-h-'+mocc);var tnm=wppaMinThumbSpace;for(var i=0;i<frames.length;i++){var img=wppaGetChildI(frames[i]);if(img){if(img.nodeName=='IMG'){if(!img.complete){setTimeout('wppaSetMasHorFrameWidthsForIeAndChrome( '+mocc+' )',400);return;}}
|
110 |
function wppaClearSubsearch(){var items=jQuery(".wppa-display-searchstring");var i=0;while(i<items.length){jQuery(items[i]).html('');i++;}
|
111 |
items=jQuery(".wppa-search-sub-box");i=0;while(i<items.length){jQuery(items[i]).attr('disabled','disabled');i++;}}
|
112 |
function wppaEnableSubsearch(){var items=jQuery(".wppa-search-sub-box");var i=0;while(i<items.length){jQuery(items[i]).removeAttr('disabled');i++;}}
|
113 |
+
function wppaDisplaySelectedFiles(id){var theFiles=jQuery('#'+id);var i=0;var result='';while(i<theFiles[0].files.length){result+=theFiles[0].files[i].name+' ';i++;}
|
114 |
+
jQuery('#'+id+'-display').val(result);}
|
115 |
wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.','force');
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
|
5 |
-
Version: 6.4.
|
6 |
-
Stable tag: 6.4.
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
@@ -180,6 +180,24 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
|
|
180 |
|
181 |
See for additional information: http://wppa.opajaap.nl/changelog/
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
= 6.4.10 =
|
184 |
|
185 |
= Bug Fixes =
|
@@ -192,7 +210,7 @@ To fix existing photos, run Table VIII-A15.
|
|
192 |
|
193 |
* Improved integrity check on settings, leading to performance improvement, especially when using qTranslate-x.
|
194 |
* The Admins choice widget no longer automaticly switches the feature on, but gives a warning when it is used and not switched on.
|
195 |
-
* If selecting album by $Name has more than one match, all album ids are returned.
|
196 |
|
197 |
= 6.4.09 =
|
198 |
|
@@ -209,7 +227,7 @@ To fix existing photos, run Table VIII-A15.
|
|
209 |
|
210 |
= Other Changes =
|
211 |
|
212 |
-
* The cached options are checked for validity by means of a hash check. This will fix spurious unexplainable changing settings.
|
213 |
* Fixed spurious error messages.
|
214 |
* Videos on lightbox in a set no longer display the start/stop running slideshow button to avoid confusion with the start video button.
|
215 |
* Opening lightbox now only stops the running slideshow where it is initiated from. Previously all shows were stopped, leading to unwanted behaviour in case of running filmonly as a banner applications.
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
|
5 |
+
Version: 6.4.11
|
6 |
+
Stable tag: 6.4.10
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
180 |
|
181 |
See for additional information: http://wppa.opajaap.nl/changelog/
|
182 |
|
183 |
+
= 6.4.11 =
|
184 |
+
|
185 |
+
= Bug Fixes =
|
186 |
+
|
187 |
+
* Fixed layout for front-end upload dialog on responsive themes.
|
188 |
+
* Removed the limit of 255 chars for photo tags and album cats.
|
189 |
+
* Default thumbnails of videos without poster image were not properly displayed. Fixed.
|
190 |
+
* Import photos now stops after timeout or lost connection.
|
191 |
+
|
192 |
+
= New Features =
|
193 |
+
|
194 |
+
* There is a new style front-end edit photo dialog. Related settings in Table VII-2.x.
|
195 |
+
|
196 |
+
= Other Changes =
|
197 |
+
|
198 |
+
* The front-end upload widget is now responsive on responsive themes without any action required.
|
199 |
+
* Improved algorithm to find an album by name. It is case insensitive.
|
200 |
+
|
201 |
= 6.4.10 =
|
202 |
|
203 |
= Bug Fixes =
|
210 |
|
211 |
* Improved integrity check on settings, leading to performance improvement, especially when using qTranslate-x.
|
212 |
* The Admins choice widget no longer automaticly switches the feature on, but gives a warning when it is used and not switched on.
|
213 |
+
* If selecting album by $Name has more than one match, all album ids are returned.
|
214 |
|
215 |
= 6.4.09 =
|
216 |
|
227 |
|
228 |
= Other Changes =
|
229 |
|
230 |
+
* The cached options are checked for validity by means of a hash check. This will fix spurious unexplainable changing settings.
|
231 |
* Fixed spurious error messages.
|
232 |
* Videos on lightbox in a set no longer display the start/stop running slideshow button to avoid confusion with the start video button.
|
233 |
* Opening lightbox now only stops the running slideshow where it is initiated from. Previously all shows were stopped, leading to unwanted behaviour in case of running filmonly as a banner applications.
|
theme/wppa-style.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
/*
|
9 |
/* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
|
10 |
/*
|
11 |
-
/* This is version 6.4.
|
12 |
*/
|
13 |
|
14 |
.wppa-container, .wppa-cover-box, .wppa-thumb-area {
|
@@ -435,6 +435,7 @@ display:none;
|
|
435 |
height: 18px;
|
436 |
border: 1px solid;
|
437 |
padding: 1px; border-radius: 3px;
|
|
|
438 |
text-align: center;
|
439 |
}
|
440 |
.wppa-bar {
|
@@ -442,16 +443,16 @@ display:none;
|
|
442 |
width:0%;
|
443 |
height:18px;
|
444 |
border-radius: 3px;
|
|
|
445 |
margin: 0;
|
446 |
}
|
447 |
.wppa-percent {
|
448 |
position:relative;
|
449 |
display:inline-block;
|
450 |
-
top:-
|
451 |
font-size: 12px;
|
452 |
line-height: 18px;
|
453 |
margin: 0;
|
454 |
-
/* left:48%; */
|
455 |
}
|
456 |
.wppa-message {
|
457 |
clear: both;
|
8 |
/*
|
9 |
/* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
|
10 |
/*
|
11 |
+
/* This is version 6.4.11
|
12 |
*/
|
13 |
|
14 |
.wppa-container, .wppa-cover-box, .wppa-thumb-area {
|
435 |
height: 18px;
|
436 |
border: 1px solid;
|
437 |
padding: 1px; border-radius: 3px;
|
438 |
+
line-height: 18px;
|
439 |
text-align: center;
|
440 |
}
|
441 |
.wppa-bar {
|
443 |
width:0%;
|
444 |
height:18px;
|
445 |
border-radius: 3px;
|
446 |
+
line-height: 18px;
|
447 |
margin: 0;
|
448 |
}
|
449 |
.wppa-percent {
|
450 |
position:relative;
|
451 |
display:inline-block;
|
452 |
+
top:-19px;
|
453 |
font-size: 12px;
|
454 |
line-height: 18px;
|
455 |
margin: 0;
|
|
|
456 |
}
|
457 |
.wppa-message {
|
458 |
clear: both;
|
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 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -57,7 +57,7 @@ function wppa_add_admin() {
|
|
57 |
add_submenu_page( 'wppa_admin_menu', __('Album Admin', 'wp-photo-album-plus'), __('Album Admin', 'wp-photo-album-plus').$upl_pending,'wppa_admin', 'wppa_admin_menu', 'wppa_admin' );
|
58 |
add_submenu_page( 'wppa_admin_menu', __('Upload Photos', 'wp-photo-album-plus'), __('Upload Photos', 'wp-photo-album-plus'), 'wppa_upload', 'wppa_upload_photos', 'wppa_page_upload' );
|
59 |
// Uploader without album admin rights, but when the upload_edit switch set, may edit his own photos
|
60 |
-
if ( ! current_user_can('wppa_admin') &&
|
61 |
add_submenu_page( 'wppa_admin_menu', __('Edit Photos', 'wp-photo-album-plus'), __('Edit Photos', 'wp-photo-album-plus'), 'wppa_upload', 'wppa_edit_photo', 'wppa_edit_photo' );
|
62 |
}
|
63 |
add_submenu_page( 'wppa_admin_menu', __('Import Photos', 'wp-photo-album-plus'), __('Import Photos', 'wp-photo-album-plus'), 'wppa_import', 'wppa_import_photos', 'wppa_page_import' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
57 |
add_submenu_page( 'wppa_admin_menu', __('Album Admin', 'wp-photo-album-plus'), __('Album Admin', 'wp-photo-album-plus').$upl_pending,'wppa_admin', 'wppa_admin_menu', 'wppa_admin' );
|
58 |
add_submenu_page( 'wppa_admin_menu', __('Upload Photos', 'wp-photo-album-plus'), __('Upload Photos', 'wp-photo-album-plus'), 'wppa_upload', 'wppa_upload_photos', 'wppa_page_upload' );
|
59 |
// Uploader without album admin rights, but when the upload_edit switch set, may edit his own photos
|
60 |
+
if ( ! current_user_can('wppa_admin') && wppa_opt('upload_edit') != 'none' ) {
|
61 |
add_submenu_page( 'wppa_admin_menu', __('Edit Photos', 'wp-photo-album-plus'), __('Edit Photos', 'wp-photo-album-plus'), 'wppa_upload', 'wppa_edit_photo', 'wppa_edit_photo' );
|
62 |
}
|
63 |
add_submenu_page( 'wppa_admin_menu', __('Import Photos', 'wp-photo-album-plus'), __('Import Photos', 'wp-photo-album-plus'), 'wppa_import', 'wppa_import_photos', 'wppa_page_import' );
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 6.4.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -140,6 +140,8 @@ global $wppa_session;
|
|
140 |
break;
|
141 |
|
142 |
case 'front-edit':
|
|
|
|
|
143 |
if ( ! isset( $_REQUEST['photo-id'] ) ) die( 'Missing required argument' );
|
144 |
if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
|
145 |
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
|
@@ -147,22 +149,96 @@ global $wppa_session;
|
|
147 |
else {
|
148 |
$photo = $_REQUEST['photo-id'];
|
149 |
}
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
153 |
if ( ! $ok ) die( 'You do not have sufficient rights to do this' );
|
|
|
|
|
154 |
require_once 'wppa-photo-admin-autosave.php';
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
wppa_exit();
|
167 |
break;
|
168 |
|
@@ -245,7 +321,7 @@ global $wppa_session;
|
|
245 |
else {
|
246 |
$photo = $_REQUEST['photo-id'];
|
247 |
}
|
248 |
-
if ( (
|
249 |
wppa_delete_photo( $photo );
|
250 |
echo 'OK||'.__( 'Photo removed' , 'wp-photo-album-plus');
|
251 |
wppa_exit();
|
@@ -2007,7 +2083,7 @@ global $wppa_session;
|
|
2007 |
wppa_update_option( 'wppa_user_upload_login', 'yes' );
|
2008 |
wppa_update_option( 'wppa_owner_only', 'yes' );
|
2009 |
wppa_update_option( 'wppa_upload_moderate', 'yes' );
|
2010 |
-
wppa_update_option( 'wppa_upload_edit', '
|
2011 |
wppa_update_option( 'wppa_upload_notify', 'yes' );
|
2012 |
wppa_update_option( 'wppa_grant_an_album', 'yes' );
|
2013 |
$grantparent = wppa_opt( 'grant_parent' );
|
@@ -2246,7 +2322,7 @@ global $wppa_session;
|
|
2246 |
$skip = $last + '1';
|
2247 |
update_option( 'wppa_remake_last', $skip );
|
2248 |
break;
|
2249 |
-
|
2250 |
case 'wppa_create_o1_files_skip_one':
|
2251 |
$last = get_option( 'wppa_create_o1_files_last', '0' );
|
2252 |
$skip = $last + '1';
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 6.4.11
|
6 |
*
|
7 |
*/
|
8 |
|
140 |
break;
|
141 |
|
142 |
case 'front-edit':
|
143 |
+
|
144 |
+
// Is the call valid?
|
145 |
if ( ! isset( $_REQUEST['photo-id'] ) ) die( 'Missing required argument' );
|
146 |
if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
|
147 |
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
|
149 |
else {
|
150 |
$photo = $_REQUEST['photo-id'];
|
151 |
}
|
152 |
+
|
153 |
+
// Is this user aloowed to edit thisphoto?
|
154 |
+
$ok = wppa_may_user_fe_edit( $photo );
|
155 |
+
|
156 |
+
// No rights, die
|
157 |
if ( ! $ok ) die( 'You do not have sufficient rights to do this' );
|
158 |
+
|
159 |
+
// Do it
|
160 |
require_once 'wppa-photo-admin-autosave.php';
|
161 |
+
|
162 |
+
// New style?
|
163 |
+
if ( wppa_opt( 'upload_edit' ) == 'new' ) {
|
164 |
+
wppa_fe_edit_new_style( $photo );
|
165 |
+
}
|
166 |
+
|
167 |
+
// Old style
|
168 |
+
if ( wppa_opt( 'upload_edit' ) == 'classic' ) {
|
169 |
+
wppa( 'front_edit', true );
|
170 |
+
echo ' <div style="padding-bottom:4px;height:24px;" >
|
171 |
+
<span style="color:#777;" >
|
172 |
+
<i>'.
|
173 |
+
__( 'All modifications are instantly updated on the server. The <b style="color:#070" >Remark</b> field keeps you informed on the actions taken at the background.' , 'wp-photo-album-plus').
|
174 |
+
'</i>
|
175 |
+
</span>
|
176 |
+
<input id="wppa-fe-exit" type="button" style="float:right;color:red;font-weight:bold;" onclick="window.opener.location.reload( true );window.close();" value="'.__( 'Exit & Refresh' , 'wp-photo-album-plus').'" />
|
177 |
+
<div id="wppa-fe-count" style="float:right;" ></div>
|
178 |
+
</div><div style="clear:both;"></div>';
|
179 |
+
wppa_album_photos( '', $photo );
|
180 |
+
}
|
181 |
+
|
182 |
+
// Done
|
183 |
+
wppa_exit();
|
184 |
+
break;
|
185 |
+
|
186 |
+
case 'update-photo-new':
|
187 |
+
|
188 |
+
// Is the call valid?
|
189 |
+
$nonce = $_REQUEST['wppa-nonce'];
|
190 |
+
if ( ! wp_verify_nonce( $nonce, 'wppa-nonce-' . $_REQUEST['photo-id'] ) ) {
|
191 |
+
die( 'Security check falure' );
|
192 |
+
}
|
193 |
+
if ( ! isset( $_REQUEST['photo-id'] ) ) die( 'Missing required argument' );
|
194 |
+
|
195 |
+
// Get photo id
|
196 |
+
if ( strlen( $_REQUEST['photo-id'] ) == 12 ) {
|
197 |
+
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'] );
|
198 |
+
}
|
199 |
+
else {
|
200 |
+
$photo = $_REQUEST['photo-id'];
|
201 |
+
}
|
202 |
+
|
203 |
+
// Name
|
204 |
+
if ( isset( $_POST['name'] ) ) {
|
205 |
+
$name = strip_tags( $_POST['name'] );
|
206 |
+
wppa_update_photo( array( 'id' => $photo, 'name' => $name ) );
|
207 |
+
}
|
208 |
+
|
209 |
+
// Description
|
210 |
+
if ( isset( $_POST['description'] ) ) {
|
211 |
+
$desc = str_replace( array( '<br/>','<br>' ), '<br />', $_POST['description'] );
|
212 |
+
$desc = balanceTags( $desc, true );
|
213 |
+
wppa_update_photo( array( 'id' => $photo, 'description' => $_POST['description'] ) );
|
214 |
+
}
|
215 |
+
|
216 |
+
// Tags
|
217 |
+
if ( isset( $_POST['tags'] ) ) {
|
218 |
+
$tags = wppa_sanitize_tags( $_POST['tags'] );
|
219 |
+
wppa_update_photo( array( 'id' => $photo, 'tags' => $_POST['tags'] ) );
|
220 |
+
}
|
221 |
+
|
222 |
+
// Custom fields
|
223 |
+
$custom = wppa_get_photo_item( $photo, 'custom' );
|
224 |
+
if ( $custom ) {
|
225 |
+
$custom_data = unserialize( $custom );
|
226 |
+
}
|
227 |
+
else {
|
228 |
+
$custom_data = array( '', '', '', '', '', '', '', '', '', '' );
|
229 |
+
}
|
230 |
+
for ( $i=0;$i<10;$i++ ) {
|
231 |
+
if ( isset( $_POST['custom_' . $i] ) && wppa_opt( 'custom_caption_' . $i ) && wppa_switch( 'custom_edit_' . $i ) ) {
|
232 |
+
$custom_data[$i] = wppa_sanitize_custom_field( $_POST['custom_' . $i] );
|
233 |
+
}
|
234 |
+
}
|
235 |
+
$custom = serialize( $custom_data );
|
236 |
+
wppa_update_photo( array( 'id' => $photo, 'custom' => $custom, 'modified' => time() ) );
|
237 |
+
|
238 |
+
// Housekeeping
|
239 |
+
wppa_index_update( 'photo', $photo );
|
240 |
+
|
241 |
+
// ( 'Photo successfully updated', 'wp-photo-album-plus' );
|
242 |
wppa_exit();
|
243 |
break;
|
244 |
|
321 |
else {
|
322 |
$photo = $_REQUEST['photo-id'];
|
323 |
}
|
324 |
+
if ( wppa_may_user_fe_edit( $photo ) ) { // Frontend edit may also delete
|
325 |
wppa_delete_photo( $photo );
|
326 |
echo 'OK||'.__( 'Photo removed' , 'wp-photo-album-plus');
|
327 |
wppa_exit();
|
2083 |
wppa_update_option( 'wppa_user_upload_login', 'yes' );
|
2084 |
wppa_update_option( 'wppa_owner_only', 'yes' );
|
2085 |
wppa_update_option( 'wppa_upload_moderate', 'yes' );
|
2086 |
+
wppa_update_option( 'wppa_upload_edit', 'new' );
|
2087 |
wppa_update_option( 'wppa_upload_notify', 'yes' );
|
2088 |
wppa_update_option( 'wppa_grant_an_album', 'yes' );
|
2089 |
$grantparent = wppa_opt( 'grant_parent' );
|
2322 |
$skip = $last + '1';
|
2323 |
update_option( 'wppa_remake_last', $skip );
|
2324 |
break;
|
2325 |
+
|
2326 |
case 'wppa_create_o1_files_skip_one':
|
2327 |
$last = get_option( 'wppa_create_o1_files_last', '0' );
|
2328 |
$skip = $last + '1';
|
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 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -39,10 +39,10 @@ function _wppa_admin() {
|
|
39 |
|
40 |
// Fix orphan albums and deleted target pages
|
41 |
$albs = $wpdb->get_results("SELECT * FROM `" . WPPA_ALBUMS . "`", ARRAY_A);
|
42 |
-
|
43 |
// Now we have tham, put them in cache
|
44 |
wppa_cache_album( 'add', $albs );
|
45 |
-
|
46 |
if ( $albs ) {
|
47 |
foreach ($albs as $alb) {
|
48 |
if ( $alb['a_parent'] > '0' && wppa_get_parentalbumid($alb['a_parent']) == '-9' ) { // Parent died?
|
@@ -1560,7 +1560,7 @@ function wppa_search_edit( $collapsable = false ) {
|
|
1560 |
$doit = false;
|
1561 |
// if ( wppa_user_is( 'administrator' ) ) $doit = true;
|
1562 |
if ( current_user_can( 'wppa_admin' ) && current_user_can( 'wppa_moderate' ) ) $doit = true;
|
1563 |
-
if (
|
1564 |
|
1565 |
if ( ! $doit ) return;
|
1566 |
?>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
39 |
|
40 |
// Fix orphan albums and deleted target pages
|
41 |
$albs = $wpdb->get_results("SELECT * FROM `" . WPPA_ALBUMS . "`", ARRAY_A);
|
42 |
+
|
43 |
// Now we have tham, put them in cache
|
44 |
wppa_cache_album( 'add', $albs );
|
45 |
+
|
46 |
if ( $albs ) {
|
47 |
foreach ($albs as $alb) {
|
48 |
if ( $alb['a_parent'] > '0' && wppa_get_parentalbumid($alb['a_parent']) == '-9' ) { // Parent died?
|
1560 |
$doit = false;
|
1561 |
// if ( wppa_user_is( 'administrator' ) ) $doit = true;
|
1562 |
if ( current_user_can( 'wppa_admin' ) && current_user_can( 'wppa_moderate' ) ) $doit = true;
|
1563 |
+
if ( wppa_opt( 'upload_edit' ) != 'none' ) $doit = true;
|
1564 |
|
1565 |
if ( ! $doit ) return;
|
1566 |
?>
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -1710,8 +1710,8 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
|
|
1710 |
$result .=
|
1711 |
'<div' .
|
1712 |
' id="wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1713 |
-
' class="
|
1714 |
-
' style="width:
|
1715 |
' >' .
|
1716 |
'<form' .
|
1717 |
' id="wppa-creform-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
@@ -1725,6 +1725,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
|
|
1725 |
'<div'.
|
1726 |
' class="wppa-box-text wppa-td"' .
|
1727 |
' style="' .
|
|
|
1728 |
'clear:both;' .
|
1729 |
'float:left;' .
|
1730 |
'text-align:left;' .
|
@@ -1738,14 +1739,15 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
|
|
1738 |
'</div>' .
|
1739 |
'<input' .
|
1740 |
' type="text"' .
|
1741 |
-
' class="wppa-box-text
|
1742 |
-
' style="padding:0; width:
|
1743 |
' name="wppa-album-name"' .
|
1744 |
' />' .
|
1745 |
// Description
|
1746 |
'<div' .
|
1747 |
' class="wppa-box-text wppa-td"' .
|
1748 |
' style="' .
|
|
|
1749 |
'clear:both;' .
|
1750 |
'float:left;' .
|
1751 |
'text-align:left;' .
|
@@ -1756,8 +1758,8 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
|
|
1756 |
__( 'Enter album description', 'wp-photo-album-plus' ) .
|
1757 |
'</div>' .
|
1758 |
'<textarea' .
|
1759 |
-
' class="wppa-user-textarea wppa-box-text
|
1760 |
-
' style="padding:0;height:120px; width:
|
1761 |
' name="wppa-album-desc" >' .
|
1762 |
'</textarea>' .
|
1763 |
'<div style="float:left; margin: 6px 0;" >' .
|
@@ -1793,10 +1795,12 @@ function wppa_get_user_upload_html( $alb, $width, $where = '', $mcr = false ) {
|
|
1793 |
static $seqno;
|
1794 |
|
1795 |
// Init
|
1796 |
-
$result = '';
|
1797 |
$mocc = wppa( 'mocc');
|
1798 |
$occur = wppa( 'occur' );
|
1799 |
|
|
|
|
|
|
|
1800 |
// Using seqno to distinguish from different places within one occurrence because
|
1801 |
// the album no is not known when there is a selection box.
|
1802 |
if ( $seqno ) $seqno++;
|
@@ -1829,11 +1833,11 @@ static $seqno;
|
|
1829 |
$allow_me = wppa_allow_user_uploads();
|
1830 |
if ( ! $allow_me ) {
|
1831 |
if ( wppa_switch( 'show_album_full' ) ) {
|
1832 |
-
$result .=
|
1833 |
-
'<
|
1834 |
__( 'Max uploads reached', 'wp-photo-album-plus' ) .
|
1835 |
wppa_time_to_wait_html( '0', true ) .
|
1836 |
-
'</
|
1837 |
}
|
1838 |
return $result;
|
1839 |
}
|
@@ -1842,11 +1846,11 @@ static $seqno;
|
|
1842 |
$allow_alb = wppa_allow_uploads( $alb );
|
1843 |
if ( ! $allow_alb ) {
|
1844 |
if ( wppa_switch( 'show_album_full' ) ) {
|
1845 |
-
$result .=
|
1846 |
-
'<
|
1847 |
__( 'Max uploads reached', 'wp-photo-album-plus' ) .
|
1848 |
wppa_time_to_wait_html( $alb ) .
|
1849 |
-
'</
|
1850 |
}
|
1851 |
return $result;
|
1852 |
}
|
@@ -1891,7 +1895,6 @@ static $seqno;
|
|
1891 |
// Make the HTML
|
1892 |
$t = $mcr ? 'mcr-' : '';
|
1893 |
$result .=
|
1894 |
-
'<div style="clear:both"></div>' .
|
1895 |
'<a' .
|
1896 |
' id="wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1897 |
' class="wppa-upload-'.$where.'"' .
|
@@ -1926,8 +1929,8 @@ static $seqno;
|
|
1926 |
'</a>' .
|
1927 |
'<div' .
|
1928 |
' id="wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1929 |
-
' class="
|
1930 |
-
' style="width:
|
1931 |
' >' .
|
1932 |
'<form' .
|
1933 |
' id="wppa-uplform-'.$alb.'-'.$mocc.'"' .
|
@@ -1955,7 +1958,7 @@ static $seqno;
|
|
1955 |
'<select' .
|
1956 |
' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
|
1957 |
' name="wppa-upload-album"' .
|
1958 |
-
' style="float:left; max-width:
|
1959 |
' onchange="jQuery( \'#wppa-sel-'.$alb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
|
1960 |
' >' .
|
1961 |
wppa_album_select_a( array ( 'addpleaseselect' => true,
|
@@ -1969,67 +1972,62 @@ static $seqno;
|
|
1969 |
'<br />';
|
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 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
'"' .
|
2009 |
-
' id="wppa-user-upload-' . $alb . '-' . $mocc . '"' .
|
2010 |
-
' name="wppa-user-upload-' . $alb . '-' . $mocc . '[]"' .
|
2011 |
-
' onchange="jQuery( \'#wppa-user-submit-' . $alb . '-' . $mocc.'\' ).css( \'display\', \'block\' )"' .
|
2012 |
-
' />';
|
2013 |
-
}
|
2014 |
|
2015 |
// Explanation
|
2016 |
-
if ( ! wppa_switch( 'upload_one_only' )
|
2017 |
if ( $max ) {
|
2018 |
$result .=
|
2019 |
-
'<
|
2020 |
sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
|
2021 |
$max,
|
2022 |
'wp-photo-album-plus' ), $max ) .
|
2023 |
-
'</
|
2024 |
$maxsize = wppa_check_memory_limit( false );
|
2025 |
if ( is_array( $maxsize ) ) {
|
2026 |
$result .=
|
2027 |
-
'<
|
2028 |
-
'<span style="font-size:10px;" >' .
|
2029 |
sprintf( __( 'Max photo size: %d x %d (%2.1f MegaPixel)', 'wp-photo-album-plus' ),
|
2030 |
$maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 )
|
2031 |
) .
|
2032 |
-
'</
|
2033 |
}
|
2034 |
}
|
2035 |
}
|
@@ -2037,7 +2035,7 @@ static $seqno;
|
|
2037 |
// Copyright notice
|
2038 |
if ( wppa_switch( 'copyright_on' ) ) {
|
2039 |
$result .=
|
2040 |
-
'<div style="clear:both;" >' .
|
2041 |
__( wppa_opt( 'copyright_notice' ), 'wp-photo-album-plus' ) .
|
2042 |
'</div>';
|
2043 |
}
|
@@ -2119,25 +2117,16 @@ static $seqno;
|
|
2119 |
'wp-photo-album-plus' );
|
2120 |
}
|
2121 |
$result .=
|
2122 |
-
'<
|
2123 |
-
'
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
'text-align:left;' .
|
2128 |
-
__wcs( 'wppa-box-text' ) .
|
2129 |
-
__wcs( 'wppa-td' ) .
|
2130 |
-
'"' .
|
2131 |
-
' >' .
|
2132 |
-
__( 'Enter photo name', 'wp-photo-album-plus' ) . ' ' .
|
2133 |
-
'<span style="font-size:10px;" >' .
|
2134 |
-
$expl .
|
2135 |
-
'</span>' .
|
2136 |
'</div>' .
|
2137 |
'<input' .
|
2138 |
' type="text"' .
|
2139 |
-
' class="wppa-box-text
|
2140 |
-
' style="
|
2141 |
' name="wppa-user-name"' .
|
2142 |
' />';
|
2143 |
}
|
@@ -2146,15 +2135,12 @@ static $seqno;
|
|
2146 |
if ( wppa_switch( 'desc_user' ) ) {
|
2147 |
$desc = wppa_switch( 'apply_newphoto_desc_user' ) ? stripslashes( wppa_opt( 'newphoto_description' ) ) : '';
|
2148 |
$result .=
|
2149 |
-
'<
|
2150 |
-
'
|
2151 |
-
|
2152 |
-
' >' .
|
2153 |
-
__( 'Enter/modify photo description', 'wp-photo-album-plus' ) .
|
2154 |
-
'</div>' .
|
2155 |
'<textarea' .
|
2156 |
-
' class="wppa-user-textarea wppa-box-text
|
2157 |
-
' style="
|
2158 |
' name="wppa-user-desc"' .
|
2159 |
' >' .
|
2160 |
$desc .
|
@@ -2176,17 +2162,14 @@ static $seqno;
|
|
2176 |
for ( $i = '0'; $i < '10' ; $i++ ) {
|
2177 |
if ( wppa_opt( 'custom_caption_'.$i ) ) {
|
2178 |
$result .=
|
2179 |
-
'<
|
2180 |
-
' class="wppa-box-text wppa-td"' .
|
2181 |
-
' style="clear:both; float:left; text-align:left; '.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'"' .
|
2182 |
-
' >'.
|
2183 |
__( wppa_opt( 'custom_caption_'.$i ), 'wp-photo-album-plus' ) . ': ' .
|
2184 |
( wppa_switch( 'custom_visible_'.$i ) ? '' : ' <small><i>( '.__( 'hidden', 'wp-photo-album-plus' ).' )</i></small>' ) .
|
2185 |
-
'</
|
2186 |
'<input' .
|
2187 |
' type="text"' .
|
2188 |
-
' class="wppa-box-text
|
2189 |
-
' style="
|
2190 |
' name="wppa-user-custom-'.$i.'"' .
|
2191 |
' />';
|
2192 |
}
|
@@ -2200,16 +2183,17 @@ static $seqno;
|
|
2200 |
$onc = 'wppaPrevTags(\'wppa-sel-'.$alb.'-'.$mocc.'\', \'wppa-inp-'.$alb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$alb.'-'.$mocc.'\')';
|
2201 |
|
2202 |
// Open the tag enter area
|
2203 |
-
$result .= '<div
|
2204 |
|
2205 |
// Selection boxes 1..3
|
2206 |
for ( $i = '1'; $i < '4'; $i++ ) {
|
2207 |
if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
|
2208 |
-
$result .=
|
2209 |
-
'<
|
|
|
|
|
2210 |
'<select' .
|
2211 |
' id="wppa-sel-'.$alb.'-'.$mocc.'-'.$i.'"' .
|
2212 |
-
' style="float:left; margin-right: 4px;"' .
|
2213 |
' name="wppa-user-tags-'.$i.'[]"' .
|
2214 |
( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
|
2215 |
' onchange="'.$onc.'"' .
|
@@ -2228,32 +2212,31 @@ static $seqno;
|
|
2228 |
$result .= '<option class="wppa-sel-'.$alb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
|
2229 |
}
|
2230 |
}
|
2231 |
-
$result .= '</select>'
|
2232 |
-
'</div>';
|
2233 |
}
|
2234 |
}
|
2235 |
|
2236 |
// New tags
|
2237 |
if ( wppa_switch( 'up_tag_input_on' ) ) {
|
2238 |
-
$result .= '<
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
'
|
2248 |
-
'
|
2249 |
}
|
2250 |
|
2251 |
// Preview area
|
2252 |
if ( wppa_switch( 'up_tag_preview' ) ) {
|
2253 |
-
$result .= '<
|
2254 |
__( 'Preview tags:', 'wp-photo-album-plus' ) .
|
2255 |
' <small id="wppa-prev-'.$alb.'-'.$mocc.'"></small>' .
|
2256 |
-
'</
|
2257 |
'<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
|
2258 |
}
|
2259 |
|
@@ -2289,8 +2272,8 @@ static $seqno;
|
|
2289 |
$result .=
|
2290 |
'<div' .
|
2291 |
' id="progress-'.$alb.'-'.$mocc.'"' .
|
2292 |
-
' class="wppa-progress"' .
|
2293 |
-
' style="border-color:'.wppa_opt( 'bcolor_upload' ).'"' .
|
2294 |
' >' .
|
2295 |
'<div id="bar-'.$alb.'-'.$mocc.'" class="wppa-bar" ></div>' .
|
2296 |
'<div id="percent-'.$alb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
|
@@ -2345,6 +2328,9 @@ static $seqno;
|
|
2345 |
</script>';
|
2346 |
}
|
2347 |
|
|
|
|
|
|
|
2348 |
return $result;
|
2349 |
}
|
2350 |
|
@@ -2455,7 +2441,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
|
|
2455 |
' id="wppaalbum-name-'.wppa( 'mocc' ).'-'.$alb.'"' .
|
2456 |
' class="wppa-box-text wppa-file-'.$t.wppa( 'mocc' ).'"' .
|
2457 |
' value="' . $name . '"' .
|
2458 |
-
' style="padding:0; width:'.
|
2459 |
' />
|
2460 |
<div' .
|
2461 |
' class="wppa-box-text wppa-td"' .
|
@@ -2476,7 +2462,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
|
|
2476 |
' style="' .
|
2477 |
'padding:0;' .
|
2478 |
'height:120px;' .
|
2479 |
-
'width:' .
|
2480 |
__wcs( 'wppa-box-text' ) .
|
2481 |
'"' .
|
2482 |
' >' . $desc .
|
@@ -3808,4 +3794,18 @@ function wppa_is_exif_date( $date ) {
|
|
3808 |
if ( $t['2'] > '31' ) return false;
|
3809 |
|
3810 |
return true;
|
3811 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*
|
9 |
*/
|
1710 |
$result .=
|
1711 |
'<div' .
|
1712 |
' id="wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1713 |
+
// ' class=""' .
|
1714 |
+
' style="width:100%;text-align:center;display:none;"' .
|
1715 |
' >' .
|
1716 |
'<form' .
|
1717 |
' id="wppa-creform-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1725 |
'<div'.
|
1726 |
' class="wppa-box-text wppa-td"' .
|
1727 |
' style="' .
|
1728 |
+
'width:100%;' .
|
1729 |
'clear:both;' .
|
1730 |
'float:left;' .
|
1731 |
'text-align:left;' .
|
1739 |
'</div>' .
|
1740 |
'<input' .
|
1741 |
' type="text"' .
|
1742 |
+
' class="wppa-box-text"' .
|
1743 |
+
' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
1744 |
' name="wppa-album-name"' .
|
1745 |
' />' .
|
1746 |
// Description
|
1747 |
'<div' .
|
1748 |
' class="wppa-box-text wppa-td"' .
|
1749 |
' style="' .
|
1750 |
+
'width:100%;' .
|
1751 |
'clear:both;' .
|
1752 |
'float:left;' .
|
1753 |
'text-align:left;' .
|
1758 |
__( 'Enter album description', 'wp-photo-album-plus' ) .
|
1759 |
'</div>' .
|
1760 |
'<textarea' .
|
1761 |
+
' class="wppa-user-textarea wppa-box-text"' .
|
1762 |
+
' style="padding:0;height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
1763 |
' name="wppa-album-desc" >' .
|
1764 |
'</textarea>' .
|
1765 |
'<div style="float:left; margin: 6px 0;" >' .
|
1795 |
static $seqno;
|
1796 |
|
1797 |
// Init
|
|
|
1798 |
$mocc = wppa( 'mocc');
|
1799 |
$occur = wppa( 'occur' );
|
1800 |
|
1801 |
+
// Open wrapper
|
1802 |
+
$result = '<div style="clear:both"></div>';//<div id="fe-upl-wrap-' . $mocc . '" style="background-color:#FFC;" >';
|
1803 |
+
|
1804 |
// Using seqno to distinguish from different places within one occurrence because
|
1805 |
// the album no is not known when there is a selection box.
|
1806 |
if ( $seqno ) $seqno++;
|
1833 |
$allow_me = wppa_allow_user_uploads();
|
1834 |
if ( ! $allow_me ) {
|
1835 |
if ( wppa_switch( 'show_album_full' ) ) {
|
1836 |
+
$result .=
|
1837 |
+
'<h6 style="color:red">' .
|
1838 |
__( 'Max uploads reached', 'wp-photo-album-plus' ) .
|
1839 |
wppa_time_to_wait_html( '0', true ) .
|
1840 |
+
'</h6>';
|
1841 |
}
|
1842 |
return $result;
|
1843 |
}
|
1846 |
$allow_alb = wppa_allow_uploads( $alb );
|
1847 |
if ( ! $allow_alb ) {
|
1848 |
if ( wppa_switch( 'show_album_full' ) ) {
|
1849 |
+
$result .=
|
1850 |
+
'<h6 style="color:red">' .
|
1851 |
__( 'Max uploads reached', 'wp-photo-album-plus' ) .
|
1852 |
wppa_time_to_wait_html( $alb ) .
|
1853 |
+
'</h6>';
|
1854 |
}
|
1855 |
return $result;
|
1856 |
}
|
1895 |
// Make the HTML
|
1896 |
$t = $mcr ? 'mcr-' : '';
|
1897 |
$result .=
|
|
|
1898 |
'<a' .
|
1899 |
' id="wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1900 |
' class="wppa-upload-'.$where.'"' .
|
1929 |
'</a>' .
|
1930 |
'<div' .
|
1931 |
' id="wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
|
1932 |
+
' class=""' .
|
1933 |
+
' style="width:100%;text-align:center;display:none; clear:both;"' .
|
1934 |
' >' .
|
1935 |
'<form' .
|
1936 |
' id="wppa-uplform-'.$alb.'-'.$mocc.'"' .
|
1958 |
'<select' .
|
1959 |
' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
|
1960 |
' name="wppa-upload-album"' .
|
1961 |
+
' style="float:left; max-width: 100%;"' .
|
1962 |
' onchange="jQuery( \'#wppa-sel-'.$alb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
|
1963 |
' >' .
|
1964 |
wppa_album_select_a( array ( 'addpleaseselect' => true,
|
1972 |
'<br />';
|
1973 |
}
|
1974 |
|
1975 |
+
$one_only = wppa_switch( 'upload_one_only' );
|
1976 |
+
$multiple = ! $one_only;
|
1977 |
+
$on_camera = wppa_switch( 'camera_connect' );
|
1978 |
+
|
1979 |
+
$result .=
|
1980 |
+
|
1981 |
+
// The (hidden) functional button
|
1982 |
+
'<input' .
|
1983 |
+
' type="file"' .
|
1984 |
+
' accept="image/*"' .
|
1985 |
+
( $on_camera ? ' capture="capture"' : '' ) .
|
1986 |
+
( $multiple ? ' multiple="multiple"' : '' ) .
|
1987 |
+
' style="' .
|
1988 |
+
'display:none;' .
|
1989 |
'"' .
|
1990 |
+
' id="wppa-user-upload-' . $alb . '-' . $mocc . '"' .
|
1991 |
+
' name="wppa-user-upload-' . $alb . '-' . $mocc . '[]"' .
|
1992 |
+
' onchange="' .
|
1993 |
+
'jQuery( \'#wppa-user-submit-' . $alb . '-' . $mocc.'\' ).css( \'display\', \'block\' );' .
|
1994 |
+
'wppaDisplaySelectedFiles(\'wppa-user-upload-' . $alb . '-' . $mocc . '\')' .
|
1995 |
+
'"' .
|
1996 |
+
' />' .
|
1997 |
|
1998 |
+
// The displayed button
|
1999 |
+
'<input' .
|
2000 |
+
' type="button"' .
|
2001 |
+
' style="width:100%;margin-top:8px;margin-bottom:8px;padding-left:0;padding-right:0;"' .
|
2002 |
+
' id="wppa-user-upload-' . $alb . '-' . $mocc . '-display"' .
|
2003 |
+
' value="' .
|
2004 |
+
( $one_only ? (
|
2005 |
+
$on_camera ? esc_attr( __( 'Select Photo / Camera', 'wp-photo-album-plus' ) ) : esc_attr( 'Select Photo', 'wp-photo-album-plus' )
|
2006 |
+
) : (
|
2007 |
+
$on_camera ? esc_attr( __( 'Select Photos / Camera', 'wp-photo-album-plus' ) ) : esc_attr( 'Select Photos', 'wp-photo-album-plus' )
|
2008 |
+
)
|
2009 |
+
) .
|
2010 |
+
'"' .
|
2011 |
+
' onclick="jQuery( \'#wppa-user-upload-' . $alb . '-' . $mocc . '\' ).click();"' .
|
2012 |
+
'/>';
|
|
|
|
|
|
|
|
|
|
|
|
|
2013 |
|
2014 |
// Explanation
|
2015 |
+
if ( ! wppa_switch( 'upload_one_only' ) ) {
|
2016 |
if ( $max ) {
|
2017 |
$result .=
|
2018 |
+
'<div style="font-size:10px;" >' .
|
2019 |
sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
|
2020 |
$max,
|
2021 |
'wp-photo-album-plus' ), $max ) .
|
2022 |
+
'</div>';
|
2023 |
$maxsize = wppa_check_memory_limit( false );
|
2024 |
if ( is_array( $maxsize ) ) {
|
2025 |
$result .=
|
2026 |
+
'<div style="font-size:10px;" >' .
|
|
|
2027 |
sprintf( __( 'Max photo size: %d x %d (%2.1f MegaPixel)', 'wp-photo-album-plus' ),
|
2028 |
$maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 )
|
2029 |
) .
|
2030 |
+
'</div>';
|
2031 |
}
|
2032 |
}
|
2033 |
}
|
2035 |
// Copyright notice
|
2036 |
if ( wppa_switch( 'copyright_on' ) ) {
|
2037 |
$result .=
|
2038 |
+
'<div style="width:100%;clear:both;" >' .
|
2039 |
__( wppa_opt( 'copyright_notice' ), 'wp-photo-album-plus' ) .
|
2040 |
'</div>';
|
2041 |
}
|
2117 |
'wp-photo-album-plus' );
|
2118 |
}
|
2119 |
$result .=
|
2120 |
+
'<h6>' .
|
2121 |
+
__( 'Photo name', 'wp-photo-album-plus' ) .
|
2122 |
+
'</h6>' .
|
2123 |
+
'<div style="clear:left;font-size:10px;" >' .
|
2124 |
+
$expl .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2125 |
'</div>' .
|
2126 |
'<input' .
|
2127 |
' type="text"' .
|
2128 |
+
' class="wppa-box-text"' .
|
2129 |
+
' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
2130 |
' name="wppa-user-name"' .
|
2131 |
' />';
|
2132 |
}
|
2135 |
if ( wppa_switch( 'desc_user' ) ) {
|
2136 |
$desc = wppa_switch( 'apply_newphoto_desc_user' ) ? stripslashes( wppa_opt( 'newphoto_description' ) ) : '';
|
2137 |
$result .=
|
2138 |
+
'<h6>' .
|
2139 |
+
__( 'Photo description', 'wp-photo-album-plus' ) .
|
2140 |
+
'</h6>' .
|
|
|
|
|
|
|
2141 |
'<textarea' .
|
2142 |
+
' class="wppa-user-textarea wppa-box-text "' .
|
2143 |
+
' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
2144 |
' name="wppa-user-desc"' .
|
2145 |
' >' .
|
2146 |
$desc .
|
2162 |
for ( $i = '0'; $i < '10' ; $i++ ) {
|
2163 |
if ( wppa_opt( 'custom_caption_'.$i ) ) {
|
2164 |
$result .=
|
2165 |
+
'<h6>'.
|
|
|
|
|
|
|
2166 |
__( wppa_opt( 'custom_caption_'.$i ), 'wp-photo-album-plus' ) . ': ' .
|
2167 |
( wppa_switch( 'custom_visible_'.$i ) ? '' : ' <small><i>( '.__( 'hidden', 'wp-photo-album-plus' ).' )</i></small>' ) .
|
2168 |
+
'</h6>' .
|
2169 |
'<input' .
|
2170 |
' type="text"' .
|
2171 |
+
' class="wppa-box-text"' .
|
2172 |
+
' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
2173 |
' name="wppa-user-custom-'.$i.'"' .
|
2174 |
' />';
|
2175 |
}
|
2183 |
$onc = 'wppaPrevTags(\'wppa-sel-'.$alb.'-'.$mocc.'\', \'wppa-inp-'.$alb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$alb.'-'.$mocc.'\')';
|
2184 |
|
2185 |
// Open the tag enter area
|
2186 |
+
$result .= '<div style="clear:both;" >';
|
2187 |
|
2188 |
// Selection boxes 1..3
|
2189 |
for ( $i = '1'; $i < '4'; $i++ ) {
|
2190 |
if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
|
2191 |
+
$result .=
|
2192 |
+
'<h6>' .
|
2193 |
+
__( wppa_opt( 'up_tagselbox_title_'.$i ) ,'wp-photo-album-plus' ) .
|
2194 |
+
'</h6>' .
|
2195 |
'<select' .
|
2196 |
' id="wppa-sel-'.$alb.'-'.$mocc.'-'.$i.'"' .
|
|
|
2197 |
' name="wppa-user-tags-'.$i.'[]"' .
|
2198 |
( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
|
2199 |
' onchange="'.$onc.'"' .
|
2212 |
$result .= '<option class="wppa-sel-'.$alb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
|
2213 |
}
|
2214 |
}
|
2215 |
+
$result .= '</select><div style="clear:both;" ></div>';
|
|
|
2216 |
}
|
2217 |
}
|
2218 |
|
2219 |
// New tags
|
2220 |
if ( wppa_switch( 'up_tag_input_on' ) ) {
|
2221 |
+
$result .= '<h6>' .
|
2222 |
+
__( wppa_opt( 'up_tag_input_title' ), 'wp-photo-album-plus' ) .
|
2223 |
+
'</h6>' .
|
2224 |
+
'<input' .
|
2225 |
+
' id="wppa-inp-'.$alb.'-'.$mocc.'"' .
|
2226 |
+
' type="text"' .
|
2227 |
+
' class="wppa-box-text "' .
|
2228 |
+
' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
|
2229 |
+
' name="wppa-new-tags"' .
|
2230 |
+
' onchange="'.$onc.'"' .
|
2231 |
+
' />';
|
2232 |
}
|
2233 |
|
2234 |
// Preview area
|
2235 |
if ( wppa_switch( 'up_tag_preview' ) ) {
|
2236 |
+
$result .= '<h6>' .
|
2237 |
__( 'Preview tags:', 'wp-photo-album-plus' ) .
|
2238 |
' <small id="wppa-prev-'.$alb.'-'.$mocc.'"></small>' .
|
2239 |
+
'</h6>' .
|
2240 |
'<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
|
2241 |
}
|
2242 |
|
2272 |
$result .=
|
2273 |
'<div' .
|
2274 |
' id="progress-'.$alb.'-'.$mocc.'"' .
|
2275 |
+
' class="wppa-progress "' .
|
2276 |
+
' style="width:100%;border-color:'.wppa_opt( 'bcolor_upload' ).'"' .
|
2277 |
' >' .
|
2278 |
'<div id="bar-'.$alb.'-'.$mocc.'" class="wppa-bar" ></div>' .
|
2279 |
'<div id="percent-'.$alb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
|
2328 |
</script>';
|
2329 |
}
|
2330 |
|
2331 |
+
// Close wrapper
|
2332 |
+
// $result .= '</div>';
|
2333 |
+
|
2334 |
return $result;
|
2335 |
}
|
2336 |
|
2441 |
' id="wppaalbum-name-'.wppa( 'mocc' ).'-'.$alb.'"' .
|
2442 |
' class="wppa-box-text wppa-file-'.$t.wppa( 'mocc' ).'"' .
|
2443 |
' value="' . $name . '"' .
|
2444 |
+
' style="padding:0; width:100%;'.__wcs( 'wppa-box-text' ).'"' .
|
2445 |
' />
|
2446 |
<div' .
|
2447 |
' class="wppa-box-text wppa-td"' .
|
2462 |
' style="' .
|
2463 |
'padding:0;' .
|
2464 |
'height:120px;' .
|
2465 |
+
'width:100%;' .
|
2466 |
__wcs( 'wppa-box-text' ) .
|
2467 |
'"' .
|
2468 |
' >' . $desc .
|
3794 |
if ( $t['2'] > '31' ) return false;
|
3795 |
|
3796 |
return true;
|
3797 |
+
}
|
3798 |
+
|
3799 |
+
// The js code to make a widget responsive
|
3800 |
+
function wppa_get_responsive_widget_js_html( $mocc ) {
|
3801 |
+
|
3802 |
+
$result =
|
3803 |
+
'<script type="text/javascript">' .
|
3804 |
+
'wppaAutoColumnWidth['.$mocc.'] = true;' .
|
3805 |
+
'wppaAutoColumnFrac['.$mocc.'] = 1.0;' .
|
3806 |
+
'wppaColWidth['.$mocc.'] = 0;' .
|
3807 |
+
'wppaTopMoc = '.$mocc.';' .
|
3808 |
+
'</script>';
|
3809 |
+
|
3810 |
+
return $result;
|
3811 |
+
}
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various funcions
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -801,7 +801,7 @@ function wppa_album_name_to_number( $xalb ) {
|
|
801 |
$xalb = strip_tags( $xalb );
|
802 |
if ( $xalb && ! wppa_is_int( $xalb ) ) {
|
803 |
if ( substr( $xalb, 0, 1 ) == '$' ) { // Name
|
804 |
-
$id = wppa_get_album_id_by_name( substr( $xalb, 1 )
|
805 |
if ( $id > '0' ) return $id;
|
806 |
elseif ( $id < '0' ) {
|
807 |
wppa_dbg_msg( 'Duplicate album names found: '.$xalb, 'red', 'force' );
|
@@ -2033,60 +2033,51 @@ static $user;
|
|
2033 |
$dellink = '';
|
2034 |
$choicelink = '';
|
2035 |
if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
|
2036 |
-
if (
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
'
|
2050 |
-
|
2051 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2052 |
'<a' .
|
2053 |
-
' style="color:
|
2054 |
' onclick="' .
|
2055 |
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2056 |
-
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to
|
2057 |
-
'
|
2058 |
'>' .
|
2059 |
-
__( '
|
2060 |
-
'</a>'
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
' >';
|
2068 |
-
if ( ! wppa_is_photo_in_zip( $thumb['id'] ) ) {
|
2069 |
-
$choicelink .=
|
2070 |
-
'<a' .
|
2071 |
-
' style="color:blue;"' .
|
2072 |
-
' onclick="' .
|
2073 |
-
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2074 |
-
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
|
2075 |
-
'wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', true ); return false;' ).'"' .
|
2076 |
-
'>' .
|
2077 |
-
__( 'MyChoice' , 'wp-photo-album-plus') .
|
2078 |
-
'</a>';
|
2079 |
-
}
|
2080 |
-
else {
|
2081 |
-
$choicelink .= __('Selected', 'wp-photo-album-plus');
|
2082 |
-
}
|
2083 |
-
$choicelink .=
|
2084 |
-
'</div>';
|
2085 |
-
}
|
2086 |
-
else {
|
2087 |
-
$choicelink = '';
|
2088 |
-
}
|
2089 |
-
}
|
2090 |
}
|
2091 |
}
|
2092 |
if ( $editlink || $dellink || $choicelink ) $desc = $editlink.$dellink.$choicelink.'<div style="clear:both"></div>'.$desc;
|
@@ -2329,7 +2320,7 @@ global $wppa_done;
|
|
2329 |
$to = $moduser->user_email;
|
2330 |
$cont['3'] = user_can( $moduser, 'wppa_comments' ) ? $cont2 : '';
|
2331 |
if ( user_can( $moduser, 'wppa_admin' ) ) $cont['4'] = $cont3;
|
2332 |
-
elseif (
|
2333 |
else $cont['4'] = '';
|
2334 |
$cont['5'] = __( 'You receive this email as uploader of the photo' , 'wp-photo-album-plus');
|
2335 |
// Send!
|
@@ -4042,7 +4033,7 @@ global $allalbums;
|
|
4042 |
$aname = str_replace( '"', '%', $aname ); // A trick for double quotes
|
4043 |
$aname = stripslashes( $aname );
|
4044 |
wppa_dbg_msg( 'Testing '.$aname.' for '.$name.' (get_album_id_by_name)' );
|
4045 |
-
if ( $aname
|
4046 |
$aid = $alb['id'];
|
4047 |
}
|
4048 |
}
|
@@ -4574,27 +4565,21 @@ function wppa_get_lbtitle( $type, $id ) {
|
|
4574 |
if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
|
4575 |
if ( ( $do_name || $do_desc ) && $do_sm ) $result .= '<br />';
|
4576 |
if ( $do_sm ) $result .= wppa_get_share_html( $thumb['id'], 'lightbox' );
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
-
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
else {
|
4586 |
-
$parg = '\''.wppa_encrypt_photo($id).'\'';
|
4587 |
-
}
|
4588 |
$result .= '
|
4589 |
-
|
4590 |
-
|
4591 |
-
|
4592 |
-
|
4593 |
-
|
4594 |
-
|
4595 |
-
'</a>' .
|
4596 |
-
'</div>';
|
4597 |
-
}
|
4598 |
}
|
4599 |
|
4600 |
$result = esc_attr( $result );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various funcions
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
801 |
$xalb = strip_tags( $xalb );
|
802 |
if ( $xalb && ! wppa_is_int( $xalb ) ) {
|
803 |
if ( substr( $xalb, 0, 1 ) == '$' ) { // Name
|
804 |
+
$id = wppa_get_album_id_by_name( substr( $xalb, 1 ) );
|
805 |
if ( $id > '0' ) return $id;
|
806 |
elseif ( $id < '0' ) {
|
807 |
wppa_dbg_msg( 'Duplicate album names found: '.$xalb, 'red', 'force' );
|
2033 |
$dellink = '';
|
2034 |
$choicelink = '';
|
2035 |
if ( ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) {
|
2036 |
+
if ( wppa_may_user_fe_edit( $id ) ) {
|
2037 |
+
$editlink = '
|
2038 |
+
<input' .
|
2039 |
+
' type="button"' .
|
2040 |
+
' style="float:right; margin-right:6px;"' .
|
2041 |
+
' onclick="_wppaStop( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').' );"' .
|
2042 |
+
' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
|
2043 |
+
' />';
|
2044 |
+
}
|
2045 |
+
if ( wppa_may_user_fe_delete( $id ) ) {
|
2046 |
+
$dellink = '
|
2047 |
+
<input' .
|
2048 |
+
' type="button"' .
|
2049 |
+
' style="float:right; margin-right:6px;"' .
|
2050 |
+
' onclick="' .
|
2051 |
+
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2052 |
+
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo?' , 'wp-photo-album-plus') . '" ) ) ' .
|
2053 |
+
'wppaAjaxRemovePhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', true );' ) .
|
2054 |
+
'"' .
|
2055 |
+
' value="' . __( 'Delete' , 'wp-photo-album-plus' ) . '"' .
|
2056 |
+
' />';
|
2057 |
+
}
|
2058 |
+
if ( wppa_user_is( 'administrator' ) && wppa_switch( 'enable_admins_choice' ) ) {
|
2059 |
+
$choicelink = '
|
2060 |
+
<div' .
|
2061 |
+
' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
|
2062 |
+
' style="float:right;margin-right:6px;color:gray;"' .
|
2063 |
+
' >';
|
2064 |
+
if ( ! wppa_is_photo_in_zip( $thumb['id'] ) ) {
|
2065 |
+
$choicelink .=
|
2066 |
'<a' .
|
2067 |
+
' style="color:blue;"' .
|
2068 |
' onclick="' .
|
2069 |
'_wppaStop( ' . wppa( 'mocc' ) . ' );' .
|
2070 |
+
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
|
2071 |
+
'wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', true ); return false;' ).'"' .
|
2072 |
'>' .
|
2073 |
+
__( 'MyChoice' , 'wp-photo-album-plus') .
|
2074 |
+
'</a>';
|
2075 |
+
}
|
2076 |
+
else {
|
2077 |
+
$choicelink .= __('Selected', 'wp-photo-album-plus');
|
2078 |
+
}
|
2079 |
+
$choicelink .=
|
2080 |
+
'</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2081 |
}
|
2082 |
}
|
2083 |
if ( $editlink || $dellink || $choicelink ) $desc = $editlink.$dellink.$choicelink.'<div style="clear:both"></div>'.$desc;
|
2320 |
$to = $moduser->user_email;
|
2321 |
$cont['3'] = user_can( $moduser, 'wppa_comments' ) ? $cont2 : '';
|
2322 |
if ( user_can( $moduser, 'wppa_admin' ) ) $cont['4'] = $cont3;
|
2323 |
+
elseif ( wppa_may_user_fe_edit( $photo ) ) $cont['4'] = $cont3a;
|
2324 |
else $cont['4'] = '';
|
2325 |
$cont['5'] = __( 'You receive this email as uploader of the photo' , 'wp-photo-album-plus');
|
2326 |
// Send!
|
4033 |
$aname = str_replace( '"', '%', $aname ); // A trick for double quotes
|
4034 |
$aname = stripslashes( $aname );
|
4035 |
wppa_dbg_msg( 'Testing '.$aname.' for '.$name.' (get_album_id_by_name)' );
|
4036 |
+
if ( strcasecmp( $aname, $name ) == 0 ) {
|
4037 |
$aid = $alb['id'];
|
4038 |
}
|
4039 |
}
|
4565 |
if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
|
4566 |
if ( ( $do_name || $do_desc ) && $do_sm ) $result .= '<br />';
|
4567 |
if ( $do_sm ) $result .= wppa_get_share_html( $thumb['id'], 'lightbox' );
|
4568 |
+
|
4569 |
+
if ( wppa_may_user_fe_edit( $id ) ) {
|
4570 |
+
if ( $type == 'slide' ) {
|
4571 |
+
$parg = esc_js('\''.wppa_encrypt_photo($id).'\'');
|
4572 |
+
}
|
4573 |
+
else {
|
4574 |
+
$parg = '\''.wppa_encrypt_photo($id).'\'';
|
4575 |
+
}
|
|
|
|
|
|
|
4576 |
$result .= '
|
4577 |
+
<input' .
|
4578 |
+
' type="button"' .
|
4579 |
+
' style="float:right; margin-right:6px;" ' .
|
4580 |
+
' onclick="' . ( $type == 'slide' ? '_wppaStop( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' );"' .
|
4581 |
+
' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
|
4582 |
+
' />';
|
|
|
|
|
|
|
4583 |
}
|
4584 |
|
4585 |
$result = esc_attr( $result );
|
wppa-non-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -772,6 +772,8 @@ global $wppa_init_js_data;
|
|
772 |
wppaOvlRightSymbolUrl = "'.(wppa_opt('right_symbol_url') ? wppa_opt('right_symbol_url') : wppa_get_imgdir( 'next-'.wppa_opt('ovl_theme').'.gif' )).'";
|
773 |
wppaLeftRightSymbolSize = '.wppa_opt('left_right_symbol_size').';
|
774 |
wppaLeftRightSymbolBradius = '.wppa_opt('left_right_symbol_bradius').';
|
|
|
|
|
775 |
';
|
776 |
|
777 |
// Open file
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
772 |
wppaOvlRightSymbolUrl = "'.(wppa_opt('right_symbol_url') ? wppa_opt('right_symbol_url') : wppa_get_imgdir( 'next-'.wppa_opt('ovl_theme').'.gif' )).'";
|
773 |
wppaLeftRightSymbolSize = '.wppa_opt('left_right_symbol_size').';
|
774 |
wppaLeftRightSymbolBradius = '.wppa_opt('left_right_symbol_bradius').';
|
775 |
+
wppaEditPhotoWidth = "'.(wppa_opt('upload_edit') == 'new' ? 500 : 960).'";
|
776 |
+
wppaThemeStyles = "'.(wppa_switch('upload_edit_theme_css') ? get_stylesheet_uri() : '' ).'";
|
777 |
';
|
778 |
|
779 |
// Open file
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1673,7 +1673,7 @@ global $wppa_search_stats;
|
|
1673 |
$doit = false;
|
1674 |
// if ( wppa_user_is( 'administrator' ) ) $doit = true;
|
1675 |
if ( current_user_can( 'wppa_admin' ) && current_user_can( 'wppa_moderate' ) ) $doit = true;
|
1676 |
-
if (
|
1677 |
if ( ! $doit ) { // Should never get here. Only when url is manipulted manually.
|
1678 |
die('Security check failure #309');
|
1679 |
}
|
@@ -1829,4 +1829,166 @@ global $wppa_search_stats;
|
|
1829 |
echo '
|
1830 |
</table>';
|
1831 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1832 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
1673 |
$doit = false;
|
1674 |
// if ( wppa_user_is( 'administrator' ) ) $doit = true;
|
1675 |
if ( current_user_can( 'wppa_admin' ) && current_user_can( 'wppa_moderate' ) ) $doit = true;
|
1676 |
+
if ( wppa_opt( 'upload_edit' ) != 'none' ) $doit = true;
|
1677 |
if ( ! $doit ) { // Should never get here. Only when url is manipulted manually.
|
1678 |
die('Security check failure #309');
|
1679 |
}
|
1829 |
echo '
|
1830 |
</table>';
|
1831 |
}
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
// New style fron-end edit photo
|
1835 |
+
function wppa_fe_edit_new_style( $photo ) {
|
1836 |
+
|
1837 |
+
$items = array( 'name',
|
1838 |
+
'description',
|
1839 |
+
'tags',
|
1840 |
+
'custom_0',
|
1841 |
+
'custom_1',
|
1842 |
+
'custom_2',
|
1843 |
+
'custom_3',
|
1844 |
+
'custom_4',
|
1845 |
+
'custom_5',
|
1846 |
+
'custom_6',
|
1847 |
+
'custom_7',
|
1848 |
+
'custom_8',
|
1849 |
+
'custom_9',
|
1850 |
+
);
|
1851 |
+
$titles = array( __( 'Name', 'wp-photo-album-plus' ),
|
1852 |
+
__( 'Description', 'wp-photo-album-plus' ),
|
1853 |
+
__( 'Tags', 'wp-photo-album-plus' ),
|
1854 |
+
wppa_opt( 'custom_caption_0' ),
|
1855 |
+
wppa_opt( 'custom_caption_1' ),
|
1856 |
+
wppa_opt( 'custom_caption_2' ),
|
1857 |
+
wppa_opt( 'custom_caption_3' ),
|
1858 |
+
wppa_opt( 'custom_caption_4' ),
|
1859 |
+
wppa_opt( 'custom_caption_5' ),
|
1860 |
+
wppa_opt( 'custom_caption_6' ),
|
1861 |
+
wppa_opt( 'custom_caption_7' ),
|
1862 |
+
wppa_opt( 'custom_caption_8' ),
|
1863 |
+
wppa_opt( 'custom_caption_9' ),
|
1864 |
+
);
|
1865 |
+
$types = array( 'text',
|
1866 |
+
'textarea',
|
1867 |
+
'text',
|
1868 |
+
'text',
|
1869 |
+
'text',
|
1870 |
+
'text',
|
1871 |
+
'text',
|
1872 |
+
'text',
|
1873 |
+
'text',
|
1874 |
+
'text',
|
1875 |
+
'text',
|
1876 |
+
'text',
|
1877 |
+
'text',
|
1878 |
+
);
|
1879 |
+
$doit = array( wppa_switch( 'fe_edit_name' ),
|
1880 |
+
wppa_switch( 'fe_edit_desc' ),
|
1881 |
+
wppa_switch( 'fe_edit_tags' ),
|
1882 |
+
wppa_switch( 'custom_edit_0' ),
|
1883 |
+
wppa_switch( 'custom_edit_1' ),
|
1884 |
+
wppa_switch( 'custom_edit_2' ),
|
1885 |
+
wppa_switch( 'custom_edit_3' ),
|
1886 |
+
wppa_switch( 'custom_edit_4' ),
|
1887 |
+
wppa_switch( 'custom_edit_5' ),
|
1888 |
+
wppa_switch( 'custom_edit_6' ),
|
1889 |
+
wppa_switch( 'custom_edit_7' ),
|
1890 |
+
wppa_switch( 'custom_edit_8' ),
|
1891 |
+
wppa_switch( 'custom_edit_9' ),
|
1892 |
+
);
|
1893 |
+
|
1894 |
+
// Open page
|
1895 |
+
echo
|
1896 |
+
'<div' .
|
1897 |
+
' style="width:100%;margin-top:8px;padding:8px;display:block;box-sizing:border-box;background-color:#fff;"' .
|
1898 |
+
// ' class="site-main"' .
|
1899 |
+
// ' role="main"' .
|
1900 |
+
' >' .
|
1901 |
+
'<h3>' .
|
1902 |
+
'<img' .
|
1903 |
+
' style="height:50px;"' .
|
1904 |
+
' src="' . wppa_get_thumb_url( $photo ) . '"' .
|
1905 |
+
' alt="' . $photo . '"' .
|
1906 |
+
' />' .
|
1907 |
+
' ' .
|
1908 |
+
wppa_opt( 'wppa_fe_edit_caption' ) . '</h3>';
|
1909 |
+
|
1910 |
+
// Open form
|
1911 |
+
echo
|
1912 |
+
'<form' .
|
1913 |
+
' >' .
|
1914 |
+
'<input' .
|
1915 |
+
' type="hidden"' .
|
1916 |
+
' id="wppa-nonce"' .
|
1917 |
+
' name="wppa-nonce"' .
|
1918 |
+
' value="' . wp_create_nonce( 'wppa-nonce-' . $photo ) . '"' .
|
1919 |
+
' />';
|
1920 |
+
|
1921 |
+
// Get custom data
|
1922 |
+
$custom = wppa_get_photo_item( $photo, 'custom' );
|
1923 |
+
if ( $custom ) {
|
1924 |
+
$custom_data = unserialize( $custom );
|
1925 |
+
}
|
1926 |
+
else {
|
1927 |
+
$custom_data = array( '', '', '', '', '', '', '', '', '', '' );
|
1928 |
+
}
|
1929 |
+
|
1930 |
+
// Items
|
1931 |
+
foreach ( array_keys( $items ) as $idx ) {
|
1932 |
+
if ( $titles[$idx] && $doit[$idx] ) {
|
1933 |
+
echo
|
1934 |
+
'<h6>' . $titles[$idx] . '</h6>';
|
1935 |
+
|
1936 |
+
if ( wppa_is_int( substr( $items[$idx], -1 ) ) ) {
|
1937 |
+
$value = stripslashes( $custom_data[substr( $items[$idx], -1 )] );
|
1938 |
+
}
|
1939 |
+
else {
|
1940 |
+
$value = wppa_get_photo_item( $photo, $items[$idx] );
|
1941 |
+
if ( $items[$idx] == 'tags' ) {
|
1942 |
+
$value = trim( $value, ',' );
|
1943 |
+
}
|
1944 |
+
}
|
1945 |
+
if ( $types[$idx] == 'text' ) {
|
1946 |
+
echo
|
1947 |
+
'<input' .
|
1948 |
+
' type="text"' .
|
1949 |
+
' style="width:100%;"' .
|
1950 |
+
' id="' . $items[$idx] . '"' .
|
1951 |
+
' name="' . $items[$idx] . '"' .
|
1952 |
+
' value="' . esc_attr( $value ) . '"' .
|
1953 |
+
' />';
|
1954 |
+
}
|
1955 |
+
if ( $types[$idx] == 'textarea' ) {
|
1956 |
+
echo
|
1957 |
+
'<textarea' .
|
1958 |
+
' style="width:100%;"' .
|
1959 |
+
' id="' . $items[$idx] . '"' .
|
1960 |
+
' name="' . $items[$idx] . '"' .
|
1961 |
+
' >' .
|
1962 |
+
esc_textarea( $value ) .
|
1963 |
+
'</textarea>';
|
1964 |
+
}
|
1965 |
+
}
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
// Submit
|
1969 |
+
echo
|
1970 |
+
'<input' .
|
1971 |
+
' type="button"' .
|
1972 |
+
' style="margin-top:8px;margin-right:8px;"' .
|
1973 |
+
' value="' . esc_attr( __( 'Send', 'wp-photo-album-plus' ) ) . '"' .
|
1974 |
+
' onclick="wppaUpdatePhotoNew(' . $photo . ');window.opener.location.reload();window.close();"' .
|
1975 |
+
' />';
|
1976 |
+
|
1977 |
+
// Cancel
|
1978 |
+
echo
|
1979 |
+
'<input' .
|
1980 |
+
' type="button"' .
|
1981 |
+
' style="margin-top:8px;"' .
|
1982 |
+
' value="' . esc_attr( __( 'Cancel', 'wp-photo-album-plus' ) ) . '"' .
|
1983 |
+
' onclick="window.close();"' .
|
1984 |
+
' />';
|
1985 |
+
|
1986 |
+
// Close form
|
1987 |
+
echo
|
1988 |
+
'</form>';
|
1989 |
+
|
1990 |
+
// Close page
|
1991 |
+
echo
|
1992 |
+
'</div>';
|
1993 |
+
|
1994 |
}
|
wppa-photo-files.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-photo-files.php
|
3 |
*
|
4 |
* Functions used to create/manipulate photofiles
|
5 |
-
* Version 6.4.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -302,9 +302,6 @@ global $wpdb;
|
|
302 |
wppa_update_photo( array( 'id' => $id, 'exifdtm' => $exdt ) );
|
303 |
}
|
304 |
|
305 |
-
// Create thumbnail...
|
306 |
-
wppa_create_thumbnail( $id );
|
307 |
-
|
308 |
// Check orientation
|
309 |
wppa_orientate_image( $id, wppa_get_exif_orientation( $file ) );
|
310 |
|
@@ -329,6 +326,9 @@ global $wpdb;
|
|
329 |
// Create stereo images
|
330 |
wppa_create_stereo_images( $id );
|
331 |
|
|
|
|
|
|
|
332 |
// Clear (super)cache
|
333 |
wppa_clear_cache();
|
334 |
return true;
|
2 |
/* wppa-photo-files.php
|
3 |
*
|
4 |
* Functions used to create/manipulate photofiles
|
5 |
+
* Version 6.4.11
|
6 |
*
|
7 |
*/
|
8 |
|
302 |
wppa_update_photo( array( 'id' => $id, 'exifdtm' => $exdt ) );
|
303 |
}
|
304 |
|
|
|
|
|
|
|
305 |
// Check orientation
|
306 |
wppa_orientate_image( $id, wppa_get_exif_orientation( $file ) );
|
307 |
|
326 |
// Create stereo images
|
327 |
wppa_create_stereo_images( $id );
|
328 |
|
329 |
+
// Create thumbnail...
|
330 |
+
wppa_create_thumbnail( $id );
|
331 |
+
|
332 |
// Clear (super)cache
|
333 |
wppa_clear_cache();
|
334 |
return true;
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -31,6 +31,8 @@ global $wppa_tags;
|
|
31 |
//echo $temp['1'].'<br />';
|
32 |
//echo serialize($temp);
|
33 |
|
|
|
|
|
34 |
// Test area
|
35 |
// echo '<!-- Start Test area ---><br />';
|
36 |
|
@@ -2076,7 +2078,7 @@ global $wppa_tags;
|
|
2076 |
|
2077 |
$name = __('Thumbnail audio', 'wp-photo-album-plus');
|
2078 |
$desc = __('Show audio controls on thumbnail displays.', 'wp-photo-album-plus');
|
2079 |
-
$help =
|
2080 |
$slug = 'wppa_thumb_audio';
|
2081 |
$html = wppa_checkbox($slug);
|
2082 |
$clas = 'tt_normal';
|
@@ -2783,16 +2785,19 @@ global $wppa_tags;
|
|
2783 |
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
|
2784 |
|
2785 |
for ( $i = '0'; $i < '10'; $i++ ) {
|
2786 |
-
$name = sprintf(__('Name
|
2787 |
-
$desc = sprintf(__('The caption for field %s and
|
2788 |
-
$help = esc_js(sprintf(__('If you check the box, the value of this field is displayable in photo descriptions at the frontend with keyword w#c%s', 'wp-photo-album-plus'), $i));
|
|
|
2789 |
$slug1 = 'wppa_custom_caption_'.$i;
|
2790 |
$html1 = wppa_input($slug1, '300px');
|
2791 |
$slug2 = 'wppa_custom_visible_'.$i;
|
2792 |
$html2 = wppa_checkbox($slug2);
|
|
|
|
|
2793 |
$clas = 'custfields';
|
2794 |
$tags = 'meta';
|
2795 |
-
wppa_setting(array($slug1,$slug2), '10.'.$i.'a,b', $name, $desc, $html1.$html2, $help, $clas, $tags);
|
2796 |
}
|
2797 |
}
|
2798 |
wppa_setting_subheader( 'K', '1', __( 'Navigation symbols for slideshows and lighbox' , 'wp-photo-album-plus') );
|
@@ -6133,18 +6138,81 @@ global $wppa_tags;
|
|
6133 |
$tags = 'access,system,upload';
|
6134 |
wppa_setting($slug, '1.2', $name, $desc, $html, $help, $clas, $tags);
|
6135 |
|
6136 |
-
$name = __('
|
6137 |
$desc = __('Allow the uploader to edit the photo info', 'wp-photo-album-plus');
|
6138 |
-
$help = esc_js(__('If
|
6139 |
$help .= '\n\n'.esc_js(__('Note: This may be AFTER moderation!!', 'wp-photo-album-plus'));
|
6140 |
$slug = 'wppa_upload_edit';
|
6141 |
-
$
|
|
|
|
|
6142 |
$html2 = '';
|
6143 |
$html = array( $html1, $html2 );
|
6144 |
$clas = '';
|
6145 |
$tags = 'access,system,upload';
|
6146 |
wppa_setting($slug, '2.1', $name, $desc, $html, $help, $clas, $tags);
|
6147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6148 |
$name = __('Uploader Moderate Comment', 'wp-photo-album-plus');
|
6149 |
$desc = __('The owner of the photo can moderate the photos comments.', 'wp-photo-album-plus');
|
6150 |
$help = esc_js(__('This setting requires "Uploader edit" to be enabled also.', 'wp-photo-album-plus'));
|
@@ -6154,7 +6222,7 @@ global $wppa_tags;
|
|
6154 |
$html = array( $html1, $html2 );
|
6155 |
$clas = '';
|
6156 |
$tags = 'access,system,upload,comment';
|
6157 |
-
wppa_setting($slug, '2.
|
6158 |
|
6159 |
$name = __('Upload memory check frontend', 'wp-photo-album-plus');
|
6160 |
$desc = __('Disable uploading photos that are too large.', 'wp-photo-album-plus');
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
31 |
//echo $temp['1'].'<br />';
|
32 |
//echo serialize($temp);
|
33 |
|
34 |
+
//require_once 'wppa-photo-admin-autosave.php';
|
35 |
+
//wppa_fe_edit_new_style(4145);
|
36 |
// Test area
|
37 |
// echo '<!-- Start Test area ---><br />';
|
38 |
|
2078 |
|
2079 |
$name = __('Thumbnail audio', 'wp-photo-album-plus');
|
2080 |
$desc = __('Show audio controls on thumbnail displays.', 'wp-photo-album-plus');
|
2081 |
+
$help = '';
|
2082 |
$slug = 'wppa_thumb_audio';
|
2083 |
$html = wppa_checkbox($slug);
|
2084 |
$clas = 'tt_normal';
|
2785 |
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
|
2786 |
|
2787 |
for ( $i = '0'; $i < '10'; $i++ ) {
|
2788 |
+
$name = sprintf(__('Name, vis, edit %s', 'wp-photo-album-plus'), $i);
|
2789 |
+
$desc = sprintf(__('The caption for field %s, visibility and editability at frontend.', 'wp-photo-album-plus'), $i);
|
2790 |
+
$help = esc_js(sprintf(__('If you check the first box, the value of this field is displayable in photo descriptions at the frontend with keyword w#c%s', 'wp-photo-album-plus'), $i));
|
2791 |
+
$help .= '\n'.esc_js(__('If you check the second box, the value of this field is editable at the frontend new style dialog.', 'wp-photo-album-plus'));
|
2792 |
$slug1 = 'wppa_custom_caption_'.$i;
|
2793 |
$html1 = wppa_input($slug1, '300px');
|
2794 |
$slug2 = 'wppa_custom_visible_'.$i;
|
2795 |
$html2 = wppa_checkbox($slug2);
|
2796 |
+
$slug3 = 'wppa_custom_edit_'.$i;
|
2797 |
+
$html3 = wppa_checkbox($slug3);
|
2798 |
$clas = 'custfields';
|
2799 |
$tags = 'meta';
|
2800 |
+
wppa_setting(array($slug1,$slug2,$slug3), '10.'.$i.'a,b,c', $name, $desc, $html1.$html2.$html3, $help, $clas, $tags);
|
2801 |
}
|
2802 |
}
|
2803 |
wppa_setting_subheader( 'K', '1', __( 'Navigation symbols for slideshows and lighbox' , 'wp-photo-album-plus') );
|
6138 |
$tags = 'access,system,upload';
|
6139 |
wppa_setting($slug, '1.2', $name, $desc, $html, $help, $clas, $tags);
|
6140 |
|
6141 |
+
$name = __('Frontend Edit', 'wp-photo-album-plus');
|
6142 |
$desc = __('Allow the uploader to edit the photo info', 'wp-photo-album-plus');
|
6143 |
+
$help = esc_js(__('If selected, any logged in user who meets the criteria has the capability to edit the photo information.', 'wp-photo-album-plus'));
|
6144 |
$help .= '\n\n'.esc_js(__('Note: This may be AFTER moderation!!', 'wp-photo-album-plus'));
|
6145 |
$slug = 'wppa_upload_edit';
|
6146 |
+
$opts = array( __('--- none ---', 'wp-photo-album-plus'), __('Classic', 'wp-photo-album-plus'), __('New style', 'wp-photo-album-plus'));
|
6147 |
+
$vals = array( 'none', 'classic', 'new' );
|
6148 |
+
$html1 = wppa_select($slug, $opts, $vals);
|
6149 |
$html2 = '';
|
6150 |
$html = array( $html1, $html2 );
|
6151 |
$clas = '';
|
6152 |
$tags = 'access,system,upload';
|
6153 |
wppa_setting($slug, '2.1', $name, $desc, $html, $help, $clas, $tags);
|
6154 |
|
6155 |
+
$name = __('Fe Edit users', 'wp-photo-album-plus');
|
6156 |
+
$desc = __('The criteria the user must meet to edit photo info', 'wp-photo-album-plus');
|
6157 |
+
$help = '';
|
6158 |
+
$slug = 'wppa_upload_edit_users';
|
6159 |
+
$opts = array( __('The uploader', 'wp-photo-album-plus'), __('Username equals photoname', 'wp-photo-album-plus' ) );
|
6160 |
+
$vals = array( 'owner','equalname' );
|
6161 |
+
$html1 = wppa_select($slug, $opts, $vals);
|
6162 |
+
$html2 = '';
|
6163 |
+
$html = array( $html1, $html2 );
|
6164 |
+
$clas = '';
|
6165 |
+
$tags = 'access,system,upload';
|
6166 |
+
wppa_setting($slug, '2.2', $name, $desc, $html, $help, $clas, $tags);
|
6167 |
+
|
6168 |
+
$name = __('Fe Edit Theme CSS', 'wp-photo-album-plus');
|
6169 |
+
$desc = __('The front-end edit photo dialog uses the theme CSS.', 'wp-photo-album-plus');
|
6170 |
+
$help = '';
|
6171 |
+
$slug = 'wppa_upload_edit_theme_css';
|
6172 |
+
$html1 = wppa_checkbox($slug);
|
6173 |
+
$html2 = '';
|
6174 |
+
$html = array( $html1, $html2 );
|
6175 |
+
$clas = '';
|
6176 |
+
$tags = 'layout,system,upload';
|
6177 |
+
wppa_setting($slug, '2.3', $name, $desc, $html, $help, $clas, $tags);
|
6178 |
+
|
6179 |
+
$name = __('Fe Edit New Items', 'wp-photo-album-plus');
|
6180 |
+
$desc = __('The items that are fe editable', 'wp-photo-album-plus');
|
6181 |
+
$help = esc_js(__('See also Table II-J10!', 'wp-photo-album-plus'));
|
6182 |
+
$slug1 = 'wppa_fe_edit_name';
|
6183 |
+
$slug2 = 'wppa_fe_edit_desc';
|
6184 |
+
$slug3 = 'wppa_fe_edit_tags';
|
6185 |
+
$html1 = ' <span style="float:left" >'.__('Name', 'wp-photo-album-plus').':</span>'.wppa_checkbox($slug1);
|
6186 |
+
$html2 = ' <span style="float:left" >'.__('Description', 'wp-photo-album-plus').':</span>'.wppa_checkbox($slug2);
|
6187 |
+
$html3 = ' <span style="float:left" >'.__('Tags', 'wp-photo-album-plus').':</span>'.wppa_checkbox($slug3);
|
6188 |
+
$html9 = '';
|
6189 |
+
$html = array($html1.$html2.$html3,$html9);
|
6190 |
+
$clas = '';
|
6191 |
+
$tags = 'upload';
|
6192 |
+
wppa_setting($slug1, '2.4', $name, $desc, $html, $help, $clas, $tags);
|
6193 |
+
|
6194 |
+
$name = __('Fe Edit Button text', 'wp-photo-album-plus');
|
6195 |
+
$desc = __('The text on the Edit button.', 'wp-photo-album-plus');
|
6196 |
+
$hep = '';
|
6197 |
+
$slug = 'wppa_fe_edit_button';
|
6198 |
+
$html1 = wppa_edit($slug, get_option( $slug ), '300px');
|
6199 |
+
$html2 = '';
|
6200 |
+
$html = array( $html1, $html2 );
|
6201 |
+
$clas= '';
|
6202 |
+
$tags = 'layout,system,upload';
|
6203 |
+
wppa_setting($slug1, '2.5', $name, $desc, $html, $help, $clas, $tags);
|
6204 |
+
|
6205 |
+
$name = __('Fe Edit Dialog caption', 'wp-photo-album-plus');
|
6206 |
+
$desc = __('The text on the header of the popup.', 'wp-photo-album-plus');
|
6207 |
+
$hep = '';
|
6208 |
+
$slug = 'wppa_fe_edit_caption';
|
6209 |
+
$html1 = wppa_edit($slug, get_option( $slug ), '300px');
|
6210 |
+
$html2 = '';
|
6211 |
+
$html = array( $html1, $html2 );
|
6212 |
+
$clas= '';
|
6213 |
+
$tags = 'layout,system,upload';
|
6214 |
+
wppa_setting($slug1, '2.6', $name, $desc, $html, $help, $clas, $tags);
|
6215 |
+
|
6216 |
$name = __('Uploader Moderate Comment', 'wp-photo-album-plus');
|
6217 |
$desc = __('The owner of the photo can moderate the photos comments.', 'wp-photo-album-plus');
|
6218 |
$help = esc_js(__('This setting requires "Uploader edit" to be enabled also.', 'wp-photo-album-plus'));
|
6222 |
$html = array( $html1, $html2 );
|
6223 |
$clas = '';
|
6224 |
$tags = 'access,system,upload,comment';
|
6225 |
+
wppa_setting($slug, '2.9', $name, $desc, $html, $help, $clas, $tags);
|
6226 |
|
6227 |
$name = __('Upload memory check frontend', 'wp-photo-album-plus');
|
6228 |
$desc = __('Disable uploading photos that are too large.', 'wp-photo-album-plus');
|
wppa-setup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -65,7 +65,7 @@ global $silent;
|
|
65 |
cover_type tinytext NOT NULL,
|
66 |
suba_order_by tinytext NOT NULL,
|
67 |
views bigint(20) NOT NULL default '0',
|
68 |
-
cats
|
69 |
scheduledtm tinytext NOT NULL,
|
70 |
crypt tinytext NOT NULL,
|
71 |
PRIMARY KEY (id)
|
@@ -86,7 +86,7 @@ global $silent;
|
|
86 |
timestamp tinytext NOT NULL,
|
87 |
status tinytext NOT NULL,
|
88 |
rating_count bigint(20) NOT NULL default '0',
|
89 |
-
tags
|
90 |
alt tinytext NOT NULL,
|
91 |
filename tinytext NOT NULL,
|
92 |
modified tinytext NOT NULL,
|
@@ -405,10 +405,10 @@ global $silent;
|
|
405 |
|
406 |
if ( $old_rev <= '6408' ) {
|
407 |
if ( get_option( 'wppa_comment_email_required', 'yes' ) ) {
|
408 |
-
update_option( 'wppa_comment_email_required', 'required' );
|
409 |
}
|
410 |
else {
|
411 |
-
update_option( 'wppa_comment_email_required', 'none' );
|
412 |
}
|
413 |
}
|
414 |
|
@@ -416,6 +416,16 @@ global $silent;
|
|
416 |
@ $wpdb->query( "UPDATE `wp_options` SET `autoload` = 'no' WHERE `option_name` LIKE 'wppa_%'");
|
417 |
}
|
418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
}
|
420 |
|
421 |
// Set Defaults
|
@@ -848,24 +858,34 @@ Hide Camera info
|
|
848 |
'wppa_custom_fields' => 'no',
|
849 |
'wppa_custom_caption_0' => '',
|
850 |
'wppa_custom_visible_0' => 'no',
|
|
|
851 |
'wppa_custom_caption_1' => '',
|
852 |
'wppa_custom_visible_1' => 'no',
|
|
|
853 |
'wppa_custom_caption_2' => '',
|
854 |
'wppa_custom_visible_2' => 'no',
|
|
|
855 |
'wppa_custom_caption_3' => '',
|
856 |
'wppa_custom_visible_3' => 'no',
|
|
|
857 |
'wppa_custom_caption_4' => '',
|
858 |
'wppa_custom_visible_4' => 'no',
|
|
|
859 |
'wppa_custom_caption_5' => '',
|
860 |
'wppa_custom_visible_5' => 'no',
|
|
|
861 |
'wppa_custom_caption_6' => '',
|
862 |
'wppa_custom_visible_6' => 'no',
|
|
|
863 |
'wppa_custom_caption_7' => '',
|
864 |
'wppa_custom_visible_7' => 'no',
|
|
|
865 |
'wppa_custom_caption_8' => '',
|
866 |
'wppa_custom_visible_8' => 'no',
|
|
|
867 |
'wppa_custom_caption_9' => '',
|
868 |
'wppa_custom_visible_9' => 'no',
|
|
|
869 |
|
870 |
// Lightbox/slideshow symbols and borders
|
871 |
'wppa_start_symbol_url' => wppa_get_imgdir( 'start.png', 'abs' ),
|
@@ -1201,7 +1221,14 @@ Hide Camera info
|
|
1201 |
'wppa_upload_owner_only' => 'no',
|
1202 |
'wppa_user_album_edit_on' => 'no',
|
1203 |
'wppa_upload_moderate' => 'no',
|
1204 |
-
'wppa_upload_edit' => '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
'wppa_owner_moderate_comment' => 'no',
|
1206 |
'wppa_upload_notify' => 'no',
|
1207 |
'wppa_upload_backend_notify' => 'no',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
65 |
cover_type tinytext NOT NULL,
|
66 |
suba_order_by tinytext NOT NULL,
|
67 |
views bigint(20) NOT NULL default '0',
|
68 |
+
cats text NOT NULL,
|
69 |
scheduledtm tinytext NOT NULL,
|
70 |
crypt tinytext NOT NULL,
|
71 |
PRIMARY KEY (id)
|
86 |
timestamp tinytext NOT NULL,
|
87 |
status tinytext NOT NULL,
|
88 |
rating_count bigint(20) NOT NULL default '0',
|
89 |
+
tags text NOT NULL,
|
90 |
alt tinytext NOT NULL,
|
91 |
filename tinytext NOT NULL,
|
92 |
modified tinytext NOT NULL,
|
405 |
|
406 |
if ( $old_rev <= '6408' ) {
|
407 |
if ( get_option( 'wppa_comment_email_required', 'yes' ) ) {
|
408 |
+
update_option( 'wppa_comment_email_required', 'required', false );
|
409 |
}
|
410 |
else {
|
411 |
+
update_option( 'wppa_comment_email_required', 'none', false );
|
412 |
}
|
413 |
}
|
414 |
|
416 |
@ $wpdb->query( "UPDATE `wp_options` SET `autoload` = 'no' WHERE `option_name` LIKE 'wppa_%'");
|
417 |
}
|
418 |
|
419 |
+
if ( $old_rev <= '6411' ) {
|
420 |
+
$old = get_option( 'wppa_upload_edit', 'no' );
|
421 |
+
if ( $old == 'no' ) {
|
422 |
+
update_option( 'wppa_upload_edit', 'none', false );
|
423 |
+
}
|
424 |
+
if ( $old == 'yes' ) {
|
425 |
+
update_option( 'wppa_upload_edit', 'classic', false );
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
}
|
430 |
|
431 |
// Set Defaults
|
858 |
'wppa_custom_fields' => 'no',
|
859 |
'wppa_custom_caption_0' => '',
|
860 |
'wppa_custom_visible_0' => 'no',
|
861 |
+
'wppa_custom_edit_0' => 'no',
|
862 |
'wppa_custom_caption_1' => '',
|
863 |
'wppa_custom_visible_1' => 'no',
|
864 |
+
'wppa_custom_edit_1' => 'no',
|
865 |
'wppa_custom_caption_2' => '',
|
866 |
'wppa_custom_visible_2' => 'no',
|
867 |
+
'wppa_custom_edit_2' => 'no',
|
868 |
'wppa_custom_caption_3' => '',
|
869 |
'wppa_custom_visible_3' => 'no',
|
870 |
+
'wppa_custom_edit_3' => 'no',
|
871 |
'wppa_custom_caption_4' => '',
|
872 |
'wppa_custom_visible_4' => 'no',
|
873 |
+
'wppa_custom_edit_4' => 'no',
|
874 |
'wppa_custom_caption_5' => '',
|
875 |
'wppa_custom_visible_5' => 'no',
|
876 |
+
'wppa_custom_edit_5' => 'no',
|
877 |
'wppa_custom_caption_6' => '',
|
878 |
'wppa_custom_visible_6' => 'no',
|
879 |
+
'wppa_custom_edit_6' => 'no',
|
880 |
'wppa_custom_caption_7' => '',
|
881 |
'wppa_custom_visible_7' => 'no',
|
882 |
+
'wppa_custom_edit_7' => 'no',
|
883 |
'wppa_custom_caption_8' => '',
|
884 |
'wppa_custom_visible_8' => 'no',
|
885 |
+
'wppa_custom_edit_8' => 'no',
|
886 |
'wppa_custom_caption_9' => '',
|
887 |
'wppa_custom_visible_9' => 'no',
|
888 |
+
'wppa_custom_edit_9' => 'no',
|
889 |
|
890 |
// Lightbox/slideshow symbols and borders
|
891 |
'wppa_start_symbol_url' => wppa_get_imgdir( 'start.png', 'abs' ),
|
1221 |
'wppa_upload_owner_only' => 'no',
|
1222 |
'wppa_user_album_edit_on' => 'no',
|
1223 |
'wppa_upload_moderate' => 'no',
|
1224 |
+
'wppa_upload_edit' => 'none',
|
1225 |
+
'wppa_upload_edit_users' => 'owner',
|
1226 |
+
'wppa_upload_edit_theme_css' => 'no',
|
1227 |
+
'wppa_fe_edit_name' => 'yes',
|
1228 |
+
'wppa_fe_edit_desc' => 'yes',
|
1229 |
+
'wppa_fe_edit_tags' => 'yes',
|
1230 |
+
'wppa_fe_edit_button' => __( 'Edit', 'wp-photo-album-plus' ),
|
1231 |
+
'wppa_fe_edit_caption' => __( 'Edit photo information', 'wp-photo-album-plus' ),
|
1232 |
'wppa_owner_moderate_comment' => 'no',
|
1233 |
'wppa_upload_notify' => 'no',
|
1234 |
'wppa_upload_backend_notify' => 'no',
|
wppa-thumbnails.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
-
* Version 6.4.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -132,7 +132,7 @@ global $wpdb;
|
|
132 |
|
133 |
// Open the image container
|
134 |
$imgcontheight = $com_alt ? $imgheight : max( $imgwidth,$imgheight );
|
135 |
-
if ( ! is_file( $imgsrc ) ) {
|
136 |
$imgcontheight = 2 * wppa_get_audio_control_height();
|
137 |
}
|
138 |
if ( $com_alt ) $framewidth = $imgwidth + '4';
|
@@ -580,54 +580,66 @@ global $wpdb;
|
|
580 |
}
|
581 |
|
582 |
// Delete and Edit links
|
583 |
-
if ( wppa_switch( 'edit_thumb' )
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
|
633 |
// Description
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
+
* Version 6.4.11
|
9 |
*
|
10 |
*/
|
11 |
|
132 |
|
133 |
// Open the image container
|
134 |
$imgcontheight = $com_alt ? $imgheight : max( $imgwidth,$imgheight );
|
135 |
+
if ( ! is_file( $imgsrc ) && ! wppa_is_video( $id ) ) {
|
136 |
$imgcontheight = 2 * wppa_get_audio_control_height();
|
137 |
}
|
138 |
if ( $com_alt ) $framewidth = $imgwidth + '4';
|
580 |
}
|
581 |
|
582 |
// Delete and Edit links
|
583 |
+
if ( wppa_switch( 'edit_thumb' ) ) {
|
584 |
+
|
585 |
+
// Open the div
|
586 |
+
$result .=
|
587 |
+
'<div' .
|
588 |
+
' class="wppa-thumb-text"' .
|
589 |
+
' style="' . __wcs( 'wppa-thumb-text' ) . '"' .
|
590 |
+
' >';
|
591 |
+
|
592 |
+
// The admins choice link
|
593 |
+
if ( wppa_user_is( 'administrator' ) && wppa_switch( 'enable_admins_choice' ) ) {
|
594 |
+
$result .=
|
595 |
+
'<span' .
|
596 |
+
' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
|
597 |
+
' style="color:gray;"' .
|
598 |
+
' >';
|
599 |
+
if ( ! wppa_is_photo_in_zip( $thumb['id'] ) ) {
|
600 |
+
$result .=
|
601 |
+
'<a' .
|
602 |
+
' style="color:blue;cursor:pointer;"' .
|
603 |
+
' onclick="' .
|
604 |
+
esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
|
605 |
+
'wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($thumb['id']).'\', false ); return false;' ).'"' .
|
606 |
+
'>' .
|
607 |
+
__( 'MyChoice' , 'wp-photo-album-plus') .
|
608 |
+
'</a>';
|
609 |
+
}
|
610 |
+
else {
|
611 |
+
$result .= __('Selected', 'wp-photo-album-plus');
|
612 |
+
}
|
613 |
+
$result .=
|
614 |
+
'</span> ';
|
615 |
+
}
|
616 |
+
|
617 |
+
// The delete link
|
618 |
+
if ( wppa_may_user_fe_delete( $id ) ) {
|
619 |
+
$result .=
|
620 |
+
'<a' .
|
621 |
+
' style="color:red;cursor:pointer;"' .
|
622 |
+
' onclick="'.esc_attr( 'if ( confirm( "'.__( 'Are you sure you want to remove this photo?' , 'wp-photo-album-plus').'" ) ) wppaAjaxRemovePhoto( '.wppa( 'mocc' ).', \''.$xid.'\', false ); return false;' ).'"' .
|
623 |
+
' >' .
|
624 |
+
__( 'Delete' , 'wp-photo-album-plus') .
|
625 |
+
'</a>' .
|
626 |
+
' ';
|
627 |
+
}
|
628 |
+
|
629 |
+
// The edit link
|
630 |
+
if ( wppa_may_user_fe_edit( $id ) ) {
|
631 |
+
$result .=
|
632 |
+
'<a' .
|
633 |
+
' style="color:green;cursor:pointer;"' .
|
634 |
+
' onclick="wppaEditPhoto( '.wppa( 'mocc' ).', \''.$xid.'\' ); return false;"' .
|
635 |
+
' >' .
|
636 |
+
__( 'Edit' , 'wp-photo-album-plus') .
|
637 |
+
'</a>';
|
638 |
+
}
|
639 |
+
|
640 |
+
// Close the div
|
641 |
+
$result .=
|
642 |
+
'</div>';
|
643 |
}
|
644 |
|
645 |
// Description
|
wppa-upload-widget.php
CHANGED
@@ -43,13 +43,21 @@ class WppaUploadWidget extends WP_Widget {
|
|
43 |
|
44 |
wppa( 'in_widget', 'upload' );
|
45 |
wppa_bump_mocc();
|
|
|
|
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
$create = wppa_get_user_create_html( $album, wppa_opt( 'widget_width' ), 'widget' );
|
48 |
-
$upload = wppa_get_user_upload_html( $album, wppa_opt( 'widget_width' ), 'widget' );
|
49 |
|
50 |
if ( ! $create && ! $upload ) return; // Nothing to do
|
51 |
|
52 |
-
$text = '<div class="wppa-upload-widget" style="margin-top:2px; margin-left:2px;" >'.$create.$upload.'</div>';
|
53 |
|
54 |
echo $before_widget;
|
55 |
if ( ! empty( $title ) ) { echo $before_title . $title . $after_title; }
|
43 |
|
44 |
wppa( 'in_widget', 'upload' );
|
45 |
wppa_bump_mocc();
|
46 |
+
$mocc = wppa( 'mocc' );
|
47 |
+
$is_responsive = wppa_opt( 'colwidth' ) == 'auto';
|
48 |
|
49 |
+
if ( $is_responsive ) { // Responsive widgetwppaAutoColumnWidth[1] = true;
|
50 |
+
$js = wppa_get_responsive_widget_js_html( $mocc );
|
51 |
+
}
|
52 |
+
else {
|
53 |
+
$js = '';
|
54 |
+
}
|
55 |
$create = wppa_get_user_create_html( $album, wppa_opt( 'widget_width' ), 'widget' );
|
56 |
+
$upload = wppa_get_user_upload_html( $album, wppa_opt( 'widget_width' ), 'widget', $is_responsive );
|
57 |
|
58 |
if ( ! $create && ! $upload ) return; // Nothing to do
|
59 |
|
60 |
+
$text = '<div id="wppa-container-'.$mocc.'" class="wppa-upload-widget" style="margin-top:2px; margin-left:2px;" >'.$js.$create.$upload.'</div>';
|
61 |
|
62 |
echo $before_widget;
|
63 |
if ( ! empty( $title ) ) { echo $before_title . $title . $after_title; }
|
wppa-upload.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload/import pages and functions
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1105,6 +1105,13 @@ global $wppa_session;
|
|
1105 |
if ( xmlhttp.readyState == 4 ) {
|
1106 |
if ( xmlhttp.status!=404 ) {
|
1107 |
var resp = xmlhttp.responseText;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1108 |
if ( resp.indexOf( 'Server' ) != -1 && resp.indexOf( 'Error' ) != -1 ) {
|
1109 |
resp = '<span style="color:red" >Server error</span>';
|
1110 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload/import pages and functions
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
1105 |
if ( xmlhttp.readyState == 4 ) {
|
1106 |
if ( xmlhttp.status!=404 ) {
|
1107 |
var resp = xmlhttp.responseText;
|
1108 |
+
//
|
1109 |
+
if ( resp.length == 0 ) {
|
1110 |
+
jQuery( '#name-'+elm.id ).html('<span style="color:red" >Timeout</span>');
|
1111 |
+
wppaStopAjaxImport();
|
1112 |
+
return;
|
1113 |
+
}
|
1114 |
+
//
|
1115 |
if ( resp.indexOf( 'Server' ) != -1 && resp.indexOf( 'Error' ) != -1 ) {
|
1116 |
resp = '<span style="color:red" >Server error</span>';
|
1117 |
}
|
wppa-users.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -248,5 +248,57 @@ function wppa_is_user_superuser() {
|
|
248 |
if ( in_array( $login, $superlist ) ) {
|
249 |
return true;
|
250 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
return false;
|
252 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
248 |
if ( in_array( $login, $superlist ) ) {
|
249 |
return true;
|
250 |
}
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
|
254 |
+
// See if the current user may edit a given photo
|
255 |
+
function wppa_may_user_fe_edit( $id ) {
|
256 |
+
|
257 |
+
// Feature enabled?
|
258 |
+
if ( wppa_opt( 'upload_edit' ) == 'none' ) return false;
|
259 |
+
|
260 |
+
// Blacklisted?
|
261 |
+
if ( wppa_is_user_blacklisted() ) return false;
|
262 |
+
|
263 |
+
// Superuser?
|
264 |
+
if ( wppa_is_user_superuser() ) return true;
|
265 |
+
|
266 |
+
// Can edit albums?
|
267 |
+
if ( current_user_can( 'wppa_admin' ) ) return true;
|
268 |
+
|
269 |
+
// Test criteria
|
270 |
+
switch( wppa_opt('upload_edit_users') ) {
|
271 |
+
|
272 |
+
case 'owner':
|
273 |
+
if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) return true;
|
274 |
+
break;
|
275 |
+
|
276 |
+
case 'equalname':
|
277 |
+
$name = wppa_get_photo_item( $id, 'name' );
|
278 |
+
if ( strpos( $name, '.' ) !== false ) {
|
279 |
+
$name = wppa_strip_ext( $name );
|
280 |
+
}
|
281 |
+
if ( strcasecmp( $name, wppa_get_user( 'display' ) ) == 0 ) return true;
|
282 |
+
break;
|
283 |
+
}
|
284 |
+
|
285 |
+
return false;
|
286 |
+
}
|
287 |
+
|
288 |
+
// See if the current user may delete a given photo
|
289 |
+
function wppa_may_user_fe_delete( $id ) {
|
290 |
+
|
291 |
+
// If not allowed to edit, also deny deletion
|
292 |
+
if ( ! wppa_may_user_fe_edit( $id ) ) return false;
|
293 |
+
|
294 |
+
// Superuser?
|
295 |
+
if ( wppa_is_user_superuser() ) return true;
|
296 |
+
|
297 |
+
// Can edit albums?
|
298 |
+
if ( current_user_can( 'wppa_admin' ) ) return true;
|
299 |
+
|
300 |
+
// If owner and may edit, may also delete
|
301 |
+
if ( wppa_get_user() == wppa_get_photo_owner( $id ) ) return true;
|
302 |
+
|
303 |
return false;
|
304 |
}
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 6.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -772,6 +772,8 @@ global $wppa_opt;
|
|
772 |
'wppa_ovl_anim',
|
773 |
'wppa_ovl_slide',
|
774 |
'wppa_relative_urls',
|
|
|
|
|
775 |
|
776 |
|
777 |
);
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 6.4.11
|
7 |
*
|
8 |
*/
|
9 |
|
772 |
'wppa_ovl_anim',
|
773 |
'wppa_ovl_slide',
|
774 |
'wppa_relative_urls',
|
775 |
+
'wppa_upload_edit',
|
776 |
+
'wppa_upload_edit_theme_css',
|
777 |
|
778 |
|
779 |
);
|
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: 6.4.
|
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/
|
@@ -29,12 +29,12 @@ global $wpdb;
|
|
29 |
/* when new options are added and when the wppa_setup() routine
|
30 |
/* must be called right after update for any other reason.
|
31 |
*/
|
32 |
-
global $wppa_revno; $wppa_revno = '
|
33 |
|
34 |
/* This is the api interface version number
|
35 |
/* It is incremented at any code change.
|
36 |
*/
|
37 |
-
global $wppa_api_version; $wppa_api_version = '6-4-
|
38 |
|
39 |
/* start timers */
|
40 |
global $wppa_starttime; $wppa_starttime = microtime(true);
|
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: 6.4.11
|
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/
|
29 |
/* when new options are added and when the wppa_setup() routine
|
30 |
/* must be called right after update for any other reason.
|
31 |
*/
|
32 |
+
global $wppa_revno; $wppa_revno = '6411';
|
33 |
|
34 |
/* This is the api interface version number
|
35 |
/* It is incremented at any code change.
|
36 |
*/
|
37 |
+
global $wppa_api_version; $wppa_api_version = '6-4-11-009';
|
38 |
|
39 |
/* start timers */
|
40 |
global $wppa_starttime; $wppa_starttime = microtime(true);
|