WP Photo Album Plus - Version 7.3.12.008

Version Description

= 7.3.12 =

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

Code changes from version 7.3.12.007 to 7.3.12.008

Files changed (5) hide show
  1. changelog.txt +1 -1
  2. readme.txt +2 -2
  3. wppa-album-covers.php +14 -1
  4. wppa-lasten-widget.php +30 -5
  5. wppa.php +2 -2
changelog.txt CHANGED
@@ -11,7 +11,7 @@ These changes make it simpler to change the selection method for all -default- a
11
provided that the settings on the album admin pages are set to the default, previously being random.
12
* The album and parent attributes in the wppa shortcodes with type="acount" and type="pcount" can now also be an album enumeration.
13
* Added class wppa-thumbarea-albdesc for album description on thmbnail area.
14
- * If there is no posterfile for a pdf, there will mow be a dummy image as thumbnail, derived from ../uploads/wppa/documentstub.png.
15
* When the status of a photo is private, it will no longer show up in the topten widget for users not being logged in.
16
In this case one should not cache the widget.
17
* If Table IX-D19 and IX-D20 are both unticked, there will now also be no check for utf-8 encoding on filenames during upload/import.
11
provided that the settings on the album admin pages are set to the default, previously being random.
12
* The album and parent attributes in the wppa shortcodes with type="acount" and type="pcount" can now also be an album enumeration.
13
* Added class wppa-thumbarea-albdesc for album description on thmbnail area.
14
+ * If there is no posterfile for a pdf, there will now be a dummy image as thumbnail, derived from ../uploads/wppa/documentstub.png.
15
* When the status of a photo is private, it will no longer show up in the topten widget for users not being logged in.
16
In this case one should not cache the widget.
17
* If Table IX-D19 and IX-D20 are both unticked, there will now also be no check for utf-8 encoding on filenames during upload/import.
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.007
6
Stable tag: 7.3.12.007
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
@@ -137,7 +137,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
138
== Upgrade Notice ==
139
140
- = 7.3.11 =
141
142
* This version addresses various bug fixes and feature requests.
143
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.008
6
Stable tag: 7.3.12.007
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
137
138
== Upgrade Notice ==
139
140
+ = 7.3.12 =
141
142
* This version addresses various bug fixes and feature requests.
143
wppa-album-covers.php CHANGED
@@ -1460,7 +1460,12 @@ static $cached_cover_photo_ids;
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 ) {
@@ -1468,12 +1473,14 @@ static $cached_cover_photo_ids;
1468
if ( current_user_can( 'wppa_moderate' ) ) {
1469
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1470
WHERE album = %s
1471
ORDER BY RAND(%d)
1472
LIMIT %d", $alb, $rs, $count ), ARRAY_A );
1473
}
1474
else {
1475
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1476
WHERE album = %s
1477
AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s )
1478
ORDER BY RAND(%d)
1479
LIMIT %d", $alb, $rs, wppa_get_user(), $count ), ARRAY_A );
@@ -1485,12 +1492,14 @@ static $cached_cover_photo_ids;
1485
if ( current_user_can( 'wppa_moderate' ) ) {
1486
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1487
WHERE album = %s
1488
ORDER BY timestamp DESC
1489
LIMIT %d", $alb, $count ), ARRAY_A );
1490
}
1491
else {
1492
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1493
WHERE album = %s
1494
AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s )
1495
ORDER BY timestamp DESC
1496
LIMIT %d", $alb, wppa_get_user(), $count ), ARRAY_A );
@@ -1511,6 +1520,7 @@ static $cached_cover_photo_ids;
1511
$temp = $wpdb->get_results( $wpdb->prepare(
1512
"SELECT * FROM $wpdb->wppa_photos " .
1513
"WHERE album IN ( " . str_replace( '.', ',', $allalb ) . " ) " .
1514
"AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1515
"ORDER BY RAND( " . wppa_get_randseed( 'page' ) . " ) LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1516
}
@@ -1521,6 +1531,7 @@ static $cached_cover_photo_ids;
1521
$temp = $wpdb->get_results( $wpdb->prepare(
1522
"SELECT * FROM $wpdb->wppa_photos " .
1523
"WHERE album IN ( " . str_replace( '.', ',', $allalb ) . " ) " .
1524
"AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1525
"ORDER BY timestamp DESC LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1526
}
@@ -1530,12 +1541,14 @@ static $cached_cover_photo_ids;
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 );
1460
}
1461
1462
// main_photo is 0? Default
1463
+ if ( '0' == $id ) {
1464
+ $id = wppa_opt( 'main_photo' );
1465
+ }
1466
+
1467
+ // Make the private clause
1468
+ $non_private = is_user_logged_in() ? "" : "AND status <> 'private' ";
1469
1470
// main_photo is -9: Random
1471
if ( '-9' == $id ) {
1473
if ( current_user_can( 'wppa_moderate' ) ) {
1474
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1475
WHERE album = %s
1476
+ $non_private
1477
ORDER BY RAND(%d)
1478
LIMIT %d", $alb, $rs, $count ), ARRAY_A );
1479
}
1480
else {
1481
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1482
WHERE album = %s
1483
+ $non_private
1484
AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s )
1485
ORDER BY RAND(%d)
1486
LIMIT %d", $alb, $rs, wppa_get_user(), $count ), ARRAY_A );
1492
if ( current_user_can( 'wppa_moderate' ) ) {
1493
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1494
WHERE album = %s
1495
+ $non_private
1496
ORDER BY timestamp DESC
1497
LIMIT %d", $alb, $count ), ARRAY_A );
1498
}
1499
else {
1500
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1501
WHERE album = %s
1502
+ $non_private
1503
AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s )
1504
ORDER BY timestamp DESC
1505
LIMIT %d", $alb, wppa_get_user(), $count ), ARRAY_A );
1520
$temp = $wpdb->get_results( $wpdb->prepare(
1521
"SELECT * FROM $wpdb->wppa_photos " .
1522
"WHERE album IN ( " . str_replace( '.', ',', $allalb ) . " ) " .
1523
+ $non_private .
1524
"AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1525
"ORDER BY RAND( " . wppa_get_randseed( 'page' ) . " ) LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1526
}
1531
$temp = $wpdb->get_results( $wpdb->prepare(
1532
"SELECT * FROM $wpdb->wppa_photos " .
1533
"WHERE album IN ( " . str_replace( '.', ',', $allalb ) . " ) " .
1534
+ $non_private .
1535
"AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1536
"ORDER BY timestamp DESC LIMIT %d", wppa_get_user(), $count ), ARRAY_A );
1537
}
1541
if ( current_user_can( 'wppa_moderate' ) ) {
1542
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1543
WHERE album = %s " .
1544
+ $non_private .
1545
wppa_get_photo_order( $alb ) . "
1546
LIMIT %d", $alb, $count ), ARRAY_A );
1547
}
1548
else {
1549
$temp = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
1550
WHERE album = %s
1551
+ $non_private
1552
AND ( ( status <> 'pending' AND status <> 'scheduled' ) OR owner = %s ) " .
1553
wppa_get_photo_order( $alb ) . "
1554
LIMIT %d", $alb, wppa_get_user(), $count ), ARRAY_A );
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* display the last uploaded photos
6
- * Version 7.3.08
7
*/
8
9
class LasTenWidget extends WP_Widget {
@@ -98,22 +98,47 @@ class LasTenWidget extends WP_Widget {
98
// Eiter look at timestamp or at date/time modified
99
$order_by = wppa_switch( 'lasten_use_modified' ) ? 'modified' : 'timestamp';
100
101
// If you want only 'New' photos in the selection, the period must be <> 0;
102
if ( wppa_switch( 'lasten_limit_new' ) && wppa_opt( 'max_photo_newtime' ) ) {
103
$newtime = " " . $order_by . " >= ".( time() - wppa_opt( 'max_photo_newtime' ) );
104
if ( $album ) {
105
- $q = "SELECT * FROM $wpdb->wppa_photos WHERE (".$newtime.") AND album IN ( ".$album." ) AND ( status <> 'pending' AND status <> 'scheduled' ) ORDER BY " . $order_by . " DESC LIMIT " . $max;
106
}
107
else {
108
- $q = "SELECT * FROM $wpdb->wppa_photos WHERE (".$newtime.") AND album > 0 AND status <> 'pending' AND status <> 'scheduled' ORDER BY " . $order_by . " DESC LIMIT " . $max;
109
}
110
}
111
else {
112
if ( $album ) {
113
- $q = "SELECT * FROM $wpdb->wppa_photos WHERE album IN ( ".$album." ) AND ( status <> 'pending' AND status <> 'scheduled' ) ORDER BY " . $order_by . " DESC LIMIT " . $max;
114
}
115
else {
116
- $q = "SELECT * FROM $wpdb->wppa_photos WHERE album > 0 AND status <> 'pending' AND status <> 'scheduled' ORDER BY " . $order_by . " DESC LIMIT " . $max;
117
}
118
}
119
3
* Package: wp-photo-album-plus
4
*
5
* display the last uploaded photos
6
+ * Version 7.3.12
7
*/
8
9
class LasTenWidget extends WP_Widget {
98
// Eiter look at timestamp or at date/time modified
99
$order_by = wppa_switch( 'lasten_use_modified' ) ? 'modified' : 'timestamp';
100
101
+ // Non private
102
+ $non_private = is_user_logged_in() ? "" : "AND status <> 'private' ";
103
+
104
// If you want only 'New' photos in the selection, the period must be <> 0;
105
if ( wppa_switch( 'lasten_limit_new' ) && wppa_opt( 'max_photo_newtime' ) ) {
106
$newtime = " " . $order_by . " >= ".( time() - wppa_opt( 'max_photo_newtime' ) );
107
if ( $album ) {
108
+ $q = "SELECT * FROM $wpdb->wppa_photos
109
+ WHERE (".$newtime.")
110
+ AND album IN ( ".$album." )
111
+ AND status <> 'pending'
112
+ AND status <> 'scheduled'
113
+ $non_private
114
+ ORDER BY " . $order_by . " DESC LIMIT " . $max;
115
}
116
else {
117
+ $q = "SELECT * FROM $wpdb->wppa_photos
118
+ WHERE (".$newtime.")
119
+ AND album > 0
120
+ AND status <> 'pending'
121
+ AND status <> 'scheduled'
122
+ $non_private
123
+ ORDER BY " . $order_by . " DESC LIMIT " . $max;
124
}
125
}
126
else {
127
if ( $album ) {
128
+ $q = "SELECT * FROM $wpdb->wppa_photos
129
+ WHERE album IN ( ".$album." )
130
+ AND status <> 'pending'
131
+ AND status <> 'scheduled'
132
+ $non_private
133
+ ORDER BY " . $order_by . " DESC LIMIT " . $max;
134
}
135
else {
136
+ $q = "SELECT * FROM $wpdb->wppa_photos
137
+ WHERE album > 0
138
+ AND status <> 'pending'
139
+ AND status <> 'scheduled'
140
+ $non_private
141
+ ORDER BY " . $order_by . " DESC LIMIT " . $max;
142
}
143
}
144
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.007
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 = '7312'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.12.007'; // 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.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
25
/* WPPA GLOBALS */
26
global $wppa_revno; $wppa_revno = '7312'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.12.008'; // WPPA software version
28
29
/* Init page js data */
30
global $wppa_js_page_data; $wppa_js_page_data = '';