Version Description
Download this release
Release Info
Developer | opajaap |
Plugin | ![]() |
Version | 6.6.10 |
Comparing to | |
See all releases |
Code changes from version 6.6.09 to 6.6.10
- js/wppa-admin-scripts.js +8 -2
- js/wppa-ajax-front.js +8 -2
- js/wppa-ajax-front.min.js +3 -2
- js/wppa-slideshow.js +86 -4
- js/wppa-slideshow.min.js +18 -4
- js/wppa.js +26 -11
- js/wppa.min.js +9 -4
- readme.txt +33 -9
- wppa-ajax.php +4 -1
- wppa-album-covers.php +97 -51
- wppa-boxes-html.php +47 -24
- wppa-common-functions.php +7 -1
- wppa-filter.php +16 -2
- wppa-functions.php +56 -30
- wppa-links.php +171 -105
- wppa-non-admin.php +3 -2
- wppa-photo-admin-autosave.php +16 -6
- wppa-settings-autosave.php +87 -24
- wppa-setup.php +18 -5
- wppa-slideshow.php +132 -1
- wppa-styles.php +18 -4
- wppa-thumbnails.php +2 -1
- wppa-utils.php +25 -1
- wppa.php +3 -3
js/wppa-admin-scripts.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
-
/* Version 6.6.
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -170,6 +170,7 @@ function wppaInitSettings() {
|
|
170 |
wppaCheckCheck( 'enable_video', 'wppa-video' );
|
171 |
wppaCheckCheck( 'custom_fields', 'custfields' );
|
172 |
wppaCheckCheck( 'new_mod_label_is_text', 'nmtxt' );
|
|
|
173 |
wppaCheckSmWidgetLink();
|
174 |
|
175 |
var tab = new Array('O','I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII');
|
@@ -1041,9 +1042,14 @@ function wppaAjaxDeletePhoto(photo, bef, aft) {
|
|
1041 |
break;
|
1042 |
case 4:
|
1043 |
if ( xmlhttp.status == 200 ) {
|
|
|
1044 |
var str = wppaTrim(xmlhttp.responseText);
|
1045 |
var ArrValues = str.split("||");
|
1046 |
-
if (ArrValues[0]
|
|
|
|
|
|
|
|
|
1047 |
alert('The server returned unexpected output:\n'+ArrValues[0]);
|
1048 |
}
|
1049 |
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 6.6.10
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
170 |
wppaCheckCheck( 'enable_video', 'wppa-video' );
|
171 |
wppaCheckCheck( 'custom_fields', 'custfields' );
|
172 |
wppaCheckCheck( 'new_mod_label_is_text', 'nmtxt' );
|
173 |
+
wppaCheckCheck( 'coverphoto_responsive', 'cvpr' );
|
174 |
wppaCheckSmWidgetLink();
|
175 |
|
176 |
var tab = new Array('O','I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII');
|
1042 |
break;
|
1043 |
case 4:
|
1044 |
if ( xmlhttp.status == 200 ) {
|
1045 |
+
|
1046 |
var str = wppaTrim(xmlhttp.responseText);
|
1047 |
var ArrValues = str.split("||");
|
1048 |
+
if ( ArrValues[0] == 'ER' ) {
|
1049 |
+
alert(ArrValues[3]);
|
1050 |
+
jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');
|
1051 |
+
}
|
1052 |
+
else if (ArrValues[0] != '') {
|
1053 |
alert('The server returned unexpected output:\n'+ArrValues[0]);
|
1054 |
}
|
1055 |
|
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.6.
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
@@ -235,7 +235,13 @@ function wppaAjaxRemovePhoto( mocc, photo, isslide ) {
|
|
235 |
|
236 |
// Remove failed
|
237 |
else {
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
},
|
241 |
error: function( xhr, status, error ) {
|
3 |
// Contains frontend ajax modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaJsAjaxVersion = '6.6.10';
|
7 |
|
8 |
var wppaRenderAdd = false;
|
9 |
var wppaWaitForCounter = 0;
|
235 |
|
236 |
// Remove failed
|
237 |
else {
|
238 |
+
if ( rtxt[3] ) {
|
239 |
+
alert( rtxt[3] );
|
240 |
+
jQuery( '#wppa-delete-'+photo ).css('text-decoration', 'line-through' );
|
241 |
+
}
|
242 |
+
else {
|
243 |
+
alert( result );
|
244 |
+
}
|
245 |
}
|
246 |
},
|
247 |
error: function( xhr, status, error ) {
|
js/wppa-ajax-front.min.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
|
7 |
-
var wppaJsAjaxVersion='6.6.
|
8 |
wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(addHilite&&_wppaCurIdx[mocc]&&_wppaId[mocc][_wppaCurIdx[mocc]])ajaxurl+='&wppa-hilite='+_wppaId[mocc][_wppaCurIdx[mocc]];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{if(wppaRenderModal){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'32px',});jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery('.ui-button').on('click',function(){_wppaStop(mocc);});}
|
10 |
else{jQuery('#wppa-container-'+mocc).html(result);}}
|
@@ -19,7 +19,8 @@ function wppaAjaxApprovePhoto(photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=w
|
|
19 |
else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApprovePhoto failed. Error = '+error+', status = '+status,'force');},});}
|
20 |
function wppaAjaxRemovePhoto(mocc,photo,isslide){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){rtxt=result.split('||');if(rtxt[0]=='OK'){if(isslide){jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');wppaNext(mocc);}
|
21 |
else{jQuery('.wppa-approve-'+photo).css('display','none');jQuery('.thumbnail-frame-photo-'+photo).css('display','none');}}
|
22 |
-
else{alert(
|
|
|
23 |
function wppaAjaxApproveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');}
|
24 |
else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApproveComment failed. Error = '+error+', status = '+status,'force');}});}
|
25 |
function wppaAjaxRemoveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');jQuery('.wppa-comment-'+comment).css('display','none');}
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
|
7 |
+
var wppaJsAjaxVersion='6.6.10';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor,addHilite){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
|
8 |
wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(addHilite&&_wppaCurIdx[mocc]&&_wppaId[mocc][_wppaCurIdx[mocc]])ajaxurl+='&wppa-hilite='+_wppaId[mocc][_wppaCurIdx[mocc]];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{if(wppaRenderModal){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'32px',});jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery('.ui-button').on('click',function(){_wppaStop(mocc);});}
|
10 |
else{jQuery('#wppa-container-'+mocc).html(result);}}
|
19 |
else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApprovePhoto failed. Error = '+error+', status = '+status,'force');},});}
|
20 |
function wppaAjaxRemovePhoto(mocc,photo,isslide){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){rtxt=result.split('||');if(rtxt[0]=='OK'){if(isslide){jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');wppaNext(mocc);}
|
21 |
else{jQuery('.wppa-approve-'+photo).css('display','none');jQuery('.thumbnail-frame-photo-'+photo).css('display','none');}}
|
22 |
+
else{if(rtxt[3]){alert(rtxt[3]);jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');}
|
23 |
+
else{alert(result);}}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemovePhoto failed. Error = '+error+', status = '+status,'force');}});}
|
24 |
function wppaAjaxApproveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');}
|
25 |
else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApproveComment failed. Error = '+error+', status = '+status,'force');}});}
|
26 |
function wppaAjaxRemoveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');jQuery('.wppa-comment-'+comment).css('display','none');}
|
js/wppa-slideshow.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// Contains slideshow modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
-
var wppaJsSlideshowVersion = '6.6.
|
7 |
|
8 |
// This is an entrypoint to load the slide data
|
9 |
function wppaStoreSlideInfo(
|
@@ -451,9 +451,20 @@ function _wppaNextSlide( mocc, mode ) {
|
|
451 |
jQuery( "#exif-"+mocc ).html( _wppaExifHtml[mocc][_wppaCurIdx[mocc]] );
|
452 |
|
453 |
// Display prev/next
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
|
458 |
// Display Rating
|
459 |
if ( wppaIsMini[mocc] || wppaGetContainerWidth( mocc ) < wppaMiniTreshold ) {
|
@@ -1313,6 +1324,14 @@ function _wppaGotoContinue( mocc ) {
|
|
1313 |
}
|
1314 |
|
1315 |
function _wppaStart( mocc, idx ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1316 |
|
1317 |
if ( idx == -2 ) { // Init at first without my rating
|
1318 |
var i = 0;
|
@@ -1354,8 +1373,57 @@ function _wppaStart( mocc, idx ) {
|
|
1354 |
// wppaReplaceSvg();
|
1355 |
_wppaSetRatingDisplay( mocc );
|
1356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1357 |
|
1358 |
function _wppaStop( mocc ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1359 |
|
1360 |
_wppaSSRuns[mocc] = false;
|
1361 |
jQuery( '#startstop-'+mocc ).html( wppaSvgHtml( 'Play-Button', '1.5em', false, true ) );
|
@@ -1370,6 +1438,20 @@ function _wppaStop( mocc ) {
|
|
1370 |
jQuery( '#bc-pname-'+mocc ).html( _wppaNames[mocc][_wppaCurIdx[mocc]] );
|
1371 |
}
|
1372 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1373 |
|
1374 |
function _wppaSpeed( mocc, faster ) {
|
1375 |
|
3 |
// Contains slideshow modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaJsSlideshowVersion = '6.6.10';
|
7 |
|
8 |
// This is an entrypoint to load the slide data
|
9 |
function wppaStoreSlideInfo(
|
451 |
jQuery( "#exif-"+mocc ).html( _wppaExifHtml[mocc][_wppaCurIdx[mocc]] );
|
452 |
|
453 |
// Display prev/next
|
454 |
+
if ( wppaSlideshowNavigationType == 'icons' ) {
|
455 |
+
jQuery( '#prev-arrow-'+mocc ).html( wppaSvgHtml( 'Prev-Button', '1.5em', false, true ) );
|
456 |
+
jQuery( '#next-arrow-'+mocc ).html( wppaSvgHtml( 'Next-Button', '1.5em', false, true ) );
|
457 |
+
}
|
458 |
+
else {
|
459 |
+
if ( wppaIsMini[mocc] || wppaGetContainerWidth( mocc ) < wppaMiniTreshold ) {
|
460 |
+
jQuery( '#prev-arrow-'+mocc ).html( '« '+wppaPrevP );
|
461 |
+
jQuery( '#next-arrow-'+mocc ).html( wppaNextP+' »' );
|
462 |
+
}
|
463 |
+
else {
|
464 |
+
jQuery( '#prev-arrow-'+mocc ).html( '« '+wppaPreviousPhoto );
|
465 |
+
jQuery( '#next-arrow-'+mocc ).html( wppaNextPhoto+' »' );
|
466 |
+
}
|
467 |
+
}
|
468 |
|
469 |
// Display Rating
|
470 |
if ( wppaIsMini[mocc] || wppaGetContainerWidth( mocc ) < wppaMiniTreshold ) {
|
1324 |
}
|
1325 |
|
1326 |
function _wppaStart( mocc, idx ) {
|
1327 |
+
if ( wppaSlideshowNavigationType == 'icons' ) {
|
1328 |
+
_wppaStartIcons( mocc, idx );
|
1329 |
+
}
|
1330 |
+
else {
|
1331 |
+
_wppaStartText( mocc, idx );
|
1332 |
+
}
|
1333 |
+
}
|
1334 |
+
function _wppaStartIcons( mocc, idx ) {
|
1335 |
|
1336 |
if ( idx == -2 ) { // Init at first without my rating
|
1337 |
var i = 0;
|
1373 |
// wppaReplaceSvg();
|
1374 |
_wppaSetRatingDisplay( mocc );
|
1375 |
}
|
1376 |
+
function _wppaStartText( mocc, idx ) {
|
1377 |
+
|
1378 |
+
if ( idx == -2 ) { // Init at first without my rating
|
1379 |
+
var i = 0;
|
1380 |
+
idx = 0;
|
1381 |
+
_wppaSkipRated[mocc] = true;
|
1382 |
+
if ( _wppaMyr[mocc][i] != 0 ) {
|
1383 |
+
while ( i < _wppaSlides[mocc].length ) {
|
1384 |
+
if ( idx == 0 && _wppaMyr[mocc][i] == 0 ) idx = i;
|
1385 |
+
i++;
|
1386 |
+
}
|
1387 |
+
}
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
if ( idx > -1 ) { // Init still at index idx
|
1391 |
+
jQuery( '#startstop-'+mocc ).html( wppaStart+' '+wppaSlideShow );
|
1392 |
+
jQuery( '#speed0-'+mocc ).css( 'display', 'none' );
|
1393 |
+
jQuery( '#speed1-'+mocc ).css( 'display', 'none' );
|
1394 |
+
_wppaNxtIdx[mocc] = idx;
|
1395 |
+
_wppaCurIdx[mocc] = idx;
|
1396 |
+
_wppaNextSlide( mocc, 0 );
|
1397 |
+
_wppaShowMetaData( mocc, 'show' );
|
1398 |
+
}
|
1399 |
+
else { // idx == -1, start from where you are
|
1400 |
+
_wppaSSRuns[mocc] = true;
|
1401 |
+
_wppaNextSlide( mocc, 0 );
|
1402 |
+
jQuery( '#startstop-'+mocc ).html( wppaStop );
|
1403 |
+
jQuery( '#speed0-'+mocc ).css( 'display', 'inline' );
|
1404 |
+
jQuery( '#speed1-'+mocc ).css( 'display', 'inline' );
|
1405 |
+
_wppaShowMetaData( mocc, 'hide' );
|
1406 |
+
if ( jQuery( '#bc-pname-modal-'+mocc ) ) {
|
1407 |
+
jQuery( '#bc-pname-modal-'+mocc ).html( wppaSlideShow );
|
1408 |
+
}
|
1409 |
+
else {
|
1410 |
+
jQuery( '#bc-pname-'+mocc ).html( wppaSlideShow );
|
1411 |
+
}
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
// Both cases:
|
1415 |
+
_wppaSetRatingDisplay( mocc );
|
1416 |
+
}
|
1417 |
|
1418 |
function _wppaStop( mocc ) {
|
1419 |
+
if ( wppaSlideshowNavigationType == 'icons' ) {
|
1420 |
+
_wppaStopIcons( mocc );
|
1421 |
+
}
|
1422 |
+
else {
|
1423 |
+
_wppaStopText( mocc );
|
1424 |
+
}
|
1425 |
+
}
|
1426 |
+
function _wppaStopIcons( mocc ) {
|
1427 |
|
1428 |
_wppaSSRuns[mocc] = false;
|
1429 |
jQuery( '#startstop-'+mocc ).html( wppaSvgHtml( 'Play-Button', '1.5em', false, true ) );
|
1438 |
jQuery( '#bc-pname-'+mocc ).html( _wppaNames[mocc][_wppaCurIdx[mocc]] );
|
1439 |
}
|
1440 |
}
|
1441 |
+
function _wppaStopText( mocc ) {
|
1442 |
+
|
1443 |
+
_wppaSSRuns[mocc] = false;
|
1444 |
+
jQuery( '#startstop-'+mocc ).html( wppaStart+' '+wppaSlideShow );
|
1445 |
+
jQuery( '#speed0-'+mocc ).css( 'display', 'none' );
|
1446 |
+
jQuery( '#speed1-'+mocc ).css( 'display', 'none' );
|
1447 |
+
_wppaShowMetaData( mocc, 'show' );
|
1448 |
+
if ( jQuery( '#bc-pname-modal-'+mocc ) ) {
|
1449 |
+
jQuery( '#bc-pname-modal-'+mocc ).html( _wppaNames[mocc][_wppaCurIdx[mocc]] );
|
1450 |
+
}
|
1451 |
+
else {
|
1452 |
+
jQuery( '#bc-pname-'+mocc ).html( _wppaNames[mocc][_wppaCurIdx[mocc]] );
|
1453 |
+
}
|
1454 |
+
}
|
1455 |
|
1456 |
function _wppaSpeed( mocc, faster ) {
|
1457 |
|
js/wppa-slideshow.min.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
|
7 |
-
var wppaJsSlideshowVersion='6.6.
|
8 |
cursor='default';if(linkurl!=''){cursor='pointer';}
|
9 |
else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
|
10 |
_wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
|
@@ -52,7 +52,10 @@ else jQuery('#map-canvas-'+mocc).css('display','none');}
|
|
52 |
else jQuery('#map-canvas-'+mocc).css('display','none');}
|
53 |
else jQuery('#map-canvas-'+mocc).css('display','none');jQuery('[id^=wppa-numbar-'+mocc+'-]').css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar});jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive});if(_wppaSlides[mocc].length>wppaNumbarMax){jQuery('[id^=wppa-numbar-'+mocc+'-]').html(' . ');jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).html(' '+(_wppaNxtIdx[mocc]+1)+' ');}
|
54 |
if(_wppaFirst[mocc]){if(_wppaCurIdx[mocc]!=-1){wppaMakeTheSlideHtml(mocc,'0',_wppaCurIdx[mocc]);}
|
55 |
-
wppaMakeTheSlideHtml(mocc,'1',_wppaNxtIdx[mocc]);jQuery("#imagedesc-"+mocc).html(_wppaDsc[mocc][_wppaCurIdx[mocc]]);jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);jQuery('#prev-arrow-'+mocc).html(wppaSvgHtml('Prev-Button','1.5em',false,true));jQuery('#next-arrow-'+mocc).html(wppaSvgHtml('Next-Button','1.5em',false,true));
|
|
|
|
|
|
|
56 |
else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);}}
|
57 |
else{wppaMakeTheSlideHtml(mocc,bg,_wppaNxtIdx[mocc]);}
|
58 |
_wppaLoadSpinner(mocc);_wppaFirst[mocc]=false;_wppaCheckRewind(mocc);wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);setTimeout('_wppaNextSlide_2( '+mocc+' )',10);}
|
@@ -141,12 +144,23 @@ function _wppaGotoRunning(mocc,idx){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoR
|
|
141 |
wppaConsoleLog('GotoRunning '+mocc);_wppaSSRuns[mocc]=false;_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;__wppaOverruleRun=true;_wppaNextSlide(mocc,"manual");_wppaGotoContinue(mocc);}
|
142 |
function _wppaGotoContinue(mocc){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoContinue( '+mocc+' )',10);return;}
|
143 |
setTimeout('_wppaNextSlide( '+mocc+', "reset" )',wppaGetSlideshowTimeout(mocc)+10);}
|
144 |
-
function _wppaStart(mocc,idx){if(
|
|
|
|
|
145 |
if(idx>-1){jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
|
146 |
else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaSvgHtml('Pause-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).show();jQuery('#speed1-'+mocc).show();_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
|
147 |
else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
|
148 |
_wppaSetRatingDisplay(mocc);}
|
149 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
|
151 |
function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
|
152 |
if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
|
7 |
+
var wppaJsSlideshowVersion='6.6.10';function wppaStoreSlideInfo(mocc,id,url,size,width,height,fullname,name,desc,photoid,avgrat,discount,myrat,rateurl,linkurl,linktitle,linktarget,iwtimeout,commenthtml,iptchtml,exifhtml,lbtitle,shareurl,smhtml,ogdsc,hiresurl,videohtml,audiohtml,waittext,imagealt,posterurl){var cursor;desc=wppaRepairScriptTags(desc);if(!_wppaSlides[mocc]||'0'==id){_wppaSlides[mocc]=[];_wppaNames[mocc]=[];_wppaFullNames[mocc]=[];_wppaDsc[mocc]=[];_wppaOgDsc[mocc]=[];_wppaCurIdx[mocc]=-1;_wppaNxtIdx[mocc]=0;if(parseInt(iwtimeout)>0)_wppaTimeOut[mocc]=parseInt(iwtimeout);else _wppaTimeOut[mocc]=wppaSlideShowTimeOut;_wppaSSRuns[mocc]=false;_wppaTP[mocc]=-2;_wppaFg[mocc]=0;_wppaIsBusy[mocc]=false;_wppaFirst[mocc]=true;_wppaId[mocc]=[];_wppaAvg[mocc]=[];_wppaDisc[mocc]=[];_wppaMyr[mocc]=[];_wppaVRU[mocc]=[];_wppaLinkUrl[mocc]=[];_wppaLinkTitle[mocc]=[];_wppaLinkTarget[mocc]=[];_wppaCommentHtml[mocc]=[];_wppaIptcHtml[mocc]=[];_wppaExifHtml[mocc]=[];_wppaUrl[mocc]=[];_wppaSkipRated[mocc]=false;_wppaLbTitle[mocc]=[];_wppaDidGoto[mocc]=false;wppaSlidePause[mocc]=false;_wppaShareUrl[mocc]=[];_wppaShareHtml[mocc]=[];_wppaFilmNoMove[mocc]=false;_wppaHiresUrl[mocc]=[];_wppaIsVideo[mocc]=[];_wppaVideoHtml[mocc]=[];_wppaAudioHtml[mocc]=[];_wppaVideoNatWidth[mocc]=[];_wppaVideoNatHeight[mocc]=[];wppaVideoPlaying[mocc]=false;wppaAudioPlaying[mocc]=false;_wppaWaitTexts[mocc]=[];_wppaImageAlt[mocc]=[];}
|
8 |
cursor='default';if(linkurl!=''){cursor='pointer';}
|
9 |
else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
|
10 |
_wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
|
52 |
else jQuery('#map-canvas-'+mocc).css('display','none');}
|
53 |
else jQuery('#map-canvas-'+mocc).css('display','none');jQuery('[id^=wppa-numbar-'+mocc+'-]').css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar});jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive});if(_wppaSlides[mocc].length>wppaNumbarMax){jQuery('[id^=wppa-numbar-'+mocc+'-]').html(' . ');jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).html(' '+(_wppaNxtIdx[mocc]+1)+' ');}
|
54 |
if(_wppaFirst[mocc]){if(_wppaCurIdx[mocc]!=-1){wppaMakeTheSlideHtml(mocc,'0',_wppaCurIdx[mocc]);}
|
55 |
+
wppaMakeTheSlideHtml(mocc,'1',_wppaNxtIdx[mocc]);jQuery("#imagedesc-"+mocc).html(_wppaDsc[mocc][_wppaCurIdx[mocc]]);jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);if(wppaSlideshowNavigationType=='icons'){jQuery('#prev-arrow-'+mocc).html(wppaSvgHtml('Prev-Button','1.5em',false,true));jQuery('#next-arrow-'+mocc).html(wppaSvgHtml('Next-Button','1.5em',false,true));}
|
56 |
+
else{if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#prev-arrow-'+mocc).html('« '+wppaPrevP);jQuery('#next-arrow-'+mocc).html(wppaNextP+' »');}
|
57 |
+
else{jQuery('#prev-arrow-'+mocc).html('« '+wppaPreviousPhoto);jQuery('#next-arrow-'+mocc).html(wppaNextPhoto+' »');}}
|
58 |
+
if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);}
|
59 |
else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);}}
|
60 |
else{wppaMakeTheSlideHtml(mocc,bg,_wppaNxtIdx[mocc]);}
|
61 |
_wppaLoadSpinner(mocc);_wppaFirst[mocc]=false;_wppaCheckRewind(mocc);wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);setTimeout('_wppaNextSlide_2( '+mocc+' )',10);}
|
144 |
wppaConsoleLog('GotoRunning '+mocc);_wppaSSRuns[mocc]=false;_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;__wppaOverruleRun=true;_wppaNextSlide(mocc,"manual");_wppaGotoContinue(mocc);}
|
145 |
function _wppaGotoContinue(mocc){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoContinue( '+mocc+' )',10);return;}
|
146 |
setTimeout('_wppaNextSlide( '+mocc+', "reset" )',wppaGetSlideshowTimeout(mocc)+10);}
|
147 |
+
function _wppaStart(mocc,idx){if(wppaSlideshowNavigationType=='icons'){_wppaStartIcons(mocc,idx);}
|
148 |
+
else{_wppaStartText(mocc,idx);}}
|
149 |
+
function _wppaStartIcons(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
|
150 |
if(idx>-1){jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
|
151 |
else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaSvgHtml('Pause-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).show();jQuery('#speed1-'+mocc).show();_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
|
152 |
else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
|
153 |
_wppaSetRatingDisplay(mocc);}
|
154 |
+
function _wppaStartText(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
|
155 |
+
if(idx>-1){jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
|
156 |
+
else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaStop);jQuery('#speed0-'+mocc).css('display','inline');jQuery('#speed1-'+mocc).css('display','inline');_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
|
157 |
+
else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
|
158 |
+
_wppaSetRatingDisplay(mocc);}
|
159 |
+
function _wppaStop(mocc){if(wppaSlideshowNavigationType=='icons'){_wppaStopIcons(mocc);}
|
160 |
+
else{_wppaStopText(mocc);}}
|
161 |
+
function _wppaStopIcons(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
|
162 |
+
else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
|
163 |
+
function _wppaStopText(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
|
164 |
else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
|
165 |
function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
|
166 |
if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
|
js/wppa.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
-
var wppaJsVersion = '6.6.
|
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!!
|
@@ -146,6 +146,8 @@ var wppaBoxRadius = 0;
|
|
146 |
var wppaModalQuitImg;
|
147 |
var wppaUploadEdit = 'none';
|
148 |
var wppaPageArg = '';
|
|
|
|
|
149 |
|
150 |
// 'Internal' variables ( private )
|
151 |
var _wppaId = [];
|
@@ -451,8 +453,12 @@ function _wppaDoAutocol( mocc ) {
|
|
451 |
}
|
452 |
|
453 |
// Covers
|
454 |
-
|
455 |
-
|
|
|
|
|
|
|
|
|
456 |
|
457 |
// Multi Column Responsive covers
|
458 |
var exists = jQuery( ".wppa-cover-box-mcr-"+mocc );
|
@@ -476,18 +482,27 @@ function _wppaDoAutocol( mocc ) {
|
|
476 |
}
|
477 |
idx++;
|
478 |
}
|
479 |
-
|
|
|
|
|
|
|
|
|
|
|
480 |
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( 'width',MCRWidth );
|
481 |
}
|
482 |
else { // One cover: full width, 0 covers don't care
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
'
|
|
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
-
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( myCss );
|
491 |
}
|
492 |
|
493 |
// Thumbframes default
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
+
var wppaJsVersion = '6.6.10';
|
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!!
|
146 |
var wppaModalQuitImg;
|
147 |
var wppaUploadEdit = 'none';
|
148 |
var wppaPageArg = '';
|
149 |
+
var wppaSlideshowNavigationType = 'icons';
|
150 |
+
var wppaCoverImageResponsive = [];
|
151 |
|
152 |
// 'Internal' variables ( private )
|
153 |
var _wppaId = [];
|
453 |
}
|
454 |
|
455 |
// Covers
|
456 |
+
if ( wppaCoverImageResponsive[mocc] ) {
|
457 |
+
}
|
458 |
+
else {
|
459 |
+
jQuery( ".wppa-asym-text-frame-"+mocc ).css( 'width',w - wppaTextFrameDelta );
|
460 |
+
jQuery( ".wppa-cover-box-"+mocc ).css( 'width',w );
|
461 |
+
}
|
462 |
|
463 |
// Multi Column Responsive covers
|
464 |
var exists = jQuery( ".wppa-cover-box-mcr-"+mocc );
|
482 |
}
|
483 |
idx++;
|
484 |
}
|
485 |
+
|
486 |
+
if ( wppaCoverImageResponsive[mocc] ) {
|
487 |
+
}
|
488 |
+
else {
|
489 |
+
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',MCRWidth - wppaTextFrameDelta );
|
490 |
+
}
|
491 |
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( 'width',MCRWidth );
|
492 |
}
|
493 |
else { // One cover: full width, 0 covers don't care
|
494 |
+
if ( wppaCoverImageResponsive[mocc] ) {
|
495 |
+
}
|
496 |
+
else {
|
497 |
+
jQuery( ".wppa-asym-text-frame-mcr-"+mocc ).css( 'width',w - wppaTextFrameDelta );
|
498 |
+
var myCss = {
|
499 |
+
// 'width' : w,
|
500 |
+
// 'maxWidth' : w,
|
501 |
+
'marginLeft': '0px',
|
502 |
+
'float' : 'left'
|
503 |
+
}
|
504 |
+
jQuery( ".wppa-cover-box-mcr-"+mocc ).css( myCss );
|
505 |
}
|
|
|
506 |
}
|
507 |
|
508 |
// Thumbframes default
|
js/wppa.min.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
|
6 |
-
var wppaJsVersion='6.6.
|
7 |
if(!autoOnly){_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);}}});}}
|
8 |
wppaReplaceSvg();}
|
9 |
jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
|
@@ -23,11 +23,16 @@ return url;}
|
|
23 |
function wppaGetContainerWidth(mocc){var elm=document.getElementById('wppa-container-'+mocc);var w=0;if(!wppaAutoColumnWidth[mocc])return elm.clientWidth;while(w==0){elm=elm.parentNode;w=jQuery(elm).width();}
|
24 |
return w*wppaAutoColumnFrac[mocc];}
|
25 |
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);if(wppaRenderModal){jQuery(".ui-dialog").css('width',w);jQuery(".ui-dialog").attr('height','auto');}
|
26 |
-
|
|
|
|
|
27 |
idx++;}
|
28 |
-
|
|
|
|
|
|
|
29 |
else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);var myCss={'marginLeft':'0px','float':'left'}
|
30 |
-
jQuery(".wppa-cover-box-mcr-"+mocc).css(myCss);}
|
31 |
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});}}
|
32 |
jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-16);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');}
|
33 |
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('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
|
6 |
+
var wppaJsVersion='6.6.10';var wppaVersion='0';var wppaIsIe=false;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 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 wppaClickToView='';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 wppaBumpClickCount=false;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 wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var wppaRenderModal=false;var wppaModalBgColor='#ffffff';var wppaBoxRadius=0;var wppaModalQuitImg;var wppaUploadEdit='none';var wppaPageArg='';var wppaSlideshowNavigationType='icons';var wppaCoverImageResponsive=[];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 _wppaWaitTexts=[];var _wppaImageAlt=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlAlts;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 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='';var wppaIsMobile=false;var wppaSvgFillcolor='gray';var wppaSvgBgcolor='transparent';var wppaSvgCornerStyle='light';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
|
7 |
if(!autoOnly){_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);}}});}}
|
8 |
wppaReplaceSvg();}
|
9 |
jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
|
23 |
function wppaGetContainerWidth(mocc){var elm=document.getElementById('wppa-container-'+mocc);var w=0;if(!wppaAutoColumnWidth[mocc])return elm.clientWidth;while(w==0){elm=elm.parentNode;w=jQuery(elm).width();}
|
24 |
return w*wppaAutoColumnFrac[mocc];}
|
25 |
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);if(wppaRenderModal){jQuery(".ui-dialog").css('width',w);jQuery(".ui-dialog").attr('height','auto');}
|
26 |
+
if(wppaCoverImageResponsive[mocc]){}
|
27 |
+
else{jQuery(".wppa-asym-text-frame-"+mocc).css('width',w-wppaTextFrameDelta);jQuery(".wppa-cover-box-"+mocc).css('width',w);}
|
28 |
+
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'});}
|
29 |
idx++;}
|
30 |
+
if(wppaCoverImageResponsive[mocc]){}
|
31 |
+
else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',MCRWidth-wppaTextFrameDelta);}
|
32 |
+
jQuery(".wppa-cover-box-mcr-"+mocc).css('width',MCRWidth);}
|
33 |
+
else{if(wppaCoverImageResponsive[mocc]){}
|
34 |
else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);var myCss={'marginLeft':'0px','float':'left'}
|
35 |
+
jQuery(".wppa-cover-box-mcr-"+mocc).css(myCss);}}
|
36 |
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});}}
|
37 |
jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-16);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');}
|
38 |
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('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
|
5 |
-
Version: 6.6.
|
6 |
Stable tag: 6.6.09
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
@@ -161,7 +161,7 @@ If you use indexed search, the tokens must be at least 3 characters in length.
|
|
161 |
|
162 |
= What to do if i get errors during upload or import photos? =
|
163 |
|
164 |
-
* It is always the best to downsize your photos to the Full Size before uploading. It is the fastest and safest way to add photos
|
165 |
Photos that are way too large take unnessesary long time to download, so your visitors will expierience a slow website.
|
166 |
Therefor the photos should not be larger (in terms of pixelsizes) than the largest size you are going to display them on the screen.
|
167 |
WP-photo-album-plus is capable to downsize the photos for you, but very often this fails because of configuration problems.
|
@@ -180,6 +180,30 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
|
|
180 |
|
181 |
See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
= 6.6.09 =
|
184 |
|
185 |
= Bug Fixes =
|
@@ -194,14 +218,14 @@ See for additional information: <a href="http://www.wppa.nl/changelog/" >The doc
|
|
194 |
|
195 |
= Other Changes =
|
196 |
|
197 |
-
* The treecounts system (number of sub-albums, photos, pending and scheduled as well as photo viewcounts)
|
198 |
-
has been re-implemented; data is now stored in the albums table.
|
199 |
-
Viewing admin pages cause immediate recalculation, so admin pages always show correct numbers.
|
200 |
-
On the foreground - to reduce overhead actions that may slow down pageloads for visitors -
|
201 |
-
the updates are done in a background process (cron job) and may result in max 30 seconds delay after upload,
|
202 |
create sub album or viewing fs images.
|
203 |
-
* On some systems it has been shown that the eventhandler for onload is not executed on svg images.
|
204 |
-
To avoid svg navigation icons from not getting the right colors and showing up,
|
205 |
the function wppaReplaceSvg() is now called at various smart moments.
|
206 |
* The album cover text is now wrapped in a div rather than a p to avoid layout problems when Table IV-D8 is set to 'Linebreaks and paragraphs'.
|
207 |
|
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.6.10
|
6 |
Stable tag: 6.6.09
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
161 |
|
162 |
= What to do if i get errors during upload or import photos? =
|
163 |
|
164 |
+
* It is always the best to downsize your photos to the Full Size before uploading. It is the fastest and safest way to add photos to your photo albums.
|
165 |
Photos that are way too large take unnessesary long time to download, so your visitors will expierience a slow website.
|
166 |
Therefor the photos should not be larger (in terms of pixelsizes) than the largest size you are going to display them on the screen.
|
167 |
WP-photo-album-plus is capable to downsize the photos for you, but very often this fails because of configuration problems.
|
180 |
|
181 |
See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
|
182 |
|
183 |
+
= 6.6.10 =
|
184 |
+
|
185 |
+
= Bug Fixes =
|
186 |
+
|
187 |
+
* Under certain circumstances the granted album was not created. Fixed: It is no longer required to have an upload widget on the members page.
|
188 |
+
|
189 |
+
= New Features =
|
190 |
+
|
191 |
+
* New shortcode attribute: alt="...". The alt attrinute may conatin an existing photo id number.
|
192 |
+
In case the shortcode can not be rendered, you used to see the 'placeholder' [WPPA+ Photo display (fsh)].
|
193 |
+
In some circumstances this is not due to a configuration issue, but you can e.g. have plugin AMP installed and AMP applies to the content.
|
194 |
+
When the alt attribute is added to the shortcode, a plain photo will be displayed. If you do not want anything to be displayed (no photo and no errormessage)
|
195 |
+
set the alt attrinbute to none: alt="none". Full shortcode example: [wppa type="slide" album="255" alt="4187"]Any comment[/wppa]
|
196 |
+
|
197 |
+
= Other Changes =
|
198 |
+
|
199 |
+
* It is no longer possible to delete a photo that is explicitly used as a single image in a post or page.
|
200 |
+
* After Blog it! (front-end upload) You will now be redirected to the post you blogged.
|
201 |
+
* Table II-B0: Navigation type. Can be set to one out of: 'Icons', 'Icons on mobile, text on pc' or 'Text'.
|
202 |
+
This makes the old text style coming back for those who really want it.
|
203 |
+
* Table II-H16: Blog it! is now a selectionbox. You can select one out of: disabled, optional and always.
|
204 |
+
This makes it possible to force users to blog their uploads.
|
205 |
+
* You can now have responsive album cover images. Table I-D5.x and I-D6.x
|
206 |
+
|
207 |
= 6.6.09 =
|
208 |
|
209 |
= Bug Fixes =
|
218 |
|
219 |
= Other Changes =
|
220 |
|
221 |
+
* The treecounts system (number of sub-albums, photos, pending and scheduled as well as photo viewcounts)
|
222 |
+
has been re-implemented; data is now stored in the albums table.
|
223 |
+
Viewing admin pages cause immediate recalculation, so admin pages always show correct numbers.
|
224 |
+
On the foreground - to reduce overhead actions that may slow down pageloads for visitors -
|
225 |
+
the updates are done in a background process (cron job) and may result in max 30 seconds delay after upload,
|
226 |
create sub album or viewing fs images.
|
227 |
+
* On some systems it has been shown that the eventhandler for onload is not executed on svg images.
|
228 |
+
To avoid svg navigation icons from not getting the right colors and showing up,
|
229 |
the function wppaReplaceSvg() is now called at various smart moments.
|
230 |
* The album cover text is now wrapped in a div rather than a p to avoid layout problems when Table IV-D8 is set to 'Linebreaks and paragraphs'.
|
231 |
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 6.6.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1960,6 +1960,9 @@ global $wppa_log_file;
|
|
1960 |
case 'wppa_smallsize':
|
1961 |
wppa_ajax_check_range( $value, false, '50', false, __( 'Cover photo size.' , 'wp-photo-album-plus') );
|
1962 |
break;
|
|
|
|
|
|
|
1963 |
case 'wppa_album_page_size':
|
1964 |
wppa_ajax_check_range( $value, false, '0', false, __( 'Album page size.' , 'wp-photo-album-plus') );
|
1965 |
break;
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 6.6.10
|
6 |
*
|
7 |
*/
|
8 |
|
1960 |
case 'wppa_smallsize':
|
1961 |
wppa_ajax_check_range( $value, false, '50', false, __( 'Cover photo size.' , 'wp-photo-album-plus') );
|
1962 |
break;
|
1963 |
+
case 'wppa_smallsize_percentage':
|
1964 |
+
wppa_ajax_check_range( $value, false, '10', '100', __( 'Cover photo size.' , 'wp-photo-album-plus') );
|
1965 |
+
break;
|
1966 |
case 'wppa_album_page_size':
|
1967 |
wppa_ajax_check_range( $value, false, '0', false, __( 'Album page size.' , 'wp-photo-album-plus') );
|
1968 |
break;
|
wppa-album-covers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -826,24 +826,46 @@ global $wpdb;
|
|
826 |
$photoframestyle = 'style="text-align:center; "';
|
827 |
}
|
828 |
else {
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
}
|
848 |
}
|
849 |
|
@@ -904,7 +926,7 @@ global $wpdb;
|
|
904 |
wppa_out(
|
905 |
'<video preload="metadata" class="image wppa-img" id="i-' . $image['id'] . '-' .
|
906 |
wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
|
907 |
-
'"
|
908 |
__wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
|
909 |
$events . ' >' .
|
910 |
wppa_get_video_body( $image['id'] ) . '</video>'
|
@@ -914,7 +936,7 @@ global $wpdb;
|
|
914 |
wppa_out(
|
915 |
'<img class="image wppa-img" id="i-' . $image['id'] . '-' .
|
916 |
wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
|
917 |
-
'" src="' . $src . '"
|
918 |
__wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
|
919 |
$events . ' ' . wppa_get_imgalt( $image['id'] ) . ' />'
|
920 |
);
|
@@ -991,13 +1013,13 @@ global $wpdb;
|
|
991 |
else {
|
992 |
$count = $treecounts['treephotoviews'];
|
993 |
$title = __( 'Number of photo views in this album and its sub-albums', 'wp-photo-album-plus' );
|
994 |
-
}
|
995 |
wppa_out( '<div' .
|
996 |
' class="wppa-album-cover-viewcount"' .
|
997 |
' title="' . esc_attr( $title ) . '"' .
|
998 |
' style="cursor:pointer;"' .
|
999 |
-
' >' .
|
1000 |
-
__( 'Views:', 'wp-photo-album-plus' ) . ' ' . $count .
|
1001 |
'</div>' );
|
1002 |
}
|
1003 |
|
@@ -1014,18 +1036,19 @@ global $wpdb;
|
|
1014 |
return;
|
1015 |
}
|
1016 |
|
1017 |
-
// Find the photo frame style
|
1018 |
-
$photoframestyle = 'style="text-align:center; "';
|
1019 |
-
|
1020 |
// Open the coverphoto frame
|
1021 |
wppa_out(
|
1022 |
-
'<div
|
1023 |
-
|
|
|
|
|
|
|
1024 |
);
|
1025 |
|
1026 |
// Process the images
|
1027 |
$n = count( $images );
|
1028 |
for ( $idx='0'; $idx < $n; $idx++ ) {
|
|
|
1029 |
$image = $images[$idx];
|
1030 |
$src = $srcs[$idx];
|
1031 |
|
@@ -1040,6 +1063,17 @@ global $wpdb;
|
|
1040 |
$imgattr_a = $imgattrs_a[$idx];
|
1041 |
$photolink = $photolinks[$idx];
|
1042 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1043 |
if ( $photolink ) {
|
1044 |
if ( $photolink['is_lightbox'] ) {
|
1045 |
$thumb = $image;
|
@@ -1079,20 +1113,29 @@ global $wpdb;
|
|
1079 |
if ( $thumb['id'] == $image['id'] ) {
|
1080 |
if ( wppa_is_video( $image['id'] ) ) {
|
1081 |
wppa_out( "\n\t\t" .
|
1082 |
-
'<video
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
|
|
|
|
|
|
|
|
|
|
1087 |
);
|
1088 |
}
|
1089 |
else {
|
1090 |
wppa_out( "\n\t\t" .
|
1091 |
-
'<img
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
|
|
|
|
|
|
|
|
1096 |
);
|
1097 |
}
|
1098 |
}
|
@@ -1117,8 +1160,6 @@ global $wpdb;
|
|
1117 |
'<video' .
|
1118 |
' preload="metadata" ' .
|
1119 |
' class="image wppa-img"' .
|
1120 |
-
' width="' . $imgwidth . '"' .
|
1121 |
-
' height="' . $imgheight . '"' .
|
1122 |
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1123 |
' ' . $events .
|
1124 |
' >' .
|
@@ -1133,8 +1174,6 @@ global $wpdb;
|
|
1133 |
' src="' . $src . '"' .
|
1134 |
' ' . wppa_get_imgalt( $image['id'] ) .
|
1135 |
' class="image wppa-img"' .
|
1136 |
-
' width="' . $imgwidth . '"' .
|
1137 |
-
' height="' . $imgheight . '"' .
|
1138 |
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1139 |
' ' . $events .
|
1140 |
' />'
|
@@ -1149,19 +1188,26 @@ global $wpdb;
|
|
1149 |
|
1150 |
// A video?
|
1151 |
if ( wppa_is_video( $image['id'] ) ) {
|
1152 |
-
wppa_out(
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
|
|
|
|
|
|
|
|
1156 |
);
|
1157 |
}
|
1158 |
|
1159 |
// A photo
|
1160 |
else {
|
1161 |
-
wppa_out(
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
|
|
|
|
|
|
1165 |
);
|
1166 |
}
|
1167 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
826 |
$photoframestyle = 'style="text-align:center; "';
|
827 |
}
|
828 |
else {
|
829 |
+
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
830 |
+
$framewidth = wppa_opt( 'smallsize_percentage' );
|
831 |
+
switch ( $photo_pos ) {
|
832 |
+
case 'left':
|
833 |
+
$photoframestyle =
|
834 |
+
'style="float:left;width:' . $framewidth . '%;height:auto;"';
|
835 |
+
break;
|
836 |
+
case 'right':
|
837 |
+
$photoframestyle =
|
838 |
+
'style="float:right;width:' . $framewidth . '%;height:auto;"';
|
839 |
+
break;
|
840 |
+
case 'top':
|
841 |
+
case 'bottom':
|
842 |
+
$photoframestyle = 'style="width:' . $framewidth . '%;height:auto;margin:0 auto;"';
|
843 |
+
break;
|
844 |
+
default:
|
845 |
+
$photoframestyle = '';
|
846 |
+
wppa_dbg_msg( 'Illegal $photo_pos in wppa_the_coverphoto' );
|
847 |
+
}
|
848 |
+
}
|
849 |
+
else {
|
850 |
+
switch ( $photo_pos ) {
|
851 |
+
case 'left':
|
852 |
+
$photoframestyle =
|
853 |
+
'style="float:left; margin-right:5px;width:' . $frmwidth . 'px;"';
|
854 |
+
break;
|
855 |
+
case 'right':
|
856 |
+
$photoframestyle =
|
857 |
+
'style="float:right; margin-left:5px;width:' . $frmwidth . 'px;"';
|
858 |
+
break;
|
859 |
+
case 'top':
|
860 |
+
$photoframestyle = 'style="text-align:center;"';
|
861 |
+
break;
|
862 |
+
case 'bottom':
|
863 |
+
$photoframestyle = 'style="text-align:center;"';
|
864 |
+
break;
|
865 |
+
default:
|
866 |
+
$photoframestyle = '';
|
867 |
+
wppa_dbg_msg( 'Illegal $photo_pos in wppa_the_coverphoto' );
|
868 |
+
}
|
869 |
}
|
870 |
}
|
871 |
|
926 |
wppa_out(
|
927 |
'<video preload="metadata" class="image wppa-img" id="i-' . $image['id'] . '-' .
|
928 |
wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
|
929 |
+
'" style="' .
|
930 |
__wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
|
931 |
$events . ' >' .
|
932 |
wppa_get_video_body( $image['id'] ) . '</video>'
|
936 |
wppa_out(
|
937 |
'<img class="image wppa-img" id="i-' . $image['id'] . '-' .
|
938 |
wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
|
939 |
+
'" src="' . $src . '" style="' .
|
940 |
__wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
|
941 |
$events . ' ' . wppa_get_imgalt( $image['id'] ) . ' />'
|
942 |
);
|
1013 |
else {
|
1014 |
$count = $treecounts['treephotoviews'];
|
1015 |
$title = __( 'Number of photo views in this album and its sub-albums', 'wp-photo-album-plus' );
|
1016 |
+
}
|
1017 |
wppa_out( '<div' .
|
1018 |
' class="wppa-album-cover-viewcount"' .
|
1019 |
' title="' . esc_attr( $title ) . '"' .
|
1020 |
' style="cursor:pointer;"' .
|
1021 |
+
' >' .
|
1022 |
+
__( 'Views:', 'wp-photo-album-plus' ) . ' ' . $count .
|
1023 |
'</div>' );
|
1024 |
}
|
1025 |
|
1036 |
return;
|
1037 |
}
|
1038 |
|
|
|
|
|
|
|
1039 |
// Open the coverphoto frame
|
1040 |
wppa_out(
|
1041 |
+
'<div' .
|
1042 |
+
' id="coverphoto_frame_' . $albumid . '_' . wppa( 'mocc' ) . '"' .
|
1043 |
+
' class="coverphoto-frame"' .
|
1044 |
+
' style="text-align:center; "' .
|
1045 |
+
' >'
|
1046 |
);
|
1047 |
|
1048 |
// Process the images
|
1049 |
$n = count( $images );
|
1050 |
for ( $idx='0'; $idx < $n; $idx++ ) {
|
1051 |
+
|
1052 |
$image = $images[$idx];
|
1053 |
$src = $srcs[$idx];
|
1054 |
|
1063 |
$imgattr_a = $imgattrs_a[$idx];
|
1064 |
$photolink = $photolinks[$idx];
|
1065 |
|
1066 |
+
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
1067 |
+
$width = ( $n == 1 ? wppa_opt( 'smallsize_percentage' ) : wppa_opt( 'smallsize_multi_percentage' ) );
|
1068 |
+
if ( wppa_switch( 'coversize_is_height' ) ) {
|
1069 |
+
$width = $width * ( $imgwidth / $imgheight );
|
1070 |
+
}
|
1071 |
+
elseif ( $imgwidth < $imgheight ) {
|
1072 |
+
$width = $width * ( $imgwidth / $imgheight );
|
1073 |
+
}
|
1074 |
+
$imgattr = 'width:' . $width . '%;height:auto;box-sizing:content-box;';
|
1075 |
+
}
|
1076 |
+
|
1077 |
if ( $photolink ) {
|
1078 |
if ( $photolink['is_lightbox'] ) {
|
1079 |
$thumb = $image;
|
1113 |
if ( $thumb['id'] == $image['id'] ) {
|
1114 |
if ( wppa_is_video( $image['id'] ) ) {
|
1115 |
wppa_out( "\n\t\t" .
|
1116 |
+
'<video' .
|
1117 |
+
' preload="metadata"' .
|
1118 |
+
' class="image wppa-img"' .
|
1119 |
+
' id="i-' . $image['id'] . '-' . wppa( 'mocc' ) . '"' .
|
1120 |
+
' title="' . wppa_zoom_in( $image['id'] ) . '"' .
|
1121 |
+
' style="' . __wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '"' .
|
1122 |
+
' ' . $events .
|
1123 |
+
' >' .
|
1124 |
+
wppa_get_video_body( $image['id'] ) .
|
1125 |
+
'</video>'
|
1126 |
);
|
1127 |
}
|
1128 |
else {
|
1129 |
wppa_out( "\n\t\t" .
|
1130 |
+
'<img' .
|
1131 |
+
' class="image wppa-img"' .
|
1132 |
+
' id="i-' . $image['id'] . '-' . wppa( 'mocc' ) . '"' .
|
1133 |
+
' title="' . wppa_zoom_in( $image['id'] ) . '"' .
|
1134 |
+
' src="' . $src . '"' .
|
1135 |
+
' style="' . __wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '"' .
|
1136 |
+
' ' . $events .
|
1137 |
+
' ' . wppa_get_imgalt( $image['id'] ) .
|
1138 |
+
' />'
|
1139 |
);
|
1140 |
}
|
1141 |
}
|
1160 |
'<video' .
|
1161 |
' preload="metadata" ' .
|
1162 |
' class="image wppa-img"' .
|
|
|
|
|
1163 |
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1164 |
' ' . $events .
|
1165 |
' >' .
|
1174 |
' src="' . $src . '"' .
|
1175 |
' ' . wppa_get_imgalt( $image['id'] ) .
|
1176 |
' class="image wppa-img"' .
|
|
|
|
|
1177 |
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1178 |
' ' . $events .
|
1179 |
' />'
|
1188 |
|
1189 |
// A video?
|
1190 |
if ( wppa_is_video( $image['id'] ) ) {
|
1191 |
+
wppa_out( '<video' .
|
1192 |
+
' preload="metadata"' .
|
1193 |
+
' class="image wppa-img"' .
|
1194 |
+
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1195 |
+
' ' . $events .
|
1196 |
+
' >' .
|
1197 |
+
wppa_get_video_body( $image['id'] ) .
|
1198 |
+
'</video>'
|
1199 |
);
|
1200 |
}
|
1201 |
|
1202 |
// A photo
|
1203 |
else {
|
1204 |
+
wppa_out( '<img' .
|
1205 |
+
' src="' . $src . '"' .
|
1206 |
+
' ' . wppa_get_imgalt( $image['id'] ) .
|
1207 |
+
' class="image wppa-img"' .
|
1208 |
+
' style="' . __wcs( 'wppa-img' ) . $imgattr . '"' .
|
1209 |
+
' ' . $events .
|
1210 |
+
' />'
|
1211 |
);
|
1212 |
}
|
1213 |
}
|
wppa-boxes-html.php
CHANGED
@@ -2685,31 +2685,51 @@ static $albums_granted;
|
|
2685 |
|
2686 |
/* The Blogit section */
|
2687 |
|
2688 |
-
if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) &&
|
2689 |
$result .=
|
2690 |
-
'<div style="margin-top:6px;" >'
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
'
|
2700 |
-
'
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2710 |
'<div' .
|
2711 |
' id="blog-div-'.$yalb.'-'.$mocc.'"' .
|
2712 |
-
' style="display:none;"' .
|
2713 |
' />' .
|
2714 |
'<h6>' .
|
2715 |
__( 'Post title:', 'wp-photo-album-plus' ) .
|
@@ -2759,6 +2779,7 @@ static $albums_granted;
|
|
2759 |
}
|
2760 |
|
2761 |
// The submit button
|
|
|
2762 |
$result .=
|
2763 |
'<div style="height:6px;;clear:both;" ></div>' .
|
2764 |
'<input' .
|
@@ -2767,7 +2788,7 @@ static $albums_granted;
|
|
2767 |
$onclick .
|
2768 |
' style="display:none; margin: 6px 0; float:right;"' .
|
2769 |
' class="wppa-user-submit"' .
|
2770 |
-
' name="wppa-user-submit-'.$yalb.'-'.$mocc.'" value="' .
|
2771 |
' />' .
|
2772 |
'<div style="height:6px;clear:both;"></div>';
|
2773 |
|
@@ -4113,7 +4134,9 @@ global $wpdb;
|
|
4113 |
break;
|
4114 |
|
4115 |
default:
|
4116 |
-
|
|
|
|
|
4117 |
}
|
4118 |
|
4119 |
// Display minicovers
|
2685 |
|
2686 |
/* The Blogit section */
|
2687 |
|
2688 |
+
if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
|
2689 |
$result .=
|
2690 |
+
'<div style="margin-top:6px;" >';
|
2691 |
+
|
2692 |
+
// Use can choose to blog it
|
2693 |
+
if ( wppa_opt( 'blog_it' ) == 'optional' ) {
|
2694 |
+
$result .=
|
2695 |
+
'<input' .
|
2696 |
+
' type="button"' .
|
2697 |
+
' value="' . esc_attr( __( 'Blog it?', 'wp-photo-album-plus' ) ) . '"' .
|
2698 |
+
' onclick="jQuery(\'#wppa-blogit-'.$yalb.'-'.$mocc.'\').trigger(\'click\')"' .
|
2699 |
+
' />' .
|
2700 |
+
' <input' .
|
2701 |
+
' type="checkbox"' .
|
2702 |
+
' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
|
2703 |
+
' name="wppa-blogit"' .
|
2704 |
+
' style="display:none;"' .
|
2705 |
+
' onchange="if ( jQuery(this).attr(\'checked\') ) { ' .
|
2706 |
+
'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'block\'); ' .
|
2707 |
+
'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').attr(\'value\', \'' . esc_js(__( 'Upload and blog', 'wp-photo-album-plus' )) . '\'); ' .
|
2708 |
+
'} ' .
|
2709 |
+
'else { ' .
|
2710 |
+
'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'none\'); ' .
|
2711 |
+
'jQuery(\'#wppa-user-submit-' . $yalb . '-' . $mocc . '\').attr(\'value\', \'' . esc_js(__( 'Upload photo', 'wp-photo-album-plus' )) . '\'); ' .
|
2712 |
+
'} "' .
|
2713 |
+
' />' ;
|
2714 |
+
}
|
2715 |
+
|
2716 |
+
// Always blog
|
2717 |
+
else {
|
2718 |
+
$result .=
|
2719 |
+
'<input' .
|
2720 |
+
' type="checkbox"' .
|
2721 |
+
' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
|
2722 |
+
' name="wppa-blogit"' .
|
2723 |
+
' style="display:none;"' .
|
2724 |
+
' checked="checked"' .
|
2725 |
+
' />';
|
2726 |
+
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
$result .=
|
2730 |
'<div' .
|
2731 |
' id="blog-div-'.$yalb.'-'.$mocc.'"' .
|
2732 |
+
( wppa_opt( 'blog_it' ) == 'optional' ? ' style="display:none;"' : '' ) .
|
2733 |
' />' .
|
2734 |
'<h6>' .
|
2735 |
__( 'Post title:', 'wp-photo-album-plus' ) .
|
2779 |
}
|
2780 |
|
2781 |
// The submit button
|
2782 |
+
$value = wppa_opt( 'blog_it' ) == 'always' ? esc_attr( __( 'Upload and blog', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Upload photo', 'wp-photo-album-plus' ) );
|
2783 |
$result .=
|
2784 |
'<div style="height:6px;;clear:both;" ></div>' .
|
2785 |
'<input' .
|
2788 |
$onclick .
|
2789 |
' style="display:none; margin: 6px 0; float:right;"' .
|
2790 |
' class="wppa-user-submit"' .
|
2791 |
+
' name="wppa-user-submit-'.$yalb.'-'.$mocc.'" value="' . $value . '"' .
|
2792 |
' />' .
|
2793 |
'<div style="height:6px;clear:both;"></div>';
|
2794 |
|
4134 |
break;
|
4135 |
|
4136 |
default:
|
4137 |
+
if ( $calendar_type ) {
|
4138 |
+
wppa_log( 'err', 'Unexpected calender type: ' . $calendar_type . ' found in wppa_get_calendar_html()', true );
|
4139 |
+
}
|
4140 |
}
|
4141 |
|
4142 |
// Display minicovers
|
wppa-common-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
-
* Version 6.6.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1199,6 +1199,12 @@ global $cache_path;
|
|
1199 |
$GLOBALS['quick_cache']->clear_cache();
|
1200 |
}
|
1201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1202 |
// At a setup or update operation
|
1203 |
// Manually remove the content of wp-content/cache/
|
1204 |
if ( $force ) {
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 6.6.10
|
6 |
*
|
7 |
*/
|
8 |
|
1199 |
$GLOBALS['quick_cache']->clear_cache();
|
1200 |
}
|
1201 |
|
1202 |
+
// Comet cache
|
1203 |
+
if ( class_exists( 'comet_cache' ) ) {
|
1204 |
+
comet_cache::clear();
|
1205 |
+
wppa_log('dbg', 'comet_cache cleared');
|
1206 |
+
}
|
1207 |
+
|
1208 |
// At a setup or update operation
|
1209 |
// Manually remove the content of wp-content/cache/
|
1210 |
if ( $force ) {
|
wppa-filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -55,6 +55,7 @@ global $wppa_revno;
|
|
55 |
'landing' => '',
|
56 |
'admin' => '',
|
57 |
'parent' => '',
|
|
|
58 |
), $xatts );
|
59 |
|
60 |
// Init
|
@@ -298,7 +299,20 @@ global $wppa_revno;
|
|
298 |
$result = wppa_albums(); // Get the HTML
|
299 |
}
|
300 |
else {
|
301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
}
|
303 |
|
304 |
// Reset
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
55 |
'landing' => '',
|
56 |
'admin' => '',
|
57 |
'parent' => '',
|
58 |
+
'alt' => '',
|
59 |
), $xatts );
|
60 |
|
61 |
// Init
|
299 |
$result = wppa_albums(); // Get the HTML
|
300 |
}
|
301 |
else {
|
302 |
+
if ( $atts['alt'] ) {
|
303 |
+
if ( wppa_is_int( $atts['alt'] ) && wppa_photo_exists( $atts['alt'] ) ) {
|
304 |
+
$result = '<img src="' . wppa_get_photo_url( $atts['alt'] ) . '" alt="Photo ' . $atts['alt'] . '" />';
|
305 |
+
}
|
306 |
+
elseif ( $atts['alt'] == 'none' ) {
|
307 |
+
$result = '';
|
308 |
+
}
|
309 |
+
else {
|
310 |
+
$result = '<span style="color:red; font-weight:bold; ">[WPPA+ Invalid alt attribute in shortcode: ' . $atts['alt'] . ' (fsh)]</span>';
|
311 |
+
}
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
$result = '<span style="color:blue; font-weight:bold; ">[WPPA+ Photo display (fsh)]</span>'; // Or an indicator
|
315 |
+
}
|
316 |
}
|
317 |
|
318 |
// Reset
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -624,6 +624,11 @@ global $wppa_session;
|
|
624 |
}
|
625 |
}
|
626 |
|
|
|
|
|
|
|
|
|
|
|
627 |
// See if the photo id is a keyword and convert it if possible
|
628 |
if ( wppa( 'single_photo' ) && ! is_numeric( wppa( 'single_photo' ) ) ) {
|
629 |
if ( substr( wppa( 'single_photo' ), 0, 1 ) == '#' ) { // Keyword
|
@@ -2134,6 +2139,7 @@ static $user;
|
|
2134 |
if ( wppa_may_user_fe_delete( $id ) ) {
|
2135 |
$dellink = '
|
2136 |
<input' .
|
|
|
2137 |
' type="button"' .
|
2138 |
' style="float:right; margin-right:6px;"' .
|
2139 |
' onclick="' .
|
@@ -3192,6 +3198,7 @@ global $blog_id;
|
|
3192 |
if ( wppa( 'src_script' ) ) {
|
3193 |
wppa_add_js_page_data( "\n" . wppa( 'src_script' ) );
|
3194 |
}
|
|
|
3195 |
|
3196 |
// Aspect ratio and fullsize
|
3197 |
if ( wppa_in_widget() == 'ss' && is_numeric( wppa( 'in_widget_frame_width' ) ) && wppa( 'in_widget_frame_width' ) > '0' ) {
|
@@ -3661,31 +3668,43 @@ function wppa_get_text_frame_style( $photo_left, $type ) {
|
|
3661 |
elseif ( $type == 'cover' ) {
|
3662 |
$width = wppa_get_cover_width( $type, true );
|
3663 |
$photo_pos = $photo_left;
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3689 |
}
|
3690 |
}
|
3691 |
else wppa_dbg_msg( 'Illegal $type in wppa_get_text_frame_style', 'red' );
|
@@ -4213,8 +4232,10 @@ static $done;
|
|
4213 |
$post = array( 'post_title' => $title, 'post_content' => $post_content, 'post_status' => $status );
|
4214 |
$post = sanitize_post( $post, 'db' );
|
4215 |
|
4216 |
-
$
|
4217 |
-
$
|
|
|
|
|
4218 |
}
|
4219 |
|
4220 |
// ADD POINTS
|
@@ -4231,13 +4252,18 @@ static $done;
|
|
4231 |
|
4232 |
// Blogged?
|
4233 |
if ( $blogged ) {
|
|
|
4234 |
if ( wppa_switch( 'fe_alert' ) ) {
|
4235 |
if ( $status == 'pending' ) {
|
4236 |
wppa_alert( __( 'Your post is awaiting moderation.', 'wp-photo-album-plus' ) );
|
4237 |
}
|
|
|
|
|
|
|
4238 |
}
|
4239 |
-
echo '<script type="text/javascript" >document.location.href=\'' .
|
4240 |
-
|
|
|
4241 |
}
|
4242 |
}
|
4243 |
if ( $fail ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
624 |
}
|
625 |
}
|
626 |
|
627 |
+
// If single album, test if it is a granted parent
|
628 |
+
if ( wppa_is_int( wppa( 'start_album' ) ) && wppa( 'start_album' ) > '0' ) {
|
629 |
+
wppa_grant_albums( wppa( 'start_album' ) );
|
630 |
+
}
|
631 |
+
|
632 |
// See if the photo id is a keyword and convert it if possible
|
633 |
if ( wppa( 'single_photo' ) && ! is_numeric( wppa( 'single_photo' ) ) ) {
|
634 |
if ( substr( wppa( 'single_photo' ), 0, 1 ) == '#' ) { // Keyword
|
2139 |
if ( wppa_may_user_fe_delete( $id ) ) {
|
2140 |
$dellink = '
|
2141 |
<input' .
|
2142 |
+
' id="wppa-delete-' . wppa_encrypt_photo($thumb['id']) . '"' .
|
2143 |
' type="button"' .
|
2144 |
' style="float:right; margin-right:6px;"' .
|
2145 |
' onclick="' .
|
3198 |
if ( wppa( 'src_script' ) ) {
|
3199 |
wppa_add_js_page_data( "\n" . wppa( 'src_script' ) );
|
3200 |
}
|
3201 |
+
wppa_add_js_page_data( "\n" . ( wppa_switch( 'coverphoto_responsive' ) ? 'wppaCoverImageResponsive['.wppa( 'mocc' ).'] = true;' : 'wppaCoverImageResponsive['.wppa( 'mocc' ).'] = false;' ) );
|
3202 |
|
3203 |
// Aspect ratio and fullsize
|
3204 |
if ( wppa_in_widget() == 'ss' && is_numeric( wppa( 'in_widget_frame_width' ) ) && wppa( 'in_widget_frame_width' ) > '0' ) {
|
3668 |
elseif ( $type == 'cover' ) {
|
3669 |
$width = wppa_get_cover_width( $type, true );
|
3670 |
$photo_pos = $photo_left;
|
3671 |
+
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
3672 |
+
$width = 100 - wppa_opt( 'smallsize_percentage' );
|
3673 |
+
if ( $width > 2 ) {
|
3674 |
+
$width -= 2;
|
3675 |
+
}
|
3676 |
+
switch ( $photo_pos ) {
|
3677 |
+
case 'left':
|
3678 |
+
$result = 'style="width:'.$width.'%;float:right;'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3679 |
+
break;
|
3680 |
+
case 'right':
|
3681 |
+
$result = 'style="width:'.$width.'%;float:left;'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3682 |
+
break;
|
3683 |
+
case 'top':
|
3684 |
+
case 'bottom':
|
3685 |
+
$result = 'style="'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3686 |
+
break;
|
3687 |
+
default:
|
3688 |
+
wppa_dbg_msg( 'Illegal $photo_pos in wppa_get_text_frame_style', 'red' );
|
3689 |
+
}
|
3690 |
+
}
|
3691 |
+
else {
|
3692 |
+
switch ( $photo_pos ) {
|
3693 |
+
case 'left':
|
3694 |
+
$width -= wppa_get_textframe_delta();
|
3695 |
+
$result = 'style="width:'.$width.'px; float:right;'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3696 |
+
break;
|
3697 |
+
case 'right':
|
3698 |
+
$width -= wppa_get_textframe_delta();
|
3699 |
+
$result = 'style="width:'.$width.'px; float:left;'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3700 |
+
break;
|
3701 |
+
case 'top':
|
3702 |
+
case 'bottom':
|
3703 |
+
$result = 'style="'.__wcs( 'wppa-cover-text-frame' ).'"';
|
3704 |
+
break;
|
3705 |
+
default:
|
3706 |
+
wppa_dbg_msg( 'Illegal $photo_pos in wppa_get_text_frame_style', 'red' );
|
3707 |
+
}
|
3708 |
}
|
3709 |
}
|
3710 |
else wppa_dbg_msg( 'Illegal $type in wppa_get_text_frame_style', 'red' );
|
4232 |
$post = array( 'post_title' => $title, 'post_content' => $post_content, 'post_status' => $status );
|
4233 |
$post = sanitize_post( $post, 'db' );
|
4234 |
|
4235 |
+
$post_id = wp_insert_post( $post );
|
4236 |
+
if ( $post_id > 0 ) {
|
4237 |
+
$blogged = true;
|
4238 |
+
}
|
4239 |
}
|
4240 |
|
4241 |
// ADD POINTS
|
4252 |
|
4253 |
// Blogged?
|
4254 |
if ( $blogged ) {
|
4255 |
+
|
4256 |
if ( wppa_switch( 'fe_alert' ) ) {
|
4257 |
if ( $status == 'pending' ) {
|
4258 |
wppa_alert( __( 'Your post is awaiting moderation.', 'wp-photo-album-plus' ) );
|
4259 |
}
|
4260 |
+
else {
|
4261 |
+
wppa_alert( __( 'Your post is published.', 'wp-photo-album-plus' ) );
|
4262 |
+
}
|
4263 |
}
|
4264 |
+
echo '<script type="text/javascript" >setTimeout( function() { document.location.href=\'' . get_permalink( $post_id ) . '\'; }, 2000 )</script>';
|
4265 |
+
return;
|
4266 |
+
// wppa_exit();
|
4267 |
}
|
4268 |
}
|
4269 |
if ( $fail ) {
|
wppa-links.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1040,125 +1040,191 @@ function wppa_page_links( $npages = '1', $curpage = '1', $slide = false ) {
|
|
1040 |
}
|
1041 |
|
1042 |
// Doit
|
1043 |
-
$result = "\n" .
|
1044 |
-
'<div' .
|
1045 |
-
' class="wppa-nav-text wppa-box wppa-nav"' .
|
1046 |
-
' style="clear:both;text-align:center;' . __wcs( 'wppa-box' ) . __wcs( 'wppa-nav' ) . '"' .
|
1047 |
-
' >';
|
1048 |
-
|
1049 |
-
$vis = $curpage == '1' ? 'visibility: hidden;' : '';
|
1050 |
-
$result .=
|
1051 |
-
'<div' .
|
1052 |
-
' style="float:left;text-align:left;'.$vis.'"' .
|
1053 |
-
' >';
|
1054 |
-
|
1055 |
-
if ( wppa_switch( 'allow_ajax') ) {
|
1056 |
-
$result .=
|
1057 |
-
'<a' .
|
1058 |
-
' style="cursor:pointer;"' .
|
1059 |
-
' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
|
1060 |
-
' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
|
1061 |
-
' >' .
|
1062 |
-
wppa_get_svghtml( 'Prev-Button', '1.5em' ) .
|
1063 |
-
'</a>';
|
1064 |
-
}
|
1065 |
-
else {
|
1066 |
-
$result .=
|
1067 |
-
'<a' .
|
1068 |
-
' style="cursor:pointer;"' .
|
1069 |
-
' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
|
1070 |
-
' href="' . $link_url . '&wppa-page=' . ( $curpage - 1 ) . '"' .
|
1071 |
-
' >' .
|
1072 |
-
wppa_get_svghtml( 'Prev-Button', '1.5em' ) .
|
1073 |
-
'</a>';
|
1074 |
-
}
|
1075 |
-
$result .=
|
1076 |
-
'</div><!-- #prev-page -->';
|
1077 |
|
1078 |
-
|
1079 |
-
|
|
|
1080 |
'<div' .
|
1081 |
-
'
|
|
|
1082 |
' >';
|
1083 |
-
if ( wppa_switch( 'allow_ajax') ) {
|
1084 |
-
$result .=
|
1085 |
-
'<a' .
|
1086 |
-
' style="cursor:pointer;"' .
|
1087 |
-
' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
|
1088 |
-
' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
|
1089 |
-
' >' .
|
1090 |
-
wppa_get_svghtml( 'Next-Button', '1.5em' ) .
|
1091 |
-
'</a>';
|
1092 |
-
}
|
1093 |
-
else {
|
1094 |
-
$result .=
|
1095 |
-
'<a' .
|
1096 |
-
' style="cursor:pointer;"' .
|
1097 |
-
' href="' . $link_url . '&wppa-page=' . ( $curpage + 1 ) . '"' .
|
1098 |
-
' >' .
|
1099 |
-
wppa_get_svghtml( 'Next-Button', '1.5em' ) .
|
1100 |
-
'</a>';
|
1101 |
-
}
|
1102 |
-
$result .=
|
1103 |
-
'</div><!-- #next-page -->';
|
1104 |
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
if (
|
1112 |
$result .=
|
1113 |
-
'<
|
1114 |
-
'
|
1115 |
-
'
|
|
|
1116 |
' >' .
|
1117 |
-
'
|
1118 |
-
'</
|
1119 |
}
|
1120 |
else {
|
1121 |
$result .=
|
1122 |
-
'<
|
1123 |
-
'
|
1124 |
-
'
|
1125 |
-
'
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1144 |
$result .=
|
1145 |
-
'
|
1146 |
}
|
1147 |
}
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
|
|
1151 |
}
|
1152 |
-
}
|
1153 |
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
|
1159 |
-
//
|
1160 |
-
|
1161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1162 |
}
|
1163 |
|
1164 |
function wppa_album_download_link( $albumid ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
1040 |
}
|
1041 |
|
1042 |
// Doit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1043 |
|
1044 |
+
// Icons
|
1045 |
+
if ( wppa_get_navigation_type() == 'icons' ) {
|
1046 |
+
$result = "\n" .
|
1047 |
'<div' .
|
1048 |
+
' class="wppa-nav-text wppa-box wppa-nav"' .
|
1049 |
+
' style="clear:both;text-align:center;' . __wcs( 'wppa-box' ) . __wcs( 'wppa-nav' ) . '"' .
|
1050 |
' >';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1051 |
|
1052 |
+
$vis = $curpage == '1' ? 'visibility: hidden;' : '';
|
1053 |
+
$result .=
|
1054 |
+
'<div' .
|
1055 |
+
' style="float:left;text-align:left;'.$vis.'"' .
|
1056 |
+
' >';
|
1057 |
+
|
1058 |
+
if ( wppa_switch( 'allow_ajax') ) {
|
1059 |
$result .=
|
1060 |
+
'<a' .
|
1061 |
+
' style="cursor:pointer;"' .
|
1062 |
+
' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
|
1063 |
+
' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
|
1064 |
' >' .
|
1065 |
+
wppa_get_svghtml( 'Prev-Button', '1.5em' ) .
|
1066 |
+
'</a>';
|
1067 |
}
|
1068 |
else {
|
1069 |
$result .=
|
1070 |
+
'<a' .
|
1071 |
+
' style="cursor:pointer;"' .
|
1072 |
+
' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
|
1073 |
+
' href="' . $link_url . '&wppa-page=' . ( $curpage - 1 ) . '"' .
|
1074 |
+
' >' .
|
1075 |
+
wppa_get_svghtml( 'Prev-Button', '1.5em' ) .
|
1076 |
+
'</a>';
|
1077 |
+
}
|
1078 |
+
$result .=
|
1079 |
+
'</div><!-- #prev-page -->';
|
1080 |
+
|
1081 |
+
$vis = $curpage == $npages ? 'visibility: hidden;' : '';
|
1082 |
+
$result .=
|
1083 |
+
'<div' .
|
1084 |
+
' style="float:right;text-align:right;' . $vis . '"' .
|
1085 |
+
' >';
|
1086 |
+
if ( wppa_switch( 'allow_ajax') ) {
|
1087 |
+
$result .=
|
1088 |
+
'<a' .
|
1089 |
+
' style="cursor:pointer;"' .
|
1090 |
+
' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
|
1091 |
+
' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
|
1092 |
+
' >' .
|
1093 |
+
wppa_get_svghtml( 'Next-Button', '1.5em' ) .
|
1094 |
+
'</a>';
|
1095 |
+
}
|
1096 |
+
else {
|
1097 |
+
$result .=
|
1098 |
+
'<a' .
|
1099 |
+
' style="cursor:pointer;"' .
|
1100 |
+
' href="' . $link_url . '&wppa-page=' . ( $curpage + 1 ) . '"' .
|
1101 |
+
' >' .
|
1102 |
+
wppa_get_svghtml( 'Next-Button', '1.5em' ) .
|
1103 |
+
'</a>';
|
1104 |
+
}
|
1105 |
+
$result .=
|
1106 |
+
'</div><!-- #next-page -->';
|
1107 |
+
|
1108 |
+
// The numbered pagelinks ?
|
1109 |
+
if ( wppa_opt( 'pagelinks_max' ) ) {
|
1110 |
+
if ( $from > '1' ) {
|
1111 |
+
$result .= '. . . ';
|
1112 |
+
}
|
1113 |
+
for ( $i = $from; $i <= $to; $i++ ) {
|
1114 |
+
if ( $curpage == $i ) {
|
1115 |
+
$result .=
|
1116 |
+
'<div' .
|
1117 |
+
' class="wppa-mini-box wppa-alt wppa-black"' .
|
1118 |
+
' style="display:inline;text-align:center;' . __wcs( 'wppa-mini-box' ) . __wcs( 'wppa-alt' ) . __wcs( 'wppa-black' ) .' text-decoration:none;cursor:default;font-weight:normal;"' .
|
1119 |
+
' >' .
|
1120 |
+
' ' . $i . ' ' .
|
1121 |
+
'</div>';
|
1122 |
+
}
|
1123 |
+
else {
|
1124 |
+
$result .=
|
1125 |
+
'<div' .
|
1126 |
+
' class="wppa-mini-box wppa-even"' .
|
1127 |
+
' style="display:inline;text-align:center;' . __wcs( 'wppa-mini-box' ) . __wcs( 'wppa-even' ) .'"' .
|
1128 |
+
' >';
|
1129 |
+
if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
|
1130 |
+
$result .=
|
1131 |
+
'<a' .
|
1132 |
+
' style="cursor:pointer;"' .
|
1133 |
+
' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&wppa-page=' . $i ) . '\')"' .
|
1134 |
+
' >' .
|
1135 |
+
' ' . $i . ' ' .
|
1136 |
+
'</a>';
|
1137 |
+
}
|
1138 |
+
else {
|
1139 |
+
$result .=
|
1140 |
+
'<a' .
|
1141 |
+
' style="cursor:pointer;"' .
|
1142 |
+
' href="' . $link_url . '&wppa-page=' . $i . '"' .
|
1143 |
+
' >' .
|
1144 |
+
' ' . $i . ' ' .
|
1145 |
+
'</a>';
|
1146 |
+
}
|
1147 |
+
$result .=
|
1148 |
+
'</div>';
|
1149 |
+
}
|
1150 |
+
}
|
1151 |
+
if ( $to < $npages ) {
|
1152 |
$result .=
|
1153 |
+
' . . .';
|
1154 |
}
|
1155 |
}
|
1156 |
+
|
1157 |
+
// The 3/17 indicator
|
1158 |
+
else {
|
1159 |
+
$result .= $curpage . '/' . $npages;
|
1160 |
}
|
|
|
1161 |
|
1162 |
+
// $result .= '<script>wppaReplaceSvg()</script>';
|
1163 |
+
$result .= '</div><!-- #prevnext-a-' . wppa( 'mocc' ) . ' -->';
|
1164 |
+
wppa_out( $result );
|
1165 |
+
}
|
1166 |
|
1167 |
+
// Text
|
1168 |
+
else {
|
1169 |
+
wppa_out( "\n".'<div class="wppa-nav-text wppa-box wppa-nav" style="clear:both; text-align:center; '.__wcs('wppa-box').__wcs('wppa-nav').'" >' );
|
1170 |
+
|
1171 |
+
$vis = $curpage == '1' ? 'visibility: hidden;' : '';
|
1172 |
+
wppa_out( '<div style="float:left; text-align:left; '.$vis.'">' );
|
1173 |
+
wppa_out( '<span class="wppa-arrow" style="'.__wcs('wppa-arrow').'cursor: default;">« </span>' );
|
1174 |
+
if ( wppa_switch( 'allow_ajax') ) {
|
1175 |
+
wppa_out( '<a style="cursor:pointer;" onclick="wppaDoAjaxRender('.wppa( 'mocc' ).', \''.$ajax_url.'&wppa-page='.($curpage - 1).'\', \''.wppa_convert_to_pretty($link_url.'&wppa-page='.($curpage - 1)).'\')" >'.__('Previous', 'wp-photo-album-plus').'</a>' );
|
1176 |
+
}
|
1177 |
+
else {
|
1178 |
+
wppa_out( '<a style="cursor:pointer;" href="'.$link_url.'&wppa-page='.($curpage - 1).'" >'.__('Previous', 'wp-photo-album-plus').'</a>' );
|
1179 |
+
}
|
1180 |
+
wppa_out( '</div><!-- #prev-page -->' );
|
1181 |
+
|
1182 |
+
$vis = $curpage == $npages ? 'visibility: hidden;' : '';
|
1183 |
+
wppa_out( '<div style="float:right; text-align:right; '.$vis.'">' );
|
1184 |
+
if ( wppa_switch( 'allow_ajax') ) {
|
1185 |
+
wppa_out( '<a style="cursor:pointer;" onclick="wppaDoAjaxRender('.wppa( 'mocc' ).', \''.$ajax_url.'&wppa-page='.($curpage + 1).'\', \''.wppa_convert_to_pretty($link_url.'&wppa-page='.($curpage + 1)).'\')" >'.__('Next', 'wp-photo-album-plus').'</a>' );
|
1186 |
+
}
|
1187 |
+
else {
|
1188 |
+
wppa_out( '<a style="cursor:pointer;" href="'.$link_url.'&wppa-page='.($curpage + 1).'" >'.__('Next', 'wp-photo-album-plus').'</a>' );
|
1189 |
+
}
|
1190 |
+
wppa_out( '<span class="wppa-arrow" style="'.__wcs('wppa-arrow').'cursor: default;"> »</span>' );
|
1191 |
+
wppa_out( '</div><!-- #next-page -->' );
|
1192 |
+
|
1193 |
+
// The numbered pagelinks ?
|
1194 |
+
if ( wppa_opt( 'pagelinks_max' ) ) {
|
1195 |
+
if ($from > '1') {
|
1196 |
+
wppa_out( '. . . ' );
|
1197 |
+
}
|
1198 |
+
for ($i=$from; $i<=$to; $i++) {
|
1199 |
+
if ($curpage == $i) {
|
1200 |
+
wppa_out( '<div class="wppa-mini-box wppa-alt wppa-black" style="display:inline; text-align:center; '.__wcs('wppa-mini-box').__wcs('wppa-alt').__wcs('wppa-black').' text-decoration: none; cursor: default; font-weight:normal; " >' );
|
1201 |
+
wppa_out( ' '.$i.' ' );
|
1202 |
+
wppa_out( '</div>' );
|
1203 |
+
}
|
1204 |
+
else {
|
1205 |
+
wppa_out( '<div class="wppa-mini-box wppa-even" style="display:inline; text-align:center; '.__wcs('wppa-mini-box').__wcs('wppa-even').'" >' );
|
1206 |
+
if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
|
1207 |
+
wppa_out( '<a style="cursor:pointer;" onclick="wppaDoAjaxRender('.wppa( 'mocc' ).', \''.$ajax_url.'&wppa-page='.$i.'\', \''.wppa_convert_to_pretty($link_url.'&wppa-page='.$i).'\')"> '.$i.' </a>' );
|
1208 |
+
}
|
1209 |
+
else {
|
1210 |
+
wppa_out( '<a style="cursor:pointer;" href="'.$link_url.'&wppa-page='.$i.'"> '.$i.' </a>' );
|
1211 |
+
}
|
1212 |
+
wppa_out( '</div>' );
|
1213 |
+
}
|
1214 |
+
}
|
1215 |
+
if ( $to < $npages ) {
|
1216 |
+
wppa_out( ' . . .' );
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
// The 3/17 indicator
|
1221 |
+
else {
|
1222 |
+
wppa_out( $curpage . '/' . $npages );
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
|
1226 |
+
wppa_out( '</div><!-- #prevnext-a-'.wppa( 'mocc' ).' -->' );
|
1227 |
+
}
|
1228 |
}
|
1229 |
|
1230 |
function wppa_album_download_link( $albumid ) {
|
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.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -658,7 +658,7 @@ add_action( 'wp_head', 'wppa_add_page_specific_urls', '99' );
|
|
658 |
function wppa_add_page_specific_urls() {
|
659 |
|
660 |
$result = '
|
661 |
-
<!-- WPPA+ BEGIN Page specific urls -->
|
662 |
<script type="text/javascript">
|
663 |
wppaImageDirectory = "'.wppa_get_imgdir().'";
|
664 |
wppaWppaUrl = "'.wppa_get_wppa_url().'";
|
@@ -666,6 +666,7 @@ function wppa_add_page_specific_urls() {
|
|
666 |
wppaAjaxUrl = "'.( wppa_switch( 'ajax_non_admin' ) ? wppa_url( 'wppa-ajax-front.php' ) : admin_url( 'admin-ajax.php' ) ).'";
|
667 |
wppaUploadUrl = "'.WPPA_UPLOAD_URL.'";
|
668 |
wppaIsIe = '.( wppa_is_ie() ? 'true' : 'false' ).';
|
|
|
669 |
</script>
|
670 |
<!-- WPPA+ END Page specific urls -->';
|
671 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
658 |
function wppa_add_page_specific_urls() {
|
659 |
|
660 |
$result = '
|
661 |
+
<!-- WPPA+ BEGIN Page specific urls and device specific data -->
|
662 |
<script type="text/javascript">
|
663 |
wppaImageDirectory = "'.wppa_get_imgdir().'";
|
664 |
wppaWppaUrl = "'.wppa_get_wppa_url().'";
|
666 |
wppaAjaxUrl = "'.( wppa_switch( 'ajax_non_admin' ) ? wppa_url( 'wppa-ajax-front.php' ) : admin_url( 'admin-ajax.php' ) ).'";
|
667 |
wppaUploadUrl = "'.WPPA_UPLOAD_URL.'";
|
668 |
wppaIsIe = '.( wppa_is_ie() ? 'true' : 'false' ).';
|
669 |
+
wppaSlideshowNavigationType = "' . wppa_get_navigation_type() . '";
|
670 |
</script>
|
671 |
<!-- WPPA+ END Page specific urls -->';
|
672 |
|
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.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2006,11 +2006,21 @@ function wppaTryMove( id, video ) {
|
|
2006 |
<input type="checkbox" name="wppa-bulk-photo[<?php echo $photo['id'] ?>]" class="wppa-bulk-photo" />
|
2007 |
</td>
|
2008 |
<!-- ID and delete link -->
|
2009 |
-
<td><?php
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014 |
</td>
|
2015 |
<!-- Preview -->
|
2016 |
<td style="min-width:240px; text-align:center;" >
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
2006 |
<input type="checkbox" name="wppa-bulk-photo[<?php echo $photo['id'] ?>]" class="wppa-bulk-photo" />
|
2007 |
</td>
|
2008 |
<!-- ID and delete link -->
|
2009 |
+
<td><?php
|
2010 |
+
echo
|
2011 |
+
$photo['id'] .
|
2012 |
+
'<br />' .
|
2013 |
+
'<a' .
|
2014 |
+
' id="wppa-delete-' . $photo['id'] . '"' .
|
2015 |
+
' onclick="if ( jQuery(\'#no-confirm-delete\').attr(\'checked\') == \'checked\' ||
|
2016 |
+
confirm( \'' . esc_js( __( 'Are you sure you want to delete this photo?', 'wp-photo-album-plus' ) ) . '\' ) ) {
|
2017 |
+
jQuery(this).html( \'' . esc_js( __('Deleting...', 'wp-photo-album-plus') ) . '\' );
|
2018 |
+
wppaAjaxDeletePhoto( \'' . $photo['id'] . '\', \'<td colspan=8 >\', \'</td>\' ) }"' .
|
2019 |
+
' style="color:red;font-weight:bold;"' .
|
2020 |
+
' >' .
|
2021 |
+
__( 'Delete', 'wp-photo-album-plus' ) .
|
2022 |
+
'</a>';
|
2023 |
+
?>
|
2024 |
</td>
|
2025 |
<!-- Preview -->
|
2026 |
<td style="min-width:240px; text-align:center;" >
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1134,15 +1134,36 @@ global $wp_version;
|
|
1134 |
$tags = 'cover,album,size,layout';
|
1135 |
wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
|
1136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
$name = __('Coverphoto size', 'wp-photo-album-plus');
|
1138 |
$desc = __('The size of the coverphoto.', 'wp-photo-album-plus');
|
1139 |
$help = esc_js(__('This size applies to the width or height, whichever is the largest.', 'wp-photo-album-plus'));
|
1140 |
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1141 |
$slug = 'wppa_smallsize';
|
1142 |
$html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
|
1143 |
-
$clas = '';
|
1144 |
$tags = 'cover,album,thumb,size';
|
1145 |
-
wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
|
1147 |
$name = __('Coverphoto size multi', 'wp-photo-album-plus');
|
1148 |
$desc = __('The size of coverphotos if more than one.', 'wp-photo-album-plus');
|
@@ -1150,9 +1171,19 @@ global $wp_version;
|
|
1150 |
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1151 |
$slug = 'wppa_smallsize_multi';
|
1152 |
$html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
|
1153 |
-
$clas = '';
|
1154 |
$tags = 'cover,album,thumb,size';
|
1155 |
-
wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
|
1157 |
$name = __('Size is height', 'wp-photo-album-plus');
|
1158 |
$desc = __('The size of the coverphoto is the height of it.', 'wp-photo-album-plus');
|
@@ -1632,6 +1663,22 @@ global $wp_version;
|
|
1632 |
}
|
1633 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related visibility settings' , 'wp-photo-album-plus') );
|
1634 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1635 |
$name = __('Start/stop', 'wp-photo-album-plus');
|
1636 |
$desc = __('Show the Start/Stop slideshow bar.', 'wp-photo-album-plus');
|
1637 |
$help = esc_js(__('If checked: display the start/stop slideshow navigation bar above the full-size images and slideshow', 'wp-photo-album-plus'));
|
@@ -2870,7 +2917,15 @@ global $wp_version;
|
|
2870 |
$desc = __('Enable blogging photos.', 'wp-photo-album-plus');
|
2871 |
$help = esc_js( __('Users need the capability edit_posts to directly blog photos.', 'wp-photo-album-plus'));
|
2872 |
$slug = 'wppa_blog_it';
|
2873 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2874 |
$clas = 'wppa_feup';
|
2875 |
$tags = 'upload';
|
2876 |
wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
|
@@ -2917,15 +2972,6 @@ global $wp_version;
|
|
2917 |
$tags = 'thumb,widget,size,layout';
|
2918 |
wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
|
2919 |
|
2920 |
-
$name = __('Arrow color', 'wp-photo-album-plus');
|
2921 |
-
$desc = __('Left/right browsing arrow color.', 'wp-photo-album-plus');
|
2922 |
-
$help = esc_js(__('Enter the color of the filmstrip navigation arrows.', 'wp-photo-album-plus'));
|
2923 |
-
$slug = 'wppa_arrow_color';
|
2924 |
-
$html = wppa_input($slug, '70px', '', '');
|
2925 |
-
$clas = '';
|
2926 |
-
$tags = 'slide,layout';
|
2927 |
-
wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
|
2928 |
-
|
2929 |
$name = __('Owner on new line', 'wp-photo-album-plus');
|
2930 |
$desc = __('Place the (owner) text on a new line.', 'wp-photo-album-plus');
|
2931 |
$help = '';
|
@@ -2996,7 +3042,7 @@ global $wp_version;
|
|
2996 |
$vals = array('none', 'light', 'medium', 'heavy');
|
2997 |
$html = wppa_select($slug, $opts, $vals);
|
2998 |
$clas = '';
|
2999 |
-
$tags = 'layout';
|
3000 |
wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
|
3001 |
|
3002 |
?>
|
@@ -3050,7 +3096,7 @@ global $wp_version;
|
|
3050 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3051 |
$html = array($html1, $html2);
|
3052 |
$clas = '';
|
3053 |
-
$tags = 'slide,layout';
|
3054 |
wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
|
3055 |
|
3056 |
$name = __('SlideImg', 'wp-photo-album-plus');
|
@@ -3172,7 +3218,7 @@ global $wp_version;
|
|
3172 |
$tags = 'slide,layout';
|
3173 |
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
|
3174 |
}
|
3175 |
-
wppa_setting_subheader( 'B', '4', __('Other backgrounds' , 'wp-photo-album-plus') );
|
3176 |
{
|
3177 |
$name = __('Even', 'wp-photo-album-plus');
|
3178 |
$desc = __('Even background.', 'wp-photo-album-plus');
|
@@ -3348,6 +3394,7 @@ global $wp_version;
|
|
3348 |
$help = esc_js(__('Recommended color: your theme background color.', 'wp-photo-album-plus'));
|
3349 |
$slug1 = 'wppa_bgcolor_modal';
|
3350 |
$slug2 = 'wppa_bcolor_modal';
|
|
|
3351 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3352 |
$html2 = '</td><td>'; // wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3353 |
$html = array($html1, $html2);
|
@@ -3360,11 +3407,12 @@ global $wp_version;
|
|
3360 |
$help = '';
|
3361 |
$slug1 = 'wppa_svg_bg_color';
|
3362 |
$slug2 = 'wppa_svg_color';
|
|
|
3363 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3364 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3365 |
$html = array($html1, $html2);
|
3366 |
-
$clas = '';
|
3367 |
-
$tags = 'layout';
|
3368 |
wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
|
3369 |
|
3370 |
$name = __('Navigation symbols Lightbox', 'wp-photo-album-plus');
|
@@ -3372,12 +3420,27 @@ global $wp_version;
|
|
3372 |
$help = '';
|
3373 |
$slug1 = 'wppa_ovl_svg_bg_color';
|
3374 |
$slug2 = 'wppa_ovl_svg_color';
|
|
|
3375 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3376 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3377 |
$html = array($html1, $html2);
|
3378 |
-
$clas = '';
|
3379 |
-
$tags = 'layout';
|
3380 |
wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3381 |
}
|
3382 |
?>
|
3383 |
</tbody>
|
@@ -4939,7 +5002,7 @@ global $wp_version;
|
|
4939 |
$html4 = wppa_select($slug4, $options, $values);
|
4940 |
$html = array($html1, $html2, $html3, $html4);
|
4941 |
$clas = '';
|
4942 |
-
$tags = 'layout,slide';
|
4943 |
wppa_setting($slug, '7a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
4944 |
|
4945 |
$name = __('Numbar Active', 'wp-photo-album-plus');
|
@@ -4956,7 +5019,7 @@ global $wp_version;
|
|
4956 |
$html4 = wppa_select($slug4, $options, $values);
|
4957 |
$html = array($html1, $html2, $html3, $html4);
|
4958 |
$clas = '';
|
4959 |
-
$tags = 'layout,slide';
|
4960 |
wppa_setting($slug, '8a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
4961 |
|
4962 |
$name = __('Lightbox', 'wp-photo-album-plus');
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
1134 |
$tags = 'cover,album,size,layout';
|
1135 |
wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
|
1136 |
|
1137 |
+
$name = __('Coverphoto responsive', 'wp-photo-album-plus');
|
1138 |
+
$desc = __('Check this box if you want a responsive coverphoto.', 'wp-photo-album-plus');
|
1139 |
+
$help = '';
|
1140 |
+
$slug = 'wppa_coverphoto_responsive';
|
1141 |
+
$clas = 'cvpr';
|
1142 |
+
$onch = 'wppaCheckCheck(\'coverphoto_responsive\',\''.$clas.'\')';
|
1143 |
+
$html = wppa_checkbox($slug, $onch);
|
1144 |
+
$clas = '';
|
1145 |
+
$tags = 'cover,album,thumb,size';
|
1146 |
+
wppa_setting($slug, '5.0', $name, $desc, $html, $help, $clas, $tags);
|
1147 |
+
|
1148 |
$name = __('Coverphoto size', 'wp-photo-album-plus');
|
1149 |
$desc = __('The size of the coverphoto.', 'wp-photo-album-plus');
|
1150 |
$help = esc_js(__('This size applies to the width or height, whichever is the largest.', 'wp-photo-album-plus'));
|
1151 |
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1152 |
$slug = 'wppa_smallsize';
|
1153 |
$html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
|
1154 |
+
$clas = '-cvpr';
|
1155 |
$tags = 'cover,album,thumb,size';
|
1156 |
+
wppa_setting($slug, '5.1a', $name, $desc, $html, $help, $clas, $tags);
|
1157 |
+
|
1158 |
+
$name = __('Coverphoto size', 'wp-photo-album-plus');
|
1159 |
+
$desc = __('The size of the coverphoto.', 'wp-photo-album-plus');
|
1160 |
+
$help = esc_js(__('This size applies to the width or height, whichever is the largest.', 'wp-photo-album-plus'));
|
1161 |
+
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1162 |
+
$slug = 'wppa_smallsize_percentage';
|
1163 |
+
$html = wppa_input($slug, '40px', '', __('percent', 'wp-photo-album-plus'));
|
1164 |
+
$clas = 'cvpr';
|
1165 |
+
$tags = 'cover,album,thumb,size';
|
1166 |
+
wppa_setting($slug, '5.1b', $name, $desc, $html, $help, $clas, $tags);
|
1167 |
|
1168 |
$name = __('Coverphoto size multi', 'wp-photo-album-plus');
|
1169 |
$desc = __('The size of coverphotos if more than one.', 'wp-photo-album-plus');
|
1171 |
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1172 |
$slug = 'wppa_smallsize_multi';
|
1173 |
$html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
|
1174 |
+
$clas = '-cvpr';
|
1175 |
$tags = 'cover,album,thumb,size';
|
1176 |
+
wppa_setting($slug, '6.1a', $name, $desc, $html, $help, $clas, $tags);
|
1177 |
+
|
1178 |
+
$name = __('Coverphoto size multi', 'wp-photo-album-plus');
|
1179 |
+
$desc = __('The size of coverphotos if more than one.', 'wp-photo-album-plus');
|
1180 |
+
$help = esc_js(__('This size applies to the width or height, whichever is the largest.', 'wp-photo-album-plus'));
|
1181 |
+
$help .= '\n'.esc_js(__('Changing the coverphoto size may result in all thumbnails being regenerated. this may take a while.', 'wp-photo-album-plus'));
|
1182 |
+
$slug = 'wppa_smallsize_multi_percentage';
|
1183 |
+
$html = wppa_input($slug, '40px', '', __('percent', 'wp-photo-album-plus'));
|
1184 |
+
$clas = 'cvpr';
|
1185 |
+
$tags = 'cover,album,thumb,size';
|
1186 |
+
wppa_setting($slug, '6.1b', $name, $desc, $html, $help, $clas, $tags);
|
1187 |
|
1188 |
$name = __('Size is height', 'wp-photo-album-plus');
|
1189 |
$desc = __('The size of the coverphoto is the height of it.', 'wp-photo-album-plus');
|
1663 |
}
|
1664 |
wppa_setting_subheader( 'B', '1', __( 'Slideshow related visibility settings' , 'wp-photo-album-plus') );
|
1665 |
{
|
1666 |
+
$name = __('Navigation type', 'wp-photo-album-plus');
|
1667 |
+
$desc = __('Select the type of navigation you want.', 'wp-photo-album-plus');
|
1668 |
+
$help = '';
|
1669 |
+
$slug = 'wppa_navigation_type';
|
1670 |
+
$opts = array( __('Icons', 'wp-photo-album-plus'),
|
1671 |
+
__('Icons on mobile, text on pc', 'wp-photo-album-plus'),
|
1672 |
+
__('Text', 'wp-photo-album-plus'),
|
1673 |
+
);
|
1674 |
+
$vals = array( 'icons',
|
1675 |
+
'iconsmobile',
|
1676 |
+
'text',
|
1677 |
+
);
|
1678 |
+
$html = wppa_select($slug, $opts, $vals);
|
1679 |
+
$tags = 'slide,navi';
|
1680 |
+
wppa_setting($slug, '0', $name, $desc, $html, $help, $clas, $tags);
|
1681 |
+
|
1682 |
$name = __('Start/stop', 'wp-photo-album-plus');
|
1683 |
$desc = __('Show the Start/Stop slideshow bar.', 'wp-photo-album-plus');
|
1684 |
$help = esc_js(__('If checked: display the start/stop slideshow navigation bar above the full-size images and slideshow', 'wp-photo-album-plus'));
|
2917 |
$desc = __('Enable blogging photos.', 'wp-photo-album-plus');
|
2918 |
$help = esc_js( __('Users need the capability edit_posts to directly blog photos.', 'wp-photo-album-plus'));
|
2919 |
$slug = 'wppa_blog_it';
|
2920 |
+
$opts = array( __('disabled', 'wp-photo-album-plus'),
|
2921 |
+
__('optional', 'wp-photo-album-plus'),
|
2922 |
+
__('always', 'wp-photo-album-plus'),
|
2923 |
+
);
|
2924 |
+
$vals = array( '-none-',
|
2925 |
+
'optional',
|
2926 |
+
'always',
|
2927 |
+
);
|
2928 |
+
$html = wppa_select($slug, $opts, $vals);
|
2929 |
$clas = 'wppa_feup';
|
2930 |
$tags = 'upload';
|
2931 |
wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
|
2972 |
$tags = 'thumb,widget,size,layout';
|
2973 |
wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
|
2974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2975 |
$name = __('Owner on new line', 'wp-photo-album-plus');
|
2976 |
$desc = __('Place the (owner) text on a new line.', 'wp-photo-album-plus');
|
2977 |
$help = '';
|
3042 |
$vals = array('none', 'light', 'medium', 'heavy');
|
3043 |
$html = wppa_select($slug, $opts, $vals);
|
3044 |
$clas = '';
|
3045 |
+
$tags = 'layout,navi';
|
3046 |
wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
|
3047 |
|
3048 |
?>
|
3096 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3097 |
$html = array($html1, $html2);
|
3098 |
$clas = '';
|
3099 |
+
$tags = 'slide,layout,navi';
|
3100 |
wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
|
3101 |
|
3102 |
$name = __('SlideImg', 'wp-photo-album-plus');
|
3218 |
$tags = 'slide,layout';
|
3219 |
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
|
3220 |
}
|
3221 |
+
wppa_setting_subheader( 'B', '4', __('Other backgrounds and colors' , 'wp-photo-album-plus') );
|
3222 |
{
|
3223 |
$name = __('Even', 'wp-photo-album-plus');
|
3224 |
$desc = __('Even background.', 'wp-photo-album-plus');
|
3394 |
$help = esc_js(__('Recommended color: your theme background color.', 'wp-photo-album-plus'));
|
3395 |
$slug1 = 'wppa_bgcolor_modal';
|
3396 |
$slug2 = 'wppa_bcolor_modal';
|
3397 |
+
$slug = array($slug1, $slug2);
|
3398 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3399 |
$html2 = '</td><td>'; // wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3400 |
$html = array($html1, $html2);
|
3407 |
$help = '';
|
3408 |
$slug1 = 'wppa_svg_bg_color';
|
3409 |
$slug2 = 'wppa_svg_color';
|
3410 |
+
$slug = array($slug1, $slug2);
|
3411 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3412 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3413 |
$html = array($html1, $html2);
|
3414 |
+
$clas = 'svg';
|
3415 |
+
$tags = 'layout,navi';
|
3416 |
wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
|
3417 |
|
3418 |
$name = __('Navigation symbols Lightbox', 'wp-photo-album-plus');
|
3420 |
$help = '';
|
3421 |
$slug1 = 'wppa_ovl_svg_bg_color';
|
3422 |
$slug2 = 'wppa_ovl_svg_color';
|
3423 |
+
$slug = array($slug1, $slug2);
|
3424 |
$html1 = wppa_input($slug1, '100px', '', '', "checkColor('".$slug1."')") . '</td><td>' . wppa_color_box($slug1);
|
3425 |
$html2 = wppa_input($slug2, '100px', '', '', "checkColor('".$slug2."')") . '</td><td>' . wppa_color_box($slug2);
|
3426 |
$html = array($html1, $html2);
|
3427 |
+
$clas = 'svg';
|
3428 |
+
$tags = 'layout,navi';
|
3429 |
wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
|
3430 |
+
/*
|
3431 |
+
$name = __('Arrow color', 'wp-photo-album-plus');
|
3432 |
+
$desc = __('Left/right browsing arrow color.', 'wp-photo-album-plus');
|
3433 |
+
$help = esc_js(__('Enter the color of the filmstrip navigation arrows.', 'wp-photo-album-plus'));
|
3434 |
+
$slug1 = 'wppa_arrow_color';
|
3435 |
+
$slug2 = '';
|
3436 |
+
$slug = array($slug1, $slug2);
|
3437 |
+
$html1 = wppa_input($slug1, '70px', '', '');
|
3438 |
+
$html2 = '';
|
3439 |
+
$html = array($html1, $html2);
|
3440 |
+
$clas = '-svg';
|
3441 |
+
$tags = 'layout,navi';
|
3442 |
+
wppa_setting($slug, '15.2', $name, $desc, $html, $help, $clas, $tags);
|
3443 |
+
*/
|
3444 |
}
|
3445 |
?>
|
3446 |
</tbody>
|
5002 |
$html4 = wppa_select($slug4, $options, $values);
|
5003 |
$html = array($html1, $html2, $html3, $html4);
|
5004 |
$clas = '';
|
5005 |
+
$tags = 'layout,slide,navi';
|
5006 |
wppa_setting($slug, '7a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
5007 |
|
5008 |
$name = __('Numbar Active', 'wp-photo-album-plus');
|
5019 |
$html4 = wppa_select($slug4, $options, $values);
|
5020 |
$html = array($html1, $html2, $html3, $html4);
|
5021 |
$clas = '';
|
5022 |
+
$tags = 'layout,slide,navi';
|
5023 |
wppa_setting($slug, '8a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
5024 |
|
5025 |
$name = __('Lightbox', '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.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -495,11 +495,20 @@ global $silent;
|
|
495 |
wppa_update_option( 'wppa_rating_dayly', '0' );
|
496 |
}
|
497 |
}
|
498 |
-
|
499 |
if ( $old_rev <= '6609' ) {
|
500 |
wppa_schedule_treecount_update();
|
501 |
}
|
502 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
}
|
504 |
|
505 |
// Set Defaults
|
@@ -723,8 +732,11 @@ Hide Camera info
|
|
723 |
'wppa_cover_minheight' => '0', // 2
|
724 |
'wppa_head_and_text_frame_height' => '0', // 3
|
725 |
'wppa_text_frame_height' => '54', // 4
|
|
|
726 |
'wppa_smallsize' => '150', // 5
|
|
|
727 |
'wppa_smallsize_multi' => '100', // 6
|
|
|
728 |
'wppa_coversize_is_height' => 'no', // 7
|
729 |
'wppa_album_page_size' => '0', // 8
|
730 |
|
@@ -782,6 +794,7 @@ Hide Camera info
|
|
782 |
'wppa_bc_slide_thumblink' => 'no',
|
783 |
|
784 |
// B Slideshow
|
|
|
785 |
'wppa_show_startstop_navigation' => 'yes', // 1
|
786 |
'wppa_show_browse_navigation' => 'yes', // 2
|
787 |
'wppa_filmstrip' => 'yes', // 3
|
@@ -933,7 +946,7 @@ Hide Camera info
|
|
933 |
'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
|
934 |
'wppa_up_tag_preview' => 'yes',
|
935 |
'wppa_camera_connect' => 'yes',
|
936 |
-
'wppa_blog_it' => '
|
937 |
'wppa_blog_it_moderate' => 'yes',
|
938 |
'wppa_blog_it_shortcode' => '[wppa type="mphoto" photo="#id"][/wppa]',
|
939 |
|
@@ -1005,7 +1018,7 @@ Hide Camera info
|
|
1005 |
|
1006 |
'wppa_close_text' => 'Close', // frontend upload/edit etc
|
1007 |
|
1008 |
-
'wppa_icon_corner_style' => '
|
1009 |
|
1010 |
|
1011 |
// Table III: Backgrounds
|
@@ -1474,7 +1487,7 @@ Hide Camera info
|
|
1474 |
'wppa_allow_foreign_shortcodes_general' => 'no',
|
1475 |
'wppa_allow_foreign_shortcodes' => 'no', // 7
|
1476 |
'wppa_allow_foreign_shortcodes_thumbs' => 'no',
|
1477 |
-
'wppa_arrow_color' => 'black',
|
1478 |
'wppa_meta_page' => 'yes', // 9
|
1479 |
'wppa_meta_all' => 'yes', // 10
|
1480 |
'wppa_use_wp_editor' => 'no',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
495 |
wppa_update_option( 'wppa_rating_dayly', '0' );
|
496 |
}
|
497 |
}
|
498 |
+
|
499 |
if ( $old_rev <= '6609' ) {
|
500 |
wppa_schedule_treecount_update();
|
501 |
}
|
502 |
|
503 |
+
if ( $old_rev <= '6610' ) {
|
504 |
+
if ( get_option( 'wppa_blog_it' ) == 'yes' ) {
|
505 |
+
wppa_update_option( 'wppa_blog_it', 'optional' );
|
506 |
+
}
|
507 |
+
if ( get_option( 'wppa_blog_it' ) == 'no' ) {
|
508 |
+
wppa_update_option( 'wppa_blog_it', '-none-' );
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
}
|
513 |
|
514 |
// Set Defaults
|
732 |
'wppa_cover_minheight' => '0', // 2
|
733 |
'wppa_head_and_text_frame_height' => '0', // 3
|
734 |
'wppa_text_frame_height' => '54', // 4
|
735 |
+
'wppa_coverphoto_responsive' => 'no',
|
736 |
'wppa_smallsize' => '150', // 5
|
737 |
+
'wppa_smallsize_percentage' => '30',
|
738 |
'wppa_smallsize_multi' => '100', // 6
|
739 |
+
'wppa_smallsize_multi_percentage' => '20',
|
740 |
'wppa_coversize_is_height' => 'no', // 7
|
741 |
'wppa_album_page_size' => '0', // 8
|
742 |
|
794 |
'wppa_bc_slide_thumblink' => 'no',
|
795 |
|
796 |
// B Slideshow
|
797 |
+
'wppa_navigation_type' => 'icons', // 0
|
798 |
'wppa_show_startstop_navigation' => 'yes', // 1
|
799 |
'wppa_show_browse_navigation' => 'yes', // 2
|
800 |
'wppa_filmstrip' => 'yes', // 3
|
946 |
'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
|
947 |
'wppa_up_tag_preview' => 'yes',
|
948 |
'wppa_camera_connect' => 'yes',
|
949 |
+
'wppa_blog_it' => '-none-',
|
950 |
'wppa_blog_it_moderate' => 'yes',
|
951 |
'wppa_blog_it_shortcode' => '[wppa type="mphoto" photo="#id"][/wppa]',
|
952 |
|
1018 |
|
1019 |
'wppa_close_text' => 'Close', // frontend upload/edit etc
|
1020 |
|
1021 |
+
'wppa_icon_corner_style' => 'medium',
|
1022 |
|
1023 |
|
1024 |
// Table III: Backgrounds
|
1487 |
'wppa_allow_foreign_shortcodes_general' => 'no',
|
1488 |
'wppa_allow_foreign_shortcodes' => 'no', // 7
|
1489 |
'wppa_allow_foreign_shortcodes_thumbs' => 'no',
|
1490 |
+
// 'wppa_arrow_color' => 'black',
|
1491 |
'wppa_meta_page' => 'yes', // 9
|
1492 |
'wppa_meta_all' => 'yes', // 10
|
1493 |
'wppa_use_wp_editor' => 'no',
|
wppa-slideshow.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -200,7 +200,33 @@ global $thumbs;
|
|
200 |
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
function wppa_start_stop( $opt = '' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
if ( is_feed() ) return; // Not in a feed
|
206 |
|
@@ -258,6 +284,60 @@ function wppa_start_stop( $opt = '' ) {
|
|
258 |
'</div>' );
|
259 |
}
|
260 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
function wppa_slide_frame() {
|
263 |
|
@@ -1381,6 +1461,14 @@ function wppa_numberbar( $opt = '' ) {
|
|
1381 |
}
|
1382 |
|
1383 |
function wppa_browsebar( $opt = '' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1384 |
|
1385 |
// A single image slideshow needs no navigation
|
1386 |
if ( wppa( 'is_single' ) ) return;
|
@@ -1428,6 +1516,49 @@ function wppa_browsebar( $opt = '' ) {
|
|
1428 |
);
|
1429 |
}
|
1430 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1431 |
|
1432 |
function wppa_comments( $opt = '' ) {
|
1433 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
200 |
|
201 |
}
|
202 |
|
203 |
+
function wppa_get_navigation_type() {
|
204 |
+
switch( wppa_opt( 'navigation_type' ) ) {
|
205 |
+
case 'icons':
|
206 |
+
return 'icons';
|
207 |
+
break;
|
208 |
+
case 'iconsmobile':
|
209 |
+
if ( wppa_is_mobile() ) {
|
210 |
+
return 'icons';
|
211 |
+
}
|
212 |
+
else {
|
213 |
+
return 'text';
|
214 |
+
}
|
215 |
+
case 'text':
|
216 |
+
return 'text';
|
217 |
+
default:
|
218 |
+
return 'icons';
|
219 |
+
}
|
220 |
+
}
|
221 |
function wppa_start_stop( $opt = '' ) {
|
222 |
+
if ( wppa_get_navigation_type() == 'icons' ) {
|
223 |
+
wppa_start_stop_icons( $opt );
|
224 |
+
}
|
225 |
+
else {
|
226 |
+
wppa_start_stop_text( $opt );
|
227 |
+
}
|
228 |
+
}
|
229 |
+
function wppa_start_stop_icons( $opt = '' ) {
|
230 |
|
231 |
if ( is_feed() ) return; // Not in a feed
|
232 |
|
284 |
'</div>' );
|
285 |
}
|
286 |
}
|
287 |
+
function wppa_start_stop_text( $opt = '' ) {
|
288 |
+
|
289 |
+
if ( is_feed() ) return; // Not in a feed
|
290 |
+
|
291 |
+
// A single image slideshow needs no navigation
|
292 |
+
if ( wppa( 'is_single' ) ) return;
|
293 |
+
if ( wppa( 'is_filmonly' ) ) return;
|
294 |
+
|
295 |
+
// we always need the js part for the functionality (through filmstrip etc).
|
296 |
+
// so if not wanted: hide it
|
297 |
+
$hide = 'display:none; '; // assume hide
|
298 |
+
if ( $opt != 'optional' ) $hide = ''; // not optional: show
|
299 |
+
if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
|
300 |
+
|
301 |
+
if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
|
302 |
+
wppa_add_js_page_data( "\n" . '<script type="text/javascript">' );
|
303 |
+
wppa_add_js_page_data( "\n" . 'wppaSlideInitRunning['.wppa( 'mocc' ).'] = true;' );
|
304 |
+
wppa_add_js_page_data( "\n" . 'wppaMaxOccur = '.wppa( 'mocc' ).';' );
|
305 |
+
wppa_add_js_page_data( "\n" . '</script>' );
|
306 |
+
}
|
307 |
+
|
308 |
+
if ( ! $hide ) {
|
309 |
+
wppa_out( '<div' .
|
310 |
+
' id="prevnext1-'.wppa( 'mocc' ).'"' .
|
311 |
+
' class="wppa-box wppa-nav wppa-nav-text"' .
|
312 |
+
' style="text-align:center;'.__wcs('wppa-box').__wcs('wppa-nav').__wcs('wppa-nav-text').$hide.'"' .
|
313 |
+
' >' .
|
314 |
+
'<a' .
|
315 |
+
' id="speed0-'.wppa( 'mocc' ).'"' .
|
316 |
+
' class="wppa-nav-text speed0"' .
|
317 |
+
' style="'.__wcs('wppa-nav-text').'"' .
|
318 |
+
' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"' .
|
319 |
+
' >' .
|
320 |
+
__('Slower', 'wp-photo-album-plus') .
|
321 |
+
'</a>' .
|
322 |
+
' | ' .
|
323 |
+
'<a' .
|
324 |
+
' id="startstop-'.wppa( 'mocc' ).'"' .
|
325 |
+
' class="wppa-nav-text startstop"' .
|
326 |
+
' style="'.__wcs('wppa-nav-text').'"' .
|
327 |
+
' onclick="wppaStartStop('.wppa( 'mocc' ).', -1); return false;">' .
|
328 |
+
__('Start', 'wp-photo-album-plus') .
|
329 |
+
'</a>' .
|
330 |
+
' | ' .
|
331 |
+
'<a' .
|
332 |
+
' id="speed1-'.wppa( 'mocc' ).'"' .
|
333 |
+
' class="wppa-nav-text speed1"' .
|
334 |
+
' style="'.__wcs('wppa-nav-text').'"' .
|
335 |
+
' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;">' .
|
336 |
+
__('Faster', 'wp-photo-album-plus') .
|
337 |
+
'</a>' .
|
338 |
+
'</div>' );
|
339 |
+
}
|
340 |
+
}
|
341 |
|
342 |
function wppa_slide_frame() {
|
343 |
|
1461 |
}
|
1462 |
|
1463 |
function wppa_browsebar( $opt = '' ) {
|
1464 |
+
if ( wppa_get_navigation_type() == 'icons' ) {
|
1465 |
+
wppa_browsebar_icons( $opt );
|
1466 |
+
}
|
1467 |
+
else {
|
1468 |
+
wppa_browsebar_text( $opt );
|
1469 |
+
}
|
1470 |
+
}
|
1471 |
+
function wppa_browsebar_icons( $opt = '' ) {
|
1472 |
|
1473 |
// A single image slideshow needs no navigation
|
1474 |
if ( wppa( 'is_single' ) ) return;
|
1516 |
);
|
1517 |
}
|
1518 |
}
|
1519 |
+
function wppa_browsebar_text( $opt = '' ) {
|
1520 |
+
|
1521 |
+
// A single image slideshow needs no navigation
|
1522 |
+
if ( wppa( 'is_single' ) ) return;
|
1523 |
+
|
1524 |
+
if ( is_feed() ) return;
|
1525 |
+
|
1526 |
+
$do_it = false;
|
1527 |
+
if ( $opt != 'optional' ) $do_it = true;
|
1528 |
+
if ( ! wppa( 'is_slideonly' ) && wppa_switch( 'show_browse_navigation' ) ) $do_it = true;
|
1529 |
+
if ( wppa( 'is_slideonly' ) && wppa( 'browse_on' ) ) $do_it = true;
|
1530 |
+
|
1531 |
+
if ( $do_it ) {
|
1532 |
+
wppa_out( '<div' .
|
1533 |
+
' id="prevnext2-'.wppa( 'mocc' ).'"' .
|
1534 |
+
' class="wppa-box wppa-nav wppa-nav-text"' .
|
1535 |
+
' style="text-align: center; '.__wcs('wppa-box').__wcs('wppa-nav').__wcs('wppa-nav-text').'"' .
|
1536 |
+
' >' .
|
1537 |
+
'<a' .
|
1538 |
+
' id="prev-arrow-'.wppa( 'mocc' ).'"' .
|
1539 |
+
' class="wppa-prev-'.wppa( 'mocc' ).' wppa-nav-text arrow-'.wppa( 'mocc' ).'"' .
|
1540 |
+
' style="float:left; text-align:left; cursor:pointer; '.__wcs('wppa-nav-text').'" onclick="wppaPrev('.wppa( 'mocc' ).')"' .
|
1541 |
+
' >' .
|
1542 |
+
'</a>' .
|
1543 |
+
'<a' .
|
1544 |
+
' id="next-arrow-'.wppa( 'mocc' ).'"' .
|
1545 |
+
' class="wppa-next-'.wppa( 'mocc' ).' wppa-nav-text arrow-'.wppa( 'mocc' ).'"' .
|
1546 |
+
' style="float:right; text-align:right; cursor:pointer; '.__wcs('wppa-nav-text').'"' .
|
1547 |
+
' onclick="wppaNext('.wppa( 'mocc' ).')"' .
|
1548 |
+
' >' .
|
1549 |
+
'</a>' .
|
1550 |
+
'<span' .
|
1551 |
+
' id="counter-'.wppa( 'mocc' ).'"' .
|
1552 |
+
' class="wppa-nav-text wppa-black"' .
|
1553 |
+
' style="text-align:center; '.__wcs('wppa-nav-text').'; cursor:pointer;"' .
|
1554 |
+
' onclick="wppaStartStop('.wppa( 'mocc' ).', -1);"' .
|
1555 |
+
' title="'.__('Click to start/stop', 'wp-photo-album-plus').'"' .
|
1556 |
+
' >' .
|
1557 |
+
'</span>' .
|
1558 |
+
'</div>'
|
1559 |
+
);
|
1560 |
+
}
|
1561 |
+
}
|
1562 |
|
1563 |
function wppa_comments( $opt = '' ) {
|
1564 |
|
wppa-styles.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
/* Various style computation routines
|
6 |
-
/* Version 6.6.
|
7 |
/*
|
8 |
*/
|
9 |
|
@@ -254,10 +254,12 @@ global $wppa_dynamic_css_data;
|
|
254 |
' . ( wppa_opt( 'bcolor_adminschoice' ) ? 'border-color:' . wppa_opt( 'bcolor_adminschoice' ) . '; ' : '' ) . '
|
255 |
}';
|
256 |
|
|
|
257 |
$content .= '
|
258 |
.wppa-arrow {
|
259 |
' . ( wppa_opt( 'arrow_color' ) ? 'color:' . wppa_opt( 'arrow_color' ) . '; ' : '' ) . '
|
260 |
}';
|
|
|
261 |
|
262 |
// Add miscellaneous styles
|
263 |
if ( ! wppa_switch( 'ovl_fs_icons' ) ) {
|
@@ -454,7 +456,19 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
454 |
else { // No border color: no border
|
455 |
$result['style'] .= ' border-width: 0px;';
|
456 |
}
|
457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
if ( wppa_switch( 'use_cover_opacity' ) && ! is_feed() ) {
|
459 |
$opac = wppa_opt( 'cover_opacity' );
|
460 |
$result['style'] .= ' opacity:' . $opac/100 .
|
@@ -923,8 +937,8 @@ function __wcs( $class ) {
|
|
923 |
// break;
|
924 |
break;
|
925 |
case 'wppa-arrow':
|
926 |
-
$opt = wppa_opt( 'arrow_color' );
|
927 |
-
if ( $opt ) $result .= 'color:' . $opt . '; ';
|
928 |
break;
|
929 |
case 'wppa-td';
|
930 |
$result .= 'padding: 3px 2px 3px 0; border: 0';
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
/* Various style computation routines
|
6 |
+
/* Version 6.6.10
|
7 |
/*
|
8 |
*/
|
9 |
|
254 |
' . ( wppa_opt( 'bcolor_adminschoice' ) ? 'border-color:' . wppa_opt( 'bcolor_adminschoice' ) . '; ' : '' ) . '
|
255 |
}';
|
256 |
|
257 |
+
/*
|
258 |
$content .= '
|
259 |
.wppa-arrow {
|
260 |
' . ( wppa_opt( 'arrow_color' ) ? 'color:' . wppa_opt( 'arrow_color' ) . '; ' : '' ) . '
|
261 |
}';
|
262 |
+
*/
|
263 |
|
264 |
// Add miscellaneous styles
|
265 |
if ( ! wppa_switch( 'ovl_fs_icons' ) ) {
|
456 |
else { // No border color: no border
|
457 |
$result['style'] .= ' border-width: 0px;';
|
458 |
}
|
459 |
+
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
460 |
+
|
461 |
+
// Landscape
|
462 |
+
if ( $width >= $height ) {
|
463 |
+
$result['style'] .= 'max-width:100%;';
|
464 |
+
}
|
465 |
+
else {
|
466 |
+
$result['style'] .= 'max-width:'.(100*$width/$height).'%;';
|
467 |
+
}
|
468 |
+
}
|
469 |
+
else {
|
470 |
+
$result['style'] .= ' width:' . $width . 'px; height:' . $height . 'px;';
|
471 |
+
}
|
472 |
if ( wppa_switch( 'use_cover_opacity' ) && ! is_feed() ) {
|
473 |
$opac = wppa_opt( 'cover_opacity' );
|
474 |
$result['style'] .= ' opacity:' . $opac/100 .
|
937 |
// break;
|
938 |
break;
|
939 |
case 'wppa-arrow':
|
940 |
+
// $opt = wppa_opt( 'arrow_color' );
|
941 |
+
// if ( $opt ) $result .= 'color:' . $opt . '; ';
|
942 |
break;
|
943 |
case 'wppa-td';
|
944 |
$result .= 'padding: 3px 2px 3px 0; border: 0';
|
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.6.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -663,6 +663,7 @@ global $wpdb;
|
|
663 |
if ( wppa_may_user_fe_delete( $id ) ) {
|
664 |
$result .=
|
665 |
'<a' .
|
|
|
666 |
' style="color:red;cursor:pointer;"' .
|
667 |
' 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;' ).'"' .
|
668 |
' >' .
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
+
* Version 6.6.10
|
9 |
*
|
10 |
*/
|
11 |
|
663 |
if ( wppa_may_user_fe_delete( $id ) ) {
|
664 |
$result .=
|
665 |
'<a' .
|
666 |
+
' id="wppa-delete-' . wppa_encrypt_photo( $id ) . '"' .
|
667 |
' style="color:red;cursor:pointer;"' .
|
668 |
' 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;' ).'"' .
|
669 |
' >' .
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 6.6.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1220,8 +1220,32 @@ global $wppa_supported_audio_extensions;
|
|
1220 |
global $wppa_supported_video_extensions;
|
1221 |
global $wpdb;
|
1222 |
|
|
|
|
|
1223 |
$photoinfo = $wpdb->get_row($wpdb->prepare('SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `id` = %s', $photo), ARRAY_A);
|
1224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1225 |
// Get album
|
1226 |
$album = $photoinfo['album'];
|
1227 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 6.6.10
|
7 |
*
|
8 |
*/
|
9 |
|
1220 |
global $wppa_supported_video_extensions;
|
1221 |
global $wpdb;
|
1222 |
|
1223 |
+
// Sanitize arg
|
1224 |
+
$photo = strval( intval( $photo ) );
|
1225 |
$photoinfo = $wpdb->get_row($wpdb->prepare('SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `id` = %s', $photo), ARRAY_A);
|
1226 |
|
1227 |
+
// If still in use, refuse deletion
|
1228 |
+
$in_use = $wpdb->get_row( "SELECT `ID`, `post_title` FROM `" . $wpdb->posts . "` WHERE `post_content` LIKE '%photo=\"$photo\"%' LIMIT 1", ARRAY_A );
|
1229 |
+
|
1230 |
+
if ( is_array( $in_use ) ) {
|
1231 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
1232 |
+
echo
|
1233 |
+
'ER||0||' .
|
1234 |
+
'<span style="color:#ff0000;" >' .
|
1235 |
+
__( 'Could not delete photo', 'wp-photo-album-plus' ) .
|
1236 |
+
'</span>||' .
|
1237 |
+
__( 'Photo is still in use in post/page', 'wp-photo-album-plus' ) .
|
1238 |
+
' ' .
|
1239 |
+
$in_use['post_title'] .
|
1240 |
+
' (' . $in_use['ID'] . ')';
|
1241 |
+
wppa_exit();
|
1242 |
+
}
|
1243 |
+
else {
|
1244 |
+
wppa_error_message( __( 'Photo is still in use in post/page', 'wp-photo-album-plus' ) . ' ' . $in_use['post_title'] . ' (' . $in_use['ID'] . ')' );
|
1245 |
+
return false;
|
1246 |
+
}
|
1247 |
+
}
|
1248 |
+
|
1249 |
// Get album
|
1250 |
$album = $photoinfo['album'];
|
1251 |
|
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.6.
|
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/
|
@@ -22,8 +22,8 @@ global $wpdb;
|
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
-
global $wppa_revno; $wppa_revno = '
|
26 |
-
global $wppa_api_version; $wppa_api_version = '6-6-
|
27 |
|
28 |
/* start timers */
|
29 |
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.6.10
|
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/
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
+
global $wppa_revno; $wppa_revno = '6610'; // WPPA db version
|
26 |
+
global $wppa_api_version; $wppa_api_version = '6-6-10-005'; // WPPA software version
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime(true);
|