WP Photo Album Plus - Version 6.4.08

Version Description

Download this release

Release Info

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

Code changes from version 6.4.07 to 6.4.08

js/wppa-admin-scripts.js CHANGED
@@ -1987,3 +1987,37 @@ function wppaEditSearch( url, id ) {
1987
  document.location.href = url + '&wppa-searchstring=' + ss;
1988
  }
1989
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1987
  document.location.href = url + '&wppa-searchstring=' + ss;
1988
  }
1989
  }
1990
+
1991
+ function wppaExportDbTable( table ) {
1992
+ jQuery.ajax( { url: wppaAjaxUrl,
1993
+ data: 'action=wppa' +
1994
+ '&wppa-action=export-table' +
1995
+ '&table=' + table,
1996
+ async: true,
1997
+ type: 'GET',
1998
+ timeout: 100000,
1999
+ beforeSend: function( xhr ) {
2000
+ jQuery( '#' + table + '-spin' ).css( 'display', 'inline' );
2001
+ },
2002
+ success: function( result, status, xhr ) {
2003
+ var ArrValues = result.split( "||" );
2004
+ if ( ArrValues[1] == '0' ) { // Ok, no error
2005
+
2006
+ // Publish result
2007
+ document.location = ArrValues[2];
2008
+ }
2009
+ else {
2010
+
2011
+ // Show error
2012
+ alert( 'Error: '+ArrValues[1]+'\n\n'+ArrValues[2] );
2013
+ }
2014
+ },
2015
+ error: function( xhr, status, error ) {
2016
+ alert( 'Export Db Table ' + table + ' failed. Error = ' + error + ', status = ' + status );
2017
+ },
2018
+ complete: function( xhr, status, error ) {
2019
+ jQuery( '#' + table + '-spin' ).css( 'display', 'none' );
2020
+ }
2021
+ } );
2022
+
2023
+ }
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.05';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 1;
@@ -288,13 +288,18 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
288
  // Show spinner
289
  jQuery( '#wppa-overlay-sp' ).css( { visibility: 'visible' } );
290
 
 
 
 
 
291
  // Preload current image
292
- if ( wppaOvlUrls[idx].length > 0 ) { // Not an empty url
 
293
  wppaOvlImgs[idx] = new Image();
294
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
295
  wppaConsoleLog( 'Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)' );
296
  if ( ! wppaOvlImgs[idx].complete ) {
297
- wppaConsoleLog( 'Retrying' );
298
  setTimeout( '_wppaOvlShow('+idx+')', 100 );
299
  return;
300
  }
@@ -303,16 +308,19 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
303
  var next;
304
  var prev;
305
 
306
- // Preload next
307
  if ( wppaOvlIdx == ( wppaOvlUrls.length-1 ) ) {
308
  next = 0;
309
  }
310
  else {
311
  next = wppaOvlIdx + 1;
312
  }
313
- wppaOvlImgs[next] = new Image();
314
- wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
315
- wppaConsoleLog( 'Preloading > '+(next+1) );
 
 
 
316
 
317
  // Preload previous ( for hitting the prev button )
318
  // Only when in browsemode
@@ -323,19 +331,18 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
323
  else {
324
  prev = wppaOvlIdx - 1;
325
  }
326
- wppaOvlImgs[prev] = new Image();
327
- wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
328
- wppaConsoleLog( 'Preloading < '+(prev+1) );
 
 
 
329
  }
330
 
331
  // Find photo id and bump its viewcount
332
  wppaPhotoId = wppaUrlToId( wppaOvlUrls[idx] );
333
  _bumpViewCount( wppaPhotoId );
334
 
335
- // Find handy switches
336
- wppaIsVideo = wppaOvlVideoHtmls[idx] != '';
337
- wppaHasAudio = wppaOvlAudioHtmls[idx] != '';
338
-
339
  // A single image?
340
  wppaOvlIsSingle = ( wppaOvlUrls.length == 1 );
341
 
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.4.08';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 1;
288
  // Show spinner
289
  jQuery( '#wppa-overlay-sp' ).css( { visibility: 'visible' } );
290
 
291
+ // Find handy switches
292
+ wppaIsVideo = wppaOvlVideoHtmls[idx] != '';
293
+ wppaHasAudio = wppaOvlAudioHtmls[idx] != '';
294
+
295
  // Preload current image
296
+ // Not an empty url, and do not wait infinitely for a possibly non-existend posterimage
297
+ if ( wppaOvlUrls[idx].length > 0 && ! wppaIsVideo ) {
298
  wppaOvlImgs[idx] = new Image();
299
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
300
  wppaConsoleLog( 'Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)' );
301
  if ( ! wppaOvlImgs[idx].complete ) {
302
+ wppaConsoleLog( 'Retrying preload current image' );
303
  setTimeout( '_wppaOvlShow('+idx+')', 100 );
304
  return;
305
  }
308
  var next;
309
  var prev;
310
 
311
+ // Preload next
312
  if ( wppaOvlIdx == ( wppaOvlUrls.length-1 ) ) {
313
  next = 0;
314
  }
315
  else {
316
  next = wppaOvlIdx + 1;
317
  }
318
+ // only if not video
319
+ if ( wppaOvlVideoHtmls[next] == '' ) {
320
+ wppaOvlImgs[next] = new Image();
321
+ wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
322
+ wppaConsoleLog( 'Preloading > '+(next+1) );
323
+ }
324
 
325
  // Preload previous ( for hitting the prev button )
326
  // Only when in browsemode
331
  else {
332
  prev = wppaOvlIdx - 1;
333
  }
334
+ // only if not video
335
+ if ( wppaOvlVideoHtmls[prev] == '' ) {
336
+ wppaOvlImgs[prev] = new Image();
337
+ wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
338
+ wppaConsoleLog( 'Preloading < '+(prev+1) );
339
+ }
340
  }
341
 
342
  // Find photo id and bump its viewcount
343
  wppaPhotoId = wppaUrlToId( wppaOvlUrls[idx] );
344
  _bumpViewCount( wppaPhotoId );
345
 
 
 
 
 
346
  // A single image?
347
  wppaOvlIsSingle = ( wppaOvlUrls.length == 1 );
348
 
js/wppa-lightbox.min.js CHANGED
@@ -4,7 +4,7 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
- var wppaLightboxVersion='6.4.05';var wppaNormsBtnOpac=1;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;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(10);});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);}
@@ -34,13 +34,14 @@ wppaOvlVideoHtmls[0]=jQuery(arg).attr('data-videohtml')?decodeURI(jQuery(arg).at
34
  wppaOvlIdx=0;}}
35
  else{wppaOvlIdx=arg;}
36
  setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100);}
37
- function _wppaOvlShow(idx){wppaConsoleLog('_wppaOvlShow, idx='+idx);jQuery('#wppa-overlay-sp').css({visibility:'visible'});if(wppaOvlUrls[idx].length>0){wppaOvlImgs[idx]=new Image();wppaOvlImgs[idx].src=wppaOvlUrls[idx];wppaConsoleLog('Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)');if(!wppaOvlImgs[idx].complete){wppaConsoleLog('Retrying');setTimeout('_wppaOvlShow('+idx+')',100);return;}}
38
  var next;var prev;if(wppaOvlIdx==(wppaOvlUrls.length-1)){next=0;}
39
  else{next=wppaOvlIdx+1;}
40
- wppaOvlImgs[next]=new Image();wppaOvlImgs[next].src=wppaOvlUrls[next];wppaConsoleLog('Preloading > '+(next+1));if(!wppaOvlRunning){if(wppaOvlIdx==0){prev=wppaOvlUrls.length-1;}
 
41
  else{prev=wppaOvlIdx-1;}
42
- wppaOvlImgs[prev]=new Image();wppaOvlImgs[prev].src=wppaOvlUrls[prev];wppaConsoleLog('Preloading < '+(prev+1));}
43
- wppaPhotoId=wppaUrlToId(wppaOvlUrls[idx]);_bumpViewCount(wppaPhotoId);wppaIsVideo=wppaOvlVideoHtmls[idx]!='';wppaHasAudio=wppaOvlAudioHtmls[idx]!='';wppaOvlIsSingle=(wppaOvlUrls.length==1);if(wppaOvlMode!='normal'){var html;if(wppaIsVideo){html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" >'+'<video id="wppa-overlay-img" controls preload="metadata"'+
44
  (wppaOvlVideoStart?' autoplay':'')+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" >'+
45
  wppaOvlVideoHtmls[idx]+'</video>'+'<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>';}
46
  html+='</div>';'</div>';}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaLightboxVersion='6.4.08';var wppaNormsBtnOpac=1;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;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(10);});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);}
34
  wppaOvlIdx=0;}}
35
  else{wppaOvlIdx=arg;}
36
  setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100);}
37
+ function _wppaOvlShow(idx){wppaConsoleLog('_wppaOvlShow, idx='+idx);jQuery('#wppa-overlay-sp').css({visibility:'visible'});wppaIsVideo=wppaOvlVideoHtmls[idx]!='';wppaHasAudio=wppaOvlAudioHtmls[idx]!='';if(wppaOvlUrls[idx].length>0&&!wppaIsVideo){wppaOvlImgs[idx]=new Image();wppaOvlImgs[idx].src=wppaOvlUrls[idx];wppaConsoleLog('Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)');if(!wppaOvlImgs[idx].complete){wppaConsoleLog('Retrying preload current image');setTimeout('_wppaOvlShow('+idx+')',100);return;}}
38
  var next;var prev;if(wppaOvlIdx==(wppaOvlUrls.length-1)){next=0;}
39
  else{next=wppaOvlIdx+1;}
40
+ if(wppaOvlVideoHtmls[next]==''){wppaOvlImgs[next]=new Image();wppaOvlImgs[next].src=wppaOvlUrls[next];wppaConsoleLog('Preloading > '+(next+1));}
41
+ if(!wppaOvlRunning){if(wppaOvlIdx==0){prev=wppaOvlUrls.length-1;}
42
  else{prev=wppaOvlIdx-1;}
43
+ if(wppaOvlVideoHtmls[prev]==''){wppaOvlImgs[prev]=new Image();wppaOvlImgs[prev].src=wppaOvlUrls[prev];wppaConsoleLog('Preloading < '+(prev+1));}}
44
+ wppaPhotoId=wppaUrlToId(wppaOvlUrls[idx]);_bumpViewCount(wppaPhotoId);wppaOvlIsSingle=(wppaOvlUrls.length==1);if(wppaOvlMode!='normal'){var html;if(wppaIsVideo){html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" >'+'<video id="wppa-overlay-img" controls preload="metadata"'+
45
  (wppaOvlVideoStart?' autoplay':'')+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" >'+
46
  wppaOvlVideoHtmls[idx]+'</video>'+'<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>';}
47
  html+='</div>';'</div>';}
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.03';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -1570,8 +1570,11 @@ function _wppaValidateComment( mocc ) {
1570
  }
1571
 
1572
  // Process email address
1573
- if ( wppaEmailRequired ) {
1574
- var email = jQuery( '#wppa-comemail-'+mocc ).val( );
 
 
 
1575
  var atpos=email.indexOf( "@" );
1576
  var dotpos=email.lastIndexOf( "." );
1577
  if ( atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length ) {
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.4.08';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
1570
  }
1571
 
1572
  // Process email address
1573
+ if ( wppaEmailRequired == 'required' || wppaEmailRequired == 'optional' ) {
1574
+ var email = jQuery( '#wppa-comemail-'+mocc ).val();
1575
+ if ( wppaEmailRequired == 'optional' && email.length == 0 ) {
1576
+ return true;
1577
+ }
1578
  var atpos=email.indexOf( "@" );
1579
  var dotpos=email.lastIndexOf( "." );
1580
  if ( atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length ) {
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.03';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 ';}}
@@ -171,7 +171,8 @@ else{jQuery(where+mocc+'-'+idx).stop().fadeTo(100,wppaStarOpacity);}}}
171
  function _wppaFollowMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,idx,'#wppa-rate-');}
172
  function _wppaLeaveMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,_wppaMyr[mocc][_wppaCurIdx[mocc]],'#wppa-rate-');}
173
  function _wppaValidateComment(mocc){var photoid=_wppaId[mocc][_wppaCurIdx[mocc]];var name=jQuery('#wppa-comname-'+mocc).val();if(name.length<1){alert(wppaPleaseName);return false;}
174
- if(wppaEmailRequired){var email=jQuery('#wppa-comemail-'+mocc).val();var atpos=email.indexOf("@");var dotpos=email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=email.length){alert(wppaPleaseEmail);return false;}}
 
175
  var text=jQuery('#wppa-comment-'+mocc).val();if(text.length<1){alert(wppaPleaseComment);return false;}
176
  return true;}
177
  function _wppaGo(url){document.location=url;}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaJsSlideshowVersion='6.4.08';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 ';}}
171
  function _wppaFollowMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,idx,'#wppa-rate-');}
172
  function _wppaLeaveMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,_wppaMyr[mocc][_wppaCurIdx[mocc]],'#wppa-rate-');}
173
  function _wppaValidateComment(mocc){var photoid=_wppaId[mocc][_wppaCurIdx[mocc]];var name=jQuery('#wppa-comname-'+mocc).val();if(name.length<1){alert(wppaPleaseName);return false;}
174
+ if(wppaEmailRequired=='required'||wppaEmailRequired=='optional'){var email=jQuery('#wppa-comemail-'+mocc).val();if(wppaEmailRequired=='optional'&&email.length==0){return true;}
175
+ var atpos=email.indexOf("@");var dotpos=email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=email.length){alert(wppaPleaseEmail);return false;}}
176
  var text=jQuery('#wppa-comment-'+mocc).val();if(text.length<1){alert(wppaPleaseComment);return false;}
177
  return true;}
178
  function _wppaGo(url){document.location=url;}
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.3.17';
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!!
@@ -72,7 +72,7 @@ var wppaNextOnCallback = false;
72
  var wppaStarOpacity = 0.2;
73
  var wppaSlideWrap = true;
74
  var wppaLightBox = [];
75
- var wppaEmailRequired = true;
76
  var wppaSlideBorderWidth = 0;
77
  var wppaSlideInitRunning = [];
78
  var wppaAnimationType = 'fadeover';
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.4.08';
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!!
72
  var wppaStarOpacity = 0.2;
73
  var wppaSlideWrap = true;
74
  var wppaLightBox = [];
75
+ var wppaEmailRequired = 'required';
76
  var wppaSlideBorderWidth = 0;
77
  var wppaSlideInitRunning = [];
78
  var wppaAnimationType = 'fadeover';
js/wppa.min.js CHANGED
@@ -3,7 +3,7 @@
3
  // conatins common vars and functions
4
  //
5
 
6
- var wppaJsVersion='6.3.17';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=true;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 _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 wppaOvlMode='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();}
3
  // conatins common vars and functions
4
  //
5
 
6
+ var wppaJsVersion='6.4.08';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 _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 wppaOvlMode='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();}
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.07
6
- Stable tag: 6.4.06
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -180,6 +180,25 @@ 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.07 =
184
 
185
  = Bug Fixes =
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.08
6
+ Stable tag: 6.4.07
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.08 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * Mail should work always now.
188
+ * Download album link did not work when encryption was enabled. Fixed.
189
+ * Links do not work when qTranslate-x is active and pretty links is enabled. Fixed.
190
+ * Edit photo link on lightbox did not work if the lightbox was invoked on a different image than a slideshow image. Fixed.
191
+ * Fixed an issue with avatars not being displayed in all cases.
192
+
193
+ = New Features =
194
+
195
+ * The administrator can download any wppa databasa table as .csv file. See Table XII.
196
+
197
+ = Other Changes =
198
+
199
+ * You can set Table IV-F4 (Comment email required) now to 'Required', 'Optional' or 'None'.
200
+ * Performance improvements, especially of the settings admin page.
201
+
202
  = 6.4.07 =
203
 
204
  = Bug Fixes =
theme/wppa-style.css CHANGED
@@ -8,7 +8,7 @@
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
- /* This is version 6.4.02
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
@@ -143,7 +143,7 @@
143
  }
144
 
145
  .wppa-masonry-h {
146
- width: 105%;
147
  }
148
 
149
  /* The popup small image, here is still a problem with IE6 */
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
+ /* This is version 6.4.08
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
143
  }
144
 
145
  .wppa-masonry-h {
146
+ width: 105% !important;
147
  }
148
 
149
  /* The popup small image, here is still a problem with IE6 */
wppa-admin-functions.php CHANGED
@@ -475,6 +475,11 @@ global $wppa_supported_audio_extensions;
475
 
476
  function wppa_check_database( $verbose = false ) {
477
  global $wpdb;
 
 
 
 
 
478
 
479
  $any_error = false;
480
  // Check db tables
@@ -611,9 +616,16 @@ global $wpdb;
611
  }
612
  $idx++;
613
  }
 
 
614
  if ( $any_error ) {
615
  if ( $verbose ) wppa_error_message( __( 'Please de-activate and re-activate the plugin. If this problem persists, ask your administrator.' , 'wp-photo-album-plus'), 'red', 'force' );
616
  }
 
 
 
 
 
617
 
618
  return ! $any_error; // True = no error
619
  }
@@ -931,3 +943,69 @@ function wppa_admin_spinner() {
931
 
932
  echo $result;
933
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
 
476
  function wppa_check_database( $verbose = false ) {
477
  global $wpdb;
478
+ static $everything_ok;
479
+
480
+ if ( $everything_ok === true ) {
481
+ return true;
482
+ }
483
 
484
  $any_error = false;
485
  // Check db tables
616
  }
617
  $idx++;
618
  }
619
+
620
+ // Report errors
621
  if ( $any_error ) {
622
  if ( $verbose ) wppa_error_message( __( 'Please de-activate and re-activate the plugin. If this problem persists, ask your administrator.' , 'wp-photo-album-plus'), 'red', 'force' );
623
  }
624
+
625
+ // No errors, save result
626
+ else {
627
+ $everything_ok = true;
628
+ }
629
 
630
  return ! $any_error; // True = no error
631
  }
943
 
944
  echo $result;
945
  }
946
+
947
+ // Export db table to .csv file
948
+ function wppa_export_table( $table ) {
949
+ global $wpdb;
950
+
951
+ // Open outputfile
952
+ $path = WPPA_UPLOAD_PATH . '/temp/' . $table . '.csv';
953
+ $file = fopen( $path, 'wb' );
954
+ if ( ! $file ) {
955
+ return false;
956
+ }
957
+
958
+ // Init output buffer
959
+ $result = '';
960
+
961
+ // Get the fieldnames
962
+ $fields = $wpdb->get_results( "DESCRIBE `".$table."`", ARRAY_A );
963
+
964
+ // Write the .csv header
965
+ if ( is_array( $fields ) ) {
966
+ foreach( $fields as $field ) {
967
+ $result .= $field['Field'] . ',';
968
+ }
969
+ $result = rtrim( $result, ',') . "\n";
970
+ }
971
+ fwrite( $file, $result );
972
+
973
+ // Init getting the data
974
+ $count = $wpdb->get_var( "SELECT COUNT(*) FROM `" . $table . "`" );
975
+ $iters = ceil( $count / 1000 );
976
+ $iter = 0;
977
+
978
+ // Read chunks of 1000 rows
979
+ while ( $iter < $iters ) {
980
+ $query = "SELECT * FROM `" . $table . "` ORDER BY `id` LIMIT " . 1000 * $iter . ",1000";
981
+ $data = $wpdb->get_results( $query, ARRAY_N );
982
+
983
+ // Process rows
984
+ if ( $data ) {
985
+ foreach( $data as $row ) {
986
+ $result = '';
987
+ foreach( $row as $item ) {
988
+ $result .= wppa_prep_for_csv( $item ) . ',';
989
+ }
990
+ $result = rtrim( $result, ',') . "\n";
991
+
992
+ // Write to file
993
+ fwrite( $file, $result );
994
+ }
995
+ }
996
+ $iter++;
997
+ }
998
+
999
+ // Close file
1000
+ fclose( $file );
1001
+
1002
+ // Done !
1003
+ return true;
1004
+ }
1005
+
1006
+ // Convert one text token to a .csv token
1007
+ function wppa_prep_for_csv( $data ) {
1008
+ $result = str_replace( '"', '""', $data );
1009
+ $result = '"' . $result . '"';
1010
+ return $result;
1011
+ }
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.4.07
6
  *
7
  */
8
 
@@ -2419,6 +2419,22 @@ global $wppa_session;
2419
  wppa_exit();
2420
  break;
2421
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2422
 
2423
  default: // Unimplemented $wppa-action
2424
  die( '-1' );
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.4.08
6
  *
7
  */
8
 
2419
  wppa_exit();
2420
  break;
2421
 
2422
+ case 'export-table':
2423
+ if ( ! wppa_user_is( 'administrator' ) ) {
2424
+ echo '||1||'.__( 'Security check failure' , 'wp-photo-album-plus' );
2425
+ wppa_exit();
2426
+ }
2427
+ $table = $_REQUEST['table'];
2428
+ $bret = wppa_export_table( $table );
2429
+ if ( $bret ) {
2430
+ echo '||0||' . WPPA_UPLOAD_URL . '/temp/' . $table . '.csv';
2431
+ }
2432
+ else {
2433
+ echo '||2||' . __( 'An error has occurred', 'wp-photo-album-plus' );
2434
+ }
2435
+ wppa_exit();
2436
+ break;
2437
+
2438
 
2439
  default: // Unimplemented $wppa-action
2440
  die( '-1' );
wppa-album-admin-autosave.php CHANGED
@@ -38,7 +38,11 @@ function _wppa_admin() {
38
  }
39
 
40
  // Fix orphan albums and deleted target pages
41
- $albs = $wpdb->get_results("SELECT * FROM `".WPPA_ALBUMS."`", ARRAY_A);
 
 
 
 
42
  if ( $albs ) {
43
  foreach ($albs as $alb) {
44
  if ( $alb['a_parent'] > '0' && wppa_get_parentalbumid($alb['a_parent']) == '-9' ) { // Parent died?
38
  }
39
 
40
  // Fix orphan albums and deleted target pages
41
+ $albs = $wpdb->get_results("SELECT * FROM `" . WPPA_ALBUMS . "`", ARRAY_A);
42
+
43
+ // Now we have tham, put them in cache
44
+ wppa_cache_album( 'add', $albs );
45
+
46
  if ( $albs ) {
47
  foreach ($albs as $alb) {
48
  if ( $alb['a_parent'] > '0' && wppa_get_parentalbumid($alb['a_parent']) == '-9' ) { // Parent died?
wppa-album-covers.php CHANGED
@@ -1146,8 +1146,15 @@ function wppa_get_coverphoto_id( $xalb = '' ) {
1146
  // If one assigned but no longer exists or moved to other album: treat as random
1147
  function wppa_get_coverphoto_ids( $alb, $count ) {
1148
  global $wpdb;
 
1149
 
1150
- if ( ! $alb ) return false; // no album, no coverphoto
 
 
 
 
 
 
1151
 
1152
  // Find cover photo id
1153
  $id = wppa_get_album_item( $alb, 'main_photo' );
@@ -1235,6 +1242,8 @@ global $wpdb;
1235
  if ( is_array( $temp ) ) foreach ( $temp as $item ) {
1236
  $ids[] = $item['id'];
1237
  }
 
 
1238
  return $ids;
1239
  }
1240
 
1146
  // If one assigned but no longer exists or moved to other album: treat as random
1147
  function wppa_get_coverphoto_ids( $alb, $count ) {
1148
  global $wpdb;
1149
+ static $cached_cover_photo_ids;
1150
 
1151
+ // no album, no coverphoto
1152
+ if ( ! $alb ) return false;
1153
+
1154
+ // Did we do this before?
1155
+ if ( isset( $cached_cover_photo_ids[$alb] ) ) {
1156
+ return $cached_cover_photo_ids[$alb];
1157
+ }
1158
 
1159
  // Find cover photo id
1160
  $id = wppa_get_album_item( $alb, 'main_photo' );
1242
  if ( is_array( $temp ) ) foreach ( $temp as $item ) {
1243
  $ids[] = $item['id'];
1244
  }
1245
+
1246
+ $cached_cover_photo_ids[$alb] = $ids;
1247
  return $ids;
1248
  }
1249
 
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.4.06
7
  *
8
  *
9
  */
@@ -2580,29 +2580,37 @@ global $wppa_first_comment_html;
2580
  $avt = false;
2581
  $usr = false;
2582
 
2583
- // First try to find the user by email address ( works only if email required on comments )
2584
- if ( $comment['email'] ) {
2585
- $usr = get_user_by( 'email', $comment['email'] );
2586
- }
2587
 
2588
- // If not found, try to find the user by login name ( works only if login name is equal to display name )
2589
- if ( ! $usr ) {
2590
- $usr = get_user_by( 'login', $comment['user'] );
2591
- }
2592
 
2593
- // Still no user, try to find him by display name
2594
- if ( ! $usr ) {
2595
- $usr = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE `display_name` = %s", $comment['user'] ) );
 
2596
 
2597
- // Accept this user if he is the only one with this display name
2598
- if ( count( $usr ) != 1 ) {
2599
- $usr = false;
 
 
 
 
 
2600
  }
2601
- }
2602
 
2603
- // If a user is found, see for local Avatar ?
2604
- if ( $usr ) {
2605
- $avt = str_replace( "'", "\"", get_avatar( $usr->ID, wppa_opt( 'gravatar_size' ), $default ) );
 
 
 
 
 
 
2606
  }
2607
 
2608
  // Global avatars off ? try myself
@@ -2760,7 +2768,7 @@ global $wppa_first_comment_html;
2760
  '</td>' .
2761
  '</tr>';
2762
 
2763
- if ( wppa_switch( 'comment_email_required' ) ) {
2764
  $result .= '<tr valign="top" style="'.$vis.'">' .
2765
  '<td class="wppa-box-text wppa-td" style="width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
2766
  __( 'Your email:', 'wp-photo-album-plus' ) .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.4.08
7
  *
8
  *
9
  */
2580
  $avt = false;
2581
  $usr = false;
2582
 
2583
+ if ( is_user_logged_in() ) {
 
 
 
2584
 
2585
+ // First try to find the user by email address ( works only if email required on comments )
2586
+ if ( $comment['email'] ) {
2587
+ $usr = get_user_by( 'email', $comment['email'] );
2588
+ }
2589
 
2590
+ // If not found, try to find the user by login name ( works only if login name is equal to display name )
2591
+ if ( ! $usr ) {
2592
+ $usr = get_user_by( 'login', $comment['user'] );
2593
+ }
2594
 
2595
+ // Still no user, try to find him by display name
2596
+ if ( ! $usr ) {
2597
+ $usr = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE `display_name` = %s", $comment['user'] ) );
2598
+
2599
+ // Accept this user if he is the only one with this display name
2600
+ if ( count( $usr ) != 1 ) {
2601
+ $usr = false;
2602
+ }
2603
  }
 
2604
 
2605
+ // If a user is found, see for local Avatar ?
2606
+ if ( $usr ) {
2607
+ if ( is_array( $usr ) ) {
2608
+ $avt = str_replace( "'", "\"", get_avatar( $usr[0]->ID, wppa_opt( 'gravatar_size' ), $default ) );
2609
+ }
2610
+ else {
2611
+ $avt = str_replace( "'", "\"", get_avatar( $usr->ID, wppa_opt( 'gravatar_size' ), $default ) );
2612
+ }
2613
+ }
2614
  }
2615
 
2616
  // Global avatars off ? try myself
2768
  '</td>' .
2769
  '</tr>';
2770
 
2771
+ if ( wppa_opt( 'comment_email_required' ) != 'none' ) {
2772
  $result .= '<tr valign="top" style="'.$vis.'">' .
2773
  '<td class="wppa-box-text wppa-td" style="width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
2774
  __( 'Your email:', 'wp-photo-album-plus' ) .
wppa-common-functions.php CHANGED
@@ -1254,12 +1254,19 @@ global $wppa;
1254
 
1255
  function wppa_table_exists( $xtable ) {
1256
  global $wpdb;
1257
-
1258
- $tables = $wpdb->get_results( "SHOW TABLES FROM `".DB_NAME."`", ARRAY_A );
1259
- wppa_dbg_q( 'Q213' );
1260
 
1261
  // Some sqls do not show tables, benefit of the doubt: assume table exists
1262
- if ( empty( $tables ) ) return true;
 
 
 
 
 
 
 
 
 
1263
 
1264
  // Normal check
1265
  foreach ( $tables as $table ) {
1254
 
1255
  function wppa_table_exists( $xtable ) {
1256
  global $wpdb;
1257
+ static $tables;
 
 
1258
 
1259
  // Some sqls do not show tables, benefit of the doubt: assume table exists
1260
+ if ( $tables === false ) return true;
1261
+
1262
+ if ( empty( $tables ) ) {
1263
+ $tables = $wpdb->get_results( "SHOW TABLES FROM `".DB_NAME."`", ARRAY_A );
1264
+ }
1265
+
1266
+ if ( empty( $tables ) ) {
1267
+ $tables = false;
1268
+ return true;
1269
+ }
1270
 
1271
  // Normal check
1272
  foreach ( $tables as $table ) {
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
- * Version 6.4.07
7
  *
8
  */
9
 
@@ -2180,7 +2180,7 @@ global $wppa_done;
2180
  $email = sanitize_email( wppa_get_post( 'comemail' ) );
2181
 
2182
  if ( ! $email ) {
2183
- if ( wppa_switch( 'comment_email_required' ) ) die( 'Illegal attempt to enter a comment 2' );
2184
  else $email = wppa_get_user(); // If email not present and not required, use his IP
2185
  }
2186
 
@@ -3714,6 +3714,7 @@ function wppa_sphoto() {
3714
  ' id="wppa-container-' . wppa( 'mocc' ) . '"' .
3715
  ' class="' .
3716
  ( wppa( 'align' ) ? 'align' . wppa( 'align' ) : '' ) .
 
3717
  ' wppa-sphoto-' . wppa( 'mocc' ) .
3718
  '"' .
3719
  ' style="width:' . $contwidth . 'px;position:relative;"' .
@@ -4516,7 +4517,7 @@ global $wpdb;
4516
  return $result;
4517
  }
4518
 
4519
- // Get the title to be used for lightbox links == thext under the lightbox image
4520
  function wppa_get_lbtitle( $type, $id ) {
4521
 
4522
  if ( ! is_numeric( $id ) || $id < '1' ) wppa_dbg_msg( 'Invalid arg wppa_get_lbtitle( '.$id.' )', 'red' );
@@ -4565,11 +4566,17 @@ function wppa_get_lbtitle( $type, $id ) {
4565
  ( current_user_can( 'wppa_moderate' ) ) ||
4566
  ( wppa_get_user() == wppa_get_photo_owner( $id ) && wppa_switch( 'upload_edit' ) )
4567
  ) {
 
 
 
 
 
 
4568
  $result .= '
4569
  <div style="float:right; margin-right:6px;" >' .
4570
  '<a' .
4571
  ' style="color:green;cursor:pointer;"' .
4572
- ' onclick="_wppaStop( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($id).'\'').' ); return false;"' .
4573
  ' >' .
4574
  __( 'Edit' , 'wp-photo-album-plus') .
4575
  '</a>' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
+ * Version 6.4.08
7
  *
8
  */
9
 
2180
  $email = sanitize_email( wppa_get_post( 'comemail' ) );
2181
 
2182
  if ( ! $email ) {
2183
+ if ( wppa_opt( 'comment_email_required' ) == 'required' ) die( 'Illegal attempt to enter a comment 2' );
2184
  else $email = wppa_get_user(); // If email not present and not required, use his IP
2185
  }
2186
 
3714
  ' id="wppa-container-' . wppa( 'mocc' ) . '"' .
3715
  ' class="' .
3716
  ( wppa( 'align' ) ? 'align' . wppa( 'align' ) : '' ) .
3717
+ ' wppa-sphoto' .
3718
  ' wppa-sphoto-' . wppa( 'mocc' ) .
3719
  '"' .
3720
  ' style="width:' . $contwidth . 'px;position:relative;"' .
4517
  return $result;
4518
  }
4519
 
4520
+ // Get the title to be used for lightbox links == text under the lightbox image
4521
  function wppa_get_lbtitle( $type, $id ) {
4522
 
4523
  if ( ! is_numeric( $id ) || $id < '1' ) wppa_dbg_msg( 'Invalid arg wppa_get_lbtitle( '.$id.' )', 'red' );
4566
  ( current_user_can( 'wppa_moderate' ) ) ||
4567
  ( wppa_get_user() == wppa_get_photo_owner( $id ) && wppa_switch( 'upload_edit' ) )
4568
  ) {
4569
+ if ( $type == 'slide' ) {
4570
+ $parg = esc_js('\''.wppa_encrypt_photo($id).'\'');
4571
+ }
4572
+ else {
4573
+ $parg = '\''.wppa_encrypt_photo($id).'\'';
4574
+ }
4575
  $result .= '
4576
  <div style="float:right; margin-right:6px;" >' .
4577
  '<a' .
4578
  ' style="color:green;cursor:pointer;"' .
4579
+ ' onclick="' . ( $type == 'slide' ? '_wppaStop( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' ); return false;"' .
4580
  ' >' .
4581
  __( 'Edit' , 'wp-photo-album-plus') .
4582
  '</a>' .
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 6.4.07
7
  *
8
  */
9
 
@@ -1090,7 +1090,7 @@ function wppa_album_download_link( $albumid ) {
1090
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1091
 
1092
  wppa_out( '<div style="clear:both;" ></div>' );
1093
- wppa_out( '<a onclick="wppaAjaxDownloadAlbum('.wppa( 'mocc' ).', '.$albumid.' );" style="cursor:pointer;" title="'.__('Download', 'wp-photo-album-plus').'">'.__('Download album', 'wp-photo-album-plus').'</a>' );
1094
  wppa_out( '<img id="dwnspin-'.wppa( 'mocc' ).'-'.$albumid.'" src="'.wppa_get_imgdir().'wpspin.gif" style="margin-left:6px; display:none;" alt="spin" />' );
1095
  }
1096
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 6.4.08
7
  *
8
  */
9
 
1090
  if ( ! wppa_switch( 'allow_download_album' ) ) return; // Not enabled
1091
 
1092
  wppa_out( '<div style="clear:both;" ></div>' );
1093
+ 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>' );
1094
  wppa_out( '<img id="dwnspin-'.wppa( 'mocc' ).'-'.$albumid.'" src="'.wppa_get_imgdir().'wpspin.gif" style="margin-left:6px; display:none;" alt="spin" />' );
1095
  }
1096
 
wppa-maintenance.php CHANGED
@@ -683,10 +683,10 @@ global $wppa_supported_audio_extensions;
683
  }
684
 
685
  // Re-Init options
686
- delete_option( $slug.'_togo', '' );
687
- delete_option( $slug.'_status', '' );
688
- delete_option( $slug.'_last', '0' );
689
- delete_option( $slug.'_user', '' );
690
 
691
  // Post-processing needed?
692
  switch ( $slug ) {
@@ -939,6 +939,67 @@ global $wpdb;
939
  </div><div style="clear:both;"></div>';
940
 
941
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942
 
943
  default:
944
  $result = 'Error: Unimplemented slug: '.$slug.' in wppa_do_maintenance_popup()';
683
  }
684
 
685
  // Re-Init options
686
+ update_option( $slug.'_togo', '' );
687
+ update_option( $slug.'_status', '' );
688
+ update_option( $slug.'_last', '0' );
689
+ update_option( $slug.'_user', '' );
690
 
691
  // Post-processing needed?
692
  switch ( $slug ) {
939
  </div><div style="clear:both;"></div>';
940
 
941
  break;
942
+
943
+ case 'wppa_list_comments':
944
+ $total = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_COMMENTS."`" );
945
+ $order = wppa_opt( 'list_comments_by' );
946
+ if ( $order == 'timestamp' ) $order .= ' DESC';
947
+ $query = "SELECT * FROM `".WPPA_COMMENTS."` ORDER BY ".$order." LIMIT 1000";
948
+ $result .= $query.'<br />';
949
+ $comments = $wpdb->get_results( $query, ARRAY_A );
950
+ $result .= '
951
+ <style>td, th { border-right: 1px solid darkgray; } </style>
952
+ <h2>List of comments <small>( Max 1000 entries of total '.$total.' )</small></h2>
953
+ <div style="float:left; clear:both; width:100%; overflow:auto; background-color:#f1f1f1; border:1px solid #ddd;" >';
954
+ if ( $comments ) {
955
+ $result .= '
956
+ <table>
957
+ <thead>
958
+ <tr>
959
+ <th>Id</th>
960
+ <th>Timestamp</th>
961
+ <th>Date/time</th>
962
+ <th>Status</th>
963
+ <th>User</th>
964
+ <th>Email</th>
965
+ <th>Photo id</th>
966
+ <th></th>
967
+ <th>Comment</th>
968
+ </tr>
969
+ <tr><td colspan="10"><hr /></td></tr>
970
+ </thead>
971
+ <tbody>';
972
+
973
+ foreach ( $comments as $comment ) {
974
+ $thumb = wppa_cache_thumb( $comment['photo'] );
975
+ $result .= '
976
+ <tr>
977
+ <td>'.$comment['id'].'</td>
978
+ <td>'.$comment['timestamp'].'</td>
979
+ <td>'.( $comment['timestamp'] ? wppa_local_date(get_option('date_format', "F j, Y,").' '.get_option('time_format', "g:i a"), $comment['timestamp']) : 'pre-historic' ).'</td>
980
+ <td>'.$comment['status'].'</td>
981
+ <td>'.$comment['user'].'</td>
982
+ <td>'.$comment['email'].'</td>
983
+ <td>'.$comment['photo'].'</td>
984
+ <td style="width:250px; text-align:center;"><img src="'.wppa_get_thumb_url($comment['photo']).'"
985
+ style="height: 40px;"
986
+ onmouseover="jQuery(this).stop().animate({height:this.naturalHeight}, 200);"
987
+ onmouseout="jQuery(this).stop().animate({height:\'40px\'}, 200);" /></td>
988
+ <td>'.$comment['comment'].'</td>
989
+ </tr>';
990
+ }
991
+
992
+ $result .= '
993
+ </tbody>
994
+ </table>';
995
+ }
996
+ else {
997
+ $result .= __('There are no comments', 'wp-photo-album-plus');
998
+ $result .= '<br />Query='.$wpdb->prepare( "SELECT * FROM `".WPPA_COMMENTS."` ORDER BY %s DESC LIMIT 1000", wppa_opt( 'list_comments_by' ) );
999
+ }
1000
+ $result .= '
1001
+ </div><div style="clear:both;"></div>';
1002
+ break;
1003
 
1004
  default:
1005
  $result = 'Error: Unimplemented slug: '.$slug.' in wppa_do_maintenance_popup()';
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.07
7
  *
8
  */
9
 
@@ -522,19 +522,24 @@ function wppa_redirect() {
522
  if ( ! isset( $_SERVER["REQUEST_URI"] ) ) return;
523
 
524
  $uri = $_SERVER["REQUEST_URI"];
525
- $wppapos = stripos($uri, '/wppaspec/');
526
 
527
  if ( $wppapos && get_option('permalink_structure') ) {
528
- /* old style solution
529
- $newuri = wppa_convert_from_pretty($uri);
530
- if ( $newuri == $uri ) return;
531
- // Although the url is urlencoded it is damaged by wp_redirect when it contains chars like �, so we do a header() call
532
- header('Location: '.$newuri, true, 302);
533
- exit;
534
- */
 
 
 
 
 
 
535
  // New style solution
536
  $newuri = wppa_convert_from_pretty($uri);
537
- // wppa_log('dbg','Newuri='.$newuri);
538
  if ( $newuri == $uri ) return;
539
  $_SERVER["REQUEST_URI"] = $newuri;
540
  wppa_convert_uri_to_get( $newuri );
@@ -717,7 +722,7 @@ global $wppa_init_js_data;
717
  wppaNextOnCallback = '.( wppa_switch('wppa_next_on_callback') ? 'true' : 'false' ).';
718
  wppaStarOpacity = '.( wppa_opt( 'star_opacity' )/'100' ).';
719
  wppaSlideWrap = '.( wppa_switch('wppa_slide_wrap') ? 'true' : 'false' ).';
720
- wppaEmailRequired = '.( wppa_switch('wppa_comment_email_required') ? 'true' : 'false' ).';
721
  wppaSlideBorderWidth = '.$fbw.';
722
  wppaAllowAjax = '.( wppa_switch('wppa_allow_ajax') ? 'true' : 'false' ).';
723
  wppaUsePhotoNamesInUrls = '.( wppa_switch('wppa_use_photo_names_in_urls') ? 'true' : 'false' ).';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.4.08
7
  *
8
  */
9
 
522
  if ( ! isset( $_SERVER["REQUEST_URI"] ) ) return;
523
 
524
  $uri = $_SERVER["REQUEST_URI"];
525
+ $wppapos = stripos( $uri, '/wppaspec/' );
526
 
527
  if ( $wppapos && get_option('permalink_structure') ) {
528
+
529
+ // old style solution, still required when qTranslate is active
530
+ $plugins = implode( ',', get_option( 'active_plugins' ) );
531
+ if ( stripos( $plugins, 'qtranslate' ) !== false ) {
532
+
533
+ $newuri = wppa_convert_from_pretty( $uri );
534
+ if ( $newuri == $uri ) return;
535
+
536
+ // Although the url is urlencoded it is damaged by wp_redirect when it contains chars like �, so we do a header() call
537
+ header( 'Location: '.$newuri, true, 302 );
538
+ exit;
539
+ }
540
+
541
  // New style solution
542
  $newuri = wppa_convert_from_pretty($uri);
 
543
  if ( $newuri == $uri ) return;
544
  $_SERVER["REQUEST_URI"] = $newuri;
545
  wppa_convert_uri_to_get( $newuri );
722
  wppaNextOnCallback = '.( wppa_switch('wppa_next_on_callback') ? 'true' : 'false' ).';
723
  wppaStarOpacity = '.( wppa_opt( 'star_opacity' )/'100' ).';
724
  wppaSlideWrap = '.( wppa_switch('wppa_slide_wrap') ? 'true' : 'false' ).';
725
+ wppaEmailRequired = "'.wppa_opt('wppa_comment_email_required').'";
726
  wppaSlideBorderWidth = '.$fbw.';
727
  wppaAllowAjax = '.( wppa_switch('wppa_allow_ajax') ? 'true' : 'false' ).';
728
  wppaUsePhotoNamesInUrls = '.( wppa_switch('wppa_use_photo_names_in_urls') ? 'true' : 'false' ).';
wppa-session.php CHANGED
@@ -175,7 +175,7 @@ static $last_query;
175
 
176
  // Report failure
177
  else {
178
- wppa_log( 'Error', 'Unable to save session.' );
179
  return false;
180
  }
181
  }
175
 
176
  // Report failure
177
  else {
178
+ wppa_log( 'Dbg', 'Unable to save session. Expected id:'.wppa_get_session_id() );
179
  return false;
180
  }
181
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.4.07
7
  *
8
  */
9
 
@@ -4265,7 +4265,15 @@ global $wppa_tags;
4265
  $desc = __('Commenting users must enter their email addresses.', 'wp-photo-album-plus');
4266
  $help = '';
4267
  $slug = 'wppa_comment_email_required';
4268
- $html = wppa_checkbox($slug);
 
 
 
 
 
 
 
 
4269
  $clas = 'wppa_comment_';
4270
  $tags = 'comment';
4271
  wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
@@ -6955,6 +6963,22 @@ global $wppa_tags;
6955
  $tags = 'system';
6956
  wppa_setting(false, '4', $name, $desc, $html, $help, $clas, $tags);
6957
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6958
  ?>
6959
  </tbody>
6960
  <tfoot style="font-weight: bold;" class="wppa_table_8">
@@ -8856,118 +8880,195 @@ global $wppa_tags;
8856
  <td><?php _e('Name', 'wp-photo-album-plus') ?></td>
8857
  <td><?php _e('Description', 'wp-photo-album-plus') ?></td>
8858
  <td><?php _e('Value', 'wp-photo-album-plus') ?></td>
 
8859
  </tr>
8860
  <tbody class="wppa_table_12">
8861
  <tr style="color:#333;">
8862
  <td>WPPA_ALBUMS</td>
8863
  <td><small><?php _e('Albums db table name.', 'wp-photo-album-plus') ?></small></td>
8864
  <td><?php echo(WPPA_ALBUMS) ?></td>
 
 
 
 
 
 
 
8865
  </tr>
8866
  <tr style="color:#333;">
8867
  <td>WPPA_PHOTOS</td>
8868
  <td><small><?php _e('Photos db table name.', 'wp-photo-album-plus') ?></small></td>
8869
  <td><?php echo(WPPA_PHOTOS) ?></td>
 
 
 
 
 
 
 
8870
  </tr>
8871
  <tr style="color:#333;">
8872
  <td>WPPA_RATING</td>
8873
  <td><small><?php _e('Rating db table name.', 'wp-photo-album-plus') ?></small></td>
8874
  <td><?php echo(WPPA_RATING) ?></td>
 
 
 
 
 
 
 
8875
  </tr>
8876
  <tr style="color:#333;">
8877
  <td>WPPA_COMMENTS</td>
8878
  <td><small><?php _e('Comments db table name.', 'wp-photo-album-plus') ?></small></td>
8879
  <td><?php echo(WPPA_COMMENTS) ?></td>
 
 
 
 
 
 
 
8880
  </tr>
8881
  <tr style="color:#333;">
8882
  <td>WPPA_IPTC</td>
8883
  <td><small><?php _e('IPTC db table name.', 'wp-photo-album-plus') ?></small></td>
8884
  <td><?php echo(WPPA_IPTC) ?></td>
 
 
 
 
 
 
 
8885
  </tr>
8886
  <tr style="color:#333;">
8887
  <td>WPPA_EXIF</td>
8888
  <td><small><?php _e('EXIF db table name.', 'wp-photo-album-plus') ?></small></td>
8889
  <td><?php echo(WPPA_EXIF) ?></td>
 
 
 
 
 
 
 
8890
  </tr>
8891
  <tr style="color:#333;">
8892
  <td>WPPA_INDEX</td>
8893
  <td><small><?php _e('Index db table name.', 'wp-photo-album-plus') ?></small></td>
8894
  <td><?php echo(WPPA_INDEX) ?></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8895
  </tr>
8896
  <tr style="color:#333;">
8897
  <td>WPPA_FILE</td>
8898
  <td><small><?php _e('Plugins main file name.', 'wp-photo-album-plus') ?></small></td>
8899
  <td><?php echo(WPPA_FILE) ?></td>
 
8900
  </tr>
8901
  <tr style="color:#333;">
8902
  <td>WPPA_ABSPATH</td>
8903
  <td><small><?php _e('ABSPATH windows proof', 'wp-photo-album-plus') ?></small></td>
8904
  <td><?php echo WPPA_ABSPATH ?></td>
 
8905
  </tr>
8906
  <tr style="color:#333;">
8907
  <td>WPPA_PATH</td>
8908
  <td><small><?php _e('Path to plugins directory.', 'wp-photo-album-plus') ?></small></td>
8909
  <td><?php echo(WPPA_PATH) ?></td>
 
8910
  </tr>
8911
  <tr style="color:#333;">
8912
  <td>WPPA_NAME</td>
8913
  <td><small><?php _e('Plugins directory name.', 'wp-photo-album-plus') ?></small></td>
8914
  <td><?php echo(WPPA_NAME) ?></td>
 
8915
  </tr>
8916
  <tr style="color:#333;">
8917
  <td>WPPA_URL</td>
8918
  <td><small><?php _e('Plugins directory url.', 'wp-photo-album-plus') ?></small></td>
8919
  <td><?php echo(WPPA_URL) ?></td>
 
8920
  </tr>
8921
  <tr style="color:#333;">
8922
  <td>WPPA_UPLOAD</td>
8923
  <td><small><?php _e('The relative upload directory.', 'wp-photo-album-plus') ?></small></td>
8924
  <td><?php echo(WPPA_UPLOAD) ?></td>
 
8925
  </tr>
8926
  <tr style="color:#333;">
8927
  <td>WPPA_UPLOAD_PATH</td>
8928
  <td><small><?php _e('The upload directory path.', 'wp-photo-album-plus') ?></small></td>
8929
  <td><?php echo(WPPA_UPLOAD_PATH) ?></td>
 
8930
  </tr>
8931
  <tr style="color:#333;">
8932
  <td>WPPA_UPLOAD_URL</td>
8933
  <td><small><?php _e('The upload directory url.', 'wp-photo-album-plus') ?></small></td>
8934
  <td><?php echo(WPPA_UPLOAD_URL) ?></td>
 
8935
  </tr>
8936
  <tr style="color:#333;">
8937
  <td>WPPA_DEPOT</td>
8938
  <td><small><?php _e('The relative depot directory.', 'wp-photo-album-plus') ?></small></td>
8939
  <td><?php echo(WPPA_DEPOT) ?></td>
 
8940
  </tr>
8941
  <tr style="color:#333;">
8942
  <td>WPPA_DEPOT_PATH</td>
8943
  <td><small><?php _e('The depot directory path.', 'wp-photo-album-plus') ?></small></td>
8944
  <td><?php echo(WPPA_DEPOT_PATH) ?></td>
 
8945
  </tr>
8946
  <tr style="color:#333;">
8947
  <td>WPPA_DEPOT_URL</td>
8948
  <td><small><?php _e('The depot directory url.', 'wp-photo-album-plus') ?></small></td>
8949
  <td><?php echo(WPPA_DEPOT_URL) ?></td>
 
8950
  </tr>
8951
  <tr style="color:#333;">
8952
  <td>WPPA_CONTENT_PATH</td>
8953
  <td><small><?php _e('The path to wp-content.', 'wp-photo-album-plus') ?></small></td>
8954
  <td><?php echo(WPPA_CONTENT_PATH) ?></td>
 
8955
  </tr>
8956
  <tr style="color:#333;">
8957
  <td>wp_upload_dir() : ['basedir']</td>
8958
  <td><small><?php _e('WP Base upload dir.', 'wp-photo-album-plus') ?></small></td>
8959
  <td><?php $wp_uploaddir = wp_upload_dir();
8960
  echo $wp_uploaddir['basedir']; ?></td>
 
8961
  </tr>
8962
  <tr style="color:#333;">
8963
  <td>content_url()</td>
8964
  <td><small><?php _e('WP Content url.', 'wp-photo-album-plus') ?></small></td>
8965
  <td><?php echo(content_url()) ?></td>
 
8966
  </tr>
8967
  <tr style="color:#333;">
8968
  <td>$_SERVER['HTTP_HOST']</td>
8969
  <td><small><?php ?></small></td>
8970
  <td><?php echo $_SERVER['HTTP_HOST'] ?></td>
 
8971
  </tr>
8972
  </tbody>
8973
  </table>
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.4.08
7
  *
8
  */
9
 
4265
  $desc = __('Commenting users must enter their email addresses.', 'wp-photo-album-plus');
4266
  $help = '';
4267
  $slug = 'wppa_comment_email_required';
4268
+ $opts = array( __('None', 'wp-photo-album-plus'),
4269
+ __('Optional', 'wp-photo-album-plus'),
4270
+ __('Required', 'wp-photo-album-plus'),
4271
+ );
4272
+ $vals = array( 'none',
4273
+ 'optional',
4274
+ 'required',
4275
+ );
4276
+ $html = wppa_select($slug, $opts, $vals);
4277
  $clas = 'wppa_comment_';
4278
  $tags = 'comment';
4279
  wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
6963
  $tags = 'system';
6964
  wppa_setting(false, '4', $name, $desc, $html, $help, $clas, $tags);
6965
 
6966
+ $name = __('List comments', 'wp-photo-album-plus');
6967
+ $desc = __('Show the content of the comments table.', 'wp-photo-album-plus');
6968
+ $help = '';
6969
+ $slug1 = 'wppa_list_comments_by';
6970
+ $slug2 = 'wppa_list_comments';
6971
+ $opts = array( 'Email', 'Name', 'Timestamp' );
6972
+ $vals = array( 'email', 'name', 'timestamp' );
6973
+ $html1 = '<small style="float:left;">'.__('Order by:', 'wp-photo-album-plus').'</small>'.wppa_select($slug1, $opts, $vals);
6974
+ $html2 = wppa_popup_button( $slug2 );
6975
+ $html3 = '';
6976
+ $html4 = '';
6977
+ $html = array($html1, $html2, $html3, $html4);
6978
+ $clas = '';
6979
+ $tags = 'system,comment';
6980
+ wppa_setting(false, '5', $name, $desc, $html, $help, $clas, $tags);
6981
+
6982
  ?>
6983
  </tbody>
6984
  <tfoot style="font-weight: bold;" class="wppa_table_8">
8880
  <td><?php _e('Name', 'wp-photo-album-plus') ?></td>
8881
  <td><?php _e('Description', 'wp-photo-album-plus') ?></td>
8882
  <td><?php _e('Value', 'wp-photo-album-plus') ?></td>
8883
+ <td></td>
8884
  </tr>
8885
  <tbody class="wppa_table_12">
8886
  <tr style="color:#333;">
8887
  <td>WPPA_ALBUMS</td>
8888
  <td><small><?php _e('Albums db table name.', 'wp-photo-album-plus') ?></small></td>
8889
  <td><?php echo(WPPA_ALBUMS) ?></td>
8890
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8891
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_ALBUMS . '\')" >' .
8892
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_ALBUMS . '.csv' .
8893
+ '</a> ' .
8894
+ '<img id="' . WPPA_ALBUMS . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8895
+ } ?>
8896
+ </td>
8897
  </tr>
8898
  <tr style="color:#333;">
8899
  <td>WPPA_PHOTOS</td>
8900
  <td><small><?php _e('Photos db table name.', 'wp-photo-album-plus') ?></small></td>
8901
  <td><?php echo(WPPA_PHOTOS) ?></td>
8902
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8903
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_PHOTOS . '\')" >' .
8904
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_PHOTOS . '.csv' .
8905
+ '</a> ' .
8906
+ '<img id="' . WPPA_PHOTOS . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8907
+ } ?>
8908
+ </td>
8909
  </tr>
8910
  <tr style="color:#333;">
8911
  <td>WPPA_RATING</td>
8912
  <td><small><?php _e('Rating db table name.', 'wp-photo-album-plus') ?></small></td>
8913
  <td><?php echo(WPPA_RATING) ?></td>
8914
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8915
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_RATING . '\')" >' .
8916
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_RATING . '.csv' .
8917
+ '</a> ' .
8918
+ '<img id="' . WPPA_RATING . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8919
+ } ?>
8920
+ </td>
8921
  </tr>
8922
  <tr style="color:#333;">
8923
  <td>WPPA_COMMENTS</td>
8924
  <td><small><?php _e('Comments db table name.', 'wp-photo-album-plus') ?></small></td>
8925
  <td><?php echo(WPPA_COMMENTS) ?></td>
8926
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8927
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_COMMENTS . '\')" >' .
8928
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_COMMENTS . '.csv' .
8929
+ '</a> ' .
8930
+ '<img id="' . WPPA_COMMENTS . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8931
+ } ?>
8932
+ </td>
8933
  </tr>
8934
  <tr style="color:#333;">
8935
  <td>WPPA_IPTC</td>
8936
  <td><small><?php _e('IPTC db table name.', 'wp-photo-album-plus') ?></small></td>
8937
  <td><?php echo(WPPA_IPTC) ?></td>
8938
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8939
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_IPTC . '\')" >' .
8940
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_IPTC . '.csv' .
8941
+ '</a> ' .
8942
+ '<img id="' . WPPA_IPTC . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8943
+ } ?>
8944
+ </td>
8945
  </tr>
8946
  <tr style="color:#333;">
8947
  <td>WPPA_EXIF</td>
8948
  <td><small><?php _e('EXIF db table name.', 'wp-photo-album-plus') ?></small></td>
8949
  <td><?php echo(WPPA_EXIF) ?></td>
8950
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8951
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_EXIF . '\')" >' .
8952
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_EXIF . '.csv' .
8953
+ '</a> ' .
8954
+ '<img id="' . WPPA_EXIF . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8955
+ } ?>
8956
+ </td>
8957
  </tr>
8958
  <tr style="color:#333;">
8959
  <td>WPPA_INDEX</td>
8960
  <td><small><?php _e('Index db table name.', 'wp-photo-album-plus') ?></small></td>
8961
  <td><?php echo(WPPA_INDEX) ?></td>
8962
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8963
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_INDEX . '\')" >' .
8964
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_INDEX . '.csv' .
8965
+ '</a> ' .
8966
+ '<img id="' . WPPA_INDEX . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8967
+ } ?>
8968
+ </td>
8969
+ </tr>
8970
+ <tr style="color:#333;">
8971
+ <td>WPPA_SESSION</td>
8972
+ <td><small><?php _e('Index db table name.', 'wp-photo-album-plus') ?></small></td>
8973
+ <td><?php echo(WPPA_SESSION) ?></td>
8974
+ <td><?php if ( wppa_user_is( 'administrator' ) ) {
8975
+ echo '<a onclick="wppaExportDbTable(\'' . WPPA_SESSION . '\')" >' .
8976
+ __('Download', 'wp-photo-album-plus') . ' ' . WPPA_SESSION . '.csv' .
8977
+ '</a> ' .
8978
+ '<img id="' . WPPA_SESSION . '-spin" src="' . wppa_get_imgdir( 'wpspin.gif' ) . '" style="display:none;" />';
8979
+ } ?>
8980
+ </td>
8981
  </tr>
8982
  <tr style="color:#333;">
8983
  <td>WPPA_FILE</td>
8984
  <td><small><?php _e('Plugins main file name.', 'wp-photo-album-plus') ?></small></td>
8985
  <td><?php echo(WPPA_FILE) ?></td>
8986
+ <td></td>
8987
  </tr>
8988
  <tr style="color:#333;">
8989
  <td>WPPA_ABSPATH</td>
8990
  <td><small><?php _e('ABSPATH windows proof', 'wp-photo-album-plus') ?></small></td>
8991
  <td><?php echo WPPA_ABSPATH ?></td>
8992
+ <td></td>
8993
  </tr>
8994
  <tr style="color:#333;">
8995
  <td>WPPA_PATH</td>
8996
  <td><small><?php _e('Path to plugins directory.', 'wp-photo-album-plus') ?></small></td>
8997
  <td><?php echo(WPPA_PATH) ?></td>
8998
+ <td></td>
8999
  </tr>
9000
  <tr style="color:#333;">
9001
  <td>WPPA_NAME</td>
9002
  <td><small><?php _e('Plugins directory name.', 'wp-photo-album-plus') ?></small></td>
9003
  <td><?php echo(WPPA_NAME) ?></td>
9004
+ <td></td>
9005
  </tr>
9006
  <tr style="color:#333;">
9007
  <td>WPPA_URL</td>
9008
  <td><small><?php _e('Plugins directory url.', 'wp-photo-album-plus') ?></small></td>
9009
  <td><?php echo(WPPA_URL) ?></td>
9010
+ <td></td>
9011
  </tr>
9012
  <tr style="color:#333;">
9013
  <td>WPPA_UPLOAD</td>
9014
  <td><small><?php _e('The relative upload directory.', 'wp-photo-album-plus') ?></small></td>
9015
  <td><?php echo(WPPA_UPLOAD) ?></td>
9016
+ <td></td>
9017
  </tr>
9018
  <tr style="color:#333;">
9019
  <td>WPPA_UPLOAD_PATH</td>
9020
  <td><small><?php _e('The upload directory path.', 'wp-photo-album-plus') ?></small></td>
9021
  <td><?php echo(WPPA_UPLOAD_PATH) ?></td>
9022
+ <td></td>
9023
  </tr>
9024
  <tr style="color:#333;">
9025
  <td>WPPA_UPLOAD_URL</td>
9026
  <td><small><?php _e('The upload directory url.', 'wp-photo-album-plus') ?></small></td>
9027
  <td><?php echo(WPPA_UPLOAD_URL) ?></td>
9028
+ <td></td>
9029
  </tr>
9030
  <tr style="color:#333;">
9031
  <td>WPPA_DEPOT</td>
9032
  <td><small><?php _e('The relative depot directory.', 'wp-photo-album-plus') ?></small></td>
9033
  <td><?php echo(WPPA_DEPOT) ?></td>
9034
+ <td></td>
9035
  </tr>
9036
  <tr style="color:#333;">
9037
  <td>WPPA_DEPOT_PATH</td>
9038
  <td><small><?php _e('The depot directory path.', 'wp-photo-album-plus') ?></small></td>
9039
  <td><?php echo(WPPA_DEPOT_PATH) ?></td>
9040
+ <td></td>
9041
  </tr>
9042
  <tr style="color:#333;">
9043
  <td>WPPA_DEPOT_URL</td>
9044
  <td><small><?php _e('The depot directory url.', 'wp-photo-album-plus') ?></small></td>
9045
  <td><?php echo(WPPA_DEPOT_URL) ?></td>
9046
+ <td></td>
9047
  </tr>
9048
  <tr style="color:#333;">
9049
  <td>WPPA_CONTENT_PATH</td>
9050
  <td><small><?php _e('The path to wp-content.', 'wp-photo-album-plus') ?></small></td>
9051
  <td><?php echo(WPPA_CONTENT_PATH) ?></td>
9052
+ <td></td>
9053
  </tr>
9054
  <tr style="color:#333;">
9055
  <td>wp_upload_dir() : ['basedir']</td>
9056
  <td><small><?php _e('WP Base upload dir.', 'wp-photo-album-plus') ?></small></td>
9057
  <td><?php $wp_uploaddir = wp_upload_dir();
9058
  echo $wp_uploaddir['basedir']; ?></td>
9059
+ <td></td>
9060
  </tr>
9061
  <tr style="color:#333;">
9062
  <td>content_url()</td>
9063
  <td><small><?php _e('WP Content url.', 'wp-photo-album-plus') ?></small></td>
9064
  <td><?php echo(content_url()) ?></td>
9065
+ <td></td>
9066
  </tr>
9067
  <tr style="color:#333;">
9068
  <td>$_SERVER['HTTP_HOST']</td>
9069
  <td><small><?php ?></small></td>
9070
  <td><?php echo $_SERVER['HTTP_HOST'] ?></td>
9071
+ <td></td>
9072
  </tr>
9073
  </tbody>
9074
  </table>
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.07
7
  *
8
  */
9
 
@@ -34,6 +34,11 @@ global $silent;
34
  global $wppa_error;
35
 
36
  $old_rev = get_option('wppa_revision', '100');
 
 
 
 
 
37
 
38
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
39
 
@@ -398,6 +403,18 @@ global $silent;
398
  wppa_copy_setting( 'wppa_thumbsize', 'wppa_film_thumbsize' );
399
  }
400
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  }
402
 
403
  // Set Defaults
@@ -1008,7 +1025,7 @@ Hide Camera info
1008
  'wppa_comment_view_login' => 'no',
1009
  'wppa_comments_desc' => 'no',
1010
  'wppa_comment_moderation' => 'logout',
1011
- 'wppa_comment_email_required' => 'yes',
1012
  'wppa_comment_notify' => 'none',
1013
  'wppa_com_notify_previous' => 'no',
1014
  'wppa_comment_notify_added' => 'yes',
@@ -1246,6 +1263,7 @@ Hide Camera info
1246
  'wppa_extend_index' => '',
1247
  'wppa_list_index' => '',
1248
  'wppa_list_index_display_start' => '',
 
1249
  'wppa_append_text' => '',
1250
  'wppa_append_to_photodesc' => '',
1251
  'wppa_remove_text' => '',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.4.08
7
  *
8
  */
9
 
34
  global $wppa_error;
35
 
36
  $old_rev = get_option('wppa_revision', '100');
37
+
38
+ // If not a new install, remove obsolete tempfiles
39
+ if ( $old_rev > '100' ) {
40
+ wppa_delete_obsolete_tempfiles();
41
+ }
42
 
43
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
44
 
403
  wppa_copy_setting( 'wppa_thumbsize', 'wppa_film_thumbsize' );
404
  }
405
 
406
+ if ( $old_rev <= '6408' ) {
407
+ if ( get_option( 'wppa_comment_email_required', 'yes' ) ) {
408
+ update_option( 'wppa_comment_email_required', 'required' );
409
+ }
410
+ else {
411
+ update_option( 'wppa_comment_email_required', 'none' );
412
+ }
413
+ @ $wpdb->query( "UPDATE `wp_options` SET `autoload` = 'yes' WHERE `option_name` LIKE 'wppa_%_user'" );
414
+ @ $wpdb->query( "UPDATE `wp_options` SET `autoload` = 'yes' WHERE `option_name` LIKE 'wppa_%_status'" );
415
+ @ $wpdb->query( "UPDATE `wp_options` SET `autoload` = 'yes' WHERE `option_name` LIKE 'wppa_%_togo'" );
416
+ }
417
+
418
  }
419
 
420
  // Set Defaults
1025
  'wppa_comment_view_login' => 'no',
1026
  'wppa_comments_desc' => 'no',
1027
  'wppa_comment_moderation' => 'logout',
1028
+ 'wppa_comment_email_required' => 'required',
1029
  'wppa_comment_notify' => 'none',
1030
  'wppa_com_notify_previous' => 'no',
1031
  'wppa_comment_notify_added' => 'yes',
1263
  'wppa_extend_index' => '',
1264
  'wppa_list_index' => '',
1265
  'wppa_list_index_display_start' => '',
1266
+ 'wppa_list_comments_by' => 'name',
1267
  'wppa_append_text' => '',
1268
  'wppa_append_to_photodesc' => '',
1269
  'wppa_remove_text' => '',
wppa-users.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
- * Version 6.4.03
7
  *
8
  */
9
 
@@ -12,24 +12,28 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
12
  // Get number of users
13
  function wppa_get_user_count() {
14
  global $wpdb;
 
 
 
 
 
15
 
16
- $usercount = $wpdb->get_var( "SELECT COUNT(*) FROM `".$wpdb->users."`" );
17
- wppa_dbg_q( 'Q-usr' );
18
  return $usercount;
19
  }
20
 
21
  // Get all users
22
  function wppa_get_users() {
23
  global $wpdb;
 
24
 
25
- if ( wppa_get_user_count() > wppa_opt( 'max_users' ) ) {
26
- $users = array();
27
- }
28
- else {
29
- $users = $wpdb->get_results(
30
- "SELECT * FROM `".$wpdb->users."` ORDER BY `display_name`", ARRAY_A
31
- );
32
- wppa_dbg_q( 'Q-usr' );
33
  }
34
  return $users;
35
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
+ * Version 6.4.08
7
  *
8
  */
9
 
12
  // Get number of users
13
  function wppa_get_user_count() {
14
  global $wpdb;
15
+ static $usercount;
16
+
17
+ if ( empty( $usercount ) ) {
18
+ $usercount = $wpdb->get_var( "SELECT COUNT(*) FROM `" . $wpdb->users . "`" );
19
+ }
20
 
 
 
21
  return $usercount;
22
  }
23
 
24
  // Get all users
25
  function wppa_get_users() {
26
  global $wpdb;
27
+ static $users;
28
 
29
+ if ( empty($users) ) {
30
+ if ( wppa_get_user_count() > wppa_opt( 'max_users' ) ) {
31
+ $users = array();
32
+ }
33
+ else {
34
+ $users = $wpdb->get_results( "SELECT * FROM `".$wpdb->users."` " .
35
+ "ORDER BY `display_name`", ARRAY_A );
36
+ }
37
  }
38
  return $users;
39
  }
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.07
7
  *
8
  */
9
 
@@ -437,14 +437,36 @@ function wppa_add_paths( $albums ) {
437
 
438
  function wppa_add_parents($pages) {
439
  global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
 
440
 
441
  if ( is_array($pages) ) foreach ( array_keys($pages) as $index ) {
442
  $tempid = $pages[$index]['ID'];
443
- $pages[$index]['post_title'] = __(stripslashes($pages[$index]['post_title']), 'wp-photo-album-plus');
444
  while ( $tempid > '0') {
445
- $tempid = $wpdb->get_var($wpdb->prepare("SELECT `post_parent` FROM `" . $wpdb->posts . "` WHERE `ID` = %s", $tempid));
 
 
 
 
 
 
 
446
  if ( $tempid > '0' ) {
447
- $pages[$index]['post_title'] = __(stripslashes($wpdb->get_var($wpdb->prepare("SELECT `post_title` FROM `" . $wpdb->posts . "` WHERE `ID` = %s", $tempid))), 'wp-photo-album-plus').' > '.$pages[$index]['post_title'];
 
 
 
448
  }
449
  else $tempid = '0';
450
  }
@@ -899,11 +921,7 @@ global $wpdb;
899
  return $count;
900
  }
901
 
902
- function wppa_send_mail($to, $subj, $cont, $photo, $email = '') {
903
-
904
- wppa_dbg_msg('Sending mail to '.$to.' !');
905
-
906
- $debug = false;
907
 
908
  $message_part_1 = '';
909
  $message_part_2 = '';
@@ -919,8 +937,10 @@ function wppa_send_mail($to, $subj, $cont, $photo, $email = '') {
919
  $site = substr( $site, 0, $spos );
920
  }
921
 
922
- $from = 'From: noreply@'.$site;
923
- $extraheaders = "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset="UTF-8"' . "\r\n" . 'Content-Transfer-Encoding: 8bit';
 
 
924
  $message_part_1 .=
925
  '<html>' .
926
  '<head>' .
@@ -963,66 +983,18 @@ function wppa_send_mail($to, $subj, $cont, $photo, $email = '') {
963
  '</html>';
964
 
965
  $subject = '['.str_replace('&#039;', '', get_bloginfo('name') ).'] '.$subj;
966
- $headers = $from . $extraheaders;
967
-
968
- // Send it
969
- $iret = mail( $to,
970
- $subject . ( $debug ? ' (1)' : '' ),
971
- $message_part_1 . $message_part_2 . $message_part_3,
972
- $headers,
973
- '' );
974
- if ( ! $iret || $debug ) {
975
-
976
- // Failed. Try with newlines only
977
- $iret = mail( $to,
978
- $subject . ( $debug ? ' (2)' : '' ),
979
  $message_part_1 . $message_part_2 . $message_part_3,
980
- str_replace( "\r\n", "\n", $headers ),
981
  '' );
982
- if ( ! $iret || $debug ) {
983
-
984
- // Failed. Then try as plain text
985
- $message_part_1 = str_replace( '<p>', "\n<p>", $message_part_1 );
986
- $message_part_1 = str_replace( '<blockquote', "\n<blockquote", $message_part_1 );
987
- $message_part_1 = str_replace( '</blockquote>', "</blockquote>\n", $message_part_1 );
988
- $message_part_1 = strip_tags( $message_part_1, '<a>' );
989
- $message_part_1 = str_replace( array( "\t", '<a href="', '</a>', $subj ), ' ', $message_part_1 );
990
- $message_part_1 = str_replace( array( '" >', '">' ), ' ', $message_part_1 );
991
- $message_part_2 = str_replace( '<p>', "\n<p>", $message_part_2 );
992
- $message_part_2 = strip_tags( $message_part_2 );
993
- $message_part_2 = str_replace( array( "\t", '<a href="', '</a>', $subj ), ' ', $message_part_2 );
994
- $message_part_2 = str_replace( array( '" >', '">' ), ' ', $message_part_2 );
995
- $message_part_3 = str_replace( '<p>', "\n<p>", $message_part_3 );
996
- $message_part_3 = strip_tags( $message_part_3 );
997
- $message_part_3 = str_replace( array( "\t", '<a href="', '</a>', $subj ), ' ', $message_part_3 );
998
- $message_part_3 = str_replace( array( '" >', '">' ), ' ', $message_part_3 );
999
-
1000
- $headers = $from . str_replace( 'text/html', 'text/plain', $extraheaders );
1001
- $iret = mail( $to,
1002
- $subject . ( $debug ? ' (3)' : '' ),
1003
- $message_part_1 . $message_part_2 . $message_part_3,
1004
- $headers,
1005
- '' );
1006
- if ( ! $iret || $debug ) {
1007
-
1008
- /*
1009
-
1010
- wp_mail ( string|array $to, string $subject, string $message, string|array $headers = '', string|array $attachments = array() )
1011
- */
1012
- // Failed, try as plain text with newlines only
1013
- $iret = wp_mail( $to,
1014
- $subject . ( $debug ? ' (4)' : '' ),
1015
- $message_part_1 . $message_part_2 . $message_part_3,
1016
- str_replace( "\r\n", "\n", $headers ),
1017
- '' );
1018
- if ( ! $iret ) {
1019
-
1020
- // Give up
1021
- echo 'Mail sending Failed';
1022
- }
1023
- }
1024
- }
1025
- }
1026
  }
1027
 
1028
  function wppa_get_imgalt( $id ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.4.08
7
  *
8
  */
9
 
437
 
438
  function wppa_add_parents($pages) {
439
  global $wpdb;
440
+ static $parents;
441
+ static $titles;
442
+
443
+ // Pre-fill $parents
444
+ if ( empty( $parents ) ) {
445
+ $temp = $wpdb->get_results( "SELECT `ID`, `post_parent` FROM `" . $wpdb->posts . "`", ARRAY_A );
446
+ if ( ! empty( $temp ) ) {
447
+ foreach( $temp as $item ) {
448
+ $parents[$item['ID']] = $item['post_parent'];
449
+ }
450
+ }
451
+ }
452
 
453
  if ( is_array($pages) ) foreach ( array_keys($pages) as $index ) {
454
  $tempid = $pages[$index]['ID'];
455
+ $pages[$index]['post_title'] = __(stripslashes($pages[$index]['post_title']));
456
  while ( $tempid > '0') {
457
+ if ( isset( $parents[$tempid] ) ) {
458
+ $tempid = $parents[$tempid];
459
+ }
460
+ else {
461
+ $t = $wpdb->get_var($wpdb->prepare("SELECT `post_parent` FROM `" . $wpdb->posts . "` WHERE `ID` = %s", $tempid));
462
+ $parents[$tempid] = $t;
463
+ $tempid = $t;
464
+ }
465
  if ( $tempid > '0' ) {
466
+ if ( ! isset( $titles[$tempid] ) ) {
467
+ $titles[$tempid] = __(stripslashes($wpdb->get_var($wpdb->prepare("SELECT `post_title` FROM `" . $wpdb->posts . "` WHERE `ID` = %s", $tempid))));
468
+ }
469
+ $pages[$index]['post_title'] = $titles[$tempid].' > '.$pages[$index]['post_title'];
470
  }
471
  else $tempid = '0';
472
  }
921
  return $count;
922
  }
923
 
924
+ function wppa_send_mail( $to, $subj, $cont, $photo, $email = '' ) {
 
 
 
 
925
 
926
  $message_part_1 = '';
927
  $message_part_2 = '';
937
  $site = substr( $site, 0, $spos );
938
  }
939
 
940
+ $headers = array( 'From: noreply@' . $site,
941
+ 'Content-Type: text/html'
942
+ );
943
+
944
  $message_part_1 .=
945
  '<html>' .
946
  '<head>' .
983
  '</html>';
984
 
985
  $subject = '['.str_replace('&#039;', '', get_bloginfo('name') ).'] '.$subj;
986
+
987
+ // Try to send it with extra headers and with html
988
+ $iret = wp_mail( $to,
989
+ $subject,
 
 
 
 
 
 
 
 
 
990
  $message_part_1 . $message_part_2 . $message_part_3,
991
+ $headers,
992
  '' );
993
+ if ( $iret ) return;
994
+
995
+ // Failed
996
+ echo 'Mail sending Failed';
997
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
998
  }
999
 
1000
  function wppa_get_imgalt( $id ) {
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.07
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -29,12 +29,12 @@ global $wpdb;
29
  /* when new options are added and when the wppa_setup() routine
30
  /* must be called right after update for any other reason.
31
  */
32
- global $wppa_revno; $wppa_revno = '6407';
33
 
34
  /* This is the api interface version number
35
  /* It is incremented at any code change.
36
  */
37
- global $wppa_api_version; $wppa_api_version = '6-4-07-013';
38
 
39
  /* start timers */
40
  global $wppa_starttime; $wppa_starttime = microtime(true);
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.4.08
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
29
  /* when new options are added and when the wppa_setup() routine
30
  /* must be called right after update for any other reason.
31
  */
32
+ global $wppa_revno; $wppa_revno = '6408';
33
 
34
  /* This is the api interface version number
35
  /* It is incremented at any code change.
36
  */
37
+ global $wppa_api_version; $wppa_api_version = '6-4-08-008';
38
 
39
  /* start timers */
40
  global $wppa_starttime; $wppa_starttime = microtime(true);