WP Photo Album Plus - Version 7.3.12.003

Version Description

= 7.3.11 =

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

Release Info

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

Code changes from version 7.3.12.001 to 7.3.12.003

changelog.txt CHANGED
@@ -4,6 +4,11 @@ WP Photo Album Plus Changelog
4
 
5
  * The cursor on album cover images where cover type is imagefactory(-mcr) and the link is lightbox,
6
  does not change from wait to magnifier when the initialisation of lightbox is complete. Fixed.
 
 
 
 
 
7
 
8
  = 7.3.11 =
9
 
4
 
5
  * The cursor on album cover images where cover type is imagefactory(-mcr) and the link is lightbox,
6
  does not change from wait to magnifier when the initialisation of lightbox is complete. Fixed.
7
+ * Changes to the cover image selection method: Added 'according to photo sequence'
8
+ to the album cover image selection on the album admin and on the settings page;
9
+ Added '--- default --- See Table IV-D2' to the cover image selection box on the album admin page.
10
+ These changes make it simpler to change the selection method for all -default- albums at once,
11
+ provided that the settings on the album admin pages are set to the default, previously being random.
12
 
13
  = 7.3.11 =
14
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
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.3.12.001
6
  Stable tag: 7.3.11.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
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.3.12.003
6
  Stable tag: 7.3.11.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 7.3.08
7
  *
8
  */
9
 
@@ -1616,7 +1616,7 @@ global $wpdb;
1616
  <thead>
1617
  <tr>
1618
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
1619
- <td style="min-width: 50px;" >
1620
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
1621
  <?php _e('ID(nl)', 'wp-photo-album-plus');
1622
  if ($order == 'id') {
@@ -2074,7 +2074,7 @@ global $wpdb;
2074
  <img src="<?php echo wppa_get_imgdir().'arrow.gif' ?>" style="height:16px;" title="<?php _e('Expand subalbums', 'wp-photo-album-plus') ?>" />
2075
  </td>
2076
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
2077
- <td colspan="6" style="min-width: 50px;" >
2078
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
2079
  <?php _e('ID(nl)', 'wp-photo-album-plus');
2080
  if ($order == 'id') {
@@ -2723,34 +2723,29 @@ global $wpdb;
2723
  $a_id = strval( intval( $_REQUEST['edit_id'] ) );
2724
  $photos = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->wppa_photos WHERE album = %s " . wppa_get_photo_order( $a_id ) . " LIMIT 1000", $a_id ), ARRAY_A );
2725
 
2726
- $output = '';
2727
- // if ( ! empty($photos) ) {
2728
- $output .= '<select name="wppa-main" onchange="wppaAjaxUpdateAlbum('.$a_id.', \'main_photo\', this)" >';
2729
- // $output .= '<option value="">'.__('--- please select ---').'</option>';
2730
- if ( $covertype == 'imagefactory' || ( $covertype == '' && wppa_opt( 'cover_type') == 'imagefactory' ) ) {
2731
- if ( $cur == '0' ) $selected = 'selected="selected"'; else $selected = '';
2732
- $output .= '<option value="0" '.$selected.'>'.sprintf(__('auto select max %s random', 'wp-photo-album-plus'), wppa_opt( 'imgfact_count')).'</option>';
2733
- if ( $cur == '-1' ) $selected = 'selected="selected"'; else $selected = '';
2734
- $output .= '<option value="-1" '.$selected.'>'.sprintf(__('auto select max %s featured', 'wp-photo-album-plus'), wppa_opt( 'imgfact_count')).'</option>';
2735
- if ( $cur == '-2' ) $selected = 'selected="selected"'; else $selected = '';
2736
- $output .= '<option value="-2" '.$selected.'>'.sprintf(__('max %s most recent added', 'wp-photo-album-plus'), wppa_opt( 'imgfact_count')).'</option>';
2737
- if ( $cur == '-3' ) $selected = 'selected="selected"'; else $selected = '';
2738
- $output .= '<option value="-3" '.$selected.'>'.sprintf(__('max %s from (grand)child albums', 'wp-photo-album-plus'), wppa_opt( 'imgfact_count')).'</option>';
2739
- if ( $cur == '-4' ) $selected = 'selected="selected"'; else $selected = '';
2740
- $output .= '<option value="-4" '.$selected.'>'.sprintf(__('max %s most recent from (grand)child albums', 'wp-photo-album-plus'), wppa_opt( 'imgfact_count')).'</option>';
2741
- }
2742
- else {
2743
- if ( $cur == '0' ) $selected = 'selected="selected"'; else $selected = '';
2744
- $output .= '<option value="0" '.$selected.'>'.__('--- random ---', 'wp-photo-album-plus').'</option>';
2745
- if ( $cur == '-1' ) $selected = 'selected="selected"'; else $selected = '';
2746
- $output .= '<option value="-1" '.$selected.'>'.__('--- random featured ---', 'wp-photo-album-plus').'</option>';
2747
- if ( $cur == '-2' ) $selected = 'selected="selected"'; else $selected = '';
2748
- $output .= '<option value="-2" '.$selected.'>'.__('--- most recent added ---', 'wp-photo-album-plus').'</option>';
2749
- if ( $cur == '-3' ) $selected = 'selected="selected"'; else $selected = '';
2750
- $output .= '<option value="-3" '.$selected.'>'.__('--- random from (grand)children ---', 'wp-photo-album-plus').'</option>';
2751
- if ( $cur == '-4' ) $selected = 'selected="selected"'; else $selected = '';
2752
- $output .= '<option value="-4" '.$selected.'>'.__('--- most recent from (grand)children ---', 'wp-photo-album-plus').'</option>';
2753
- }
2754
 
2755
  if ( ! empty($photos) ) foreach($photos as $photo) {
2756
  if ($cur == $photo['id']) {
@@ -2765,10 +2760,9 @@ global $wpdb;
2765
  $output .= '<option value="'.$photo['id'].'" '.$selected.'>'.$name.'</option>';
2766
  }
2767
 
2768
- $output .= '</select>';
2769
- // } else {
2770
- // $output = '<p>'.__('No photos yet').'</p>';
2771
- // }
2772
  return $output;
2773
  }
2774
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.3.12
7
  *
8
  */
9
 
1616
  <thead>
1617
  <tr>
1618
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
1619
+ <td style="min-width: 50px;" title="<?php esc_attr( _e( 'The album id (the nesting level)', 'wp-photo-album-plus' ) ) ?>" >
1620
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
1621
  <?php _e('ID(nl)', 'wp-photo-album-plus');
1622
  if ($order == 'id') {
2074
  <img src="<?php echo wppa_get_imgdir().'arrow.gif' ?>" style="height:16px;" title="<?php _e('Expand subalbums', 'wp-photo-album-plus') ?>" />
2075
  </td>
2076
  <?php $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by='; ?>
2077
+ <td colspan="6" style="min-width: 50px;" title="<?php esc_attr( _e( 'The album id (the nesting level)', 'wp-photo-album-plus' ) ) ?>" >
2078
  <a href="<?php echo wppa_dbg_url($url.'id') ?>">
2079
  <?php _e('ID(nl)', 'wp-photo-album-plus');
2080
  if ($order == 'id') {
2723
  $a_id = strval( intval( $_REQUEST['edit_id'] ) );
2724
  $photos = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->wppa_photos WHERE album = %s " . wppa_get_photo_order( $a_id ) . " LIMIT 1000", $a_id ), ARRAY_A );
2725
 
2726
+ $output = '
2727
+ <select name="wppa-main" onchange="wppaAjaxUpdateAlbum('.$a_id.', \'main_photo\', this)" >
2728
+ <option value="0" ' . ( $cur == '0' ? 'selected="selected"' : '' ) . '>' .
2729
+ __( '--- default --- See Table IV-D2', 'wp-photo-album-plus' ) . '
2730
+ </option>
2731
+ <option value="-9" ' . ( $cur == '-9' ? 'selected="selected"' : '' ) . '>' .
2732
+ __( '--- random ---', 'wp-photo-album-plus' ) . '
2733
+ </option>
2734
+ <option value="-1" ' . ( $cur == '-1' ? 'selected="selected"' : '' ) . '>' .
2735
+ __( '--- random featured ---', 'wp-photo-album-plus' ) . '
2736
+ </option>
2737
+ <option value="-2" ' . ( $cur == '-2' ? 'selected="selected"' : '' ) . '>' .
2738
+ __( '--- most recent added ---', 'wp-photo-album-plus' ) . '
2739
+ </option>
2740
+ <option value="-3" ' . ( $cur == '-3' ? 'selected="selected"' : '' ) . '>' .
2741
+ __( '--- random from (grand)children ---', 'wp-photo-album-plus' ) . '
2742
+ </option>
2743
+ <option value="-4" ' . ( $cur == '-4' ? 'selected="selected"' : '' ) . '>' .
2744
+ __( '--- most recent from (grand)children ---', 'wp-photo-album-plus' ) . '
2745
+ </option>
2746
+ <option value="-5" ' . ( $cur == '-5' ? 'selected="selected"' : '' ) . '>' .
2747
+ __( '--- according to albums photo sequence ---', 'wp-photo-album-plus' ) . '
2748
+ </option>';
 
 
 
 
 
2749
 
2750
  if ( ! empty($photos) ) foreach($photos as $photo) {
2751
  if ($cur == $photo['id']) {
2760
  $output .= '<option value="'.$photo['id'].'" '.$selected.'>'.$name.'</option>';
2761
  }
2762
 
2763
+ $output .= '
2764
+ </select>';
2765
+
 
2766
  return $output;
2767
  }
2768
 
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 7.3.012.001
7
  *
8
  */
9
 
@@ -1459,8 +1459,11 @@ static $cached_cover_photo_ids;
1459
  }
1460
  }
1461
 
1462
- // main_photo is 0? Random
1463
- if ( '0' == $id ) {
 
 
 
1464
  $rs = wppa_get_randseed( 'page' );
1465
  if ( current_user_can( 'wppa_moderate' ) ) {
1466
  $temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
@@ -1522,6 +1525,23 @@ static $cached_cover_photo_ids;
1522
  "ORDER BY timestamp DESC LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1523
  }
1524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1525
  // Add to 2nd level cache
1526
  wppa_cache_photo( 'add', $temp );
1527
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 7.3.012
7
  *
8
  */
9
 
1459
  }
1460
  }
1461
 
1462
+ // main_photo is 0? Default
1463
+ $id = wppa_opt( 'main_photo' );
1464
+
1465
+ // main_photo is -9: Random
1466
+ if ( '-9' == $id ) {
1467
  $rs = wppa_get_randseed( 'page' );
1468
  if ( current_user_can( 'wppa_moderate' ) ) {
1469
  $temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1525
  "ORDER BY timestamp DESC LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1526
  }
1527
 
1528
+ // Imagefactory multiple like album photo order
1529
+ if ( '-5' == $id ) {
1530
+ if ( current_user_can( 'wppa_moderate' ) ) {
1531
+ $temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1532
+ WHERE album = %s " .
1533
+ wppa_get_photo_order( $alb ) . "
1534
+ LIMIT %d", $alb, $count ), ARRAY_A );
1535
+ }
1536
+ else {
1537
+ $temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1538
+ WHERE album = %s
1539
+ AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1540
+ wppa_get_photo_order( $alb ) . "
1541
+ LIMIT %d", $alb, wppa_get_user(), $count ), ARRAY_A );
1542
+ }
1543
+ }
1544
+
1545
  // Add to 2nd level cache
1546
  wppa_cache_photo( 'add', $temp );
1547
 
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.3.11
7
  *
8
  */
9
 
@@ -586,7 +586,7 @@ horizrailenabled:false,";
586
 
587
  // D Albums and covers
588
  'wppa_list_albums_by' => '0',
589
- 'wppa_main_photo' => '0',
590
  'wppa_coverphoto_pos' => 'right',
591
  'wppa_use_cover_opacity' => 'yes',
592
  'wppa_cover_opacity' => '85',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 7.3.12
7
  *
8
  */
9
 
586
 
587
  // D Albums and covers
588
  'wppa_list_albums_by' => '0',
589
+ 'wppa_main_photo' => '-9',
590
  'wppa_coverphoto_pos' => 'right',
591
  'wppa_use_cover_opacity' => 'yes',
592
  'wppa_cover_opacity' => '85',
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.3.11
7
  *
8
  */
9
 
@@ -4866,9 +4866,16 @@ global $wppa_supported_camara_brands;
4866
 
4867
  $name = __('Default coverphoto selection', 'wp-photo-album-plus');
4868
  $desc = __('Default select cover photo method.', 'wp-photo-album-plus');
4869
- $help = (__('This is the initial value on album creation only. It can be overruled on the edit album page.', 'wp-photo-album-plus'));
4870
- $opts = array(__('Random from album', 'wp-photo-album-plus'), __('Random featured from album', 'wp-photo-album-plus'), __('Most recently added to album', 'wp-photo-album-plus'), __('Random from album or any sub album', 'wp-photo-album-plus') );
4871
- $vals = array('0', '-1', '-2', '-3');
 
 
 
 
 
 
 
4872
  $slug = 'wppa_main_photo';
4873
  $html = wppa_select($slug, $opts, $vals);
4874
  $clas = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.3.12
7
  *
8
  */
9
 
4866
 
4867
  $name = __('Default coverphoto selection', 'wp-photo-album-plus');
4868
  $desc = __('Default select cover photo method.', 'wp-photo-album-plus');
4869
+ $help = __('The coverphoto slection method can be overruled on the edit album page.', 'wp-photo-album-plus');
4870
+ $help .= '<br />' . __('Alternatively an individual photo can be selected on the edit album page.', 'wp-photo-album-plus');
4871
+ $opts = array( __('--- random ---', 'wp-photo-album-plus'),
4872
+ __('--- random featured ---', 'wp-photo-album-plus'),
4873
+ __('--- most recent added ---', 'wp-photo-album-plus'),
4874
+ __('--- random from (grand)children ---', 'wp-photo-album-plus'),
4875
+ __('--- most recent from (grand)children ---', 'wp-photo-album-plus'),
4876
+ __('--- according to albums photo sequence ---', 'wp-photo-album-plus'),
4877
+ );
4878
+ $vals = array('-9', '-1', '-2', '-3', '-4', '-5');
4879
  $slug = 'wppa_main_photo';
4880
  $html = wppa_select($slug, $opts, $vals);
4881
  $clas = '';
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.3.08
7
  *
8
  */
9
 
@@ -440,7 +440,7 @@ global $wpdb;
440
  'name' => __( 'New Album', 'wp-photo-album-plus' ),
441
  'description' => '',
442
  'a_order' => '0',
443
- 'main_photo' => wppa_opt( 'main_photo' ),
444
  'a_parent' => wppa_opt( 'default_parent' ),
445
  'p_order_by' => '0',
446
  'cover_linktype' => wppa_opt( 'default_album_linktype' ),
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 7.3.12
7
  *
8
  */
9
 
440
  'name' => __( 'New Album', 'wp-photo-album-plus' ),
441
  'description' => '',
442
  'a_order' => '0',
443
+ 'main_photo' => '0',
444
  'a_parent' => wppa_opt( 'default_parent' ),
445
  'p_order_by' => '0',
446
  'cover_linktype' => wppa_opt( 'default_album_linktype' ),
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.3.12.001
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 = '7311'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.12.001'; // 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.3.12.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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7311'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.12.003'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';