Version Description
= 7.3.03 =
- This version addresses various bug fixes and feature requests.
= 7.3.02 =
- This version addresses various bug fixes and feature requests.
= 7.3.01 =
- This version addresses various bug fixes, feature requests and performance enhancements.
= 7.3.00 =
- This version addresses various bug fixes and performance enhancements.
= 7.2.14 =
- This version addresses various bug fixes and feature requests.
= 7.2.13 =
- This version addresses various bug fixes and feature requests.
= 7.2.12 =
- This version addresses various bug fixes and feature requests.
= 7.2.11 =
- This version addresses various bug fixes and feature requests.
= 7.2.10 =
- This version addresses various bug fixes and feature requests.
= 7.2.09 =
- This version addresses various bug fixes and feature requests.
= 7.2.08 =
- This version addresses various bug fixes.
= 7.2.07 =
- This version addresses various bug fixes.
= 7.2.06 =
- This version addresses various bug fixes and feature requests.
- This version addresses various security issues.
= 7.2.05 =
- This version addresses various bug fixes and feature requests.
- This version addresses various security issues.
= 7.2.04 =
- This version addresses various bug fixes and feature requests.
= 7.2.03 =
- This version addresses various bug fixes and feature requests.
= 7.2.02 =
- This version addresses various bug fixes and feature requests.
= 7.2.01 =
- This version addresses various bug fixes and feature requests.
= 7.2.00 =
- This version addresses various bug fixes and feature requests.
= 7.1.11 =
- This version addresses various bug fixes and feature requests.
= 7.1.10 =
- This version addresses various bug fixes and feature requests.
= 7.1.09 =
- This version addresses various bug fixes and feature requests.
= 7.1.08 =
- This version addresses various bug fixes and feature requests.
= 7.1.07 =
- This version addresses various bug fixes and feature requests.
= 7.1.06 =
- This version addresses various bug fixes and feature requests.
= 7.1.05 =
- This version addresses various security issues.
- This version addresses various bug fixes.
= 7.1.04 =
- This version addresses various bug fixes.
= 7.1.03 =
- This version addresses various security issues.
- This version addresses various bug fixes.
= 7.1.02 =
- This version addresses various security issues.
- This version addresses various bug fixes and feature requests.
= 7.1.01 =
- This version addresses various bug fixes and feature requests.
= 7.1.00 =
- This version addresses various bug fixes and feature requests.
- The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.
= 7.0.11 =
- This version addresses various bug fixes and feature requests.
= 7.0.11 =
- This version addresses various bug fixes
= 7.0.10 =
- This version addresses various bug fixes
= 7.0.09 =
- This version addresses various security issues.
- This version addresses various bug fixes and feature requests.
= 7.0.08 =
- This version addresses various security issues.
- This version addresses various bug fixes
= 7.0.07 =
- This version addresses various security issues.
- This version addresses various bug fixes
= 7.0.06 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.05 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 7.0.04 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.03 =
- This version addresses various minor bug fixes and feature requests.
= 7.0.02 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.01 =
- This version addresses various minor bug fixes and feature requests.
= 7.0.00 =
- Shortcode generators for Gutenberg added.
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
- To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.
= 6.9.21 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 6.9.20 =
- This version addresses various bug fixes
= 6.9.19 =
- This version addresses various minor bug fixes
= 6.9.18 =
- This version addresses various minor bug fixes
= 6.9.17 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.16 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.15 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.14 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.13 =
- Security release.
= 6.9.12 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.11 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.10 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.09 =
- Panorama support phase III.
= 6.9.08 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase II.
= 6.9.07 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase I.
= 6.9.06 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.05 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.04 =
- This version addresses various minor bug fixes and feature requests.
- Local CDN functionality has been added.
= 6.9.03 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.02 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.01 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.00 =
- This version includes the code for the privacy policy requirements.
= 6.8.09
- This version addresses various bug fixes and code edits.
= 6.8.08 =
- This version addresses various minor bug fixes and feature requests.
- This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
- For more info on performance improvements and compatibility with optimizers: see the changelog.txt
= 6.8.07 =
- This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.
= 6.8.06 =
- This version addresses various minor bug fixes and improved cache handling.
= 6.8.05 =
- This version addresses various minor bug fixes and feture requests.
= 6.8.04 =
- This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.3.03.007 |
Comparing to | |
See all releases |
Code changes from version 7.3.02.007 to 7.3.03.007
- changelog.txt +18 -3
- js/wppa-admin-scripts.js +120 -1
- js/wppa-admin-scripts.min.js +1 -1
- js/wppa.js +38 -1
- js/wppa.min.js +1 -1
- readme.txt +6 -2
- wppa-admin.php +69 -8
- wppa-admins-choice-widget.php +2 -2
- wppa-ajax.php +52 -12
- wppa-album-admin-autosave.php +9 -8
- wppa-album-covers.php +6 -6
- wppa-album-navigator-widget.php +2 -2
- wppa-album-widget.php +2 -2
- wppa-bestof-widget.php +2 -2
- wppa-boxes-html.php +4 -1
- wppa-comment-admin.php +5 -1
- wppa-comment-widget.php +2 -2
- wppa-common-functions.php +44 -14
- wppa-defaults.php +2 -1
- wppa-exif-iptc-common.php +22 -1
- wppa-featen-widget.php +2 -2
- wppa-filter.php +8 -6
- wppa-functions.php +79 -49
- wppa-gp-widget.php +2 -2
- wppa-lasten-widget.php +2 -2
- wppa-links.php +33 -4
- wppa-multitag-widget.php +2 -2
- wppa-notify-widget.php +2 -2
- wppa-photo-admin-autosave.php +66 -5
- wppa-picture.php +2 -2
- wppa-potd-widget.php +2 -2
- wppa-qr-widget.php +2 -2
- wppa-search-widget.php +2 -2
- wppa-settings-autosave.php +63 -10
- wppa-slideshow-widget.php +2 -2
- wppa-stats-widget.php +2 -2
- wppa-stereo-widget.php +2 -2
- wppa-super-view-widget.php +2 -2
- wppa-tagcloud-widget.php +2 -2
- wppa-thumbnail-widget.php +2 -2
- wppa-topten-widget.php +2 -2
- wppa-upldr-widget.php +2 -2
- wppa-upload-widget.php +2 -2
- wppa-utils.php +11 -10
- wppa-widget-functions.php +11 -5
- wppa-wpdb-insert.php +6 -2
- wppa-wrappers.php +3 -3
- wppa.php +3 -3
changelog.txt
CHANGED
@@ -1,16 +1,31 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 7.3.02 =
|
4 |
|
5 |
* New setting: Table IX-A11.1: Show minimum tags only. Shows only the tags defined in Table IX-A11 in the selection box on the photo admin page.
|
6 |
Note that it is recommended to tick Table VII-C9: New tags restricted, if you want to prevent the creation of new tags by non-adminstrators.
|
7 |
* New feature: Smartt caching.
|
8 |
-
1. The widgets have an extra option on the activation screen to enable caching of the widget content.
|
9 |
The cache expiration time can be selected between 5 and 60 minutes at widget activation.
|
10 |
The widgets QR, Notify, Stereo, Admins choice have no caching option because it is unwanted or useless.
|
11 |
-
2. Shortcode caching. All wppa shortcodes except type="landing" can have an extra attribumte: cache="".
|
12 |
The value betweeen the double quotes may be a number between 5 and 60, meaning the expiration time of the cache file.
|
13 |
-
Both types of cache files will be 'smart' cleared prior to the expiration time when needed.
|
14 |
On top of this, the Photo Albums admin menu has an extra option to clear all wppa cache instantaneously.
|
15 |
* New setting: Table IX-A9.7: Log Timings. Logs a.o. widget genberation times and no of queries.
|
16 |
* The default state of all checkboxes in widget activation dialogs is now unchecked.
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 7.3.03 =
|
4 |
+
|
5 |
+
* Fixed a resizing issue when using nicescroller.
|
6 |
+
* De-activated tinymce mode in wp editor on album and photo admin, due to unfixed problem in wp_editor() or tinymce.
|
7 |
+
* Fixed duplicate ids in search code for certain themes.
|
8 |
+
* Fixed a performance issue on the settings page for systems with many users.
|
9 |
+
* Fixed the excessively creation of widget landing pages.
|
10 |
+
* Compressed pretty links (Table IV-A6) did not work properly. MOET NOG
|
11 |
+
* You can now also select POSTS as the album title link on the album admin page.
|
12 |
+
* New checkbox: Table VI-A3: ASO. Album Specific Overrule.
|
13 |
+
If you tick the ASO box, the album title link settings overrule the default wlbum widget link type and page settings,
|
14 |
+
but only when the album link page or post is not set to --- the same page or post ---
|
15 |
+
* You can now edit iptc data on the Photo Albums -> Album Admin -> Edit Manage photos screen. The metadata in the database is updated, the source file us untouched.
|
16 |
+
* Fixed several php warnings that show uyp at php version 7.4
|
17 |
+
|
18 |
= 7.3.02 =
|
19 |
|
20 |
* New setting: Table IX-A11.1: Show minimum tags only. Shows only the tags defined in Table IX-A11 in the selection box on the photo admin page.
|
21 |
Note that it is recommended to tick Table VII-C9: New tags restricted, if you want to prevent the creation of new tags by non-adminstrators.
|
22 |
* New feature: Smartt caching.
|
23 |
+
1. The widgets have an extra option on the activation screen to enable caching of the widget content.
|
24 |
The cache expiration time can be selected between 5 and 60 minutes at widget activation.
|
25 |
The widgets QR, Notify, Stereo, Admins choice have no caching option because it is unwanted or useless.
|
26 |
+
2. Shortcode caching. All wppa shortcodes except type="landing" can have an extra attribumte: cache="".
|
27 |
The value betweeen the double quotes may be a number between 5 and 60, meaning the expiration time of the cache file.
|
28 |
+
Both types of cache files will be 'smart' cleared prior to the expiration time when needed.
|
29 |
On top of this, the Photo Albums admin menu has an extra option to clear all wppa cache instantaneously.
|
30 |
* New setting: Table IX-A9.7: Log Timings. Logs a.o. widget genberation times and no of queries.
|
31 |
* The default state of all checkboxes in widget activation dialogs is now unchecked.
|
js/wppa-admin-scripts.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
-
/* Version 7.3.
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -1171,6 +1171,125 @@ function wppaAjaxApplyWatermark(photo, file, pos) {
|
|
1171 |
}
|
1172 |
}
|
1173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1174 |
// Do the ajax update photo request
|
1175 |
function wppaAjaxUpdatePhoto( photo, actionslug, value, reload, bef, aft ) {
|
1176 |
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 7.3.03
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
1171 |
}
|
1172 |
}
|
1173 |
|
1174 |
+
// Update an iptc tag
|
1175 |
+
function wppaAjaxUpdateIptc( photo, tagid, value, tagname ) {
|
1176 |
+
|
1177 |
+
// Open ajax object
|
1178 |
+
jQuery.ajax( { url: wppaAjaxUrl,
|
1179 |
+
data: 'action=wppa&wppa-action=update-iptc' +
|
1180 |
+
'&photo-id=' + photo +
|
1181 |
+
'&item=' + tagid +
|
1182 |
+
'&wppa-nonce=' + document.getElementById( 'photo-nonce-' + photo ).value +
|
1183 |
+
'&value=' + wppaEncode( value ) +
|
1184 |
+
'&tagname=' + tagname,
|
1185 |
+
async: true,
|
1186 |
+
type: 'POST',
|
1187 |
+
timeout: 60000,
|
1188 |
+
beforeSend: function( xhr ) {
|
1189 |
+
|
1190 |
+
// Update status
|
1191 |
+
jQuery( '#remark-' + photo ).html( 'Working, please wait...' );
|
1192 |
+
},
|
1193 |
+
success: function( result, status, xhr ) {
|
1194 |
+
|
1195 |
+
// Format result
|
1196 |
+
var str = wppaTrim( result );
|
1197 |
+
var ArrValues = str.split("||");
|
1198 |
+
|
1199 |
+
// Any strange results returned?
|
1200 |
+
if ( ArrValues[0] != '' ) {
|
1201 |
+
alert( 'The server returned unexpected output:\n' + ArrValues[0] );
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
// Switch on error code
|
1205 |
+
switch ( ArrValues[1] ) {
|
1206 |
+
|
1207 |
+
case '99': // Photo is gone
|
1208 |
+
jQuery( '#photoitem-' + photo ).html( bef+'<span style="color:red">' + ArrValues[2] + '</span>'+aft );
|
1209 |
+
break;
|
1210 |
+
|
1211 |
+
default: // No or recoverable error
|
1212 |
+
|
1213 |
+
// Extract update felds
|
1214 |
+
var updates = JSON.parse( ArrValues[2] );
|
1215 |
+
var fieldName;
|
1216 |
+
var fieldValue;
|
1217 |
+
|
1218 |
+
for ( fieldName in updates ) {
|
1219 |
+
fieldValue = updates[fieldName];
|
1220 |
+
|
1221 |
+
switch ( fieldName ) {
|
1222 |
+
|
1223 |
+
case 'remark':
|
1224 |
+
var text;
|
1225 |
+
fieldValue = fieldValue.replace(/</g,'<');
|
1226 |
+
fieldValue = fieldValue.replace(/>/g,'>');
|
1227 |
+
fieldValue = fieldValue.replace(/\\/g,'');
|
1228 |
+
|
1229 |
+
if ( ArrValues[1] != "0" ) { // error
|
1230 |
+
text = '<span style="color:red;" >' + fieldValue + '</span>';
|
1231 |
+
}
|
1232 |
+
else { // no error
|
1233 |
+
text = '<span style="color:green;" >' + fieldValue + '</span>';
|
1234 |
+
}
|
1235 |
+
jQuery( "#remark-" + photo ).html( text );
|
1236 |
+
break;
|
1237 |
+
|
1238 |
+
case 'photourl':
|
1239 |
+
if ( wppaCropper[photo] ) {
|
1240 |
+
var c = wppaCropper[photo];
|
1241 |
+
c.replace(fieldValue);
|
1242 |
+
}
|
1243 |
+
else {
|
1244 |
+
jQuery( "#photourl-" + photo ).attr('src', fieldValue);
|
1245 |
+
}
|
1246 |
+
jQuery( "#thumba-" + photo ).attr('href', fieldValue);
|
1247 |
+
break;
|
1248 |
+
|
1249 |
+
case 'thumburl':
|
1250 |
+
jQuery( "#thumburl-" + photo ).attr('src', fieldValue);
|
1251 |
+
break;
|
1252 |
+
|
1253 |
+
case 'magickstack':
|
1254 |
+
jQuery( "#magickstack-" + photo ).html( fieldValue );
|
1255 |
+
if ( fieldValue.length > 0 ) {
|
1256 |
+
jQuery( '#imstackbutton-' + photo ).css( 'display', 'inline' );
|
1257 |
+
}
|
1258 |
+
else {
|
1259 |
+
jQuery( '#imstackbutton-' + photo ).css( 'display', 'none' );
|
1260 |
+
}
|
1261 |
+
break;
|
1262 |
+
|
1263 |
+
default:
|
1264 |
+
//alert( fieldName + ' not supported');
|
1265 |
+
//jQuery( "#" + fieldName + "-" + photo ).html( fieldValue );
|
1266 |
+
break;
|
1267 |
+
}
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
break;
|
1271 |
+
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
// Front-end button
|
1275 |
+
wppaFeAjaxLog('out');
|
1276 |
+
|
1277 |
+
},
|
1278 |
+
error: function( xhr, status, error ) {
|
1279 |
+
|
1280 |
+
// Update status
|
1281 |
+
jQuery( '#remark-' + photo ).html( '<span style="color:red;" >Comm error ' + status + '</span>' );
|
1282 |
+
|
1283 |
+
// Log error
|
1284 |
+
wppaConsoleLog( 'wppaAjaxUpdatePhoto failed. Error = ' + error + ', status = ' + status, 'force' );
|
1285 |
+
},
|
1286 |
+
complete: function( xhr, status, newurl ) {
|
1287 |
+
jQuery( '#wppa-admin-spinner' ).css( 'display', 'none' );
|
1288 |
+
jQuery(window).trigger('scroll');
|
1289 |
+
}
|
1290 |
+
} )
|
1291 |
+
}
|
1292 |
+
|
1293 |
// Do the ajax update photo request
|
1294 |
function wppaAjaxUpdatePhoto( photo, actionslug, value, reload, bef, aft ) {
|
1295 |
|
js/wppa-admin-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",n="";a=e||'<div style="padding-left:5px;" >',p?n=p:aftrer="</div>",wppaFeAjaxLog("in");var i=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!0),i.send(),i.onreadystatechange=function(){switch(i.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),p&&(n+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(n),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(l,r,e,t,u,c){u=u||"",c=c||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+l).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+l).html(s);break;case"photourl":if(wppaCropper[l])wppaCropper[l].replace(i);else jQuery("#photourl-"+l).attr("src",i);jQuery("#thumba-"+l).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+l).html(i),0<i.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(i)}}"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,s=!1,l=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,l=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],l=i}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==l&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=r||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),n=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(n,e,o){if(!o&&!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(o?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),n=a[1],i=!1;return n?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),i=!0),jQuery("#"+n+"_status").html(a[2]),jQuery("#"+n+"_togo").html(a[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?o||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),l={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(l).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),l=0;l<s.length;)n=s[l].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n[0]).html(o),l++}},error:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",n=-1,i=-2,o=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),l++;for(s&&(a+=".."+n);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],n=0,i=0;for(t=t||".",p=jQuery(e),i=n=0;n<p.length;)p[n].selected&&(a[i]=p[n].value,i++),n++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").html(),i=a[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n).html(a[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var p=0,a=0;function n(e){(e=e||window.event).preventDefault(),p=a-e.clientY,a=e.clientY,t.style.top=t.offsetTop-p+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,a=e.clientY,document.onmouseup=i,document.onmousemove=n}}
|
1 |
+
var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,r="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+r,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",n="";a=e||'<div style="padding-left:5px;" >',p?n=p:aftrer="</div>",wppaFeAjaxLog("in");var i=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!0),i.send(),i.onreadystatechange=function(){switch(i.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),p&&(n+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(n),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdateIptc(r,e,t,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+r+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+r).value+"&value="+wppaEncode(t)+"&tagname="+p,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+r).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+r).html(bef+'<span style="color:red">'+a[2]+"</span>"+aft);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+r).html(s);break;case"photourl":if(wppaCropper[r])wppaCropper[r].replace(i);else jQuery("#photourl-"+r).attr("src",i);jQuery("#thumba-"+r).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+r).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+r).html(i),0<i.length?jQuery("#imstackbutton-"+r).css("display","inline"):jQuery("#imstackbutton-"+r).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(r,l,e,t,u,c){u=u||"",c=c||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+r+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+r).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+r).css({visibility:"visible"}),jQuery("#remark-"+r).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+r).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+r).html(s);break;case"photourl":if(wppaCropper[r])wppaCropper[r].replace(i);else jQuery("#photourl-"+r).attr("src",i);jQuery("#thumba-"+r).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+r).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+r).html(i),0<i.length?jQuery("#imstackbutton-"+r).css("display","inline"):jQuery("#imstackbutton-"+r).css("display","none");break;default:jQuery("#"+n+"-"+r).html(i)}}"description"==l&&jQuery("#wppa-photo-spin-"+r).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,s=!1,r=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,r=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaAlbumUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[r][5]=a,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,r,l,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+r+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(l),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==r&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==r&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=l||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),n=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(n,e,o){if(!o&&!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(o?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),n=a[1],i=!1;return n?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),i=!0),jQuery("#"+n+"_status").html(a[2]),jQuery("#"+n+"_togo").html(a[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?o||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),r={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(r).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(l,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(l)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+l,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+l.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),r=0;r<s.length;)n=s[r].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n[0]).html(o),r++}},error:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+l).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=l&&"icon_corner_style"!=l||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=l&&"svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=l&&"ovl_svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",n=-1,i=-2,o=0,s=!1,r=0;r<e.length;)0!=(p=e[r].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),r++;for(s&&(a+=".."+n);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],n=0,i=0;for(t=t||".",p=jQuery(e),i=n=0;n<p.length;)p[n].selected&&(a[i]=p[n].value,i++),n++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").html(),i=a[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n).html(a[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var p=0,a=0;function n(e){(e=e||window.event).preventDefault(),p=a-e.clientY,a=e.clientY,t.style.top=t.offsetTop-p+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,a=e.clientY,document.onmouseup=i,document.onmousemove=n}}
|
js/wppa.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// contains common vars and functions
|
4 |
//
|
5 |
-
var wppaJsVersion = '7.3.
|
6 |
|
7 |
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
|
8 |
var wppaSlideShow;
|
@@ -359,7 +359,44 @@ function wppaDoInit() {
|
|
359 |
}
|
360 |
});
|
361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
jQuery(window).trigger('resize');
|
|
|
|
|
363 |
|
364 |
// Protect rightclick
|
365 |
wppaProtect();
|
2 |
//
|
3 |
// contains common vars and functions
|
4 |
//
|
5 |
+
var wppaJsVersion = '7.3.03';
|
6 |
|
7 |
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
|
8 |
var wppaSlideShow;
|
359 |
}
|
360 |
});
|
361 |
|
362 |
+
// Resize nicescrollers
|
363 |
+
jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange", function(){
|
364 |
+
|
365 |
+
setTimeout( function() {
|
366 |
+
|
367 |
+
jQuery(".wppa-thumb-area").each(function(){
|
368 |
+
if (jQuery(this).getNiceScroll) {
|
369 |
+
jQuery(this).getNiceScroll().resize();
|
370 |
+
wppaConsoleLog('Resize .wppa-thumb-area nice');
|
371 |
+
}
|
372 |
+
});
|
373 |
+
|
374 |
+
jQuery(".albumlist").each(function(){
|
375 |
+
if (jQuery(this).getNiceScroll) {
|
376 |
+
jQuery(this).getNiceScroll().resize();
|
377 |
+
wppaConsoleLog('Resize .albumlist nice');
|
378 |
+
}
|
379 |
+
});
|
380 |
+
|
381 |
+
jQuery(".wppa-div").each(function(){
|
382 |
+
if (jQuery(this).getNiceScroll) {
|
383 |
+
jQuery(this).getNiceScroll().resize();
|
384 |
+
wppaConsoleLog('Resize .wppa-div nice');
|
385 |
+
}
|
386 |
+
});
|
387 |
+
|
388 |
+
if (jQuery("body").getNiceScroll) {
|
389 |
+
jQuery("body").getNiceScroll().resize();
|
390 |
+
wppaConsoleLog('Resize body nice');
|
391 |
+
}
|
392 |
+
|
393 |
+
}, 2000);
|
394 |
+
});
|
395 |
+
|
396 |
+
|
397 |
jQuery(window).trigger('resize');
|
398 |
+
// jQuery(window).trigger('wppascrollend');
|
399 |
+
|
400 |
|
401 |
// Protect rightclick
|
402 |
wppaProtect();
|
js/wppa.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsVersion="7.3.01",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=100,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){wppaConsoleLog("Do all auto cols from "+p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t;a=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(wppaIsElementInViewport(o)){if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:a-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:a})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:a},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=i-1,n=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var w=0;w<t.length;){switch(w%i){case 0:jQuery(t[w]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[w]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[w]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}w++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(a/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=a-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),m=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:m})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,f=1,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");g;)h=g*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+f+"-"+p).css("height",h),f++,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a),wppaSetRealCalendarHeights(p),!0}jQuery("#wppa-container-"+p).css({visibility:"hidden"})}}function wppaSetRealCalendarHeights(e){var p=jQuery("#wppa-real-calendar-"+e).width();if(0<p){var a=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+e).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+e).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:r,marginBottom:r});var i=t/2;jQuery(".wppa-realcalimg-"+e).each(function(){if(0==this.height)a=!1;else{var p=jQuery(this).attr("data-day");thisb=i-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb})}}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){var e,a=p.childNodes;for(e=0;e<a.length;e++){var t=a[e];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){wppaConsoleLog("Scroll end triggered"),jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(""",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){if(e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e){var a=document.location.href.split("&wppa-occur=");e=parseInt(a[1])}a=document.location.href.split("&wppa-photo=");var t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=e;else if(p.selectionStart||"0"==p.selectionStart){var a=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length}else p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){var e;if(void 0!==p){var a=(e=(e=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(e="";t<a.length;)e+=a[t],++t<a.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s;i=jQuery(".wppa-ss-phototext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(e){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).attr("disabled","disabled"),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
|
1 |
+
var wppaJsVersion="7.3.03",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=100,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .wppa-thumb-area nice"))}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .albumlist nice"))}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&(jQuery(this).getNiceScroll().resize(),wppaConsoleLog("Resize .wppa-div nice"))}),jQuery("body").getNiceScroll&&(jQuery("body").getNiceScroll().resize(),wppaConsoleLog("Resize body nice"))},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){wppaConsoleLog("Do all auto cols from "+p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t;a=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(wppaIsElementInViewport(o)){if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:a-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:a})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:a},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=i-1,n=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var l=0;l<t.length;){switch(l%i){case 0:jQuery(t[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var w=parseInt(a/wppaMaxCoverWidth+.9999);w<1&&(w=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/w+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=a-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),m=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:m})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,f=1,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");g;)h=g*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+f+"-"+p).css("height",h),f++,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a),wppaSetRealCalendarHeights(p),!0}jQuery("#wppa-container-"+p).css({visibility:"hidden"})}}function wppaSetRealCalendarHeights(e){var p=jQuery("#wppa-real-calendar-"+e).width();if(0<p){var a=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+e).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+e).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:r,marginBottom:r});var i=t/2;jQuery(".wppa-realcalimg-"+e).each(function(){if(0==this.height)a=!1;else{var p=jQuery(this).attr("data-day");thisb=i-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb})}}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){var e,a=p.childNodes;for(e=0;e<a.length;e++){var t=a[e];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){wppaConsoleLog("Scroll end triggered"),jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(""",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){if(e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e){var a=document.location.href.split("&wppa-occur=");e=parseInt(a[1])}a=document.location.href.split("&wppa-photo=");var t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=e;else if(p.selectionStart||"0"==p.selectionStart){var a=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length}else p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){var e;if(void 0!==p){var a=(e=(e=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(e="";t<a.length;)e+=a[t],++t<a.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s;i=jQuery(".wppa-ss-phototext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(e){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).attr("disabled","disabled"),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
|
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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 7.3.
|
6 |
-
Stable tag: 7.3.
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
|
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
|
|
|
|
|
|
|
|
140 |
= 7.3.02 =
|
141 |
|
142 |
* This version addresses various bug fixes and feature requests.
|
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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 7.3.03.007
|
6 |
+
Stable tag: 7.3.02.007
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
140 |
+
= 7.3.03 =
|
141 |
+
|
142 |
+
* This version addresses various bug fixes and feature requests.
|
143 |
+
|
144 |
= 7.3.02 =
|
145 |
|
146 |
* This version addresses various bug fixes and feature requests.
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -218,6 +218,10 @@ function wppa_page_help() {
|
|
218 |
// Clear cache
|
219 |
function wppa_clear_wppa_cache() {
|
220 |
|
|
|
|
|
|
|
|
|
221 |
echo '<h1>' . __( 'Clear WPPA Cache', 'wp-photo-album-plus' ) . '</h1>';
|
222 |
|
223 |
$sc_files = array();
|
@@ -233,16 +237,73 @@ function wppa_clear_wppa_cache() {
|
|
233 |
}
|
234 |
|
235 |
$files = array_merge( $sc_files, $wg_files );
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
243 |
}
|
244 |
else {
|
245 |
-
|
|
|
|
|
|
|
246 |
}
|
247 |
}
|
248 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
218 |
// Clear cache
|
219 |
function wppa_clear_wppa_cache() {
|
220 |
|
221 |
+
if ( ! current_user_can( 'administrator' ) ) {
|
222 |
+
wp_die( 'You have no rights to do this' );
|
223 |
+
}
|
224 |
+
|
225 |
echo '<h1>' . __( 'Clear WPPA Cache', 'wp-photo-album-plus' ) . '</h1>';
|
226 |
|
227 |
$sc_files = array();
|
237 |
}
|
238 |
|
239 |
$files = array_merge( $sc_files, $wg_files );
|
240 |
+
$count = count( $files );
|
241 |
+
if ( $count ) {
|
242 |
+
|
243 |
+
if ( isset( $_REQUEST['delete'] ) ) {
|
244 |
+
foreach( $files as $file ) {
|
245 |
+
$pfile = '...' . str_replace( dirname( dirname( dirname( dirname( $file ) ) ) ), '', $file );
|
246 |
+
$dtm = wppa_local_date( '', wppa_filetime( $file ) );
|
247 |
+
echo sprintf( __( 'Removing cachefile %s, created at %s', 'wp-photo-album-plus' ), $pfile, $dtm ) . '<br />';
|
248 |
+
wppa_unlink( $file, false );
|
249 |
+
}
|
250 |
+
echo '<br><b>' . sprintf( __( '%d cachefiles deleted', 'wp-photo-album-plus' ), $count ) . '</br>';
|
251 |
+
|
252 |
+
}
|
253 |
+
else {
|
254 |
+
echo '
|
255 |
+
<div class="wrap" >
|
256 |
+
<table class="wppa-table widefat wppa-setting-table" style="margin-top:12px;width: 800px;" >
|
257 |
+
<thead style="font-weight:bold;" >
|
258 |
+
<tr>
|
259 |
+
<td style="width:600px;" >' . __( 'Name', 'wp-photo-album-plus' ) . '</td>
|
260 |
+
<td style="width:75px; text-align:center;" >' . __( 'Size', 'wp-photo-album-plus' ) . '</td>
|
261 |
+
<td style="width:100px; text-align:center;" >' . __( 'Age', 'wp-photo-album-plus' ) . '</td>
|
262 |
+
</tr>
|
263 |
+
</thead>
|
264 |
+
<tbody>';
|
265 |
+
foreach( $files as $file ) {
|
266 |
+
$pfile = '...' . str_replace( dirname( dirname( dirname( dirname( $file ) ) ) ), '', $file );
|
267 |
+
$size = wppa_filesize( $file );
|
268 |
+
$a = time() - wppa_filetime( $file );
|
269 |
+
$d = floor( $a / ( 24 * 3600 ) ) ;
|
270 |
+
$a -= $d * 24 * 3600;
|
271 |
+
$h = floor( $a / 3600 );
|
272 |
+
$a -= $h * 3600;
|
273 |
+
$m = floor( $a / 60 );
|
274 |
+
$s = $a - $m * 60;
|
275 |
+
$age = sprintf( '%2dd %2dh %2dm %2ds', $d, $h, $m, $s );
|
276 |
+
echo '
|
277 |
+
<tr>
|
278 |
+
<td style="width:600px;" >' . $pfile . '</td>
|
279 |
+
<td style="width:75px;" ><span style="float:right;" >' . $size . '</span></td>
|
280 |
+
<td style="width:100px;" >' . $age . '</td>
|
281 |
+
</tr>';
|
282 |
+
}
|
283 |
+
echo '
|
284 |
+
</tbody>
|
285 |
+
</table>
|
286 |
+
|
287 |
+
<p>' .
|
288 |
+
__( 'Caching is \'smart\'. This means that cache files are cleared when the display of a wppa widget or shortcode will change due to adding albums, photos comments or ratings.', 'wp-photo-album-plus' ) . '
|
289 |
+
<br />' .
|
290 |
+
__( 'You will need to clear the cachefiles only when you change an existing shortcode in a page or post.', 'wp-photo-album-plus' ) . '
|
291 |
+
</p>
|
292 |
+
|
293 |
+
<input
|
294 |
+
type="button"
|
295 |
+
class="button-primary"
|
296 |
+
onclick="document.location.href=\'' . admin_url( 'admin.php?page=wppa_clear_cache&delete' ) . '\'"
|
297 |
+
value="' . __( 'Delete', 'wp-photo-album-plus' ) . '"
|
298 |
+
/>
|
299 |
+
</div>';
|
300 |
}
|
301 |
}
|
302 |
else {
|
303 |
+
echo '
|
304 |
+
<div class="wrap" >' .
|
305 |
+
__( 'No cachefiles to remove.', 'wp-photo-album-plus' ) . '
|
306 |
+
</div>';
|
307 |
}
|
308 |
}
|
309 |
|
wppa-admins-choice-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the admins-choice widget
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -41,7 +41,7 @@ class AdminsChoice extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the admins-choice widget
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 7.3.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -2562,6 +2562,36 @@ global $wppa_log_file;
|
|
2562 |
|
2563 |
/* END UPDATE PHOTO */
|
2564 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2565 |
// The wppa-settings page calls ajax with $wppa_action == 'update-option';
|
2566 |
case 'update-option':
|
2567 |
|
@@ -3338,13 +3368,18 @@ global $wppa_log_file;
|
|
3338 |
$value = trim ( $value );
|
3339 |
$user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
|
3340 |
if ( $user && $user->user_login === $value ) {
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3346 |
}
|
3347 |
-
$alert = esc_js( sprintf( __( 'User %s has been blacklisted.' , 'wp-photo-album-plus'), $value ) );
|
3348 |
}
|
3349 |
else {
|
3350 |
$alert = esc_js( sprintf( __( 'User %s does not exist.' , 'wp-photo-album-plus'), $value ) );
|
@@ -3369,12 +3404,17 @@ global $wppa_log_file;
|
|
3369 |
$value = trim ( $value );
|
3370 |
$user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
|
3371 |
if ( $user && $user->user_login === $value ) {
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3376 |
}
|
3377 |
-
$alert = esc_js( sprintf( __( 'User %s is now superuser.' , 'wp-photo-album-plus'), $value ) );
|
3378 |
}
|
3379 |
else {
|
3380 |
$alert = esc_js( sprintf( __( 'User %s does not exist.' , 'wp-photo-album-plus'), $value ) );
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 7.3.03
|
6 |
*
|
7 |
*/
|
8 |
|
2562 |
|
2563 |
/* END UPDATE PHOTO */
|
2564 |
|
2565 |
+
// Update iptc
|
2566 |
+
case 'update-iptc':
|
2567 |
+
$photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
|
2568 |
+
$photo = strval( intval( $photo ) );
|
2569 |
+
$nonce = $_REQUEST['wppa-nonce'];
|
2570 |
+
$item = $_REQUEST['item'];
|
2571 |
+
$value = isset( $_REQUEST['value'] ) ? $_REQUEST['value'] : '';
|
2572 |
+
$value = wppa_decode( $value );
|
2573 |
+
$tag = $_REQUEST['tagname'];
|
2574 |
+
|
2575 |
+
// Check validity
|
2576 |
+
if ( ! wp_verify_nonce( $nonce, 'wppa_nonce_'.$photo ) ) {
|
2577 |
+
$txt = __( 'You do not have the rights to update photo information' , 'wp-photo-album-plus');
|
2578 |
+
wppa_json_photo_update( $photo, $txt, '1' );
|
2579 |
+
}
|
2580 |
+
|
2581 |
+
// Valid update request
|
2582 |
+
else {
|
2583 |
+
$iret = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_iptc
|
2584 |
+
SET description = %s
|
2585 |
+
WHERE id = %d", $value, $item ) );
|
2586 |
+
wppa_log( 'oibs', $wpdb->prepare( "UPDATE $wpdb->wppa_iptc SET description = %s WHERE id = %d", $value, $item ) );
|
2587 |
+
|
2588 |
+
$txt = sprintf( __( 'IPTC Tag %s updated', 'wp-photo-album-plus' ), $tag );
|
2589 |
+
wppa_json_photo_update( $photo, $txt );
|
2590 |
+
}
|
2591 |
+
|
2592 |
+
break;
|
2593 |
+
|
2594 |
+
|
2595 |
// The wppa-settings page calls ajax with $wppa_action == 'update-option';
|
2596 |
case 'update-option':
|
2597 |
|
3368 |
$value = trim ( $value );
|
3369 |
$user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
|
3370 |
if ( $user && $user->user_login === $value ) {
|
3371 |
+
if ( user_can( $user->ID, 'administrator' ) ) {
|
3372 |
+
$alert = esc_js( __( 'An administrator can not be blacklisted', 'wp-photo-album-plus' ) );
|
3373 |
+
}
|
3374 |
+
else {
|
3375 |
+
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET status = 'pending' WHERE owner = %s", $value ) );
|
3376 |
+
$black_listed_users = wppa_get_option( 'wppa_black_listed_users', array() );
|
3377 |
+
if ( ! in_array( $value, $black_listed_users ) ) {
|
3378 |
+
$black_listed_users[] = $value;
|
3379 |
+
update_option( 'wppa_black_listed_users', $black_listed_users );
|
3380 |
+
}
|
3381 |
+
$alert = esc_js( sprintf( __( 'User %s has been blacklisted.' , 'wp-photo-album-plus'), $value ) );
|
3382 |
}
|
|
|
3383 |
}
|
3384 |
else {
|
3385 |
$alert = esc_js( sprintf( __( 'User %s does not exist.' , 'wp-photo-album-plus'), $value ) );
|
3404 |
$value = trim ( $value );
|
3405 |
$user = wppa_get_user_by ( 'login', $value ); // seems to be case insensitive
|
3406 |
if ( $user && $user->user_login === $value ) {
|
3407 |
+
if ( user_can( $user->ID, 'administrator' ) ) {
|
3408 |
+
$alert = esc_js( __( 'An administrator can not be a superuser', 'wp-photo-album-plus' ) );
|
3409 |
+
}
|
3410 |
+
else {
|
3411 |
+
$super_users = wppa_get_option( 'wppa_super_users', array() );
|
3412 |
+
if ( ! in_array( $value, $super_users ) ) {
|
3413 |
+
$super_users[] = $value;
|
3414 |
+
update_option( 'wppa_super_users', $super_users );
|
3415 |
+
}
|
3416 |
+
$alert = esc_js( sprintf( __( 'User %s is now superuser.' , 'wp-photo-album-plus'), $value ) );
|
3417 |
}
|
|
|
3418 |
}
|
3419 |
else {
|
3420 |
$alert = esc_js( sprintf( __( 'User %s does not exist.' , 'wp-photo-album-plus'), $value ) );
|
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 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -54,7 +54,7 @@ global $wppa_revno;
|
|
54 |
$iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*)
|
55 |
FROM $wpdb->posts
|
56 |
WHERE ID = %d
|
57 |
-
AND post_type = 'page'
|
58 |
AND post_status = 'publish'", $alb['cover_linkpage'] ) );
|
59 |
|
60 |
if ( ! $iret ) { // Page gone?
|
@@ -786,7 +786,7 @@ global $wppa_revno;
|
|
786 |
array( 'wpautop' => true,
|
787 |
'media_buttons' => false,
|
788 |
'textarea_rows' => '6',
|
789 |
-
'tinymce' =>
|
790 |
)
|
791 |
);
|
792 |
echo '
|
@@ -847,7 +847,7 @@ global $wppa_revno;
|
|
847 |
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
848 |
foreach ( $catlist as $cat ) {
|
849 |
echo '
|
850 |
-
<option value="' . esc_attr( $cat['cat'] ) . '" >' .
|
851 |
}
|
852 |
}
|
853 |
else {
|
@@ -963,13 +963,13 @@ global $wppa_revno;
|
|
963 |
' . __( 'Link to:', 'wp-photo-album-plus' ) . '
|
964 |
</td>
|
965 |
<td>';
|
966 |
-
$query = "SELECT ID, post_title FROM $wpdb->posts
|
967 |
-
WHERE post_type = 'page'
|
968 |
AND post_status = 'publish'
|
969 |
ORDER BY post_title ASC";
|
970 |
$pages = $wpdb->get_results( $query, ARRAY_A );
|
971 |
if ( empty( $pages ) ) {
|
972 |
-
_e( 'There are no pages (yet) to link to.', 'wp-photo-album-plus' );
|
973 |
}
|
974 |
else {
|
975 |
$linkpage = $albuminfo['cover_linkpage'];
|
@@ -992,13 +992,14 @@ global $wppa_revno;
|
|
992 |
( $linkpage == $page['ID'] ? ' selected="selected"' : '' ) .
|
993 |
' >' .
|
994 |
__( $page['post_title'] ) .
|
|
|
995 |
'</option>';
|
996 |
}
|
997 |
echo '
|
998 |
</select>
|
999 |
<br />
|
1000 |
<span class="description" >' .
|
1001 |
-
__( 'If you want, you can link the title to a WP page instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
|
1002 |
'</span>';
|
1003 |
}
|
1004 |
echo '
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
54 |
$iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*)
|
55 |
FROM $wpdb->posts
|
56 |
WHERE ID = %d
|
57 |
+
AND ( post_type = 'page' OR post_type = 'post' )
|
58 |
AND post_status = 'publish'", $alb['cover_linkpage'] ) );
|
59 |
|
60 |
if ( ! $iret ) { // Page gone?
|
786 |
array( 'wpautop' => true,
|
787 |
'media_buttons' => false,
|
788 |
'textarea_rows' => '6',
|
789 |
+
'tinymce' => false
|
790 |
)
|
791 |
);
|
792 |
echo '
|
847 |
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
848 |
foreach ( $catlist as $cat ) {
|
849 |
echo '
|
850 |
+
<option value="' . esc_attr( $cat['cat'] ) . '" >' . htmlspecialchars( $cat['cat'] ) . '</option>';
|
851 |
}
|
852 |
}
|
853 |
else {
|
963 |
' . __( 'Link to:', 'wp-photo-album-plus' ) . '
|
964 |
</td>
|
965 |
<td>';
|
966 |
+
$query = "SELECT ID, post_type, post_title, post_date FROM $wpdb->posts
|
967 |
+
WHERE ( post_type = 'page' OR post_type = 'post' )
|
968 |
AND post_status = 'publish'
|
969 |
ORDER BY post_title ASC";
|
970 |
$pages = $wpdb->get_results( $query, ARRAY_A );
|
971 |
if ( empty( $pages ) ) {
|
972 |
+
_e( 'There are no posts/pages (yet) to link to.', 'wp-photo-album-plus' );
|
973 |
}
|
974 |
else {
|
975 |
$linkpage = $albuminfo['cover_linkpage'];
|
992 |
( $linkpage == $page['ID'] ? ' selected="selected"' : '' ) .
|
993 |
' >' .
|
994 |
__( $page['post_title'] ) .
|
995 |
+
( $page['post_type'] == 'post' ? ' (' . $page['post_date'] . ')' : '' ) .
|
996 |
'</option>';
|
997 |
}
|
998 |
echo '
|
999 |
</select>
|
1000 |
<br />
|
1001 |
<span class="description" >' .
|
1002 |
+
__( 'If you want, you can link the title to a WP page or post instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
|
1003 |
'</span>';
|
1004 |
}
|
1005 |
echo '
|
wppa-album-covers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
-
* Version 7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1671,12 +1671,12 @@ function wppa_album_cover_view_link(
|
|
1671 |
if ( $photocount > $mincount || $albumcount ) {
|
1672 |
|
1673 |
// Get treecount data
|
1674 |
-
|
1675 |
$treecount = wppa_get_treecounts_a( $albumid );
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
|
1681 |
if ( $href_content == '#' ) {
|
1682 |
wppa_out(
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
1671 |
if ( $photocount > $mincount || $albumcount ) {
|
1672 |
|
1673 |
// Get treecount data
|
1674 |
+
// if ( wppa_opt( 'show_treecount' ) != '-none-' ) {
|
1675 |
$treecount = wppa_get_treecounts_a( $albumid );
|
1676 |
+
// }
|
1677 |
+
// else {
|
1678 |
+
// $treecount = false;
|
1679 |
+
// }
|
1680 |
|
1681 |
if ( $href_content == '#' ) {
|
1682 |
wppa_out(
|
wppa-album-navigator-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
@@ -41,7 +41,7 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-album-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail albums
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -42,7 +42,7 @@ class AlbumWidget extends WP_Widget {
|
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail albums
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
wppa-bestof-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the best rated photos
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -43,7 +43,7 @@ class BestOfWidget extends WP_Widget {
|
|
43 |
if ( wppa_is_file( $cachefile ) ) {
|
44 |
|
45 |
// Cache expired?
|
46 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
47 |
wppa_remove_widget_cache_path( $this->id );
|
48 |
}
|
49 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the best rated photos
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
43 |
if ( wppa_is_file( $cachefile ) ) {
|
44 |
|
45 |
// Cache expired?
|
46 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
47 |
wppa_remove_widget_cache_path( $this->id );
|
48 |
}
|
49 |
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -339,8 +339,11 @@ global $wppa_session;
|
|
339 |
|
340 |
// Fix id and name
|
341 |
$form_core = str_replace( 'for="s"', 'for="wppa_s-'.$mocc.'"', $form_core );
|
|
|
342 |
$form_core = str_replace( 'id="s"', 'id="wppa_s-'.$mocc.'"', $form_core );
|
|
|
343 |
$form_core = str_replace( 'name="s"', 'name="wppa-searchstring"', $form_core );
|
|
|
344 |
|
345 |
// If no placeholder in form_core, add it
|
346 |
if ( strpos( $form_core, 'placeholder' ) === false ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
339 |
|
340 |
// Fix id and name
|
341 |
$form_core = str_replace( 'for="s"', 'for="wppa_s-'.$mocc.'"', $form_core );
|
342 |
+
$form_core = str_replace( 'for="search-input"', 'for="wppa_search-input-'.$mocc.'"', $form_core );
|
343 |
$form_core = str_replace( 'id="s"', 'id="wppa_s-'.$mocc.'"', $form_core );
|
344 |
+
$form_core = str_replace( 'id="search-input"', 'id="wppa_search-input-'.$mocc.'"', $form_core );
|
345 |
$form_core = str_replace( 'name="s"', 'name="wppa-searchstring"', $form_core );
|
346 |
+
$form_core = str_replace( 'id="search-submit"', 'id="wppa-search-submit"', $form_core );
|
347 |
|
348 |
// If no placeholder in form_core, add it
|
349 |
if ( strpos( $form_core, 'placeholder' ) === false ) {
|
wppa-comment-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all comments
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -250,6 +250,7 @@ class WPPA_Comment_table extends WP_List_Table {
|
|
250 |
foreach( $ids as $id ) {
|
251 |
|
252 |
$iret = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_comments SET status = 'approved' WHERE id = %s", $id ) );
|
|
|
253 |
|
254 |
if ( $iret ) {
|
255 |
wppa_schedule_mailinglist( 'commentapproved', 0, 0, $id );
|
@@ -287,6 +288,9 @@ class WPPA_Comment_table extends WP_List_Table {
|
|
287 |
wppa_index_update( 'photo', $photo );
|
288 |
}
|
289 |
}
|
|
|
|
|
|
|
290 |
}
|
291 |
}
|
292 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all comments
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
250 |
foreach( $ids as $id ) {
|
251 |
|
252 |
$iret = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_comments SET status = 'approved' WHERE id = %s", $id ) );
|
253 |
+
wppa_clear_cache();
|
254 |
|
255 |
if ( $iret ) {
|
256 |
wppa_schedule_mailinglist( 'commentapproved', 0, 0, $id );
|
288 |
wppa_index_update( 'photo', $photo );
|
289 |
}
|
290 |
}
|
291 |
+
|
292 |
+
// Clear cache
|
293 |
+
wppa_clear_cache();
|
294 |
}
|
295 |
}
|
296 |
|
wppa-comment-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -46,7 +46,7 @@ class wppaCommentWidget extends WP_Widget {
|
|
46 |
if ( wppa_is_file( $cachefile ) ) {
|
47 |
|
48 |
// Cache expired?
|
49 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
50 |
wppa_remove_widget_cache_path( $this->id );
|
51 |
}
|
52 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
46 |
if ( wppa_is_file( $cachefile ) ) {
|
47 |
|
48 |
// Cache expired?
|
49 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
50 |
wppa_remove_widget_cache_path( $this->id );
|
51 |
}
|
52 |
|
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 7.3.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -946,6 +946,9 @@ global $wppa;
|
|
946 |
|
947 |
// Assume not
|
948 |
$str = '';
|
|
|
|
|
|
|
949 |
|
950 |
if ( isset( $_REQUEST['wppa-searchstring'] ) ) { // wppa+ search
|
951 |
$str = $_REQUEST['wppa-searchstring'];
|
@@ -997,7 +1000,6 @@ global $wppa;
|
|
997 |
global $wppa_session;
|
998 |
$wppa_session['use_searchstring'] = $str;
|
999 |
$wppa_session['display_searchstring'] = $str;
|
1000 |
-
// wppa_save_session();
|
1001 |
}
|
1002 |
$result = $str;
|
1003 |
}
|
@@ -1064,14 +1066,27 @@ static $tables;
|
|
1064 |
function wppa_clear_cache( $force = false ) {
|
1065 |
global $cache_path;
|
1066 |
|
1067 |
-
|
1068 |
-
|
|
|
|
|
1069 |
|
1070 |
-
|
1071 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
|
1073 |
// Schedule a cron job. This is the normal operation
|
1074 |
if ( ! $force && ! wppa_is_cron() ) {
|
|
|
1075 |
wppa_schedule_clear_cache();
|
1076 |
return;
|
1077 |
}
|
@@ -1124,15 +1139,30 @@ global $cache_path;
|
|
1124 |
// wppa_delete_obsolete_tempfiles( true );
|
1125 |
}
|
1126 |
|
1127 |
-
function wppa_remove_shortcode_cache_path() {
|
1128 |
|
1129 |
-
|
1130 |
-
if (
|
1131 |
-
|
1132 |
-
if ( $
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1136 |
}
|
1137 |
}
|
1138 |
}
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 7.3.03
|
6 |
*
|
7 |
*/
|
8 |
|
946 |
|
947 |
// Assume not
|
948 |
$str = '';
|
949 |
+
if ( ! is_array( $wppa ) ) {
|
950 |
+
return $str;
|
951 |
+
}
|
952 |
|
953 |
if ( isset( $_REQUEST['wppa-searchstring'] ) ) { // wppa+ search
|
954 |
$str = $_REQUEST['wppa-searchstring'];
|
1000 |
global $wppa_session;
|
1001 |
$wppa_session['use_searchstring'] = $str;
|
1002 |
$wppa_session['display_searchstring'] = $str;
|
|
|
1003 |
}
|
1004 |
$result = $str;
|
1005 |
}
|
1066 |
function wppa_clear_cache( $force = false ) {
|
1067 |
global $cache_path;
|
1068 |
|
1069 |
+
if ( ! wppa_is_cron() ) {
|
1070 |
+
|
1071 |
+
// Clear wppa shortcode cache has priority
|
1072 |
+
wppa_remove_shortcode_cache_path( '', true );
|
1073 |
|
1074 |
+
// Clear wppa widget cache has priority
|
1075 |
+
wppa_remove_widget_cache_path( '', true );
|
1076 |
+
|
1077 |
+
// Log where it came from
|
1078 |
+
$data = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 6 );
|
1079 |
+
$i = 1;
|
1080 |
+
$stack =
|
1081 |
+
( isset( $data[$i]['file'] ) ? basename( $data[$i]['file'] ) . ':' : '' ) .
|
1082 |
+
( isset( $data[$i]['line'] ) ? $data[$i]['line'] . ' ' : '' ) .
|
1083 |
+
( isset( $data[$i]['function'] ) ? $data[$i]['function'] . '() ' : '' );
|
1084 |
+
wppa_log( 'obs', 'WPPA cache cleared by ' . $stack );
|
1085 |
+
}
|
1086 |
|
1087 |
// Schedule a cron job. This is the normal operation
|
1088 |
if ( ! $force && ! wppa_is_cron() ) {
|
1089 |
+
|
1090 |
wppa_schedule_clear_cache();
|
1091 |
return;
|
1092 |
}
|
1139 |
// wppa_delete_obsolete_tempfiles( true );
|
1140 |
}
|
1141 |
|
1142 |
+
function wppa_remove_shortcode_cache_path( $file = '', $immediate = false ) {
|
1143 |
|
1144 |
+
// Delete requested file
|
1145 |
+
if ( $file ) {
|
1146 |
+
|
1147 |
+
if ( wppa_is_file( $file ) ) {
|
1148 |
+
wppa_unlink( $file );
|
1149 |
+
}
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
// Delete obsolete files only if older than a week, or explicitly asked for
|
1153 |
+
else {
|
1154 |
+
|
1155 |
+
$root = WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ) . '/wppa-shortcode';
|
1156 |
+
if ( wppa_is_dir( $root ) ) {
|
1157 |
+
|
1158 |
+
$files = wppa_glob( $root . '/*' );
|
1159 |
+
if ( $files ) {
|
1160 |
+
$nfiles = count( $files );
|
1161 |
+
foreach( $files as $file ) {
|
1162 |
+
if ( $immediate || wppa_filetime( $file ) < ( 7 * 24 * 3600 ) ) {
|
1163 |
+
wppa_unlink( $file );
|
1164 |
+
}
|
1165 |
+
}
|
1166 |
}
|
1167 |
}
|
1168 |
}
|
wppa-defaults.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -774,6 +774,7 @@ horizrailenabled:false,";
|
|
774 |
'wppa_album_widget_linktype' => 'content',
|
775 |
'wppa_album_widget_linkpage' => '0',
|
776 |
'wppa_album_widget_blank' => 'no',
|
|
|
777 |
|
778 |
'wppa_tagcloud_linktype' => 'album',
|
779 |
'wppa_tagcloud_linkpage' => '0',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
774 |
'wppa_album_widget_linktype' => 'content',
|
775 |
'wppa_album_widget_linkpage' => '0',
|
776 |
'wppa_album_widget_blank' => 'no',
|
777 |
+
'wppa_album_widget_overrule' => 'no',
|
778 |
|
779 |
'wppa_tagcloud_linktype' => 'album',
|
780 |
'wppa_tagcloud_linkpage' => '0',
|
wppa-exif-iptc-common.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* exif and iptc common functions
|
6 |
-
* Version 7.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -4279,6 +4279,27 @@ if ( strlen($tag) != 6 ) {
|
|
4279 |
return $result;
|
4280 |
}
|
4281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4282 |
// Get gps data from photofile
|
4283 |
function wppa_get_coordinates( $picture_path, $photo_id ) {
|
4284 |
global $wpdb;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* exif and iptc common functions
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*
|
9 |
*/
|
4279 |
return $result;
|
4280 |
}
|
4281 |
|
4282 |
+
function wppa_iptc_tagname( $tag ) {
|
4283 |
+
global $wpdb;
|
4284 |
+
static $labels;
|
4285 |
+
|
4286 |
+
// Get all labels
|
4287 |
+
if ( ! $labels ) {
|
4288 |
+
$labels = $wpdb->get_results( "SELECT tag, description
|
4289 |
+
FROM $wpdb->wppa_iptc
|
4290 |
+
WHERE photo = '0'", ARRAY_A );
|
4291 |
+
}
|
4292 |
+
|
4293 |
+
// Find it
|
4294 |
+
foreach ( $labels as $label ) {
|
4295 |
+
if ( $label['tag'] == $tag ) {
|
4296 |
+
return rtrim( $label['description'], ':' );
|
4297 |
+
}
|
4298 |
+
}
|
4299 |
+
|
4300 |
+
return __( 'N.A.', 'wp-photo-album-plus' );
|
4301 |
+
}
|
4302 |
+
|
4303 |
// Get gps data from photofile
|
4304 |
function wppa_get_coordinates( $picture_path, $photo_id ) {
|
4305 |
global $wpdb;
|
wppa-featen-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -43,7 +43,7 @@ class FeaTenWidget extends WP_Widget {
|
|
43 |
if ( wppa_is_file( $cachefile ) ) {
|
44 |
|
45 |
// Cache expired?
|
46 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
47 |
wppa_remove_widget_cache_path( $this->id );
|
48 |
}
|
49 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
43 |
if ( wppa_is_file( $cachefile ) ) {
|
44 |
|
45 |
// Cache expired?
|
46 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
47 |
wppa_remove_widget_cache_path( $this->id );
|
48 |
}
|
49 |
|
wppa-filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -136,7 +136,9 @@ global $wppa_revno;
|
|
136 |
foreach ( array_keys( $atts ) as $key ) {
|
137 |
$atts[$key] = strip_tags( $atts[$key] ); // NOT htmlspecialchars because of album="$cat,René" has allowed funny chars
|
138 |
}
|
139 |
-
|
|
|
|
|
140 |
|
141 |
// Init
|
142 |
wppa_reset_occurrance();
|
@@ -149,14 +151,14 @@ global $wppa_revno;
|
|
149 |
}
|
150 |
$wppa['cache'] = '0';
|
151 |
}
|
152 |
-
if ( $
|
153 |
-
$wppa['cache'] =
|
154 |
}
|
155 |
|
156 |
// Find occur
|
157 |
if ( wppa_get_the_ID() != $wppa_postid ) { // New post
|
158 |
-
$wppa['occur'] = '0';
|
159 |
-
$wppa['fullsize'] = '';
|
160 |
$wppa_postid = wppa_get_the_ID(); // Remember the post id
|
161 |
}
|
162 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
136 |
foreach ( array_keys( $atts ) as $key ) {
|
137 |
$atts[$key] = strip_tags( $atts[$key] ); // NOT htmlspecialchars because of album="$cat,René" has allowed funny chars
|
138 |
}
|
139 |
+
if ( $atts['cache'] != 'inf' ) {
|
140 |
+
$atts['cache'] = ( $atts['cache'] ? strval( intval( $atts['cache'] ) ) : '0' );
|
141 |
+
}
|
142 |
|
143 |
// Init
|
144 |
wppa_reset_occurrance();
|
151 |
}
|
152 |
$wppa['cache'] = '0';
|
153 |
}
|
154 |
+
if ( $atts['type'] == 'landing' ) {
|
155 |
+
$wppa['cache'] = '0';
|
156 |
}
|
157 |
|
158 |
// Find occur
|
159 |
if ( wppa_get_the_ID() != $wppa_postid ) { // New post
|
160 |
+
$wppa['occur'] = '0'; // Init this occurance
|
161 |
+
$wppa['fullsize'] = ''; // Reset at each post
|
162 |
$wppa_postid = wppa_get_the_ID(); // Remember the post id
|
163 |
}
|
164 |
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -93,53 +93,18 @@ global $wppa;
|
|
93 |
wppa_test_for_search();
|
94 |
|
95 |
// Test for caching
|
96 |
-
$
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
$caching = true;
|
107 |
-
}
|
108 |
-
|
109 |
-
if ( $caching ) {
|
110 |
-
|
111 |
-
$cache_id = sanitize_file_name( str_replace( '/', '.', get_permalink() ) ) . '-' . wppa( 'occur' );
|
112 |
-
$cache_id = str_replace( array( '..', '.', '_' ), '-', $cache_id );
|
113 |
-
$cache_id = str_replace( '--', '-', $cache_id );
|
114 |
-
$root = WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ) .'/wppa-shortcode';
|
115 |
-
if ( ! wppa_is_dir ( $root ) ) {
|
116 |
-
wppa_mktree( $root );
|
117 |
-
}
|
118 |
-
$cache_file = $root . '/' . $cache_id;
|
119 |
-
|
120 |
-
// Cachefile present?
|
121 |
-
if ( wppa_is_file( $cache_file ) ) {
|
122 |
-
|
123 |
-
// Expired?
|
124 |
-
if ( wppa_filetime( $cache_file ) < ( time() - 60 * wppa( 'cache' ) ) ) {
|
125 |
-
wppa_unlink( $cache_file );
|
126 |
-
}
|
127 |
-
|
128 |
-
// No, use it
|
129 |
-
else {
|
130 |
-
$timer = wppa_occur_timer( 'show', $_ENV['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ), true );
|
131 |
-
return wppa_get_contents( $cache_file ) . $timer;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
else {
|
137 |
-
$cache_id = false;
|
138 |
-
$cache_file = false;
|
139 |
-
}
|
140 |
}
|
141 |
|
142 |
-
|
143 |
// There are 3 ways to get here:
|
144 |
// in order of priority:
|
145 |
// 1. The given query string applies to this invocation ( occurrance )
|
@@ -2467,9 +2432,16 @@ static $user;
|
|
2467 |
else {
|
2468 |
$link = wppa_get_imglnk_a( 'slideshow', $id );
|
2469 |
}
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2473 |
|
2474 |
// Find full image style and size
|
2475 |
if ( wppa( 'is_filmonly' ) ) {
|
@@ -5733,3 +5705,61 @@ static $time;
|
|
5733 |
break;
|
5734 |
}
|
5735 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
93 |
wppa_test_for_search();
|
94 |
|
95 |
// Test for caching
|
96 |
+
$temp = wppa_test_for_caching();
|
97 |
+
$caching = $temp['caching'];
|
98 |
+
$cache_id = $temp['cache_id'];
|
99 |
+
$cache_file = $temp['cache_file'];
|
100 |
+
$cache_data = $temp['cache_data'];
|
101 |
+
|
102 |
+
if ( $cache_data ) {
|
103 |
+
wppa_reset_occurrance();
|
104 |
+
$timer = wppa_occur_timer( 'show', $_ENV['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ) );
|
105 |
+
return $cache_data . $timer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
|
|
108 |
// There are 3 ways to get here:
|
109 |
// in order of priority:
|
110 |
// 1. The given query string applies to this invocation ( occurrance )
|
2432 |
else {
|
2433 |
$link = wppa_get_imglnk_a( 'slideshow', $id );
|
2434 |
}
|
2435 |
+
if ( $link ) {
|
2436 |
+
$linkurl = $link['url'];
|
2437 |
+
$linktitle = $link['title'];
|
2438 |
+
$linktarget = $link['target'];
|
2439 |
+
}
|
2440 |
+
else {
|
2441 |
+
$linkurl = '';
|
2442 |
+
$linktitle = '';
|
2443 |
+
$linktarget = '';
|
2444 |
+
}
|
2445 |
|
2446 |
// Find full image style and size
|
2447 |
if ( wppa( 'is_filmonly' ) ) {
|
5705 |
break;
|
5706 |
}
|
5707 |
}
|
5708 |
+
|
5709 |
+
// Test for caching
|
5710 |
+
function wppa_test_for_caching() {
|
5711 |
+
|
5712 |
+
// Assume not
|
5713 |
+
$caching = false;
|
5714 |
+
$cache_id = false;
|
5715 |
+
$cache_file = false;
|
5716 |
+
$cache_data = false;
|
5717 |
+
|
5718 |
+
if ( wppa( 'cache' ) ) {
|
5719 |
+
|
5720 |
+
// No querystring?
|
5721 |
+
if ( ! wppa_in_widget() && ! $_ENV['REQUEST_URI'] ) {
|
5722 |
+
$caching = true;
|
5723 |
+
}
|
5724 |
+
|
5725 |
+
// Querystring not for this occur?
|
5726 |
+
elseif ( ! wppa_in_widget() && wppa( 'occur' ) != wppa_get_get( 'occur' ) ) {
|
5727 |
+
$caching = true;
|
5728 |
+
}
|
5729 |
+
|
5730 |
+
if ( $caching ) {
|
5731 |
+
|
5732 |
+
$cache_id = sanitize_file_name( str_replace( '/', '.', get_permalink() ) ) . '-' . wppa( 'occur' );
|
5733 |
+
$cache_id = str_replace( array( '..', '.', '_' ), '-', $cache_id );
|
5734 |
+
$cache_id = str_replace( '--', '-', $cache_id );
|
5735 |
+
$root = WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ) .'/wppa-shortcode';
|
5736 |
+
if ( ! wppa_is_dir ( $root ) ) {
|
5737 |
+
wppa_mktree( $root );
|
5738 |
+
}
|
5739 |
+
$cache_file = $root . '/' . $cache_id;
|
5740 |
+
|
5741 |
+
// Cachefile present?
|
5742 |
+
if ( wppa_is_file( $cache_file ) ) {
|
5743 |
+
|
5744 |
+
// Expired?
|
5745 |
+
if ( wppa( 'cache' ) != 'inf' && wppa_filetime( $cache_file ) < ( time() - 60 * wppa( 'cache' ) ) ) {
|
5746 |
+
wppa_unlink( $cache_file );
|
5747 |
+
}
|
5748 |
+
|
5749 |
+
// No, use it
|
5750 |
+
else {
|
5751 |
+
$timer = wppa_occur_timer( 'show', $_ENV['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ), true );
|
5752 |
+
$cache_data = wppa_get_contents( $cache_file ) . $timer;
|
5753 |
+
}
|
5754 |
+
}
|
5755 |
+
}
|
5756 |
+
}
|
5757 |
+
|
5758 |
+
$result = array( 'caching' => $caching,
|
5759 |
+
'cache_id' => $cache_id,
|
5760 |
+
'cache_file' => $cache_file,
|
5761 |
+
'cache_data' => $cache_data,
|
5762 |
+
);
|
5763 |
+
|
5764 |
+
return $result;
|
5765 |
+
}
|
wppa-gp-widget.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* A text widget that interpretes wppa shortcodes
|
6 |
*
|
7 |
-
* Version 7.3.
|
8 |
*/
|
9 |
|
10 |
class WppaGpWidget extends WP_Widget {
|
@@ -38,7 +38,7 @@ class WppaGpWidget extends WP_Widget {
|
|
38 |
if ( wppa_is_file( $cachefile ) ) {
|
39 |
|
40 |
// Cache expired?
|
41 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
42 |
wppa_remove_widget_cache_path( $this->id );
|
43 |
}
|
44 |
|
4 |
*
|
5 |
* A text widget that interpretes wppa shortcodes
|
6 |
*
|
7 |
+
* Version 7.3.03
|
8 |
*/
|
9 |
|
10 |
class WppaGpWidget extends WP_Widget {
|
38 |
if ( wppa_is_file( $cachefile ) ) {
|
39 |
|
40 |
// Cache expired?
|
41 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
42 |
wppa_remove_widget_cache_path( $this->id );
|
43 |
}
|
44 |
|
wppa-lasten-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
@@ -41,7 +41,7 @@ class LasTenWidget extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-links.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -1581,9 +1581,38 @@ global $wpdb;
|
|
1581 |
// Continue for 'single'
|
1582 |
break;
|
1583 |
case 'albwidget':
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1587 |
if ( wppa_switch( 'album_widget_blank' ) ) $result['target'] = '_blank';
|
1588 |
break;
|
1589 |
default:
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
1581 |
// Continue for 'single'
|
1582 |
break;
|
1583 |
case 'albwidget':
|
1584 |
+
if ( wppa_opt( 'album_widget_overrule' ) ) {
|
1585 |
+
$aid = wppa_get_photo_item( $id, 'album' );
|
1586 |
+
$pid = wppa_get_album_item( $aid, 'cover_linkpage' );
|
1587 |
+
if ( $pid ) {
|
1588 |
+
$type = wppa_get_album_item( $aid, 'cover_linktype' );
|
1589 |
+
switch ( $type ) {
|
1590 |
+
case 'page':
|
1591 |
+
$type = 'plainpage';
|
1592 |
+
break;
|
1593 |
+
case 'albums':
|
1594 |
+
case 'thumbs':
|
1595 |
+
$type = 'content';
|
1596 |
+
break;
|
1597 |
+
case 'none':
|
1598 |
+
return false;
|
1599 |
+
break;
|
1600 |
+
default:
|
1601 |
+
break;
|
1602 |
+
}
|
1603 |
+
$page = $pid;
|
1604 |
+
}
|
1605 |
+
else {
|
1606 |
+
$type = wppa_opt( 'album_widget_linktype' );
|
1607 |
+
$page = wppa_opt( 'album_widget_linkpage' );
|
1608 |
+
if ( $page == '0' ) $page = '-1';
|
1609 |
+
}
|
1610 |
+
}
|
1611 |
+
else {
|
1612 |
+
$type = wppa_opt( 'album_widget_linktype' );
|
1613 |
+
$page = wppa_opt( 'album_widget_linkpage' );
|
1614 |
+
if ( $page == '0' ) $page = '-1';
|
1615 |
+
}
|
1616 |
if ( wppa_switch( 'album_widget_blank' ) ) $result['target'] = '_blank';
|
1617 |
break;
|
1618 |
default:
|
wppa-multitag-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -41,7 +41,7 @@ class MultitagPhotos extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-notify-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* notify events to users
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class wppaNotifyWidget extends WP_Widget {
|
@@ -39,7 +39,7 @@ class wppaNotifyWidget extends WP_Widget {
|
|
39 |
if ( wppa_is_file( $cachefile ) ) {
|
40 |
|
41 |
// Cache expired?
|
42 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
43 |
wppa_remove_widget_cache_path( $this->id );
|
44 |
}
|
45 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* notify events to users
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class wppaNotifyWidget extends WP_Widget {
|
39 |
if ( wppa_is_file( $cachefile ) ) {
|
40 |
|
41 |
// Cache expired?
|
42 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
43 |
wppa_remove_widget_cache_path( $this->id );
|
44 |
}
|
45 |
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -473,6 +473,18 @@ function wppaTryScheduledel( id ) {
|
|
473 |
}
|
474 |
}
|
475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
function wppaToggleExif( id, count ) {
|
477 |
|
478 |
if ( jQuery( '#wppa-exif-' + id ).css( 'display' ) == 'none' ) {
|
@@ -1911,7 +1923,7 @@ function wppaToggleExif( id, count ) {
|
|
1911 |
array( 'wpautop' => true,
|
1912 |
'media_buttons' => false,
|
1913 |
'textarea_rows' => '6',
|
1914 |
-
'tinymce' =>
|
1915 |
)
|
1916 |
);
|
1917 |
echo
|
@@ -2001,7 +2013,7 @@ function wppaToggleExif( id, count ) {
|
|
2001 |
if ( is_array( $taglist ) ) {
|
2002 |
echo '<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
2003 |
foreach ( $taglist as $tag ) {
|
2004 |
-
echo '<option value="' . esc_attr( $tag['tag'] ) . '" >' .
|
2005 |
}
|
2006 |
if ( ! $allowed ) {
|
2007 |
echo '<option value="-clear-" >' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>';
|
@@ -2253,6 +2265,57 @@ function wppaToggleExif( id, count ) {
|
|
2253 |
echo // Section 5
|
2254 |
"\n" . '<!-- Section 5 -->';
|
2255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2256 |
// Exif
|
2257 |
if ( ! $quick ) {
|
2258 |
$exifs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_exif
|
@@ -2316,8 +2379,6 @@ function wppaToggleExif( id, count ) {
|
|
2316 |
echo
|
2317 |
'</tbody>' .
|
2318 |
'</table>';
|
2319 |
-
|
2320 |
-
|
2321 |
}
|
2322 |
}
|
2323 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
473 |
}
|
474 |
}
|
475 |
|
476 |
+
function wppaToggleIptc( id, count ) {
|
477 |
+
|
478 |
+
if ( jQuery( '#wppa-iptc-' + id ).css( 'display' ) == 'none' ) {
|
479 |
+
jQuery( '#wppa-iptc-' + id ).show();
|
480 |
+
jQuery( '#wppa-iptc-button-' + id ).attr( 'value', '<?php _e( 'Hide', 'wp-photo-album-plus' ) ?> ' + count + ' <?php _e( 'IPTC items', 'wp-photo-album-plus' ) ?>' );
|
481 |
+
}
|
482 |
+
else {
|
483 |
+
jQuery( '#wppa-iptc-' + id ).hide();
|
484 |
+
jQuery( '#wppa-iptc-button-' + id ).attr( 'value', '<?php _e( 'Show', 'wp-photo-album-plus' ) ?> ' + count + ' <?php _e( 'IPTC items', 'wp-photo-album-plus' ) ?>' );
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
function wppaToggleExif( id, count ) {
|
489 |
|
490 |
if ( jQuery( '#wppa-exif-' + id ).css( 'display' ) == 'none' ) {
|
1923 |
array( 'wpautop' => true,
|
1924 |
'media_buttons' => false,
|
1925 |
'textarea_rows' => '6',
|
1926 |
+
'tinymce' => false
|
1927 |
)
|
1928 |
);
|
1929 |
echo
|
2013 |
if ( is_array( $taglist ) ) {
|
2014 |
echo '<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
2015 |
foreach ( $taglist as $tag ) {
|
2016 |
+
echo '<option value="' . esc_attr( $tag['tag'] ) . '" >' . htmlspecialchars( $tag['tag'] ) . '</option>';
|
2017 |
}
|
2018 |
if ( ! $allowed ) {
|
2019 |
echo '<option value="-clear-" >' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>';
|
2265 |
echo // Section 5
|
2266 |
"\n" . '<!-- Section 5 -->';
|
2267 |
|
2268 |
+
// IPTC
|
2269 |
+
if ( ! $quick ) {
|
2270 |
+
$iptcs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_iptc
|
2271 |
+
WHERE photo = %s
|
2272 |
+
ORDER BY tag, id", $id ), ARRAY_A );
|
2273 |
+
if ( ! empty( $iptcs ) ) {
|
2274 |
+
echo
|
2275 |
+
'<table><tbody><tr><td><input' .
|
2276 |
+
' type="button"' .
|
2277 |
+
' id="wppa-iptc-button-' . $id . '"' .
|
2278 |
+
' class="button-secundary"' .
|
2279 |
+
' value="' . esc_attr( sprintf( __( 'Show %d IPTC items', 'wp-photo-album-plus' ), count( $iptcs ) ) ) . '"' .
|
2280 |
+
' onclick="wppaToggleIptc( ' . $id . ', ' . count( $iptcs ) . ' );"' .
|
2281 |
+
' /></td></tr></tbody></table>' .
|
2282 |
+
'<table' .
|
2283 |
+
' id="wppa-iptc-' . $id . '"' .
|
2284 |
+
' class="wppa-table wppa-photo-table"' .
|
2285 |
+
' style="clear:both;width:99%;display:none;"' .
|
2286 |
+
' >' .
|
2287 |
+
'<thead>' .
|
2288 |
+
'<tr style="font-weight:bold;" >' .
|
2289 |
+
'<td style="padding:0 4px;" >' . __( 'IPTC tag', 'wp-photo-album-plus' ) . '</td>' .
|
2290 |
+
'<td style="padding:0 4px;" >' . __( 'Description', 'wp-photo-album-plus' ) . '</td>' .
|
2291 |
+
'<td style="padding:0 4px;" >' . __( 'Value', 'wp-photo-album-plus' ) . '</td>' .
|
2292 |
+
'</tr>' .
|
2293 |
+
'</thead>' .
|
2294 |
+
'<tbody>';
|
2295 |
+
|
2296 |
+
foreach ( $iptcs as $iptc ) {
|
2297 |
+
|
2298 |
+
echo '
|
2299 |
+
<tr id="iptc-tr-' . $iptc['id'] . '" >
|
2300 |
+
<td style="padding:0 4px;" >' . $iptc['tag'] . '</td>
|
2301 |
+
<td style="padding:0 4px;" >' . esc_attr( wppa_iptc_tagname( $iptc['tag'] ) ) . ':</td>
|
2302 |
+
<td style="padding:0 4px;" >
|
2303 |
+
<input
|
2304 |
+
type="text"
|
2305 |
+
style="width:500px;"
|
2306 |
+
value="' . $iptc['description'] . '"
|
2307 |
+
onchange="wppaAjaxUpdateIptc(\'' . $id . '\', \'' . $iptc['id'] . '\', this.value, \'' . $iptc['tag'] . '\')"
|
2308 |
+
/>
|
2309 |
+
</td>
|
2310 |
+
</tr>';
|
2311 |
+
}
|
2312 |
+
|
2313 |
+
echo
|
2314 |
+
'</tbody>' .
|
2315 |
+
'</table>';
|
2316 |
+
}
|
2317 |
+
}
|
2318 |
+
|
2319 |
// Exif
|
2320 |
if ( ! $quick ) {
|
2321 |
$exifs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_exif
|
2379 |
echo
|
2380 |
'</tbody>' .
|
2381 |
'</table>';
|
|
|
|
|
2382 |
}
|
2383 |
}
|
2384 |
|
wppa-picture.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
-
* Version 7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -141,7 +141,7 @@ function wppa_get_picture_html( $args ) {
|
|
141 |
return false;
|
142 |
}
|
143 |
|
144 |
-
if ( $link['is_lightbox'] ) {
|
145 |
$title = wppa_zoom_in( $id );
|
146 |
}
|
147 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
141 |
return false;
|
142 |
}
|
143 |
|
144 |
+
if ( $link && $link['is_lightbox'] ) {
|
145 |
$title = wppa_zoom_in( $id );
|
146 |
}
|
147 |
|
wppa-potd-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the widget
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -42,7 +42,7 @@ class PhotoOfTheDay extends WP_Widget {
|
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the widget
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
wppa-qr-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display qr code
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class wppaQRWidget extends WP_Widget {
|
@@ -40,7 +40,7 @@ class wppaQRWidget extends WP_Widget {
|
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display qr code
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class wppaQRWidget extends WP_Widget {
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
wppa-search-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the search widget
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -44,7 +44,7 @@ class SearchPhotos extends WP_Widget {
|
|
44 |
if ( wppa_is_file( $cachefile ) ) {
|
45 |
|
46 |
// Cache expired?
|
47 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
48 |
wppa_remove_widget_cache_path( $this->id );
|
49 |
}
|
50 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the search widget
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
44 |
if ( wppa_is_file( $cachefile ) ) {
|
45 |
|
46 |
// Cache expired?
|
47 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
48 |
wppa_remove_widget_cache_path( $this->id );
|
49 |
}
|
50 |
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5918,25 +5918,27 @@ global $wppa_supported_camara_brands;
|
|
5918 |
{
|
5919 |
$name = __('Album widget', 'wp-photo-album-plus');
|
5920 |
$desc = __('Album widget thumbnail link', 'wp-photo-album-plus');
|
5921 |
-
$help =
|
|
|
|
|
5922 |
$slug1 = 'wppa_album_widget_linktype';
|
5923 |
$slug2 = 'wppa_album_widget_linkpage';
|
5924 |
wppa_verify_page($slug2);
|
5925 |
$slug3 = 'wppa_album_widget_blank';
|
5926 |
-
|
5927 |
$slug = array($slug1, $slug2, $slug3);
|
5928 |
$onchange = 'wppaCheckAlbumWidgetLink();';
|
5929 |
$opts = array(
|
5930 |
__('subalbums and thumbnails.', 'wp-photo-album-plus'),
|
5931 |
__('slideshow.', 'wp-photo-album-plus'),
|
5932 |
__('a plain page without a querystring.', 'wp-photo-album-plus'),
|
5933 |
-
__('lightbox.', 'wp-photo-album-plus')
|
5934 |
);
|
5935 |
$vals = array(
|
5936 |
'content',
|
5937 |
'slide',
|
5938 |
'plainpage',
|
5939 |
-
'lightbox'
|
5940 |
);
|
5941 |
$html1 = wppa_select($slug1, $opts, $vals, $onchange);
|
5942 |
$clas = 'wppa_awlp';
|
@@ -5944,7 +5946,7 @@ global $wppa_supported_camara_brands;
|
|
5944 |
$html2 = wppa_select($slug2, $options_page_auto, $values_page, $onchange, $clas);
|
5945 |
$clas = 'wppa_awlb';
|
5946 |
$html3 = wppa_checkbox($slug3, '', $clas);
|
5947 |
-
$html4 = '';
|
5948 |
$html = array($html1, $html2, $html3, $html4);
|
5949 |
$clas = '';
|
5950 |
$tags = 'widget,link,album';
|
@@ -6042,6 +6044,57 @@ global $wppa_supported_camara_brands;
|
|
6042 |
$clas = '';
|
6043 |
$tags = 'widget,link,thumb,rating';
|
6044 |
wppa_setting($slug, '5a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6045 |
}
|
6046 |
{
|
6047 |
$name = __('LasTenWidget', 'wp-photo-album-plus');
|
@@ -7529,12 +7582,12 @@ global $wppa_supported_camara_brands;
|
|
7529 |
$options = array( __('--- select a user to blacklist ---', 'wp-photo-album-plus') );
|
7530 |
$values = array( '0' );
|
7531 |
foreach ( $users as $usr ) {
|
7532 |
-
|
7533 |
if ( ! in_array( $usr['user_login'], $blacklist ) ) { // skip already on blacklist
|
7534 |
$options[] = htmlspecialchars( $usr['display_name'] ).' ('.$usr['user_login'].')';
|
7535 |
$values[] = $usr['user_login'];
|
7536 |
}
|
7537 |
-
|
7538 |
}
|
7539 |
$onchange = 'alert(\''.__('The page will be reloaded after the action has taken place.', 'wp-photo-album-plus').'\');wppaRefreshAfter();';
|
7540 |
$html1 = wppa_select($slug, $options, $values, $onchange);
|
@@ -7593,12 +7646,12 @@ global $wppa_supported_camara_brands;
|
|
7593 |
$options = array( __('--- select a user to make superuser ---', 'wp-photo-album-plus') );
|
7594 |
$values = array( '0' );
|
7595 |
foreach ( $users as $usr ) {
|
7596 |
-
|
7597 |
if ( ! in_array( $usr['user_login'], $superlist ) ) { // skip already on superlist
|
7598 |
$options[] = htmlspecialchars( $usr['display_name'] ).' ('.$usr['user_login'].')';
|
7599 |
$values[] = $usr['user_login'];
|
7600 |
}
|
7601 |
-
|
7602 |
}
|
7603 |
$onchange = 'alert(\''.__('The page will be reloaded after the action has taken place.', 'wp-photo-album-plus').'\');wppaRefreshAfter();';
|
7604 |
$html1 = wppa_select($slug, $options, $values, $onchange);
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
5918 |
{
|
5919 |
$name = __('Album widget', 'wp-photo-album-plus');
|
5920 |
$desc = __('Album widget thumbnail link', 'wp-photo-album-plus');
|
5921 |
+
$help = __('Select the type of link the album widget photos point to.', 'wp-photo-album-plus') .
|
5922 |
+
'<br />' .
|
5923 |
+
__('If you tick the ASO box, the album title link settings overrule these settings, but only when the album link page or post is not set to --- the same page or post ---', 'wp-photo-album-plus');
|
5924 |
$slug1 = 'wppa_album_widget_linktype';
|
5925 |
$slug2 = 'wppa_album_widget_linkpage';
|
5926 |
wppa_verify_page($slug2);
|
5927 |
$slug3 = 'wppa_album_widget_blank';
|
5928 |
+
$slug4 = 'wppa_album_widget_overrule'; // useless
|
5929 |
$slug = array($slug1, $slug2, $slug3);
|
5930 |
$onchange = 'wppaCheckAlbumWidgetLink();';
|
5931 |
$opts = array(
|
5932 |
__('subalbums and thumbnails.', 'wp-photo-album-plus'),
|
5933 |
__('slideshow.', 'wp-photo-album-plus'),
|
5934 |
__('a plain page without a querystring.', 'wp-photo-album-plus'),
|
5935 |
+
__('lightbox.', 'wp-photo-album-plus'),
|
5936 |
);
|
5937 |
$vals = array(
|
5938 |
'content',
|
5939 |
'slide',
|
5940 |
'plainpage',
|
5941 |
+
'lightbox',
|
5942 |
);
|
5943 |
$html1 = wppa_select($slug1, $opts, $vals, $onchange);
|
5944 |
$clas = 'wppa_awlp';
|
5946 |
$html2 = wppa_select($slug2, $options_page_auto, $values_page, $onchange, $clas);
|
5947 |
$clas = 'wppa_awlb';
|
5948 |
$html3 = wppa_checkbox($slug3, '', $clas);
|
5949 |
+
$html4 = '<span title="'.esc_attr(__('Album specific link overrules', 'wp-photo-album-plus')).'" style="float:left; cursor:pointer;" >ASO </span>'.wppa_checkbox($slug4);
|
5950 |
$html = array($html1, $html2, $html3, $html4);
|
5951 |
$clas = '';
|
5952 |
$tags = 'widget,link,album';
|
6044 |
$clas = '';
|
6045 |
$tags = 'widget,link,thumb,rating';
|
6046 |
wppa_setting($slug, '5a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
6047 |
+
|
6048 |
+
$name = __('TopTenWidget', 'wp-photo-album-plus');
|
6049 |
+
$desc = __('TopTen widget album linkpage.', 'wp-photo-album-plus');
|
6050 |
+
$help = __('Select the linkpage the top ten albums point to.', 'wp-photo-album-plus');
|
6051 |
+
$slug1 = '';
|
6052 |
+
$slug2 = 'wppa_topten_widget_album_linkpage';
|
6053 |
+
wppa_verify_page($slug2);
|
6054 |
+
$slug3 = ''; // 'wppa_topten_blank';
|
6055 |
+
$slug4 = ''; // 'wppa_topten_overrule';
|
6056 |
+
// $slug = array($slug1, $slug2, $slug3, $slug4);
|
6057 |
+
// $onchange = 'wppaCheckTopTenLink();';
|
6058 |
+
/* $opts = array(
|
6059 |
+
__('no link at all.', 'wp-photo-album-plus'),
|
6060 |
+
__('the plain photo (file).', 'wp-photo-album-plus'),
|
6061 |
+
__('the content of the virtual topten album.', 'wp-photo-album-plus'),
|
6062 |
+
__('the content of the thumbnails album.', 'wp-photo-album-plus'),
|
6063 |
+
__('the full size photo in a slideshow.', 'wp-photo-album-plus'),
|
6064 |
+
__('the thumbnails album in a slideshow.', 'wp-photo-album-plus'),
|
6065 |
+
__('the fullsize photo on its own.', 'wp-photo-album-plus'),
|
6066 |
+
__('the single photo in the style of a slideshow.', 'wp-photo-album-plus'),
|
6067 |
+
__('the fs photo with download and print buttons.', 'wp-photo-album-plus'),
|
6068 |
+
__('a plain page without a querystring.', 'wp-photo-album-plus'),
|
6069 |
+
__('lightbox.', 'wp-photo-album-plus')
|
6070 |
+
);
|
6071 |
+
$vals = array(
|
6072 |
+
'none',
|
6073 |
+
'file',
|
6074 |
+
'album',
|
6075 |
+
'thumbalbum',
|
6076 |
+
'photo',
|
6077 |
+
'slidealbum',
|
6078 |
+
'single',
|
6079 |
+
'slphoto',
|
6080 |
+
'fullpopup',
|
6081 |
+
'plainpage',
|
6082 |
+
'lightbox'
|
6083 |
+
);
|
6084 |
+
*/
|
6085 |
+
// $html1 = wppa_select($slug1, $opts, $vals, $onchange);
|
6086 |
+
$clas = 'wppa_ttlp';
|
6087 |
+
$onchange = '';
|
6088 |
+
$html1 = '';
|
6089 |
+
$html2 = wppa_select($slug2, $options_page_auto, $values_page, $onchange, $clas);
|
6090 |
+
// $clas = 'wppa_ttlb';
|
6091 |
+
$html3 = ''; //wppa_checkbox($slug3, '', $clas);
|
6092 |
+
$html4 = ''; //wppa_checkbox($slug4);
|
6093 |
+
$html = array($html1, $html2, $html3, $html4);
|
6094 |
+
$clas = 'wppa_rating';
|
6095 |
+
$clas = '';
|
6096 |
+
$tags = 'widget,link,thumb,rating';
|
6097 |
+
wppa_setting($slug, '5.1a,b,c,d', $name, $desc, $html, $help, $clas, $tags);
|
6098 |
}
|
6099 |
{
|
6100 |
$name = __('LasTenWidget', 'wp-photo-album-plus');
|
7582 |
$options = array( __('--- select a user to blacklist ---', 'wp-photo-album-plus') );
|
7583 |
$values = array( '0' );
|
7584 |
foreach ( $users as $usr ) {
|
7585 |
+
// if ( ! wppa_user_is( 'administrator', $usr['ID'] ) ) { // an administrator can not be blacklisted
|
7586 |
if ( ! in_array( $usr['user_login'], $blacklist ) ) { // skip already on blacklist
|
7587 |
$options[] = htmlspecialchars( $usr['display_name'] ).' ('.$usr['user_login'].')';
|
7588 |
$values[] = $usr['user_login'];
|
7589 |
}
|
7590 |
+
// }
|
7591 |
}
|
7592 |
$onchange = 'alert(\''.__('The page will be reloaded after the action has taken place.', 'wp-photo-album-plus').'\');wppaRefreshAfter();';
|
7593 |
$html1 = wppa_select($slug, $options, $values, $onchange);
|
7646 |
$options = array( __('--- select a user to make superuser ---', 'wp-photo-album-plus') );
|
7647 |
$values = array( '0' );
|
7648 |
foreach ( $users as $usr ) {
|
7649 |
+
// if ( ! wppa_user_is( 'administrator', $usr['ID'] ) ) { // an administrator can not be made superuser
|
7650 |
if ( ! in_array( $usr['user_login'], $superlist ) ) { // skip already on superlist
|
7651 |
$options[] = htmlspecialchars( $usr['display_name'] ).' ('.$usr['user_login'].')';
|
7652 |
$values[] = $usr['user_login'];
|
7653 |
}
|
7654 |
+
// }
|
7655 |
}
|
7656 |
$onchange = 'alert(\''.__('The page will be reloaded after the action has taken place.', 'wp-photo-album-plus').'\');wppaRefreshAfter();';
|
7657 |
$html1 = wppa_select($slug, $options, $values, $onchange);
|
wppa-slideshow-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -49,7 +49,7 @@ class SlideshowWidget extends WP_Widget {
|
|
49 |
if ( wppa_is_file( $cachefile ) ) {
|
50 |
|
51 |
// Cache expired?
|
52 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
53 |
wppa_remove_widget_cache_path( $this->id );
|
54 |
}
|
55 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
49 |
if ( wppa_is_file( $cachefile ) ) {
|
50 |
|
51 |
// Cache expired?
|
52 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
53 |
wppa_remove_widget_cache_path( $this->id );
|
54 |
}
|
55 |
|
wppa-stats-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the stats widget
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
class WppaStatsWidget extends WP_Widget {
|
@@ -41,7 +41,7 @@ class WppaStatsWidget extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the stats widget
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
class WppaStatsWidget extends WP_Widget {
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-stereo-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class wppaStereoWidget extends WP_Widget {
|
@@ -40,7 +40,7 @@ class wppaStereoWidget extends WP_Widget {
|
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class wppaStereoWidget extends WP_Widget {
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
wppa-super-view-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* ask the album / display you want
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
|
@@ -41,7 +41,7 @@ class WppaSuperView extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* ask the album / display you want
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-tagcloud-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -41,7 +41,7 @@ class TagcloudPhotos extends WP_Widget {
|
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
41 |
if ( wppa_is_file( $cachefile ) ) {
|
42 |
|
43 |
// Cache expired?
|
44 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
45 |
wppa_remove_widget_cache_path( $this->id );
|
46 |
}
|
47 |
|
wppa-thumbnail-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class ThumbnailWidget extends WP_Widget {
|
@@ -40,7 +40,7 @@ class ThumbnailWidget extends WP_Widget {
|
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class ThumbnailWidget extends WP_Widget {
|
40 |
if ( wppa_is_file( $cachefile ) ) {
|
41 |
|
42 |
// Cache expired?
|
43 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
44 |
wppa_remove_widget_cache_path( $this->id );
|
45 |
}
|
46 |
|
wppa-topten-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
class TopTenWidget extends WP_Widget {
|
@@ -54,7 +54,7 @@ class TopTenWidget extends WP_Widget {
|
|
54 |
if ( wppa_is_file( $cachefile ) ) {
|
55 |
|
56 |
// Cache expired?
|
57 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
58 |
wppa_remove_widget_cache_path( $this->id );
|
59 |
}
|
60 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
class TopTenWidget extends WP_Widget {
|
54 |
if ( wppa_is_file( $cachefile ) ) {
|
55 |
|
56 |
// Cache expired?
|
57 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
58 |
wppa_remove_widget_cache_path( $this->id );
|
59 |
}
|
60 |
|
wppa-upldr-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
-
* Version 7.3.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -42,7 +42,7 @@ class UpldrWidget extends WP_Widget {
|
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
+
* Version 7.3.03
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
42 |
if ( wppa_is_file( $cachefile ) ) {
|
43 |
|
44 |
// Cache expired?
|
45 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
46 |
wppa_remove_widget_cache_path( $this->id );
|
47 |
}
|
48 |
|
wppa-upload-widget.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* A wppa widget to upload photos
|
6 |
*
|
7 |
-
* Version 7.3.
|
8 |
*/
|
9 |
|
10 |
class WppaUploadWidget extends WP_Widget {
|
@@ -39,7 +39,7 @@ class WppaUploadWidget extends WP_Widget {
|
|
39 |
if ( wppa_is_file( $cachefile ) ) {
|
40 |
|
41 |
// Cache expired?
|
42 |
-
if ( wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
43 |
wppa_remove_widget_cache_path( $this->id );
|
44 |
}
|
45 |
|
4 |
*
|
5 |
* A wppa widget to upload photos
|
6 |
*
|
7 |
+
* Version 7.3.03
|
8 |
*/
|
9 |
|
10 |
class WppaUploadWidget extends WP_Widget {
|
39 |
if ( wppa_is_file( $cachefile ) ) {
|
40 |
|
41 |
// Cache expired?
|
42 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
43 |
wppa_remove_widget_cache_path( $this->id );
|
44 |
}
|
45 |
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -725,9 +725,9 @@ global $wpdb;
|
|
725 |
|
726 |
// Save the new taglist
|
727 |
$bret = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_taglist', $tosave ) : update_option( 'wppa_taglist', $tosave );
|
728 |
-
if ( ! $bret ) {
|
729 |
-
wppa_log( 'Err', 'Unable to save taglist' );
|
730 |
-
}
|
731 |
|
732 |
$dtime = time() - $time;
|
733 |
$mem = memory_get_peak_usage( true );
|
@@ -1784,6 +1784,7 @@ function wppa_get_filesize( $file ) {
|
|
1784 |
function wppa_get_the_landing_page( $slug, $title ) {
|
1785 |
|
1786 |
$page = wppa_opt( $slug );
|
|
|
1787 |
if ( ! $page || ! wppa_page_exists( $page ) ) {
|
1788 |
$page = wppa_create_page( $title );
|
1789 |
wppa_update_option( 'wppa_' . $slug, $page );
|
@@ -1847,15 +1848,15 @@ function wppa_create_page( $title, $shortcode = '[wppa type="landing"]' ) {
|
|
1847 |
// Check if a published page exists
|
1848 |
function wppa_page_exists( $id ) {
|
1849 |
global $wpdb;
|
1850 |
-
static $pages_exist;
|
1851 |
|
1852 |
// Check on valid input
|
1853 |
if ( ! $id ) return false;
|
1854 |
|
1855 |
// Already found existing or non existing?
|
1856 |
-
if ( isset( $pages_exist[$id] ) ) {
|
1857 |
-
return $pages_exist[$id];
|
1858 |
-
}
|
1859 |
|
1860 |
// Do a query
|
1861 |
$iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM " .
|
@@ -1865,9 +1866,9 @@ static $pages_exist;
|
|
1865 |
"AND ID = %s", $id ) );
|
1866 |
|
1867 |
// Save result
|
1868 |
-
$pages_exist[$id] = ( $iret > 0 );
|
1869 |
|
1870 |
-
return $pages_exist[$id];
|
1871 |
}
|
1872 |
|
1873 |
function wppa_get_photo_owner( $id ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
725 |
|
726 |
// Save the new taglist
|
727 |
$bret = WPPA_MULTISITE_GLOBAL ? update_site_option( 'wppa_taglist', $tosave ) : update_option( 'wppa_taglist', $tosave );
|
728 |
+
// if ( ! $bret ) { // No change also rturns false
|
729 |
+
// wppa_log( 'Err', 'Unable to save taglist' );
|
730 |
+
// }
|
731 |
|
732 |
$dtime = time() - $time;
|
733 |
$mem = memory_get_peak_usage( true );
|
1784 |
function wppa_get_the_landing_page( $slug, $title ) {
|
1785 |
|
1786 |
$page = wppa_opt( $slug );
|
1787 |
+
|
1788 |
if ( ! $page || ! wppa_page_exists( $page ) ) {
|
1789 |
$page = wppa_create_page( $title );
|
1790 |
wppa_update_option( 'wppa_' . $slug, $page );
|
1848 |
// Check if a published page exists
|
1849 |
function wppa_page_exists( $id ) {
|
1850 |
global $wpdb;
|
1851 |
+
//static $pages_exist;
|
1852 |
|
1853 |
// Check on valid input
|
1854 |
if ( ! $id ) return false;
|
1855 |
|
1856 |
// Already found existing or non existing?
|
1857 |
+
// if ( isset( $pages_exist[$id] ) ) {
|
1858 |
+
// return $pages_exist[$id];
|
1859 |
+
// }
|
1860 |
|
1861 |
// Do a query
|
1862 |
$iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM " .
|
1866 |
"AND ID = %s", $id ) );
|
1867 |
|
1868 |
// Save result
|
1869 |
+
// $pages_exist[$id] = ( $iret > 0 );
|
1870 |
|
1871 |
+
return $iret; //$pages_exist[$id];
|
1872 |
}
|
1873 |
|
1874 |
function wppa_get_photo_owner( $id ) {
|
wppa-widget-functions.php
CHANGED
@@ -337,10 +337,12 @@ static $potd;
|
|
337 |
function wppa_widget_cache( $class, $value ) {
|
338 |
|
339 |
$options = array( __( '--- none ---', 'wp-photo-album-plus' ),
|
340 |
-
'5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
|
|
|
341 |
);
|
342 |
$values = array( '0',
|
343 |
-
'5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
|
|
|
344 |
);
|
345 |
$result = wppa_widget_selection( $class,
|
346 |
'cache',
|
@@ -350,7 +352,7 @@ function wppa_widget_cache( $class, $value ) {
|
|
350 |
$values,
|
351 |
array(),
|
352 |
'',
|
353 |
-
__( 'Select --- none --- to disable caching
|
354 |
);
|
355 |
return $result;
|
356 |
}
|
@@ -586,10 +588,11 @@ function wppa_get_widget_cache_path( $widget_id ) {
|
|
586 |
return $root . '/' . $widget_id;
|
587 |
}
|
588 |
|
589 |
-
function wppa_remove_widget_cache_path( $name = '' ) {
|
590 |
|
591 |
$root = wppa_get_widget_cache_root();
|
592 |
|
|
|
593 |
if ( $name ) {
|
594 |
$file = wppa_get_widget_cache_path( $name );
|
595 |
if ( wppa_is_file( $file ) ) {
|
@@ -598,11 +601,14 @@ function wppa_remove_widget_cache_path( $name = '' ) {
|
|
598 |
}
|
599 |
}
|
600 |
|
|
|
601 |
$files = wppa_glob( $root . '/*' );
|
602 |
$nfiles = count( $files );
|
603 |
if ( $nfiles ) {
|
604 |
foreach( $files as $file ) {
|
605 |
-
|
|
|
|
|
606 |
}
|
607 |
}
|
608 |
}
|
337 |
function wppa_widget_cache( $class, $value ) {
|
338 |
|
339 |
$options = array( __( '--- none ---', 'wp-photo-album-plus' ),
|
340 |
+
'5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
|
341 |
+
__( '--- infinite ---', 'wp-photo-album-plus' ),
|
342 |
);
|
343 |
$values = array( '0',
|
344 |
+
'5', '6', '7', '8', '9', '10', '12', '15', '20', '25', '30', '40', '45', '50', '55', '60',
|
345 |
+
'inf'
|
346 |
);
|
347 |
$result = wppa_widget_selection( $class,
|
348 |
'cache',
|
352 |
$values,
|
353 |
array(),
|
354 |
'',
|
355 |
+
__( 'Select --- none --- to disable caching, --- infinite --- for fully smart caching', 'wp-photo-album-plus' )
|
356 |
);
|
357 |
return $result;
|
358 |
}
|
588 |
return $root . '/' . $widget_id;
|
589 |
}
|
590 |
|
591 |
+
function wppa_remove_widget_cache_path( $name = '', $immediate = false ) {
|
592 |
|
593 |
$root = wppa_get_widget_cache_root();
|
594 |
|
595 |
+
// Delete a named cachefile immediately
|
596 |
if ( $name ) {
|
597 |
$file = wppa_get_widget_cache_path( $name );
|
598 |
if ( wppa_is_file( $file ) ) {
|
601 |
}
|
602 |
}
|
603 |
|
604 |
+
// Delete old and obsolete cachefiles only when they are older than 7 days, or immediate
|
605 |
$files = wppa_glob( $root . '/*' );
|
606 |
$nfiles = count( $files );
|
607 |
if ( $nfiles ) {
|
608 |
foreach( $files as $file ) {
|
609 |
+
if ( $immediate || wppa_filetime( $file ) < ( time() - 7 * 24 * 3600 ) ) {
|
610 |
+
wppa_unlink( $file );
|
611 |
+
}
|
612 |
}
|
613 |
}
|
614 |
}
|
wppa-wpdb-insert.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that add new records
|
6 |
-
* Version 7.3.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -211,6 +211,7 @@ global $wpdb;
|
|
211 |
if ( $iret ) {
|
212 |
if ( wppa_switch( 'search_comments' ) ) {
|
213 |
wppa_update_photo( $args['photo'] );
|
|
|
214 |
}
|
215 |
return $args['id'];
|
216 |
}
|
@@ -263,7 +264,10 @@ global $wpdb;
|
|
263 |
wppa_log('dbg', $query);
|
264 |
$iret = $wpdb->query($query);
|
265 |
|
266 |
-
if ( $iret )
|
|
|
|
|
|
|
267 |
else return false;
|
268 |
}
|
269 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that add new records
|
6 |
+
* Version 7.3.03
|
7 |
*
|
8 |
*/
|
9 |
|
211 |
if ( $iret ) {
|
212 |
if ( wppa_switch( 'search_comments' ) ) {
|
213 |
wppa_update_photo( $args['photo'] );
|
214 |
+
wppa_clear_cache();
|
215 |
}
|
216 |
return $args['id'];
|
217 |
}
|
264 |
wppa_log('dbg', $query);
|
265 |
$iret = $wpdb->query($query);
|
266 |
|
267 |
+
if ( $iret ) {
|
268 |
+
wppa_clear_cache();
|
269 |
+
return $args['id'];
|
270 |
+
}
|
271 |
else return false;
|
272 |
}
|
273 |
|
wppa-wrappers.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
-
* Version 7.3.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -250,7 +250,7 @@ function wppa_glob( $pattern, $flags = 0, $wp_content = false ) {
|
|
250 |
}
|
251 |
|
252 |
// Wrapper for unlink
|
253 |
-
function wppa_unlink( $file ) {
|
254 |
|
255 |
if ( ! wppa_is_path_safe( $file ) ) {
|
256 |
wppa_log( 'Err', 'Unsafe path detected in wppa_unlink(): ' . wppa_shortpath( $file ), true );
|
@@ -260,7 +260,7 @@ function wppa_unlink( $file ) {
|
|
260 |
if ( is_file( $file ) ) {
|
261 |
unlink( $file );
|
262 |
clearstatcache();
|
263 |
-
if ( ! is_file ( $file ) ) {
|
264 |
wppa_log( 'Fso', wppa_shortpath( $file ) . ' removed' );
|
265 |
}
|
266 |
}
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 7.3.03
|
9 |
*
|
10 |
*/
|
11 |
|
250 |
}
|
251 |
|
252 |
// Wrapper for unlink
|
253 |
+
function wppa_unlink( $file, $log = true ) {
|
254 |
|
255 |
if ( ! wppa_is_path_safe( $file ) ) {
|
256 |
wppa_log( 'Err', 'Unsafe path detected in wppa_unlink(): ' . wppa_shortpath( $file ), true );
|
260 |
if ( is_file( $file ) ) {
|
261 |
unlink( $file );
|
262 |
clearstatcache();
|
263 |
+
if ( ! is_file ( $file ) && $log ) {
|
264 |
wppa_log( 'Fso', wppa_shortpath( $file ) . ' removed' );
|
265 |
}
|
266 |
}
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 7.3.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -23,8 +23,8 @@ global $wpdb;
|
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
-
global $wppa_revno; $wppa_revno = '
|
27 |
-
global $wppa_api_version; $wppa_api_version = '7.3.
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.3.03.007
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
+
global $wppa_revno; $wppa_revno = '7303'; // WPPA db version
|
27 |
+
global $wppa_api_version; $wppa_api_version = '7.3.03.007'; // WPPA software version
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|