WP Photo Album Plus - Version 7.1.11.008

Version Description

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

Code changes from version 7.1.11.004 to 7.1.11.008

changelog.txt CHANGED
@@ -4,10 +4,11 @@ WP Photo Album Plus Changelog
4
 
5
  * Added a dummy row to the masonry horizontal thumbnail display to enable custom css to fix specific pluging conflicts.
6
  The row can be accessed for css by: .wppa-masonry .dummy {}
7
- * Removed '[/wppa]' and 'Any comment[/wppa]' form all helptexts and auto generated shortcodes, because we no longer use the long for of shortcodes.
8
  Please be aware that you can still use long forms, but do never mix long and short forms together in any post or page.
9
  * Slideonly and slideonlyf will now always wrap around, even when Table IV-B8 is unticked.
10
  * Fixed a potential problem with local cdn filnames resulting in errors on the photo admin page. Local cdn files are now always rounded to integer x and y sizes.
 
11
 
12
  = 7.1.10 =
13
 
4
 
5
  * Added a dummy row to the masonry horizontal thumbnail display to enable custom css to fix specific pluging conflicts.
6
  The row can be accessed for css by: .wppa-masonry .dummy {}
7
+ * Removed '[/wppa]' and 'Any comment[/wppa]' form all helptexts and auto generated shortcodes, because we no longer use the long form of shortcodes.
8
  Please be aware that you can still use long forms, but do never mix long and short forms together in any post or page.
9
  * Slideonly and slideonlyf will now always wrap around, even when Table IV-B8 is unticked.
10
  * Fixed a potential problem with local cdn filnames resulting in errors on the photo admin page. Local cdn files are now always rounded to integer x and y sizes.
11
+ * Added Table IX-E21 to remove items in search results wher name, description and displayfiles are identical.
12
 
13
  = 7.1.10 =
14
 
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, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.1.11.004
6
  Stable tag: 7.1.10.007
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
- Tested up to: 5.2
11
  Requires PHP: 5.5
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
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.1.11.008
6
  Stable tag: 7.1.10.007
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
+ Tested up to: 5.2.1
11
  Requires PHP: 5.5
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
wppa-functions.php CHANGED
@@ -1249,7 +1249,7 @@ global $wppa_session;
1249
  "WHERE $album_clause AND ( $status ) " .
1250
  $non_zero .
1251
  "ORDER BY $sortby LIMIT $max";
1252
- wppa_log('dbg',$query);
1253
  $count_first = false;
1254
  }
1255
 
@@ -1943,13 +1943,14 @@ global $wpdb;
1943
  $time = -microtime( true );
1944
 
1945
  // Inverse requested?
1946
- $invers = false;
1947
- if ( wppa( 'is_inverse' ) ) {
1948
- $invers = true;
1949
- }
 
1950
 
1951
  // Do we need to get the count first to decide if we get the full data and probably cache it ?
1952
- if ( $count_first || $invers ) {
1953
 
1954
  // Find count of the query result
1955
  $tempquery = str_replace( 'SELECT *', 'SELECT id', $query );
@@ -1957,12 +1958,12 @@ global $wpdb;
1957
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
1958
 
1959
  // If less than 5000, get them and cache them
1960
- if ( $count <= 5000 && ! $invers ) {
1961
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
1962
  $caching = true;
1963
  }
1964
 
1965
- // If more than 5000, or inverse requested, use the ids only, and do not cache them
1966
  else {
1967
  $thumbs = $wpdb->get_results( $tempquery, ARRAY_A );
1968
  $caching = false;
@@ -2005,7 +2006,14 @@ global $wpdb;
2005
 
2006
  // Log query
2007
  wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2008
- wppa_log( 'dbg', str_replace( array( '<', '>' ), array( '{', '}' ), $query ) );
 
 
 
 
 
 
 
2009
  wppa( 'thumb_count', $count );
2010
  $time += microtime( true );
2011
  wppa_dbg_msg( 'Get thumbs query took ' . $time . ' seconds. ' .
@@ -2021,6 +2029,58 @@ global $wpdb;
2021
  return $thumbs;
2022
  }
2023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2024
  function wppa_get_all_children( $root ) {
2025
  global $wpdb;
2026
 
1249
  "WHERE $album_clause AND ( $status ) " .
1250
  $non_zero .
1251
  "ORDER BY $sortby LIMIT $max";
1252
+
1253
  $count_first = false;
1254
  }
1255
 
1943
  $time = -microtime( true );
1944
 
1945
  // Inverse requested?
1946
+ $invers = wppa( 'is_inverse' );
1947
+
1948
+ // Extended dups removal?
1949
+ $exduprem = wppa_switch( 'extended_duplicate_remove' ) &&
1950
+ ( wppa( 'src' ) || wppa( 'is_tag' ) || wppa( 'supersearch' ) );
1951
 
1952
  // Do we need to get the count first to decide if we get the full data and probably cache it ?
1953
+ if ( $count_first || $invers || $exduprem ) {
1954
 
1955
  // Find count of the query result
1956
  $tempquery = str_replace( 'SELECT *', 'SELECT id', $query );
1958
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
1959
 
1960
  // If less than 5000, get them and cache them
1961
+ if ( $count <= 5000 && ! $invers && ! $exduprem ) {
1962
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
1963
  $caching = true;
1964
  }
1965
 
1966
+ // If more than 5000, or inverse requested, or exduprem use the ids only, and do not cache them
1967
  else {
1968
  $thumbs = $wpdb->get_results( $tempquery, ARRAY_A );
1969
  $caching = false;
2006
 
2007
  // Log query
2008
  wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2009
+ wppa_log( 'dbg', htmlspecialchars( $query ) );
2010
+
2011
+ // Process extended duplicate removal
2012
+ if ( $exduprem ) {
2013
+ wppa_extended_duplicate_remove( $thumbs );
2014
+ }
2015
+
2016
+ // Postprocess
2017
  wppa( 'thumb_count', $count );
2018
  $time += microtime( true );
2019
  wppa_dbg_msg( 'Get thumbs query took ' . $time . ' seconds. ' .
2029
  return $thumbs;
2030
  }
2031
 
2032
+ // Remove duplicates where name, description and display files are identical
2033
+ function wppa_extended_duplicate_remove( &$thumbs ) {
2034
+
2035
+ $start = microtime( true );
2036
+
2037
+ if ( is_array( $thumbs ) ) {
2038
+ $c = count( $thumbs );
2039
+ $i = 0;
2040
+ while ( $i < ( $c - 1 ) ) {
2041
+ if ( isset( $thumbs[$i] ) ) {
2042
+ $j = $i + 1;
2043
+ while ( $j < $c ) {
2044
+ if ( isset( $thumbs[$j] ) ) {
2045
+ if ( wppa_looks_equal( wppa_get_photo_item( $thumbs[$i]['id'], 'name' ), wppa_get_photo_item( $thumbs[$j]['id'], 'name' ) ) ) {
2046
+ if ( wppa_looks_equal( wppa_get_photo_item( $thumbs[$i]['id'], 'description' ), wppa_get_photo_item( $thumbs[$j]['id'], 'description' ) ) ) {
2047
+ $p = wppa_get_photo_path( $thumbs[$i]['id'] );
2048
+ $q = wppa_get_photo_path( $thumbs[$j]['id'] );
2049
+ if ( wppa_get_contents( $p ) == wppa_get_contents( $q ) ) {
2050
+ wppa_log( 'dbg', 'Items ' . $thumbs[$i]['id'] . ' and ' . $thumbs[$j]['id'] . ' are identical' );
2051
+ unset( $thumbs[$j] );
2052
+ }
2053
+ else {
2054
+ wppa_log( 'dbg', 'Items ' . $thumbs[$i]['id'] . ' and ' . $thumbs[$j]['id'] . ' have the same name and descriptions but different files' );
2055
+ }
2056
+ }
2057
+ else {
2058
+ wppa_log( 'dbg', 'Items ' . $thumbs[$i]['id'] . ' and ' . $thumbs[$j]['id'] . ' have the same name but different descriptions' );
2059
+ }
2060
+ }
2061
+ }
2062
+ $j++;
2063
+ }
2064
+ }
2065
+ $i++;
2066
+ }
2067
+ }
2068
+
2069
+ $end = microtime( true );
2070
+ wppa_log( 'dbg', sprintf( 'wppa_extended_duplicate_remove() took %4.2f seconds', $end - $start ) );
2071
+ }
2072
+
2073
+ function wppa_looks_equal( $s1, $s2 ) {
2074
+ if ( $s1 == $s2 ) return true;
2075
+ $s1 = str_replace( array( ' ', "\r\n", "\r", "\n" ), '', $s1 );
2076
+ $s2 = str_replace( ' ', '', $s2 );
2077
+ if ( $s1 == $s2 ) return true;
2078
+ $s1 = strtolower( $s1 );
2079
+ $s2 = strtolower( $s2 );
2080
+ if ( $s1 == $s2 ) return true;
2081
+ return false;
2082
+ }
2083
+
2084
  function wppa_get_all_children( $root ) {
2085
  global $wpdb;
2086
 
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 7.1.10
7
  *
8
  */
9
 
@@ -2137,14 +2137,19 @@ global $wppa_session;
2137
  if ( wppa( 'ajax' ) && wppa( 'is_remote' ) ) {
2138
  $setting = get_option( 'wppa_import_source_url_'.$user, 'http://' );
2139
  $setting_x = wppa_expand_tree_path( $setting );
2140
- if ( ( ! $wppa_session['is_wppa_tree'] && wppa_is_url_a_photo( $setting ) ) || wppa_is_url_a_photo( $setting_x ) ) {
2141
  update_option( 'wppa_import_source_url_' . wppa_get_user(), wppa_compress_tree_path( $unsanitized_path_name ) );
2142
  }
2143
 
2144
  $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $unsanitized_path_name ) );
2145
- if ( is_file( $path ) ) {
2146
- wppa_unlink( $path );
2147
- wppa_log('dbg', $path . ' removed' );
 
 
 
 
 
2148
  }
2149
  }
2150
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 7.1.11
7
  *
8
  */
9
 
2137
  if ( wppa( 'ajax' ) && wppa( 'is_remote' ) ) {
2138
  $setting = get_option( 'wppa_import_source_url_'.$user, 'http://' );
2139
  $setting_x = wppa_expand_tree_path( $setting );
2140
+ if ( ( ! $wppa_session['is_wppa_tree'] && wppa_is_url_a_photo( $setting, false ) ) || wppa_is_url_a_photo( $setting_x, false ) ) {
2141
  update_option( 'wppa_import_source_url_' . wppa_get_user(), wppa_compress_tree_path( $unsanitized_path_name ) );
2142
  }
2143
 
2144
  $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $unsanitized_path_name ) );
2145
+ $e = array( 'jpg', 'png' );
2146
+ $p = wppa_strip_ext( $path );
2147
+ foreach( $e as $ex ) {
2148
+ $pt = $p . '.' . $ex;
2149
+ if ( is_file( $pt ) ) {
2150
+ wppa_unlink( $pt );
2151
+ wppa_log('dbg', $pt . ' removed (1)' );
2152
+ }
2153
  }
2154
  }
2155
  }
wppa-photo-admin-autosave.php CHANGED
@@ -428,7 +428,7 @@ function wppaTryWatermark( id, hasSource, canRemove ) {
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 ) {
428
  return;
429
  }
430
  if ( hasSource ) {
431
+ query = '<?php echo esc_js( __( 'Are you sure?', '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 ) {
wppa-settings-autosave.php CHANGED
@@ -337,8 +337,8 @@ global $wppa_supported_camara_brands;
337
  __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . get_option( 'wppa_revision', '100') . '. ' .
338
  __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
339
  // __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
340
- __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ' .
341
- __( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method();
342
  }
343
  ?>
344
  <br /><?php if ( is_multisite() ) {
@@ -7903,7 +7903,7 @@ global $wppa_supported_camara_brands;
7903
  $name = __('Append to photodesc', 'wp-photo-album-plus');
7904
  $desc = __('Append this text to all photo descriptions.', 'wp-photo-album-plus');
7905
  $help = __('Appends a space character and the given text to the description of all photos.', 'wp-photo-album-plus');
7906
- $help .= '<br />'.('First edit the text to append, click outside the edit window and wait for the green checkmark to appear. Then click the Start! button.');
7907
  $slug1 = 'wppa_append_text';
7908
  $slug2 = 'wppa_append_to_photodesc';
7909
  $html1 = wppa_input( $slug1, '200px' );
@@ -8505,10 +8505,10 @@ global $wppa_supported_camara_brands;
8505
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
8506
 
8507
  $name = __('Enable <i>in-line</i> settings', 'wp-photo-album-plus');
8508
- $desc = __('Activates shortcode [wppa_set][/wppa_set].', 'wp-photo-album-plus');
8509
- $help = (__('Syntax: [wppa_set name="any wppa setting" value="new value"][/wppa_set]', 'wp-photo-album-plus'));
8510
- $help .= '<br />'.(__('Example: [wppa_set name="wppa_thumbtype" value="masonry-v"][/wppa_set] sets the thumbnail type to vertical masonry style', 'wp-photo-album-plus'));
8511
- $help .= '<br />'.(__('Do not forget to reset with [wppa_set][/wppa_set]', 'wp-photo-album-plus'));
8512
  $help .= '<br />'.(__('Use with great care! There is no check on validity of values!', 'wp-photo-album-plus'));
8513
  $slug = 'wppa_enable_shortcode_wppa_set';
8514
  $html = wppa_checkbox($slug);
@@ -9303,7 +9303,7 @@ global $wppa_supported_camara_brands;
9303
 
9304
  $name = __('Default photo name', 'wp-photo-album-plus');
9305
  $desc = __('Select the way the name of a new uploaded photo should be determined.', 'wp-photo-album-plus');
9306
- $help = ('If you select an IPTC Tag and it is not found, the filename will be used instead.');
9307
  $slug = 'wppa_newphoto_name_method';
9308
  $opts = array( __('Filename', 'wp-photo-album-plus'),
9309
  __('Filename without extension', 'wp-photo-album-plus'),
@@ -9414,9 +9414,9 @@ global $wppa_supported_camara_brands;
9414
  {
9415
  $name = __('Search page', 'wp-photo-album-plus');
9416
  $desc = __('Display the search results on page.', 'wp-photo-album-plus');
9417
- $help = (__('Select the page to be used to display search results. The page MUST contain [wppa].', 'wp-photo-album-plus'));
9418
- $help .= '<br />'.(__('You may give it the title "Search results" or something alike.', 'wp-photo-album-plus'));
9419
- $help .= '<br />'.(__('Or you may use the standard page on which you display the generic album.', 'wp-photo-album-plus'));
9420
  $slug = 'wppa_search_linkpage';
9421
  wppa_verify_page($slug);
9422
  $query = "SELECT ID, post_title, post_content FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' ORDER BY post_title ASC";
@@ -9718,6 +9718,15 @@ global $wppa_supported_camara_brands;
9718
  $tags = 'system,search';
9719
  wppa_setting($slug, '20.6', $name, $desc, $html, $help, $clas, $tags);
9720
 
 
 
 
 
 
 
 
 
 
9721
  }
9722
  wppa_setting_subheader( 'F', '1', __( 'Watermark related settings' , 'wp-photo-album-plus') );
9723
  {
@@ -9734,10 +9743,10 @@ global $wppa_supported_camara_brands;
9734
 
9735
  $name = __('Watermark file', 'wp-photo-album-plus');
9736
  $desc = __('The default watermarkfile to be used.', 'wp-photo-album-plus');
9737
- $help = (__('Watermark files are of type png and reside in', 'wp-photo-album-plus') . ' ' . WPPA_UPLOAD_URL . '/watermarks/');
9738
- $help .= '<br />'.(__('A suitable watermarkfile typically consists of a transparent background and a black text or drawing.', 'wp-photo-album-plus'));
9739
- $help .= '<br />'.(__(sprintf('The watermark image will be overlaying the photo with %s%% transparency.', (100-wppa_opt( 'watermark_opacity' ))), 'wp-photo-album-plus'));
9740
- $help .= '<br />'.(__('You may also select one of the textual watermark types at the bottom of the selection list.', 'wp-photo-album-plus'));
9741
  $slug = 'wppa_watermark_file';
9742
  $html = '<select style="float:left; font-size:11px; height:20px; margin:0 4px 0 0; padding:0; " id="wppa_watermark_file" onchange="wppaAjaxUpdateOptionValue(\'watermark_file\', this)" >' . wppa_watermark_file_select( 'system' ) . '</select>';
9743
  $html .= '<img id="img_watermark_file" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;" />';
337
  __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . get_option( 'wppa_revision', '100') . '. ' .
338
  __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
339
  // __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
340
+ __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ';
341
+ // __( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method();
342
  }
343
  ?>
344
  <br /><?php if ( is_multisite() ) {
7903
  $name = __('Append to photodesc', 'wp-photo-album-plus');
7904
  $desc = __('Append this text to all photo descriptions.', 'wp-photo-album-plus');
7905
  $help = __('Appends a space character and the given text to the description of all photos.', 'wp-photo-album-plus');
7906
+ $help .= '<br />'.__('First edit the text to append, click outside the edit window and wait for the green checkmark to appear. Then click the Start! button.', 'wp-photo-album-plus');
7907
  $slug1 = 'wppa_append_text';
7908
  $slug2 = 'wppa_append_to_photodesc';
7909
  $html1 = wppa_input( $slug1, '200px' );
8505
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
8506
 
8507
  $name = __('Enable <i>in-line</i> settings', 'wp-photo-album-plus');
8508
+ $desc = __('Activates shortcode [wppa_set].', 'wp-photo-album-plus');
8509
+ $help = (__('Syntax: [wppa_set name="any wppa setting" value="new value"]', 'wp-photo-album-plus'));
8510
+ $help .= '<br />'.(__('Example: [wppa_set name="wppa_thumbtype" value="masonry-v"] sets the thumbnail type to vertical masonry style', 'wp-photo-album-plus'));
8511
+ $help .= '<br />'.(__('Do not forget to reset with [wppa_set]', 'wp-photo-album-plus'));
8512
  $help .= '<br />'.(__('Use with great care! There is no check on validity of values!', 'wp-photo-album-plus'));
8513
  $slug = 'wppa_enable_shortcode_wppa_set';
8514
  $html = wppa_checkbox($slug);
9303
 
9304
  $name = __('Default photo name', 'wp-photo-album-plus');
9305
  $desc = __('Select the way the name of a new uploaded photo should be determined.', 'wp-photo-album-plus');
9306
+ $help = __('If you select an IPTC Tag and it is not found, the filename will be used instead.', 'wp-photo-album-plus');
9307
  $slug = 'wppa_newphoto_name_method';
9308
  $opts = array( __('Filename', 'wp-photo-album-plus'),
9309
  __('Filename without extension', 'wp-photo-album-plus'),
9414
  {
9415
  $name = __('Search page', 'wp-photo-album-plus');
9416
  $desc = __('Display the search results on page.', 'wp-photo-album-plus');
9417
+ $help = __('Select the page to be used to display search results. The page MUST contain [wppa].', 'wp-photo-album-plus');
9418
+ $help .= '<br />'.__('You may give it the title "Search results" or something alike.', 'wp-photo-album-plus');
9419
+ $help .= '<br />'.__('Or you may use the standard page on which you display the generic album.', 'wp-photo-album-plus');
9420
  $slug = 'wppa_search_linkpage';
9421
  wppa_verify_page($slug);
9422
  $query = "SELECT ID, post_title, post_content FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' ORDER BY post_title ASC";
9718
  $tags = 'system,search';
9719
  wppa_setting($slug, '20.6', $name, $desc, $html, $help, $clas, $tags);
9720
 
9721
+ $name = __('Extended duplicate removal', 'wp-photo-album-plus');
9722
+ $desc = __('Remove found items from search when name, description and image are identical', 'wp-photo-album-plus');
9723
+ $help = '';
9724
+ $slug = 'wppa_extended_duplicate_remove';
9725
+ $html = wppa_checkbox($slug);
9726
+ $clas = '';
9727
+ $tags = 'system,search';
9728
+ wppa_setting($slug, '21', $name, $desc, $html, $help, $clas, $tags);
9729
+
9730
  }
9731
  wppa_setting_subheader( 'F', '1', __( 'Watermark related settings' , 'wp-photo-album-plus') );
9732
  {
9743
 
9744
  $name = __('Watermark file', 'wp-photo-album-plus');
9745
  $desc = __('The default watermarkfile to be used.', 'wp-photo-album-plus');
9746
+ $help = __('Watermark files are of type png and reside in', 'wp-photo-album-plus') . ' ' . WPPA_UPLOAD_URL . '/watermarks/';
9747
+ $help .= '<br />'.__('A suitable watermarkfile typically consists of a transparent background and a black text or drawing.', 'wp-photo-album-plus');
9748
+ $help .= '<br />'.sprintf(__('The watermark image will be overlaying the photo with %s%% transparency.', 'wp-photo-album-plus'), (100-wppa_opt( 'watermark_opacity' )));
9749
+ $help .= '<br />'.__('You may also select one of the textual watermark types at the bottom of the selection list.', 'wp-photo-album-plus');
9750
  $slug = 'wppa_watermark_file';
9751
  $html = '<select style="float:left; font-size:11px; height:20px; margin:0 4px 0 0; padding:0; " id="wppa_watermark_file" onchange="wppaAjaxUpdateOptionValue(\'watermark_file\', this)" >' . wppa_watermark_file_select( 'system' ) . '</select>';
9752
  $html .= '<img id="img_watermark_file" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;" />';
wppa-setup.php CHANGED
@@ -1822,6 +1822,7 @@ cursorborder:'2px solid transparent',";
1822
  'wppa_search_selbox_1' => '',
1823
  'wppa_search_caption_2' => '',
1824
  'wppa_search_selbox_2' => '',
 
1825
 
1826
  // F Watermark
1827
  'wppa_watermark_on' => 'no',
1822
  'wppa_search_selbox_1' => '',
1823
  'wppa_search_caption_2' => '',
1824
  'wppa_search_selbox_2' => '',
1825
+ 'wppa_extended_duplicate_remove' => 'no',
1826
 
1827
  // F Watermark
1828
  'wppa_watermark_on' => 'no',
wppa-utils.php CHANGED
@@ -3607,7 +3607,7 @@ function wppa_get_mime_type( $id ) {
3607
  }
3608
 
3609
  // Test if a given url is to a photo file
3610
- function wppa_is_url_a_photo( &$url ) {
3611
  global $wppa_supported_photo_extensions;
3612
  global $wppa_session;
3613
 
@@ -3617,7 +3617,7 @@ global $wppa_session;
3617
  }
3618
 
3619
  // Check existence
3620
- if ( ! wppa_remote_file_exists( $url ) ) {
3621
  $wppa_session['rem_url'][$url] = false;
3622
  if ( count( $wppa_session['rem_url'] ) > 100 ) array_shift( $wppa_session['rem_url'] );
3623
  return false;
@@ -4753,7 +4753,7 @@ function wppa_is_panorama( $id ) {
4753
  }
4754
 
4755
  // See if a remote file exists
4756
- function wppa_remote_file_exists( &$url ) {
4757
 
4758
  $orig_url = $url;
4759
  $ext = wppa_get_ext( $url );
@@ -4778,7 +4778,10 @@ function wppa_remote_file_exists( &$url ) {
4778
  $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $url ) );
4779
  if ( ! wppa_is_file( $path ) || ! wppa_filesize( $path ) ) {
4780
  $data = file_get_contents( $url );
4781
- file_put_contents( $path, $data );
 
 
 
4782
  }
4783
  return true;
4784
  }
3607
  }
3608
 
3609
  // Test if a given url is to a photo file
3610
+ function wppa_is_url_a_photo( &$url, $save = true ) {
3611
  global $wppa_supported_photo_extensions;
3612
  global $wppa_session;
3613
 
3617
  }
3618
 
3619
  // Check existence
3620
+ if ( ! wppa_remote_file_exists( $url, $save ) ) {
3621
  $wppa_session['rem_url'][$url] = false;
3622
  if ( count( $wppa_session['rem_url'] ) > 100 ) array_shift( $wppa_session['rem_url'] );
3623
  return false;
4753
  }
4754
 
4755
  // See if a remote file exists
4756
+ function wppa_remote_file_exists( &$url, $save = true ) {
4757
 
4758
  $orig_url = $url;
4759
  $ext = wppa_get_ext( $url );
4778
  $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $url ) );
4779
  if ( ! wppa_is_file( $path ) || ! wppa_filesize( $path ) ) {
4780
  $data = file_get_contents( $url );
4781
+ if ( $save ) {
4782
+ file_put_contents( $path, $data );
4783
+ wppa_log( 'dbg', basename( $path ) . ' saved by wppa_remote_file_exists()' );
4784
+ }
4785
  }
4786
  return true;
4787
  }
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.11.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 = '7110'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.1.11.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.1.11.008
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 = '7111'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.1.11.008'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';