WP Photo Album Plus - Version 6.4.19

Version Description

Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 6.4.19
Comparing to
See all releases

Code changes from version 6.4.18 to 6.4.19

images/graycross.png ADDED
Binary file
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.4.06
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -42,7 +42,10 @@ function wppaReUpload( event, photo, expectedName ) {
42
  }
43
 
44
  // Check the file name
45
- if ( file.name != expectedName ) {
 
 
 
46
  if ( ! confirm( 'Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?' ) ) {
47
  jQuery( '#re-up-'+photo ).css( 'display', 'none' );
48
  return;
@@ -1505,7 +1508,7 @@ function wppaAjaxUpdateOptionCheckBox(slug, elem) {
1505
  url += '&wppa-nonce='+document.getElementById('wppa-nonce').value;
1506
  if (elem.checked) url += '&value=yes';
1507
  else url += '&value=no';
1508
-
1509
  // Process the result
1510
  xmlhttp.onreadystatechange=function() {
1511
  switch (xmlhttp.readyState) {
@@ -1741,7 +1744,7 @@ function wppaAjaxPopupWindow( slug ) {
1741
 
1742
  }
1743
 
1744
- function wppaAjaxUpdateOptionValue(slug, elem) {
1745
 
1746
  var xmlhttp = wppaGetXmlHttp();
1747
 
@@ -1786,8 +1789,18 @@ function wppaAjaxUpdateOptionValue(slug, elem) {
1786
  eslug = wppaEncode(slug);
1787
  var data = 'action=wppa&wppa-action=update-option&wppa-option='+eslug;
1788
  data += '&wppa-nonce='+document.getElementById('wppa-nonce').value;
1789
- if ( elem != 0 ) data += '&value='+wppaEncode(elem.value);
 
 
 
 
 
 
 
 
 
1790
  //if (!confirm('Do '+wppaAjaxUrl+'\n'+data)) return; // Diagnostic
 
1791
  // Do the Ajax action
1792
  xmlhttp.open('POST',wppaAjaxUrl,true);
1793
  xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.4.19
5
  /* Various js routines used in admin pages
6
  */
7
 
42
  }
43
 
44
  // Check the file name
45
+ if ( expectedName.length == 0 ) {
46
+ alert( 'Filename will be set to '+file.name );
47
+ }
48
+ else if ( file.name != expectedName ) {
49
  if ( ! confirm( 'Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?' ) ) {
50
  jQuery( '#re-up-'+photo ).css( 'display', 'none' );
51
  return;
1508
  url += '&wppa-nonce='+document.getElementById('wppa-nonce').value;
1509
  if (elem.checked) url += '&value=yes';
1510
  else url += '&value=no';
1511
+ //wppaConsoleLog(url,'force');
1512
  // Process the result
1513
  xmlhttp.onreadystatechange=function() {
1514
  switch (xmlhttp.readyState) {
1744
 
1745
  }
1746
 
1747
+ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
1748
 
1749
  var xmlhttp = wppaGetXmlHttp();
1750
 
1789
  eslug = wppaEncode(slug);
1790
  var data = 'action=wppa&wppa-action=update-option&wppa-option='+eslug;
1791
  data += '&wppa-nonce='+document.getElementById('wppa-nonce').value;
1792
+
1793
+ if ( elem != 0 ) {
1794
+ if ( multisel ) {
1795
+ data += '&value='+wppaGetSelectionEnumByClass('.'+slug, ',');
1796
+ }
1797
+ else {
1798
+ data += '&value='+wppaEncode(elem.value);
1799
+ }
1800
+ }
1801
+
1802
  //if (!confirm('Do '+wppaAjaxUrl+'\n'+data)) return; // Diagnostic
1803
+
1804
  // Do the Ajax action
1805
  xmlhttp.open('POST',wppaAjaxUrl,true);
1806
  xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
js/wppa-ajax-front.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsAjaxVersion = '6.4.18';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -495,8 +495,15 @@ function _wppaRateIt( mocc, value ) {
495
  if ( _wppaSSRuns[mocc] ) return;
496
 
497
  // Init vars
498
- var photo = _wppaId[mocc][_wppaCurIdx[mocc]];
499
- var oldval = _wppaMyr[mocc][_wppaCurIdx[mocc]];
 
 
 
 
 
 
 
500
 
501
  // Already rated, and once allowed only?
502
  if ( oldval != 0 && wppaRatingOnce ) return;
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '6.4.19';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
495
  if ( _wppaSSRuns[mocc] ) return;
496
 
497
  // Init vars
498
+ var photo = _wppaId[mocc][_wppaCurIdx[mocc]];
499
+ var oldval = _wppaMyr[mocc][_wppaCurIdx[mocc]];
500
+ var waittext = _wppaWaitTexts[mocc][_wppaCurIdx[mocc]];
501
+
502
+ // If wait text, alert and exit
503
+ if ( waittext.length > 0 ) {
504
+ alert( waittext );
505
+ return;
506
+ }
507
 
508
  // Already rated, and once allowed only?
509
  if ( oldval != 0 && wppaRatingOnce ) return;
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.4.18';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
8
  wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).css('display','');},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
9
  else{jQuery('#wppa-container-'+mocc).html(result);}
10
  if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
@@ -36,7 +36,8 @@ function wppaAjaxDestroyAlbum(album,nonce){if(confirm('Are you sure you want to
36
  return false;}
37
  function _bumpViewCount(photo){if(!wppaBumpViewCount)return;if(wppaPhotoView[photo])return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpviewcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){wppaPhotoView[photo]=true;},error:function(xhr,status,error){wppaConsoleLog('_bumpViewCount failed. Error = '+error+', status = '+status,'force');},});}
38
  function wppaVoteThumb(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating=1'+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){jQuery('#wppa-vote-button-'+mocc+'-'+photo).val(wppaVotedForMe);},error:function(xhr,status,error){wppaConsoleLog('wppaVoteThumb failed. Error = '+error+', status = '+status,'force');},});}
39
- function _wppaRateIt(mocc,value){if(value==0)return;if(_wppaSSRuns[mocc])return;var photo=_wppaId[mocc][_wppaCurIdx[mocc]];var oldval=_wppaMyr[mocc][_wppaCurIdx[mocc]];if(oldval!=0&&wppaRatingOnce)return;if(oldval<0)return;_wppaVoteInProgress=true;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index='+_wppaCurIdx[mocc]+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('#wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);_wppaSetRatingDisplay(mocc);}
 
40
  else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}}
41
  else{_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];_wppaDisc[ArrValues[0]][ArrValues[2]]=ArrValues[5];_wppaSetRatingDisplay(mocc);if(wppaCommentRequiredAfterVote){if(ArrValues[6]==0){alert(ArrValues[7]);}}
42
  if(wppaNextOnCallback)_wppaNextOnCallback(mocc);}},error:function(xhr,status,error){wppaConsoleLog('_wppaRateIt failed. Error = '+error+', status = '+status,'force');},});}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaJsAjaxVersion='6.4.19';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
8
  wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).css('display','');},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
9
  else{jQuery('#wppa-container-'+mocc).html(result);}
10
  if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
36
  return false;}
37
  function _bumpViewCount(photo){if(!wppaBumpViewCount)return;if(wppaPhotoView[photo])return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpviewcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){wppaPhotoView[photo]=true;},error:function(xhr,status,error){wppaConsoleLog('_bumpViewCount failed. Error = '+error+', status = '+status,'force');},});}
38
  function wppaVoteThumb(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating=1'+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){jQuery('#wppa-vote-button-'+mocc+'-'+photo).val(wppaVotedForMe);},error:function(xhr,status,error){wppaConsoleLog('wppaVoteThumb failed. Error = '+error+', status = '+status,'force');},});}
39
+ function _wppaRateIt(mocc,value){if(value==0)return;if(_wppaSSRuns[mocc])return;var photo=_wppaId[mocc][_wppaCurIdx[mocc]];var oldval=_wppaMyr[mocc][_wppaCurIdx[mocc]];var waittext=_wppaWaitTexts[mocc][_wppaCurIdx[mocc]];if(waittext.length>0){alert(waittext);return;}
40
+ if(oldval!=0&&wppaRatingOnce)return;if(oldval<0)return;_wppaVoteInProgress=true;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index='+_wppaCurIdx[mocc]+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('#wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);_wppaSetRatingDisplay(mocc);}
41
  else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}}
42
  else{_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];_wppaDisc[ArrValues[0]][ArrValues[2]]=ArrValues[5];_wppaSetRatingDisplay(mocc);if(wppaCommentRequiredAfterVote){if(ArrValues[6]==0){alert(ArrValues[7]);}}
43
  if(wppaNextOnCallback)_wppaNextOnCallback(mocc);}},error:function(xhr,status,error){wppaConsoleLog('_wppaRateIt failed. Error = '+error+', status = '+status,'force');},});}
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '6.4.18';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 1;
@@ -36,6 +36,16 @@ jQuery( window ).resize(function() {
36
  wppaOvlResize();
37
  });
38
 
 
 
 
 
 
 
 
 
 
 
39
  // Keyboard handler
40
  function wppaOvlKeyboardHandler( e ) {
41
 
@@ -433,17 +443,29 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
433
  '</div>';
434
  }
435
 
 
 
 
 
 
 
 
 
 
 
 
436
  // The 'back to normal' icon
437
- html += '<img' +
438
- ' id="wppa-norms-btn"' +
439
- ' src="' + wppaImageDirectory + 'norms.png"' +
440
- ' alt="' + wppaToggleFullScreen + '"' +
441
- ' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+'"' +
442
- ' onclick="wppaOvlNorm()"' +
443
- // ' ontouchstart="wppaOvlNorm()"' +
444
- ' onmouseover="jQuery(this).fadeTo(600,1);"' +
445
- ' onmouseout="jQuery(this).fadeTo(600,0);wppaNormsBtnOpac=0;"' +
446
- ' >';
 
447
 
448
  // Replacing the html stops a running video,
449
  // so we only replace html on a new id, or a photo without audio
@@ -1129,6 +1151,11 @@ wppaConsoleLog( 'wppaOvlHide' );
1129
  // Stop audio
1130
  wppaStopAudio();
1131
 
 
 
 
 
 
1132
  // Clear image container
1133
  jQuery( '#wppa-overlay-ic' ).html( '' );
1134
 
@@ -1144,6 +1171,11 @@ wppaConsoleLog( 'wppaOvlHide' );
1144
  wppaOvlRunning = false;
1145
  wppaOvlMode = wppaOvlModeInitial;//'stretched';//'normal';
1146
  jQuery( '#wppa-overlay-sp' ).css({visibility:'hidden'});
 
 
 
 
 
1147
  }
1148
 
1149
  // Perform onclick action
@@ -1220,6 +1252,11 @@ wppaConsoleLog( 'wppaInitOverlay' );
1220
  wppaOvlShow( this );
1221
  // event.preventDefault();
1222
  });
 
 
 
 
 
1223
  }
1224
  }
1225
  }
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.4.19';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 1;
36
  wppaOvlResize();
37
  });
38
 
39
+ // Screen resize handler for mobile devices when they rotate
40
+ function wppaDoOnOrientationChange(e) {
41
+
42
+ // Full screen and still in?
43
+ if ( wppaOvlMode != 'normal' && document.getElementById( 'wppa-overlay-img' ) ) {
44
+ setTimeout( 'wppaOvlShow( '+wppaOvlIdx+' )', 100 );
45
+ return;
46
+ }
47
+ }
48
+
49
  // Keyboard handler
50
  function wppaOvlKeyboardHandler( e ) {
51
 
443
  '</div>';
444
  }
445
 
446
+ // If Mobile the 'exit' icon
447
+ if ( wppaIsMobile ) {
448
+ html += '<img' +
449
+ ' id="wppa-exit-btn"' +
450
+ ' src="' + wppaImageDirectory + 'graycross.png"' +
451
+ ' alt="Exit"' +
452
+ ' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:0.5;"' +
453
+ ' onclick="wppaOvlHide()"' +
454
+ ' >';
455
+ }
456
+
457
  // The 'back to normal' icon
458
+ else {
459
+ html += '<img' +
460
+ ' id="wppa-norms-btn"' +
461
+ ' src="' + wppaImageDirectory + 'norms.png"' +
462
+ ' alt="' + wppaToggleFullScreen + '"' +
463
+ ' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+'"' +
464
+ ' onclick="wppaOvlNorm()"' +
465
+ ' onmouseover="jQuery(this).fadeTo(600,1);"' +
466
+ ' onmouseout="jQuery(this).fadeTo(600,0);wppaNormsBtnOpac=0;"' +
467
+ ' >';
468
+ }
469
 
470
  // Replacing the html stops a running video,
471
  // so we only replace html on a new id, or a photo without audio
1151
  // Stop audio
1152
  wppaStopAudio();
1153
 
1154
+ // Give up fullscreen mode
1155
+ if ( wppaOvlMode != 'normal' ) {
1156
+ wppaOvlNorm( true );
1157
+ }
1158
+
1159
  // Clear image container
1160
  jQuery( '#wppa-overlay-ic' ).html( '' );
1161
 
1171
  wppaOvlRunning = false;
1172
  wppaOvlMode = wppaOvlModeInitial;//'stretched';//'normal';
1173
  jQuery( '#wppa-overlay-sp' ).css({visibility:'hidden'});
1174
+
1175
+ // Remove orientationchange handler if mobile
1176
+ if ( wppaIsMobile ) {
1177
+ window.removeEventListener( 'orientationchange', wppaDoOnOrientationChange);
1178
+ }
1179
  }
1180
 
1181
  // Perform onclick action
1252
  wppaOvlShow( this );
1253
  // event.preventDefault();
1254
  });
1255
+
1256
+ // Install orientationchange handler if mobile
1257
+ if ( wppaIsMobile ) {
1258
+ window.addEventListener( 'orientationchange', wppaDoOnOrientationChange);
1259
+ }
1260
  }
1261
  }
1262
  }
js/wppa-lightbox.min.js CHANGED
@@ -4,7 +4,8 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
- var wppaLightboxVersion='6.4.18';var wppaNormsBtnOpac=1;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='normal';var wppaOvlCurIdx=0;var wppaSavedContainerWidth;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
 
8
  var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
9
  wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
10
  switch(key){case'p':wppaOvlShowPrev();break;case'n':wppaOvlShowNext();break;case's':wppaOvlStartStop();break;case'd':jQuery('#wppa-ovl-legenda-1').css('visibility','hidden');jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';break;case'f':wppaOvlFull();break;case'q':case'x':wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
@@ -51,7 +52,9 @@ else{html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(wind
51
  wppaOvlAudioHtmls[idx]+'</audio>';}
52
  html+='<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
53
  html+='</div>';'</div>';}
54
- html+='<img'+' id="wppa-norms-btn"'+' src="'+wppaImageDirectory+'norms.png"'+' alt="'+wppaToggleFullScreen+'"'+' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+'"'+' onclick="wppaOvlNorm()"'+' onmouseover="jQuery(this).fadeTo(600,1);"'+' onmouseout="jQuery(this).fadeTo(600,0);wppaNormsBtnOpac=0;"'+' >';if((!wppaIsVideo&&!wppaHasAudio)||wppaOvlFsPhotoId!=wppaPhotoId||wppaPhotoId==0){wppaStopVideo(0);wppaStopAudio();jQuery('#wppa-overlay-ic').html(html);}
 
 
55
  wppaOvlIsVideo=wppaIsVideo;setTimeout('wppaOvlFormatFull()',10);if(wppaIsVideo||wppaHasAudio){setTimeout('wppaOvlUpdateFsId()',2000);}
56
  else{wppaOvlFsPhotoId=0;}
57
  wppaOvlFirst=false;return false;}
@@ -115,13 +118,14 @@ function wppaOvlShowPrev(){wppaConsoleLog('wppaOvlShowPrev');wppaOvlFsPhotoId=0;
115
  wppaOvlShow(wppaOvlIdx-1);return false;}
116
  function wppaOvlShowNext(){wppaConsoleLog('wppaOvlShowNext');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx>=(wppaOvlUrls.length-1)){wppaOvlIdx=-1;}
117
  wppaOvlShow(wppaOvlIdx+1);return false;}
118
- function wppaOvlHide(){wppaConsoleLog('wppaOvlHide');wppaStopAudio();jQuery('#wppa-overlay-ic').html('');jQuery('#wppa-overlay-bg').fadeOut(300);jQuery(document).off('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=false;wppaOvlFirst=true;wppaOvlRunning=false;wppaOvlMode=wppaOvlModeInitial;jQuery('#wppa-overlay-sp').css({visibility:'hidden'});}
 
119
  function wppaOvlOnclick(event){wppaConsoleLog('wppaOvlOnClick');switch(wppaOvlOnclickType){case'none':break;case'close':if(wppaOvlMode=='normal'){wppaOvlHide();}
120
  break;case'browse':var x=event.screenX-window.screenX;if(x<jQuery(window).width()/2)wppaOvlShowPrev();else wppaOvlShowNext();break;default:alert('Unimplemented action: '+wppaOvlOnclickType);break;}
121
  return true;}
122
  function wppaInitOverlay(){wppaConsoleLog('wppaInitOverlay');wppaOvlMode=wppaOvlModeInitial;var anchors=jQuery('a');var anchor;var i;var temp=[];wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlCurIdx=0;wppaSavedContainerWidth=240+2*wppaOvlBorderWidth;wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+(wppaOvlTxtHeight=='auto'?50:wppaOvlTxtHeight);wppaSavedMarginLeft=-(120+wppaOvlBorderWidth);wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+(wppaOvlTxtHeight=='auto'?25:wppaOvlTxtHeight/2));wppaSavedImageWidth=240;wppaSavedImageHeight=180+wppaOvlBorderWidth;for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
123
  else if(anchor.rel){temp=anchor.rel.split("[");}
124
  else{temp[0]='';}
125
- if(temp[0]=='wppa'){wppaWppaOverlayActivated=true;jQuery(anchor).click(function(event){wppaOvlShow(this);event.preventDefault();});jQuery(anchor).on("touchstart",function(event){wppaOvlShow(this);});}}}
126
  function wppaOvlResize(){wppaConsoleLog('wppaOvlResize');setTimeout('wppaOvlSize( '+wppaOvlAnimSpeed+' )',100);if(wppaOvlAudioStart&&!wppaOvlAudioPlaying){setTimeout('wppaOvlStartAudio()',1000);}}
127
  wppaConsoleLog('wppa-lightbox.js version '+wppaLightboxVersion+' loaded.','force');
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaLightboxVersion='6.4.19';var wppaNormsBtnOpac=1;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='normal';var wppaOvlCurIdx=0;var wppaSavedContainerWidth;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaDoOnOrientationChange(e){if(wppaOvlMode!='normal'&&document.getElementById('wppa-overlay-img')){setTimeout('wppaOvlShow( '+wppaOvlIdx+' )',100);return;}}
8
+ function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
9
  var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
10
  wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
11
  switch(key){case'p':wppaOvlShowPrev();break;case'n':wppaOvlShowNext();break;case's':wppaOvlStartStop();break;case'd':jQuery('#wppa-ovl-legenda-1').css('visibility','hidden');jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';break;case'f':wppaOvlFull();break;case'q':case'x':wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
52
  wppaOvlAudioHtmls[idx]+'</audio>';}
53
  html+='<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
54
  html+='</div>';'</div>';}
55
+ if(wppaIsMobile){html+='<img'+' id="wppa-exit-btn"'+' src="'+wppaImageDirectory+'graycross.png"'+' alt="Exit"'+' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:0.5;"'+' onclick="wppaOvlHide()"'+' >';}
56
+ else{html+='<img'+' id="wppa-norms-btn"'+' src="'+wppaImageDirectory+'norms.png"'+' alt="'+wppaToggleFullScreen+'"'+' style="height:32px;z-index:100092;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+'"'+' onclick="wppaOvlNorm()"'+' onmouseover="jQuery(this).fadeTo(600,1);"'+' onmouseout="jQuery(this).fadeTo(600,0);wppaNormsBtnOpac=0;"'+' >';}
57
+ if((!wppaIsVideo&&!wppaHasAudio)||wppaOvlFsPhotoId!=wppaPhotoId||wppaPhotoId==0){wppaStopVideo(0);wppaStopAudio();jQuery('#wppa-overlay-ic').html(html);}
58
  wppaOvlIsVideo=wppaIsVideo;setTimeout('wppaOvlFormatFull()',10);if(wppaIsVideo||wppaHasAudio){setTimeout('wppaOvlUpdateFsId()',2000);}
59
  else{wppaOvlFsPhotoId=0;}
60
  wppaOvlFirst=false;return false;}
118
  wppaOvlShow(wppaOvlIdx-1);return false;}
119
  function wppaOvlShowNext(){wppaConsoleLog('wppaOvlShowNext');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx>=(wppaOvlUrls.length-1)){wppaOvlIdx=-1;}
120
  wppaOvlShow(wppaOvlIdx+1);return false;}
121
+ function wppaOvlHide(){wppaConsoleLog('wppaOvlHide');wppaStopAudio();if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
122
+ jQuery('#wppa-overlay-ic').html('');jQuery('#wppa-overlay-bg').fadeOut(300);jQuery(document).off('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=false;wppaOvlFirst=true;wppaOvlRunning=false;wppaOvlMode=wppaOvlModeInitial;jQuery('#wppa-overlay-sp').css({visibility:'hidden'});if(wppaIsMobile){window.removeEventListener('orientationchange',wppaDoOnOrientationChange);}}
123
  function wppaOvlOnclick(event){wppaConsoleLog('wppaOvlOnClick');switch(wppaOvlOnclickType){case'none':break;case'close':if(wppaOvlMode=='normal'){wppaOvlHide();}
124
  break;case'browse':var x=event.screenX-window.screenX;if(x<jQuery(window).width()/2)wppaOvlShowPrev();else wppaOvlShowNext();break;default:alert('Unimplemented action: '+wppaOvlOnclickType);break;}
125
  return true;}
126
  function wppaInitOverlay(){wppaConsoleLog('wppaInitOverlay');wppaOvlMode=wppaOvlModeInitial;var anchors=jQuery('a');var anchor;var i;var temp=[];wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlCurIdx=0;wppaSavedContainerWidth=240+2*wppaOvlBorderWidth;wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+(wppaOvlTxtHeight=='auto'?50:wppaOvlTxtHeight);wppaSavedMarginLeft=-(120+wppaOvlBorderWidth);wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+(wppaOvlTxtHeight=='auto'?25:wppaOvlTxtHeight/2));wppaSavedImageWidth=240;wppaSavedImageHeight=180+wppaOvlBorderWidth;for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
127
  else if(anchor.rel){temp=anchor.rel.split("[");}
128
  else{temp[0]='';}
129
+ if(temp[0]=='wppa'){wppaWppaOverlayActivated=true;jQuery(anchor).click(function(event){wppaOvlShow(this);event.preventDefault();});jQuery(anchor).on("touchstart",function(event){wppaOvlShow(this);});if(wppaIsMobile){window.addEventListener('orientationchange',wppaDoOnOrientationChange);}}}}
130
  function wppaOvlResize(){wppaConsoleLog('wppaOvlResize');setTimeout('wppaOvlSize( '+wppaOvlAnimSpeed+' )',100);if(wppaOvlAudioStart&&!wppaOvlAudioPlaying){setTimeout('wppaOvlStartAudio()',1000);}}
131
  wppaConsoleLog('wppa-lightbox.js version '+wppaLightboxVersion+' loaded.','force');
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.4.09';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -35,7 +35,8 @@ function wppaStoreSlideInfo(
35
  ogdsc,
36
  hiresurl, // The url to the hi res ( source ) image file
37
  videohtml, // The html for the video, or ''
38
- audiohtml
 
39
  ) {
40
 
41
  var cursor;
@@ -84,6 +85,7 @@ function wppaStoreSlideInfo(
84
  _wppaVideoNatHeight[mocc] = [];
85
  wppaVideoPlaying[mocc] = false;
86
  wppaAudioPlaying[mocc] = false;
 
87
  }
88
 
89
  // Cursor
@@ -173,6 +175,7 @@ function wppaStoreSlideInfo(
173
  _wppaAudioHtml[mocc][id] = audiohtml;
174
  _wppaVideoNatWidth[mocc][id] = width;
175
  _wppaVideoNatHeight[mocc][id] = height;
 
176
  }
177
 
178
  // These functions check the validity and store the users request to be executed later if busy and if applicable.
@@ -1020,7 +1023,7 @@ function wppaMakeTheSlideHtml( mocc, bgfg, idx ) {
1020
 
1021
  // Before current slide // This does NOT work on lightbox 3 !
1022
  while ( i<idx ) {
1023
-
1024
  // Hi res?
1025
  if ( wppaOvlHires || ( wppaLightBox[mocc] != 'wppa' ) ) {
1026
  url = _wppaHiresUrl[mocc][i];
@@ -1067,7 +1070,7 @@ function wppaMakeTheSlideHtml( mocc, bgfg, idx ) {
1067
  // After current slide // This does NOT work on lightbox 3 !
1068
  i = idx + 1;
1069
  while ( i<_wppaUrl[mocc].length ) {
1070
-
1071
  // H ires?
1072
  if ( wppaOvlHires || ( wppaLightBox[mocc] != 'wppa' ) ) {
1073
  url = _wppaHiresUrl[mocc][i];
@@ -1636,13 +1639,13 @@ function _wppaUbb( mocc,where,act ) {
1636
  if ( where == 'l' ) jQuery( elm ).attr( 'title', wppaPreviousPhoto );
1637
  if ( where == 'r' ) jQuery( elm ).attr( 'title', wppaNextPhoto );
1638
  jQuery( '.ubb-'+mocc ).css( 'cursor', 'pointer' );
1639
- jQuery( '.ubb-'+mocc ).fadeTo( 200, 0.8 );
1640
  break;
1641
  case 'hide':
1642
  // jQuery( elm ).stop().fadeTo( 400, 0 );
1643
  jQuery( '.ubb-'+mocc ).removeAttr( 'title' );
1644
  jQuery( '.ubb-'+mocc ).css( 'cursor', 'default' );
1645
- jQuery( '.ubb-'+mocc ).fadeTo( 1000, 0 );
1646
  break;
1647
  case 'click':
1648
  var idx;
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.4.19';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
35
  ogdsc,
36
  hiresurl, // The url to the hi res ( source ) image file
37
  videohtml, // The html for the video, or ''
38
+ audiohtml,
39
+ waittext // The time you have to wait before you can vote again on the photo
40
  ) {
41
 
42
  var cursor;
85
  _wppaVideoNatHeight[mocc] = [];
86
  wppaVideoPlaying[mocc] = false;
87
  wppaAudioPlaying[mocc] = false;
88
+ _wppaWaitTexts[mocc] = [];
89
  }
90
 
91
  // Cursor
175
  _wppaAudioHtml[mocc][id] = audiohtml;
176
  _wppaVideoNatWidth[mocc][id] = width;
177
  _wppaVideoNatHeight[mocc][id] = height;
178
+ _wppaWaitTexts[mocc][id] = waittext;
179
  }
180
 
181
  // These functions check the validity and store the users request to be executed later if busy and if applicable.
1023
 
1024
  // Before current slide // This does NOT work on lightbox 3 !
1025
  while ( i<idx ) {
1026
+
1027
  // Hi res?
1028
  if ( wppaOvlHires || ( wppaLightBox[mocc] != 'wppa' ) ) {
1029
  url = _wppaHiresUrl[mocc][i];
1070
  // After current slide // This does NOT work on lightbox 3 !
1071
  i = idx + 1;
1072
  while ( i<_wppaUrl[mocc].length ) {
1073
+
1074
  // H ires?
1075
  if ( wppaOvlHires || ( wppaLightBox[mocc] != 'wppa' ) ) {
1076
  url = _wppaHiresUrl[mocc][i];
1639
  if ( where == 'l' ) jQuery( elm ).attr( 'title', wppaPreviousPhoto );
1640
  if ( where == 'r' ) jQuery( elm ).attr( 'title', wppaNextPhoto );
1641
  jQuery( '.ubb-'+mocc ).css( 'cursor', 'pointer' );
1642
+ jQuery( '.ubb-'+mocc ).stop().fadeTo( 200, 0.8 );
1643
  break;
1644
  case 'hide':
1645
  // jQuery( elm ).stop().fadeTo( 400, 0 );
1646
  jQuery( '.ubb-'+mocc ).removeAttr( 'title' );
1647
  jQuery( '.ubb-'+mocc ).css( 'cursor', 'default' );
1648
+ jQuery( '.ubb-'+mocc ).stop().fadeTo( 2000, 0 );
1649
  break;
1650
  case 'click':
1651
  var idx;
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.4.09';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){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;}
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="'+wppaTrimAlt(name)+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}}
@@ -15,7 +15,7 @@ else{_wppaSlides[mocc][id]+='style="'+size+'; cursor:'+cursor+'; display:none; v
15
  _wppaFullNames[mocc][id]=fullname;_wppaNames[mocc][id]=name;_wppaDsc[mocc][id]=desc;_wppaOgDsc[mocc][id]=ogdsc;_wppaId[mocc][id]=photoid;_wppaAvg[mocc][id]=avgrat;_wppaDisc[mocc][id]=discount;_wppaMyr[mocc][id]=myrat;_wppaVRU[mocc][id]=rateurl;_wppaLinkUrl[mocc][id]=linkurl;_wppaLinkTitle[mocc][id]=linktitle;if(linktarget!=''){_wppaLinkTarget[mocc][id]=linktarget;}
16
  else if(wppaSlideBlank[mocc]){_wppaLinkTarget[mocc][id]='_blank';}
17
  else{_wppaLinkTarget[mocc][id]='_self';}
18
- _wppaCommentHtml[mocc][id]=commenthtml;_wppaIptcHtml[mocc][id]=iptchtml;_wppaExifHtml[mocc][id]=exifhtml;_wppaUrl[mocc][id]=url;_wppaLbTitle[mocc][id]=wppaRepairScriptTags(lbtitle);_wppaShareUrl[mocc][id]=shareurl;_wppaShareHtml[mocc][id]=wppaRepairScriptTags(smhtml);_wppaHiresUrl[mocc][id]=hiresurl;_wppaVideoHtml[mocc][id]=videohtml;_wppaAudioHtml[mocc][id]=audiohtml;_wppaVideoNatWidth[mocc][id]=width;_wppaVideoNatHeight[mocc][id]=height;}
19
  function wppaSpeed(mocc,faster){if(_wppaSSRuns[mocc]){_wppaSpeed(mocc,faster);}}
20
  function wppaStopShow(mocc){if(_wppaSSRuns[mocc]){_wppaStop(mocc);}}
21
  function wppaStartStop(mocc,index){if(_wppaIsBusy[mocc]){_wppaTP[mocc]=index;}
@@ -177,7 +177,7 @@ var text=jQuery('#wppa-comment-'+mocc).val();if(text.length<1){alert(wppaPleaseC
177
  return true;}
178
  function _wppaGo(url){document.location=url;}
179
  function _wppaBbb(mocc,where,act){if(_wppaSSRuns[mocc])return;var elm='#bbb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.bbb-'+mocc).css('cursor','pointer');break;case'hide':jQuery('.bbb-'+mocc).removeAttr('title');jQuery('.bbb-'+mocc).css('cursor','default');break;case'click':if(where=='l')wppaPrev(mocc);if(where=='r')wppaNext(mocc);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
180
- function _wppaUbb(mocc,where,act){var elm='#ubb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.ubb-'+mocc).css('cursor','pointer');jQuery('.ubb-'+mocc).fadeTo(200,0.8);break;case'hide':jQuery('.ubb-'+mocc).removeAttr('title');jQuery('.ubb-'+mocc).css('cursor','default');jQuery('.ubb-'+mocc).fadeTo(1000,0);break;case'click':var idx;if(where=='l'){idx=_wppaCurIdx[mocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
181
  idx=_wppaSlides[mocc].length-1;}}
182
  if(where=='r'){idx=_wppaCurIdx[mocc]+1;if(idx==_wppaSlides[mocc].length){if(!wppaSlideWrap){return;}
183
  idx=0;}}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaJsSlideshowVersion='6.4.19';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){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]=[];}
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="'+wppaTrimAlt(name)+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}}
15
  _wppaFullNames[mocc][id]=fullname;_wppaNames[mocc][id]=name;_wppaDsc[mocc][id]=desc;_wppaOgDsc[mocc][id]=ogdsc;_wppaId[mocc][id]=photoid;_wppaAvg[mocc][id]=avgrat;_wppaDisc[mocc][id]=discount;_wppaMyr[mocc][id]=myrat;_wppaVRU[mocc][id]=rateurl;_wppaLinkUrl[mocc][id]=linkurl;_wppaLinkTitle[mocc][id]=linktitle;if(linktarget!=''){_wppaLinkTarget[mocc][id]=linktarget;}
16
  else if(wppaSlideBlank[mocc]){_wppaLinkTarget[mocc][id]='_blank';}
17
  else{_wppaLinkTarget[mocc][id]='_self';}
18
+ _wppaCommentHtml[mocc][id]=commenthtml;_wppaIptcHtml[mocc][id]=iptchtml;_wppaExifHtml[mocc][id]=exifhtml;_wppaUrl[mocc][id]=url;_wppaLbTitle[mocc][id]=wppaRepairScriptTags(lbtitle);_wppaShareUrl[mocc][id]=shareurl;_wppaShareHtml[mocc][id]=wppaRepairScriptTags(smhtml);_wppaHiresUrl[mocc][id]=hiresurl;_wppaVideoHtml[mocc][id]=videohtml;_wppaAudioHtml[mocc][id]=audiohtml;_wppaVideoNatWidth[mocc][id]=width;_wppaVideoNatHeight[mocc][id]=height;_wppaWaitTexts[mocc][id]=waittext;}
19
  function wppaSpeed(mocc,faster){if(_wppaSSRuns[mocc]){_wppaSpeed(mocc,faster);}}
20
  function wppaStopShow(mocc){if(_wppaSSRuns[mocc]){_wppaStop(mocc);}}
21
  function wppaStartStop(mocc,index){if(_wppaIsBusy[mocc]){_wppaTP[mocc]=index;}
177
  return true;}
178
  function _wppaGo(url){document.location=url;}
179
  function _wppaBbb(mocc,where,act){if(_wppaSSRuns[mocc])return;var elm='#bbb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.bbb-'+mocc).css('cursor','pointer');break;case'hide':jQuery('.bbb-'+mocc).removeAttr('title');jQuery('.bbb-'+mocc).css('cursor','default');break;case'click':if(where=='l')wppaPrev(mocc);if(where=='r')wppaNext(mocc);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
180
+ function _wppaUbb(mocc,where,act){var elm='#ubb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.ubb-'+mocc).css('cursor','pointer');jQuery('.ubb-'+mocc).stop().fadeTo(200,0.8);break;case'hide':jQuery('.ubb-'+mocc).removeAttr('title');jQuery('.ubb-'+mocc).css('cursor','default');jQuery('.ubb-'+mocc).stop().fadeTo(2000,0);break;case'click':var idx;if(where=='l'){idx=_wppaCurIdx[mocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
181
  idx=_wppaSlides[mocc].length-1;}}
182
  if(where=='r'){idx=_wppaCurIdx[mocc]+1;if(idx==_wppaSlides[mocc].length){if(!wppaSlideWrap){return;}
183
  idx=0;}}
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsUtilsVersion = '6.3.6';
6
  var wppaDebug;
7
 
8
  // Trim
@@ -146,7 +146,16 @@ function wppaStereoGlassChange( newval ) {
146
  function wppaConsoleLog( arg, force ) {
147
 
148
  if ( typeof( console ) != 'undefined' && ( wppaDebug || force == 'force' ) ) {
149
- console.log( arg );
 
 
 
 
 
 
 
 
 
150
  }
151
  }
152
 
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsUtilsVersion = '6.4.19';
6
  var wppaDebug;
7
 
8
  // Trim
146
  function wppaConsoleLog( arg, force ) {
147
 
148
  if ( typeof( console ) != 'undefined' && ( wppaDebug || force == 'force' ) ) {
149
+ var d = new Date();
150
+ var n = d.getTime();
151
+ var t = n % (24*60*60*1000); // msec this day
152
+ var h = Math.floor( t / ( 60*60*1000 ) ); // Hours this day
153
+ t -= h * 60*60*1000; // msec this hour
154
+ var m = Math.floor( t / ( 60*1000 ) ); // Minutes this hour
155
+ t -= m * 60*1000; // msec this minute
156
+ var s = Math.floor( t / 1000 ); // Sec this minute
157
+ t -= s * 1000; // msec this sec
158
+ console.log( 'At: ' + h + ':' + m + ':' + s + '.' + t + ' message: ' + arg );
159
  }
160
  }
161
 
js/wppa-utils.min.js CHANGED
@@ -3,7 +3,7 @@
3
  // conatins common vars and functions
4
  //
5
 
6
- var wppaJsUtilsVersion='6.3.6';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
  function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
  break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
  done=(oldStr==newStr);}
@@ -21,5 +21,5 @@ function wppa_getCookie(c_name){var i,x,y,ARRcookies=document.cookie.split(";");
21
  return"";}
22
  function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
  function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
- function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){console.log(arg);}}
25
  wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
3
  // conatins common vars and functions
4
  //
5
 
6
+ var wppaJsUtilsVersion='6.4.19';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
  function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
  break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
  done=(oldStr==newStr);}
21
  return"";}
22
  function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
  function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
+ function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){var d=new Date();var n=d.getTime();var t=n%(24*60*60*1000);var h=Math.floor(t/(60*60*1000));t-=h*60*60*1000;var m=Math.floor(t/(60*1000));t-=m*60*1000;var s=Math.floor(t/1000);t-=s*1000;console.log('At: '+h+':'+m+':'+s+'.'+t+' message: '+arg);}}
25
  wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.4.18';
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!!
@@ -189,6 +189,7 @@ var _wppaVideoHtml = [];
189
  var _wppaAudioHtml = [];
190
  var _wppaVideoNatWidth = [];
191
  var _wppaVideoNatHeight = [];
 
192
 
193
  var __wppaOverruleRun = false;
194
 
@@ -245,6 +246,13 @@ var wppaLastExif = '';
245
 
246
  // Init at dom ready
247
  jQuery( document ).ready(function() {
 
 
 
 
 
 
 
248
  var anyAutocol = false;
249
 
250
  // Check for occurrences that are responsive
@@ -256,22 +264,25 @@ jQuery( document ).ready(function() {
256
  }
257
  }
258
 
259
- // Misc. init
260
- _wppaTextDelay = wppaAnimationSpeed;
261
- if ( wppaFadeInAfterFadeOut ) _wppaTextDelay *= 2;
262
-
263
- // Install resize handler
264
- if ( anyAutocol ) {
265
- jQuery( window ).resize(function() {
266
- for ( mocc = 1; mocc <= wppaTopMoc; mocc++ ) {
267
- if ( wppaAutoColumnWidth[mocc] ) {
268
- wppaColWidth[mocc] = 0;
269
- _wppaDoAutocol( mocc );
 
 
 
270
  }
271
- }
272
- });
273
  }
274
- });
275
 
276
  // Initialize Ajax render partial page content with history update
277
  jQuery( document ).ready( function( e ) {
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.4.19';
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!!
189
  var _wppaAudioHtml = [];
190
  var _wppaVideoNatWidth = [];
191
  var _wppaVideoNatHeight = [];
192
+ var _wppaWaitTexts = [];
193
 
194
  var __wppaOverruleRun = false;
195
 
246
 
247
  // Init at dom ready
248
  jQuery( document ).ready(function() {
249
+ wppaDoInit( false );
250
+
251
+ // For browsers that signal domready too early for autocol, redo autocol
252
+ setTimeout( function() { wppaDoInit( true ); }, 1000 );
253
+ });
254
+
255
+ function wppaDoInit( autoOnly ) {
256
  var anyAutocol = false;
257
 
258
  // Check for occurrences that are responsive
264
  }
265
  }
266
 
267
+ if ( ! autoOnly ) {
268
+
269
+ // Misc. init
270
+ _wppaTextDelay = wppaAnimationSpeed;
271
+ if ( wppaFadeInAfterFadeOut ) _wppaTextDelay *= 2;
272
+
273
+ // Install resize handler
274
+ if ( anyAutocol ) {
275
+ jQuery( window ).resize(function() {
276
+ for ( mocc = 1; mocc <= wppaTopMoc; mocc++ ) {
277
+ if ( wppaAutoColumnWidth[mocc] ) {
278
+ wppaColWidth[mocc] = 0;
279
+ _wppaDoAutocol( mocc );
280
+ }
281
  }
282
+ });
283
+ }
284
  }
285
+ }
286
 
287
  // Initialize Ajax render partial page content with history update
288
  jQuery( document ).ready( function( e ) {
js/wppa.min.js CHANGED
@@ -3,8 +3,9 @@
3
  // conatins common vars and functions
4
  //
5
 
6
- var wppaJsVersion='6.4.18';var wppaVersion='0';var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaSlower;var wppaFaster;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaStartSymbolUrl='';var wppaPauseSymbolUrl='';var wppaStopSymbolUrl='';var wppaStartPauseSymbolSize='64';var wppaStartPauseSymbolBradius='32';var wppaStopSymbolSize='48';var wppaStopSumbolBradius='24';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlLeftSymbolUrl;var wppaOvlRightSymbolUrl;var wppaLeftRightSymbolSize=32;var wppaLeftRightSymbolBradius=4;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';jQuery(document).ready(function(){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
- _wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}});jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
 
8
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
9
  wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
10
  if(typeof(myLightbox)!='undefined'){if(typeof(myLightbox.updateImageList)=='function'){myLightbox.updateImageList();}}
3
  // conatins common vars and functions
4
  //
5
 
6
+ var wppaJsVersion='6.4.19';var wppaVersion='0';var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaSlower;var wppaFaster;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaStartSymbolUrl='';var wppaPauseSymbolUrl='';var wppaStopSymbolUrl='';var wppaStartPauseSymbolSize='64';var wppaStartPauseSymbolBradius='32';var wppaStopSymbolSize='48';var wppaStopSumbolBradius='24';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;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 __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlLeftSymbolUrl;var wppaOvlRightSymbolUrl;var wppaLeftRightSymbolSize=32;var wppaLeftRightSymbolBradius=4;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';jQuery(document).ready(function(){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
+ jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
9
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
10
  wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
11
  if(typeof(myLightbox)!='undefined'){if(typeof(myLightbox.updateImageList)=='function'){myLightbox.updateImageList();}}
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
- Version: 6.4.18
6
- Stable tag: 6.4.17
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -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: http://wppa.opajaap.nl/changelog/
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.4.18 =
184
 
185
  = Bug Fixes =
@@ -194,7 +218,7 @@ See for additional information: http://wppa.opajaap.nl/changelog/
194
 
195
  = Other Changes =
196
 
197
- * Twitter image can now post the image directly on twitter. For this feature to work, it is required to fill in a twitter account name in Table II-C13.1.
198
  There will no longer be pre-edited text in the tweet. There will be a subtitle to the image, but this does not count to the 140 chars. Leave the link in the tweet as it is.
199
  * Various performance improveents.
200
  * In shortcodes: album="$Albumname" will now return all albums with the supplied name.
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&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
+ Version: 6.4.19
6
+ Stable tag: 6.4.18
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
180
 
181
  See for additional information: http://wppa.opajaap.nl/changelog/
182
 
183
+ = 6.4.19 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * The display of thumbnails of any kind of virtual album will not have upload or create subalbum links.
188
+ * The display of the upload and create links can now be set at the top or bottom of the thumbnail area. Table II-D19.
189
+ * Settings in Table VII-A could no longer be changed. Fixed.
190
+ * Fixed a spurious filename issue when importing from local while filesystem is tree.
191
+
192
+ = New Features =
193
+
194
+ * Table VIII-A19.x allows you to move all photos from one album to another, without being timed out.
195
+ The move does not check for duplicates and does not update timestamps, but it does move sourcefiles if present.
196
+ * Table II-C7. You can select pages where no share buttons appear.
197
+ This is usefull for protected pages that require login.
198
+ Bots and crawlers are not logged in, so they can not find the photos to share.
199
+ * You can limit rating to once per hour/day/week in Table IV-E3.0
200
+
201
+ = Other Changes =
202
+
203
+ * Improved behaviour of ugly browse buttons, both on pc and mobile.
204
+ * Lighbox on mobile now always runs in (padded) fullscreen mode. There is only a quit icon in the upper right corner. You can swipe left/right to browse through the images.
205
+ * You can enter *all* in Table IX-A8 to make all settings runtime modifyable.
206
+
207
  = 6.4.18 =
208
 
209
  = Bug Fixes =
218
 
219
  = Other Changes =
220
 
221
+ * Twitter image can now post the image directly on twitter. For this feature to work, it is required to fill in a twitter account name in Table II-C13.1.
222
  There will no longer be pre-edited text in the tweet. There will be a subtitle to the image, but this does not count to the 140 chars. Leave the link in the tweet as it is.
223
  * Various performance improveents.
224
  * In shortcodes: album="$Albumname" will now return all albums with the supplied name.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.4.18
6
  *
7
  */
8
 
@@ -665,6 +665,13 @@ global $wppa_log_file;
665
  wppa_exit(); // Value out of range
666
  }
667
 
 
 
 
 
 
 
 
668
  // Get other data
669
  if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) ) ) {
670
  echo '0||999||'.__( 'Photo has been removed.' , 'wp-photo-album-plus');
@@ -1581,7 +1588,13 @@ global $wppa_log_file;
1581
  }
1582
 
1583
  // Save new source
1584
- wppa_save_source( $_FILES['photo']['tmp_name'], wppa_get_photo_item( $photo, 'filename' ), wppa_get_photo_item( $photo, 'album') );
 
 
 
 
 
 
1585
 
1586
  // Make proper oriented source
1587
  wppa_make_o1_source( $photo );
@@ -1711,7 +1724,7 @@ global $wppa_log_file;
1711
  echo $output;
1712
  wppa_exit();
1713
  }
1714
- elseif ( substr( $option, 0, 5 ) == 'caps-' ) { // Is capability setting
1715
  global $wp_roles;
1716
  //$R = new WP_Roles;
1717
  $setting = explode( '-', $option );
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.4.19
6
  *
7
  */
8
 
665
  wppa_exit(); // Value out of range
666
  }
667
 
668
+ // Check for one rating per period
669
+ $wait_text = wppa_get_rating_wait_text( $photo, wppa_get_user() );
670
+ if ( $wait_text ) {
671
+ echo '0||900||'.$wait_text; // 900 is recoverable error
672
+ wppa_exit();
673
+ }
674
+
675
  // Get other data
676
  if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) ) ) {
677
  echo '0||999||'.__( 'Photo has been removed.' , 'wp-photo-album-plus');
1588
  }
1589
 
1590
  // Save new source
1591
+ $filename = wppa_get_photo_item( $photo, 'filename' );
1592
+ // If very old, no filename, take new name
1593
+ if ( ! $filename ) {
1594
+ $filename = $_FILES['photo']['name'];
1595
+ wppa_update_photo( array( 'id' => $photo, 'filename' => $filename ) );
1596
+ }
1597
+ wppa_save_source( $_FILES['photo']['tmp_name'], $filename, wppa_get_photo_item( $photo, 'album') );
1598
 
1599
  // Make proper oriented source
1600
  wppa_make_o1_source( $photo );
1724
  echo $output;
1725
  wppa_exit();
1726
  }
1727
+ elseif ( substr( $option, 0, 10 ) == 'wppa_caps-' ) { // Is capability setting
1728
  global $wp_roles;
1729
  //$R = new WP_Roles;
1730
  $setting = explode( '-', $option );
wppa-album-covers.php CHANGED
@@ -1370,7 +1370,7 @@ function wppa_album_cover_view_link(
1370
 
1371
  if ( wppa_switch( 'show_viewlink' ) ) {
1372
  wppa_out(
1373
- '<div class="wppa-box-text wppa-black wppa-info wppa-viewlink">' );
1374
  if ( $has_content ) {
1375
 
1376
  // Fake photocount to prevent link to empty page
@@ -1389,14 +1389,14 @@ function wppa_album_cover_view_link(
1389
 
1390
  if ( $href_content == '#' ) {
1391
  wppa_out(
1392
- '<a onclick="' . $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus') . ' ' .
1393
  esc_attr( stripslashes( __( $album['name'] ) ) ) . '" style="cursor:pointer;' .
1394
  __wcs( 'wppa-box-text-nocolor' ) . '" >'
1395
  );
1396
  }
1397
  else {
1398
  wppa_out(
1399
- '<a href="' . $href_content . '" target="' . $target . '" onclick="' .
1400
  $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus') . ' ' .
1401
  esc_attr( stripslashes( __( $album['name'] ) ) ) .
1402
  '" style="cursor:pointer;' . __wcs( 'wppa-box-text-nocolor' ) . '" >'
@@ -1718,7 +1718,7 @@ function wppa_the_slideshow_browse_link( $photocount, $href_slideshow, $onclick_
1718
 
1719
  if ( wppa_switch( 'show_slideshowbrowselink' ) ) {
1720
  wppa_out(
1721
- '<div class="wppa-box-text wppa-black wppa-info wppa-slideshow-browse-link">'
1722
  );
1723
  if ( $photocount > wppa_get_mincount() ) {
1724
  $label = wppa_switch( 'enable_slideshow' ) ?
@@ -1726,13 +1726,13 @@ function wppa_the_slideshow_browse_link( $photocount, $href_slideshow, $onclick_
1726
  __( 'Browse photos', 'wp-photo-album-plus' );
1727
  if ( $href_slideshow == '#' ) {
1728
  wppa_out(
1729
- '<a onclick="' . $onclick_slideshow . '" title="' . $label . '" style="cursor:pointer;' .
1730
  __wcs( 'wppa-box-text-nocolor' ) . '" >' . $label . '</a>'
1731
  );
1732
  }
1733
  else {
1734
  wppa_out(
1735
- '<a href="' . $href_slideshow . '" target="' . $target . '" onclick="' .
1736
  $onclick_slideshow . '" title="' . $label . '" style="cursor:pointer;' .
1737
  __wcs( 'wppa-box-text-nocolor' ) . '" >' . $label . '</a>'
1738
  );
@@ -1759,7 +1759,7 @@ function wppa_the_album_cats( $alb ) {
1759
  $temp = explode( ',', $cats );
1760
  $ncats = count( $temp );
1761
  wppa_out(
1762
- '<div id="wppa-cats-' . $alb . '-' . wppa( 'mocc' ) . '" style="float:right" >' .
1763
  _n( 'Category:', 'Categories:', $ncats, 'wp-photo-album-plus' ) . '&nbsp;<b>' . $cats . '</b>' .
1764
  '</div>'
1765
  );
1370
 
1371
  if ( wppa_switch( 'show_viewlink' ) ) {
1372
  wppa_out(
1373
+ '<div class="wppa-box-text wppa-black wppa-info wppa-viewlink wppa-album-cover-link">' );
1374
  if ( $has_content ) {
1375
 
1376
  // Fake photocount to prevent link to empty page
1389
 
1390
  if ( $href_content == '#' ) {
1391
  wppa_out(
1392
+ '<a class="wppa-album-cover-link" onclick="' . $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus') . ' ' .
1393
  esc_attr( stripslashes( __( $album['name'] ) ) ) . '" style="cursor:pointer;' .
1394
  __wcs( 'wppa-box-text-nocolor' ) . '" >'
1395
  );
1396
  }
1397
  else {
1398
  wppa_out(
1399
+ '<a class="wppa-album-cover-link" href="' . $href_content . '" target="' . $target . '" onclick="' .
1400
  $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus') . ' ' .
1401
  esc_attr( stripslashes( __( $album['name'] ) ) ) .
1402
  '" style="cursor:pointer;' . __wcs( 'wppa-box-text-nocolor' ) . '" >'
1718
 
1719
  if ( wppa_switch( 'show_slideshowbrowselink' ) ) {
1720
  wppa_out(
1721
+ '<div class="wppa-box-text wppa-black wppa-info wppa-slideshow-browse-link wppa-album-cover-link">'
1722
  );
1723
  if ( $photocount > wppa_get_mincount() ) {
1724
  $label = wppa_switch( 'enable_slideshow' ) ?
1726
  __( 'Browse photos', 'wp-photo-album-plus' );
1727
  if ( $href_slideshow == '#' ) {
1728
  wppa_out(
1729
+ '<a class="wppa-album-cover-link" onclick="' . $onclick_slideshow . '" title="' . $label . '" style="cursor:pointer;' .
1730
  __wcs( 'wppa-box-text-nocolor' ) . '" >' . $label . '</a>'
1731
  );
1732
  }
1733
  else {
1734
  wppa_out(
1735
+ '<a class="wppa-album-cover-link" href="' . $href_slideshow . '" target="' . $target . '" onclick="' .
1736
  $onclick_slideshow . '" title="' . $label . '" style="cursor:pointer;' .
1737
  __wcs( 'wppa-box-text-nocolor' ) . '" >' . $label . '</a>'
1738
  );
1759
  $temp = explode( ',', $cats );
1760
  $ncats = count( $temp );
1761
  wppa_out(
1762
+ '<div id="wppa-cats-' . $alb . '-' . wppa( 'mocc' ) . '" class="wppa-album-cover-cats" style="float:right" >' .
1763
  _n( 'Category:', 'Categories:', $ncats, 'wp-photo-album-plus' ) . '&nbsp;<b>' . $cats . '</b>' .
1764
  '</div>'
1765
  );
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.4.18
7
  *
8
  */
9
 
@@ -49,20 +49,26 @@ function wppa_thumb_area( $action ) {
49
 
50
  // Toggle alt/even
51
  wppa_toggle_alt();
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
  // Cloase thumbnail area box
55
  elseif ( $action == 'close' ) {
56
 
57
  // Display create subalbum and upload photo links conditionally
58
- if ( ! wppa( 'is_upldr' ) &&
59
- ! wppa( 'searchstring' ) &&
60
- ! wppa( 'supersearch' ) &&
61
- ! wppa( 'calendar' ) ) {
62
 
63
  $alb = wppa( 'current_album' );
64
- wppa_user_create_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
65
- wppa_user_upload_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
66
  }
67
 
68
  // Clear both
@@ -1166,7 +1172,7 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1166
  '</td>' .
1167
  '</tr>';
1168
  }
1169
- $result .= '</table><hr style="margin: 3px 0;" />';
1170
  }
1171
 
1172
  $count = '0';
@@ -1224,6 +1230,10 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1224
  function wppa_get_share_html( $id, $key = '', $js = true ) {
1225
  global $wppa_locale;
1226
 
 
 
 
 
1227
  $do_it = false;
1228
  if ( ! wppa( 'is_slideonly' ) || $key == 'lightbox' ) {
1229
  if ( wppa_switch( 'share_on' ) && ! wppa_in_widget() ) $do_it = true;
@@ -1633,7 +1643,10 @@ function wppa_user_destroy_html( $alb, $width, $where, $rsp ) {
1633
 
1634
  // Make the html
1635
  wppa_out(
1636
- '<div style="clear:both">' .
 
 
 
1637
  '<a' .
1638
  ' style="float:left; cursor:pointer;"' .
1639
  ' onclick="' .
@@ -1722,7 +1735,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1722
  '<div style="clear:both"></div>' .
1723
  '<a' .
1724
  ' id="wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
1725
- ' class="wppa-create-' . $where . '"' .
1726
  ' onclick="' .
1727
  'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Create form
1728
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
@@ -1738,7 +1751,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1738
  '</a>' .
1739
  '<a' .
1740
  ' id="_wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
1741
- ' class="wppa-create-' . $where . '"' .
1742
  ' onclick="' .
1743
  'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create form
1744
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
@@ -1946,7 +1959,7 @@ static $seqno;
1946
  $result .=
1947
  '<a' .
1948
  ' id="wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1949
- ' class="wppa-upload-'.$where.'"' .
1950
  ' onclick="' .
1951
  'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Upload form
1952
  'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
@@ -1962,7 +1975,7 @@ static $seqno;
1962
  '</a>' .
1963
  '<a' .
1964
  ' id="_wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1965
- ' class="wppa-upload-'.$where.'"' .
1966
  ' onclick="' .
1967
  'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload form
1968
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
@@ -2350,7 +2363,7 @@ static $seqno;
2350
  ' type="submit"' .
2351
  ' id="wppa-user-submit-' . $alb . '-' . $mocc . '"' .
2352
  $onclick .
2353
- ' style="display:none; margin: 6px 0; float:right; '.__wcs( 'wppa-box-text' ).'"' .
2354
  ' class="wppa-user-submit"' .
2355
  ' name="wppa-user-submit-'.$alb.'-'.$mocc.'" value="'.__( 'Upload photo', 'wp-photo-album-plus' ).'"' .
2356
  ' />' .
@@ -2453,7 +2466,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
2453
 
2454
  $result = '
2455
  <div style="clear:both;"></div>
2456
- <a id="wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'" class="wppa-aedit-'.$where.'" onclick="'.
2457
  'jQuery( \'#wppa-fe-div-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Open the Edit form
2458
  'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
2459
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Create libk
@@ -2464,7 +2477,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
2464
  '" style="float:left; cursor:pointer;">
2465
  '.__( 'Edit albuminfo', 'wp-photo-album-plus' ).'
2466
  </a>
2467
- <a id="_wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'" class="wppa-aedit-'.$where.'" onclick="'.
2468
  'jQuery( \'#wppa-fe-div-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Edit form
2469
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Show the Create link
2470
  'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Show the Upload link
@@ -2560,7 +2573,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
2560
  ' type="submit"' .
2561
  ' name="wppa-albumeditsubmit"' .
2562
  ' class="wppa-user-submit"' .
2563
- ' style="margin: 6px 0; float:right; '.__wcs( 'wppa-box-text' ).'"' .
2564
  ' value="'.__( 'Update album', 'wp-photo-album-plus' ).'"' .
2565
  ' />
2566
  </form>
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.4.19
7
  *
8
  */
9
 
49
 
50
  // Toggle alt/even
51
  wppa_toggle_alt();
52
+
53
+ // Display create subalbum and upload photo links conditionally
54
+ if ( ! wppa_is_virtual() && wppa_opt( 'upload_link_thumbs' ) == 'top' ) {
55
+
56
+ $alb = wppa( 'current_album' );
57
+ $result .= wppa_get_user_create_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
58
+ $result .= wppa_get_user_upload_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
59
+ }
60
+
61
  }
62
 
63
  // Cloase thumbnail area box
64
  elseif ( $action == 'close' ) {
65
 
66
  // Display create subalbum and upload photo links conditionally
67
+ if ( ! wppa_is_virtual() && wppa_opt( 'upload_link_thumbs' ) == 'bottom' ) {
 
 
 
68
 
69
  $alb = wppa( 'current_album' );
70
+ $result .= wppa_get_user_create_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
71
+ $result .= wppa_get_user_upload_html( $alb, wppa_get_container_width( 'netto' ), 'thumb' );
72
  }
73
 
74
  // Clear both
1172
  '</td>' .
1173
  '</tr>';
1174
  }
1175
+ // $result .= '</table><hr style="margin: 3px 0;" />';
1176
  }
1177
 
1178
  $count = '0';
1230
  function wppa_get_share_html( $id, $key = '', $js = true ) {
1231
  global $wppa_locale;
1232
 
1233
+ $p = wppa_get_the_id();
1234
+ $p_void = explode( ',', wppa_opt( 'sm_void_pages' ) );
1235
+ if ( ! empty( $p_void ) && in_array( $p, $p_void ) ) return '';
1236
+
1237
  $do_it = false;
1238
  if ( ! wppa( 'is_slideonly' ) || $key == 'lightbox' ) {
1239
  if ( wppa_switch( 'share_on' ) && ! wppa_in_widget() ) $do_it = true;
1643
 
1644
  // Make the html
1645
  wppa_out(
1646
+ '<div' .
1647
+ ' class="wppa-album-cover-link"' .
1648
+ ' style="clear:both;"' .
1649
+ '>' .
1650
  '<a' .
1651
  ' style="float:left; cursor:pointer;"' .
1652
  ' onclick="' .
1735
  '<div style="clear:both"></div>' .
1736
  '<a' .
1737
  ' id="wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
1738
+ ' class="wppa-create-' . $where . ' wppa-album-cover-link"' .
1739
  ' onclick="' .
1740
  'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Create form
1741
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
1751
  '</a>' .
1752
  '<a' .
1753
  ' id="_wppa-cr-' . str_replace('.','-',$alb) . '-' . $mocc . '"' .
1754
+ ' class="wppa-create-' . $where . ' wppa-album-cover-link"' .
1755
  ' onclick="' .
1756
  'jQuery( \'#wppa-create-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create form
1757
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
1959
  $result .=
1960
  '<a' .
1961
  ' id="wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1962
+ ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
1963
  ' onclick="' .
1964
  'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Upload form
1965
  'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
1975
  '</a>' .
1976
  '<a' .
1977
  ' id="_wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1978
+ ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
1979
  ' onclick="' .
1980
  'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload form
1981
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
2363
  ' type="submit"' .
2364
  ' id="wppa-user-submit-' . $alb . '-' . $mocc . '"' .
2365
  $onclick .
2366
+ ' style="display:none; margin: 6px 0; float:right;"' .
2367
  ' class="wppa-user-submit"' .
2368
  ' name="wppa-user-submit-'.$alb.'-'.$mocc.'" value="'.__( 'Upload photo', 'wp-photo-album-plus' ).'"' .
2369
  ' />' .
2466
 
2467
  $result = '
2468
  <div style="clear:both;"></div>
2469
+ <a id="wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'" class="wppa-aedit-'.$where.' wppa-album-'.$where.'-link" onclick="'.
2470
  'jQuery( \'#wppa-fe-div-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Open the Edit form
2471
  'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
2472
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Create libk
2477
  '" style="float:left; cursor:pointer;">
2478
  '.__( 'Edit albuminfo', 'wp-photo-album-plus' ).'
2479
  </a>
2480
+ <a id="_wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'" class="wppa-aedit-'.$where.' wppa-album-'.$where.'-link" onclick="'.
2481
  'jQuery( \'#wppa-fe-div-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide the Edit form
2482
  'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Show the Create link
2483
  'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'block\' );'. // Show the Upload link
2573
  ' type="submit"' .
2574
  ' name="wppa-albumeditsubmit"' .
2575
  ' class="wppa-user-submit"' .
2576
+ ' style="margin: 6px 0; float:right; "' .
2577
  ' value="'.__( 'Update album', 'wp-photo-album-plus' ).'"' .
2578
  ' />
2579
  </form>
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -51,6 +51,7 @@ global $wppa_session;
51
  $alb = wppa_is_int( wppa( 'start_album' ) ) ?
52
  wppa( 'start_album' ) :
53
  '0'; // A single album or all ( all = 0 here )
 
54
 
55
  $is_albenum = strlen( wppa( 'start_album' ) ) > '0' && ! wppa_is_int( wppa( 'start_album' ) );
56
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 6.4.19
7
  *
8
  */
9
 
51
  $alb = wppa_is_int( wppa( 'start_album' ) ) ?
52
  wppa( 'start_album' ) :
53
  '0'; // A single album or all ( all = 0 here )
54
+ if ( $alb < '0' ) $alb = '0';
55
 
56
  $is_albenum = strlen( wppa( 'start_album' ) ) > '0' && ! wppa_is_int( wppa( 'start_album' ) );
57
 
wppa-exif-iptc-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
- * version 6.4.15
7
  *
8
  *
9
  */
@@ -417,7 +417,7 @@ global $wpdb;
417
  $in_use = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `" . WPPA_EXIF . "` WHERE `photo` <> '0' AND `tag` = %s", $item['tag'] ) );
418
  if ( ! $in_use ) {
419
  $wpdb->query( $wpdb->prepare( "DELETE FROM `" . WPPA_EXIF . "` WHERE `photo` = '0' AND `tag` = %s", $item['tag'] ) );
420
- wppa_log( 'dbg', 'Exif tag label ' . $item['tag'] . ' removed.' );
421
  }
422
  }
423
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
+ * version 6.4.19
7
  *
8
  *
9
  */
417
  $in_use = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `" . WPPA_EXIF . "` WHERE `photo` <> '0' AND `tag` = %s", $item['tag'] ) );
418
  if ( ! $in_use ) {
419
  $wpdb->query( $wpdb->prepare( "DELETE FROM `" . WPPA_EXIF . "` WHERE `photo` = '0' AND `tag` = %s", $item['tag'] ) );
420
+ // wppa_log( 'dbg', 'Exif tag label ' . $item['tag'] . ' removed.' );
421
  }
422
  }
423
  }
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via filter
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -249,6 +249,7 @@ function wppa_shortcodes( $xatts, $content = '' ) {
249
  global $wppa;
250
  global $wppa_postid;
251
  global $wppa_api_version;
 
252
 
253
  $atts = shortcode_atts( array(
254
  'type' => 'generic',
@@ -306,6 +307,9 @@ global $wppa_api_version;
306
  case 'version':
307
  return $wppa_api_version;
308
  break;
 
 
 
309
  case 'landing':
310
  $wppa['is_landing'] = '1';
311
  case 'generic':
@@ -566,7 +570,7 @@ global $wppa_opt;
566
  $allowed = explode( ',', wppa_opt( 'set_shortcodes' ) );
567
 
568
  // Valid item?
569
- if ( $atts['name'] && ! in_array( $atts['name'], $allowed ) ) {
570
  wppa_dbg_msg( $atts['name'] . ' is not a runtime settable configuration entity.', 'red', 'force' );
571
  }
572
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via filter
6
+ * Version 6.4.19
7
  *
8
  */
9
 
249
  global $wppa;
250
  global $wppa_postid;
251
  global $wppa_api_version;
252
+ global $wppa_revno;
253
 
254
  $atts = shortcode_atts( array(
255
  'type' => 'generic',
307
  case 'version':
308
  return $wppa_api_version;
309
  break;
310
+ case 'dbversion':
311
+ return $wppa_revno;
312
+ break;
313
  case 'landing':
314
  $wppa['is_landing'] = '1';
315
  case 'generic':
570
  $allowed = explode( ',', wppa_opt( 'set_shortcodes' ) );
571
 
572
  // Valid item?
573
+ if ( $atts['name'] && ! in_array( $atts['name'], $allowed ) && wppa_opt( 'set_shortcodes' ) != 'all' ) {
574
  wppa_dbg_msg( $atts['name'] . ' is not a runtime settable configuration entity.', 'red', 'force' );
575
  }
576
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
- * Version 6.4.18
7
  *
8
  */
9
 
@@ -22,7 +22,9 @@ global $wppa_session;
22
  // Diagnostics
23
  wppa_dbg_msg( 'Entering wppa_albums' );
24
  wppa_dbg_msg( 'Lang=' . $wppa_lang . ', Locale=' . $wppa_locale . ', Ajax=' . wppa( 'ajax' ) );
25
- wppa_dbg_msg( '$wppa_session = ' . serialize( $wppa_session ) );
 
 
26
 
27
  // List content filters
28
  // Data struct: $wp_filter[$tag][$priority][$idx] = array( 'function' => $function_to_add, 'accepted_args' => $accepted_args );
@@ -1667,6 +1669,7 @@ global $wppa_session;
1667
 
1668
  // Calendar?
1669
  elseif ( wppa( 'calendar' ) ) {
 
1670
  if ( wppa( 'start_album' ) ) {
1671
  $alb_clause = " AND `album` IN ( ". str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) ) ." ) ";
1672
  }
@@ -1677,7 +1680,7 @@ global $wppa_session;
1677
  case 'exifdtm':
1678
  $selection = "`exifdtm` LIKE '" . strip_tags( wppa( 'caldate' ) ) . "%' AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1679
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1680
- "WHERE " . $selection . $alb_clause . wppa_get_photo_order( '0' );
1681
  break;
1682
 
1683
  case 'timestamp':
@@ -1685,7 +1688,7 @@ global $wppa_session;
1685
  $t2 = $t1 + 24*60*60;
1686
  $selection = "`timestamp` >= $t1 AND `timestamp` < $t2 AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1687
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1688
- "WHERE " . $selection . $alb_clause . wppa_get_photo_order( '0' );
1689
  break;
1690
 
1691
  case 'modified':
@@ -1693,7 +1696,7 @@ global $wppa_session;
1693
  $t2 = $t1 + 24*60*60;
1694
  $selection = "`modified` >= $t1 AND `modified` < $t2 AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1695
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1696
- "WHERE " . $selection . $alb_clause . wppa_get_photo_order( '0' );
1697
  break;
1698
  }
1699
  }
@@ -1897,7 +1900,7 @@ static $user;
1897
  if ( wppa_switch( 'rating_on' ) && ! wppa( 'is_slideonly' ) && ! wppa( 'is_filmonly' ) ) {
1898
 
1899
  // Find my ( avg ) rating
1900
- $rats = $wpdb->get_results( $wpdb->prepare( "SELECT `value` FROM `".WPPA_RATING."` " .
1901
  "WHERE `photo` = %s AND `user` = %s AND `status` = 'publish'", $id, $user ), ARRAY_A );
1902
  if ( $rats ) {
1903
  $n = 0;
@@ -1905,13 +1908,17 @@ static $user;
1905
  foreach ( $rats as $rat ) {
1906
  $accu += $rat['value'];
1907
  $n++;
 
1908
  }
1909
  $myrat = $accu / $n;
1910
  $i = wppa_opt( 'rating_prec' );
1911
  $j = $i + '1';
1912
  $myrat = sprintf( '%'.$j.'.'.$i.'f', $myrat );
1913
  }
1914
- else $myrat = '0';
 
 
 
1915
 
1916
  // Find the avg rating
1917
  $avgrat = wppa_get_rating_by_id( $id, 'nolabel' );
@@ -1923,12 +1930,16 @@ static $user;
1923
 
1924
  // Make the discount textual
1925
  $distext = wppa_get_distext( $discount, $myrat );
 
 
 
1926
  }
1927
  else { // Rating off
1928
  $myrat = '0';
1929
  $avgrat = '0';
1930
  $discount = '0';
1931
  $distext = '';
 
1932
  }
1933
 
1934
 
@@ -2147,7 +2158,8 @@ static $user;
2147
  $result .= $ogdsc."','";
2148
  $result .= $hiresurl."','";
2149
  $result .= $videohtml."','";
2150
- $result .= $audiohtml."'";
 
2151
 
2152
  // This is an ingenious line of code that is going to prevent us from very much trouble.
2153
  // Created by OpaJaap on Jan 15 2012, 14:36 local time. Thanx.
@@ -4759,4 +4771,37 @@ function wppa_zoom_in( $id ) {
4759
  else return '';
4760
  }
4761
 
 
 
 
4762
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
+ * Version 6.4.19
7
  *
8
  */
9
 
22
  // Diagnostics
23
  wppa_dbg_msg( 'Entering wppa_albums' );
24
  wppa_dbg_msg( 'Lang=' . $wppa_lang . ', Locale=' . $wppa_locale . ', Ajax=' . wppa( 'ajax' ) );
25
+ wppa_dbg_msg( 'Get=' . serialize($_GET) );
26
+ wppa_dbg_msg( 'Post=' . serialize($_POST) );
27
+ // wppa_dbg_msg( '$wppa_session = ' . serialize( $wppa_session ) );
28
 
29
  // List content filters
30
  // Data struct: $wp_filter[$tag][$priority][$idx] = array( 'function' => $function_to_add, 'accepted_args' => $accepted_args );
1669
 
1670
  // Calendar?
1671
  elseif ( wppa( 'calendar' ) ) {
1672
+ $order = wppa_is_int( wppa( 'start_album' ) ) ? wppa_get_photo_order( wppa( 'start_album' ) ) : wppa_get_photo_order( '0' );
1673
  if ( wppa( 'start_album' ) ) {
1674
  $alb_clause = " AND `album` IN ( ". str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) ) ." ) ";
1675
  }
1680
  case 'exifdtm':
1681
  $selection = "`exifdtm` LIKE '" . strip_tags( wppa( 'caldate' ) ) . "%' AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1682
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1683
+ "WHERE " . $selection . $alb_clause . $order;
1684
  break;
1685
 
1686
  case 'timestamp':
1688
  $t2 = $t1 + 24*60*60;
1689
  $selection = "`timestamp` >= $t1 AND `timestamp` < $t2 AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1690
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1691
+ "WHERE " . $selection . $alb_clause . $order;
1692
  break;
1693
 
1694
  case 'modified':
1696
  $t2 = $t1 + 24*60*60;
1697
  $selection = "`modified` >= $t1 AND `modified` < $t2 AND `status` <> 'pending' AND `status` <> 'scheduled' ";
1698
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1699
+ "WHERE " . $selection . $alb_clause . $order;
1700
  break;
1701
  }
1702
  }
1900
  if ( wppa_switch( 'rating_on' ) && ! wppa( 'is_slideonly' ) && ! wppa( 'is_filmonly' ) ) {
1901
 
1902
  // Find my ( avg ) rating
1903
+ $rats = $wpdb->get_results( $wpdb->prepare( "SELECT `value`, `timestamp` FROM `".WPPA_RATING."` " .
1904
  "WHERE `photo` = %s AND `user` = %s AND `status` = 'publish'", $id, $user ), ARRAY_A );
1905
  if ( $rats ) {
1906
  $n = 0;
1908
  foreach ( $rats as $rat ) {
1909
  $accu += $rat['value'];
1910
  $n++;
1911
+ $my_youngest_rating_dtm = $rat['timestamp'];
1912
  }
1913
  $myrat = $accu / $n;
1914
  $i = wppa_opt( 'rating_prec' );
1915
  $j = $i + '1';
1916
  $myrat = sprintf( '%'.$j.'.'.$i.'f', $myrat );
1917
  }
1918
+ else {
1919
+ $myrat = '0';
1920
+ $my_youngest_rating_dtm = 0;
1921
+ }
1922
 
1923
  // Find the avg rating
1924
  $avgrat = wppa_get_rating_by_id( $id, 'nolabel' );
1930
 
1931
  // Make the discount textual
1932
  $distext = wppa_get_distext( $discount, $myrat );
1933
+
1934
+ // Test if rating is one per period and period not expired yet
1935
+ $wait_text = esc_js( wppa_get_rating_wait_text( $id, $user ) );
1936
  }
1937
  else { // Rating off
1938
  $myrat = '0';
1939
  $avgrat = '0';
1940
  $discount = '0';
1941
  $distext = '';
1942
+ $wait_text = '';
1943
  }
1944
 
1945
 
2158
  $result .= $ogdsc."','";
2159
  $result .= $hiresurl."','";
2160
  $result .= $videohtml."','";
2161
+ $result .= $audiohtml."','";
2162
+ $result .= $wait_text."'";
2163
 
2164
  // This is an ingenious line of code that is going to prevent us from very much trouble.
2165
  // Created by OpaJaap on Jan 15 2012, 14:36 local time. Thanx.
4771
  else return '';
4772
  }
4773
 
4774
+ // Test if rating is one per period and period not expired yet
4775
+ function wppa_get_rating_wait_text( $id, $user ) {
4776
+ global $wpdb;
4777
 
4778
+ $my_youngest_rating_dtm = $wpdb->get_var( $wpdb->prepare( "SELECT `timestamp` FROM `" . WPPA_RATING . "` WHERE `photo` = %s AND `user` = %s ORDER BY `timestamp` DESC LIMIT 1", $id, $user ) );
4779
+
4780
+ if ( ! $my_youngest_rating_dtm ) return ''; // Not votes yet
4781
+
4782
+ $period = wppa_opt( 'rating_dayly' );
4783
+ $wait_text = '';
4784
+ if ( $period ) {
4785
+ $time_to_wait = $my_youngest_rating_dtm + $period - time();
4786
+ if ( $time_to_wait > 0 ) {
4787
+ $t = $time_to_wait;
4788
+ $d = floor( $t / (24*3600) );
4789
+ $t = $t % (24*3600);
4790
+ $h = floor( $t / 3600 );
4791
+ $t = $t % 3600;
4792
+ $m = floor( $t / 60 );
4793
+ $t = $t % 60;
4794
+ $s = $t;
4795
+ if ( $time_to_wait > (24*3600) ) {
4796
+ $wait_text = sprintf( __( 'You can vote again after %s days, %s hours, %s minutes and %s seconds', 'wp-photo-album-plus' ), $d, $h, $m, $s );
4797
+ }
4798
+ elseif ( $time_to_wait > 3600 ) {
4799
+ $wait_text = sprintf( __( 'You can vote again after %s hours, %s minutes and %s seconds', 'wp-photo-album-plus' ), $h, $m, $s );
4800
+ }
4801
+ else {
4802
+ $wait_text = sprintf( __( 'You can vote again after %s minutes and %s seconds', 'wp-photo-album-plus' ), $m, $s );
4803
+ }
4804
+ }
4805
+ }
4806
+ return $wait_text;
4807
+ }
wppa-htaccess.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
- * Version 6.4.00
7
  *
8
  */
9
 
@@ -20,7 +20,7 @@ function wppa_create_wppa_htaccess() {
20
  }
21
  function wppa_create_wppa_htaccess_( $filename ) {
22
 
23
- switch ( wppa_opt( 'cre_uploads_htaccess' ) ) {
24
 
25
  // Grant access
26
  case 'grant':
@@ -34,7 +34,7 @@ function wppa_create_wppa_htaccess_( $filename ) {
34
  fclose( $file );
35
  }
36
  break;
37
-
38
  // No hotlink
39
  case 'nohot':
40
  $domain = site_url();
@@ -68,7 +68,7 @@ RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F]
68
  fclose( $file );
69
  }
70
  break;
71
-
72
  // Destroy it
73
  case 'remove':
74
  @ unlink( $filename );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
+ * Version 6.4.19
7
  *
8
  */
9
 
20
  }
21
  function wppa_create_wppa_htaccess_( $filename ) {
22
 
23
+ switch ( get_option( 'wppa_cre_uploads_htaccess' ) ) {
24
 
25
  // Grant access
26
  case 'grant':
34
  fclose( $file );
35
  }
36
  break;
37
+
38
  // No hotlink
39
  case 'nohot':
40
  $domain = site_url();
68
  fclose( $file );
69
  }
70
  break;
71
+
72
  // Destroy it
73
  case 'remove':
74
  @ unlink( $filename );
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -55,7 +55,7 @@ global $wppa_lang;
55
  if ( wppa( 'ajax' ) ) {
56
  if ( wppa_get_get( 'page_id' ) ) $id = wppa_get_get( 'page_id' );
57
  elseif ( wppa_get_get( 'p' ) ) $id = wppa_get_get( 'p' );
58
- elseif ( wppa_get_get( 'wppa-fromp' ) ) $id = wppa_get_get( 'wppa-fromp' );
59
  else $id = '';
60
  $pl = get_permalink( intval( $id ) );
61
  if ( $plain ) return $pl;
@@ -120,7 +120,7 @@ global $wppa_lang;
120
  if ( wppa_get_get( 'page_id' ) ) $al .= '&amp;page_id=' . wppa_get_get( 'page_id' );
121
  }
122
  if ( wppa_get_get( 'p' ) ) $al .= '&amp;p=' . wppa_get_get( 'p' );
123
- if ( wppa_get_get( 'fromp' ) ) $al .= '&amp;wppa-fromp=' . wppa_get_get( 'wppa-fromp' );
124
  }
125
  else { // directly from a page or post
126
  $al .= '&amp;wppa-size='.wppa_get_container_width();
@@ -1092,7 +1092,7 @@ function wppa_album_download_link( $albumid ) {
1092
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1093
 
1094
  wppa_out( '<div style="clear:both;" ></div>' );
1095
- wppa_out( '<a onclick="wppaAjaxDownloadAlbum('.wppa( 'mocc' ).', \''.wppa_encrypt_album($albumid).'\' );" style="cursor:pointer;" title="'.__('Download', 'wp-photo-album-plus').'">'.__('Download album', 'wp-photo-album-plus').'</a>' );
1096
  wppa_out( '<img id="dwnspin-'.wppa( 'mocc' ).'-'.$albumid.'" src="'.wppa_get_imgdir().'wpspin.gif" style="margin-left:6px; display:none;" alt="spin" />' );
1097
  }
1098
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 6.4.19
7
  *
8
  */
9
 
55
  if ( wppa( 'ajax' ) ) {
56
  if ( wppa_get_get( 'page_id' ) ) $id = wppa_get_get( 'page_id' );
57
  elseif ( wppa_get_get( 'p' ) ) $id = wppa_get_get( 'p' );
58
+ elseif ( wppa_get_get( 'fromp' ) ) $id = wppa_get_get( 'fromp' );
59
  else $id = '';
60
  $pl = get_permalink( intval( $id ) );
61
  if ( $plain ) return $pl;
120
  if ( wppa_get_get( 'page_id' ) ) $al .= '&amp;page_id=' . wppa_get_get( 'page_id' );
121
  }
122
  if ( wppa_get_get( 'p' ) ) $al .= '&amp;p=' . wppa_get_get( 'p' );
123
+ if ( wppa_get_get( 'fromp' ) ) $al .= '&amp;wppa-fromp=' . wppa_get_get( 'fromp' );
124
  }
125
  else { // directly from a page or post
126
  $al .= '&amp;wppa-size='.wppa_get_container_width();
1092
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1093
 
1094
  wppa_out( '<div style="clear:both;" ></div>' );
1095
+ wppa_out( '<a onclick="wppaAjaxDownloadAlbum('.wppa( 'mocc' ).', \''.wppa_encrypt_album($albumid).'\' );" style="cursor:pointer;" class="wppa-album-cover-link" title="'.__('Download', 'wp-photo-album-plus').'">'.__('Download album', 'wp-photo-album-plus').'</a>' );
1096
  wppa_out( '<img id="dwnspin-'.wppa( 'mocc' ).'-'.$albumid.'" src="'.wppa_get_imgdir().'wpspin.gif" style="margin-left:6px; display:none;" alt="spin" />' );
1097
  }
1098
 
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -56,6 +56,7 @@ global $wppa_supported_audio_extensions;
56
  'wppa_crypt_albums',
57
  'wppa_create_o1_files',
58
  'wppa_owner_to_name_proc',
 
59
 
60
 
61
  );
@@ -153,7 +154,23 @@ global $wppa_supported_audio_extensions;
153
  echo __( 'Feature must be enabled in Table IV-A28 first', 'wp-photo-album-plus' ).'||'.$slug.'||||||';
154
  wppa_exit();
155
  }
156
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  }
159
  wppa_save_session();
@@ -245,6 +262,7 @@ global $wppa_supported_audio_extensions;
245
  case 'wppa_test_proc':
246
  case 'wppa_create_o1_files':
247
  case 'wppa_owner_to_name_proc':
 
248
 
249
  // Process photos
250
  $table = WPPA_PHOTOS;
@@ -598,8 +616,20 @@ global $wppa_supported_audio_extensions;
598
  if ( $iret === '0' ) {
599
  $wppa_session[$slug.'_skipped']++;
600
  }
 
601
 
602
-
 
 
 
 
 
 
 
 
 
 
 
603
 
604
  case 'wppa_test_proc':
605
  $tags = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.4.19
7
  *
8
  */
9
 
56
  'wppa_crypt_albums',
57
  'wppa_create_o1_files',
58
  'wppa_owner_to_name_proc',
59
+ 'wppa_move_all_photos',
60
 
61
 
62
  );
154
  echo __( 'Feature must be enabled in Table IV-A28 first', 'wp-photo-album-plus' ).'||'.$slug.'||||||';
155
  wppa_exit();
156
  }
157
+ break;
158
+ case 'wppa_move_all_photos':
159
+ $fromalb = get_option( 'wppa_move_all_photos_from' );
160
+ if ( ! wppa_album_exists( $fromalb ) ) {
161
+ echo sprintf(__( 'From album %d does not exist', 'wp-photo-album-plus' ), $fromalb );
162
+ wppa_exit();
163
+ }
164
+ $toalb = get_option( 'wppa_move_all_photos_to' );
165
+ if ( ! wppa_album_exists( $toalb ) ) {
166
+ echo sprintf(__( 'To album %d does not exist', 'wp-photo-album-plus' ), $toalb );
167
+ wppa_exit();
168
+ }
169
+ if ( $fromalb == $toalb ) {
170
+ echo __( 'From and To albums are identical', 'wp-photo-album-plus' );
171
+ wppa_exit();
172
+ }
173
+ break;
174
 
175
  }
176
  wppa_save_session();
262
  case 'wppa_test_proc':
263
  case 'wppa_create_o1_files':
264
  case 'wppa_owner_to_name_proc':
265
+ case 'wppa_move_all_photos':
266
 
267
  // Process photos
268
  $table = WPPA_PHOTOS;
616
  if ( $iret === '0' ) {
617
  $wppa_session[$slug.'_skipped']++;
618
  }
619
+ break;
620
 
621
+ case 'wppa_move_all_photos':
622
+ $fromalb = get_option( 'wppa_move_all_photos_from' );
623
+ $toalb = get_option( 'wppa_move_all_photos_to' );
624
+ $alb = wppa_get_photo_item( $id, 'album' );
625
+ if ( $alb == $fromalb ) {
626
+ wppa_update_photo( array( 'id' => $id, 'album' => $toalb ) );
627
+ wppa_move_source( wppa_get_photo_item( $id, 'filename' ), $fromalb, $toalb );
628
+ wppa_flush_treecounts( $fromalb );
629
+ wppa_flush_treecounts( $toalb );
630
+ $wppa_session[$slug.'_fixed']++;
631
+ }
632
+ break;
633
 
634
  case 'wppa_test_proc':
635
  $tags = '';
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -72,7 +72,7 @@ global $wpdb;
72
  // Share info for sm that uses og
73
  $id = wppa_get_get( 'photo' );
74
  if ( $id ) {
75
-
76
  // SM may not accept images from the cloud.
77
  wppa( 'for_sm', true );
78
  $imgurl = wppa_get_photo_url( $id );
@@ -107,7 +107,7 @@ global $wpdb;
107
  }
108
  if ( wppa_switch( 'share_twitter' ) && wppa_opt( 'twitter_account' ) ) {
109
  $thumb = wppa_cache_thumb( $id );
110
-
111
  // Twitter wants at least 280px in width, and at least 150px in height
112
  if ( $thumb ) {
113
  $x = wppa_get_photo_item( $id, 'photox' );
@@ -120,15 +120,15 @@ global $wpdb;
120
  $site = get_bloginfo('name');
121
 
122
  echo '
123
- <!-- WPPA+ Twitter Share data -->
124
  <meta name="twitter:card" content="summary_large_image">
125
  <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
126
  <meta name="twitter:creator" content="' . wppa_opt( 'twitter_account' ) . '">
127
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
128
  <meta name="twitter:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
129
  <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
130
- <!-- WPPA+ End Twitter Share data -->
131
- ';
132
  }
133
  elseif ( $thumb && $x >= 120 && $y >= 120 ) {
134
  $title = wppa_get_photo_name( $id );
@@ -137,15 +137,15 @@ global $wpdb;
137
  $site = get_bloginfo('name');
138
 
139
  echo '
140
- <!-- WPPA+ Twitter Share data -->
141
  <meta name="twitter:card" content="summary">
142
  <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
143
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
144
  <meta name="twitter:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
145
  <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
146
- <!-- WPPA+ End Twitter Share data -->
147
- ';
148
-
149
  }
150
  }
151
  }
@@ -461,7 +461,7 @@ global $wppa_session;
461
  echo '
462
  <script type="text/javascript">
463
  jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
464
- wppaOvlModeInitial = "'.wppa_opt( 'ovl_mode_initial' ).'";
465
  wppaOvlTxtHeight = "'.$ovlh.'";
466
  wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
467
  wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
@@ -483,6 +483,7 @@ global $wppa_session;
483
  wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
484
  wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
485
  wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
 
486
  </script>
487
  ';
488
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.4.19
7
  *
8
  */
9
 
72
  // Share info for sm that uses og
73
  $id = wppa_get_get( 'photo' );
74
  if ( $id ) {
75
+
76
  // SM may not accept images from the cloud.
77
  wppa( 'for_sm', true );
78
  $imgurl = wppa_get_photo_url( $id );
107
  }
108
  if ( wppa_switch( 'share_twitter' ) && wppa_opt( 'twitter_account' ) ) {
109
  $thumb = wppa_cache_thumb( $id );
110
+
111
  // Twitter wants at least 280px in width, and at least 150px in height
112
  if ( $thumb ) {
113
  $x = wppa_get_photo_item( $id, 'photox' );
120
  $site = get_bloginfo('name');
121
 
122
  echo '
123
+ <!-- WPPA+ Twitter Share data -->
124
  <meta name="twitter:card" content="summary_large_image">
125
  <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
126
  <meta name="twitter:creator" content="' . wppa_opt( 'twitter_account' ) . '">
127
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
128
  <meta name="twitter:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
129
  <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
130
+ <!-- WPPA+ End Twitter Share data -->
131
+ ';
132
  }
133
  elseif ( $thumb && $x >= 120 && $y >= 120 ) {
134
  $title = wppa_get_photo_name( $id );
137
  $site = get_bloginfo('name');
138
 
139
  echo '
140
+ <!-- WPPA+ Twitter Share data -->
141
  <meta name="twitter:card" content="summary">
142
  <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
143
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
144
  <meta name="twitter:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
145
  <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
146
+ <!-- WPPA+ End Twitter Share data -->
147
+ ';
148
+
149
  }
150
  }
151
  }
461
  echo '
462
  <script type="text/javascript">
463
  jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
464
+ wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? 'padded' : wppa_opt( 'ovl_mode_initial' ) ).'";
465
  wppaOvlTxtHeight = "'.$ovlh.'";
466
  wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
467
  wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
483
  wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
484
  wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
485
  wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
486
+ wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
487
  </script>
488
  ';
489
  }
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -798,7 +798,7 @@ global $wpdb;
798
  ?>
799
  <tr>
800
  <th>
801
- <label><?php echo wppa_opt( 'custom_caption_'.$key ) . ':<br /><small>(w#cc'.$key.')</small>' ?></label>
802
  </th>
803
  <td>
804
  <?php echo '<small>(w#cd'.$key.')</small>' ?>
@@ -1879,16 +1879,16 @@ function wppa_fe_edit_new_style( $photo ) {
1879
  $titles = array( __( 'Name', 'wp-photo-album-plus' ),
1880
  __( 'Description', 'wp-photo-album-plus' ),
1881
  __( 'Tags', 'wp-photo-album-plus' ),
1882
- wppa_opt( 'custom_caption_0' ),
1883
- wppa_opt( 'custom_caption_1' ),
1884
- wppa_opt( 'custom_caption_2' ),
1885
- wppa_opt( 'custom_caption_3' ),
1886
- wppa_opt( 'custom_caption_4' ),
1887
- wppa_opt( 'custom_caption_5' ),
1888
- wppa_opt( 'custom_caption_6' ),
1889
- wppa_opt( 'custom_caption_7' ),
1890
- wppa_opt( 'custom_caption_8' ),
1891
- wppa_opt( 'custom_caption_9' ),
1892
  );
1893
  $types = array( 'text',
1894
  'textarea',
@@ -1987,7 +1987,7 @@ function wppa_fe_edit_new_style( $photo ) {
1987
  ' id="' . $items[$idx] . '"' .
1988
  ' name="' . $items[$idx] . '"' .
1989
  ' >' .
1990
- esc_textarea( $value ) .
1991
  '</textarea>';
1992
  }
1993
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.4.19
7
  *
8
  */
9
 
798
  ?>
799
  <tr>
800
  <th>
801
+ <label><?php echo apply_filters( 'translate_text', wppa_opt( 'custom_caption_'.$key ) ) . ':<br /><small>(w#cc'.$key.')</small>' ?></label>
802
  </th>
803
  <td>
804
  <?php echo '<small>(w#cd'.$key.')</small>' ?>
1879
  $titles = array( __( 'Name', 'wp-photo-album-plus' ),
1880
  __( 'Description', 'wp-photo-album-plus' ),
1881
  __( 'Tags', 'wp-photo-album-plus' ),
1882
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_0' ) ),
1883
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_1' ) ),
1884
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_2' ) ),
1885
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_3' ) ),
1886
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_4' ) ),
1887
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_5' ) ),
1888
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_6' ) ),
1889
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_7' ) ),
1890
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_8' ) ),
1891
+ apply_filters( 'translate_text', wppa_opt( 'custom_caption_9' ) ),
1892
  );
1893
  $types = array( 'text',
1894
  'textarea',
1987
  ' id="' . $items[$idx] . '"' .
1988
  ' name="' . $items[$idx] . '"' .
1989
  ' >' .
1990
+ esc_textarea( stripslashes( $value ) ) .
1991
  '</textarea>';
1992
  }
1993
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.4.18
7
  *
8
  */
9
 
@@ -102,7 +102,7 @@ global $wp_version;
102
 
103
  check_admin_referer( 'wppa-nonce', 'wppa-nonce' );
104
  $key = $_REQUEST['wppa-key'];
105
- $sub = $_REQUEST['wppa-sub'];
106
 
107
  // Switch on action key
108
  switch ( $key ) {
@@ -491,6 +491,52 @@ global $wp_version;
491
  }
492
  ?>
493
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  <div class="wppa-quick" style="display:none;" >
495
  <?php // Table 0: Quick Setup ?>
496
  <?php wppa_settings_box_header(
@@ -518,7 +564,7 @@ global $wp_version;
518
 
519
  $clas = '';
520
  $tags = '';
521
- wppa_setting_subheader( '', '1', __('To quickly setup WPPA+ please answer the following questions. You can alway change any setting later. <span style="color:#700">Click on me!</span>', 'wp-photo-album-plus'));
522
  {
523
  $name = __('Is your theme <i>responsive</i>?', 'wp-photo-album-plus');
524
  $desc = __('Responsive themes have a layout that varies with the size of the browser window.', 'wp-photo-album-plus');
@@ -1929,6 +1975,21 @@ global $wp_version;
1929
  $tags = 'sm,layout';
1930
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
1931
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1932
  $name = __('Show QR Code', 'wp-photo-album-plus');
1933
  $desc = __('Display the QR code in the share box.', 'wp-photo-album-plus');
1934
  $help = '';
@@ -2056,6 +2117,7 @@ global $wp_version;
2056
  $clas = 'wppa_share';
2057
  $tags = 'system,sm';
2058
  wppa_setting($slug, '99', $name, $desc, $html, $help, $clas, $tags);
 
2059
  }
2060
  wppa_setting_subheader( 'D', '1', __( 'Thumbnail display related visibility settings' , 'wp-photo-album-plus') );
2061
  {
@@ -2243,6 +2305,17 @@ global $wp_version;
2243
  $tags = 'thumb';
2244
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
2245
 
 
 
 
 
 
 
 
 
 
 
 
2246
  }
2247
  wppa_setting_subheader( 'E', '1', __( 'Album cover related visibility settings' , 'wp-photo-album-plus') );
2248
  {
@@ -4129,6 +4202,17 @@ global $wp_version;
4129
  $tags = 'rating';
4130
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
4131
 
 
 
 
 
 
 
 
 
 
 
 
4132
  $name = __('Rate own photos', 'wp-photo-album-plus');
4133
  $desc = __('It is allowed to rate photos by the uploader himself.', 'wp-photo-album-plus');
4134
  $help = '';
@@ -4899,49 +4983,6 @@ global $wp_version;
4899
 
4900
  */
4901
 
4902
- // Linkpages
4903
- $options_page = false;
4904
- $options_page_post = false;
4905
- $values_page = false;
4906
- $values_page_post = false;
4907
- // First
4908
- $options_page_post[] = __('--- The same post or page ---', 'wp-photo-album-plus');
4909
- $values_page_post[] = '0';
4910
- $options_page[] = __('--- Please select a page ---', 'wp-photo-album-plus');
4911
- $values_page[] = '0';
4912
- // Pages if any
4913
- $query = "SELECT ID, post_title, post_content, post_parent FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' ORDER BY post_title ASC";
4914
- $pages = $wpdb->get_results ($query, ARRAY_A);
4915
- if ($pages) {
4916
- if ( wppa_switch( 'hier_pagesel') ) $pages = wppa_add_parents($pages);
4917
- else { // Just translate
4918
- foreach ( array_keys($pages) as $index ) {
4919
- $pages[$index]['post_title'] = __(stripslashes($pages[$index]['post_title']), 'wp-photo-album-plus');
4920
- }
4921
- }
4922
- $pages = wppa_array_sort($pages, 'post_title');
4923
- foreach ($pages as $page) {
4924
- if (strpos($page['post_content'], '%%wppa%%') !== false || strpos($page['post_content'], '[wppa') !== false) {
4925
- $options_page[] = __($page['post_title'], 'wp-photo-album-plus');
4926
- $options_page_post[] = __($page['post_title'], 'wp-photo-album-plus');
4927
- $values_page[] = $page['ID'];
4928
- $values_page_post[] = $page['ID'];
4929
- }
4930
- else {
4931
- $options_page[] = '|'.__($page['post_title'], 'wp-photo-album-plus').'|';
4932
- $options_page_post[] = '|'.__($page['post_title'], 'wp-photo-album-plus').'|';
4933
- $values_page[] = $page['ID'];
4934
- $values_page_post[] = $page['ID'];
4935
- }
4936
- }
4937
- }
4938
- else {
4939
- $options_page[] = __('--- No page to link to (yet) ---', 'wp-photo-album-plus');
4940
- $values_page[] = '0';
4941
- }
4942
-
4943
- $options_page_auto = $options_page;
4944
- $options_page_auto[0] = __('--- Will be auto created ---', 'wp-photo-album-plus');
4945
 
4946
  wppa_setting_subheader('A', '4', __('Links from images in WPPA+ Widgets', 'wp-photo-album-plus'));
4947
  {
@@ -7149,6 +7190,73 @@ global $wp_version;
7149
  $tags = 'system';
7150
  wppa_setting(false, '18', $name, $desc, $html, $help, $clas, $tags);
7151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7152
  /*
7153
  $name = __('Test proc');
7154
  $desc = __('For OpaJaap only');
@@ -9642,11 +9750,11 @@ function wppa_checkbox_e($xslug, $curval, $onchange = '', $class = '', $enabled
9642
  $html = '<input style="float:left; height: 15px; margin: 0px; padding: 0px;" type="checkbox" id="'.$slug.'"';
9643
  if ($curval) $html .= ' checked="checked"';
9644
  if ( ! $enabled ) $html .= ' disabled="disabled"';
9645
- if ($onchange != '') $html .= ' onchange="'.$onchange.';wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this)"';
9646
- else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this)"';
9647
 
9648
  if ($class != '') $html .= ' class="'.$class.'"';
9649
- $html .= ' /><img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.png" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;"';
9650
  if ($class != '') $html .= ' class="'.$class.'"';
9651
  $html .= ' />';
9652
 
@@ -9669,9 +9777,7 @@ global $wppa_opt;
9669
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
9670
 
9671
  $html = '<select style="float:left; font-size: 11px; height: 20px; margin: 0px; padding: 0px; max-width:'.$max_width.'px;" id="'.$slug.'"'.$title;
9672
- // if ($onchange != '')..
9673
  $html .= ' onchange="'.$onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);'.$postaction.'"';
9674
- // else $html .= ' onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)"';
9675
 
9676
  if ($class != '') $html .= ' class="'.$class.'"';
9677
  $html .= '>';
@@ -9697,6 +9803,59 @@ global $wppa_opt;
9697
  return $html;
9698
  }
9699
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9700
  function wppa_select_e( $xslug, $curval, $options, $values, $onchange = '', $class = '' ) {
9701
 
9702
  $slug = substr( $xslug, 5 );
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.4.19
7
  *
8
  */
9
 
102
 
103
  check_admin_referer( 'wppa-nonce', 'wppa-nonce' );
104
  $key = $_REQUEST['wppa-key'];
105
+ $sub = isset( $_REQUEST['wppa-sub'] ) ? $_REQUEST['wppa-sub'] : '';
106
 
107
  // Switch on action key
108
  switch ( $key ) {
491
  }
492
  ?>
493
 
494
+
495
+ <?php // Linkpages
496
+ $options_page = false;
497
+ $options_page_post = false;
498
+ $values_page = false;
499
+ $values_page_post = false;
500
+ // First
501
+ $options_page_post[] = __('--- The same post or page ---', 'wp-photo-album-plus');
502
+ $values_page_post[] = '0';
503
+ $options_page[] = __('--- Please select a page ---', 'wp-photo-album-plus');
504
+ $values_page[] = '0';
505
+ // Pages if any
506
+ $query = "SELECT ID, post_title, post_content, post_parent FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' ORDER BY post_title ASC";
507
+ $pages = $wpdb->get_results ($query, ARRAY_A);
508
+ if ($pages) {
509
+ if ( wppa_switch( 'hier_pagesel') ) $pages = wppa_add_parents($pages);
510
+ else { // Just translate
511
+ foreach ( array_keys($pages) as $index ) {
512
+ $pages[$index]['post_title'] = __(stripslashes($pages[$index]['post_title']), 'wp-photo-album-plus');
513
+ }
514
+ }
515
+ $pages = wppa_array_sort($pages, 'post_title');
516
+ foreach ($pages as $page) {
517
+ if (strpos($page['post_content'], '%%wppa%%') !== false || strpos($page['post_content'], '[wppa') !== false) {
518
+ $options_page[] = __($page['post_title'], 'wp-photo-album-plus');
519
+ $options_page_post[] = __($page['post_title'], 'wp-photo-album-plus');
520
+ $values_page[] = $page['ID'];
521
+ $values_page_post[] = $page['ID'];
522
+ }
523
+ else {
524
+ $options_page[] = '|'.__($page['post_title'], 'wp-photo-album-plus').'|';
525
+ $options_page_post[] = '|'.__($page['post_title'], 'wp-photo-album-plus').'|';
526
+ $values_page[] = $page['ID'];
527
+ $values_page_post[] = $page['ID'];
528
+ }
529
+ }
530
+ }
531
+ else {
532
+ $options_page[] = __('--- No page to link to (yet) ---', 'wp-photo-album-plus');
533
+ $values_page[] = '0';
534
+ }
535
+
536
+ $options_page_auto = $options_page;
537
+ $options_page_auto[0] = __('--- Will be auto created ---', 'wp-photo-album-plus');
538
+ ?>
539
+
540
  <div class="wppa-quick" style="display:none;" >
541
  <?php // Table 0: Quick Setup ?>
542
  <?php wppa_settings_box_header(
564
 
565
  $clas = '';
566
  $tags = '';
567
+ wppa_setting_subheader( '', '1', __('To quickly setup WPPA+ please answer the following questions. You can alway change any setting later. <a>Click on me!</a>', 'wp-photo-album-plus'));
568
  {
569
  $name = __('Is your theme <i>responsive</i>?', 'wp-photo-album-plus');
570
  $desc = __('Responsive themes have a layout that varies with the size of the browser window.', 'wp-photo-album-plus');
1975
  $tags = 'sm,layout';
1976
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
1977
 
1978
+ $name = __('Void pages share', 'wp-photo-album-plus');
1979
+ $desc = __('Do not show share on these pages', 'wp-photo-album-plus');
1980
+ $help = esc_js(__('Use this for pages that require the user is logged in', 'wp-photo-album-plus'));
1981
+ $slug = 'wppa_sm_void_pages';
1982
+ $onchange = 'wppaCheckShares()';
1983
+ $options = $options_page_post;
1984
+ $options[0] = __('--- Select one or more pages ---', 'wp-photo-album-plus');
1985
+ $options[] = __('--- none ---', 'wp-photo-album-plus');
1986
+ $values = $values_page_post;
1987
+ $values[] = '0';
1988
+ $html = wppa_select_m($slug, $options, $values, '', '', true);
1989
+ $clas = '';
1990
+ $tags = 'sm,layout';
1991
+ wppa_setting($slug, '7', $name, $desc, $html, $help, $clas, $tags);
1992
+
1993
  $name = __('Show QR Code', 'wp-photo-album-plus');
1994
  $desc = __('Display the QR code in the share box.', 'wp-photo-album-plus');
1995
  $help = '';
2117
  $clas = 'wppa_share';
2118
  $tags = 'system,sm';
2119
  wppa_setting($slug, '99', $name, $desc, $html, $help, $clas, $tags);
2120
+
2121
  }
2122
  wppa_setting_subheader( 'D', '1', __( 'Thumbnail display related visibility settings' , 'wp-photo-album-plus') );
2123
  {
2305
  $tags = 'thumb';
2306
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
2307
 
2308
+ $name = __('Upload/create link on thumbnail area', 'wp-photo-album-plus');
2309
+ $desc = __('Select the location of the upload and crete links.', 'wp-photo-album-plus');
2310
+ $help = '';
2311
+ $slug = 'wppa_upload_link_thumbs';
2312
+ $opts = array(__('None', 'wp-photo-album-plus'), __('At the top', 'wp-photo-album-plus'), __('At the bottom', 'wp-photo-album-plus'));
2313
+ $vals = array('none', 'top', 'bottom');
2314
+ $html = wppa_select($slug, $opts, $vals);
2315
+ $clas = '';
2316
+ $tags = 'thumb,meta,layout,upload';
2317
+ wppa_setting($slug, '19', $name, $desc, $html, $help, $clas, $tags);
2318
+
2319
  }
2320
  wppa_setting_subheader( 'E', '1', __( 'Album cover related visibility settings' , 'wp-photo-album-plus') );
2321
  {
4202
  $tags = 'rating';
4203
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
4204
 
4205
+ $name = __('Rating dayly', 'wp-photo-album-plus');
4206
+ $desc = __('Users may rate only once per period', 'wp-photo-album-plus');
4207
+ $help = '';
4208
+ $slug = 'wppa_rating_dayly';
4209
+ $opts = array(__('--- off ---', 'wp-photo-album-plus'), __('Week', 'wp-photo-album-plus'), __('Day', 'wp-photo-album-plus'), __('Hour', 'wp-photo-album-plus') );
4210
+ $vals = array(0, 7*24*60*60, 24*60*60, 60*60);
4211
+ $html = wppa_select($slug, $opts, $vals);
4212
+ $clas = 'wppa_rating_';
4213
+ $tags = 'rating';
4214
+ wppa_setting($slug, '3.0', $name, $desc, $html, $help, $clas, $tags);
4215
+
4216
  $name = __('Rate own photos', 'wp-photo-album-plus');
4217
  $desc = __('It is allowed to rate photos by the uploader himself.', 'wp-photo-album-plus');
4218
  $help = '';
4983
 
4984
  */
4985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4986
 
4987
  wppa_setting_subheader('A', '4', __('Links from images in WPPA+ Widgets', 'wp-photo-album-plus'));
4988
  {
7190
  $tags = 'system';
7191
  wppa_setting(false, '18', $name, $desc, $html, $help, $clas, $tags);
7192
 
7193
+ $name = __('Move all photos', 'wp-photo-album-plus');
7194
+ $desc = __('Move all photos from one album to another album.', 'wp-photo-album-plus');
7195
+ $help = '';
7196
+ $slug2 = 'wppa_move_all_photos';
7197
+ $html1 = '';
7198
+ $html2 = wppa_maintenance_button( $slug2 );
7199
+ $html3 = wppa_status_field( $slug2 );
7200
+ $html4 = wppa_togo_field( $slug2 );
7201
+ $html = array($html1, $html2, $html3, $html4);
7202
+ $clas = '';
7203
+ $tags = 'system';
7204
+ wppa_setting(false, '19', $name, $desc, $html, $help, $clas, $tags);
7205
+
7206
+ $name = __('From', 'wp-photo-album-plus');
7207
+ $desc = __('Move from album', 'wp-photo-album-plus');
7208
+ $help = '';
7209
+ $slug = 'wppa_move_all_photos_from';
7210
+ $html = '<select' .
7211
+ ' id=""' .
7212
+ ' onchange="wppaAjaxUpdateOptionValue(\'move_all_photos_from\',this)"' .
7213
+ ' name="move_all_photos_to"' .
7214
+ ' style="float:left;"' .
7215
+ ' >'.
7216
+ wppa_album_select_a(array( 'addpleaseselect'=>true,
7217
+ 'path'=>true,
7218
+ 'selected'=>get_option('wppa_move_all_photos_from')
7219
+ )).
7220
+ '</select>' .
7221
+ '<img' .
7222
+ ' id="img_move_all_photos_from"' .
7223
+ ' class=""' .
7224
+ ' src="'.wppa_get_imgdir().'star.png"' .
7225
+ ' title="'.__('Setting unmodified', 'wp-photo-album-plus').'"' .
7226
+ ' style="padding-left:4px; float:left; height:16px; width:16px;"' .
7227
+ ' />';
7228
+ $html = array($html, '', '', '');
7229
+ $clas = '';
7230
+ $tags = 'system';
7231
+ wppa_setting(false, '19.1', $name, $desc, $html, $help, $clas, $tags);
7232
+
7233
+ $name = __('To', 'wp-photo-album-plus');
7234
+ $desc = __('Move to album', 'wp-photo-album-plus');
7235
+ $help = '';
7236
+ $slug = 'wppa_move_all_photos_to';
7237
+ $html = '<select' .
7238
+ ' id=""' .
7239
+ ' onchange="wppaAjaxUpdateOptionValue(\'move_all_photos_to\',this)"' .
7240
+ ' name="move_all_photos_to"' .
7241
+ ' style="float:left;"' .
7242
+ ' >'.
7243
+ wppa_album_select_a(array( 'addpleaseselect'=>true,
7244
+ 'path'=>true,
7245
+ 'selected'=>get_option('wppa_move_all_photos_to')
7246
+ )).
7247
+ '</select>' .
7248
+ '<img' .
7249
+ ' id="img_move_all_photos_to"' .
7250
+ ' class=""' .
7251
+ ' src="'.wppa_get_imgdir().'star.png"' .
7252
+ ' title="'.__('Setting unmodified', 'wp-photo-album-plus').'"' .
7253
+ ' style="padding-left:4px; float:left; height:16px; width:16px;"' .
7254
+ ' />';
7255
+ $html = array($html, '', '', '');
7256
+ $clas = '';
7257
+ $tags = 'system';
7258
+ wppa_setting(false, '19.2', $name, $desc, $html, $help, $clas, $tags);
7259
+
7260
  /*
7261
  $name = __('Test proc');
7262
  $desc = __('For OpaJaap only');
9750
  $html = '<input style="float:left; height: 15px; margin: 0px; padding: 0px;" type="checkbox" id="'.$slug.'"';
9751
  if ($curval) $html .= ' checked="checked"';
9752
  if ( ! $enabled ) $html .= ' disabled="disabled"';
9753
+ if ($onchange != '') $html .= ' onchange="'.$onchange.';wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this)"';
9754
+ else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this)"';
9755
 
9756
  if ($class != '') $html .= ' class="'.$class.'"';
9757
+ $html .= ' /><img id="img_'.$xslug.'" src="'.wppa_get_imgdir().'star.png" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;"';
9758
  if ($class != '') $html .= ' class="'.$class.'"';
9759
  $html .= ' />';
9760
 
9777
  $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
9778
 
9779
  $html = '<select style="float:left; font-size: 11px; height: 20px; margin: 0px; padding: 0px; max-width:'.$max_width.'px;" id="'.$slug.'"'.$title;
 
9780
  $html .= ' onchange="'.$onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);'.$postaction.'"';
 
9781
 
9782
  if ($class != '') $html .= ' class="'.$class.'"';
9783
  $html .= '>';
9803
  return $html;
9804
  }
9805
 
9806
+ function wppa_select_m($xslug, $options, $values, $onchange = '', $class = '', $first_disable = false, $postaction = '', $max_width = '220' ) {
9807
+ global $wppa_opt;
9808
+
9809
+ $slug = substr( $xslug, 5 );
9810
+
9811
+ if ( ! is_array( $options ) ) {
9812
+ $html = __('There are no pages (yet) to link to.', 'wp-photo-album-plus');
9813
+ return $html;
9814
+ }
9815
+
9816
+ $size = min( 10, count( $options ) );
9817
+
9818
+ $html = '<select' .
9819
+ ' style="float:left; font-size: 11px; margin: 0px; padding: 0px; max-width:'.$max_width.'px;"' .
9820
+ ' id="' . $slug . '"' .
9821
+ ' multiple="multiple"' .
9822
+ ' size="' . $size . '"' .
9823
+ ' onchange="' . $onchange . ';wppaAjaxUpdateOptionValue(\'' . $slug . '\', this, true);' . $postaction . '"' .
9824
+ ' class="'.$class.'"' .
9825
+ ' >';
9826
+
9827
+ $val = get_option( $xslug ); // value can be yes or no in Table 0 !! so do not use wppa_opt()
9828
+ $idx = 0;
9829
+ $cnt = count( $options );
9830
+
9831
+ $pages = explode(',', wppa_opt($slug) );
9832
+
9833
+ while ( $idx < $cnt ) {
9834
+
9835
+ $dis = false;
9836
+ if ( $idx == 0 && $first_disable ) $dis = true;
9837
+ $opt = trim( $options[$idx], '|' );
9838
+ if ( $opt != $options[$idx] ) $dis = true;
9839
+
9840
+ $sel = false;
9841
+ if ( in_array( $values[$idx], $pages ) ) $sel = true;
9842
+
9843
+ $html .= '<option' .
9844
+ ' class="' . $slug . '"' .
9845
+ ' value="' . $values[$idx] . '" ' .
9846
+ ( $sel ? ' selected="selected"' : '' ) .
9847
+ ( $dis ? ' disabled="disabled"' : '' ) .
9848
+ ' >' .
9849
+ $opt .
9850
+ '</option>';
9851
+ $idx++;
9852
+ }
9853
+ $html .= '</select>';
9854
+ $html .= '<img id="img_'.$slug.'" class="'.$class.'" src="'.wppa_get_imgdir().'star.png" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
9855
+
9856
+ return $html;
9857
+ }
9858
+
9859
  function wppa_select_e( $xslug, $curval, $options, $values, $onchange = '', $class = '' ) {
9860
 
9861
  $slug = substr( $xslug, 5 );
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -757,6 +757,7 @@ Hide Camera info
757
  'wppa_show_exif_open' => 'no',
758
  'wppa_share_on' => 'no',
759
  'wppa_share_hide_when_running' => 'yes',
 
760
  'wppa_share_on_widget' => 'no',
761
  'wppa_share_on_thumbs' => 'no',
762
  'wppa_share_on_lightbox' => 'no',
@@ -799,6 +800,7 @@ Hide Camera info
799
  'wppa_show_empty_thumblist' => 'no',
800
 
801
  'wppa_edit_thumb' => 'yes', // II-D17
 
802
 
803
  // D Covers
804
  'wppa_show_cover_text' => 'yes', // 1
@@ -1046,6 +1048,7 @@ Hide Camera info
1046
  'wppa_rating_login' => 'yes',
1047
  'wppa_rating_change' => 'yes',
1048
  'wppa_rating_multi' => 'no',
 
1049
  'wppa_allow_owner_votes' => 'yes',
1050
  'wppa_vote_needs_comment' => 'no',
1051
  'wppa_dislike_value' => '-5',
@@ -1340,6 +1343,9 @@ Hide Camera info
1340
  'wppa_sanitize_tags' => '',
1341
  'wppa_sanitize_cats' => '',
1342
  'wppa_test_proc' => '',
 
 
 
1343
 
1344
  'wppa_maint_ignore_concurrency_error' => 'no',
1345
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.4.19
7
  *
8
  */
9
 
757
  'wppa_show_exif_open' => 'no',
758
  'wppa_share_on' => 'no',
759
  'wppa_share_hide_when_running' => 'yes',
760
+ 'wppa_sm_void_pages' => '0',
761
  'wppa_share_on_widget' => 'no',
762
  'wppa_share_on_thumbs' => 'no',
763
  'wppa_share_on_lightbox' => 'no',
800
  'wppa_show_empty_thumblist' => 'no',
801
 
802
  'wppa_edit_thumb' => 'yes', // II-D17
803
+ 'wppa_upload_link_thumbs' => 'bottom',
804
 
805
  // D Covers
806
  'wppa_show_cover_text' => 'yes', // 1
1048
  'wppa_rating_login' => 'yes',
1049
  'wppa_rating_change' => 'yes',
1050
  'wppa_rating_multi' => 'no',
1051
+ 'wppa_rating_dayly' => '0',
1052
  'wppa_allow_owner_votes' => 'yes',
1053
  'wppa_vote_needs_comment' => 'no',
1054
  'wppa_dislike_value' => '-5',
1343
  'wppa_sanitize_tags' => '',
1344
  'wppa_sanitize_cats' => '',
1345
  'wppa_test_proc' => '',
1346
+ 'wppa_move_all_photos' => '',
1347
+ 'wppa_move_all_photos_from' => '',
1348
+ 'wppa_move_all_photos_to' => '',
1349
 
1350
  'wppa_maint_ignore_concurrency_error' => 'no',
1351
 
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.4.17
7
  *
8
  */
9
 
@@ -399,8 +399,8 @@ function wppa_slide_frame() {
399
  ' ontouchstart="wppaUbb('.wppa( 'mocc' ).',\'l\',\'show\')"' .
400
  ' onmouseout="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
401
  ' onclick="wppaUbb('.wppa( 'mocc' ).',\'l\',\'click\')"' .
402
- ' ontouchend="wppaUbb('.wppa( 'mocc' ).',\'l\',\'click\')"' .
403
- ' onload="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
404
  ' />' .
405
  '<img' .
406
  ' id="ubb-'.wppa( 'mocc' ).'-r"' .
@@ -424,8 +424,8 @@ function wppa_slide_frame() {
424
  ' ontouchstart="wppaUbb('.wppa( 'mocc' ).',\'r\',\'show\')"' .
425
  ' onmouseout="wppaUbb('.wppa( 'mocc' ).',\'r\',\'hide\')"' .
426
  ' onclick="wppaUbb('.wppa( 'mocc' ).',\'r\',\'click\')"' .
427
- ' ontouchend="wppaUbb('.wppa( 'mocc' ).',\'r\',\'click\')"' .
428
- ' onload="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
429
  ' />'
430
  );
431
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 6.4.19
7
  *
8
  */
9
 
399
  ' ontouchstart="wppaUbb('.wppa( 'mocc' ).',\'l\',\'show\')"' .
400
  ' onmouseout="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
401
  ' onclick="wppaUbb('.wppa( 'mocc' ).',\'l\',\'click\')"' .
402
+ ' ontouchend="wppaUbb('.wppa( 'mocc' ).',\'l\',\'click\');wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\');"' .
403
+ // ' onload="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
404
  ' />' .
405
  '<img' .
406
  ' id="ubb-'.wppa( 'mocc' ).'-r"' .
424
  ' ontouchstart="wppaUbb('.wppa( 'mocc' ).',\'r\',\'show\')"' .
425
  ' onmouseout="wppaUbb('.wppa( 'mocc' ).',\'r\',\'hide\')"' .
426
  ' onclick="wppaUbb('.wppa( 'mocc' ).',\'r\',\'click\')"' .
427
+ ' ontouchend="wppaUbb('.wppa( 'mocc' ).',\'r\',\'hide\');wppaUbb('.wppa( 'mocc' ).',\'r\',\'click\');wppaUbb('.wppa( 'mocc' ).',\'r\',\'hide\');"' .
428
+ // ' onload="wppaUbb('.wppa( 'mocc' ).',\'l\',\'hide\')"' .
429
  ' />'
430
  );
431
  }
wppa-source.php CHANGED
@@ -44,7 +44,7 @@ function wppa_save_source( $file, $name, $alb ) {
44
  $dest = $albdir . '/' . wppa_sanitize_file_name( $name );
45
  if ( $file != $dest ) @ copy( $file, $dest ); // Do not copy to self, and do not bother on failure
46
  if ( ! is_file( $dest ) ) {
47
- wppa_log( 'Err', 'Could not save ' . $dest );
48
  }
49
  }
50
  }
44
  $dest = $albdir . '/' . wppa_sanitize_file_name( $name );
45
  if ( $file != $dest ) @ copy( $file, $dest ); // Do not copy to self, and do not bother on failure
46
  if ( ! is_file( $dest ) ) {
47
+ wppa_log( 'Err', 'Could not save ' . $dest, true );
48
  }
49
  }
50
  }
wppa-upload.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload/import pages and functions
6
- * Version 6.4.18
7
  *
8
  */
9
 
@@ -2455,8 +2455,8 @@ global $wppa_session;
2455
 
2456
  function wppa_is_wppa_tree( $file ) {
2457
 
2458
- $temp = explode( '/wppa/', $file );
2459
- if ( count( $temp ) == '2' ) {
2460
  $temp[1] = wppa_expand_id( wppa_strip_ext( $temp[1] ) ) . '.' . wppa_get_ext( $temp[1] );
2461
  $newf = implode( '/wppa/', $temp );
2462
  wppa( 'is_wppa_tree', ( $newf != $file ) );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload/import pages and functions
6
+ * Version 6.4.19
7
  *
8
  */
9
 
2455
 
2456
  function wppa_is_wppa_tree( $file ) {
2457
 
2458
+ $temp = explode( '/uploads/wppa/', $file );
2459
+ if ( count( $temp ) === 2 ) {
2460
  $temp[1] = wppa_expand_id( wppa_strip_ext( $temp[1] ) ) . '.' . wppa_get_ext( $temp[1] );
2461
  $newf = implode( '/wppa/', $temp );
2462
  wppa( 'is_wppa_tree', ( $newf != $file ) );
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.4.17
7
  *
8
  */
9
 
@@ -421,7 +421,7 @@ global $wppa;
421
 
422
  function wppa_display_root( $id ) {
423
  $all = __('All albums', 'wp-photo-album-plus' );
424
- if ( ! $id ) return $all;
425
  $album = wppa_cache_album( $id );
426
  if ( ! $album ) return '';
427
  $albums = array();
@@ -869,7 +869,9 @@ global $wppa_opt;
869
  'wppa_bcolor_adminschoice',
870
  );
871
  if ( in_array( $option, $dynamic_css_critical ) ) {
872
- @ unlink ( WPPA_PATH.'/wppa-dynamic.css' ); // Will be auto re-created
 
 
873
  }
874
  }
875
 
@@ -881,7 +883,7 @@ static $existing_albums;
881
  if ( ! $existing_albums ) {
882
  $existing_albums = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "`" );
883
  }
884
-
885
  return in_array( $id, $existing_albums );
886
  }
887
 
@@ -1815,7 +1817,7 @@ function wppa_get_the_id() {
1815
  if ( wppa( 'ajax' ) ) {
1816
  if ( wppa_get_get( 'page_id' ) ) $id = wppa_get_get( 'page_id' );
1817
  elseif ( wppa_get_get( 'p' ) ) $id = wppa_get_get( 'p' );
1818
- elseif ( wppa_get_get( 'wppa-fromp' ) ) $id = wppa_get_get( 'wppa-fromp' );
1819
  }
1820
  else {
1821
  $id = get_the_ID();
@@ -2343,7 +2345,7 @@ global $wpdb;
2343
  return __('There are no ratings between', 'wp-photo-album-plus') .
2344
  '<br />' .
2345
  wppa_local_date( 'F j, Y, H:i s', $start ) .
2346
- __('and', 'wp-photo-album-plus') .
2347
  '<br />' .
2348
  wppa_local_date( 'F j, Y, H:i s', $end ) .
2349
  '.';
@@ -2992,6 +2994,7 @@ function wppa_sanitize_text( $txt ) {
2992
  }
2993
 
2994
  function wppa_is_mobile() {
 
2995
  $result = false;
2996
  $detect = new wppa_mobile_detect();
2997
  if ( $detect->isMobile() ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.4.19
7
  *
8
  */
9
 
421
 
422
  function wppa_display_root( $id ) {
423
  $all = __('All albums', 'wp-photo-album-plus' );
424
+ if ( ! $id || $id == '-2' ) return $all;
425
  $album = wppa_cache_album( $id );
426
  if ( ! $album ) return '';
427
  $albums = array();
869
  'wppa_bcolor_adminschoice',
870
  );
871
  if ( in_array( $option, $dynamic_css_critical ) ) {
872
+ if ( is_file ( WPPA_PATH.'/wppa-dynamic.css' ) ) {
873
+ @ unlink ( WPPA_PATH.'/wppa-dynamic.css' ); // Will be auto re-created
874
+ }
875
  }
876
  }
877
 
883
  if ( ! $existing_albums ) {
884
  $existing_albums = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "`" );
885
  }
886
+
887
  return in_array( $id, $existing_albums );
888
  }
889
 
1817
  if ( wppa( 'ajax' ) ) {
1818
  if ( wppa_get_get( 'page_id' ) ) $id = wppa_get_get( 'page_id' );
1819
  elseif ( wppa_get_get( 'p' ) ) $id = wppa_get_get( 'p' );
1820
+ elseif ( wppa_get_get( 'fromp' ) ) $id = wppa_get_get( 'fromp' );
1821
  }
1822
  else {
1823
  $id = get_the_ID();
2345
  return __('There are no ratings between', 'wp-photo-album-plus') .
2346
  '<br />' .
2347
  wppa_local_date( 'F j, Y, H:i s', $start ) .
2348
+ ' ' . __('and', 'wp-photo-album-plus') .
2349
  '<br />' .
2350
  wppa_local_date( 'F j, Y, H:i s', $end ) .
2351
  '.';
2994
  }
2995
 
2996
  function wppa_is_mobile() {
2997
+ //return true; // debug
2998
  $result = false;
2999
  $detect = new wppa_mobile_detect();
3000
  if ( $detect->isMobile() ) {
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
- * Version 6.4.14
7
  *
8
  */
9
 
@@ -165,6 +165,12 @@ global $wpdb;
165
  case 'owner':
166
  $doit = true;
167
  break;
 
 
 
 
 
 
168
 
169
  default:
170
  wppa_log( 'Error', 'Not implemented in wppa_update_photo(): '.$itemname );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 6.4.19
7
  *
8
  */
9
 
165
  case 'owner':
166
  $doit = true;
167
  break;
168
+ case 'album':
169
+ if ( wppa_is_int($itemvalue) && $itemvalue > 0 ) {
170
+ $doit = true;
171
+ }
172
+ else wppa_log('err', 'Invalid album id found in wppa_update_album(): '.$itemvalue);
173
+ break;
174
 
175
  default:
176
  wppa_log( 'Error', 'Not implemented in wppa_update_photo(): '.$itemname );
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.4.18
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 = '6418'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-4-18-006'; // WPPA software version
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.4.19
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 = '6419'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-4-19-011'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);