WP Photo Album Plus - Version 7.7.03.003

Version Description

= 7.7.03 =

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

Release Info

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

Code changes from version 7.7.03.002 to 7.7.03.003

changelog.txt CHANGED
@@ -6,6 +6,8 @@ WP Photo Album Plus Changelog
6
  * Disable rightclick did not work on zoomable, panorama and lightbox. Fixed.
7
  * Description did not show up on sidebar slideshows when activated. Fixed.
8
  * If rating is set to one button vote, the number of votes will show up under the thumbnails rather than the average calue.
 
 
9
 
10
  = 7.7.02 =
11
 
6
  * Disable rightclick did not work on zoomable, panorama and lightbox. Fixed.
7
  * Description did not show up on sidebar slideshows when activated. Fixed.
8
  * If rating is set to one button vote, the number of votes will show up under the thumbnails rather than the average calue.
9
+ * After successfully applying a watermark, the admin page will be now reloaded to show the changes.
10
+ * Fixed a layout issue on audio controls on thumbnails.
11
 
12
  = 7.7.02 =
13
 
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 7.5.07
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -1231,6 +1231,7 @@ function wppaAjaxApplyWatermark(photo, file, pos) {
1231
  switch (ArrValues[1]) {
1232
  case '0': // No error
1233
  document.getElementById('remark-'+photo).innerHTML = ArrValues[2];
 
1234
  break;
1235
  default:
1236
  document.getElementById('remark-'+photo).innerHTML = '<span style="color:red">'+ArrValues[2]+'</span>';
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 7.7.03.003
5
  /* Various js routines used in admin pages
6
  */
7
 
1231
  switch (ArrValues[1]) {
1232
  case '0': // No error
1233
  document.getElementById('remark-'+photo).innerHTML = ArrValues[2];
1234
+ setTimeout(function(){document.location.reload(true)},500);
1235
  break;
1236
  default:
1237
  document.getElementById('remark-'+photo).innerHTML = '<span style="color:red">'+ArrValues[2]+'</span>';
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,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,i,t,o){document.getElementById("wppa-re-up-form-"+i);var a=document.getElementById("wppa-re-up-file-"+i),r=document.getElementById("wppa-re-up-butn-"+i);e.preventDefault();var p=a.files[0];if(p.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+p.name);else if(p.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+i).css("display","none");r.value="Uploading...",r.style.color="black";var n=new FormData;n.append("photo",p,p.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+i+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+i).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":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",o&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(a);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(p):jQuery("#photourl-"+i).attr("src",p),jQuery("#thumba-"+i).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+i).html(p),0<p.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+t+"-"+i).html(p)}r.value="Upload",jQuery("#re-up-"+i).css("display","none");break;case"99":document.getElementById("photoitem-"+i).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+i).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",r.value="Error occured",r.style.color="red"}}else alert("An error occurred!")},s.send(n)}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(),wppaCheckAlbumNavigatorWidgetLink(),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","X","Y");for(table=1;table<13;table++){var a=wppa_getCookie("table_"+table);for(("on"==a?wppaShowTable:wppaHideTable)(table),subtab=0;subtab<15;subtab++)"on"==(a=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","L","M","X","Y");for(table=1;table<13;table++)for((table<13?wppaShowTable:wppaHideTable)(table),wppa_tablecookieoff(table),subtab=0;subtab<15;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var a=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<a.length&&(a.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 a=e.substring(5);document.getElementById(a).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,a=wppaFontDirectory+"wmf"+e+"-"+t+".png",p=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",a),jQuery("#wm-type-preview").attr("src",p)}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"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,a=document.getElementById("fullvalign").value;e!=t&&"default"!=a?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,t=document.getElementById("show_bread_posts").checked,a=document.getElementById("show_bread_pages").checked;t||a?(jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display",""),"txt"==(e=document.getElementById("bc_separator").value)?(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"==e?(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"))):(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 wppaCheckAlbumNavigatorWidgetLink(){var e=document.getElementById("album_navigator_widget_linktype").value;"lightbox"==e?jQuery(".wppa_anwlp").css("visibility","hidden"):jQuery(".wppa_anwlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_anwlb").css("visibility","hidden"):jQuery(".wppa_anwlb").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),a=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",a)}function checkAll(e,t){var a=document.getElementById(e);a&&(a.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a: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:var e;200==i.status?("ER"==(e=wppaTrim(i.responseText).split("||"))[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=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.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:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[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")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=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),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=wppaTrim(p.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 '+p.status+": "+p.statusText+"</span>"}}function wppaAjaxUpdateIptc(s,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+s+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"99":jQuery("#photoitem-"+s).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);break;default:var n,i,o,r=JSON.parse(p[2]);for(n in r)switch(o=r[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=p[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(s,l,e,u,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"99":jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+p[2]+"</span>"+d);break;default:var n,i,o,r=JSON.parse(p[2]);for(n in r)switch(o=r[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=p[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",u&&(i+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none");break;default:jQuery("#"+n+"-"+s).html(o)}}"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){u?document.location.reload(!0):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"),u&&setTimeout(function(){document.location.reload(!0)},200))}})}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")))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,r=!1,s=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(r=!0,s=o),o++;r||(wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,p],s=i),wppaAlbumUpdateMatrix[s][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[s][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,s,l,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+s+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(l),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==s&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){var p=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(p[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+r).html='<span style="color:red">'+p[2]+" ("+p[1]+")</span>"}if(void 0!==p[3]&&wppaProcessFull(p[3],p[4]),c&&"0"==p[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==s&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==r&&wppaAlbumUpdateMatrix[n][1]==s&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=l||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}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,a,e){var p=wppaGetXmlHttp(),n=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=wppaTrim(p.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-"+a).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")},p.open("GET",n,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.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: "+a.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 = "+a.status);wppaCheckInconsistencies()}},a.open("GET",p,!0),a.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,a){var p=e.split("||"),n=p[1],i=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),i=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==p[3]?"reload"==p[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,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+n+", Error = "+a+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var p=!1;--wppaAlwaysContinue<1&&(p=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(p||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,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t,a,p,n,i=.9*wppaWindowWidth(),o=wppaGetXmlHttp(),r=wppaAjaxUrl,s="action=wppa&wppa-action=maintenancepopup&slug="+e;s+="&wppa-nonce="+document.getElementById("wppa-nonce").value,o.open("POST",r,!1),o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(s),4==o.readyState&&200==o.status&&(a=(t=wppaEntityDecode(o.responseText).split("|"))[0],t[0]="",p=t.join("|").substring(1),n={modal:!0,resizable:!0,width:i,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(p).dialog(n).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>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText))}function wppaAjaxUpdateOptionValue(l,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(l)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+l,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0])alert("The server returned unexpected output:\n"+p[0]);else{switch(p[1]){case"0":jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),p[3]&&alert(p[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),p[3]&&alert(p[3])}if(jQuery("#img_"+l.replace("#","H")).attr("title",p[2]),p[4])for(var n,i,o,r=p[4].split(";"),s=0;s<r.length;)n=r[s].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),s++}},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){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}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 a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"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 a=document.getElementById(t);e&&(a.value?a.value+=","+e:a.value=e,"-clear-"==e&&(a.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 a,p="",n=-1,i=-2,o=0,r=!1,s=0;s<e.length;)0!=(a=e[s].valueOf())&&(o=n,a==++o?r=!0:r?(p+=n==i?t+n+t+a:t+t+n+t+a,r=!1):p+=t+a,r||(i=a,i++),n=a),s++;for(r&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}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 a,p=[],n=0,i=0;for(t=t||".",a=jQuery(e),i=n=0;n<a.length;)a[n].selected&&(p[i]=a[n].value,i++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){var a=jQuery("#"+t).val();0==a.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+a}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){var p=e.split("||");"0"==p[1]?document.location=p[2]:alert("Error: "+p[1]+"\n\n"+p[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-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,a){var p=e.split("|");jQuery("#"+o+"_togo").html(p[0]);var n=jQuery("#"+o+"_status").html(),i=p[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,a){var p=e.split("|");jQuery("#"+n).html(p[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=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,i,t,o){document.getElementById("wppa-re-up-form-"+i);var p=document.getElementById("wppa-re-up-file-"+i),l=document.getElementById("wppa-re-up-butn-"+i);e.preventDefault();p=p.files[0];if(p.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+p.name);else if(p.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+i).css("display","none");l.value="Uploading...",l.style.color="black";t=new FormData;t.append("photo",p,p.name);var s=new XMLHttpRequest,p="?action=wppa&wppa-action=update-photo&photo-id="+i+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+i).value;s.open("POST",wppaAjaxUrl+p,!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":var t,p,a,n=JSON.parse(e[2]);for(t in n)switch(a=n[t],t){case"remark":a=(a=(a=a.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),p="0"!=e[1]?'<span style="color:red;" >'+a+"</span>":'<span style="color:green;" >'+a+"</span>",o&&(p+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(p);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(a):jQuery("#photourl-"+i).attr("src",a),jQuery("#thumba-"+i).attr("href",a);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",a);break;case"magickstack":jQuery("#magickstack-"+i).html(a),0<a.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+t+"-"+i).html(a)}l.value="Upload",jQuery("#re-up-"+i).css("display","none");break;case"99":document.getElementById("photoitem-"+i).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+i).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",l.value="Error occured",l.style.color="red"}}else alert("An error occurred!")},s.send(t)}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(),wppaCheckAlbumNavigatorWidgetLink(),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","X","Y");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for(("on"==p?wppaShowTable:wppaHideTable)(table),subtab=0;subtab<15;subtab++)"on"==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","L","M","X","Y");for(table=1;table<13;table++)for((table<13?wppaShowTable:wppaHideTable)(table),wppa_tablecookieoff(table),subtab=0;subtab<15;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){e=e.substring(5);document.getElementById(e).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",e=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",e)}function wppaCheckWidgetMethod(){var e,t,p;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(p=jQuery("#wppa-wp").val())||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"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;e||t?(jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display",""),"txt"==(t=document.getElementById("bc_separator").value)?(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"==t?(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"))):(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 wppaCheckAlbumNavigatorWidgetLink(){var e=document.getElementById("album_navigator_widget_linktype").value;"lightbox"==e?jQuery(".wppa_anwlp").css("visibility","hidden"):jQuery(".wppa_anwlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_anwlb").css("visibility","hidden"):jQuery(".wppa_anwlb").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),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(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(),p=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",p,!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:var e;200==i.status?("ER"==(e=wppaTrim(i.responseText).split("||"))[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")):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:var e;200==p.status?("ER"==(e=wppaTrim(p.responseText).split("||"))[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")):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(){var e;4==a.readyState&&(200==a.status?(""!=(e=wppaTrim(a.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")}}function wppaAjaxUpdateIptc(s,e,t,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+s+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(t)+"&tagname="+p,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),"99"===a[1])jQuery("#photoitem-"+s).html(bef+'<span style="color:red">'+a[2]+"</span>"+aft);else{var n,i,o,l=JSON.parse(a[2]);for(n in l)switch(o=l[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=a[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+s).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(s,r,e,u,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+s+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),"99"===a[1])jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+a[2]+"</span>"+d);else{var n,i,o,l=JSON.parse(a[2]);for(n in l)switch(o=l[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=a[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",u&&(i+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none");break;default:jQuery("#"+n+"-"+s).html(o)}}"description"==r&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){u?document.location.reload(!0):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"),u&&setTimeout(function(){document.location.reload(!0)},200))}})}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")))}var _wppaRefreshAfter=!1,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,l=!1,s=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(l=!0,s=o),o++;l||(wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],s=i),wppaAlbumUpdateMatrix[s][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[s][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(o,l,s,r,u){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+o+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+o).value+"&value="+wppaEncode(s),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+o).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+o).html(e[2]):jQuery("#albumstatus-"+o).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+o).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),u&&"0"==e[1])return jQuery("#albumstatus-"+o).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 a=0,n=-1,i=wppaAlbumUpdateMatrix.length;a<i;)wppaAlbumUpdateMatrix[a][0]==o&&wppaAlbumUpdateMatrix[a][1]==l&&(n=a),a++;wppaAlbumUpdateMatrix[n][2]=s||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(r)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+o).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(),e=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(){var e;4==a.readyState&&(200==a.status?(""!=(e=wppaTrim(a.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"))},a.open("GET",e,!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("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(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))):(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(a,e,o){if(!o&&!e&&"yes"==document.getElementById(a+"_continue").value)return document.getElementById(a+"_continue").value="no",document.getElementById(a+"_button").value="Start!",void(0<jQuery("#"+a+"_togo").html()&&(jQuery("#"+a+"_status").html("Pausing..."),jQuery("#"+a+"_button").css("display","none")));o||(document.getElementById(a+"_continue").value="yes",document.getElementById(a+"_button").value="Stop!",""==jQuery("#"+a+"_status").html()&&jQuery("#"+a+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+a+"&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 = "+a+", Error = "+p+", status = "+t,"force"),jQuery("#"+a+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==a&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==a&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==a&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+a+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(e),4==p.readyState&&200==p.status&&(p=(e=wppaEntityDecode(p.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).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>"+p+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText))}function wppaAjaxUpdateOptionValue(s,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(s)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+s,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+s.replace("#","H")).attr("title",e[2]),e[4])for(var a,n,i,o=e[4].split(";"),l=0;l<o.length;)a=o[l].split(":"),n=jQuery("#"+a[0]).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("#"+a[0]).html(i),l++},error:function(e){jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+s).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=s&&"icon_corner_style"!=s||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=s&&"svg_bg_color"!=s||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=s&&"ovl_svg_bg_color"!=s||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(a=(a=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),p=0,a="";p<t.length;)a+=t[p],++p<t.length&&(a+="||PLUS||");return a}}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){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}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,l=!1,s=0;s<e.length;)0!=(p=e[s].valueOf())&&(o=n,p==++o?l=!0:l?(a+=n==i?t+n+t+p:t+t+n+t+p,l=!1):a+=t+p,l||(i=p,i++),n=p),s++;for(l&&(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){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}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){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[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(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n+"_togo").html(a[0]);e=jQuery("#"+n+"_status").html(),a=a[1];""!=e&&""==a&&(a='<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+"_status").html(a),setTimeout(function(){wppaAjaxUpdateTogo(n)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}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,a){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){e=e.split("|");jQuery("#"+a).html(e[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}}
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 7.6.10.002
7
  *
8
  */
9
 
@@ -1038,6 +1038,10 @@ global $wpdb;
1038
  $lastalbum = $wpdb->get_row( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY id DESC LIMIT 1", ARRAY_A );
1039
  if ( $lastalbum ) echo '<br />'.sprintf(__('The most recently added album is <strong>%s</strong> (%d).', 'wp-photo-album-plus'), __(stripslashes($lastalbum['name']), 'wp-photo-album-plus'), $lastalbum['id']);
1040
  $lastphoto = $wpdb->get_row( "SELECT id, name, album FROM $wpdb->wppa_photos ORDER BY timestamp DESC LIMIT 1", ARRAY_A );
 
 
 
 
1041
  if ( $lastphoto['album'] < '1' ) {
1042
  $trashed = true;
1043
  $album = - ( $lastphoto['album'] + '9' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 7.7.03.003
7
  *
8
  */
9
 
1038
  $lastalbum = $wpdb->get_row( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY id DESC LIMIT 1", ARRAY_A );
1039
  if ( $lastalbum ) echo '<br />'.sprintf(__('The most recently added album is <strong>%s</strong> (%d).', 'wp-photo-album-plus'), __(stripslashes($lastalbum['name']), 'wp-photo-album-plus'), $lastalbum['id']);
1040
  $lastphoto = $wpdb->get_row( "SELECT id, name, album FROM $wpdb->wppa_photos ORDER BY timestamp DESC LIMIT 1", ARRAY_A );
1041
+ if ( ! $lastphoto ) {
1042
+ echo '<br />'.__('There are no photos yet', 'wp-photo-album-plus');
1043
+ return;
1044
+ }
1045
  if ( $lastphoto['album'] < '1' ) {
1046
  $trashed = true;
1047
  $album = - ( $lastphoto['album'] + '9' );
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.7.01.001
6
  *
7
  */
8
 
@@ -1920,7 +1920,9 @@ global $wppa;
1920
  if ( wppa_switch( 'watermark_thumbs' ) ) {
1921
  wppa_create_thumbnail( $photo ); // create new thumb
1922
  }
1923
- echo '||0||'.__( 'Watermark applied' , 'wp-photo-album-plus');
 
 
1924
  wppa_exit();
1925
  }
1926
  else {
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.7.03.003
6
  *
7
  */
8
 
1920
  if ( wppa_switch( 'watermark_thumbs' ) ) {
1921
  wppa_create_thumbnail( $photo ); // create new thumb
1922
  }
1923
+ wppa_bump_thumb_rev();
1924
+ wppa_bump_photo_rev();
1925
+ echo '||0||'.__( 'Watermark applied. Reloading the page...' , 'wp-photo-album-plus');
1926
  wppa_exit();
1927
  }
1928
  else {
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.7.02.005
7
  *
8
  */
9
 
@@ -752,7 +752,7 @@ global $wppa_revno;
752
 
753
  // Zoomable
754
  $title = __( 'The default is set in Table IV-A37 and is currently set to', 'wp-photo-album-plus' );
755
- $title .= ' ' . ( wppa_opt( 'zoom_on' ) ? $yes : $no ) . '.';
756
  echo
757
  __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
758
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
@@ -784,7 +784,7 @@ global $wppa_revno;
784
 
785
  // Display description
786
  $title = sprintf( __( 'The defaults are set in Table II-B (%s), Table II-D (%s) and and Table II-G.', 'wp-photo-album-plus' ),
787
- ( wppa_opt( 'show_full_desc' ) ? $yes : $no ), ( wppa_opt( 'thumb_text_desc' ) ? $yes : $no ) );
788
  echo
789
  __( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
790
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
@@ -795,7 +795,7 @@ global $wppa_revno;
795
 
796
  // Display rating
797
  $title = sprintf( __( 'The defaults are set in Table II-B (%s), Table II-D (%s) and and Table II-G.', 'wp-photo-album-plus' ),
798
- ( wppa_opt( 'rating_on' ) ? $yes : $no ), ( wppa_opt( 'show_rating_count' ) ? $yes : $no ) );
799
  echo
800
  __( 'Display rating:', 'wp-photo-album-plus' ) . '
801
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
@@ -806,7 +806,7 @@ global $wppa_revno;
806
 
807
  // Display comments
808
  $title = sprintf( __( 'The defaults are set in Table II-B (%s) and Table II-D (%s).', 'wp-photo-album-plus' ),
809
- ( wppa_opt( 'show_comments' ) ? $yes : $no ), ( wppa_opt( 'thumb_text_comcount' ) ? $yes : $no ) );
810
  echo
811
  __( 'Display comments:', 'wp-photo-album-plus' ) . '
812
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.7.03.003
7
  *
8
  */
9
 
752
 
753
  // Zoomable
754
  $title = __( 'The default is set in Table IV-A37 and is currently set to', 'wp-photo-album-plus' );
755
+ $title .= ' ' . ( wppa_switch( 'zoom_on' ) ? $yes : $no ) . '.';
756
  echo
757
  __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
758
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
784
 
785
  // Display description
786
  $title = sprintf( __( 'The defaults are set in Table II-B (%s), Table II-D (%s) and and Table II-G.', 'wp-photo-album-plus' ),
787
+ ( wppa_switch( 'show_full_desc' ) ? $yes : $no ), ( wppa_switch( 'thumb_text_desc' ) ? $yes : $no ) );
788
  echo
789
  __( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
790
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
795
 
796
  // Display rating
797
  $title = sprintf( __( 'The defaults are set in Table II-B (%s), Table II-D (%s) and and Table II-G.', 'wp-photo-album-plus' ),
798
+ ( wppa_switch( 'rating_on' ) ? $yes : $no ), ( wppa_switch( 'show_rating_count' ) ? $yes : $no ) );
799
  echo
800
  __( 'Display rating:', 'wp-photo-album-plus' ) . '
801
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
806
 
807
  // Display comments
808
  $title = sprintf( __( 'The defaults are set in Table II-B (%s) and Table II-D (%s).', 'wp-photo-album-plus' ),
809
+ ( wppa_switch( 'show_comments' ) ? $yes : $no ), ( wppa_switch( 'thumb_text_comcount' ) ? $yes : $no ) );
810
  echo
811
  __( 'Display comments:', 'wp-photo-album-plus' ) . '
812
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
wppa-mailing.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains mailing functions
6
  *
7
- * Version 7.7.02.006
8
  *
9
  */
10
 
@@ -27,7 +27,7 @@ function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url =
27
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
  if ( in_array( $type, array( 'newalbumnotify', 'feuploadnotify', 'commentnotify' ) ) ) {
30
- wppa_log( 'dbg', "Admin email $type skipped" );
31
  return;
32
  }
33
  }
@@ -50,8 +50,28 @@ function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url =
50
  update_option( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb, $pho );
51
  }
52
 
53
- wp_schedule_single_event( time() + $delay, 'wppa_do_mailinglist_cron', array( $type, $alb, $pho, $com, $url, $start ) );
54
- wppa_log( 'Eml', 'Mailinglist {b}' . $type . '{/b} ' . ( $start ? 're-' : '' ) . 'scheduled for run in ' . $delay . ' seconds. Args: ' . $alb . ', ' . $pho . ', ' . $com . ', ' . $url . ', ' . $start );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  }
57
 
@@ -324,25 +344,25 @@ global $wpdb;
324
 
325
  // Admins
326
  $admins = wppa_get_admin_ids_a();
327
- wppa_log( 'eml', 'admins ' . implode( ',', $admins ) );
328
 
329
  // Photo owner
330
  $powner = array( $owuser->ID );
331
- wppa_log( 'eml', 'photo owner ' . $owuser->ID . ', ' . $owuser->user_login );
332
 
333
  // Comment owner
334
  $cowner = $author ? array( $author->ID ) : array();
335
- wppa_log( 'eml', 'comment owner ' . $author->ID . ', ' . $author->user_login );
336
 
337
  // Superusers
338
  $susers = wppa_get_superuser_ids_a();
339
- wppa_log( 'eml', 'superusers ' . implode( ',', $susers ) );
340
 
341
  // All potential receipients
342
  $all_potential = array_unique( array_merge( $admins, $powner, $cowner, $susers ), SORT_NUMERIC );
343
 
344
  $userarray = array_intersect( $userarray, $all_potential );
345
- wppa_log( 'eml', 'Potential receipients: ' . implode( ',', $all_potential ) . ', all subscribed potential: ' . implode( ',', $userarray ) );
346
  }
347
 
348
  // Subject
@@ -686,7 +706,7 @@ global $wpdb;
686
 
687
  // If the comment is already approved by a vote when comment needs vote is on, we're done
688
  if ( $comment['status'] == 'approved' ) {
689
- wppa_log( 'eml', 'Comment approved by voting. Mailing moderte comment aborted' );
690
  wppa_exit();
691
  }
692
 
@@ -876,7 +896,7 @@ function wppa_send_mail( $args ) {
876
  $id = $user->ID;
877
  }
878
  else {
879
- wppa_log( 'err', 'Attempt to mail to a non existing user', true );
880
  return;
881
  }
882
  }
@@ -978,7 +998,7 @@ function wppa_send_mail( $args ) {
978
 
979
  // If this mail has already been sent, skip and report
980
  if ( wppa_has_mail_been_sent( $to, $subject, $message_for_hash, $headers ) ) {
981
- wppa_log( 'eml', 'Sending duplicate mail skipped to: ' . $to . ' (' . $id . ') subject: ' . $subject );
982
  return;
983
  }
984
 
@@ -989,7 +1009,7 @@ function wppa_send_mail( $args ) {
989
  $headers,
990
  '' );
991
  if ( $iret ) {
992
- wppa_log( 'eml', 'Mail send to: ' . $to . ' (' . $id . ') subject: ' . $subject . ', photo: ' . ( $photo ? ( is_array( $photo ) ? serialize( $photo ) : $photo ) : 'not supplied.' ) );
993
  wppa_process_success_mail( $to, $subject, $message_for_hash, $headers );
994
  return;
995
  }
4
  *
5
  * Contains mailing functions
6
  *
7
+ * Version 7.7.03.003
8
  *
9
  */
10
 
27
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
  if ( in_array( $type, array( 'newalbumnotify', 'feuploadnotify', 'commentnotify' ) ) ) {
30
+ wppa_log( 'Eml', "Admin email $type skipped. See Table IX-M97" );
31
  return;
32
  }
33
  }
50
  update_option( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb, $pho );
51
  }
52
 
53
+ // wp_schedule_single_event( int $timestamp, string $hook, array $args = array(), bool $wp_error = false )
54
+ // wp_next_scheduled( string $hook, array $args = array() )
55
+
56
+ // Already scheduled?
57
+ $tm = wp_next_scheduled( 'wppa_do_mailinglist_cron', array( $type, $alb, $pho, $com, $url, $start ) );
58
+ if ( $tm ) {
59
+ wppa_log( 'Eml', 'Mailinglist {b}' . $type . '{/b} already scheduled to run at ' . wppa_local_date( '', $tm ) . ' Args: ' . $alb . ', ' . $pho . ', ' . $com . ', ' . $url . ', ' . $start );
60
+ return;
61
+ }
62
+
63
+ // No, schedule
64
+ else {
65
+ $tm = wp_schedule_single_event( time() + $delay, 'wppa_do_mailinglist_cron', array( $type, $alb, $pho, $com, $url, $start ) );
66
+ }
67
+
68
+ // Success?
69
+ if ( $tm === true ) {
70
+ wppa_log( 'Eml', 'Mailinglist {b}' . $type . '{/b} ' . ( $start ? 're-' : '' ) . 'scheduled for run in ' . $delay . ' seconds. Args: ' . $alb . ', ' . $pho . ', ' . $com . ', ' . $url . ', ' . $start );
71
+ }
72
+ else {
73
+ wppa_log( 'Err', 'Mailinglist {b}' . $type . '{/b} could not be scheduled for run in ' . $delay . ' seconds. Args: ' . $alb . ', ' . $pho . ', ' . $com . ', ' . $url . ', ' . $start );
74
+ }
75
 
76
  }
77
 
344
 
345
  // Admins
346
  $admins = wppa_get_admin_ids_a();
347
+ wppa_log( 'Eml', 'admins ' . implode( ',', $admins ) );
348
 
349
  // Photo owner
350
  $powner = array( $owuser->ID );
351
+ wppa_log( 'Eml', 'photo owner ' . $owuser->ID . ', ' . $owuser->user_login );
352
 
353
  // Comment owner
354
  $cowner = $author ? array( $author->ID ) : array();
355
+ wppa_log( 'Eml', 'comment owner ' . $author->ID . ', ' . $author->user_login );
356
 
357
  // Superusers
358
  $susers = wppa_get_superuser_ids_a();
359
+ wppa_log( 'Eml', 'superusers ' . implode( ',', $susers ) );
360
 
361
  // All potential receipients
362
  $all_potential = array_unique( array_merge( $admins, $powner, $cowner, $susers ), SORT_NUMERIC );
363
 
364
  $userarray = array_intersect( $userarray, $all_potential );
365
+ wppa_log( 'Eml', 'Potential receipients: ' . implode( ',', $all_potential ) . ', all subscribed potential: ' . implode( ',', $userarray ) );
366
  }
367
 
368
  // Subject
706
 
707
  // If the comment is already approved by a vote when comment needs vote is on, we're done
708
  if ( $comment['status'] == 'approved' ) {
709
+ wppa_log( 'Eml', 'Comment approved by voting. Mailing moderte comment aborted' );
710
  wppa_exit();
711
  }
712
 
896
  $id = $user->ID;
897
  }
898
  else {
899
+ wppa_log( 'Err', 'Attempt to mail to a non existing user', true );
900
  return;
901
  }
902
  }
998
 
999
  // If this mail has already been sent, skip and report
1000
  if ( wppa_has_mail_been_sent( $to, $subject, $message_for_hash, $headers ) ) {
1001
+ wppa_log( 'Eml', 'Sending duplicate mail skipped to: ' . $to . ' (' . $id . ') subject: ' . $subject );
1002
  return;
1003
  }
1004
 
1009
  $headers,
1010
  '' );
1011
  if ( $iret ) {
1012
+ wppa_log( 'Eml', 'Mail send to: ' . $to . ' (' . $id . ') subject: ' . $subject . ', photo: ' . ( $photo ? ( is_array( $photo ) ? serialize( $photo ) : $photo ) : 'not supplied.' ) );
1013
  wppa_process_success_mail( $to, $subject, $message_for_hash, $headers );
1014
  return;
1015
  }
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.6.08.004
7
  *
8
  */
9
 
@@ -1303,8 +1303,7 @@ function wppaToggleExif( id, count ) {
1303
 
1304
  $user = wppa_get_user();
1305
  $has_source = wppa_is_file( wppa_get_source_path( $id ) );
1306
- $can_remove = ( wppa_get_album_item( $album, 'wmfile' ) == '--- none ---' ) ||
1307
- ( wppa_get_album_item( $album, 'wmfile' ) == '--- default ---' && wppa_opt( 'watermark_file' ) == '--- none ---' );
1308
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1309
  echo
1310
  ' ' . __( 'Watermark:', 'wp-photo-album-plus') . ' ';
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.7.03.003
7
  *
8
  */
9
 
1303
 
1304
  $user = wppa_get_user();
1305
  $has_source = wppa_is_file( wppa_get_source_path( $id ) );
1306
+ $can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
 
1307
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1308
  echo
1309
  ' ' . __( 'Watermark:', 'wp-photo-album-plus') . ' ';
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 7.6.07.009
6
  *
7
  */
8
 
@@ -857,7 +857,7 @@ function wppa_image_magick( $command ) {
857
 
858
  wppa_log( 'Fso', 'Exec ' . $logcom . ' return status: ' . $err . ', last output line: ' . $run );
859
  foreach( $out as $line ) {
860
- wppa_log( 'OBS', $line );
861
  }
862
 
863
  if ( $err == '46' ) $err = '0';
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 7.7.03.003
6
  *
7
  */
8
 
857
 
858
  wppa_log( 'Fso', 'Exec ' . $logcom . ' return status: ' . $err . ', last output line: ' . $run );
859
  foreach( $out as $line ) {
860
+ // wppa_log( 'OBS', $line );
861
  }
862
 
863
  if ( $err == '46' ) $err = '0';
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 7.7.03.002
9
  *
10
  */
11
 
@@ -176,7 +176,7 @@ global $wpdb;
176
  'id' => $id,
177
  'width' => $imgwidth,
178
  'height' => $cont_h,
179
- 'style' => 'position:absolute;top:'.$audiotop.'px;left:0;border:none;'
180
  ));
181
 
182
  $result .= '</div>';
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 7.7.03.003
9
  *
10
  */
11
 
176
  'id' => $id,
177
  'width' => $imgwidth,
178
  'height' => $cont_h,
179
+ 'style' => 'position:absolute;top:'.$audiotop.'px;left:'.((wppa_opt('tf_width')-$imgwidth)/2).'px;border:none;'
180
  ));
181
 
182
  $result .= '</div>';
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.7.01.005
9
  *
10
  */
11
 
@@ -222,7 +222,7 @@ function wppa_glob( $pattern, $flags = 0, $wp_content = false ) {
222
  }
223
 
224
  // Get dirlist
225
- wppa_log('obs', 'Flags = '.$flags.', filtered = '.intval($flags) and 0xFBFF);
226
  $dirlist = glob( $pattern, intval($flags) and 0xFBFF );
227
 
228
  // Init result;
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
+ * Version 7.7.03.003
9
  *
10
  */
11
 
222
  }
223
 
224
  // Get dirlist
225
+ // wppa_log('obs', 'Flags = '.$flags.', filtered = '.intval($flags) and 0xFBFF);
226
  $dirlist = glob( $pattern, intval($flags) and 0xFBFF );
227
 
228
  // Init result;
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.7.03.002
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -23,9 +23,9 @@ global $wpdb;
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
- global $wppa_api_version;
27
- $wppa_api_version = '7.7.03.002'; // WPPA software version
28
- global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
31
  /* Init page js 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.7.03.003
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_api_version;
27
+ $wppa_api_version = '7.7.03.003'; // WPPA software version
28
+ global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
31
  /* Init page js data */