WP Photo Album Plus - Version 7.7.03.006

Version Description

= 7.7.03 =

  • 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.7.03.006
Comparing to
See all releases

Code changes from version 7.7.03.005 to 7.7.03.006

Files changed (4) hide show
  1. changelog.txt +2 -0
  2. wppa-settings-autosave.php +104 -97
  3. wppa-watermark.php +16 -9
  4. wppa.php +2 -2
changelog.txt CHANGED
@@ -13,6 +13,8 @@ WP Photo Album Plus Changelog
13
  * Re-uploading an image file that had been modified by imagick did not replace the source file. Fixed.
14
  * New setting: Table IX-B15.0: Use audiostub. You can now switch off the use of an audio stub image.
15
  * New settings: Table IX-M20 and 21. You can now set the sitename and the from email address to be used in emails sent by wppa.
 
 
16
 
17
  = 7.7.02 =
18
 
13
  * Re-uploading an image file that had been modified by imagick did not replace the source file. Fixed.
14
  * New setting: Table IX-B15.0: Use audiostub. You can now switch off the use of an audio stub image.
15
  * New settings: Table IX-M20 and 21. You can now set the sitename and the from email address to be used in emails sent by wppa.
16
+ * Overruling the diaplayability of name, description, rating and comments on album basis did not work on thumbnail popups. Fixed.
17
+ * If the php version does not support ttf fonts, the use of textual watermarks will be disabled and no longer crash the settings page.
18
 
19
  = 7.7.02 =
20
 
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.7.03.005
7
  *
8
  */
9
 
@@ -482,6 +482,11 @@ global $wppa_supported_camara_brands;
482
  wppa_ok_message($mes);
483
  }
484
  }
 
 
 
 
 
485
  ?>
486
  <!--<br /><a href="javascript:window.print();"><?php //_e('Print settings') ?></a><br />-->
487
  <a style="cursor:pointer;" id="wppa-legon" onclick="jQuery('#wppa-legenda').css('display', ''); jQuery('#wppa-legon').css('display', 'none'); return false;" ><?php _e('Show legenda', 'wp-photo-album-plus') ?></a>
@@ -10670,104 +10675,106 @@ global $wppa_supported_camara_brands;
10670
  $tags = 'water';
10671
  wppa_setting($slug, '7', $name, $desc, $html, $help, $clas, $tags);
10672
 
10673
- $name = __('Textual watermark font', 'wp-photo-album-plus');
10674
- $desc = __('The font to use with textual watermarks.', 'wp-photo-album-plus');
10675
- $help = (__('Except for the system font, are font files of type ttf and reside in', 'wp-photo-album-plus') . ' ' . WPPA_UPLOAD_URL . '/fonts/');
10676
- $slug = 'wppa_textual_watermark_font';
10677
- $fopts = array( 'System' );
10678
- $fvals = array( 'system' );
10679
- $style = wppa_opt( 'textual_watermark_type' );
10680
- $fonts = wppa_glob( WPPA_UPLOAD_PATH . '/fonts/*.ttf' );
10681
- sort($fonts);
10682
- foreach ( $fonts as $font ) {
10683
- $f = basename($font);
10684
- $f = preg_replace('/\.[^.]*$/', '', $f);
10685
- $F = strtoupper(substr($f,0,1)).substr($f,1);
10686
- $fopts[] = $F;
10687
- $fvals[] = $f;
10688
- }
10689
- $onchange = 'wppaCheckFontPreview()';
10690
- $html = wppa_select($slug, $fopts, $fvals, $onchange);
10691
- $preview = '<img style="background-color:#777;" id="wm-font-preview" src="" />';
10692
- $clas = 'wppa_watermark';
10693
- $tags = 'water';
10694
- wppa_setting($slug, '8', $name, $desc, $html.' '.$preview, $help, $clas);
10695
-
10696
- foreach ( array_keys( $sopts ) as $skey ) {
10697
- foreach ( array_keys( $fopts ) as $fkey ) {
10698
- wppa_create_textual_watermark_file( array( 'font' => $fvals[$fkey], 'text' => $sopts[$skey], 'style' => $svals[$skey], 'filebasename' => $svals[$skey].'-'.$fvals[$fkey] ) );
10699
- wppa_create_textual_watermark_file( array( 'font' => $fvals[$fkey], 'text' => $fopts[$fkey], 'style' => $svals[$skey], 'filebasename' => $fvals[$fkey].'-'.$svals[$skey] ) );
 
 
10700
  }
10701
- }
10702
-
10703
- $name = __('Textual watermark font size', 'wp-photo-album-plus');
10704
- $desc = __('You can set the size of the truetype fonts only.', 'wp-photo-album-plus');
10705
- $help = (__('System font can have size 1,2,3,4 or 5, in some stoneage fontsize units. Any value > 5 will be treated as 5.', 'wp-photo-album-plus'));
10706
- $help .= '<br />'.(__('Truetype fonts can have any positive integer size, if your PHPs GD version is 1, in pixels, in GD2 in points.', 'wp-photo-album-plus'));
10707
- $help .= '<br />'.(__('It is unclear how many pixels a point is...', 'wp-photo-album-plus'));
10708
- $slug = 'wppa_textual_watermark_size';
10709
- $html = wppa_input($slug, '50px', '', 'points');
10710
- $clas = 'wppa_watermark';
10711
- $tags = 'water';
10712
- wppa_setting($slug, '8.1', $name, $desc, $html, $help, $clas, $tags);
10713
-
10714
- $name = __('Foreground color', 'wp-photo-album-plus');
10715
- $desc = __('Textual watermark foreground color (black).', 'wp-photo-album-plus');
10716
- $help = '';
10717
- $slug = 'wppa_watermark_fgcol_text';
10718
- $onch = 'wppaRefreshAfter();';
10719
- $html = wppa_input_color($slug, '100px;', '', '', $onch );
10720
- $clas = 'wppa_watermark';
10721
- $tags = 'water';
10722
- wppa_setting($slug, '8.2', $name, $desc, $html, $help, $clas, $tags);
10723
-
10724
- $name = __('Background color', 'wp-photo-album-plus');
10725
- $desc = __('Textual watermark background color (white).', 'wp-photo-album-plus');
10726
- $help = '';
10727
- $slug = 'wppa_watermark_bgcol_text';
10728
- $onch = 'wppaRefreshAfter();';
10729
- $html = wppa_input_color($slug, '100px;', '', '', $onch );
10730
- $clas = 'wppa_watermark';
10731
- $tags = 'water';
10732
- wppa_setting($slug, '8.3', $name, $desc, $html, $help, $clas, $tags);
10733
-
10734
- $name = __('Upload watermark font', 'wp-photo-album-plus');
10735
- $desc = __('Upload a new watermark font file', 'wp-photo-album-plus');
10736
- $help = (__('Upload truetype fonts (.ttf) only, and test if they work on your server platform.', 'wp-photo-album-plus'));
10737
- $slug = 'wppa_watermark_font_upload';
10738
- $html = '<input id="my_file_element" type="file" name="file_2" style="float:left; font-size: 11px;" />';
10739
- $html .= wppa_doit_button(__('Upload TrueType font', 'wp-photo-album-plus'), $slug, '', '31', '16');
10740
- $clas = 'wppa_watermark';
10741
- $tags = 'water,upload';
10742
- wppa_setting(false, '9', $name, $desc, $html, $help, $clas, $tags);
10743
-
10744
- $name = __('Watermark opacity text', 'wp-photo-album-plus');
10745
- $desc = __('You can set the intensity of a text watermarks here.', 'wp-photo-album-plus');
10746
- $help = (__('The higher the number, the intenser the watermark. Value must be > 0 and <= 100.', 'wp-photo-album-plus'));
10747
- $slug = 'wppa_watermark_opacity_text';
10748
- $html = wppa_input($slug, '50px', '', '%');
10749
- $clas = 'wppa_watermark';
10750
- $tags = 'water';
10751
- wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
10752
 
10753
- $name = __('Preview', 'wp-photo-album-plus');
10754
- $desc = __('A preview. Keywords in descriptions or predefined text are not translated.', 'wp-photo-album-plus');
10755
- $help = __('To see the changes: refresh the page', 'wp-photo-album-plus');
10756
- $slug = 'wppa_watermark_preview';
10757
- $tr = floor( 127 * ( 100 - wppa_opt( 'watermark_opacity_text' ) ) / 100 );
10758
- $args = array( 'id' => '0', 'url' => true, 'width' => '1000', 'height' => '400', 'transp' => $tr );
10759
- $html = '
10760
- <div
10761
- style="text-align:center; max-width:400px; overflow:hidden; background-image:url('.WPPA_UPLOAD_URL.'/fonts/turkije.jpg);"
10762
- >
10763
- <img
10764
- src="'.wppa_create_textual_watermark_file( $args ).'?ver='.rand(0, 4711).'"
10765
- />
10766
- </div>
10767
- <div style="clear:both;"></div>';
10768
- $clas = 'wppa_watermark';
10769
- $tags = 'water';
10770
- wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10771
 
10772
  $name = __('Watermark thumbnails', 'wp-photo-album-plus');
10773
  $desc = __('Watermark also the thumbnail image files.', 'wp-photo-album-plus');
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.7.03.006
7
  *
8
  */
9
 
482
  wppa_ok_message($mes);
483
  }
484
  }
485
+
486
+ // Check for ttf support
487
+ if ( ! function_exists( 'imagettfbbox' ) ) {
488
+ wppa_error_message( __('Your PHP version does not support TrueType fonts. This means that you can not apply textual watermarks', 'wp-photo-album-plus' ) );
489
+ }
490
  ?>
491
  <!--<br /><a href="javascript:window.print();"><?php //_e('Print settings') ?></a><br />-->
492
  <a style="cursor:pointer;" id="wppa-legon" onclick="jQuery('#wppa-legenda').css('display', ''); jQuery('#wppa-legon').css('display', 'none'); return false;" ><?php _e('Show legenda', 'wp-photo-album-plus') ?></a>
10675
  $tags = 'water';
10676
  wppa_setting($slug, '7', $name, $desc, $html, $help, $clas, $tags);
10677
 
10678
+ if ( function_exists( 'imagettfbbox' ) ) {
10679
+ $name = __('Textual watermark font', 'wp-photo-album-plus');
10680
+ $desc = __('The font to use with textual watermarks.', 'wp-photo-album-plus');
10681
+ $help = (__('Except for the system font, are font files of type ttf and reside in', 'wp-photo-album-plus') . ' ' . WPPA_UPLOAD_URL . '/fonts/');
10682
+ $slug = 'wppa_textual_watermark_font';
10683
+ $fopts = array( 'System' );
10684
+ $fvals = array( 'system' );
10685
+ $style = wppa_opt( 'textual_watermark_type' );
10686
+ $fonts = wppa_glob( WPPA_UPLOAD_PATH . '/fonts/*.ttf' );
10687
+ sort($fonts);
10688
+ foreach ( $fonts as $font ) {
10689
+ $f = basename($font);
10690
+ $f = preg_replace('/\.[^.]*$/', '', $f);
10691
+ $F = strtoupper(substr($f,0,1)).substr($f,1);
10692
+ $fopts[] = $F;
10693
+ $fvals[] = $f;
10694
+ }
10695
+ $onchange = 'wppaCheckFontPreview()';
10696
+ $html = wppa_select($slug, $fopts, $fvals, $onchange);
10697
+ $preview = '<img style="background-color:#777;" id="wm-font-preview" src="" />';
10698
+ $clas = 'wppa_watermark';
10699
+ $tags = 'water';
10700
+ wppa_setting($slug, '8', $name, $desc, $html.' '.$preview, $help, $clas);
10701
+
10702
+ foreach ( array_keys( $sopts ) as $skey ) {
10703
+ foreach ( array_keys( $fopts ) as $fkey ) {
10704
+ wppa_create_textual_watermark_file( array( 'font' => $fvals[$fkey], 'text' => $sopts[$skey], 'style' => $svals[$skey], 'filebasename' => $svals[$skey].'-'.$fvals[$fkey] ) );
10705
+ wppa_create_textual_watermark_file( array( 'font' => $fvals[$fkey], 'text' => $fopts[$fkey], 'style' => $svals[$skey], 'filebasename' => $fvals[$fkey].'-'.$svals[$skey] ) );
10706
+ }
10707
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10708
 
10709
+ $name = __('Textual watermark font size', 'wp-photo-album-plus');
10710
+ $desc = __('You can set the size of the truetype fonts only.', 'wp-photo-album-plus');
10711
+ $help = (__('System font can have size 1,2,3,4 or 5, in some stoneage fontsize units. Any value > 5 will be treated as 5.', 'wp-photo-album-plus'));
10712
+ $help .= '<br />'.(__('Truetype fonts can have any positive integer size, if your PHPs GD version is 1, in pixels, in GD2 in points.', 'wp-photo-album-plus'));
10713
+ $help .= '<br />'.(__('It is unclear how many pixels a point is...', 'wp-photo-album-plus'));
10714
+ $slug = 'wppa_textual_watermark_size';
10715
+ $html = wppa_input($slug, '50px', '', 'points');
10716
+ $clas = 'wppa_watermark';
10717
+ $tags = 'water';
10718
+ wppa_setting($slug, '8.1', $name, $desc, $html, $help, $clas, $tags);
10719
+
10720
+ $name = __('Foreground color', 'wp-photo-album-plus');
10721
+ $desc = __('Textual watermark foreground color (black).', 'wp-photo-album-plus');
10722
+ $help = '';
10723
+ $slug = 'wppa_watermark_fgcol_text';
10724
+ $onch = 'wppaRefreshAfter();';
10725
+ $html = wppa_input_color($slug, '100px;', '', '', $onch );
10726
+ $clas = 'wppa_watermark';
10727
+ $tags = 'water';
10728
+ wppa_setting($slug, '8.2', $name, $desc, $html, $help, $clas, $tags);
10729
+
10730
+ $name = __('Background color', 'wp-photo-album-plus');
10731
+ $desc = __('Textual watermark background color (white).', 'wp-photo-album-plus');
10732
+ $help = '';
10733
+ $slug = 'wppa_watermark_bgcol_text';
10734
+ $onch = 'wppaRefreshAfter();';
10735
+ $html = wppa_input_color($slug, '100px;', '', '', $onch );
10736
+ $clas = 'wppa_watermark';
10737
+ $tags = 'water';
10738
+ wppa_setting($slug, '8.3', $name, $desc, $html, $help, $clas, $tags);
10739
+
10740
+ $name = __('Upload watermark font', 'wp-photo-album-plus');
10741
+ $desc = __('Upload a new watermark font file', 'wp-photo-album-plus');
10742
+ $help = (__('Upload truetype fonts (.ttf) only, and test if they work on your server platform.', 'wp-photo-album-plus'));
10743
+ $slug = 'wppa_watermark_font_upload';
10744
+ $html = '<input id="my_file_element" type="file" name="file_2" style="float:left; font-size: 11px;" />';
10745
+ $html .= wppa_doit_button(__('Upload TrueType font', 'wp-photo-album-plus'), $slug, '', '31', '16');
10746
+ $clas = 'wppa_watermark';
10747
+ $tags = 'water,upload';
10748
+ wppa_setting(false, '9', $name, $desc, $html, $help, $clas, $tags);
10749
+
10750
+ $name = __('Watermark opacity text', 'wp-photo-album-plus');
10751
+ $desc = __('You can set the intensity of a text watermarks here.', 'wp-photo-album-plus');
10752
+ $help = (__('The higher the number, the intenser the watermark. Value must be > 0 and <= 100.', 'wp-photo-album-plus'));
10753
+ $slug = 'wppa_watermark_opacity_text';
10754
+ $html = wppa_input($slug, '50px', '', '%');
10755
+ $clas = 'wppa_watermark';
10756
+ $tags = 'water';
10757
+ wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
10758
+
10759
+ $name = __('Preview', 'wp-photo-album-plus');
10760
+ $desc = __('A preview. Keywords in descriptions or predefined text are not translated.', 'wp-photo-album-plus');
10761
+ $help = __('To see the changes: refresh the page', 'wp-photo-album-plus');
10762
+ $slug = 'wppa_watermark_preview';
10763
+ $tr = floor( 127 * ( 100 - wppa_opt( 'watermark_opacity_text' ) ) / 100 );
10764
+ $args = array( 'id' => '0', 'url' => true, 'width' => '1000', 'height' => '400', 'transp' => $tr );
10765
+ $html = '
10766
+ <div
10767
+ style="text-align:center; max-width:400px; overflow:hidden; background-image:url('.WPPA_UPLOAD_URL.'/fonts/turkije.jpg);"
10768
+ >
10769
+ <img
10770
+ src="'.wppa_create_textual_watermark_file( $args ).'?ver='.rand(0, 4711).'"
10771
+ />
10772
+ </div>
10773
+ <div style="clear:both;"></div>';
10774
+ $clas = 'wppa_watermark';
10775
+ $tags = 'water';
10776
+ wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
10777
+ }
10778
 
10779
  $name = __('Watermark thumbnails', 'wp-photo-album-plus');
10780
  $desc = __('Watermark also the thumbnail image files.', 'wp-photo-album-plus');
wppa-watermark.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
- * Version 7.3.00
6
  *
7
  */
8
 
@@ -10,6 +10,11 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
10
 
11
  function wppa_create_textual_watermark_file( $args ) {
12
 
 
 
 
 
 
13
  // See what we have
14
  $args = wp_parse_args( ( array ) $args, array( 'content' => '---preview---',
15
  'pos' => 'cencen',
@@ -664,14 +669,16 @@ function wppa_watermark_file_select( $key, $album = '0' ) {
664
  }
665
 
666
  // Text based watermarks
667
- $sel = $select == '---name---' ? 'selected="selected"' : '';
668
- $result .= '<option value="---name---" '.$sel.' >'.__( '--- text: name ---' , 'wp-photo-album-plus' ).'</option>';
669
- $sel = $select == '---filename---' ? 'selected="selected"' : '';
670
- $result .= '<option value="---filename---" '.$sel.' >'.__( '--- text: filename ---' , 'wp-photo-album-plus' ).'</option>';
671
- $sel = $select == '---description---' ? 'selected="selected"' : '';
672
- $result .= '<option value="---description---" '.$sel.' >'.__( '--- text: description ---' , 'wp-photo-album-plus' ).'</option>';
673
- $sel = $select == '---predef---' ? 'selected="selected"' : '';
674
- $result .= '<option value="---predef---" '.$sel.' >'.__( '--- text: pre-defined ---' , 'wp-photo-album-plus' ).'</option>';
 
 
675
 
676
  return $result;
677
  }
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
+ * Version 7.7.03.006
6
  *
7
  */
8
 
10
 
11
  function wppa_create_textual_watermark_file( $args ) {
12
 
13
+ if ( ! function_exists( 'imagettfbbox' ) ) {
14
+ wppa_log('err', 'Textual watermarks not supported by this php version');
15
+ return false;
16
+ }
17
+
18
  // See what we have
19
  $args = wp_parse_args( ( array ) $args, array( 'content' => '---preview---',
20
  'pos' => 'cencen',
669
  }
670
 
671
  // Text based watermarks
672
+ if ( function_exists( 'imagettfbbox' ) ) {
673
+ $sel = $select == '---name---' ? 'selected="selected"' : '';
674
+ $result .= '<option value="---name---" '.$sel.' >'.__( '--- text: name ---' , 'wp-photo-album-plus' ).'</option>';
675
+ $sel = $select == '---filename---' ? 'selected="selected"' : '';
676
+ $result .= '<option value="---filename---" '.$sel.' >'.__( '--- text: filename ---' , 'wp-photo-album-plus' ).'</option>';
677
+ $sel = $select == '---description---' ? 'selected="selected"' : '';
678
+ $result .= '<option value="---description---" '.$sel.' >'.__( '--- text: description ---' , 'wp-photo-album-plus' ).'</option>';
679
+ $sel = $select == '---predef---' ? 'selected="selected"' : '';
680
+ $result .= '<option value="---predef---" '.$sel.' >'.__( '--- text: pre-defined ---' , 'wp-photo-album-plus' ).'</option>';
681
+ }
682
 
683
  return $result;
684
  }
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.7.03.005
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_api_version;
27
- $wppa_api_version = '7.7.03.005'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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.7.03.006
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_api_version;
27
+ $wppa_api_version = '7.7.03.006'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30