Version Description
= 8.0.02 =
- This version addresses various minor bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.0.02.010 |
Comparing to | |
See all releases |
Code changes from version 8.0.02.009 to 8.0.02.010
- changelog.txt +3 -1
- wppa-boxes-html.php +19 -6
- wppa-defaults.php +2 -1
- wppa-functions.php +6 -3
- wppa-settings-autosave.php +16 -4
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -10,7 +10,9 @@ Added an admin notice about this if applicable.
|
|
10 |
* Added option Advanced settings -> System -> I Item 5: Ajax method.
|
11 |
In vertsion 8 the official way to use Ajax at the frontend as documented in the Developers manual was implemented.
|
12 |
Unfortunately this method appears not to work on every site, so i added a selectionbox with 4 options.
|
13 |
-
If certain links at the frontend do not work,
|
|
|
|
|
14 |
|
15 |
= 8.0.01 =
|
16 |
|
10 |
* Added option Advanced settings -> System -> I Item 5: Ajax method.
|
11 |
In vertsion 8 the official way to use Ajax at the frontend as documented in the Developers manual was implemented.
|
12 |
Unfortunately this method appears not to work on every site, so i added a selectionbox with 4 options.
|
13 |
+
If certain links at the frontend do not work, try one of the alternate methods.
|
14 |
+
If frontend upload does not work properly when the progressbar (i.e. ajax upload) is on,
|
15 |
+
try one of the alternate methods listed in Advanced settings -> Users -> I: Item 5.1: Upload Ajax method
|
16 |
|
17 |
= 8.0.01 =
|
18 |
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.0.02.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2936,7 +2936,17 @@ static $albums_granted;
|
|
2936 |
|
2937 |
// Create the return url
|
2938 |
if ( $ajax_upload ) {
|
2939 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2940 |
}
|
2941 |
else {
|
2942 |
$returnurl = wppa_get_permalink();
|
@@ -3130,6 +3140,7 @@ static $albums_granted;
|
|
3130 |
name="wppa-user-upload-' . $yalb . '-' . $mocc . '[]"
|
3131 |
onchange="
|
3132 |
jQuery( \'#wppa-user-submit-' . $yalb . '-' . $mocc.'\' ).css( \'display\', \'block\' );
|
|
|
3133 |
wppaDisplaySelectedFiles(\'wppa-user-upload-' . $yalb . '-' . $mocc . '\');
|
3134 |
"
|
3135 |
/>';
|
@@ -3623,15 +3634,17 @@ static $albums_granted;
|
|
3623 |
else {
|
3624 |
$url_after_ajax_upload = '';
|
3625 |
$ajax_url_after_upload = '';
|
3626 |
-
$on_complete = '';
|
3627 |
}
|
3628 |
|
3629 |
// Ajax upload script
|
3630 |
if ( $ajax_upload ) {
|
3631 |
$result .=
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
|
|
|
|
3635 |
}
|
3636 |
|
3637 |
// Close wrapper
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.0.02.010
|
7 |
*
|
8 |
*/
|
9 |
|
2936 |
|
2937 |
// Create the return url
|
2938 |
if ( $ajax_upload ) {
|
2939 |
+
switch( wppa_opt( 'ajax_upload_method' ) ) {
|
2940 |
+
case 'normal':
|
2941 |
+
$returnurl = site_url() . '/wppaajax?action=wppa&wppa-action=do-fe-upload';
|
2942 |
+
break;
|
2943 |
+
case 'backend':
|
2944 |
+
$returnurl = site_url() . '/wp-admin/admin-ajax.php?action=wppa&wppa-action=do-fe-upload';
|
2945 |
+
break;
|
2946 |
+
default: // case 'extern'
|
2947 |
+
$returnurl = WPPA_URL . '/wppa-ajax-front.php?action=wppa&wppa-action=do-fe-upload';
|
2948 |
+
break;
|
2949 |
+
}
|
2950 |
}
|
2951 |
else {
|
2952 |
$returnurl = wppa_get_permalink();
|
3140 |
name="wppa-user-upload-' . $yalb . '-' . $mocc . '[]"
|
3141 |
onchange="
|
3142 |
jQuery( \'#wppa-user-submit-' . $yalb . '-' . $mocc.'\' ).css( \'display\', \'block\' );
|
3143 |
+
jQuery( window ).trigger(\'resize\');
|
3144 |
wppaDisplaySelectedFiles(\'wppa-user-upload-' . $yalb . '-' . $mocc . '\');
|
3145 |
"
|
3146 |
/>';
|
3634 |
else {
|
3635 |
$url_after_ajax_upload = '';
|
3636 |
$ajax_url_after_upload = '';
|
3637 |
+
$on_complete = 'document.location.href=\'' . home_url() . '\'';
|
3638 |
}
|
3639 |
|
3640 |
// Ajax upload script
|
3641 |
if ( $ajax_upload ) {
|
3642 |
$result .=
|
3643 |
+
'<script>
|
3644 |
+
jQuery(document).ready(function() {
|
3645 |
+
jQuery("#wppa-uplform-'.$yalb.'-'.$mocc.'").ajaxForm(wppaGetUploadOptions( '.$yalb.', '.$mocc.', "'.$where.'", "'.$on_complete.'" ));
|
3646 |
+
});
|
3647 |
+
</script>';
|
3648 |
}
|
3649 |
|
3650 |
// Close wrapper
|
wppa-defaults.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
-
* Version 8.0.02.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -311,6 +311,7 @@ horizrailenabled:false,";
|
|
311 |
'wppa_user_upload_audio_on' => 'no',
|
312 |
'wppa_user_opload_roles' => '',
|
313 |
'wppa_ajax_upload' => 'yes',
|
|
|
314 |
'wppa_copyright_on' => 'yes', // 19
|
315 |
'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
|
316 |
'wppa_watermark_user' => 'no',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
+
* Version 8.0.02.010
|
7 |
*
|
8 |
*/
|
9 |
|
311 |
'wppa_user_upload_audio_on' => 'no',
|
312 |
'wppa_user_opload_roles' => '',
|
313 |
'wppa_ajax_upload' => 'yes',
|
314 |
+
'wppa_ajax_upload_method' => 'normal',
|
315 |
'wppa_copyright_on' => 'yes', // 19
|
316 |
'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
|
317 |
'wppa_watermark_user' => 'no',
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.0.02.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -4155,16 +4155,19 @@ global $thumbs;
|
|
4155 |
$index = 0;
|
4156 |
if ( $thumbs ) {
|
4157 |
|
|
|
4158 |
foreach ( $thumbs as $thumb ) {
|
4159 |
if ( wppa_switch( 'next_on_callback' ) ) {
|
4160 |
-
|
4161 |
}
|
4162 |
else {
|
4163 |
-
|
4164 |
}
|
4165 |
if ( $startid == $thumb['id'] ) $startindex = $index; // Found the requested id, put the corresponding index in $startindex
|
4166 |
$index++;
|
4167 |
}
|
|
|
|
|
4168 |
}
|
4169 |
|
4170 |
// How to start if slideonly
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.0.02.010
|
7 |
*
|
8 |
*/
|
9 |
|
4155 |
$index = 0;
|
4156 |
if ( $thumbs ) {
|
4157 |
|
4158 |
+
$js = '<script>jQuery(document).ready(function(){';
|
4159 |
foreach ( $thumbs as $thumb ) {
|
4160 |
if ( wppa_switch( 'next_on_callback' ) ) {
|
4161 |
+
$js .= 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, strval( intval( $thumb['id'] ) ), strval( intval( $thumb['next_id'] ) ) ) . ' );';
|
4162 |
}
|
4163 |
else {
|
4164 |
+
$js .= 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, strval( intval( $thumb['id'] ) ) ) . ' );';
|
4165 |
}
|
4166 |
if ( $startid == $thumb['id'] ) $startindex = $index; // Found the requested id, put the corresponding index in $startindex
|
4167 |
$index++;
|
4168 |
}
|
4169 |
+
$js .= '});</script>';
|
4170 |
+
wppa_out( $js );
|
4171 |
}
|
4172 |
|
4173 |
// How to start if slideonly
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.0.02.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5795,12 +5795,24 @@ global $wppa_subtab_names;
|
|
5795 |
$html = wppa_select_m($slug, $opts, $vals, $onch, '', false, '', '220' );
|
5796 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
5797 |
|
5798 |
-
$name = __('
|
5799 |
-
$desc = __('Shows the upload progression bar.', 'wp-photo-album-plus');
|
5800 |
$help = '';
|
5801 |
$slug = 'wppa_ajax_upload';
|
5802 |
-
$html = wppa_checkbox($slug);
|
5803 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5804 |
|
5805 |
$name = __('Show Copyright', 'wp-photo-album-plus');
|
5806 |
$desc = __('Show a copyright warning on frontend upload form.', 'wp-photo-album-plus');
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.0.02.010
|
7 |
*
|
8 |
*/
|
9 |
|
5795 |
$html = wppa_select_m($slug, $opts, $vals, $onch, '', false, '', '220' );
|
5796 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
5797 |
|
5798 |
+
$name = __('Progression bar', 'wp-photo-album-plus');
|
5799 |
+
$desc = __('Shows the upload progression bar (uses Ajax).', 'wp-photo-album-plus');
|
5800 |
$help = '';
|
5801 |
$slug = 'wppa_ajax_upload';
|
5802 |
+
$html = wppa_checkbox($slug, 'wppaRefreshAfter();');
|
5803 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
5804 |
+
|
5805 |
+
$name = __('Upload Ajax method', 'wp-photo-album-plus');
|
5806 |
+
$desc = __('Select the ajax method for frontend uploads', 'wp-photo-album-plus');
|
5807 |
+
$help = __('Change to backend or extern only when normal fails', 'wp-photo-album-plus');
|
5808 |
+
$slug = 'wppa_ajax_upload_method';
|
5809 |
+
$opts = array( __('normal', 'wp-photo-album-plus'),
|
5810 |
+
__('backend', 'wp-photo-album-plus'),
|
5811 |
+
__('extern', 'wp-photo-album-plus'),
|
5812 |
+
);
|
5813 |
+
$vals = array( 'normal', 'backend', 'extern' );
|
5814 |
+
$html = wppa_select($slug, $opts, $vals);
|
5815 |
+
wppa_setting_new($slug, '5.1', $name, $desc, $html, $help, wppa_switch( 'ajax_upload' ));
|
5816 |
|
5817 |
$name = __('Show Copyright', 'wp-photo-album-plus');
|
5818 |
$desc = __('Show a copyright warning on frontend upload form.', 'wp-photo-album-plus');
|
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.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/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
-
$wppa_api_version = '8.0.02.
|
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.02.010
|
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.02.010'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|