WP Photo Album Plus - Version 7.2.10.006

Version Description

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

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

Code changes from version 7.2.10.005 to 7.2.10.006

Files changed (4) hide show
  1. readme.txt +2 -2
  2. theme/wppa-style.css +36 -7
  3. wppa-boxes-html.php +334 -76
  4. wppa.php +2 -2
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.2.10.005
6
Stable tag: 7.2.09.004
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
9
Requires at least: 3.9
10
- Tested up to: 5.2.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.2.10.006
6
Stable tag: 7.2.09.004
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
theme/wppa-style.css CHANGED
@@ -498,34 +498,63 @@ display:none;
498
/* Real calendar */
499
.wppa-real-calendar {
500
501
}
502
.wppa-real-calendar-table {
503
-
504
}
505
.wppa-real-calendar-head {
506
font-weight:bold;
507
}
508
.wppa-real-calendar-caption {
509
- text-align:center;
510
- font-size:1.8em;
511
}
512
.wppa-real-calendar-days {
513
514
}
515
.wppa-real-calendar-day-label {
516
- text-align:center;
517
- font-size:1.4em;
518
}
519
.wppa-real-calendar-body {
520
521
}
522
.wppa-real-calendar-week {
523
524
}
525
.wppa-real-calendar-dummy {
526
- text-align:center;width:14%;
527
}
528
.wppa-real-calendar-day {
529
- text-align:center;width:14%;
530
font-size:1.2em;
531
}
498
/* Real calendar */
499
.wppa-real-calendar {
500
501
+ }
502
+ .wppa-real-calendar tr td {
503
+ text-align:center;
504
}
505
.wppa-real-calendar-table {
506
+ border-collapse:collapse;
507
+ box-sizing:border-box;
508
+ }
509
+ .wppa-real-calendar-navi {
510
+ cursor:pointer;
511
+ color:darkblue;
512
}
513
.wppa-real-calendar-head {
514
font-weight:bold;
515
}
516
.wppa-real-calendar-caption {
517
+
518
+ font-size:1.4em;
519
}
520
.wppa-real-calendar-days {
521
522
}
523
.wppa-real-calendar-day-label {
524
+
525
}
526
.wppa-real-calendar-body {
527
528
+ }
529
+ .wppa-real-calendar-body tr td {
530
+ padding:0;
531
}
532
.wppa-real-calendar-week {
533
534
}
535
.wppa-real-calendar-dummy {
536
+ width:7%;
537
+ padding:0;
538
+ border: 1px solid gray;
539
+ background-color:darkgray;
540
}
541
.wppa-real-calendar-day {
542
+ width:7%;
543
font-size:1.2em;
544
+ line-height:0;
545
+ padding:0;
546
+ border: 1px solid gray;
547
+ }
548
+ .wppa-real-calendar-small {
549
+
550
+ }
551
+ .wppa-real-calendar-today {
552
+ color:red;
553
+ }
554
+ .wppa-real-calendar-inactive {
555
+ opacity:0.5;
556
+ cursor:default;
557
+ }
558
+ .wppa-current-day {
559
+ border:2px solid red !important;
560
}
wppa-boxes-html.php CHANGED
@@ -4939,24 +4939,17 @@ function wppa_real_calendar_box() {
4939
wppa_container( 'open' );
4940
4941
$year = wppa_get_get( 'calendar-year' );//0;
4942
- // if ( isset( $_REQUEST['calendar-year'] ) ) {
4943
- // $year = intval( $_REQUEST['calendar-year'] );
4944
- // }
4945
$month = wppa_get_get( 'calendar-month' );//0;
4946
- // if ( isset( $_REQUEST['calendar-month'] ) ) {
4947
- // $year = intval( $_REQUEST['calendar-month'] );
4948
- // }
4949
wppa_out( '<div' .
4950
' id="wppa-calendar-' . wppa( 'mocc' ) . '"' .
4951
' class="wppa-box wppa-calendar"' .
4952
' style="' .
4953
- // 'font-size:10px;' .
4954
- // 'line-height:12px;' .
4955
wppa_wcs( 'wppa-box' ) .
4956
wppa_wcs( 'wppa-calendar' ) .
4957
'"' .
4958
' >' .
4959
- '<div style="overflow:auto;" >' .
4960
wppa_get_real_calendar_html( $year, $month ) .
4961
'</div>' .
4962
'<div class="wppa-clear" style="' . wppa_wis( 'clear:both;' ) . '" >' .
@@ -4970,6 +4963,8 @@ function wppa_real_calendar_box() {
4970
function wppa_get_real_calendar_html( $year = 0, $month = 0 ) {
4971
global $wpdb;
4972
4973
// If no year given, default to current local year
4974
if ( ! $year ) {
4975
$year = wppa_local_date( 'Y', time() );
@@ -4995,6 +4990,7 @@ global $wpdb;
4995
$first_day_of_the_week = wppa_local_date( 'N', wppa_local_strtotime( $year . '-' . $month . '-01' ) );
4996
$day_labels = array(__("Mon"),__("Tue"),__("Wed"),__("Thu"),__("Fri"),__("Sat"),__("Sun"));
4997
$month_labels = array(__("January"),__("February"),__("March"),__("April"),__("May"),__("June"),__("July"),__("August"),__("September"),__("October"),__("November"),__("December"));
4998
$current_day = 0;
4999
$pm = $month - 1;
5000
if ( ! $pm ) {
@@ -5014,70 +5010,159 @@ global $wpdb;
5014
}
5015
5016
// Album spec?
5017
- // if ( ! wppa( 'start_album' ) ) {
5018
- // wppa( 'start_album', wppa_get_get( 'album' ) );
5019
- // }
5020
- if ( wppa( 'start_album' ) ) {
5021
- if ( strpos( wppa( 'start_album' ), '#x27; ) !== false ) {
5022
- wppa( 'start_album', wppa_album_name_to_number( wppa( 'start_album' )));
5023
- }
5024
- $albums = str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) );
5025
- $alb_arg = 'wppa-album=' . str_replace( ',', '.', $albums . '&amp;' );
5026
- }
5027
- else {
5028
- $albums = '';
5029
- $alb_arg = '';
5030
- }
5031
-
5032
- // Prev month link
5033
- $ajaxurl = wppa_encrypt_url(
5034
- wppa_get_ajaxlink() .
5035
- 'wppa-calendar=' . wppa( 'calendar' ) . '&amp;' .
5036
- 'wppa-calendar-year=' . $py . '&amp;' .
5037
- 'wppa-calendar-month=' . $pm . '&amp;' .
5038
- $alb_arg .
5039
- 'wppa-occur=' . $mocc
5040
- );
5041
-
5042
- $prev_month_link = '
5043
- <span
5044
- style="float:left;cursor:pointer;"
5045
- title="' . ucfirst( $month_labels[$pm-1] ) . ' ' . $py . '"
5046
- onclick="wppaDoAjaxRender(' . $mocc . ', \'' . $ajaxurl . '\');"
5047
- >&lt;</span>';
5048
-
5049
- // Next month link
5050
- $ajaxurl = wppa_encrypt_url(
5051
- wppa_get_ajaxlink() .
5052
- 'wppa-calendar=' . wppa( 'calendar' ) . '&amp;' .
5053
- 'wppa-calendar-year=' . $ny . '&amp;' .
5054
- 'wppa-calendar-month=' . $nm . '&amp;' .
5055
- $alb_arg .
5056
- 'wppa-occur=' . $mocc
5057
- );
5058
- $next_month_link = $is_this_month ? '<span style="float:right;" >&nbsp</span>' : '
5059
- <span
5060
- style="float:right;cursor:pointer;"
5061
- title="' . ucfirst( $month_labels[$nm-1] ) . ' ' . $ny . '"
5062
- onclick="wppaDoAjaxRender(' . $mocc . ', \'' . $ajaxurl . '\');"
5063
- >&gt;</span>';
5064
5065
// Buid the html
5066
$result = '
5067
- <div id="wppa-real-calendar" class="wppa-real-calendar" >
5068
- <table class="wppa-real-calendar-table" style="width:100%;" >
5069
<thead class="wppa-real-calendar-head" >
5070
- <tr class="wppa-real-calendar-caption" style="" >
5071
- <td colspan="7" >' .
5072
- $prev_month_link .
5073
- ucfirst( $month_labels[$month - 1] ) . ' - ' . $year .
5074
- $next_month_link . '
5075
- </td>
5076
- </tr>
5077
<tr class="wppa-real-calendar-days" >';
5078
foreach( $day_labels as $day_label ) {
5079
$result .= '
5080
- <td class="wppa-real-calendar-day-label" >
5081
' . ucfirst( $day_label ) . '
5082
</td>';
5083
}
@@ -5106,7 +5191,7 @@ global $wpdb;
5106
5107
// Dummy day
5108
$result .= '
5109
- <td
5110
class="wppa-real-calendar-dummy"
5111
>
5112
</td>';
@@ -5134,7 +5219,6 @@ global $wpdb;
5134
AND timestamp < %d", $from, $to );
5135
}
5136
}
5137
-
5138
if ( $albums ) {
5139
$query .= " AND album IN ($albums)";
5140
}
@@ -5151,8 +5235,9 @@ global $wpdb;
5151
}
5152
$order = wppa_is_int( wppa( 'start_album' ) ) ? wppa_get_photo_order( wppa( 'start_album' ) ) : wppa_get_photo_order( '0' );
5153
$query .= " " . $order;
5154
- wppa_log('obs', $query);
5155
$thumbs = $wpdb->get_results( $query, ARRAY_A );
5156
if ( count( $thumbs ) ) {
5157
5158
$imgtitle = sprintf( __( 'Zoom in to see %d items', 'wp-photo-album-plus' ), count( $thumbs ) );
@@ -5197,8 +5282,9 @@ wppa_log('obs', $query);
5197
if ( $id == $thumbs['0']['id'] ) {
5198
if ( wppa_is_video( $thumb['id'] ) ) {
5199
$cell_content .=
5200
- '<video preload="metadata" class="thumb wppa-img" id="i-' . $thumb['id'] . '-' .
5201
- wppa( 'mocc' ) . '" title="' . esc_attr( $imgtitle ) . '"
5202
style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"
5203
>' .
5204
wppa_get_video_body( $thumb['id'] ) .
@@ -5227,29 +5313,201 @@ wppa_log('obs', $query);
5227
$cell_content = $current_day;
5228
}
5229
$result .= '
5230
- <td
5231
id="li-' . $current_day . '"
5232
- class="wppa-real-calendar-day"
5233
>
5234
' . $cell_content . '
5235
</td>';
5236
-
5237
$current_day++;
5238
}
5239
}
5240
-
5241
$result .= '
5242
</tr>';
5243
}
5244
-
5245
$result .= '
5246
</tbody>
5247
</table>
5248
</div>';
5249
5250
return $result;
5251
}
5252
5253
// Stereo settings box
5254
function wppa_stereo_box() {
5255
4939
wppa_container( 'open' );
4940
4941
$year = wppa_get_get( 'calendar-year' );//0;
4942
$month = wppa_get_get( 'calendar-month' );//0;
4943
+
4944
wppa_out( '<div' .
4945
' id="wppa-calendar-' . wppa( 'mocc' ) . '"' .
4946
' class="wppa-box wppa-calendar"' .
4947
' style="' .
4948
wppa_wcs( 'wppa-box' ) .
4949
wppa_wcs( 'wppa-calendar' ) .
4950
'"' .
4951
' >' .
4952
+ '<div style="overflow:visible;margin-bottom:3px;" >' .
4953
wppa_get_real_calendar_html( $year, $month ) .
4954
'</div>' .
4955
'<div class="wppa-clear" style="' . wppa_wis( 'clear:both;' ) . '" >' .
4963
function wppa_get_real_calendar_html( $year = 0, $month = 0 ) {
4964
global $wpdb;
4965
4966
+ $is_this_month = ( ! $year && ! $month ) || ( $year == wppa_local_date( 'Y', time() ) && $month == wppa_local_date( 'm', time() ) );
4967
+
4968
// If no year given, default to current local year
4969
if ( ! $year ) {
4970
$year = wppa_local_date( 'Y', time() );
4990
$first_day_of_the_week = wppa_local_date( 'N', wppa_local_strtotime( $year . '-' . $month . '-01' ) );
4991
$day_labels = array(__("Mon"),__("Tue"),__("Wed"),__("Thu"),__("Fri"),__("Sat"),__("Sun"));
4992
$month_labels = array(__("January"),__("February"),__("March"),__("April"),__("May"),__("June"),__("July"),__("August"),__("September"),__("October"),__("November"),__("December"));
4993
+ $month_lbls = array(__("Jan"),__("Feb"),__("Mar"),__("Apr"),__("May"),__("Jun"),__("Jul"),__("Aug"),__("Sep"),__("Oct"),__("Nov"),__("Dec"));
4994
$current_day = 0;
4995
$pm = $month - 1;
4996
if ( ! $pm ) {
5010
}
5011
5012
// Album spec?
5013
+ $albums = str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) );
5014
5015
// Buid the html
5016
$result = '
5017
+ <div id="wppa-real-calendar-' . $mocc . '" class="wppa-real-calendar" >
5018
+ <table class="wppa-real-calendar-table" style="width:100%;border-bottom:1px solid gray;" >
5019
<thead class="wppa-real-calendar-head" >
5020
+ <tr class="wppa-real-calendar-navi" >';
5021
+
5022
+ // The previous year link
5023
+ if ( wppa_is_prehistoric( $year-1, 0 ) ) {
5024
+ $result .= '
5025
+ <td class="wppa-real-calendar-small wppa-real-calendar-inactive"
5026
+ >' .
5027
+ ( $year - 1 ) . '
5028
+ </td>';
5029
+ }
5030
+ else {
5031
+ $result .= '
5032
+ <td class="wppa-real-calendar-small"
5033
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( $year-1, $month ) . '\');"
5034
+ >' .
5035
+ ( $year - 1 ) . '
5036
+ </td>';
5037
+ }
5038
+
5039
+ // The month links
5040
+ for ( $m = 1; $m < 13; $m++ ) {
5041
+ if ( wppa_is_future( $year, $m ) ||
5042
+ wppa_is_current( $year, $m ) ||
5043
+ wppa_is_prehistoric( $year, $m ) ) {
5044
+ $result .= '
5045
+ <td class="wppa-real-calendar-small wppa-real-calendar-inactive"
5046
+ >' .
5047
+ $month_lbls[$m - 1] . '
5048
+ </td>';
5049
+ }
5050
+ else {
5051
+ $result .= '
5052
+ <td class="wppa-real-calendar-small"
5053
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( $year, $m ) . '\');"
5054
+ >' .
5055
+ $month_lbls[$m - 1] . '
5056
+ </td>';
5057
+ }
5058
+ }
5059
+
5060
+ // The next year link
5061
+ if ( wppa_is_future( $year+1, $month ) ) {
5062
+ $result .= '
5063
+ <td class="wppa-real-calendar-small wppa-real-calendar-inactive"
5064
+ >' .
5065
+ ( $year + 1 ) . '
5066
+ </td>';
5067
+ }
5068
+ else {
5069
+ $result .= '
5070
+ <td class="wppa-real-calendar-small"
5071
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( $year+1, $month ) . '\');"
5072
+ >' .
5073
+ ( $year + 1 ) . '
5074
+ </td>';
5075
+ }
5076
+ $result .= '
5077
+ </tr>';
5078
+
5079
+ // The caption
5080
+ $result .= '
5081
+ <tr class="wppa-real-calendar-caption" >';
5082
+
5083
+ // The previous month link
5084
+ if ( wppa_is_prehistoric( $py, $pm ) ) {
5085
+ $result .= '
5086
+ <td colspan="1"
5087
+ class="wppa-real-calendar-navi wppa-real-calendar-inactive"
5088
+ >' .
5089
+ ucfirst( $month_lbls[$pm-1] ) . '
5090
+ </td>';
5091
+
5092
+ }
5093
+ else {
5094
+ $result .= '
5095
+ <td colspan="1"
5096
+ class="wppa-real-calendar-navi"
5097
+ title="' . ucfirst( $month_labels[$pm-1] ) . ' ' . $py . '"
5098
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( $py, $pm ) . '\');"
5099
+ >' .
5100
+ ucfirst( $month_lbls[$pm-1] ) . '
5101
+ </td>';
5102
+ }
5103
+
5104
+ // Filler
5105
+ $result .= '
5106
+ <td></td>';
5107
+
5108
+ // The current month caption
5109
+ $result .= '
5110
+ <td colspan="9"
5111
+ class="wppa-real-calendar-caption" >' .
5112
+ ucfirst( $month_labels[$month - 1] ) . ' - ' . $year . '
5113
+ </td>';
5114
+
5115
+ // The back to current month: 'Today' link
5116
+ if ( $is_this_month ) {
5117
+ $result .= '
5118
+ <td colspan="2"
5119
+ class="wppa-real-calendar-today wppa-real-calendar-navi wppa-real-calendar-inactive"
5120
+ >' .
5121
+ __( "Today", 'wp-photo-album-plus' ) . '
5122
+ </td>';
5123
+ }
5124
+ else {
5125
+ $result .= '
5126
+ <td colspan="2"
5127
+ class="wppa-real-calendar-today wppa-real-calendar-navi"
5128
+ title="' . ucfirst( $month_labels[wppa_local_date( 'm', time() )-1] ) . ' - ' . wppa_local_date( 'Y', time() ) . '"
5129
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( 0, 0 ) . '\');"
5130
+ >' .
5131
+ __( "Today", 'wp-photo-album-plus' ) . '
5132
+ </td>';
5133
+ }
5134
+
5135
+ // The next month link
5136
+ if ( wppa_is_future( $year, $nm ) ) {
5137
+ $result .= '
5138
+ <td colspan="1"
5139
+ class="wppa-real-calendar-navi wppa-real-calendar-inactive"
5140
+ >' .
5141
+ ucfirst( $month_lbls[$nm-1] ) . '
5142
+ </td>';
5143
+ }
5144
+ else {
5145
+ $result .= '
5146
+ <td colspan="1"
5147
+ class="wppa-real-calendar-navi"
5148
+ title="' . ucfirst( $month_labels[$nm-1] ) . ' ' . $ny . '"
5149
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . wppa_get_real_calendar_link( $ny, $nm ) . '\');"
5150
+ >' .
5151
+ ucfirst( $month_lbls[$nm-1] ) . '
5152
+ </td>';
5153
+ }
5154
+
5155
+ // Close the caption
5156
+ $result .= '
5157
+ </tr>';
5158
+
5159
+ // The 7 day labels
5160
+ $result .= '
5161
<tr class="wppa-real-calendar-days" >';
5162
foreach( $day_labels as $day_label ) {
5163
$result .= '
5164
+ <td colspan="2"
5165
+ class="wppa-real-calendar-day-label" >
5166
' . ucfirst( $day_label ) . '
5167
</td>';
5168
}
5191
5192
// Dummy day
5193
$result .= '
5194
+ <td colspan="2"
5195
class="wppa-real-calendar-dummy"
5196
>
5197
</td>';
5219
AND timestamp < %d", $from, $to );
5220
}
5221
}
5222
if ( $albums ) {
5223
$query .= " AND album IN ($albums)";
5224
}
5235
}
5236
$order = wppa_is_int( wppa( 'start_album' ) ) ? wppa_get_photo_order( wppa( 'start_album' ) ) : wppa_get_photo_order( '0' );
5237
$query .= " " . $order;
5238
$thumbs = $wpdb->get_results( $query, ARRAY_A );
5239
+
5240
+ // There are count($thumbs) items this day
5241
if ( count( $thumbs ) ) {
5242
5243
$imgtitle = sprintf( __( 'Zoom in to see %d items', 'wp-photo-album-plus' ), count( $thumbs ) );
5282
if ( $id == $thumbs['0']['id'] ) {
5283
if ( wppa_is_video( $thumb['id'] ) ) {
5284
$cell_content .=
5285
+ '<video preload="metadata"
5286
+ class="thumb wppa-img" id="i-' . $thumb['id'] . '-' . wppa( 'mocc' ) . '"
5287
+ title="' . esc_attr( $imgtitle ) . '"
5288
style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"
5289
>' .
5290
wppa_get_video_body( $thumb['id'] ) .
5313
$cell_content = $current_day;
5314
}
5315
$result .= '
5316
+ <td colspan="2"
5317
id="li-' . $current_day . '"
5318
+ class="wppa-real-calendar-day' . ( wppa_is_today( $year, $month, $current_day ) ? ' wppa-current-day' : '' ) . '"
5319
>
5320
' . $cell_content . '
5321
</td>';
5322
$current_day++;
5323
}
5324
}
5325
$result .= '
5326
</tr>';
5327
}
5328
$result .= '
5329
</tbody>
5330
</table>
5331
</div>';
5332
5333
+ $aspect = 1;
5334
+ if ( wppa_opt( 'thumb_aspect' ) != '0:0:none' ) {
5335
+ $t = explode( ':', wppa_opt( 'thumb_aspect' ) );
5336
+ $aspect = $t[0] / $t[1];
5337
+ }
5338
+ elseif ( wppa_opt( 'resize_to' ) ) {
5339
+ $t = explode( 'x', wppa_opt( 'resize_to' ) );
5340
+ $aspect = $t[1] / $t[0];
5341
+ }
5342
+ else {
5343
+ $aspect = wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' );
5344
+ }
5345
+
5346
+ $result .= '
5347
+ <script>
5348
+ jQuery(document).ready(function(){
5349
+ jQuery(window).on("DOMContentLoaded load resize orientationchange",wppaResizeCalendar);
5350
+ wppaResizeCalendar();
5351
+ });
5352
+ function wppaResizeCalendar() {
5353
+ var w = jQuery(\'#wppa-real-calendar-' . $mocc . '\').width();
5354
+ jQuery(\'.wppa-real-calendar-day\').css(\'height\',w*' . $aspect . '/7+\'px\');
5355
+ jQuery(\'#wppa-real-calendar-' . $mocc . '\').css(\'font-size\', w/50+\'px\');
5356
+ }
5357
+ </script>';
5358
+
5359
return $result;
5360
}
5361
5362
+ // Make an Ajax link for the real calendar, calling for a certain year and month.
5363
+ // Type: 'realexifdtm', 'realtimestamp' or 'realmodified'.
5364
+ // Month: 1..12, 0 will be 12 previous year, 13 will be 1 next year, etc.
5365
+ function wppa_get_real_calendar_link( $year, $month ) {
5366
+
5367
+ if ( $year && $month ) {
5368
+ while ( $month > 12 ) {
5369
+ $year++;
5370
+ $month -= 12;
5371
+ }
5372
+ while ( $month < 1 ) {
5373
+ $year--;
5374
+ $month += 12;
5375
+ }
5376
+ }
5377
+ $album = str_replace( ',', '.', wppa_expand_enum( wppa( 'start_album' ) ) );
5378
+ $result = wppa_encrypt_url( wppa_get_ajaxlink() .
5379
+ 'wppa-calendar=' . wppa( 'calendar' ) . '&amp;' .
5380
+ 'wppa-calendar-year=' . $year . '&amp;' .
5381
+ 'wppa-calendar-month=' . $month . '&amp;' .
5382
+ 'wppa-album=' . $album . '&amp;' .
5383
+ 'wppa-occur=' . wppa( 'mocc' )
5384
+ );
5385
+
5386
+ return $result;
5387
+ }
5388
+
5389
+ // Is year / month in the future?
5390
+ function wppa_is_future( $year, $month ) {
5391
+
5392
+ if ( $year > wppa_local_date( 'Y', time() ) ) {
5393
+ return true;
5394
+ }
5395
+ if ( $year < wppa_local_date( 'Y', time() ) ) {
5396
+ return false;
5397
+ }
5398
+ if ( $month > wppa_local_date( 'm', time() ) ) {
5399
+ return true;
5400
+ }
5401
+ return false;
5402
+ }
5403
+
5404
+ // Is year / month current?
5405
+ function wppa_is_current( $year, $month ) {
5406
+
5407
+ if ( $year == wppa_local_date( 'Y', time() ) &&
5408
+ $month == wppa_local_date( 'm', time() ) ) {
5409
+ return true;
5410
+ }
5411
+
5412
+ return false;
5413
+ }
5414
+
5415
+ //
5416
+ function wppa_is_today( $year, $month, $day ) {
5417
+ return wppa_is_current( $year, $month ) && $day == wppa_local_date( 'd', time() );
5418
+ }
5419
+
5420
+ // Is Year / Month prehistoric?
5421
+ function wppa_is_prehistoric( $year, $month ) {
5422
+ global $wpdb;
5423
+
5424
+ $albums = str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) );
5425
+
5426
+ switch ( wppa( 'calendar' ) ) {
5427
+ case 'realexifdtm':
5428
+
5429
+ if ( $albums ) {
5430
+ $first = $wpdb->get_var( "SELECT exifdtm FROM $wpdb->wppa_photos
5431
+ WHERE exifdtm <> ''
5432
+ AND album IN ($albums)
5433
+ ORDER BY exifdtm LIMIT 1" );
5434
+ }
5435
+ else {
5436
+ $first = $wpdb->get_var( "SELECT exifdtm FROM $wpdb->wppa_photos
5437
+ WHERE exifdtm <> ''
5438
+ AND album > 0
5439
+ ORDER BY exifdtm LIMIT 1" );
5440
+ }
5441
+
5442
+ if ( $first ) {
5443
+ $y = substr( $first, 0, 4 );
5444
+ if ( $y > $year ) {
5445
+ return true;
5446
+ }
5447
+ if ( $y < $year ) {
5448
+ return false;
5449
+ }
5450
+ if ( ! $month ) {
5451
+ return false;
5452
+ }
5453
+ $m = substr( $first, 5, 2 );
5454
+ if ( $m > $month ) {
5455
+ return true;
5456
+ }
5457
+ }
5458
+ break;
5459
+
5460
+ case 'realtimestamp':
5461
+ if ( $albums ) {
5462
+ $first = $wpdb->get_var( "SELECT timestamp FROM $wpdb->wppa_photos
5463
+ WHERE album IN ($albums)
5464
+ ORDER BY timestamp LIMIT 1" );
5465
+ }
5466
+ else {
5467
+ $first = $wpdb->get_var( "SELECT timestamp FROM $wpdb->wppa_photos
5468
+ WHERE album > 0
5469
+ ORDER BY timestamp LIMIT 1" );
5470
+ }
5471
+ break;
5472
+
5473
+ case 'realmodified';
5474
+
5475
+ if ( $albums ) {
5476
+ $first = $wpdb->get_var( "SELECT modified FROM $wpdb->wppa_photos
5477
+ WHERE album IN ($albums)
5478
+ ORDER BY modified LIMIT 1" );
5479
+ }
5480
+ else {
5481
+ $first = $wpdb->get_var( "SELECT modified FROM $wpdb->wppa_photos
5482
+ WHERE album > 0
5483
+ ORDER BY modified LIMIT 1" );
5484
+ }
5485
+ break;
5486
+
5487
+ default:
5488
+ return false;
5489
+ break;
5490
+
5491
+ }
5492
+
5493
+ $y = wppa_local_date( 'Y', time() );
5494
+ if ( $y > $year ) {
5495
+ return true;
5496
+ }
5497
+ if ( $y < $year ) {
5498
+ return false;
5499
+ }
5500
+ if ( ! $month ) {
5501
+ return false;
5502
+ }
5503
+ $m = wppa_local_date( 'm', time() );
5504
+ if ( $m > $month ) {
5505
+ return true;
5506
+ }
5507
+
5508
+ return false;
5509
+ }
5510
+
5511
// Stereo settings box
5512
function wppa_stereo_box() {
5513
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.2.10.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/
@@ -23,7 +23,7 @@ global $wp_version;
23
24
/* WPPA GLOBALS */
25
global $wppa_revno; $wppa_revno = '7210'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.10.005'; // 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.2.10.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/
23
24
/* WPPA GLOBALS */
25
global $wppa_revno; $wppa_revno = '7210'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.10.006'; // WPPA software version
27
28
/* Init page js data */
29
global $wppa_js_page_data; $wppa_js_page_data = '';