WP Photo Album Plus - Version 7.1.01.004

Version Description

= 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.1.01.004
Comparing to
See all releases

Code changes from version 7.1.01.003 to 7.1.01.004

changelog.txt CHANGED
@@ -6,6 +6,7 @@ WP Photo Album Plus Changelog
6
  * You can have a CDN active when PDFs are enabled. However, the documents will stay stored locally on the server.
7
  * Table IX-A15.1 and 15.2 added. Use in complex situations where window resizing partially fails.
8
  * Multimedia icons are now custom uploadable. See Table II-J14.x. Note that changing the size here also changes the size of the medals on the thumbnail.
 
9
 
10
  = 7.1.00 =
11
 
6
  * You can have a CDN active when PDFs are enabled. However, the documents will stay stored locally on the server.
7
  * Table IX-A15.1 and 15.2 added. Use in complex situations where window resizing partially fails.
8
  * Multimedia icons are now custom uploadable. See Table II-J14.x. Note that changing the size here also changes the size of the medals on the thumbnail.
9
+ * Added Table IX-F13 and Table IX-F13 to specify size and margin of the watermark placement.
10
 
11
  = 7.1.00 =
12
 
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.0.12
7
  *
8
  */
9
 
@@ -419,16 +419,28 @@ function wppaTryFlop( id ) {
419
  }
420
  }
421
 
422
- function wppaTryWatermark( id ) {
423
 
 
424
  var wmFile = jQuery( '#wmfsel_' + id ).val();
425
  if ( wmFile == '--- none ---' ) {
426
  alert( '<?php echo esc_js( __( 'No watermark selected', 'wp-photo-album-plus' ) ) ?>' );
427
  return;
428
  }
429
- var query = '<?php echo esc_js( __( 'Are you sure? Once applied it can not be removed!', 'wp-photo-album-plus' ) ) ?>';
430
- query += '\n';
431
- query += '<?php echo esc_js( __( 'And I do not know if there is already a watermark on this photo', 'wp-photo-album-plus' ) ) ?>';
 
 
 
 
 
 
 
 
 
 
 
432
 
433
  if ( confirm( query ) ) {
434
  wppaAjaxApplyWatermark( id, document.getElementById( 'wmfsel_' + id ).value, document.getElementById( 'wmpsel_' + id ).value );
@@ -1179,6 +1191,9 @@ function wppaToggleExif( id, count ) {
1179
  $wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
1180
 
1181
  $user = wppa_get_user();
 
 
 
1182
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1183
  echo
1184
  ' ' . __( 'Watermark:', 'wp-photo-album-plus') . ' ';
@@ -1200,7 +1215,7 @@ function wppaToggleExif( id, count ) {
1200
  ' type="button"' .
1201
  ' class="button-secundary"' .
1202
  ' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
1203
- ' onclick="wppaTryWatermark( ' . $id . ' )"' .
1204
  ' />' .
1205
  ' ' .
1206
  '<img' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.1.01
7
  *
8
  */
9
 
419
  }
420
  }
421
 
422
+ function wppaTryWatermark( id, hasSource, canRemove ) {
423
 
424
+ var query;
425
  var wmFile = jQuery( '#wmfsel_' + id ).val();
426
  if ( wmFile == '--- none ---' ) {
427
  alert( '<?php echo esc_js( __( 'No watermark selected', 'wp-photo-album-plus' ) ) ?>' );
428
  return;
429
  }
430
+ if ( hasSource ) {
431
+ query = '<?php echo esc_js( __( 'Are you sure? Once applied it can be removed', 'wp-photo-album-plus' ) ) ?>';
432
+ query += '\n';
433
+ query += '<?php echo esc_js( __( 'To revert to the default watermark setting afterwards: select Watermark: --- default --- and press the Remake files button', 'wp-photo-album-plus' ) ) ?>';
434
+ if ( canRemove ) {
435
+ query += '\n';
436
+ query += '<?php echo esc_js( __( 'To remove: select Watermark: --- none --- and press the Remake files button', 'wp-photo-album-plus' ) ) ?>';
437
+ }
438
+ }
439
+ else {
440
+ query = '<?php echo esc_js( __( 'Are you sure? Once applied it can not be removed!', 'wp-photo-album-plus' ) ) ?>';
441
+ query += '\n';
442
+ query += '<?php echo esc_js( __( 'And I do not know if there is already a watermark on this photo', 'wp-photo-album-plus' ) ) ?>';
443
+ }
444
 
445
  if ( confirm( query ) ) {
446
  wppaAjaxApplyWatermark( id, document.getElementById( 'wmfsel_' + id ).value, document.getElementById( 'wmpsel_' + id ).value );
1191
  $wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
1192
 
1193
  $user = wppa_get_user();
1194
+ $has_source = wppa_is_file( wppa_get_source_path( $id ) );
1195
+ $can_remove = ( wppa_get_album_item( $album, 'wmfile' ) == '--- none ---' ) ||
1196
+ ( wppa_get_album_item( $album, 'wmfile' ) == '--- default ---' && wppa_opt( 'watermark_file' ) == '--- none ---' );
1197
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1198
  echo
1199
  ' ' . __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1215
  ' type="button"' .
1216
  ' class="button-secundary"' .
1217
  ' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
1218
+ ' onclick="wppaTryWatermark( ' . $id . ', ' . $has_source . ', ' . $can_remove . ' )"' .
1219
  ' />' .
1220
  ' ' .
1221
  '<img' .
wppa-settings-autosave.php CHANGED
@@ -9839,6 +9839,27 @@ global $wppa_supported_camara_brands;
9839
  $clas = 'wppa_watermark';
9840
  $tags = 'water,thumb';
9841
  wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9842
  }
9843
  wppa_setting_subheader( 'G', '1', __( 'Slideshow elements sequence order settings' , 'wp-photo-album-plus') );
9844
  {
9839
  $clas = 'wppa_watermark';
9840
  $tags = 'water,thumb';
9841
  wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
9842
+
9843
+ $name = __('Watermark size', 'wp-photo-album-plus');
9844
+ $desc = __('The size of the image based watermark in percents of the image width', 'wp-photo-album-plus');
9845
+ $help = __('Select a value, --- off --- means: use the watermark image as is', 'wp-photo-album-plus');
9846
+ $slug = 'wppa_watermark_size';
9847
+ $opts = array( __('--- off ---', 'wp-photo-album-plus'), '10%', '20%', '25%', '30%', '40%', '50%', '60%', '70%', '80%', '90%' );
9848
+ $vals = array( '0', '10', '20', '25', '30', '40', '50', '60', '70', '80', '90' );
9849
+ $html = wppa_select($slug, $opts, $vals);
9850
+ $clas = 'wppa_watermark';
9851
+ $tags = 'water';
9852
+ wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
9853
+
9854
+ $name = __('Watermark margin', 'wp-photo-album-plus');
9855
+ $desc = __('The margin for the watermark from the edge of the image', 'wp-photo-album-plus');
9856
+ $help = __('A value > 1 means pixels, a value < 1 means fraction. E.g enter 0.12 for 12%', 'wp-photo-album-plus');
9857
+ $slug = 'wppa_watermark_margin';
9858
+ $html = wppa_input($slug, '40px;');
9859
+ $clas = 'wppa_watermark';
9860
+ $tags = 'water';
9861
+ wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
9862
+
9863
  }
9864
  wppa_setting_subheader( 'G', '1', __( 'Slideshow elements sequence order settings' , 'wp-photo-album-plus') );
9865
  {
wppa-setup.php CHANGED
@@ -1840,6 +1840,8 @@ cursorborder:'2px solid transparent',";
1840
  'wppa_watermark_opacity_text' => '80',
1841
  'wppa_watermark_thumbs' => 'no',
1842
  'wppa_watermark_preview' => '',
 
 
1843
 
1844
  // G Slide order
1845
  'wppa_slide_order' => '0,1,2,3,4,5,6,7,8,9,10',
1840
  'wppa_watermark_opacity_text' => '80',
1841
  'wppa_watermark_thumbs' => 'no',
1842
  'wppa_watermark_preview' => '',
1843
+ 'wppa_watermark_size' => '0',
1844
+ 'wppa_watermark_margin' => '0',
1845
 
1846
  // G Slide order
1847
  'wppa_slide_order' => '0,1,2,3,4,5,6,7,8,9,10',
wppa-watermark.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
- * Version 7.0.06
6
  *
7
  */
8
 
@@ -356,7 +356,7 @@ function wppa_get_water_file_and_pos( $id ) {
356
  if ( substr( $result['file'], 0, 3 ) == '---' && $result['file'] != '--- none ---' ) { // Special identifier, not a file
357
  $result['file'] = wppa_create_textual_watermark_file( array( 'content' => $result['file'], 'pos' => $result['pos'], 'id' => $id ) );
358
  }
359
- else {
360
  $result['file'] = WPPA_UPLOAD_PATH . '/watermarks/' . $result['file'];
361
  }
362
  return $result;
@@ -434,6 +434,34 @@ function wppa_add_watermark( $id ) {
434
  return false;
435
  }
436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  switch ( $photosize[2] ) {
438
  case 1: $tempimage = imagecreatefromgif( $file );
439
  $photoimage = imagecreatetruecolor( $photosize[0], $photosize[1] );
@@ -461,23 +489,34 @@ function wppa_add_watermark( $id ) {
461
  $ws_y = $ps_y;
462
  }
463
 
 
 
 
 
 
 
 
 
 
 
 
464
  $loy = substr( $waterpos, 0, 3 );
465
  switch( $loy ) {
466
- case 'top': $dest_y = 0;
467
  break;
468
  case 'cen': $dest_y = ( $ps_y - $ws_y ) / 2;
469
  break;
470
- case 'bot': $dest_y = $ps_y - $ws_y;
471
  break;
472
  default: $dest_y = 0; // should never get here
473
  }
474
  $lox = substr( $waterpos, 3 );
475
  switch( $lox ) {
476
- case 'lft': $dest_x = 0;
477
  break;
478
  case 'cen': $dest_x = ( $ps_x - $ws_x ) / 2;
479
  break;
480
- case 'rht': $dest_x = $ps_x - $ws_x;
481
  break;
482
  default: $dest_x = 0; // should never get here
483
  }
@@ -598,10 +637,12 @@ function wppa_watermark_file_select( $key, $album = '0' ) {
598
  /* Produce the html */
599
  // If not system, allow blank entry for system/album default
600
  if ( $key != 'system' ) {
601
- $result .= '<option value="" >' . __( '--- default ---', 'wp-photo-album-plus' ) . '</option>';
 
602
  }
603
  // None
604
- $result .= '<option value="--- none ---" >'.__( '--- none ---' , 'wp-photo-album-plus' ).'</option>';
 
605
 
606
  // Picture based watermarks
607
  if ( $files ) foreach ( $files as $file ) {
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
+ * Version 7.1.01
6
  *
7
  */
8
 
356
  if ( substr( $result['file'], 0, 3 ) == '---' && $result['file'] != '--- none ---' ) { // Special identifier, not a file
357
  $result['file'] = wppa_create_textual_watermark_file( array( 'content' => $result['file'], 'pos' => $result['pos'], 'id' => $id ) );
358
  }
359
+ elseif ( $result['file'] != '--- none ---' ) {
360
  $result['file'] = WPPA_UPLOAD_PATH . '/watermarks/' . $result['file'];
361
  }
362
  return $result;
434
  return false;
435
  }
436
 
437
+ // Scale the watermark image to a percentage width of the photo
438
+ $perc = wppa_opt( 'watermark_size' );
439
+ if ( strpos( $waterfile, WPPA_UPLOAD_PATH.'/temp/wmf' ) === false && $perc != '0' ) { // Not for a text, not when off
440
+
441
+ // Copy existing image
442
+ $oldwaterimage = $waterimage;
443
+
444
+ // Find target size
445
+ $oldwidth = $watersize[0];
446
+ $oldheight = $watersize[1];
447
+ $newwaterwidth = round( $perc * $photosize[0] / 100 );
448
+ $newwaterheight = round( $oldheight / $oldwidth * $newwaterwidth );
449
+
450
+ // Create new canvas
451
+ $waterimage = imagecreatetruecolor( $newwaterwidth, $newwaterheight );
452
+ imagesavealpha( $waterimage, true );
453
+ imagefill( $waterimage, 0, 0, imagecolorallocatealpha( $waterimage, 0, 0, 0, 127 ) );
454
+
455
+ // Copy image
456
+ imagecopyresampled ( $waterimage, $oldwaterimage, 0, 0, 0, 0, $newwaterwidth, $newwaterheight, $oldwidth, $oldheight);
457
+ imagedestroy( $oldwaterimage );
458
+
459
+ // Adjust sizes
460
+ $watersize[0] = $newwaterwidth;
461
+ $watersize[1] = $newwaterheight;
462
+ }
463
+
464
+
465
  switch ( $photosize[2] ) {
466
  case 1: $tempimage = imagecreatefromgif( $file );
467
  $photoimage = imagecreatetruecolor( $photosize[0], $photosize[1] );
489
  $ws_y = $ps_y;
490
  }
491
 
492
+ // Margin
493
+ $marg = wppa_opt( 'watermark_margin' );
494
+ if ( $marg >= 1.0 ) { // pixels
495
+ $marg_x = $marg;
496
+ $marg_y = $marg;
497
+ }
498
+ else { // Fraction
499
+ $marg_x = round( $marg * $ps_x );
500
+ $marg_y = round( $marg * $ps_y );
501
+ }
502
+
503
  $loy = substr( $waterpos, 0, 3 );
504
  switch( $loy ) {
505
+ case 'top': $dest_y = $marg_y;
506
  break;
507
  case 'cen': $dest_y = ( $ps_y - $ws_y ) / 2;
508
  break;
509
+ case 'bot': $dest_y = $ps_y - $ws_y - $marg_y;
510
  break;
511
  default: $dest_y = 0; // should never get here
512
  }
513
  $lox = substr( $waterpos, 3 );
514
  switch( $lox ) {
515
+ case 'lft': $dest_x = $marg_x;
516
  break;
517
  case 'cen': $dest_x = ( $ps_x - $ws_x ) / 2;
518
  break;
519
+ case 'rht': $dest_x = $ps_x - $ws_x - $marg_x;
520
  break;
521
  default: $dest_x = 0; // should never get here
522
  }
637
  /* Produce the html */
638
  // If not system, allow blank entry for system/album default
639
  if ( $key != 'system' ) {
640
+ $sel = $select == '--- dafault ---' ? 'selected="selected"' : '';
641
+ $result .= '<option value="" '.$sel.' >' . __( '--- default ---', 'wp-photo-album-plus' ) . '</option>';
642
  }
643
  // None
644
+ $sel = $select == '--- none ---' ? 'selected="selected"' : '';
645
+ $result .= '<option value="--- none ---" '.$sel.' >'.__( '--- none ---' , 'wp-photo-album-plus' ).'</option>';
646
 
647
  // Picture based watermarks
648
  if ( $files ) foreach ( $files as $file ) {
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.1.01.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,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7100'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.1.01.003'; // WPPA software version
27
 
28
  /* start timers */
29
  add_action( 'plugins_loaded', 'wppa_init_timer' );
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.1.01.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
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '7101'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.1.01.004'; // WPPA software version
27
 
28
  /* start timers */
29
  add_action( 'plugins_loaded', 'wppa_init_timer' );