WP Photo Album Plus - Version 8.0.03.002

Version Description

= 8.0.03 =

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

Release Info

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

Code changes from version 8.0.03.001 to 8.0.03.002

changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 8.0.02 =
4
 
5
  * Further restructured javascript loading and inits. One can now also cache slideshows and slideshow widgets when defer javascript is on.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8.0.03 =
4
+
5
+ * Extended alternate ajax methods and fixed certain links.
6
+ If frontend ajax links do not work, you can select different ajax methods on Advanced settings -> System -> I Item 5: Ajax method. ('Normal' is default).
7
+ Classic is like pre ver 8 method 'Ajax non admin' ticked, Backend method is like pre ver 8 'Ajax non admin' unticked (uses admin-ajax).
8
+
9
+ If frontend upload does not work (give errors) set Advanced settings -> Users -> I Item 5.1: Upload Ajax method to 'extern' (like classic) or to 'backend' (uses admin-ajax). ('normal' is default).
10
+
11
+ Note on upload. If you want users to upload to sites that have a site password, i.e. where users do not need to login with their name, treat them as non logged in.
12
+ To allow uploads in this case: tick the box in Advanced settings -> Users -> I Item 32: Upload logout, and make sure the owners of the albums allowed to upload to are set to ---public---.
13
+ If you do not use the widget or the upload shortcode but let them upload using the album cover link, make sure empty albums are not skipped, to allow the first upload.
14
+ See Basic settings -> Albums -> II Item 7: Skip empty albums.
15
+
16
  = 8.0.02 =
17
 
18
  * Further restructured javascript loading and inits. One can now also cache slideshows and slideshow widgets when defer javascript is on.
readme.txt CHANGED
@@ -134,7 +134,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
134
 
135
  == Upgrade Notice ==
136
 
137
- = 8.0.02 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
134
 
135
  == Upgrade Notice ==
136
 
137
+ = 8.0.03 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 8.0.02.006
7
  *
8
  */
9
 
@@ -159,11 +159,11 @@ global $wppa_current_shortcode_atts;
159
 
160
  // Login requested?
161
  if ( $atts['login'] == 'yes' && ! is_user_logged_in() ) {
162
- wppa_bump_mocc();
163
  return '';
164
  }
165
  if ( $atts['login'] == 'admin' && ! wppa_user_is( 'administrator' ) ) {
166
- wppa_bump_mocc();
167
  return '';
168
  }
169
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.03.002
7
  *
8
  */
9
 
159
 
160
  // Login requested?
161
  if ( $atts['login'] == 'yes' && ! is_user_logged_in() ) {
162
+ // wppa_bump_mocc();
163
  return '';
164
  }
165
  if ( $atts['login'] == 'admin' && ! wppa_user_is( 'administrator' ) ) {
166
+ // wppa_bump_mocc();
167
  return '';
168
  }
169
 
wppa-photo-files.php CHANGED
@@ -179,7 +179,7 @@ wppa_log('dbg', 'make called with'.$file.' '.$id.' '.$ext.' '.$do_thumb. ' exist
179
  $name = '';
180
  break;
181
  }
182
- wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$thumb['filename'].', name = '.$name);
183
  wppa_update_photo( array( 'id' => $id,
184
  'ext' => 'jpg',
185
  'name' => $name
179
  $name = '';
180
  break;
181
  }
182
+ // wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$thumb['filename'].', name = '.$name);
183
  wppa_update_photo( array( 'id' => $id,
184
  'ext' => 'jpg',
185
  'name' => $name
wppa-scripts.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
- * Version 8.0.02.007
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
@@ -12,6 +12,7 @@ function wppa_initialize_javascript() {
12
  global $wppa_api_version;
13
  global $wppa_lang;
14
  global $wppa_session;
 
15
 
16
  /* wppa-utils.js */
17
  $result = '
@@ -308,7 +309,7 @@ global $wppa_session;
308
  break;
309
  }
310
 
311
- /* Language and confog specific inits */
312
  $result .= '
313
  wppaImageDirectory = "' . wppa_get_imgdir() . '",
314
  wppaWppaUrl = "' . wppa_get_wppa_url() . '",
@@ -495,6 +496,25 @@ global $wppa_session;
495
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'",
496
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
497
  wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
498
 
499
  // The photo views cache
500
  if ( isset( $wppa_session['photo'] ) ) {
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
+ * Version 8.0.03.002
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
12
  global $wppa_api_version;
13
  global $wppa_lang;
14
  global $wppa_session;
15
+ global $wpdb;
16
 
17
  /* wppa-utils.js */
18
  $result = '
309
  break;
310
  }
311
 
312
+ /* Language and config specific inits */
313
  $result .= '
314
  wppaImageDirectory = "' . wppa_get_imgdir() . '",
315
  wppaWppaUrl = "' . wppa_get_wppa_url() . '",
496
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'",
497
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
498
  wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";';
499
+
500
+ // Tinymce photo
501
+ if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
502
+ $id = $wpdb->get_var( "SELECT id FROM $wpdb->wppa_photos
503
+ WHERE ext <> 'xxx'
504
+ AND panorama = 0
505
+ ORDER BY timestamp DESC
506
+ LIMIT 1" );
507
+
508
+ // Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
509
+ wppa( 'in_widget', true );
510
+
511
+ $result .= '
512
+ wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
513
+ wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";';
514
+
515
+ // Reset faked widget
516
+ wppa( 'in_widget', false );
517
+ }
518
 
519
  // The photo views cache
520
  if ( isset( $wppa_session['photo'] ) ) {
wppa-tinymce-photo-front.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-photo-front.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 8.0.00.020
6
  *
7
  */
8
 
@@ -39,46 +39,3 @@ function wppa_filter_mce_photo_plugin_front( $plugins ) {
39
  $plugins['wppaphoto'] = plugin_dir_url( __FILE__ ) . $file;
40
  return $plugins;
41
  }
42
-
43
- add_action( 'wp_head', 'wppa_inject_3_js', '9' );
44
-
45
- function wppa_inject_3_js() {
46
- global $wppa_api_version;
47
- global $wpdb;
48
- global $wppa_js_page_data;
49
-
50
-
51
- if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
52
-
53
- // Find an existing photo
54
- $id = $wpdb->get_var( "SELECT id FROM $wpdb->wppa_photos
55
- WHERE ext <> 'xxx'
56
- AND panorama = 0
57
- ORDER BY timestamp DESC
58
- LIMIT 1" );
59
-
60
- // Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
61
- wppa( 'in_widget', true );
62
-
63
- // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
64
- $result = '
65
- <!-- START PHOTO sc and TynyMce fe vars from p-f -->
66
- <script>
67
- wppaImageDirectory = "' . wppa_get_imgdir() . '";
68
- wppaPhotoDirectory = "' . WPPA_UPLOAD_URL . '/";
69
- wppaNoPreview = "' . __( 'No Preview available', 'wp-photo-album-plus' ) . '";
70
- wppaTxtProcessing = "' . __( 'Processing...', 'wp-photo-album-plus' ) . '";
71
- wppaTxtDone = "' . __( 'Done!', 'wp-photo-album-plus' ) . '";
72
- wppaTxtErrUnable = "' . __( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ) . '";
73
- wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";
74
- wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
75
- wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";
76
- </script>
77
- <!-- END PHOTO and TynMce -->';
78
-
79
- $wppa_js_page_data .= $result;
80
-
81
- // Reset faked widget
82
- wppa( 'in_widget', false );
83
- }
84
- }
2
  /* wppa-tinymce-photo-front.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 8.0.03.002
6
  *
7
  */
8
 
39
  $plugins['wppaphoto'] = plugin_dir_url( __FILE__ ) . $file;
40
  return $plugins;
41
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 8.0.03.001
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.0.03.001'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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: 8.0.03.002
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.03.002'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30