WP Photo Album Plus - Version 7.2.09.003

Version Description

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.05 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.02 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.01 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.2.08.004 to 7.2.09.003

changelog.txt CHANGED
@@ -1,5 +1,14 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
3
  = 7.2.08 =
4
 
5
  * Fixed a problem when displaying slideshows with comment field caused by user display names containing (single) quotes.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.2.09 =
4
+
5
+ * Gutenberg preview of wppa gallery shorcodes now also works when Table IX-A1.3 is ticked.
6
+ * When uploading/importing an mp4 file, an attempt will be made to find the actual framesize,
7
+ the timestamp and the duration of the video. If found it will be registered.
8
+ * New maintenance proc Table VIII-B22: Fix mp4 meta data, to fix the metadata for the existing items.
9
+ * When the status of a photo is set to 'featured' it will be inserted in the standard wp media library,
10
+ so it can be used as featured image in a page/post. Changing the status threafter has no effect.
11
+
12
  = 7.2.08 =
13
 
14
  * Fixed a problem when displaying slideshows with comment field caused by user display names containing (single) quotes.
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, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.2.08.004
6
- Stable tag: 7.2.07.007
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
 
 
140
  = 7.2.08 =
141
 
142
  * This version addresses various 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, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.2.09.003
6
+ Stable tag: 7.2.08.004
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.2.09 =
141
+
142
+ * This version addresses various bug fixes and feature requests.
143
+
144
  = 7.2.08 =
145
 
146
  * This version addresses various bug fixes.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.2.07
6
  *
7
  */
8
 
@@ -2271,6 +2271,11 @@ global $wppa_log_file;
2271
  if ( $item == 'name' || $item == 'description' || $item == 'tags' ) wppa_index_update( 'photo', $photo );
2272
  if ( $item == 'status' && $value != 'scheduled' ) wppa_update_photo( array( 'id' => $photo, 'scheduledtm' => '' ) );
2273
  if ( $item == 'status' ) wppa_invalidate_treecounts( wppa_get_photo_item( $photo, 'album' ) );
 
 
 
 
 
2274
  if ( $iret !== false ) {
2275
  wppa_update_modified( $photo );
2276
  if ( wppa_is_video( $photo ) ) {
@@ -3133,7 +3138,7 @@ global $wppa_log_file;
3133
  if ( $value == 'yes' ) {
3134
  wppa_update_option( 'wppa_show_comments', 'yes' );
3135
  wppa_update_option( 'wppa_moderate_comment', 'all' );
3136
- wppa_update_option( 'wppa_commentnotify', 'admin' );
3137
  }
3138
  if ( $value == 'no' ) {
3139
  wppa_update_option( 'wppa_show_comments', 'no' );
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.2.09
6
  *
7
  */
8
 
2271
  if ( $item == 'name' || $item == 'description' || $item == 'tags' ) wppa_index_update( 'photo', $photo );
2272
  if ( $item == 'status' && $value != 'scheduled' ) wppa_update_photo( array( 'id' => $photo, 'scheduledtm' => '' ) );
2273
  if ( $item == 'status' ) wppa_invalidate_treecounts( wppa_get_photo_item( $photo, 'album' ) );
2274
+ if ( $item == 'status' && $value == 'featured' ) {
2275
+ if ( ! wppa_is_multi( $photo ) ) {
2276
+ media_sideload_image( wppa_get_hires_url( $photo ), 0, wppa_get_photo_desc( $photo ) );
2277
+ }
2278
+ }
2279
  if ( $iret !== false ) {
2280
  wppa_update_modified( $photo );
2281
  if ( wppa_is_video( $photo ) ) {
3138
  if ( $value == 'yes' ) {
3139
  wppa_update_option( 'wppa_show_comments', 'yes' );
3140
  wppa_update_option( 'wppa_moderate_comment', 'all' );
3141
+ wppa_update_option( 'wppa_commentnotify', 'yes' );
3142
  }
3143
  if ( $value == 'no' ) {
3144
  wppa_update_option( 'wppa_show_comments', 'no' );
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.2.08
7
  *
8
  */
9
 
@@ -304,9 +304,11 @@ global $wppa_session;
304
  $form_core = get_search_form( false );
305
 
306
  // Themes like weaver ii return nothing at this point. Some do echo get_search_form(), try this first
307
- ob_start();
308
- get_search_form();
309
- $form_core = ob_get_clean();
 
 
310
 
311
  // If still no luck, use wp default
312
  if ( ! $form_core ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.2.09
7
  *
8
  */
9
 
304
  $form_core = get_search_form( false );
305
 
306
  // Themes like weaver ii return nothing at this point. Some do echo get_search_form(), try this first
307
+ if ( ! $form_core ) {
308
+ ob_start();
309
+ get_search_form();
310
+ $form_core = ob_get_clean();
311
+ }
312
 
313
  // If still no luck, use wp default
314
  if ( ! $form_core ) {
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 7.2.08
7
  *
8
  */
9
 
@@ -401,6 +401,7 @@ global $wppa_revno;
401
  if ( wppa_switch( 'render_shortcode_always' ) ) $do_it = true; // Always
402
  if ( wppa( 'ajax' ) ) $do_it = true;
403
 
 
404
  if ( wppa( 'debug' ) ) {
405
  if ( $do_it ) $msg = 'Doit is on'; else $msg = 'Doit is off';
406
  wppa_dbg_msg( $msg );
@@ -453,6 +454,11 @@ global $wppa_revno;
453
  return $result;
454
  }
455
 
 
 
 
 
 
456
  // New method to prevent damage of the result by content filters that run on higher priorities than do_shortcode.
457
  // Previous methods, e.g. increasing the do_shortcode priority sometimes fail due to requirements of other plugins/shortcodes.
458
  // To prevent this, i first asked an enhancement to add a priority argument to add_shortcode(), but the wp boys simply say
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 7.2.09
7
  *
8
  */
9
 
401
  if ( wppa_switch( 'render_shortcode_always' ) ) $do_it = true; // Always
402
  if ( wppa( 'ajax' ) ) $do_it = true;
403
 
404
+
405
  if ( wppa( 'debug' ) ) {
406
  if ( $do_it ) $msg = 'Doit is on'; else $msg = 'Doit is off';
407
  wppa_dbg_msg( $msg );
454
  return $result;
455
  }
456
 
457
+ // On admin page (especially for preview in Gutenberg)
458
+ if ( is_admin() ) {
459
+ return $result;
460
+ }
461
+
462
  // New method to prevent damage of the result by content filters that run on higher priorities than do_shortcode.
463
  // Previous methods, e.g. increasing the do_shortcode priority sometimes fail due to requirements of other plugins/shortcodes.
464
  // To prevent this, i first asked an enhancement to add a priority argument to add_shortcode(), but the wp boys simply say
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.2.08
7
  *
8
  */
9
 
@@ -4899,6 +4899,13 @@ global $wppa_alert;
4899
 
4900
  wppa_copy( $file['tmp_name'], $newpath );
4901
 
 
 
 
 
 
 
 
4902
  // Repair name if not standard
4903
  if ( ! wppa_get_post( 'user-name' ) ) {
4904
  // wppa_log('obs', 'in functions 4700:'.$file['name']);
@@ -5060,6 +5067,9 @@ global $wppa_alert;
5060
  // Is it a default coverimage?
5061
  wppa_check_coverimage( $id );
5062
 
 
 
 
5063
  // Mail
5064
  if ( wppa_get_photo_item( $id, 'status' ) == 'pending' ) {
5065
  wppa_schedule_mailinglist( 'moderatephoto', 0, $id );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.2.09
7
  *
8
  */
9
 
4899
 
4900
  wppa_copy( $file['tmp_name'], $newpath );
4901
 
4902
+ // If it is a mp4, try to find the width and height
4903
+ $videox = 0;
4904
+ $videoy = 0;
4905
+
4906
+ // Fix possible framsize if video
4907
+ wppa_fix_video_framesize( $id, 'av_add_front' );
4908
+
4909
  // Repair name if not standard
4910
  if ( ! wppa_get_post( 'user-name' ) ) {
4911
  // wppa_log('obs', 'in functions 4700:'.$file['name']);
5067
  // Is it a default coverimage?
5068
  wppa_check_coverimage( $id );
5069
 
5070
+ // If mp4, try ro find the framesize
5071
+ wppa_fix_video_framesize( $id, 'single_front' );
5072
+
5073
  // Mail
5074
  if ( wppa_get_photo_item( $id, 'status' ) == 'pending' ) {
5075
  wppa_schedule_mailinglist( 'moderatephoto', 0, $id );
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 7.2.06
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 7.2.09
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 7.2.01
7
  *
8
  */
9
 
@@ -452,6 +452,16 @@ function wppa_translate_photo_keywords( $id, $text ) {
452
  }
453
  }
454
  }
 
 
 
 
 
 
 
 
 
 
455
  }
456
  return $result;
457
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 7.2.09
7
  *
8
  */
9
 
452
  }
453
  }
454
  }
455
+
456
+ // Video
457
+ if ( $thumb['duration'] ) {
458
+ $mins = floor( $thumb['duration'] / 60 );
459
+ $secs = round( $thumb['duration'] % 60 );
460
+ $result = str_replace( 'w#duration', sprintf( __( '%s&#39;%s&#34;.', 'wp-photo-album-plus' ), $mins, $secs ), $result );
461
+ }
462
+ else {
463
+ $result = str_replace( 'w#duration', __( 'N.A.', 'wp-photo-album-plus' ), $result );
464
+ }
465
  }
466
  return $result;
467
  }
wppa-maintenance.php CHANGED
@@ -59,6 +59,7 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
59
  'wppa_cleanup_index',
60
  'wppa_photos_hyphens_to_spaces',
61
  'wppa_png_to_jpg',
 
62
  );
63
 
64
  global $wppa_cron_maintenance_slugs;
@@ -389,6 +390,7 @@ global $wppa_endtime;
389
  case 'wppa_move_all_photos':
390
  case 'wppa_photos_hyphens_to_spaces':
391
  case 'wppa_png_to_jpg':
 
392
 
393
  // Process photos
394
  $table = WPPA_PHOTOS;
@@ -840,6 +842,10 @@ global $wppa_endtime;
840
  wppa_convert_png_to_jpg( $id );
841
  break;
842
 
 
 
 
 
843
  case 'wppa_custom_photo_proc':
844
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
845
  include $file;
59
  'wppa_cleanup_index',
60
  'wppa_photos_hyphens_to_spaces',
61
  'wppa_png_to_jpg',
62
+ 'wppa_fix_mp4_meta',
63
  );
64
 
65
  global $wppa_cron_maintenance_slugs;
390
  case 'wppa_move_all_photos':
391
  case 'wppa_photos_hyphens_to_spaces':
392
  case 'wppa_png_to_jpg':
393
+ case 'wppa_fix_mp4_meta':
394
 
395
  // Process photos
396
  $table = WPPA_PHOTOS;
842
  wppa_convert_png_to_jpg( $id );
843
  break;
844
 
845
+ case 'wppa_fix_mp4_meta':
846
+ wppa_fix_video_framesize( $id, 'maintproc' );
847
+ break;
848
+
849
  case 'wppa_custom_photo_proc':
850
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
851
  include $file;
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -548,6 +548,7 @@ function wppaToggleExif( id, count ) {
548
  $sname = $photo['sname'];
549
  $dlcount = $photo['dlcount'];
550
  $thumblock = $photo['thumblock'];
 
551
 
552
  // See if item is a multimedia item
553
  $is_multi = wppa_is_multi( $id );
@@ -1103,7 +1104,21 @@ function wppaToggleExif( id, count ) {
1103
  ' value="' . esc_attr( $videoy ) . '"' .
1104
  ' />' .
1105
  sprintf( __( 'pix, (0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) .
1106
- ' ' .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1107
  __( 'Formats:', 'wp-photo-album-plus' ) . ' ';
1108
  $c = 0;
1109
  foreach ( $is_video as $fmt ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.2.09
7
  *
8
  */
9
 
548
  $sname = $photo['sname'];
549
  $dlcount = $photo['dlcount'];
550
  $thumblock = $photo['thumblock'];
551
+ $duration = $photo['duration'];
552
 
553
  // See if item is a multimedia item
554
  $is_multi = wppa_is_multi( $id );
1104
  ' value="' . esc_attr( $videoy ) . '"' .
1105
  ' />' .
1106
  sprintf( __( 'pix, (0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) .
1107
+ '. ';
1108
+ if ( $duration ) {
1109
+ if ( $duration < 120.0 ) {
1110
+ echo sprintf( __( 'Duration: %s seconds', 'wp-photo-album-plus' ) ,$duration ) .
1111
+ '. ';
1112
+ }
1113
+ else {
1114
+ echo sprintf( __( 'Duration: %s minutes and %s seconds', 'wp-photo-album-plus' ),
1115
+ sprintf( '%d', floor( $duration / 60 ) ),
1116
+ sprintf( '%4.2f', $duration % 60 ) ) .
1117
+ '. ';
1118
+ }
1119
+ }
1120
+
1121
+ echo
1122
  __( 'Formats:', 'wp-photo-album-plus' ) . ' ';
1123
  $c = 0;
1124
  foreach ( $is_video as $fmt ) {
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.2.07
7
  *
8
  */
9
 
@@ -8359,6 +8359,17 @@ global $wppa_supported_camara_brands;
8359
  $tags = 'system';
8360
  wppa_setting(false, '21', $name, $desc, $html, $help, $clas, $tags);
8361
 
 
 
 
 
 
 
 
 
 
 
 
8362
 
8363
  if ( current_user_can( 'administrator' ) ) {
8364
  $name = __('Custom album proc', 'wp-photo-album-plus');
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.2.09
7
  *
8
  */
9
 
8359
  $tags = 'system';
8360
  wppa_setting(false, '21', $name, $desc, $html, $help, $clas, $tags);
8361
 
8362
+ $name = __('Fix mp4 meta data', 'wp-photo-album-plus');
8363
+ $desc = __('Import framesize, creationdate and duration from mp4 video files', 'wp-photo-album-plus');
8364
+ $slug2 = 'wppa_fix_mp4_meta';
8365
+ $html1 = '';
8366
+ $html2 = wppa_maintenance_button( $slug2 );
8367
+ $html3 = wppa_status_field( $slug2 );
8368
+ $html4 = wppa_togo_field( $slug2 );
8369
+ $html = array($html1, $html2, $html3, $html4);
8370
+ $clas = '';
8371
+ $tags = 'system,video';
8372
+ wppa_setting(false, '22', $name, $desc, $html, $help, $clas, $tags);
8373
 
8374
  if ( current_user_can( 'administrator' ) ) {
8375
  $name = __('Custom album proc', '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 7.2.06
7
  *
8
  */
9
 
@@ -114,6 +114,7 @@ global $wppa_error;
114
  sname text NOT NULL,
115
  dlcount bigint(20) NOT NULL default '0',
116
  thumblock smallint(5) default '0',
 
117
  PRIMARY KEY (id),
118
  KEY albumkey (album),
119
  KEY statuskey (status(6))
@@ -1675,6 +1676,7 @@ cursorborder:'2px solid transparent',";
1675
  'wppa_move_all_photos_to' => '',
1676
  'wppa_photos_hyphens_to_spaces' => '',
1677
  'wppa_png_to_jpg' => '',
 
1678
 
1679
  'wppa_logfile_on_menu' => 'no',
1680
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 7.2.09
7
  *
8
  */
9
 
114
  sname text NOT NULL,
115
  dlcount bigint(20) NOT NULL default '0',
116
  thumblock smallint(5) default '0',
117
+ duration tinytext NOT NULL,
118
  PRIMARY KEY (id),
119
  KEY albumkey (album),
120
  KEY statuskey (status(6))
1676
  'wppa_move_all_photos_to' => '',
1677
  'wppa_photos_hyphens_to_spaces' => '',
1678
  'wppa_png_to_jpg' => '',
1679
+ 'wppa_fix_mp4_meta' => '',
1680
 
1681
  'wppa_logfile_on_menu' => 'no',
1682
 
wppa-upload-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains common upload functions
6
- * Version 7.2.07
7
  *
8
  */
9
 
@@ -231,7 +231,7 @@ global $wppa_supported_document_extensions;
231
  'ext' => 'xxx',
232
  ) );
233
  wppa_upload_post_process( $the_type, $album, $id, $from );
234
- return true;; // Yes we uploaded a file
235
  break;
236
 
237
  case 'zip':
@@ -402,6 +402,8 @@ function wppa_upload_post_process( $the_type, $album, $id, $from ) {
402
  wppa( 'ajax_import_files_done', true );
403
  }
404
  }
 
 
405
  }
406
 
407
  // To check on possible duplicate
@@ -441,4 +443,65 @@ global $wpdb;
441
  $album
442
  ) );
443
  return $id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains common upload functions
6
+ * Version 7.2.09
7
  *
8
  */
9
 
231
  'ext' => 'xxx',
232
  ) );
233
  wppa_upload_post_process( $the_type, $album, $id, $from );
234
+ return true; // Yes we uploaded a file
235
  break;
236
 
237
  case 'zip':
402
  wppa( 'ajax_import_files_done', true );
403
  }
404
  }
405
+
406
+ wppa_fix_video_framesize( $id, $from );
407
  }
408
 
409
  // To check on possible duplicate
443
  $album
444
  ) );
445
  return $id;
446
+ }
447
+
448
+ // Try to find the framesize of a video, and update the items db entry if found.
449
+ // Return true on success, false on failure
450
+ function wppa_fix_video_framesize( $id, $where ) {
451
+
452
+ // Is it a video?
453
+ $files = wppa_is_video( $id );
454
+ if ( ! $files ) {
455
+ return false;
456
+ }
457
+ if ( ! in_array( 'mp4', $files ) ) {
458
+ return false;
459
+ }
460
+
461
+ // Does file exist?
462
+ $file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp4';
463
+ if ( ! wppa_is_file( $file ) ) {
464
+ wppa_log( 'dbg', 'wppa_fix_video_framesize quit because ' . $file . ' does not exists' );
465
+ }
466
+
467
+ // Get the info
468
+ $mp4info = wp_read_video_metadata( $file );
469
+
470
+ // Make sure its a video
471
+ if ( $mp4info['fileformat'] != 'mp4' ) {
472
+ wppa_log( 'dbg', 'No mp4 fileformat in ' . $file . ' ' . $where );
473
+ return false;
474
+ }
475
+
476
+ // Find sizes
477
+ $videox = isset( $mp4info['width'] ) ? $mp4info['width'] : '0';
478
+ $videoy = isset( $mp4info['height'] ) ? $mp4info['height'] : '0';
479
+
480
+ // Update item
481
+ wppa_update_photo( array( 'id' => $id,
482
+ 'videox' => $videox,
483
+ 'videoy' => $videoy,
484
+ ) );
485
+
486
+ // Duration available?
487
+ $duration = isset( $mp4info['length'] ) ? $mp4info['length'] : false;
488
+ if ( $duration ) {
489
+ wppa_update_photo( array( 'id' => $id,
490
+ 'duration' => $duration,
491
+ ) );
492
+ }
493
+
494
+ // Date/time original?
495
+ $datetime = isset( $mp4info['created_timestamp'] ) ? $mp4info['created_timestamp'] : false;
496
+ if ( $datetime ) {
497
+ $exifdtm = date( 'Y:m:d H:i:s', $datetime );
498
+ wppa_update_photo( array( 'id' => $id,
499
+ 'exifdtm' => $exifdtm,
500
+ ) );
501
+ }
502
+ else $exifdtm = '';
503
+
504
+ wppa_log( 'dbg', 'MP4 Metadata found (' . $videox . 'x' . $videoy . '), ' . $duration . ', ' . $exifdtm . ' in ' . $file . ' ' . $where );
505
+
506
+ return true;
507
  }
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -1524,6 +1524,9 @@ function wppa_log( $xtype, $msg, $trace = false, $listuri = false ) {
1524
  global $wppa_session;
1525
  global $wppa_log_file;
1526
  static $busy;
 
 
 
1527
 
1528
  // Do not log during plugin activation or update
1529
  if ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin/plugins.php' ) !== false ) {
@@ -1653,8 +1656,35 @@ static $busy;
1653
  $contents = array();
1654
  }
1655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1656
  // Write log message
1657
  $msg = strip_tags( $msg );
 
1658
  array_push( $contents, '{b}'.$type.'{/b}: on:'.wppa_local_date( 'd.m.Y H:i:s', time()).': '.wppa_get_user().': '.$msg. "\n" );
1659
 
1660
  // Log stacktrace 5 levels
@@ -4907,4 +4937,9 @@ function wppa_sanitize_album_photo_name( $xname ) {
4907
  $name = sanitize_file_name( $name );
4908
 
4909
  return $name;
 
 
 
 
 
4910
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.2.09
7
  *
8
  */
9
 
1524
  global $wppa_session;
1525
  global $wppa_log_file;
1526
  static $busy;
1527
+ static $last_msg;
1528
+ static $last_type;
1529
+ static $repeat_count;
1530
 
1531
  // Do not log during plugin activation or update
1532
  if ( strpos( $_SERVER['REQUEST_URI'], '/wp-admin/plugins.php' ) !== false ) {
1656
  $contents = array();
1657
  }
1658
 
1659
+ // Check for repeated msg;
1660
+ $rep_msg = '';
1661
+ if ( ! $last_msg ) {
1662
+ $last_msg = $msg;
1663
+ $last_type = $xtype;
1664
+ $repeat_count = 0;
1665
+ }
1666
+ else {
1667
+ if ( $last_msg == $msg ) {
1668
+ $repeat_count++;
1669
+ $busy = false;
1670
+ return;
1671
+ }
1672
+ else {
1673
+ if ( $repeat_count ) {
1674
+ $rep_msg = 'Last message repeated ' . $repeat_count . ' times';
1675
+ $last_msg = '';
1676
+ }
1677
+ }
1678
+ }
1679
+
1680
+ // Write repeat message
1681
+ if ( $rep_msg ) {
1682
+ array_push( $contents, '{b}'.$type.'{/b}: on:'.wppa_local_date( 'd.m.Y H:i:s', time()).': '.wppa_get_user().': '.$rep_msg. "\n" );
1683
+ }
1684
+
1685
  // Write log message
1686
  $msg = strip_tags( $msg );
1687
+ $msg = wppa_nl2sp( $msg );
1688
  array_push( $contents, '{b}'.$type.'{/b}: on:'.wppa_local_date( 'd.m.Y H:i:s', time()).': '.wppa_get_user().': '.$msg. "\n" );
1689
 
1690
  // Log stacktrace 5 levels
4937
  $name = sanitize_file_name( $name );
4938
 
4939
  return $name;
4940
+ }
4941
+
4942
+ function wppa_nl2sp( $text ) {
4943
+ $result = str_replace( ["\r\n","\n"], ' ', $text );
4944
+ return $result;
4945
  }
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 7.2.03
7
  *
8
  */
9
 
@@ -283,6 +283,7 @@ global $wpdb;
283
  'sname' => wppa_sanitize_album_photo_name( isset( $args['name'] ) ? $args['name'] : '' ),
284
  'dlcount' => '0',
285
  'thumblock' => '0',
 
286
  ) );
287
 
288
  if ( $args['scheduledtm'] ) $args['status'] = 'scheduled';
@@ -331,9 +332,10 @@ global $wpdb;
331
  panorama,
332
  sname,
333
  dlcount,
334
- thumblock
 
335
  )
336
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
337
  $args['id'],
338
  $args['album'],
339
  $args['ext'],
@@ -367,7 +369,8 @@ global $wpdb;
367
  $args['panorama'],
368
  $args['sname'],
369
  $args['dlcount'],
370
- $args['thumblock']
 
371
  );
372
  $iret = $wpdb->query( $query );
373
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 7.2.09
7
  *
8
  */
9
 
283
  'sname' => wppa_sanitize_album_photo_name( isset( $args['name'] ) ? $args['name'] : '' ),
284
  'dlcount' => '0',
285
  'thumblock' => '0',
286
+ 'duration' => '',
287
  ) );
288
 
289
  if ( $args['scheduledtm'] ) $args['status'] = 'scheduled';
332
  panorama,
333
  sname,
334
  dlcount,
335
+ thumblock,
336
+ duration
337
  )
338
+ VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
339
  $args['id'],
340
  $args['album'],
341
  $args['ext'],
369
  $args['panorama'],
370
  $args['sname'],
371
  $args['dlcount'],
372
+ $args['thumblock'],
373
+ $args['duration']
374
  );
375
  $iret = $wpdb->query( $query );
376
 
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
- * Version 7.2.05
7
  *
8
  */
9
 
@@ -258,6 +258,10 @@ global $wpdb;
258
  $itemvalue = $itemvalue ? '1' : '0';
259
  $doit = true;
260
  break;
 
 
 
 
261
 
262
  default:
263
  wppa_log( 'Error', 'Not implemented in wppa_update_photo(): '.$itemname );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 7.2.09
7
  *
8
  */
9
 
258
  $itemvalue = $itemvalue ? '1' : '0';
259
  $doit = true;
260
  break;
261
+ case 'duration':
262
+ $itemvalue = sprintf( '%4.2f', $itemvalue );
263
+ $doit = true;
264
+ break;
265
 
266
  default:
267
  wppa_log( 'Error', 'Not implemented in wppa_update_photo(): '.$itemname );
wppa-wrappers.php CHANGED
@@ -5,7 +5,7 @@
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
- * Version 7.2.06
9
  *
10
  */
11
 
@@ -537,12 +537,14 @@ global $wppa_log_file;
537
  }
538
 
539
  // The following root dirs are safe, including all their subdirs, to read/write into
540
- $safe_roots = array( WPPA_CONTENT_PATH . '/uploads',
541
  WPPA_CONTENT_PATH . '/wppa-depot',
542
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'pl_dirname' ),
543
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ),
544
  WPPA_CONTENT_PATH . '/blogs.dir',
545
  WPPA_CONTENT_PATH . '/cache',
 
 
546
  WPPA_PATH . '/fonts',
547
  WPPA_PATH . '/watermarks',
548
  WPPA_PATH . '/wppa-dump.txt',
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
+ * Version 7.2.09
9
  *
10
  */
11
 
537
  }
538
 
539
  // The following root dirs are safe, including all their subdirs, to read/write into
540
+ $safe_roots = array( /*WPPA_CONTENT_PATH . '/uploads',
541
  WPPA_CONTENT_PATH . '/wppa-depot',
542
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'pl_dirname' ),
543
  WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ),
544
  WPPA_CONTENT_PATH . '/blogs.dir',
545
  WPPA_CONTENT_PATH . '/cache',
546
+ WPPA_CONTENT_PATH . '/wppa-pl',*/
547
+ WPPA_CONTENT_PATH,
548
  WPPA_PATH . '/fonts',
549
  WPPA_PATH . '/watermarks',
550
  WPPA_PATH . '/wppa-dump.txt',
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: 7.2.08.004
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 = '7208'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.08.004'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';
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: 7.2.09.003
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 = '7209'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.09.003'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';