WP Photo Album Plus - Version 6.6.02

Version Description

Download this release

Release Info

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

Code changes from version 6.6.01 to 6.6.02

js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '6.6.00';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -855,12 +855,12 @@ wppaConsoleLog( 'wppaOvlSize' );
855
 
856
  wid = parseInt(wid);
857
 
858
- wppaSavedImageWidth = wid;
859
- wppaSavedImageHeight = wid * nh / nw;
860
- wppaSavedMarginLeft = - ( wid / 2 + wppaOvlBorderWidth );
861
- wppaSavedContainerWidth = wid + 2 * wppaOvlBorderWidth;
862
- wppaSavedContainerHeight = wppaSavedImageHeight + wppaOvlBorderWidth + jQuery( '#wppa-overlay-txt-container' ).height() + 20; // padding = 10
863
- wppaSavedMarginTop = - wppaSavedContainerHeight / 2;
864
 
865
  // Go to final size
866
  jQuery( '#wppa-overlay-img' ).animate( {
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.6.02';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
855
 
856
  wid = parseInt(wid);
857
 
858
+ wppaSavedImageWidth = parseInt( wid );
859
+ wppaSavedImageHeight = parseInt( wid * nh / nw );
860
+ wppaSavedMarginLeft = - parseInt( ( wid / 2 + wppaOvlBorderWidth ) );
861
+ wppaSavedContainerWidth = parseInt( wid + 2 * wppaOvlBorderWidth );
862
+ wppaSavedContainerHeight = parseInt( wppaSavedImageHeight + wppaOvlBorderWidth + jQuery( '#wppa-overlay-txt-container' ).height() + 20 ); // padding = 10
863
+ wppaSavedMarginTop = - parseInt( wppaSavedContainerHeight / 2 );
864
 
865
  // Go to final size
866
  jQuery( '#wppa-overlay-img' ).animate( {
js/wppa-lightbox.min.js CHANGED
@@ -4,7 +4,7 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
- var wppaLightboxVersion='6.6.00';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaDoOnOrientationChange(e){if(wppaOvlMode!='normal'&&document.getElementById('wppa-overlay-img')){setTimeout('wppaOvlShow( '+wppaOvlIdx+' )',100);return;}}
8
  function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
9
  var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
10
  wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
@@ -87,7 +87,7 @@ var mh;var tch=jQuery('#wppa-overlay-txt').height();if(wppaOvlTxtHeight=='auto')
87
  else{mh=ih-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;}
88
  var mw=parseInt(mh*nw/nh);var pt=wppaOvlPadTop;var lft=parseInt((iw-mw)/2);var wid=mw;if(nh<mh){pt=wppaOvlPadTop+(mh-nh)/2;lft=parseInt((iw-nw)/2);wid=nw;}
89
  var done=(wppaSavedImageWidth-wid<3&&wid-wppaSavedImageWidth<3);if(wid<=10){wid=240;nh=180;nw=240;done=false;}
90
- wid=parseInt(wid);wppaSavedImageWidth=wid;wppaSavedImageHeight=wid*nh/nw;wppaSavedMarginLeft=-(wid/2+wppaOvlBorderWidth);wppaSavedContainerWidth=wid+2*wppaOvlBorderWidth;wppaSavedContainerHeight=wppaSavedImageHeight+wppaOvlBorderWidth+jQuery('#wppa-overlay-txt-container').height()+20;wppaSavedMarginTop=-wppaSavedContainerHeight/2;jQuery('#wppa-overlay-img').animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight,},speed);jQuery('#wppa-overlay-ic').animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,},speed);if(!done){setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},speed+100);wppaConsoleLog('Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+', img complete='+document.getElementById('wppa-overlay-img').complete);}
91
  else{jQuery('#wppa-overlay-sp').css({visibility:'hidden'});wppaConsoleLog('Done '+wppaOvlIdx);wppaOvlFirst=false;}
92
  return true;}
93
  function wppaOvlFormatFull(){wppaConsoleLog('wppaOvlFormatFull '+wppaOvlMode);var img;var natWidth;var natHeight;if(wppaOvlIsVideo){img=document.getElementById('wppa-overlay-img');natWidth=wppaOvlVideoNaturalWidths[wppaOvlIdx];natHeight=wppaOvlVideoNaturalHeights[wppaOvlIdx];}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaLightboxVersion='6.6.02';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaDoOnOrientationChange(e){if(wppaOvlMode!='normal'&&document.getElementById('wppa-overlay-img')){setTimeout('wppaOvlShow( '+wppaOvlIdx+' )',100);return;}}
8
  function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
9
  var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
10
  wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
87
  else{mh=ih-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;}
88
  var mw=parseInt(mh*nw/nh);var pt=wppaOvlPadTop;var lft=parseInt((iw-mw)/2);var wid=mw;if(nh<mh){pt=wppaOvlPadTop+(mh-nh)/2;lft=parseInt((iw-nw)/2);wid=nw;}
89
  var done=(wppaSavedImageWidth-wid<3&&wid-wppaSavedImageWidth<3);if(wid<=10){wid=240;nh=180;nw=240;done=false;}
90
+ wid=parseInt(wid);wppaSavedImageWidth=parseInt(wid);wppaSavedImageHeight=parseInt(wid*nh/nw);wppaSavedMarginLeft=-parseInt((wid/2+wppaOvlBorderWidth));wppaSavedContainerWidth=parseInt(wid+2*wppaOvlBorderWidth);wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery('#wppa-overlay-txt-container').height()+20);wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2);jQuery('#wppa-overlay-img').animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight,},speed);jQuery('#wppa-overlay-ic').animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,},speed);if(!done){setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},speed+100);wppaConsoleLog('Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+', img complete='+document.getElementById('wppa-overlay-img').complete);}
91
  else{jQuery('#wppa-overlay-sp').css({visibility:'hidden'});wppaConsoleLog('Done '+wppaOvlIdx);wppaOvlFirst=false;}
92
  return true;}
93
  function wppaOvlFormatFull(){wppaConsoleLog('wppaOvlFormatFull '+wppaOvlMode);var img;var natWidth;var natHeight;if(wppaOvlIsVideo){img=document.getElementById('wppa-overlay-img');natWidth=wppaOvlVideoNaturalWidths[wppaOvlIdx];natHeight=wppaOvlVideoNaturalHeights[wppaOvlIdx];}
readme.txt CHANGED
@@ -2,8 +2,8 @@
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
- Version: 6.6.01
6
- Stable tag: 6.6.00
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -180,6 +180,23 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.6.01 =
184
 
185
  = Bug Fixes =
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
+ Version: 6.6.02
6
+ Stable tag: 6.6.01
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
183
+ = 6.6.02 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * If <i>Upload owner only</i> was unticked ( Table VII-D1.2 ), it worked like it was still ticked. Fixed.
188
+ In this case the upload dialog now also appears on album covers and thumbnail areas.
189
+ * Fixed breascrumb go to thumbnails icon for virtual albums.
190
+ * Next page and link and direct access page links on admin page Moderate photos gave no rights error. Fixed.
191
+
192
+ = Other Changes =
193
+
194
+ * (Photo)file permissions are now always set to 0644 and wppa created directories to 0755 to grant accessability, even when server defaults change magically.
195
+ * If ewww image optimizer is installed, created photo files will now always be optimized.
196
+ * Commenting your own photos will no longer give you credit points.
197
+ * Items in a .csv file will now be trimmed from spaces.
198
+ * Extended settings for counters on album covers: Table II-E5 and Table II-E8.
199
+
200
  = 6.6.01 =
201
 
202
  = Bug Fixes =
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 6.6.00
7
  *
8
  */
9
 
@@ -425,6 +425,12 @@ global $wpdb;
425
  // Destroy the result
426
  imagedestroy( $rotate );
427
 
 
 
 
 
 
 
428
  // Clear stored dimensions
429
  wppa_update_photo( array( 'id' => $id,
430
  'thumbx' => '0',
@@ -624,10 +630,10 @@ static $everything_ok;
624
  $idx = 0;
625
  while ( $idx < 6 ) {
626
  if ( ! file_exists( $dn[$idx] ) ) { // First try to repair
627
- @ wppa_mktree( $dn[$idx] );
628
  }
629
  else {
630
- @ chmod( $dn[$idx], 0755 ); // there are always people who destruct things
631
  }
632
 
633
  if ( ! file_exists( $dn[$idx] ) ) { // Test again
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 6.6.02
7
  *
8
  */
9
 
425
  // Destroy the result
426
  imagedestroy( $rotate );
427
 
428
+ // accessable
429
+ wppa_chmod( $file );
430
+
431
+ // Optimized
432
+ wppa_optimize_image_file( $file );
433
+
434
  // Clear stored dimensions
435
  wppa_update_photo( array( 'id' => $id,
436
  'thumbx' => '0',
630
  $idx = 0;
631
  while ( $idx < 6 ) {
632
  if ( ! file_exists( $dn[$idx] ) ) { // First try to repair
633
+ wppa_mktree( $dn[$idx] );
634
  }
635
  else {
636
+ wppa_chmod( $dn[$idx] ); // there are always people who destruct things
637
  }
638
 
639
  if ( ! file_exists( $dn[$idx] ) ) { // Test again
wppa-album-covers.php CHANGED
@@ -1398,7 +1398,7 @@ function wppa_album_cover_view_link(
1398
  if ( $photocount > $mincount || $albumcount ) {
1399
 
1400
  // Get treecount data
1401
- if ( wppa_switch( 'show_treecount' ) ) {
1402
  $treecount = wppa_treecount_a( $albumid );
1403
  }
1404
  else {
@@ -1425,21 +1425,34 @@ function wppa_album_cover_view_link(
1425
  $nta = $treecount['albums'] > $albumcount ? $treecount['albums'] : '';
1426
  $np = $photocount > $mincount ? $photocount : '';
1427
  $ntp = $treecount['photos'] > $photocount ? $treecount['photos'] : '';
 
 
1428
  $text = __( 'View' , 'wp-photo-album-plus') . ' ';
1429
- if ( $na ) {
1430
- $text .= sprintf( _n( '%d album', '%d albums', $na, 'wp-photo-album-plus' ), $na ) . ' ';
1431
- }
1432
- if ( $nta ) {
1433
- $text .= '(' . $nta . ') ';
1434
- }
1435
- if ( ( $na || $nta ) && ( $np || $ntp ) ) {
1436
- $text .= __( 'and' ,'wp-photo-album-plus' ) . ' ';
1437
- }
1438
- if ( $np || $ntp ) {
1439
- $text .= sprintf( _n( '%d photo', '%d photos', $np, 'wp-photo-album-plus' ), $np ) . ' ';
1440
  }
1441
- if ( $ntp ) {
1442
- $text .= '(' . $ntp . ')';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1443
  }
1444
 
1445
  wppa_out( str_replace( ' ', '&nbsp;', $text ) );
@@ -1483,8 +1496,17 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1483
  }
1484
 
1485
  // Photo count?
1486
- if ( wppa_switch( 'count_on_title' ) ) {
1487
- $cnt = wppa_get_photo_count( $alb );
 
 
 
 
 
 
 
 
 
1488
  if ( $cnt ) {
1489
  wppa_out( ' <span class="wppa-cover-pcount" >(' . $cnt . ')</span>' );
1490
  }
1398
  if ( $photocount > $mincount || $albumcount ) {
1399
 
1400
  // Get treecount data
1401
+ if ( wppa_opt( 'show_treecount' ) != '-none-' ) {
1402
  $treecount = wppa_treecount_a( $albumid );
1403
  }
1404
  else {
1425
  $nta = $treecount['albums'] > $albumcount ? $treecount['albums'] : '';
1426
  $np = $photocount > $mincount ? $photocount : '';
1427
  $ntp = $treecount['photos'] > $photocount ? $treecount['photos'] : '';
1428
+ $ntpx = $treecount['photos'] > $photocount ? $treecount['photos'] : $photocount;
1429
+
1430
  $text = __( 'View' , 'wp-photo-album-plus') . ' ';
1431
+
1432
+ if ( wppa_opt( 'show_treecount' ) == 'total' ) {
1433
+ if ( $nta ) {
1434
+ $text .= sprintf( _n( '%d album', '%d albums', $nta, 'wp-photo-album-plus' ), $nta ) . ' ';
1435
+ }
1436
+ if ( $ntpx ) {
1437
+ $text .= sprintf( _n( '%d photo', '%d photos', $ntpx, 'wp-photo-album-plus' ), $ntpx ) . ' ';
1438
+ }
 
 
 
1439
  }
1440
+ else {
1441
+ if ( $na ) {
1442
+ $text .= sprintf( _n( '%d album', '%d albums', $na, 'wp-photo-album-plus' ), $na ) . ' ';
1443
+ }
1444
+ if ( $nta ) {
1445
+ $text .= '(' . $nta . ') ';
1446
+ }
1447
+ if ( ( $na || $nta ) && ( $np || $ntp ) ) {
1448
+ $text .= __( 'and' ,'wp-photo-album-plus' ) . ' ';
1449
+ }
1450
+ if ( $np || $ntp ) {
1451
+ $text .= sprintf( _n( '%d photo', '%d photos', $np, 'wp-photo-album-plus' ), $np ) . ' ';
1452
+ }
1453
+ if ( $ntp ) {
1454
+ $text .= '(' . $ntp . ')';
1455
+ }
1456
  }
1457
 
1458
  wppa_out( str_replace( ' ', '&nbsp;', $text ) );
1496
  }
1497
 
1498
  // Photo count?
1499
+ if ( wppa_opt( 'count_on_title' ) != '-none-' ) {
1500
+ if ( wppa_opt( 'count_on_title' ) == 'self' ) {
1501
+ $cnt = wppa_get_photo_count( $alb );
1502
+ }
1503
+ if ( wppa_opt( 'count_on_title' ) == 'total' ) {
1504
+ $temp = wppa_treecount_a( $alb );
1505
+ $cnt = $temp['photos'];
1506
+ if ( current_user_can( 'wppa_moderate' ) ) {
1507
+ $cnt += $temp['pendphotos'];
1508
+ }
1509
+ }
1510
  if ( $cnt ) {
1511
  wppa_out( ' <span class="wppa-cover-pcount" >(' . $cnt . ')</span>' );
1512
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.6.01
7
  *
8
  */
9
 
@@ -2156,7 +2156,9 @@ static $albums_granted;
2156
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2157
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
2158
  if ( ! wppa_have_access( $alb ) ) {
2159
- return '';
 
 
2160
  }
2161
  }
2162
 
@@ -2173,7 +2175,9 @@ static $albums_granted;
2173
 
2174
  foreach( array_keys( $albarr ) as $key ) {
2175
  if ( ! wppa_have_access( $albarr[$key] ) ) {
2176
- unset( $albarr[$key] );
 
 
2177
  }
2178
  }
2179
  if ( empty( $albarr ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.6.02
7
  *
8
  */
9
 
2156
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2157
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
2158
  if ( ! wppa_have_access( $alb ) ) {
2159
+ if ( wppa_switch( 'upload_owner_only' ) ) {
2160
+ return '';
2161
+ }
2162
  }
2163
  }
2164
 
2175
 
2176
  foreach( array_keys( $albarr ) as $key ) {
2177
  if ( ! wppa_have_access( $albarr[$key] ) ) {
2178
+ if ( wppa_switch( 'upload_owner_only' ) ) {
2179
+ unset( $albarr[$key] );
2180
+ }
2181
  }
2182
  }
2183
  if ( empty( $albarr ) ) {
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 6.6.01
7
  *
8
  */
9
 
@@ -96,7 +96,7 @@ global $wppa_session;
96
  // Do we need Home?
97
  if ( wppa_switch( 'show_home' ) ) {
98
  $value = __( wppa_opt( 'home_text' ) );
99
- $href = wppa_dbg_url( get_bloginfo( 'url' ) );
100
  $title = get_bloginfo( 'title' );
101
  wppa_bcitem( $value, $href, $title, 'b1' );
102
  }
@@ -508,12 +508,13 @@ global $wppa_session;
508
  $fs = wppa_opt( 'fontsize_nav' );
509
  if ( $fs != '' ) $fs += 3; else $fs = '15'; // iconsize = fontsize+3, Default to 15
510
  $imgs = 'height: '.$fs.'px; margin:0 0 -3px 0; padding:0; box-shadow:none;';
511
- wppa_out( '<a href="'.$thumbhref.'" title="'.__( 'Thumbnail view' , 'wp-photo-album-plus').
512
- '" class="wppa-nav-text" style="'.__wcs( 'wppa-nav-text' ).'float:right; cursor:pointer;" '.
513
- 'onmouseover="jQuery(\'#wppa-tnv-'.wppa( 'mocc' ).'\').css(\'display\', \'none\'); jQuery(\'#wppa-tnvh-'.wppa( 'mocc' ).'\').css(\'display\', \'\')" '.
514
- 'onmouseout="jQuery(\'#wppa-tnv-'.wppa( 'mocc' ).'\').css(\'display\', \'\'); jQuery(\'#wppa-tnvh-'.wppa( 'mocc' ).'\').css(\'display\', \'none\')" >'.
515
- '<img id="wppa-tnv-'.wppa( 'mocc' ).'" class="wppa-tnv" src="'.wppa_get_imgdir().'application_view_icons.png" alt="'.__( 'Thumbs', 'wp-photo-album-plus').'" style="'.$imgs.'" />'.
516
- '<img id="wppa-tnvh-'.wppa( 'mocc' ).'" class="wppa-tnv" src="'.wppa_get_imgdir().'application_view_icons_hover.png" alt="'.__( 'Thumbs', 'wp-photo-album-plus').'" style="display:none;'.$imgs.'" />'.
 
517
  '</a>' );
518
  }
519
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 6.6.02
7
  *
8
  */
9
 
96
  // Do we need Home?
97
  if ( wppa_switch( 'show_home' ) ) {
98
  $value = __( wppa_opt( 'home_text' ) );
99
+ $href = wppa_dbg_url( get_bloginfo( 'url' ) );
100
  $title = get_bloginfo( 'title' );
101
  wppa_bcitem( $value, $href, $title, 'b1' );
102
  }
508
  $fs = wppa_opt( 'fontsize_nav' );
509
  if ( $fs != '' ) $fs += 3; else $fs = '15'; // iconsize = fontsize+3, Default to 15
510
  $imgs = 'height: '.$fs.'px; margin:0 0 -3px 0; padding:0; box-shadow:none;';
511
+ wppa_out( '<a' .
512
+ ' href="' . $thumbhref . '"' .
513
+ ' title="' . __( 'Thumbnail view' , 'wp-photo-album-plus') . '"' .
514
+ ' class="wppa-nav-text"' .
515
+ ' style="' . __wcs( 'wppa-nav-text' ) . 'float:right; cursor:pointer; text-decoration:none;"' .
516
+ ' >' .
517
+ wppa_get_svghtml( 'Content-View', '1.5em', false, false, '10', '10', '10', '10' ) .
518
  '</a>' );
519
  }
520
  }
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 6.6.00
6
  *
7
  */
8
 
@@ -1636,7 +1636,7 @@ global $wpdb;
1636
  $albums = $wpdb->get_results( "SELECT `id`, `name` " .
1637
  "FROM `" . WPPA_ALBUMS . "` " .
1638
  "WHERE `id` IN (" . implode( ',', $args['array'] ) . ") " .
1639
- ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "AND `owner` IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1640
  wppa_get_album_order( $args['root'] ),
1641
  ARRAY_A
1642
  );
@@ -1644,7 +1644,7 @@ global $wpdb;
1644
  else {
1645
  $albums = $wpdb->get_results( "SELECT `id`, `name` " .
1646
  "FROM `" . WPPA_ALBUMS . "` " .
1647
- ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "WHERE `owner` IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1648
  wppa_get_album_order( $args['root'] ),
1649
  ARRAY_A
1650
  );
@@ -1892,7 +1892,7 @@ function wppa_add_credit_points( $amount, $reason = '', $id = '', $value = '', $
1892
  wppa_log( 'err', 'Could not add points to user '.$user );
1893
  return false;
1894
  }
1895
-
1896
  // Cube points
1897
  if ( function_exists( 'cp_alterPoints' ) ) {
1898
  cp_alterPoints( $usr->ID, $amount );
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.6.02
6
  *
7
  */
8
 
1636
  $albums = $wpdb->get_results( "SELECT `id`, `name` " .
1637
  "FROM `" . WPPA_ALBUMS . "` " .
1638
  "WHERE `id` IN (" . implode( ',', $args['array'] ) . ") " .
1639
+ ( $args['checkowner'] && wppa_switch( 'upload_owner_only' ) && ! wppa_user_is( 'administrator' ) ? "AND `owner` IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1640
  wppa_get_album_order( $args['root'] ),
1641
  ARRAY_A
1642
  );
1644
  else {
1645
  $albums = $wpdb->get_results( "SELECT `id`, `name` " .
1646
  "FROM `" . WPPA_ALBUMS . "` " .
1647
+ ( $args['checkowner'] && wppa_switch( 'upload_owner_only' ) && ! wppa_user_is( 'administrator' ) ? "WHERE `owner` IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1648
  wppa_get_album_order( $args['root'] ),
1649
  ARRAY_A
1650
  );
1892
  wppa_log( 'err', 'Could not add points to user '.$user );
1893
  return false;
1894
  }
1895
+
1896
  // Cube points
1897
  if ( function_exists( 'cp_alterPoints' ) ) {
1898
  cp_alterPoints( $usr->ID, $amount );
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.6.00
7
  *
8
  */
9
 
@@ -1142,7 +1142,7 @@ global $wppa_session;
1142
  wppa_dbg_msg( 'Get_thumbs entered, mocc = ' . wppa( 'mocc' ) .
1143
  ', Start_album=' . wppa( 'start_album' ) . ', Cover=' . wppa( 'is_cover' ) );
1144
 
1145
- /* debugging, disable for production!
1146
  global $wppa;
1147
  wppa_dbg_msg( 'wppa='.serialize($wppa) );
1148
  /* ens debugging */
@@ -2331,18 +2331,25 @@ global $wppa_done;
2331
  }
2332
  }
2333
  else {
2334
- // SUCCESSFUL COMMENT, ADD POINTS to the commenter
2335
- wppa_add_credit_points( wppa_opt( 'cp_points_comment' ),
 
 
 
 
 
2336
  __( 'Photo comment' , 'wp-photo-album-plus'),
2337
- $id );
 
 
2338
 
2339
- // Add points to the owner, if no moderationif
2340
  if ( $status == 'approved' ) {
2341
- wppa_add_credit_points( wppa_opt( 'cp_points_comment_appr' ),
2342
- __( 'Photo comment approved' , 'wp-photo-album-plus'),
2343
- $photo,
2344
- '',
2345
- wppa_get_photo_item( $photo, 'owner' )
2346
  );
2347
  }
2348
 
@@ -4720,7 +4727,7 @@ function wppa_get_lbtitle( $type, $id ) {
4720
  ' type="button"' .
4721
  ' title="' . __( 'Download' , 'wp-photo-album-plus') . '"' .
4722
  ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' .
4723
- ' class="wppa-download-button"' .
4724
  ' onclick="wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo($id) .'\' );"' .
4725
  ' value="' . rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' .
4726
  wppa_get_photo_name( $id, wppa_switch( 'ovl_add_owner' ), false, false, wppa_switch( 'ovl_'.$type.'_name' ) ) ) .
@@ -4762,7 +4769,8 @@ function wppa_get_lbtitle( $type, $id ) {
4762
  $result .= '
4763
  <input' .
4764
  ' type="button"' .
4765
- ' style="float:right; margin-right:6px;" ' .
 
4766
  ' onclick="' . ( $type == 'slide' ? '_wppaStop( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' );"' .
4767
  ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
4768
  ' />';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.6.02
7
  *
8
  */
9
 
1142
  wppa_dbg_msg( 'Get_thumbs entered, mocc = ' . wppa( 'mocc' ) .
1143
  ', Start_album=' . wppa( 'start_album' ) . ', Cover=' . wppa( 'is_cover' ) );
1144
 
1145
+ /* debugging, disable for production!
1146
  global $wppa;
1147
  wppa_dbg_msg( 'wppa='.serialize($wppa) );
1148
  /* ens debugging */
2331
  }
2332
  }
2333
  else {
2334
+
2335
+ // SUCCESSFUL COMMENT, ADD POINTS to the commenter, if he is not the owner
2336
+ $photo_owner = wppa_get_photo_item( $photo, 'owner' );
2337
+
2338
+ if ( $photo_owner != wppa_get_user() ) {
2339
+
2340
+ wppa_add_credit_points( wppa_opt( 'cp_points_comment' ),
2341
  __( 'Photo comment' , 'wp-photo-album-plus'),
2342
+ $id
2343
+ );
2344
+ }
2345
 
2346
+ // Add points to the owner, if no moderation
2347
  if ( $status == 'approved' ) {
2348
+ wppa_add_credit_points( wppa_opt( 'cp_points_comment_appr' ),
2349
+ __( 'Photo comment approved' , 'wp-photo-album-plus'),
2350
+ $photo,
2351
+ '',
2352
+ $photo_owner
2353
  );
2354
  }
2355
 
4727
  ' type="button"' .
4728
  ' title="' . __( 'Download' , 'wp-photo-album-plus') . '"' .
4729
  ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' .
4730
+ ' class="wppa-download-button wppa-ovl-button"' .
4731
  ' onclick="wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo($id) .'\' );"' .
4732
  ' value="' . rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' .
4733
  wppa_get_photo_name( $id, wppa_switch( 'ovl_add_owner' ), false, false, wppa_switch( 'ovl_'.$type.'_name' ) ) ) .
4769
  $result .= '
4770
  <input' .
4771
  ' type="button"' .
4772
+ ' style="float:right; margin-right:6px;"' .
4773
+ ' class="wppa-ovl-button"' .
4774
  ' onclick="' . ( $type == 'slide' ? '_wppaStop( '.wppa( 'mocc' ).' );' : '' ) . 'wppaEditPhoto( '.wppa( 'mocc' ).', '.$parg.' );"' .
4775
  ' value="' . esc_attr( __( wppa_opt( 'fe_edit_button' ) ) ) . '"' .
4776
  ' />';
wppa-photo-admin-autosave.php CHANGED
@@ -78,7 +78,7 @@ global $wpdb;
78
  if ( $album == 'search' ) {
79
  $count = wppa_get_edit_search_photos( '', 'count_only' );
80
  $photos = wppa_get_edit_search_photos( $limit );
81
- $link = wppa_dbg_url( get_admin_url( 'admin.php' ) .
82
  '?page=wppa_admin_menu' .
83
  '&tab=edit' .
84
  '&edit_id=' . $album .
@@ -98,7 +98,7 @@ global $wpdb;
98
  $album
99
  ), ARRAY_A
100
  );
101
- $link = wppa_dbg_url( get_admin_url( 'admin.php' ) .
102
  '?page=wppa_admin_menu' .
103
  '&tab=edit' .
104
  '&edit_id=' . $album
@@ -134,7 +134,7 @@ global $wpdb;
134
  $owner
135
  ), ARRAY_A
136
  );
137
- $link = wppa_dbg_url( get_admin_url( 'admin.php' ) . '?page=wppa_edit_photo' );
138
  }
139
 
140
  // Moderate photos
@@ -184,7 +184,7 @@ global $wpdb;
184
  "ORDER BY `timestamp` DESC " .
185
  $limit, ARRAY_A
186
  );
187
- $link = wppa_dbg_url( get_admin_url( 'admin.php' ) . '?page=wppa_moderate_photos' );
188
  }
189
 
190
  // No photos to moderate
@@ -221,7 +221,7 @@ global $wpdb;
221
  $limit,
222
  ARRAY_A
223
  );
224
- $link = wppa_dbg_url( get_admin_url( 'admin.php' ).'?page=wppa_moderate_photos' );
225
  }
226
 
227
  // Nothing to do
78
  if ( $album == 'search' ) {
79
  $count = wppa_get_edit_search_photos( '', 'count_only' );
80
  $photos = wppa_get_edit_search_photos( $limit );
81
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
82
  '?page=wppa_admin_menu' .
83
  '&tab=edit' .
84
  '&edit_id=' . $album .
98
  $album
99
  ), ARRAY_A
100
  );
101
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
102
  '?page=wppa_admin_menu' .
103
  '&tab=edit' .
104
  '&edit_id=' . $album
134
  $owner
135
  ), ARRAY_A
136
  );
137
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_edit_photo' );
138
  }
139
 
140
  // Moderate photos
184
  "ORDER BY `timestamp` DESC " .
185
  $limit, ARRAY_A
186
  );
187
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' );
188
  }
189
 
190
  // No photos to moderate
221
  $limit,
222
  ARRAY_A
223
  );
224
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' );
225
  }
226
 
227
  // Nothing to do
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 6.4.18
6
  *
7
  */
8
 
@@ -122,6 +122,12 @@ function wppa_orientate_image_file( $file, $ori ) {
122
  // Output
123
  imagejpeg( $orientate, $file, wppa_opt( 'jpeg_quality' ) );
124
 
 
 
 
 
 
 
125
  // Free the memory
126
  imagedestroy( $source );
127
  @ imagedestroy( $orientate );
@@ -282,6 +288,9 @@ global $wpdb;
282
  // File successfully created ?
283
  if ( is_file ( $newimage ) ) {
284
 
 
 
 
285
  // Optimize file
286
  wppa_optimize_image_file( $newimage );
287
  }
@@ -539,13 +548,16 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
539
  $thumbpath = wppa_strip_ext( $thumbpath );
540
  switch ( $mime ) { // mime type
541
  case 1:
542
- imagegif( $dst, $thumbpath . '.gif' );
 
543
  break;
544
  case 2:
545
- imagejpeg( $dst, $thumbpath . '.jpg', wppa_opt( 'jpeg_quality' ) );
 
546
  break;
547
  case 3:
548
- imagepng( $dst, $thumbpath . '.png', 6 );
 
549
  break;
550
  }
551
 
@@ -553,8 +565,11 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
553
  imagedestroy( $src );
554
  imagedestroy( $dst );
555
 
 
 
 
556
  // Optimize
557
- wppa_optimize_image_file( $thumbpath );
558
 
559
  // Compute and save sizes
560
  wppa_get_thumbx( $id, 'force' ); // forces recalc x and y
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 6.6.02
6
  *
7
  */
8
 
122
  // Output
123
  imagejpeg( $orientate, $file, wppa_opt( 'jpeg_quality' ) );
124
 
125
+ // Accessable
126
+ wppa_chmod( $file );
127
+
128
+ // Optimized
129
+ wppa_optimize_image_file( $file );
130
+
131
  // Free the memory
132
  imagedestroy( $source );
133
  @ imagedestroy( $orientate );
288
  // File successfully created ?
289
  if ( is_file ( $newimage ) ) {
290
 
291
+ // Make sure file is accessable
292
+ wppa_chmod( $newimage );
293
+
294
  // Optimize file
295
  wppa_optimize_image_file( $newimage );
296
  }
548
  $thumbpath = wppa_strip_ext( $thumbpath );
549
  switch ( $mime ) { // mime type
550
  case 1:
551
+ $full_thumbpath = $thumbpath . '.gif';
552
+ imagegif( $dst, $full_thumbpath );
553
  break;
554
  case 2:
555
+ $full_thumbpath = $thumbpath . '.jpg';
556
+ imagejpeg( $dst, $full_thumbpath, wppa_opt( 'jpeg_quality' ) );
557
  break;
558
  case 3:
559
+ $full_thumbpath = $thumbpath . '.png';
560
+ imagepng( $dst, $full_thumbpath, 6 );
561
  break;
562
  }
563
 
565
  imagedestroy( $src );
566
  imagedestroy( $dst );
567
 
568
+ // Make sure file is accessable
569
+ wppa_chmod( $full_thumbpath );
570
+
571
  // Optimize
572
+ wppa_optimize_image_file( $full_thumbpath );
573
 
574
  // Compute and save sizes
575
  wppa_get_thumbx( $id, 'force' ); // forces recalc x and y
wppa-settings-autosave.php CHANGED
@@ -2312,7 +2312,9 @@ global $wp_version;
2312
  $desc = __('Disaplay the total number of (sub)albums and photos in subalbums', 'wp-photo-album-plus');
2313
  $help = esc_js(__('Displays the total number of sub albums and photos in the entire album tree in parenthesis if the numbers differ from the direct content of the album.', 'wp-photo-album-plus'));
2314
  $slug = 'wppa_show_treecount';
2315
- $html = wppa_checkbox($slug);
 
 
2316
  $clas = '';
2317
  $tags = 'cover,album,layout';
2318
  wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
@@ -2339,7 +2341,9 @@ global $wp_version;
2339
  $desc = __('Show photocount along with album title. ', 'wp-photo-album-plus');
2340
  $help = '';
2341
  $slug = 'wppa_count_on_title';
2342
- $html = wppa_checkbox($slug);
 
 
2343
  $clas = '';
2344
  $tags = 'cover,album,layout';
2345
  wppa_setting($slug, '8', $name, $desc, $html, $help, $clas, $tags);
2312
  $desc = __('Disaplay the total number of (sub)albums and photos in subalbums', 'wp-photo-album-plus');
2313
  $help = esc_js(__('Displays the total number of sub albums and photos in the entire album tree in parenthesis if the numbers differ from the direct content of the album.', 'wp-photo-album-plus'));
2314
  $slug = 'wppa_show_treecount';
2315
+ $opts = array( __('none', 'wp-photo-album-plus'), __('detailed', 'wp-photo-album-plus'), __('totals only', 'wp-photo-album-plus'));
2316
+ $vals = array( '-none-', 'detail', 'total' );
2317
+ $html = wppa_select($slug, $opts, $vals);
2318
  $clas = '';
2319
  $tags = 'cover,album,layout';
2320
  wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
2341
  $desc = __('Show photocount along with album title. ', 'wp-photo-album-plus');
2342
  $help = '';
2343
  $slug = 'wppa_count_on_title';
2344
+ $opts = array( __('none', 'wp-photo-album-plus'), __('top album only', 'wp-photo-album-plus'), __('total tree', 'wp-photo-album-plus'));
2345
+ $vals = array( '-none-', 'self', 'total' );
2346
+ $html = wppa_select($slug, $opts, $vals);
2347
  $clas = '';
2348
  $tags = 'cover,album,layout';
2349
  wppa_setting($slug, '8', $name, $desc, $html, $help, $clas, $tags);
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.6.01
7
  *
8
  */
9
 
@@ -473,6 +473,22 @@ global $silent;
473
  update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', get_option( 'wppa_bc_url', 'nil' ) ) );
474
  }
475
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
 
477
  }
478
 
@@ -841,10 +857,10 @@ Hide Camera info
841
  'wppa_enable_slideshow' => 'yes', // 2
842
  'wppa_show_slideshowbrowselink' => 'yes', // 3
843
  'wppa_show_viewlink' => 'yes', // 4
844
- 'wppa_show_treecount' => 'no',
845
  'wppa_show_cats' => 'no',
846
  'wppa_skip_empty_albums' => 'yes',
847
- 'wppa_count_on_title' => 'no',
848
 
849
 
850
  // E Widgets
@@ -1690,7 +1706,7 @@ function wppa_check_dirs() {
1690
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created uploads directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1691
  }
1692
  }
1693
- @ chmod($dir, 0755);
1694
  }
1695
 
1696
  // check if wppa dir exists
@@ -1705,7 +1721,7 @@ function wppa_check_dirs() {
1705
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1706
  }
1707
  }
1708
- @ chmod($dir, 0755);
1709
 
1710
  // check if thumbs dir exists
1711
  $dir = WPPA_UPLOAD_PATH.'/thumbs';
@@ -1719,7 +1735,7 @@ function wppa_check_dirs() {
1719
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa thumbs directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1720
  }
1721
  }
1722
- @ chmod($dir, 0755);
1723
 
1724
  // check if watermarks dir exists
1725
  $dir = WPPA_UPLOAD_PATH.'/watermarks';
@@ -1733,7 +1749,7 @@ function wppa_check_dirs() {
1733
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa watermarks directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1734
  }
1735
  }
1736
- @ chmod($dir, 0755);
1737
 
1738
  // check if fonts dir exists
1739
  $dir = WPPA_UPLOAD_PATH.'/fonts';
@@ -1747,7 +1763,7 @@ function wppa_check_dirs() {
1747
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa fonts directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1748
  }
1749
  }
1750
- @ chmod($dir, 0755);
1751
 
1752
  // check if depot dir exists
1753
  if ( ! is_multisite() ) {
@@ -1763,7 +1779,7 @@ function wppa_check_dirs() {
1763
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa depot directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1764
  }
1765
  }
1766
- @ chmod($dir, 0755);
1767
  }
1768
 
1769
  // check the user depot directory
@@ -1778,7 +1794,7 @@ function wppa_check_dirs() {
1778
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa user depot directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1779
  }
1780
  }
1781
- @ chmod($dir, 0755);
1782
 
1783
  // check the temp dir
1784
  $dir = WPPA_UPLOAD_PATH.'/temp/';
@@ -1792,7 +1808,7 @@ function wppa_check_dirs() {
1792
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created temp directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1793
  }
1794
  }
1795
- @ chmod($dir, 0755);
1796
 
1797
  return true;
1798
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.6.02
7
  *
8
  */
9
 
473
  update_option( 'wppa_bc_url', str_replace( '/images/', '/img/', get_option( 'wppa_bc_url', 'nil' ) ) );
474
  }
475
  }
476
+
477
+ if ( $old_rev <= '6602' ) {
478
+ if ( get_option( 'wppa_show_treecount' ) == 'yes' ) {
479
+ wppa_update_option( 'wppa_show_treecount', 'detail' );
480
+ }
481
+ if ( get_option( 'wppa_show_treecount' ) == 'no' ) {
482
+ wppa_update_option( 'wppa_show_treecount', '-none-' );
483
+ }
484
+ if ( get_option( 'wppa_count_on_title' ) == 'yes' ) {
485
+ wppa_update_option( 'wppa_count_on_title', 'detail' );
486
+ }
487
+ if ( get_option( 'wppa_count_on_title' ) == 'no' ) {
488
+ wppa_update_option( 'wppa_count_on_title', '-none-' );
489
+ }
490
+
491
+ }
492
 
493
  }
494
 
857
  'wppa_enable_slideshow' => 'yes', // 2
858
  'wppa_show_slideshowbrowselink' => 'yes', // 3
859
  'wppa_show_viewlink' => 'yes', // 4
860
+ 'wppa_show_treecount' => 'none',
861
  'wppa_show_cats' => 'no',
862
  'wppa_skip_empty_albums' => 'yes',
863
+ 'wppa_count_on_title' => 'none',
864
 
865
 
866
  // E Widgets
1706
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created uploads directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1707
  }
1708
  }
1709
+ wppa_chmod( $dir );
1710
  }
1711
 
1712
  // check if wppa dir exists
1721
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1722
  }
1723
  }
1724
+ wppa_chmod( $dir );
1725
 
1726
  // check if thumbs dir exists
1727
  $dir = WPPA_UPLOAD_PATH.'/thumbs';
1735
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa thumbs directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1736
  }
1737
  }
1738
+ wppa_chmod( $dir );
1739
 
1740
  // check if watermarks dir exists
1741
  $dir = WPPA_UPLOAD_PATH.'/watermarks';
1749
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa watermarks directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1750
  }
1751
  }
1752
+ wppa_chmod( $dir );
1753
 
1754
  // check if fonts dir exists
1755
  $dir = WPPA_UPLOAD_PATH.'/fonts';
1763
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa fonts directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1764
  }
1765
  }
1766
+ wppa_chmod( $dir );
1767
 
1768
  // check if depot dir exists
1769
  if ( ! is_multisite() ) {
1779
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa depot directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1780
  }
1781
  }
1782
+ wppa_chmod( $dir );
1783
  }
1784
 
1785
  // check the user depot directory
1794
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created wppa user depot directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1795
  }
1796
  }
1797
+ wppa_chmod( $dir );
1798
 
1799
  // check the temp dir
1800
  $dir = WPPA_UPLOAD_PATH.'/temp/';
1808
  if ( WPPA_DEBUG ) wppa_ok_message(__('Successfully created temp directory.', 'wp-photo-album-plus').'<br/>'.$dir);
1809
  }
1810
  }
1811
+ wppa_chmod( $dir );
1812
 
1813
  return true;
1814
  }
wppa-source.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains photo source file management routines
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -43,7 +43,10 @@ function wppa_save_source( $file, $name, $alb ) {
43
  }
44
  $dest = $albdir . '/' . wppa_sanitize_file_name( $name );
45
  if ( $file != $dest ) @ copy( $file, $dest ); // Do not copy to self, and do not bother on failure
46
- if ( ! is_file( $dest ) ) {
 
 
 
47
  wppa_log( 'Err', 'Could not save ' . $dest, true );
48
  }
49
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains photo source file management routines
6
+ * Version 6.6.02
7
  *
8
  */
9
 
43
  }
44
  $dest = $albdir . '/' . wppa_sanitize_file_name( $name );
45
  if ( $file != $dest ) @ copy( $file, $dest ); // Do not copy to self, and do not bother on failure
46
+ if ( is_file( $dest ) ) {
47
+ wppa_chmod( $dest );
48
+ }
49
+ else {
50
  wppa_log( 'Err', 'Could not save ' . $dest, true );
51
  }
52
  }
wppa-stereo.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the stereo stuff
6
- * Version 6.4.18
7
  *
8
  */
9
 
@@ -288,6 +288,12 @@ static $f114;
288
  break;
289
  }
290
 
 
 
 
 
 
 
291
  // Bump version
292
  wppa_bump_photo_rev();
293
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the stereo stuff
6
+ * Version 6.6.02
7
  *
8
  */
9
 
288
  break;
289
  }
290
 
291
+ // accessable
292
+ wppa_chmod( $tofile );
293
+
294
+ // Optimized
295
+ wppa_optimize_image_file( $tofile );
296
+
297
  // Bump version
298
  wppa_bump_photo_rev();
299
  }
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.6.01
7
  *
8
  */
9
 
@@ -2360,18 +2360,19 @@ function wppa_expand_enum( $enum ) {
2360
 
2361
  function wppa_mktree( $path ) {
2362
  if ( is_dir( $path ) ) {
2363
- @ chmod( $path, 0755 );
2364
  return true;
2365
  }
2366
  $bret = wppa_mktree( dirname( $path ) );
2367
  wppa_mkdir( $path );
2368
- @ chmod( $path, 0755 );
2369
  return ( is_dir( $path ) );
2370
  }
2371
 
2372
  function wppa_mkdir( $path ) {
2373
  if ( ! is_dir( $path ) ) {
2374
- @ mkdir( $path );
 
2375
  if ( is_dir( $path ) ) {
2376
  wppa_log( 'Obs', 'Created path: ' .$path );
2377
  }
@@ -2894,6 +2895,7 @@ function wppa_explode_csv( $txt ) {
2894
  function wppa_sanitize_text( $txt ) {
2895
  $result = sanitize_text_field( $txt );
2896
  $result = str_replace( array(chr(0), chr(1), chr(2), chr(3),chr(4), chr(5), chr(6), chr(7) ), '', $result );
 
2897
  return $result;
2898
  }
2899
 
@@ -3353,6 +3355,18 @@ function wppa_is_ie() {
3353
  $result = true;
3354
  }
3355
  }
3356
-
3357
  return $result;
 
 
 
 
 
 
 
 
 
 
 
 
3358
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.6.02
7
  *
8
  */
9
 
2360
 
2361
  function wppa_mktree( $path ) {
2362
  if ( is_dir( $path ) ) {
2363
+ wppa_chmod( $path );
2364
  return true;
2365
  }
2366
  $bret = wppa_mktree( dirname( $path ) );
2367
  wppa_mkdir( $path );
2368
+ wppa_chmod( $path );
2369
  return ( is_dir( $path ) );
2370
  }
2371
 
2372
  function wppa_mkdir( $path ) {
2373
  if ( ! is_dir( $path ) ) {
2374
+ mkdir( $path );
2375
+ wppa_chmod( $path );
2376
  if ( is_dir( $path ) ) {
2377
  wppa_log( 'Obs', 'Created path: ' .$path );
2378
  }
2895
  function wppa_sanitize_text( $txt ) {
2896
  $result = sanitize_text_field( $txt );
2897
  $result = str_replace( array(chr(0), chr(1), chr(2), chr(3),chr(4), chr(5), chr(6), chr(7) ), '', $result );
2898
+ $result = trim( $result );
2899
  return $result;
2900
  }
2901
 
3355
  $result = true;
3356
  }
3357
  }
3358
+
3359
  return $result;
3360
+ }
3361
+
3362
+ function wppa_chmod( $fso ) {
3363
+
3364
+ if ( is_dir( $fso ) ) {
3365
+ @ chmod( $fso, 0755 );
3366
+ }
3367
+
3368
+ if ( is_file( $fso ) ) {
3369
+ @ chmod( $fso, 0644 );
3370
+ }
3371
+
3372
  }
wppa-watermark.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
- * Version 6.4.18
6
  *
7
  */
8
 
@@ -440,6 +440,12 @@ function wppa_add_watermark( $id ) {
440
  break;
441
  }
442
 
 
 
 
 
 
 
443
  // Cleanup
444
  imagedestroy( $photoimage );
445
  imagedestroy( $waterimage );
2
  /* wppa-watermark.php
3
  *
4
  * Functions used for the application of watermarks
5
+ * Version 6.6.02
6
  *
7
  */
8
 
440
  break;
441
  }
442
 
443
+ // accessable
444
+ wppa_chmod( $file );
445
+
446
+ // Optimized
447
+ wppa_optimize_image_file( $file );
448
+
449
  // Cleanup
450
  imagedestroy( $photoimage );
451
  imagedestroy( $waterimage );
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: 6.6.01
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/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6600'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-6-01-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);
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: 6.6.02
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/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6602'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-6-02-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);