WP Photo Album Plus - Version 6.6.25

Version Description

Download this release

Release Info

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

Code changes from version 6.6.24 to 6.6.25

js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '6.6.22';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -1481,11 +1481,11 @@ function _wppaSpeed( mocc, faster ) {
1481
 
1482
  function _wppaLoadSpinner( mocc ) {
1483
  return;
1484
-
1485
  if ( ! document.getElementById( 'slide_frame-'+mocc ) ) return; // filmonly
1486
 
1487
  jQuery( "#wppa-ajax-spin-" + mocc ).fadeIn( 3000 );
1488
-
1489
  }
1490
 
1491
  function _wppaUnloadSpinner( mocc ) {
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.6.25';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
1481
 
1482
  function _wppaLoadSpinner( mocc ) {
1483
  return;
1484
+ /*
1485
  if ( ! document.getElementById( 'slide_frame-'+mocc ) ) return; // filmonly
1486
 
1487
  jQuery( "#wppa-ajax-spin-" + mocc ).fadeIn( 3000 );
1488
+ */
1489
  }
1490
 
1491
  function _wppaUnloadSpinner( mocc ) {
js/wppa-slideshow.min.js CHANGED
@@ -4,7 +4,7 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
- var wppaJsSlideshowVersion='6.6.22';function wppaStoreSlideInfo(mocc,id,url,size,width,height,fullname,name,desc,photoid,avgrat,discount,myrat,rateurl,linkurl,linktitle,linktarget,iwtimeout,commenthtml,iptchtml,exifhtml,lbtitle,shareurl,smhtml,ogdsc,hiresurl,videohtml,audiohtml,waittext,imagealt,posterurl){var cursor;desc=wppaRepairScriptTags(desc);if(!_wppaSlides[mocc]||'0'==id){_wppaSlides[mocc]=[];_wppaNames[mocc]=[];_wppaFullNames[mocc]=[];_wppaDsc[mocc]=[];_wppaOgDsc[mocc]=[];_wppaCurIdx[mocc]=-1;_wppaNxtIdx[mocc]=0;if(parseInt(iwtimeout)>0)_wppaTimeOut[mocc]=parseInt(iwtimeout);else _wppaTimeOut[mocc]=wppaSlideShowTimeOut;_wppaSSRuns[mocc]=false;_wppaTP[mocc]=-2;_wppaFg[mocc]=0;_wppaIsBusy[mocc]=false;_wppaFirst[mocc]=true;_wppaId[mocc]=[];_wppaAvg[mocc]=[];_wppaDisc[mocc]=[];_wppaMyr[mocc]=[];_wppaVRU[mocc]=[];_wppaLinkUrl[mocc]=[];_wppaLinkTitle[mocc]=[];_wppaLinkTarget[mocc]=[];_wppaCommentHtml[mocc]=[];_wppaIptcHtml[mocc]=[];_wppaExifHtml[mocc]=[];_wppaUrl[mocc]=[];_wppaSkipRated[mocc]=false;_wppaLbTitle[mocc]=[];_wppaDidGoto[mocc]=false;wppaSlidePause[mocc]=false;_wppaShareUrl[mocc]=[];_wppaShareHtml[mocc]=[];_wppaFilmNoMove[mocc]=false;_wppaHiresUrl[mocc]=[];_wppaIsVideo[mocc]=[];_wppaVideoHtml[mocc]=[];_wppaAudioHtml[mocc]=[];_wppaVideoNatWidth[mocc]=[];_wppaVideoNatHeight[mocc]=[];wppaVideoPlaying[mocc]=false;wppaAudioPlaying[mocc]=false;_wppaWaitTexts[mocc]=[];_wppaImageAlt[mocc]=[];}
8
  cursor='default';if(linkurl!=''){cursor='pointer';}
9
  else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
10
  _wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
@@ -166,7 +166,7 @@ else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
166
  function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
167
  if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
168
  else{if(_wppaTimeOut[mocc]<60000)_wppaTimeOut[mocc]*=1.5;}}
169
- function _wppaLoadSpinner(mocc){return;if(!document.getElementById('slide_frame-'+mocc))return;jQuery("#wppa-ajax-spin-"+mocc).fadeIn(3000);}
170
  function _wppaUnloadSpinner(mocc){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();setTimeout(function(){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();},1000);}
171
  function _wppaCheckRewind(mocc){var n_images;var n_diff;var l_substrate;var x_marg;if(!document.getElementById('wppa-filmstrip-'+mocc))return;n_diff=Math.abs(_wppaCurIdx[mocc]-_wppaNxtIdx[mocc]);if(n_diff<=wppaFilmPageSize[mocc])return;var n_images=wppaFilmStripLength[mocc]/wppaThumbnailPitch[mocc];if(n_diff>=((n_images+1)/2)){l_substrate=wppaThumbnailPitch[mocc]*_wppaSlides[mocc].length;if(wppaFilmShowGlue)l_substrate+=(2+2*wppaFilmStripMargin[mocc]);x_marg=parseInt(jQuery('#wppa-filmstrip-'+mocc).css('margin-left'));if(_wppaNxtIdx[mocc]>_wppaCurIdx[mocc]){x_marg-=l_substrate;}
172
  else{x_marg+=l_substrate;}
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
 
7
+ var wppaJsSlideshowVersion='6.6.25';function wppaStoreSlideInfo(mocc,id,url,size,width,height,fullname,name,desc,photoid,avgrat,discount,myrat,rateurl,linkurl,linktitle,linktarget,iwtimeout,commenthtml,iptchtml,exifhtml,lbtitle,shareurl,smhtml,ogdsc,hiresurl,videohtml,audiohtml,waittext,imagealt,posterurl){var cursor;desc=wppaRepairScriptTags(desc);if(!_wppaSlides[mocc]||'0'==id){_wppaSlides[mocc]=[];_wppaNames[mocc]=[];_wppaFullNames[mocc]=[];_wppaDsc[mocc]=[];_wppaOgDsc[mocc]=[];_wppaCurIdx[mocc]=-1;_wppaNxtIdx[mocc]=0;if(parseInt(iwtimeout)>0)_wppaTimeOut[mocc]=parseInt(iwtimeout);else _wppaTimeOut[mocc]=wppaSlideShowTimeOut;_wppaSSRuns[mocc]=false;_wppaTP[mocc]=-2;_wppaFg[mocc]=0;_wppaIsBusy[mocc]=false;_wppaFirst[mocc]=true;_wppaId[mocc]=[];_wppaAvg[mocc]=[];_wppaDisc[mocc]=[];_wppaMyr[mocc]=[];_wppaVRU[mocc]=[];_wppaLinkUrl[mocc]=[];_wppaLinkTitle[mocc]=[];_wppaLinkTarget[mocc]=[];_wppaCommentHtml[mocc]=[];_wppaIptcHtml[mocc]=[];_wppaExifHtml[mocc]=[];_wppaUrl[mocc]=[];_wppaSkipRated[mocc]=false;_wppaLbTitle[mocc]=[];_wppaDidGoto[mocc]=false;wppaSlidePause[mocc]=false;_wppaShareUrl[mocc]=[];_wppaShareHtml[mocc]=[];_wppaFilmNoMove[mocc]=false;_wppaHiresUrl[mocc]=[];_wppaIsVideo[mocc]=[];_wppaVideoHtml[mocc]=[];_wppaAudioHtml[mocc]=[];_wppaVideoNatWidth[mocc]=[];_wppaVideoNatHeight[mocc]=[];wppaVideoPlaying[mocc]=false;wppaAudioPlaying[mocc]=false;_wppaWaitTexts[mocc]=[];_wppaImageAlt[mocc]=[];}
8
  cursor='default';if(linkurl!=''){cursor='pointer';}
9
  else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
10
  _wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
166
  function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
167
  if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
168
  else{if(_wppaTimeOut[mocc]<60000)_wppaTimeOut[mocc]*=1.5;}}
169
+ function _wppaLoadSpinner(mocc){return;}
170
  function _wppaUnloadSpinner(mocc){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();setTimeout(function(){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();},1000);}
171
  function _wppaCheckRewind(mocc){var n_images;var n_diff;var l_substrate;var x_marg;if(!document.getElementById('wppa-filmstrip-'+mocc))return;n_diff=Math.abs(_wppaCurIdx[mocc]-_wppaNxtIdx[mocc]);if(n_diff<=wppaFilmPageSize[mocc])return;var n_images=wppaFilmStripLength[mocc]/wppaThumbnailPitch[mocc];if(n_diff>=((n_images+1)/2)){l_substrate=wppaThumbnailPitch[mocc]*_wppaSlides[mocc].length;if(wppaFilmShowGlue)l_substrate+=(2+2*wppaFilmStripMargin[mocc]);x_marg=parseInt(jQuery('#wppa-filmstrip-'+mocc).css('margin-left'));if(_wppaNxtIdx[mocc]>_wppaCurIdx[mocc]){x_marg-=l_substrate;}
172
  else{x_marg+=l_substrate;}
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
5
- Version: 6.6.24
6
- Stable tag: 6.6.23
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
- Tested up to: 4.8-alpha-40396
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -180,6 +180,22 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.6.24 =
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, imagemagick
5
+ Version: 6.6.25
6
+ Stable tag: 6.6.24
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
+ Tested up to: 4.8-alpha-40557
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
183
+ = 6.6.25 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * Fixed a layout issue of the front-end upload dialog tags selection boxes: redundant empty lines removed.
188
+ * When the default photo sort order was order# or order# descending and the sort method on the album admin screen was set to default, the order number fields were not editable. Fixed.
189
+ * The fullscreen button on lightbox was under the lightbox image. Fixed the zIndex.
190
+
191
+ = New Features =
192
+
193
+ * You can now enter a default value for the New Tags input field on the front-end upload dialog. Table II-H13.1.
194
+
195
+ = Other Changes =
196
+
197
+ * The photo numbers on the photo admin pages when photos have been moved or deleted are now links to a single photo edit page, to be able to quickly correct erroneous moves or deletions.
198
+
199
  = 6.6.24 =
200
 
201
  = 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.20
7
  *
8
  */
9
 
@@ -1185,4 +1185,12 @@ global $wpdb;
1185
  echo ' <span style="color:red" >' . __('Deleted', 'wp-photo-album-plus' ) . '</span>';
1186
  }
1187
  }
 
 
 
 
 
 
 
 
1188
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 6.6.25
7
  *
8
  */
9
 
1185
  echo ' <span style="color:red" >' . __('Deleted', 'wp-photo-album-plus' ) . '</span>';
1186
  }
1187
  }
1188
+ }
1189
+
1190
+ // edit album url
1191
+ function wppa_ea_url($edit_id, $tab = 'edit') {
1192
+
1193
+ $nonce = wp_create_nonce('wppa_nonce');
1194
+
1195
+ return wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab='.$tab.'&amp;edit_id='.$edit_id.'&amp;wppa_nonce='.$nonce);
1196
  }
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.6.24
6
  *
7
  */
8
 
@@ -1017,7 +1017,8 @@ global $wppa_log_file;
1017
  $album = $wpdb->get_var( $wpdb->prepare( 'SELECT `album` FROM `'.WPPA_PHOTOS.'` WHERE `id` = %s', $photo ) );
1018
  wppa_delete_photo( $photo );
1019
  wppa_clear_cache();
1020
- echo '||1||<span style="color:red" >'.sprintf( __( 'Photo %s has been deleted' , 'wp-photo-album-plus'), $photo ).'</span>';
 
1021
  echo '||';
1022
  $a = wppa_allow_uploads( $album );
1023
  if ( ! $a ) echo 'full';
@@ -1760,9 +1761,11 @@ global $wppa_log_file;
1760
  wppa_invalidate_treecounts( $photodata['album'] ); // Current album
1761
  wppa_invalidate_treecounts( $value ); // New album
1762
  $iret = wppa_update_photo( array( 'id' => $photo, 'album' => $value ) ); // $wpdb->query( $wpdb->prepare( 'UPDATE '.WPPA_PHOTOS.' SET `album` = %s WHERE `id` = %s', $value, $photo ) );
 
1763
  if ( $iret !== false ) {
1764
  wppa_move_source( $photodata['filename'], $photodata['album'], $value );
1765
- echo '||99||'.sprintf( __( 'Photo %s has been moved to album %s (%s)' , 'wp-photo-album-plus'), $photo, wppa_get_album_name( $value ), $value );
 
1766
  }
1767
  else {
1768
  echo '||3||'.sprintf( __( 'An error occurred while trying to move photo %s' , 'wp-photo-album-plus'), $photo );
@@ -2913,7 +2916,8 @@ global $wppa_log_file;
2913
  case 'wppa_up_tagselbox_content_1':
2914
  case 'wppa_up_tagselbox_content_2':
2915
  case 'wppa_up_tagselbox_content_3':
2916
- $value = wppa_sanitize_tags( $value );
 
2917
  break;
2918
 
2919
  case 'wppa_wppa_set_shortcodes':
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.6.25
6
  *
7
  */
8
 
1017
  $album = $wpdb->get_var( $wpdb->prepare( 'SELECT `album` FROM `'.WPPA_PHOTOS.'` WHERE `id` = %s', $photo ) );
1018
  wppa_delete_photo( $photo );
1019
  wppa_clear_cache();
1020
+ $edit_link = wppa_ea_url( 'single', $tab = 'edit' ) . '&photo=' . $photo;
1021
+ echo '||1||<span style="color:red" >' . sprintf( __( 'Photo %s has been deleted' , 'wp-photo-album-plus'), '<a href="'.$edit_link.'" target="_blank" >' . $photo . '</a>' ) . '</span>';
1022
  echo '||';
1023
  $a = wppa_allow_uploads( $album );
1024
  if ( ! $a ) echo 'full';
1761
  wppa_invalidate_treecounts( $photodata['album'] ); // Current album
1762
  wppa_invalidate_treecounts( $value ); // New album
1763
  $iret = wppa_update_photo( array( 'id' => $photo, 'album' => $value ) ); // $wpdb->query( $wpdb->prepare( 'UPDATE '.WPPA_PHOTOS.' SET `album` = %s WHERE `id` = %s', $value, $photo ) );
1764
+ $edit_link = wppa_ea_url( 'single', $tab = 'edit' ) . '&photo=' . $photodata['id'];
1765
  if ( $iret !== false ) {
1766
  wppa_move_source( $photodata['filename'], $photodata['album'], $value );
1767
+ echo '||99||'.sprintf( __( 'Photo %s has been moved to album %s (%s)' , 'wp-photo-album-plus'), '<a href="'.$edit_link.'" target="_blank" >' . $photodata['id'] . '</a>', wppa_get_album_name( $value ), $value );
1768
+
1769
  }
1770
  else {
1771
  echo '||3||'.sprintf( __( 'An error occurred while trying to move photo %s' , 'wp-photo-album-plus'), $photo );
2916
  case 'wppa_up_tagselbox_content_1':
2917
  case 'wppa_up_tagselbox_content_2':
2918
  case 'wppa_up_tagselbox_content_3':
2919
+ case 'wppa_up_tagbox_new':
2920
+ $value = trim( wppa_sanitize_tags( $value ), ',' );
2921
  break;
2922
 
2923
  case 'wppa_wppa_set_shortcodes':
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 6.6.22
7
  *
8
  */
9
 
@@ -40,7 +40,7 @@ function _wppa_admin() {
40
  // Fix orphan albums and deleted target pages
41
  $albs = $wpdb->get_results("SELECT * FROM `" . WPPA_ALBUMS . "`", ARRAY_A);
42
 
43
- // Now we have tham, put them in cache
44
  wppa_cache_album( 'add', $albs );
45
 
46
  if ( $albs ) {
@@ -62,12 +62,31 @@ function _wppa_admin() {
62
  if ($_REQUEST['tab'] == 'edit'){
63
  if ( isset($_REQUEST['edit_id']) ) {
64
  $ei = $_REQUEST['edit_id'];
65
- if ( $ei != 'new' && $ei != 'search' && $ei != 'trash' && ! is_numeric($ei) ) {
66
  wp_die('Security check failure 1');
67
  }
 
 
 
68
  }
69
 
70
- if ($_REQUEST['edit_id'] == 'search') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  $back_url = get_admin_url().'admin.php?page=wppa_admin_menu';
73
  if ( isset ( $_REQUEST['wppa-searchstring'] ) ) {
@@ -1029,7 +1048,7 @@ function wppaTryScheduleAll( id ) {
1029
 
1030
  // Create subalbum
1031
  if ( wppa_can_create_album() ) {
1032
- $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['id'] );
1033
  if ( wppa_switch( 'confirm_create' ) ) {
1034
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1035
  }
@@ -1047,7 +1066,7 @@ function wppaTryScheduleAll( id ) {
1047
  // Create sibling
1048
  if ( $albuminfo['a_parent'] > '0' && wppa_can_create_album() ||
1049
  $albuminfo['a_parent'] < '1' && wppa_can_create_top_album() ) {
1050
- $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['a_parent'] );
1051
  if ( wppa_switch( 'confirm_create' ) ) {
1052
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1053
  }
@@ -1064,7 +1083,7 @@ function wppaTryScheduleAll( id ) {
1064
 
1065
  // Edit parent
1066
  if ( $albuminfo['a_parent'] > '0' && wppa_album_exists( $albuminfo['a_parent'] ) && wppa_have_access( $albuminfo['a_parent'] ) ) {
1067
- $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=' . $albuminfo['a_parent'] );
1068
  $onc = 'document.location=\''.$url.'\';';
1069
  echo
1070
  '<input' .
@@ -1248,9 +1267,9 @@ function wppaTryScheduleAll( id ) {
1248
  <?php
1249
  // The Create new album button
1250
  if ( wppa_can_create_top_album() ) {
1251
- $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new');
1252
  $vfy = __('Are you sure you want to create a new album?', 'wp-photo-album-plus');
1253
- echo '<form method="post" action="'.get_admin_url().'admin.php?page=wppa_admin_menu" style="float:left; margin-right:12px;" >';
1254
  echo '<input type="hidden" name="tab" value="edit" />';
1255
  echo '<input type="hidden" name="edit_id" value="new" />';
1256
  $onc = wppa_switch( 'confirm_create' ) ? 'onclick="return confirm(\''.$vfy.'\');"' : '';
@@ -1539,7 +1558,7 @@ global $wpdb;
1539
  <?php $url = wppa_ea_url($album['id'], 'del') ?>
1540
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
1541
  <?php if ( wppa_can_create_album() ) {
1542
- $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$album['id']);
1543
  if ( wppa_switch( 'confirm_create' ) ) {
1544
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1545
  echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
@@ -2386,12 +2405,7 @@ global $wpdb;
2386
  return $output;
2387
  }
2388
 
2389
- function wppa_ea_url($edit_id, $tab = 'edit') {
2390
 
2391
- $nonce = wp_create_nonce('wppa_nonce');
2392
- // $referrer = $_SERVER["REQUEST_URI"];
2393
- return wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab='.$tab.'&amp;edit_id='.$edit_id.'&amp;wppa_nonce='.$nonce);
2394
- }
2395
 
2396
  // Edit (sub)album sequence
2397
  function wppa_album_sequence( $parent ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 6.6.25
7
  *
8
  */
9
 
40
  // Fix orphan albums and deleted target pages
41
  $albs = $wpdb->get_results("SELECT * FROM `" . WPPA_ALBUMS . "`", ARRAY_A);
42
 
43
+ // Now we have them, put them in cache
44
  wppa_cache_album( 'add', $albs );
45
 
46
  if ( $albs ) {
62
  if ($_REQUEST['tab'] == 'edit'){
63
  if ( isset($_REQUEST['edit_id']) ) {
64
  $ei = $_REQUEST['edit_id'];
65
+ if ( $ei != 'new' && $ei != 'search' && $ei != 'trash' && $ei != 'single' && ! is_numeric($ei) ) {
66
  wp_die('Security check failure 1');
67
  }
68
+ if ( ! wp_verify_nonce( $_REQUEST['wppa_nonce'], 'wppa_nonce' ) ) {
69
+ wp_die('Security check failure 2');
70
+ }
71
  }
72
 
73
+ if ( $_REQUEST['edit_id'] == 'single' ) {
74
+ ?>
75
+ <div class="wrap">
76
+ <h2><?php _e( 'Edit Single Photo', 'wp-photo-album-plus' );
77
+ echo ' - <small><i>'.__('Edit photo information', 'wp-photo-album-plus').'</i></small>';
78
+ ?>
79
+ </h2>
80
+ <?php
81
+ wppa_album_photos($ei);
82
+ ?>
83
+ </div>
84
+ <?php
85
+
86
+ return;
87
+ }
88
+
89
+ if ( $_REQUEST['edit_id'] == 'search' ) {
90
 
91
  $back_url = get_admin_url().'admin.php?page=wppa_admin_menu';
92
  if ( isset ( $_REQUEST['wppa-searchstring'] ) ) {
1048
 
1049
  // Create subalbum
1050
  if ( wppa_can_create_album() ) {
1051
+ $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['id'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1052
  if ( wppa_switch( 'confirm_create' ) ) {
1053
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1054
  }
1066
  // Create sibling
1067
  if ( $albuminfo['a_parent'] > '0' && wppa_can_create_album() ||
1068
  $albuminfo['a_parent'] < '1' && wppa_can_create_top_album() ) {
1069
+ $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['a_parent'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1070
  if ( wppa_switch( 'confirm_create' ) ) {
1071
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1072
  }
1083
 
1084
  // Edit parent
1085
  if ( $albuminfo['a_parent'] > '0' && wppa_album_exists( $albuminfo['a_parent'] ) && wppa_have_access( $albuminfo['a_parent'] ) ) {
1086
+ $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=' . $albuminfo['a_parent'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1087
  $onc = 'document.location=\''.$url.'\';';
1088
  echo
1089
  '<input' .
1267
  <?php
1268
  // The Create new album button
1269
  if ( wppa_can_create_top_album() ) {
1270
+ $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
1271
  $vfy = __('Are you sure you want to create a new album?', 'wp-photo-album-plus');
1272
+ echo '<form method="post" action="'.get_admin_url().'admin.php?page=wppa_admin_menu&wppa_nonce='.wp_create_nonce('wppa_nonce').'" style="float:left; margin-right:12px;" >';
1273
  echo '<input type="hidden" name="tab" value="edit" />';
1274
  echo '<input type="hidden" name="edit_id" value="new" />';
1275
  $onc = wppa_switch( 'confirm_create' ) ? 'onclick="return confirm(\''.$vfy.'\');"' : '';
1558
  <?php $url = wppa_ea_url($album['id'], 'del') ?>
1559
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
1560
  <?php if ( wppa_can_create_album() ) {
1561
+ $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$album['id'].'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
1562
  if ( wppa_switch( 'confirm_create' ) ) {
1563
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1564
  echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
2405
  return $output;
2406
  }
2407
 
 
2408
 
 
 
 
 
2409
 
2410
  // Edit (sub)album sequence
2411
  function wppa_album_sequence( $parent ) {
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.6.19
7
  *
8
  */
9
 
@@ -2664,7 +2664,7 @@ static $albums_granted;
2664
  ' onchange="'.$onc.'"' .
2665
  ' >';
2666
  if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
2667
- $tags = explode( ',', wppa_opt( 'up_tagselbox_content_'.$i ) );
2668
  $result .= '<option value="" >&nbsp;</option>';
2669
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2670
  $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
@@ -2693,6 +2693,7 @@ static $albums_granted;
2693
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2694
  ' name="wppa-new-tags"' .
2695
  ' onchange="'.$onc.'"' .
 
2696
  ' />';
2697
  }
2698
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.6.25
7
  *
8
  */
9
 
2664
  ' onchange="'.$onc.'"' .
2665
  ' >';
2666
  if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
2667
+ $tags = explode( ',', trim( wppa_opt( 'up_tagselbox_content_'.$i ), ',' ) );
2668
  $result .= '<option value="" >&nbsp;</option>';
2669
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2670
  $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
2693
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2694
  ' name="wppa-new-tags"' .
2695
  ' onchange="'.$onc.'"' .
2696
+ ' value="'.trim(wppa_opt('up_tagbox_new'), ',').'"' .
2697
  ' />';
2698
  }
2699
 
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 6.6.12
7
  *
8
  */
9
 
@@ -229,14 +229,31 @@ global $wppa_session;
229
  esc_attr( sprintf( __( 'Searchresults from album %s and its subalbums' , 'wp-photo-album-plus'),
230
  wppa_display_root( $searchroot ) ) ).'">*</span> ' :
231
  '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  if ( wppa( 'is_slide' ) ) {
233
- $value = __( 'Searchstring:' , 'wp-photo-album-plus') . ' ' . ( isset ( $wppa_session['display_searchstring'] ) ? $wppa_session['display_searchstring'] : stripslashes( wppa( 'searchstring' ) ) ) . $albtxt;
234
  $thumbhref = wppa_get_permalink().'wppa-cover=0&amp;wppa-occur='.wppa( 'occur' ).'&amp;wppa-searchstring='.stripslashes( str_replace( ' ', '+', $wppa_session['use_searchstring'] ) );
235
  $thumbajax = wppa_get_ajaxlink().'wppa-cover=0&amp;wppa-occur='.wppa( 'occur' ).'&amp;wppa-searchstring='.stripslashes( str_replace( ' ', '+', $wppa_session['use_searchstring'] ) );
236
  $title = __( 'View the thumbnails' , 'wp-photo-album-plus');
237
  wppa_bcitem( $value, $thumbhref, $title, 'b8', $thumbajax );
238
  }
239
- $value = __( 'Searchstring:' , 'wp-photo-album-plus') . ' ' . ( isset ( $wppa_session['display_searchstring'] ) ? $wppa_session['display_searchstring'] : stripslashes( wppa( 'searchstring' ) ) ) . $albtxt;
240
  $href = '';
241
  $title = isset ( $wppa_session['display_searchstring'] ) ? wppa_dss_to_title( $wppa_session['display_searchstring'] ) : '';
242
  wppa_bcitem( $value, $href, $title, 'b9' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 6.6.25
7
  *
8
  */
9
 
229
  esc_attr( sprintf( __( 'Searchresults from album %s and its subalbums' , 'wp-photo-album-plus'),
230
  wppa_display_root( $searchroot ) ) ).'">*</span> ' :
231
  '';
232
+
233
+ // Make the searchstring text
234
+ $value = __( 'Searchstring:', 'wp-photo-album-plus' ) . ' ';
235
+ if ( isset ( $wppa_session['display_searchstring'] ) && $wppa_session['display_searchstring'] ) {
236
+ $value .= $wppa_session['display_searchstring'];
237
+ }
238
+ elseif ( wppa( 'searchstring' ) ) {
239
+ $value .= stripslashes( wppa( 'searchstring' ) );
240
+ }
241
+ elseif ( isset( $_REQUEST['wppa-searchstring'] ) ) {
242
+ $value .= $_REQUEST['wppa-searchstring'];
243
+ }
244
+ elseif ( isset( $_REQUEST['searchstring'] ) ) {
245
+ $value .= $_REQUEST['searchstring'];
246
+ }
247
+ $value .= $albtxt;
248
+
249
  if ( wppa( 'is_slide' ) ) {
250
+ // $value = __( 'Searchstring:' , 'wp-photo-album-plus') . ' ' . ( isset ( $wppa_session['display_searchstring'] ) ? $wppa_session['display_searchstring'] : stripslashes( wppa( 'searchstring' ) ) ) . $albtxt;
251
  $thumbhref = wppa_get_permalink().'wppa-cover=0&amp;wppa-occur='.wppa( 'occur' ).'&amp;wppa-searchstring='.stripslashes( str_replace( ' ', '+', $wppa_session['use_searchstring'] ) );
252
  $thumbajax = wppa_get_ajaxlink().'wppa-cover=0&amp;wppa-occur='.wppa( 'occur' ).'&amp;wppa-searchstring='.stripslashes( str_replace( ' ', '+', $wppa_session['use_searchstring'] ) );
253
  $title = __( 'View the thumbnails' , 'wp-photo-album-plus');
254
  wppa_bcitem( $value, $thumbhref, $title, 'b8', $thumbajax );
255
  }
256
+ // $value = __( 'Searchstring:' , 'wp-photo-album-plus') . ' ' . ( isset ( $wppa_session['display_searchstring'] ) ? $wppa_session['display_searchstring'] : stripslashes( wppa( 'searchstring' ) ) ) . $albtxt;
257
  $href = '';
258
  $title = isset ( $wppa_session['display_searchstring'] ) ? wppa_dss_to_title( $wppa_session['display_searchstring'] ) : '';
259
  wppa_bcitem( $value, $href, $title, 'b9' );
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 6.6.22
7
  *
8
  */
9
 
@@ -453,7 +453,7 @@ global $wppa_session;
453
  echo
454
  '<div' .
455
  ' id="wppa-fulls-btn"' .
456
- ' style="height:48px;z-index:100092;position:fixed;top:0;right:48px;opacity:0.75;"' .
457
  ' onclick="wppaOvlFull()"' .
458
  ' onmouseover="jQuery(this).stop().fadeTo(300,1);"' .
459
  // ' ontouchstart="jQuery(this).stop().fadeTo(300,1);"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.6.25
7
  *
8
  */
9
 
453
  echo
454
  '<div' .
455
  ' id="wppa-fulls-btn"' .
456
+ ' style="height:48px;z-index:100098;position:fixed;top:0;right:48px;opacity:0.75;"' .
457
  ' onclick="wppaOvlFull()"' .
458
  ' onmouseover="jQuery(this).stop().fadeTo(300,1);"' .
459
  // ' ontouchstart="jQuery(this).stop().fadeTo(300,1);"' .
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.6.22
7
  *
8
  */
9
 
@@ -85,6 +85,7 @@ global $wpdb;
85
  '?page=wppa_admin_menu' .
86
  '&tab=edit' .
87
  '&edit_id=' . $album .
 
88
  '&wppa-searchstring=' . wppa_sanitize_searchstring( $_REQUEST['wppa-searchstring'] )
89
  );
90
  }
@@ -97,10 +98,20 @@ global $wpdb;
97
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
98
  '?page=wppa_admin_menu' .
99
  '&tab=edit' .
100
- '&edit_id=trash'
 
101
  );
102
  }
103
 
 
 
 
 
 
 
 
 
 
104
  // A physical album
105
  else {
106
  $counts = wppa_get_treecounts_a( $album, true );
@@ -116,7 +127,8 @@ global $wpdb;
116
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
117
  '?page=wppa_admin_menu' .
118
  '&tab=edit' .
119
- '&edit_id=' . $album
 
120
  );
121
  }
122
  }
@@ -149,7 +161,7 @@ global $wpdb;
149
  $owner
150
  ), ARRAY_A
151
  );
152
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_edit_photo' );
153
  }
154
 
155
  // Moderate photos
@@ -199,7 +211,7 @@ global $wpdb;
199
  "ORDER BY `timestamp` DESC " .
200
  $limit, ARRAY_A
201
  );
202
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' );
203
  }
204
 
205
  // No photos to moderate
@@ -236,7 +248,7 @@ global $wpdb;
236
  $limit,
237
  ARRAY_A
238
  );
239
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' );
240
  }
241
 
242
  // Nothing to do
@@ -509,7 +521,18 @@ function wppaTryScheduledel( id ) {
509
 
510
  // Various usefull vars
511
  $owner_editable = wppa_switch( 'photo_owner_change' ) && wppa_user_is( 'administrator' );
512
- $sortby_orderno = wppa_get_album_item( $album, 'p_order_by' ) == '1' || wppa_get_album_item( $album, 'p_order_by' ) == '-1';
 
 
 
 
 
 
 
 
 
 
 
513
  $wms = array( 'toplft' => __( 'top - left' , 'wp-photo-album-plus'), 'topcen' => __( 'top - center' , 'wp-photo-album-plus'), 'toprht' => __( 'top - right' , 'wp-photo-album-plus'),
514
  'cenlft' => __( 'center - left' , 'wp-photo-album-plus'), 'cencen' => __( 'center - center' , 'wp-photo-album-plus'), 'cenrht' => __( 'center - right' , 'wp-photo-album-plus'),
515
  'botlft' => __( 'bottom - left' , 'wp-photo-album-plus'), 'botcen' => __( 'bottom - center' , 'wp-photo-album-plus'), 'botrht' => __( 'bottom - right' , 'wp-photo-album-plus'), );
@@ -2199,14 +2222,14 @@ echo 'Page='.$page;
2199
  if ( $album == 'search' ) {
2200
  $count = wppa_get_edit_search_photos( '', 'count_only' );
2201
  $photos = wppa_get_edit_search_photos( $limit );
2202
- $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&wppa-searchstring='.wppa_sanitize_searchstring($_REQUEST['wppa-searchstring']).'&bulk' );
2203
  wppa_show_search_statistics();
2204
  }
2205
  else {
2206
  $counts = wppa_get_treecounts_a( $album, true );
2207
  $count = $counts['selfphotos'] + $counts['pendselfphotos'] + $counts['scheduledselfphotos'];
2208
  $photos = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `album` = %s '.wppa_get_photo_order( $album, 'norandom' ).$limit, $album ), ARRAY_A );
2209
- $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&bulk' );
2210
  }
2211
 
2212
  if ( $photos ) {
@@ -2447,6 +2470,7 @@ function wppaSetConfirmMove( id ) {
2447
  });
2448
  </script>
2449
  </h3>
 
2450
  <table class="widefat" >
2451
  <thead style="font-weight:bold;" >
2452
  <td><input type="checkbox" class="wppa-bulk-photo" onchange="jQuery( '.wppa-bulk-photo' ).attr( 'checked', this.checked );" /></td>
@@ -2471,7 +2495,12 @@ function wppaSetConfirmMove( id ) {
2471
  <!-- ID and delete link -->
2472
  <td><?php
2473
  echo
2474
- $photo['id'] .
 
 
 
 
 
2475
  '<br />' .
2476
  '<a' .
2477
  ' id="wppa-delete-' . $photo['id'] . '"' .
@@ -2479,7 +2508,7 @@ function wppaSetConfirmMove( id ) {
2479
  confirm( \'' . esc_js( __( 'Are you sure you want to delete this photo?', 'wp-photo-album-plus' ) ) . '\' ) ) {
2480
  jQuery(this).html( \'' . esc_js( __('Deleting...', 'wp-photo-album-plus') ) . '\' );
2481
  wppaAjaxDeletePhoto( \'' . $photo['id'] . '\', \'<td colspan=8 >\', \'</td>\' ) }"' .
2482
- ' style="color:red;font-weight:bold;"' .
2483
  ' >' .
2484
  __( 'Delete', 'wp-photo-album-plus' ) .
2485
  '</a>';
@@ -2667,7 +2696,7 @@ global $wpdb;
2667
  $is_descending = strpos( $photoorder, 'DESC' ) !== false;
2668
  $is_p_order = strpos( $photoorder, 'p_order' ) !== false;
2669
  $photos = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `album` = %s '.$photoorder, $album ), ARRAY_A );
2670
- $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&bulk' );
2671
  $size = '180';
2672
 
2673
  if ( $photos ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.6.25
7
  *
8
  */
9
 
85
  '?page=wppa_admin_menu' .
86
  '&tab=edit' .
87
  '&edit_id=' . $album .
88
+ '&wppa_nonce=' . wp_create_nonce('wppa_nonce') .
89
  '&wppa-searchstring=' . wppa_sanitize_searchstring( $_REQUEST['wppa-searchstring'] )
90
  );
91
  }
98
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
99
  '?page=wppa_admin_menu' .
100
  '&tab=edit' .
101
+ '&edit_id=trash' .
102
+ '&wppa_nonce=' . wp_create_nonce('wppa_nonce')
103
  );
104
  }
105
 
106
+ // A single photo
107
+ elseif ( $album == 'single' ) {
108
+ $p = strval( intval( $_REQUEST['photo'] ) );
109
+ $count = $p ? 1 : 0;
110
+ $photos = $wpdb->get_results( "SELECT * FROM `" . WPPA_PHOTOS . "` WHERE `id` = '$p'", ARRAY_A );
111
+ $count = count( $photos );
112
+ $link = '';
113
+ }
114
+
115
  // A physical album
116
  else {
117
  $counts = wppa_get_treecounts_a( $album, true );
127
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
128
  '?page=wppa_admin_menu' .
129
  '&tab=edit' .
130
+ '&edit_id=' . $album .
131
+ '&wppa_nonce=' . wp_create_nonce('wppa_nonce')
132
  );
133
  }
134
  }
161
  $owner
162
  ), ARRAY_A
163
  );
164
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_edit_photo' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
165
  }
166
 
167
  // Moderate photos
211
  "ORDER BY `timestamp` DESC " .
212
  $limit, ARRAY_A
213
  );
214
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
215
  }
216
 
217
  // No photos to moderate
248
  $limit,
249
  ARRAY_A
250
  );
251
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
252
  }
253
 
254
  // Nothing to do
521
 
522
  // Various usefull vars
523
  $owner_editable = wppa_switch( 'photo_owner_change' ) && wppa_user_is( 'administrator' );
524
+ switch ( wppa_get_album_item( $album, 'p_order_by' ) ) {
525
+ case '0':
526
+ $temp = wppa_opt( 'list_photos_by' );
527
+ $sortby_orderno = ( $temp == '-1' || $temp == '1' );
528
+ break;
529
+ case '-1':
530
+ case '1':
531
+ $sortby_orderno = true;
532
+ break;
533
+ default:
534
+ $sortby_orderno = false;
535
+ }
536
  $wms = array( 'toplft' => __( 'top - left' , 'wp-photo-album-plus'), 'topcen' => __( 'top - center' , 'wp-photo-album-plus'), 'toprht' => __( 'top - right' , 'wp-photo-album-plus'),
537
  'cenlft' => __( 'center - left' , 'wp-photo-album-plus'), 'cencen' => __( 'center - center' , 'wp-photo-album-plus'), 'cenrht' => __( 'center - right' , 'wp-photo-album-plus'),
538
  'botlft' => __( 'bottom - left' , 'wp-photo-album-plus'), 'botcen' => __( 'bottom - center' , 'wp-photo-album-plus'), 'botrht' => __( 'bottom - right' , 'wp-photo-album-plus'), );
2222
  if ( $album == 'search' ) {
2223
  $count = wppa_get_edit_search_photos( '', 'count_only' );
2224
  $photos = wppa_get_edit_search_photos( $limit );
2225
+ $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&wppa-searchstring='.wppa_sanitize_searchstring($_REQUEST['wppa-searchstring']).'&bulk'.'&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
2226
  wppa_show_search_statistics();
2227
  }
2228
  else {
2229
  $counts = wppa_get_treecounts_a( $album, true );
2230
  $count = $counts['selfphotos'] + $counts['pendselfphotos'] + $counts['scheduledselfphotos'];
2231
  $photos = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `album` = %s '.wppa_get_photo_order( $album, 'norandom' ).$limit, $album ), ARRAY_A );
2232
+ $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&bulk'.'&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
2233
  }
2234
 
2235
  if ( $photos ) {
2470
  });
2471
  </script>
2472
  </h3>
2473
+ <?php $edit_link = wppa_ea_url( 'single', $tab = 'edit' ) ?>
2474
  <table class="widefat" >
2475
  <thead style="font-weight:bold;" >
2476
  <td><input type="checkbox" class="wppa-bulk-photo" onchange="jQuery( '.wppa-bulk-photo' ).attr( 'checked', this.checked );" /></td>
2495
  <!-- ID and delete link -->
2496
  <td><?php
2497
  echo
2498
+ '<a' .
2499
+ ' href="' . $edit_link . '&photo=' . $photo['id'] . '"' .
2500
+ ' target="_blank"' .
2501
+ ' >' .
2502
+ $photo['id'] .
2503
+ '</a>' .
2504
  '<br />' .
2505
  '<a' .
2506
  ' id="wppa-delete-' . $photo['id'] . '"' .
2508
  confirm( \'' . esc_js( __( 'Are you sure you want to delete this photo?', 'wp-photo-album-plus' ) ) . '\' ) ) {
2509
  jQuery(this).html( \'' . esc_js( __('Deleting...', 'wp-photo-album-plus') ) . '\' );
2510
  wppaAjaxDeletePhoto( \'' . $photo['id'] . '\', \'<td colspan=8 >\', \'</td>\' ) }"' .
2511
+ ' style="color:red;font-weight:bold;cursor:pointer;"' .
2512
  ' >' .
2513
  __( 'Delete', 'wp-photo-album-plus' ) .
2514
  '</a>';
2696
  $is_descending = strpos( $photoorder, 'DESC' ) !== false;
2697
  $is_p_order = strpos( $photoorder, 'p_order' ) !== false;
2698
  $photos = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM `'.WPPA_PHOTOS.'` WHERE `album` = %s '.$photoorder, $album ), ARRAY_A );
2699
+ $link = wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id='.$album.'&bulk'.'&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
2700
  $size = '180';
2701
 
2702
  if ( $photos ) {
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.6.24
7
  *
8
  */
9
 
@@ -2900,6 +2900,15 @@ global $wp_version;
2900
  $tags = 'upload';
2901
  wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
2902
 
 
 
 
 
 
 
 
 
 
2903
  $name = __('Preview tags', 'wp-photo-album-plus');
2904
  $desc = __('Show a preview of all tags that will be added to the photo info.', 'wp-photo-album-plus');
2905
  $help = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.6.25
7
  *
8
  */
9
 
2900
  $tags = 'upload';
2901
  wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
2902
 
2903
+ $name = __('Tags box New', 'wp-photo-album-plus');
2904
+ $desc = __('The tags in the New tags input box.', 'wp-photo-album-plus');
2905
+ $help = '';
2906
+ $slug = 'wppa_up_tagbox_new';
2907
+ $html = wppa_edit( $slug, get_option( $slug ), '300px' );
2908
+ $clas = 'wppa_feup wppa_up_tags';
2909
+ $tags = 'upload';
2910
+ wppa_setting($slug, '13.1', $name, $desc, $html, $help, $clas, $tags);
2911
+
2912
  $name = __('Preview tags', 'wp-photo-album-plus');
2913
  $desc = __('Show a preview of all tags that will be added to the photo info.', 'wp-photo-album-plus');
2914
  $help = '';
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.24
7
  *
8
  */
9
 
@@ -969,6 +969,7 @@ Hide Camera info
969
  'wppa_up_tagselbox_content_3' => '',
970
  'wppa_up_tag_input_on' => 'yes',
971
  'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
 
972
  'wppa_up_tag_preview' => 'yes',
973
  'wppa_camera_connect' => 'yes',
974
  'wppa_blog_it' => '-none-',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.6.25
7
  *
8
  */
9
 
969
  'wppa_up_tagselbox_content_3' => '',
970
  'wppa_up_tag_input_on' => 'yes',
971
  'wppa_up_tag_input_title' => __( 'Enter new tags:' , 'wp-photo-album-plus'),
972
+ 'wppa_up_tagbox_new' => '',
973
  'wppa_up_tag_preview' => 'yes',
974
  'wppa_camera_connect' => 'yes',
975
  'wppa_blog_it' => '-none-',
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.24
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 = '6624'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-6-24-010'; // 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.25
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 = '6625'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-6-25-002'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );