WP Photo Album Plus - Version 6.6.03

Version Description

Download this release

Release Info

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

Code changes from version 6.6.02 to 6.6.03

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.6.02';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -1073,6 +1073,8 @@ wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);
1073
  wppaOvlRunning = true;
1074
  wppaOvlRun();
1075
  }
 
 
1076
  }
1077
 
1078
  // Start lb slideshow
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.6.03';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
1073
  wppaOvlRunning = true;
1074
  wppaOvlRun();
1075
  }
1076
+
1077
+ wppaReplaceSvg();
1078
  }
1079
 
1080
  // Start lb slideshow
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.6.02';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;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;}
@@ -107,7 +107,8 @@ function wppaOvlStepMode(){wppaConsoleLog('wppaOvlStepMode from '+wppaOvlMode);v
107
  i++;}}
108
  function wppaOvlStartStop(){wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);if(wppaOvlRunning){wppaOvlRunning=false;jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50'));if(wppaOvlIdx!=-1){if(wppaOvlIdx!=0){jQuery('#wppa-ovl-prev-btn').css('visibility','visible');}
109
  if(wppaOvlIdx!=(wppaOvlUrls.length-1)){jQuery('#wppa-ovl-next-btn').css('visibility','visible');}}}
110
- else{jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Pause-Button'),'48px',true,true,'0','20','50','50'));wppaOvlRunning=true;wppaOvlRun();}}
 
111
  function wppaOvlRun(){wppaConsoleLog('wppaOvlRun, running='+wppaOvlRunning);if(!wppaOvlRunning)return;if(wppaOvlVideoPlaying||wppaOvlAudioPlaying){setTimeout('wppaOvlRun()',500);return;}
112
  if(!wppaIsVideo){var elm=document.getElementById('wppa-overlay-img');if(elm){if(!elm.complete){wppaConsoleLog('Wait during run');setTimeout('wppaOvlRun()',500);return;}}}
113
  var next;if(wppaOvlIdx>=(wppaOvlUrls.length-1))next=0;else next=wppaOvlIdx+1;wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlShow(next);setTimeout('wppaOvlRun()',wppaOvlSlideSpeed);}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaLightboxVersion='6.6.03';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;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;}
107
  i++;}}
108
  function wppaOvlStartStop(){wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);if(wppaOvlRunning){wppaOvlRunning=false;jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50'));if(wppaOvlIdx!=-1){if(wppaOvlIdx!=0){jQuery('#wppa-ovl-prev-btn').css('visibility','visible');}
109
  if(wppaOvlIdx!=(wppaOvlUrls.length-1)){jQuery('#wppa-ovl-next-btn').css('visibility','visible');}}}
110
+ else{jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Pause-Button'),'48px',true,true,'0','20','50','50'));wppaOvlRunning=true;wppaOvlRun();}
111
+ wppaReplaceSvg();}
112
  function wppaOvlRun(){wppaConsoleLog('wppaOvlRun, running='+wppaOvlRunning);if(!wppaOvlRunning)return;if(wppaOvlVideoPlaying||wppaOvlAudioPlaying){setTimeout('wppaOvlRun()',500);return;}
113
  if(!wppaIsVideo){var elm=document.getElementById('wppa-overlay-img');if(elm){if(!elm.complete){wppaConsoleLog('Wait during run');setTimeout('wppaOvlRun()',500);return;}}}
114
  var next;if(wppaOvlIdx>=(wppaOvlUrls.length-1))next=0;else next=wppaOvlIdx+1;wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlShow(next);setTimeout('wppaOvlRun()',wppaOvlSlideSpeed);}
readme.txt CHANGED
@@ -2,12 +2,12 @@
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.6.02
6
- Stable tag: 6.6.01
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
- Tested up to: 4.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -180,6 +180,21 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.6.02 =
184
 
185
  = Bug Fixes =
@@ -192,7 +207,7 @@ In this case the upload dialog now also appears on album covers and thumbnail ar
192
  = Other Changes =
193
 
194
  * (Photo)file permissions are now always set to 0644 and wppa created directories to 0755 to grant accessability, even when server defaults change magically.
195
- * If ewww image optimizer is installed, created photo files will now always be optimized.
196
  * Commenting your own photos will no longer give you credit points.
197
  * Items in a .csv file will now be trimmed from spaces.
198
  * Extended settings for counters on album covers: Table II-E5 and Table II-E8.
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.6.03
6
+ Stable tag: 6.6.02
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
+ Tested up to: 4.7
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
183
+ = 6.6.03 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * On the upload admin screen, when the server allows you to upload as much as gigabytes, you will no longer get the erroneous message that the total filesize is too big.
188
+ * Lightbox start/stop button only showed up initially but disappeared after used once. Fixed.
189
+ * List comments by name ( Table VIII-C5 ) did not work. Fixed.
190
+ * Fixed a breadcrumb issue.
191
+ * Import from remote url stopped working. Fixed.
192
+
193
+ = Other Changes =
194
+
195
+ * Table VII-B7 has been renamed Table VII-B7.0. Table VII-B7.1 added: Front-end uploads get status private.
196
+ This overrules the setting of VII-B7.0, but modaretion emails will still be sent if VII-B7.0 is ticked.
197
+
198
  = 6.6.02 =
199
 
200
  = Bug Fixes =
207
  = Other Changes =
208
 
209
  * (Photo)file permissions are now always set to 0644 and wppa created directories to 0755 to grant accessability, even when server defaults change magically.
210
+ * If ewww image optimizer is installed, created photo files will now always be optimized if Table IX-D17 is ticked.
211
  * Commenting your own photos will no longer give you credit points.
212
  * Items in a .csv file will now be trimmed from spaces.
213
  * Extended settings for counters on album covers: Table II-E5 and Table II-E8.
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.6.00
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
@@ -253,7 +253,7 @@ margin: 0 auto;
253
  width: 100%;
254
  }
255
  #content .wppa-comment-form input, #content .wppa-comment-form textarea, .wppa-comment-form input, .wppa-comment-form textarea {
256
- padding:0;
257
  margin:0;
258
  font-size:12px;
259
  line-height:18px; /**/
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.6.03
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
253
  width: 100%;
254
  }
255
  #content .wppa-comment-form input, #content .wppa-comment-form textarea, .wppa-comment-form input, .wppa-comment-form textarea {
256
+ padding:0px 4px;
257
  margin:0;
258
  font-size:12px;
259
  line-height:18px; /**/
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -847,9 +847,14 @@ global $warning_given_small;
847
  wppa_error_message( 'Error: File '.$file.' does not exist.' );
848
  return false;
849
  }
850
- // else {
851
- // wppa_ok_message( 'Good: File '.$file.' exists.' );
852
- // }
 
 
 
 
 
853
 
854
  // Get and verify the size
855
  $img_size = getimagesize( $file );
@@ -868,7 +873,7 @@ global $warning_given_small;
868
  }
869
  else {
870
  wppa_error_message( __( 'ERROR: Unable to retrieve image size of' , 'wp-photo-album-plus').' '.$name.' '.__( 'Are you sure it is a photo?' , 'wp-photo-album-plus') );
871
- wppa( 'ajax_import_files_error', __( 'No imagesize', 'wp-photo-album-plus' ) );
872
  return false;
873
  }
874
  // Get ext based on mimetype, regardless of ext
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 6.6.03
7
  *
8
  */
9
 
847
  wppa_error_message( 'Error: File '.$file.' does not exist.' );
848
  return false;
849
  }
850
+ elseif ( wppa( 'is_remote' ) ) {
851
+ if ( ! wppa_is_url_a_photo( $file ) ) {
852
+ if ( wppa( 'ajax' ) ) {
853
+ wppa( 'ajax_import_files_error', __( 'Not found', 'wp-photo-album-plus') );
854
+ }
855
+ return false;
856
+ }
857
+ }
858
 
859
  // Get and verify the size
860
  $img_size = getimagesize( $file );
873
  }
874
  else {
875
  wppa_error_message( __( 'ERROR: Unable to retrieve image size of' , 'wp-photo-album-plus').' '.$name.' '.__( 'Are you sure it is a photo?' , 'wp-photo-album-plus') );
876
+ wppa( 'ajax_import_files_error', __( 'No photo found', 'wp-photo-album-plus' ) );
877
  return false;
878
  }
879
  // Get ext based on mimetype, regardless of ext
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -2045,7 +2045,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2045
  '<input' .
2046
  ' type="submit"' .
2047
  ' class="wppa-user-submit"' .
2048
- ' style="margin: 6px 0; float:right; '.__wcs( 'wppa-box-text' ).'"' .
2049
  ' value="' . __( 'Create album', 'wp-photo-album-plus' ) . '"' .
2050
  ' />' .
2051
  '</form>' .
@@ -4105,6 +4105,9 @@ global $wpdb;
4105
  $from = 0;
4106
  $to = count( $dates );
4107
  break;
 
 
 
4108
  }
4109
 
4110
  // Display minicovers
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.6.03
7
  *
8
  */
9
 
2045
  '<input' .
2046
  ' type="submit"' .
2047
  ' class="wppa-user-submit"' .
2048
+ ' style="margin: 6px 0; float:right;"' .
2049
  ' value="' . __( 'Create album', 'wp-photo-album-plus' ) . '"' .
2050
  ' />' .
2051
  '</form>' .
4105
  $from = 0;
4106
  $to = count( $dates );
4107
  break;
4108
+
4109
+ default:
4110
+ wppa_log( 'err', 'Unexpected calender type: ' . $calendar_type . ' found in wppa_get_calendar_html()' );
4111
  }
4112
 
4113
  // Display minicovers
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -115,7 +115,7 @@ global $wppa_session;
115
 
116
  if ( $alb || $virtual || $is_albenum ) {
117
  $href = wppa_get_permalink( $pid, true );
118
- $ajax = wppa_get_ajaxlink( $pid );
119
  }
120
  else {
121
  $href = '';
@@ -654,9 +654,14 @@ global $wpdb;
654
  wppa_get_permalink( $pagid ) .
655
  'wppa-album=' . $parent . '&amp;wppa-cover=' . $to_cover . $slide .
656
  '&amp;wppa-occur=' . wppa( 'occur' );
 
 
 
 
 
657
  $title = __( 'Album:' , 'wp-photo-album-plus') . ' ' . wppa_get_album_name( $parent );
658
  $class = 'b20';
659
- wppa_bcitem( $value, $href, $title, $class );
660
  return;
661
  }
662
 
@@ -677,7 +682,7 @@ global $wpdb;
677
  $title = __( stripslashes( $title ) );
678
  if ( ! $title ) {
679
  $title = '****'; // Page exists but is not publish
680
- wppa_bcitem( $title, '#', __( 'Unpublished' , 'wp-photo-album-plus'), $class = 'b2' );
681
  } else {
682
  wppa_bcitem( $title, get_page_link( $parent ), __( 'Page:' , 'wp-photo-album-plus').' '.$title, 'b2' );
683
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 6.6.03
7
  *
8
  */
9
 
115
 
116
  if ( $alb || $virtual || $is_albenum ) {
117
  $href = wppa_get_permalink( $pid, true );
118
+ $ajax = '';//wppa_get_ajaxlink( $pid ); // fails
119
  }
120
  else {
121
  $href = '';
654
  wppa_get_permalink( $pagid ) .
655
  'wppa-album=' . $parent . '&amp;wppa-cover=' . $to_cover . $slide .
656
  '&amp;wppa-occur=' . wppa( 'occur' );
657
+ $ajax =
658
+ wppa_get_ajaxlink() .
659
+ 'wppa-album=' . $parent . '&amp;wppa-cover=' . $to_cover . $slide .
660
+ '&amp;wppa-occur=' . wppa( 'occur' );
661
+
662
  $title = __( 'Album:' , 'wp-photo-album-plus') . ' ' . wppa_get_album_name( $parent );
663
  $class = 'b20';
664
+ wppa_bcitem( $value, $href, $title, $class, $ajax );
665
  return;
666
  }
667
 
682
  $title = __( stripslashes( $title ) );
683
  if ( ! $title ) {
684
  $title = '****'; // Page exists but is not publish
685
+ wppa_bcitem( $title, '#', __( 'Unpublished' , 'wp-photo-album-plus'), 'b2' );
686
  } else {
687
  wppa_bcitem( $title, get_page_link( $parent ), __( 'Page:' , 'wp-photo-album-plus').' '.$title, 'b2' );
688
  }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -2103,7 +2103,7 @@ static $user;
2103
  ' style="float:right; margin-right:6px;"' .
2104
  ' onclick="_wppaStop( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').' );"' .
2105
  ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
2106
- ' />';
2107
  }
2108
  if ( wppa_may_user_fe_delete( $id ) ) {
2109
  $dellink = '
@@ -4449,6 +4449,9 @@ global $wppa_supported_audio_extensions;
4449
  // Find status and other needed data
4450
  $linktarget = '_self';
4451
  $status = ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) ? 'pending' : 'publish';
 
 
 
4452
  $filename = wppa_sanitize_file_name( $file['name'] );
4453
 
4454
  // Create new entry if this is not a posterfile
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.6.03
7
  *
8
  */
9
 
2103
  ' style="float:right; margin-right:6px;"' .
2104
  ' onclick="_wppaStop( '.wppa( 'mocc' ).' );wppaEditPhoto( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').' );"' .
2105
  ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
2106
+ ' /><span></span>';
2107
  }
2108
  if ( wppa_may_user_fe_delete( $id ) ) {
2109
  $dellink = '
4449
  // Find status and other needed data
4450
  $linktarget = '_self';
4451
  $status = ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) ? 'pending' : 'publish';
4452
+ if ( wppa_switch( 'fe_upload_private' ) ) {
4453
+ $status = 'private';
4454
+ }
4455
  $filename = wppa_sanitize_file_name( $file['name'] );
4456
 
4457
  // Create new entry if this is not a posterfile
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 6.6.00
7
  *
8
  */
9
 
@@ -1408,20 +1408,25 @@ function wppa_get_import_files() {
1408
  $old_setting = $setting;
1409
 
1410
  // assume not
1411
- if ( is_array( @ getimagesize( $setting ) ) ) {
1412
  wppa( 'is_wppa_tree', false );
 
1413
  }
1414
-
1415
- // though?
1416
  else {
1417
  $setting = wppa_expand_tree_path( $old_setting );
1418
- if ( is_array( @ getimagesize( $setting ) ) ) {
 
 
1419
  wppa( 'is_wppa_tree', true );
 
 
 
 
1420
  }
1421
  }
1422
 
1423
  // Is it a photofile?
1424
- if ( is_array( @ getimagesize( $setting ) ) ) { // image uri
1425
  $files = array( $setting );
1426
  $pid = wppa_strip_ext( basename( $old_setting ) );
1427
  if ( is_numeric( $pid ) ) {
@@ -1442,8 +1447,8 @@ function wppa_get_import_files() {
1442
 
1443
  // is it a page url
1444
  else {
1445
- $files = get_option( 'wppa_import_source_url_found_'.$user, false );
1446
- if ( $files === false ) {
1447
 
1448
  // Init
1449
  $files = array();
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 6.6.03
7
  *
8
  */
9
 
1408
  $old_setting = $setting;
1409
 
1410
  // assume not
1411
+ if ( wppa_is_url_a_photo( $setting ) ) {
1412
  wppa( 'is_wppa_tree', false );
1413
+ $is_image = true;
1414
  }
 
 
1415
  else {
1416
  $setting = wppa_expand_tree_path( $old_setting );
1417
+
1418
+ // though?
1419
+ if ( wppa_is_url_a_photo( $setting ) ) {
1420
  wppa( 'is_wppa_tree', true );
1421
+ $is_image = true;
1422
+ }
1423
+ else {
1424
+ $is_image = false;
1425
  }
1426
  }
1427
 
1428
  // Is it a photofile?
1429
+ if ( $is_image ) {
1430
  $files = array( $setting );
1431
  $pid = wppa_strip_ext( basename( $old_setting ) );
1432
  if ( is_numeric( $pid ) ) {
1447
 
1448
  // is it a page url
1449
  else {
1450
+ $files = get_option( 'wppa_import_source_url_found_' . $user, false );
1451
+ if ( ! $files ) {
1452
 
1453
  // Init
1454
  $files = array();
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.6.01
7
  *
8
  */
9
 
@@ -1047,7 +1047,7 @@ global $wppa_log_file;
1047
  <td>'.$session['count'].'</td>' .
1048
  '<td>'.$session['status'].'</td>' .
1049
  '<td style="border-bottom:1px solid gray;max-width:300px;" >';
1050
- foreach ( array_keys( $data ) as $key ) {
1051
  if ( $key != 'uris' ) {
1052
  if ( is_array( $data[$key] ) ) {
1053
  $result .= '['.$key.'] => Array('.
@@ -1087,8 +1087,9 @@ global $wppa_log_file;
1087
  $total = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_COMMENTS."`" );
1088
  $order = wppa_opt( 'list_comments_by' );
1089
  if ( $order == 'timestamp' ) $order .= ' DESC';
 
1090
  $query = "SELECT * FROM `".WPPA_COMMENTS."` ORDER BY ".$order." LIMIT 1000";
1091
- $result .= $query.'<br />';
1092
  $comments = $wpdb->get_results( $query, ARRAY_A );
1093
  $result .=
1094
  '<h2>' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.6.03
7
  *
8
  */
9
 
1047
  <td>'.$session['count'].'</td>' .
1048
  '<td>'.$session['status'].'</td>' .
1049
  '<td style="border-bottom:1px solid gray;max-width:300px;" >';
1050
+ if ( is_array( $data ) ) foreach ( array_keys( $data ) as $key ) {
1051
  if ( $key != 'uris' ) {
1052
  if ( is_array( $data[$key] ) ) {
1053
  $result .= '['.$key.'] => Array('.
1087
  $total = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_COMMENTS."`" );
1088
  $order = wppa_opt( 'list_comments_by' );
1089
  if ( $order == 'timestamp' ) $order .= ' DESC';
1090
+ if ( $order == 'name' ) $order = 'user';
1091
  $query = "SELECT * FROM `".WPPA_COMMENTS."` ORDER BY ".$order." LIMIT 1000";
1092
+ // $result .= $query.'<br />';
1093
  $comments = $wpdb->get_results( $query, ARRAY_A );
1094
  $result .=
1095
  '<h2>' .
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.6.01
7
  *
8
  */
9
 
@@ -26,6 +26,7 @@ global $wppa_tags;
26
  global $wp_version;
27
 
28
  // Test area
 
29
  // End test area
30
 
31
  // Initialize
@@ -2314,7 +2315,7 @@ global $wp_version;
2314
  $slug = 'wppa_show_treecount';
2315
  $opts = array( __('none', 'wp-photo-album-plus'), __('detailed', 'wp-photo-album-plus'), __('totals only', 'wp-photo-album-plus'));
2316
  $vals = array( '-none-', 'detail', 'total' );
2317
- $html = wppa_select($slug, $opts, $vals);
2318
  $clas = '';
2319
  $tags = 'cover,album,layout';
2320
  wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
@@ -6235,7 +6236,18 @@ global $wp_version;
6235
  $html = array( $html1, $html2 );
6236
  $clas = '';
6237
  $tags = 'upload';
6238
- wppa_setting($slug, '7', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
 
 
6239
 
6240
  $name = __('Upload notify', 'wp-photo-album-plus');
6241
  $desc = __('Notify admin at frontend upload.', 'wp-photo-album-plus');
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.6.03
7
  *
8
  */
9
 
26
  global $wp_version;
27
 
28
  // Test area
29
+
30
  // End test area
31
 
32
  // Initialize
2315
  $slug = 'wppa_show_treecount';
2316
  $opts = array( __('none', 'wp-photo-album-plus'), __('detailed', 'wp-photo-album-plus'), __('totals only', 'wp-photo-album-plus'));
2317
  $vals = array( '-none-', 'detail', 'total' );
2318
+ $html = wppa_select($slug, $opts, $vals);
2319
  $clas = '';
2320
  $tags = 'cover,album,layout';
2321
  wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
6236
  $html = array( $html1, $html2 );
6237
  $clas = '';
6238
  $tags = 'upload';
6239
+ wppa_setting($slug, '7.0', $name, $desc, $html, $help, $clas, $tags);
6240
+
6241
+ $name = __('FE Upload private', 'wp-photo-album-plus');
6242
+ $desc = __('Front-end uploaded photos status is set to private.', 'wp-photo-album-plus');
6243
+ $help = esc_js(__('This setting overrules VI-B7.0.', 'wp-photo-album-plus'));
6244
+ $slug = 'wppa_fe_upload_private';
6245
+ $html1 = wppa_checkbox($slug);
6246
+ $html2 = '';
6247
+ $html = array( $html1, $html2 );
6248
+ $clas = '';
6249
+ $tags = 'upload';
6250
+ wppa_setting($slug, '7.1', $name, $desc, $html, $help, $clas, $tags);
6251
 
6252
  $name = __('Upload notify', 'wp-photo-album-plus');
6253
  $desc = __('Notify admin at frontend upload.', 'wp-photo-album-plus');
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -473,7 +473,7 @@ global $silent;
473
  update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', get_option( 'wppa_bc_url', 'nil' ) ) );
474
  }
475
  }
476
-
477
  if ( $old_rev <= '6602' ) {
478
  if ( get_option( 'wppa_show_treecount' ) == 'yes' ) {
479
  wppa_update_option( 'wppa_show_treecount', 'detail' );
@@ -487,7 +487,7 @@ global $silent;
487
  if ( get_option( 'wppa_count_on_title' ) == 'no' ) {
488
  wppa_update_option( 'wppa_count_on_title', '-none-' );
489
  }
490
-
491
  }
492
 
493
  }
@@ -1341,6 +1341,7 @@ Hide Camera info
1341
  'wppa_upload_owner_only' => 'yes',
1342
  'wppa_user_album_edit_on' => 'no',
1343
  'wppa_upload_moderate' => 'no',
 
1344
  'wppa_upload_edit' => 'none',
1345
  'wppa_upload_edit_users' => 'admin',
1346
  'wppa_upload_edit_theme_css' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.6.03
7
  *
8
  */
9
 
473
  update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', get_option( 'wppa_bc_url', 'nil' ) ) );
474
  }
475
  }
476
+
477
  if ( $old_rev <= '6602' ) {
478
  if ( get_option( 'wppa_show_treecount' ) == 'yes' ) {
479
  wppa_update_option( 'wppa_show_treecount', 'detail' );
487
  if ( get_option( 'wppa_count_on_title' ) == 'no' ) {
488
  wppa_update_option( 'wppa_count_on_title', '-none-' );
489
  }
490
+
491
  }
492
 
493
  }
1341
  'wppa_upload_owner_only' => 'yes',
1342
  'wppa_user_album_edit_on' => 'no',
1343
  'wppa_upload_moderate' => 'no',
1344
+ 'wppa_fe_upload_private' => 'no',
1345
  'wppa_upload_edit' => 'none',
1346
  'wppa_upload_edit_users' => 'admin',
1347
  'wppa_upload_edit_theme_css' => 'no',
wppa-source.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains photo source file management routines
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -64,11 +64,17 @@ function wppa_delete_source( $name, $alb ) {
64
 
65
  // Delete all possible file-extensions
66
  foreach( $all_paths as $p ) if ( is_file( $p ) ) {
67
- @ unlink( $p ); // Ignore error
68
  }
69
 
70
  // Remove album if empty
71
- @ rmdir( wppa_get_source_album_dir( $alb ) ); // Ignore error
 
 
 
 
 
 
72
  }
73
  }
74
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains photo source file management routines
6
+ * Version 6.6.03
7
  *
8
  */
9
 
64
 
65
  // Delete all possible file-extensions
66
  foreach( $all_paths as $p ) if ( is_file( $p ) ) {
67
+ unlink( $p ); // Ignore error
68
  }
69
 
70
  // Remove album if empty
71
+ $dir = wppa_get_source_album_dir( $alb );
72
+ if ( is_dir( $dir ) ) {
73
+ $files = glob( $dir . '/*.*' );
74
+ if ( count( $files ) == 2 ) { // . and .. only
75
+ @ rmdir( wppa_get_source_album_dir( $alb ) ); // Ignore error
76
+ }
77
+ }
78
  }
79
  }
80
 
wppa-upload.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -126,6 +126,13 @@ global $upload_album;
126
  $max_files = '15';
127
  }
128
  $max_size = ini_get( 'upload_max_filesize' );
 
 
 
 
 
 
 
129
  $max_time = ini_get( 'max_input_time' );
130
  if ( $max_time < '1' ) $max_time = __( 'unknown', 'wp-photo-album-plus' );
131
 
@@ -250,7 +257,7 @@ global $upload_album;
250
  '</div>' .
251
  '<script type="text/javascript">' .
252
  'function showit() {' .
253
- 'var maxsize = parseInt( \'' . $max_size . '\' ) * 1024 * 1024;' .
254
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
255
  'var totsize = 0;' .
256
  'var files = document.getElementById( \'my_files\' ).files;' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
+ * Version 6.5.03
7
  *
8
  */
9
 
126
  $max_files = '15';
127
  }
128
  $max_size = ini_get( 'upload_max_filesize' );
129
+ /* debug */
130
+ // $max_size = '2G';
131
+ /**/
132
+ $max_size_mbytes = substr( $max_size, 0, strlen( $max_size ) - 1 );
133
+ if ( substr( $max_size, -1 ) == 'G' ) { // May upload gigabytes!!
134
+ $max_size_mbytes *= 1024;
135
+ }
136
  $max_time = ini_get( 'max_input_time' );
137
  if ( $max_time < '1' ) $max_time = __( 'unknown', 'wp-photo-album-plus' );
138
 
257
  '</div>' .
258
  '<script type="text/javascript">' .
259
  'function showit() {' .
260
+ 'var maxsize = parseInt( \'' . $max_size_mbytes . '\' ) * 1024 * 1024;' .
261
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
262
  'var totsize = 0;' .
263
  'var files = document.getElementById( \'my_files\' ).files;' .
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.6.02
7
  *
8
  */
9
 
@@ -3364,9 +3364,29 @@ function wppa_chmod( $fso ) {
3364
  if ( is_dir( $fso ) ) {
3365
  @ chmod( $fso, 0755 );
3366
  }
3367
-
3368
  if ( is_file( $fso ) ) {
3369
  @ chmod( $fso, 0644 );
3370
  }
3371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3372
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.6.03
7
  *
8
  */
9
 
3364
  if ( is_dir( $fso ) ) {
3365
  @ chmod( $fso, 0755 );
3366
  }
3367
+
3368
  if ( is_file( $fso ) ) {
3369
  @ chmod( $fso, 0644 );
3370
  }
3371
 
3372
+ }
3373
+
3374
+ // Test if a given url is to a photo file
3375
+ function wppa_is_url_a_photo( $url ) {
3376
+
3377
+ if ( function_exists( 'curl_init' ) ) {
3378
+
3379
+ // Get page content
3380
+ $curl = curl_init();
3381
+ curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
3382
+ curl_setopt( $curl, CURLOPT_URL, $url );
3383
+ $contents = curl_exec( $curl );
3384
+ curl_close( $curl );
3385
+
3386
+ if ( strpos( $contents,'404' ) !== false ) {
3387
+ return false;
3388
+ }
3389
+ }
3390
+
3391
+ return is_array( getimagesize( $url ) );
3392
  }
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 6.5.00
7
  *
8
  */
9
 
@@ -13,10 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
13
  function wppa_create_session_entry( $args ) {
14
  global $wpdb;
15
 
16
- $newid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_SESSION."` ORDER BY `id` DESC LIMIT 1" ) + 1;
17
-
18
  $args = wp_parse_args( (array) $args, array (
19
- 'id' => $newid,
20
  'session' => wppa_get_session_id(),
21
  'timestamp' => time(),
22
  'user' => wppa_get_user(),
@@ -26,8 +23,9 @@ global $wpdb;
26
  'count' => '1'
27
  ) );
28
 
 
29
  $query = $wpdb->prepare( "INSERT INTO `" . WPPA_SESSION ."` (
30
- `id`,
31
  `session`,
32
  `timestamp`,
33
  `user`,
@@ -36,9 +34,8 @@ global $wpdb;
36
  `data`,
37
  `count`
38
  )
39
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s )",
40
 
41
- $args['id'],
42
  $args['session'],
43
  $args['timestamp'],
44
  $args['user'],
@@ -49,8 +46,10 @@ global $wpdb;
49
  );
50
  $iret = $wpdb->query( $query );
51
 
 
52
  if ( $iret ) {
53
- return $newid;
 
54
  }
55
  else {
56
  return false;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 6.6.03
7
  *
8
  */
9
 
13
  function wppa_create_session_entry( $args ) {
14
  global $wpdb;
15
 
 
 
16
  $args = wp_parse_args( (array) $args, array (
 
17
  'session' => wppa_get_session_id(),
18
  'timestamp' => time(),
19
  'user' => wppa_get_user(),
23
  'count' => '1'
24
  ) );
25
 
26
+ // WPPA_SESSION is auto increment
27
  $query = $wpdb->prepare( "INSERT INTO `" . WPPA_SESSION ."` (
28
+
29
  `session`,
30
  `timestamp`,
31
  `user`,
34
  `data`,
35
  `count`
36
  )
37
+ VALUES ( %s, %s, %s, %s, %s, %s, %s )",
38
 
 
39
  $args['session'],
40
  $args['timestamp'],
41
  $args['user'],
46
  );
47
  $iret = $wpdb->query( $query );
48
 
49
+ // Succcessful insert: return record id
50
  if ( $iret ) {
51
+ $result = $wpdb->get_var( $wpdb->prepare( "SELECT `id` FROM `" . WPPA_SESSION . "` WHERE `session` = %s ORDER BY `id` DESC LIMIT 1", wppa_get_session_id() ) );
52
+ return $result;
53
  }
54
  else {
55
  return false;
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.6.02
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 = '6602'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-6-02-003'; // 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.6.03
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 = '6603'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-6-03-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);