WP Photo Album Plus - Version 7.6.07.009

Version Description

= 7.6.07 =

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

Release Info

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

Code changes from version 7.6.07.008 to 7.6.07.009

Files changed (4) hide show
  1. changelog.txt +2 -0
  2. wppa-functions.php +4 -4
  3. wppa-photo-files.php +23 -3
  4. wppa.php +2 -2
changelog.txt CHANGED
@@ -10,6 +10,8 @@ This reduces the number of db queries in certain circumstances e.g. when the cov
10
  * Fixed permalinks for pdf posterfiles.
11
  * Fixed incidently missing lazy loading.
12
  * Fixed remaking display files for pdfs with imagick.
 
 
13
 
14
  = 7.6.06 =
15
 
10
  * Fixed permalinks for pdf posterfiles.
11
  * Fixed incidently missing lazy loading.
12
  * Fixed remaking display files for pdfs with imagick.
13
+ * Setting the status of a pdf to featured will now copy the pdf to the wp media, like photos and videos already do.
14
+ * Photo names of pdf files are now diaplayed standard - as defined in Table IX-D13 - or as manually edited afterwards.
15
 
16
  = 7.6.06 =
17
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.6.07.007
7
  *
8
  */
9
 
@@ -2648,9 +2648,9 @@ static $user;
2648
  if ( ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
2649
  $name = esc_js( wppa_get_photo_name( $id ) );
2650
  if ( ! $name ) $name = ' ';
2651
- if ( wppa_is_pdf( $id ) ) {
2652
- $fullname = esc_js( wppa_get_photo_item( $id, 'filename' ) );
2653
- }
2654
  else {
2655
  $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2656
  'addmedal' => true,
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.6.07.009
7
  *
8
  */
9
 
2648
  if ( ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
2649
  $name = esc_js( wppa_get_photo_name( $id ) );
2650
  if ( ! $name ) $name = ' ';
2651
+ // if ( wppa_is_pdf( $id ) ) {
2652
+ // $fullname = esc_js( wppa_get_photo_item( $id, 'filename' ) );
2653
+ // }
2654
  else {
2655
  $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2656
  'addmedal' => true,
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 7.6.07.008
6
  *
7
  */
8
 
@@ -52,7 +52,6 @@ function wppa_make_o1_source( $id ) {
52
  }
53
  }
54
 
55
-
56
  // Done
57
  return true;
58
  }
@@ -166,7 +165,28 @@ wppa_log('dbg', 'make called with'.$file.' '.$id.' '.$ext.' '.$do_thumb. ' exist
166
  wppa_image_magick( 'convert -density 150 ' . $pdf . '[0] -quality 90 -background white -alpha remove ' . $jpg );
167
  $err = ! wppa_is_file( $jpg );
168
  if ( ! $err ) {
169
- wppa_update_photo( array( 'id' => $id, 'ext' => 'jpg' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  // Remove possible old stubfile
172
  if ( wppa_is_file( $png ) ) {
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 7.6.07.009
6
  *
7
  */
8
 
52
  }
53
  }
54
 
 
55
  // Done
56
  return true;
57
  }
165
  wppa_image_magick( 'convert -density 150 ' . $pdf . '[0] -quality 90 -background white -alpha remove ' . $jpg );
166
  $err = ! wppa_is_file( $jpg );
167
  if ( ! $err ) {
168
+ switch ( wppa_opt( 'newphoto_name_method' ) ) {
169
+ case 'filename':
170
+ $name = wppa_strip_ext( $thumb['filename'] ) . '.pdf';
171
+ break;
172
+ case 'noext':
173
+ $name = wppa_strip_ext( $thumb['filename'] );
174
+ break;
175
+ case 'noextspace':
176
+ $name = str_replace( '-', ' ', wppa_strip_ext( $thumb['filename'] ) );
177
+ break;
178
+ case 'Photo w#id':
179
+ $name = 'Photo w#id';
180
+ break;
181
+ default:
182
+ $name = '';
183
+ break;
184
+ }
185
+ wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$thumb['filename'].', name = '.$name);
186
+ wppa_update_photo( array( 'id' => $id,
187
+ 'ext' => 'jpg',
188
+ 'name' => $name
189
+ ) );
190
 
191
  // Remove possible old stubfile
192
  if ( wppa_is_file( $png ) ) {
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.6.07.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/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7607'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.6.07.008'; // WPPA software version
28
 
29
  /* Init page js data */
30
  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.6.07.009
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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7607'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.6.07.009'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';