Version Description
= 7.0.00 =
- Shortcode generators for Gutenberg added
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
- To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Use the WPPA+ Notify widget.
= 6.9.21 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 6.9.20 =
- This version addresses various bug fixes
= 6.9.19 =
- This version addresses various minor bug fixes
= 6.9.18 =
- This version addresses various minor bug fixes
= 6.9.17 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.16 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.15 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.14 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.13 =
- Security release.
= 6.9.12 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.11 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.10 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.09 =
- Panorama support phase III.
= 6.9.08 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase II.
= 6.9.07 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase I.
= 6.9.06 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.05 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.04 =
- This version addresses various minor bug fixes and feature requests.
- Local CDN functionality has been added.
= 6.9.03 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.02 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.01 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.00 =
- This version includes the code for the privacy policy requirements.
= 6.8.09
- This version addresses various bug fixes and code edits.
= 6.8.08 =
- This version addresses various minor bug fixes and feature requests.
- This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
- For more info on performance improvements and compatibility with optimizers: see the changelog.txt
= 6.8.07 =
- This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.
= 6.8.06 =
- This version addresses various minor bug fixes and improved cache handling.
= 6.8.05 =
- This version addresses various minor bug fixes and feture requests.
= 6.8.04 =
- This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.0.00.009 |
Comparing to | |
See all releases |
Code changes from version 7.0.00.006 to 7.0.00.009
- changelog.txt +1 -0
- js/wppa-admin-scripts.js +2 -2
- js/wppa-admin-scripts.min.js +1 -1
- js/wppa-gutenberg-photo.js +1 -1
- js/wppa-gutenberg-wppa.js +1 -1
- js/wppa-tinymce-photo-front.js +2 -2
- js/wppa-tinymce-photo-front.min.js +1 -1
- js/wppa-tinymce-photo.js +2 -2
- js/wppa-tinymce-photo.min.js +1 -1
- js/wppa-tinymce-shortcodes.js +1 -1
- js/wppa-tinymce-shortcodes.min.js +1 -1
- js/wppa-utils.js +14 -0
- js/wppa-utils.min.js +1 -1
- wppa-admin-functions.php +4 -4
- wppa-admin.php +5 -5
- wppa-ajax.php +25 -16
- wppa-album-admin-autosave.php +28 -27
- wppa-comment-widget.php +1 -1
- wppa-common-functions.php +3 -0
- wppa-featen-widget.php +1 -1
- wppa-functions.php +21 -9
- wppa-gutenberg-photo.php +1 -1
- wppa-import.php +7 -2
- wppa-lasten-widget.php +2 -2
- wppa-mailing.php +178 -6
- wppa-maintenance.php +1 -1
- wppa-multitag-widget.php +2 -2
- wppa-notify-widget.php +214 -75
- wppa-photo-admin-autosave.php +32 -24
- wppa-settings-autosave.php +33 -42
- wppa-setup.php +6 -2
- wppa-tagcloud-widget.php +2 -2
- wppa-thumbnail-widget.php +3 -3
- wppa-tinymce-common.php +2 -2
- wppa-upldr-widget.php +2 -2
- wppa-upload.php +7 -2
- wppa-utils.php +23 -105
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -16,6 +16,7 @@ WP Photo Album Plus Changelog
|
|
16 |
* Removed Table IX-A14. Frontend code is now always loaded.
|
17 |
* Removed script to shortcode conversion warning and tool.
|
18 |
* The shortcode generators now produce self-closing shortcodes, i.e. without [/wppa].
|
|
|
19 |
|
20 |
= 6.9.21 =
|
21 |
|
16 |
* Removed Table IX-A14. Frontend code is now always loaded.
|
17 |
* Removed script to shortcode conversion warning and tool.
|
18 |
* The shortcode generators now produce self-closing shortcodes, i.e. without [/wppa].
|
19 |
+
* Changed the meaning of Table IV-F5. It now indicates whether users can subscribe to emails on any comment given.
|
20 |
|
21 |
= 6.9.21 =
|
22 |
|
js/wppa-admin-scripts.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
-
/* Version
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -1945,7 +1945,7 @@ function wppaAjaxPopupWindow( slug ) {
|
|
1945 |
|
1946 |
// Process result
|
1947 |
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
1948 |
-
var result = xmlhttp.responseText;
|
1949 |
|
1950 |
var opt = {
|
1951 |
modal: true,
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 7.0.00
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
1945 |
|
1946 |
// Process result
|
1947 |
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
1948 |
+
var result = wppaEntityDecode( xmlhttp.responseText );
|
1949 |
|
1950 |
var opt = {
|
1951 |
modal: true,
|
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";function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",o="";a=e||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==n.status){var e=wppaTrim(n.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}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("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(o+="&wppa-watermark-file="+e),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("photostatus-"+t).innerHTML=e[2];break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(s,l,r,u,c,d){c||(c=""),d||(d="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[s]||(wppaAjaxPhotoCount[s]=0),wppaAjaxPhotoCount[s]++,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(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxPhotoCount[s]--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":var o;if(0==wppaAjaxPhotoCount[s]?jQuery("#photostatus-"+s).html(a[2]):jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")"),a[3])(o=jQuery("#fs-a-"+s).attr("href").split("="))[1]=parseInt(o[1])+1,jQuery("#fs-a-"+s).attr("href",o[0]+"="+o[1]),jQuery("#fs-img-"+s).attr("src",o[0]+"="+o[1]);if(a[4])(o=jQuery("#tnp-"+s).attr("src").split("="))[1]=parseInt(o[1])+1,jQuery("#tnp-"+s).attr("src",o[0]+"="+o[1]);void 0!==a[5]&&(jQuery("#imstack-"+s).html(a[5]),0<a[5].length?jQuery("#imstackbutton-"+s).css("display",""):jQuery("#imstackbutton-"+s).css("display","none")),void 0!==a[6]&&jQuery("#dispfileinfo-"+s).html(a[6]);break;case"99":jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+a[2]+"</span>"+d);break;default:jQuery("#photostatus-"+s).html('<span style="color:red">'+a[2]+" ("+a[1]+")</span>")}"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"});var n=0,i=-1;for(count=wppaPhotoUpdateMatrix.length;n<count;)wppaPhotoUpdateMatrix[n][0]==s&&wppaPhotoUpdateMatrix[n][1]==l&&(i=n),n++;if(wppaPhotoUpdateMatrix[i]&&(wppaPhotoUpdateMatrix[i][2]=r||0,wppaPhotoUpdateMatrix[i][4]=!1,wppaPhotoUpdateMatrix[i][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),u&&"0"==a[1])return jQuery("#photostatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+s)},1e3)},error:function(e,t,p){wppaAjaxPhotoCount[s]--,jQuery("#photostatus-"+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 wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var o=0,n=-1,i=wppaAlbumUpdateMatrix.length;o<i;)wppaAlbumUpdateMatrix[o][0]==s&&wppaAlbumUpdateMatrix[o][1]==l&&(n=o),o++;wppaAlbumUpdateMatrix[n][2]=r||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]);break;default:jQuery("#photostatus-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#photostatus-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(o,e,i){if(i);else if(!e&&"yes"==document.getElementById(o+"_continue").value)return document.getElementById(o+"_continue").value="no",document.getElementById(o+"_button").value="Start!",void(0<jQuery("#"+o+"_togo").html()&&(jQuery("#"+o+"_status").html("Pausing..."),jQuery("#"+o+"_button").css("display","none")));i||(document.getElementById(o+"_continue").value="yes",document.getElementById(o+"_button").value="Stop!",""==jQuery("#"+o+"_status").html()&&jQuery("#"+o+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+o+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(i?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),o=a[1],n=!1;return o?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),n=!0),jQuery("#"+o+"_status").html(a[2]),jQuery("#"+o+"_togo").html(a[3]),jQuery("#"+o+"_button").css("display",""),n||"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('"+o+"', false)",20):void("yes"!=document.getElementById(o+"_continue").value?i||jQuery("#"+o+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+o+"', 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 = "+o+", Error = "+p+", status = "+t,"force"),jQuery("#"+o+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==o&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==o&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==o&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+o+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).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"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r).attr("title",a[2]),a[4])for(var o,n,i,s=a[4].split(";"),l=0;l<s.length;)o=s[l].split(":"),n=jQuery("#"+o[0]).html(),i=o[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[0]).html(i),l++}},error:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==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=[],o=0,n=0;for(t||(t="."),p=jQuery(e),n=o=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(i){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+i,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+i+"_togo").html(a[0]);var o=jQuery("#"+i+"_status").html(),n=a[1];""!=o&&""==n&&(n='<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("#"+i+"_status").html(n),setTimeout(function(){wppaAjaxUpdateTogo(i)},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,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o).html(a[0])},error:function(e){},complete:function(e){}})}
|
1 |
+
var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album";function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",o="";a=e||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==n.status){var e=wppaTrim(n.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}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("photostatus-"+t).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+t).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("photostatus-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(o+="&wppa-watermark-file="+e),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("photostatus-"+t).innerHTML=e[2];break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(s,l,r,u,c,d){c||(c=""),d||(d="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[s]||(wppaAjaxPhotoCount[s]=0),wppaAjaxPhotoCount[s]++,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(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxPhotoCount[s]--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":var o;if(0==wppaAjaxPhotoCount[s]?jQuery("#photostatus-"+s).html(a[2]):jQuery("#photostatus-"+s).html("Working, please wait... ("+wppaAjaxPhotoCount[s]+")"),a[3])(o=jQuery("#fs-a-"+s).attr("href").split("="))[1]=parseInt(o[1])+1,jQuery("#fs-a-"+s).attr("href",o[0]+"="+o[1]),jQuery("#fs-img-"+s).attr("src",o[0]+"="+o[1]);if(a[4])(o=jQuery("#tnp-"+s).attr("src").split("="))[1]=parseInt(o[1])+1,jQuery("#tnp-"+s).attr("src",o[0]+"="+o[1]);void 0!==a[5]&&(jQuery("#imstack-"+s).html(a[5]),0<a[5].length?jQuery("#imstackbutton-"+s).css("display",""):jQuery("#imstackbutton-"+s).css("display","none")),void 0!==a[6]&&jQuery("#dispfileinfo-"+s).html(a[6]);break;case"99":jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+a[2]+"</span>"+d);break;default:jQuery("#photostatus-"+s).html('<span style="color:red">'+a[2]+" ("+a[1]+")</span>")}"description"==l&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"});var n=0,i=-1;for(count=wppaPhotoUpdateMatrix.length;n<count;)wppaPhotoUpdateMatrix[n][0]==s&&wppaPhotoUpdateMatrix[n][1]==l&&(i=n),n++;if(wppaPhotoUpdateMatrix[i]&&(wppaPhotoUpdateMatrix[i][2]=r||0,wppaPhotoUpdateMatrix[i][4]=!1,wppaPhotoUpdateMatrix[i][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),u&&"0"==a[1])return jQuery("#photostatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+s)},1e3)},error:function(e,t,p){wppaAjaxPhotoCount[s]--,jQuery("#photostatus-"+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 wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var o=0,n=-1,i=wppaAlbumUpdateMatrix.length;o<i;)wppaAlbumUpdateMatrix[o][0]==s&&wppaAlbumUpdateMatrix[o][1]==l&&(n=o),o++;wppaAlbumUpdateMatrix[n][2]=r||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]);break;default:jQuery("#photostatus-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#photostatus-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(o,e,i){if(i);else if(!e&&"yes"==document.getElementById(o+"_continue").value)return document.getElementById(o+"_continue").value="no",document.getElementById(o+"_button").value="Start!",void(0<jQuery("#"+o+"_togo").html()&&(jQuery("#"+o+"_status").html("Pausing..."),jQuery("#"+o+"_button").css("display","none")));i||(document.getElementById(o+"_continue").value="yes",document.getElementById(o+"_button").value="Stop!",""==jQuery("#"+o+"_status").html()&&jQuery("#"+o+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+o+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(i?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),o=a[1],n=!1;return o?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),n=!0),jQuery("#"+o+"_status").html(a[2]),jQuery("#"+o+"_togo").html(a[3]),jQuery("#"+o+"_button").css("display",""),n||"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('"+o+"', false)",20):void("yes"!=document.getElementById(o+"_continue").value?i||jQuery("#"+o+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+o+"', 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 = "+o+", Error = "+p+", status = "+t,"force"),jQuery("#"+o+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==o&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==o&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==o&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+o+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=wppaEntityDecode(p.responseText),i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).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"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r).attr("title",a[2]),a[4])for(var o,n,i,s=a[4].split(";"),l=0;l<s.length;)o=s[l].split(":"),n=jQuery("#"+o[0]).html(),i=o[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[0]).html(i),l++}},error:function(e){jQuery("#img_"+r).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==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=[],o=0,n=0;for(t||(t="."),p=jQuery(e),n=o=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(i){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+i,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+i+"_togo").html(a[0]);var o=jQuery("#"+i+"_status").html(),n=a[1];""!=o&&""==n&&(n='<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("#"+i+"_status").html(n),setTimeout(function(){wppaAjaxUpdateTogo(i)},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,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o).html(a[0])},error:function(e){},complete:function(e){}})}
|
js/wppa-gutenberg-photo.js
CHANGED
@@ -94,7 +94,7 @@ jQuery(document).ready(function(){
|
|
94 |
|
95 |
},
|
96 |
success: function( result, status, xhr ) {
|
97 |
-
wppaPhotoDialogHtml = result;
|
98 |
},
|
99 |
error: function( xhr, status, error ) {
|
100 |
wppaConsoleLog( 'Get gutenberg photo dialog failed. Error = ' + error + ', status = ' + status, 'force' );
|
94 |
|
95 |
},
|
96 |
success: function( result, status, xhr ) {
|
97 |
+
wppaPhotoDialogHtml = wppaEntityDecode( result );
|
98 |
},
|
99 |
error: function( xhr, status, error ) {
|
100 |
wppaConsoleLog( 'Get gutenberg photo dialog failed. Error = ' + error + ', status = ' + status, 'force' );
|
js/wppa-gutenberg-wppa.js
CHANGED
@@ -87,7 +87,7 @@ jQuery(document).ready(function(){
|
|
87 |
|
88 |
},
|
89 |
success: function( result, status, xhr ) {
|
90 |
-
wppaWppaDialogHtml = result;
|
91 |
},
|
92 |
error: function( xhr, status, error ) {
|
93 |
wppaConsoleLog( 'Get gutenberg photo dialog failed. Error = ' + error + ', status = ' + status, 'force' );
|
87 |
|
88 |
},
|
89 |
success: function( result, status, xhr ) {
|
90 |
+
wppaWppaDialogHtml = wppaEntityDecode( result );
|
91 |
},
|
92 |
error: function( xhr, status, error ) {
|
93 |
wppaConsoleLog( 'Get gutenberg photo dialog failed. Error = ' + error + ', status = ' + status, 'force' );
|
js/wppa-tinymce-photo-front.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Pachkage: wp-photo-album-plus
|
3 |
*
|
4 |
*
|
5 |
-
* Version
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -110,7 +110,7 @@ jQuery(function(){
|
|
110 |
|
111 |
xmlhttp.onreadystatechange=function() {
|
112 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
113 |
-
var formtext = xmlhttp.responseText;
|
114 |
|
115 |
var form = jQuery(formtext);
|
116 |
|
2 |
* Pachkage: wp-photo-album-plus
|
3 |
*
|
4 |
*
|
5 |
+
* Version 7.0.00
|
6 |
*
|
7 |
*/
|
8 |
|
110 |
|
111 |
xmlhttp.onreadystatechange=function() {
|
112 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
113 |
+
var formtext = wppaEntityDecode(xmlhttp.responseText);
|
114 |
|
115 |
var form = jQuery(formtext);
|
116 |
|
js/wppa-tinymce-photo-front.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wppaPhotoEvaluate(){var o,e;if(e=wppaMyPhotoSelection?"my":"all",photo=jQuery("#wppaphoto-"+e+"photo").val(),wppaIsEmpty(photo))jQuery("#wppaphoto-"+e+"photo").css("color","#700"),o="";else{switch(wppaOutputType){case"shortcode":id=photo.replace(/\//g,""),id=id.split("."),id=id[0],o="[photo "+id+"]";break;case"html":if(-1!=photo.indexOf("xxx"))o="Videos are not supported here";else{var p=wppaShortcodeTemplateId;o=wppaShortcodeTemplate.split(p).join(photo)}break;case"img":if(-1!=photo.indexOf("xxx")){var t=photo.replace("xxx","");o='<video preload="metadata" style="width:100%;height:auto;" controls ><source src="'+wppaPhotoDirectory+t+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+t+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+t+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+t+'webm" type="video/webm"></video>'}else o='<img src="'+wppaPhotoDirectory+photo+'" />';break;default:o="Unimplemented output type"}jQuery("#wppaphoto-"+e+"photo").css("color","#070"),o=o.replace(/"/g,"""),jQuery("#wppaphoto-photo-preview-tr").show(),wppaTinyMceBasicPhotoPreview(photo)}var a='<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+o+'" />';jQuery("#wppaphoto-shortcode-preview-container").html(a),!wppaIsEmpty(photo)?(jQuery("#wppaphoto-submit").show(),jQuery("#wppaphoto-submit-notok").hide()):(jQuery("#wppaphoto-submit").hide(),jQuery("#wppaphoto-submit-notok").show())}function wppaTinyMceBasicPhotoPreview(o){if(jQuery("#wppaphoto-photo-preview").html(""),"#potd"==o)jQuery("#wppaphoto-photo-preview").html(wppaNoPreview);else if(-1!=o.indexOf("xxx")){var e=o.replace("xxx","");jQuery("#wppaphoto-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+e+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+e+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'webm" type="video/webm"></video>')}else jQuery("#wppaphoto-photo-preview").html('<img src="'+wppaPhotoDirectory+o+'" style="max-width:400px; max-height:300px;" />')}function wppaDisplaySelectedFile(o,e){var p=jQuery("#"+o)[0].files[0].name;jQuery("#"+e).val("Upload "+p)}
|
1 |
+
tinymce.PluginManager.add("wppaphoto",function(o,e){o.addButton("wppa_photo_button",{image:wppaImageDirectory+"camera32.png",tooltip:"WPPA+ Insert photo",onclick:function(){var o={modal:!0,resizable:!0,width:720,show:{effect:"fadeIn",duration:400},closeText:"",close:function(o,e){wppaMyPhotoSelection||(wppaMyPhotoSelection=!0,jQuery("#wppaphoto-allphoto-tr").hide(),jQuery("#wppaphoto-myphoto-tr").show(),jQuery("#wppaphoto-photo-preview").html(""),jQuery(".wppa-photo-select-item").prop("selected",!1),jQuery(".wppa-photo-select-item-first").prop("selected",!0))},open:function(o,e){wppaPhotoEvaluate()}};jQuery("#wppaphoto-form").dialog(o).dialog("open"),jQuery(".ui-widget-header").css({background:"none"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").css({position:"absolute",top:"15px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"20px",width:"16px",height:"16px"}),jQuery(".ui-widget-overlay").css({background:"none"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-icon-closethick").css({display:"none"})}})}),jQuery(function(){var p;p=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var o=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcephotodialogfront";p.onreadystatechange=function(){if(4==p.readyState&&404!=p.status){var o=wppaEntityDecode(p.responseText),e=jQuery(o);e.find("table");e.appendTo("body").hide(),e.find("#wppaphoto-submit").click(function(){newShortcode=jQuery("#wppaphoto-shortcode-preview").val(),newShortcode=newShortcode.replace(/"/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),wppaMyPhotoSelection||(wppaMyPhotoSelection=!0,jQuery("#wppaphoto-allphoto-tr").hide(),jQuery("#wppaphoto-myphoto-tr").show(),jQuery("#wppaphoto-photo-preview").html(""),jQuery(".wppa-photo-select-item").prop("selected",!1),jQuery(".wppa-photo-select-item-first").prop("selected",!0),jQuery("#wppaphoto-myphoto").val("")),jQuery("#wppaphoto-form").dialog("close")})}},p.open("GET",o,!0),p.send()});var wppaMyPhotoSelection=!0;function wppaPhotoEvaluate(){var o,e;if(e=wppaMyPhotoSelection?"my":"all",photo=jQuery("#wppaphoto-"+e+"photo").val(),wppaIsEmpty(photo))jQuery("#wppaphoto-"+e+"photo").css("color","#700"),o="";else{switch(wppaOutputType){case"shortcode":id=photo.replace(/\//g,""),id=id.split("."),id=id[0],o="[photo "+id+"]";break;case"html":if(-1!=photo.indexOf("xxx"))o="Videos are not supported here";else{var p=wppaShortcodeTemplateId;o=wppaShortcodeTemplate.split(p).join(photo)}break;case"img":if(-1!=photo.indexOf("xxx")){var t=photo.replace("xxx","");o='<video preload="metadata" style="width:100%;height:auto;" controls ><source src="'+wppaPhotoDirectory+t+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+t+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+t+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+t+'webm" type="video/webm"></video>'}else o='<img src="'+wppaPhotoDirectory+photo+'" />';break;default:o="Unimplemented output type"}jQuery("#wppaphoto-"+e+"photo").css("color","#070"),o=o.replace(/"/g,"""),jQuery("#wppaphoto-photo-preview-tr").show(),wppaTinyMceBasicPhotoPreview(photo)}var a='<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+o+'" />';jQuery("#wppaphoto-shortcode-preview-container").html(a),!wppaIsEmpty(photo)?(jQuery("#wppaphoto-submit").show(),jQuery("#wppaphoto-submit-notok").hide()):(jQuery("#wppaphoto-submit").hide(),jQuery("#wppaphoto-submit-notok").show())}function wppaTinyMceBasicPhotoPreview(o){if(jQuery("#wppaphoto-photo-preview").html(""),"#potd"==o)jQuery("#wppaphoto-photo-preview").html(wppaNoPreview);else if(-1!=o.indexOf("xxx")){var e=o.replace("xxx","");jQuery("#wppaphoto-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+e+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+e+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'webm" type="video/webm"></video>')}else jQuery("#wppaphoto-photo-preview").html('<img src="'+wppaPhotoDirectory+o+'" style="max-width:400px; max-height:300px;" />')}function wppaDisplaySelectedFile(o,e){var p=jQuery("#"+o)[0].files[0].name;jQuery("#"+e).val("Upload "+p)}
|
js/wppa-tinymce-photo.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Pachkage: wp-photo-album-plus
|
3 |
*
|
4 |
*
|
5 |
-
* Version
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -46,7 +46,7 @@ jQuery(function(){
|
|
46 |
xmlhttp.send();
|
47 |
xmlhttp.onreadystatechange=function() {
|
48 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
49 |
-
var formtext = xmlhttp.responseText;
|
50 |
|
51 |
var form = jQuery(formtext);
|
52 |
|
2 |
* Pachkage: wp-photo-album-plus
|
3 |
*
|
4 |
*
|
5 |
+
* Version 7.0.00
|
6 |
*
|
7 |
*/
|
8 |
|
46 |
xmlhttp.send();
|
47 |
xmlhttp.onreadystatechange=function() {
|
48 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
49 |
+
var formtext = wppaEntityDecode(xmlhttp.responseText);
|
50 |
|
51 |
var form = jQuery(formtext);
|
52 |
|
js/wppa-tinymce-photo.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wppaPhotoEvaluate(){var o,e;e=wppaMyPhotoSelection?"my":"all",photo=jQuery("#wppaphoto-"+e+"photo").val(),wppaIsEmpty(photo)?(jQuery("#wppaphoto-"+e+"photo").css("color","#700"),o=""):(id=photo.replace(/\//g,""),id=id.split("."),id=id[0],jQuery("#wppaphoto-photo-preview-tr").show(),wppaTinyMceBasicPhotoPreview(photo),jQuery("#wppaphoto-"+e+"photo").css("color","#070"),o="[photo "+id+"]");var p='<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(o=o.replace(/"/g,"""))+'" />';jQuery("#wppaphoto-shortcode-preview-container").html(p),!wppaIsEmpty(photo)?(jQuery("#wppaphoto-submit").show(),jQuery("#wppaphoto-submit-notok").hide()):(jQuery("#wppaphoto-submit").hide(),jQuery("#wppaphoto-submit-notok").show())}function wppaTinyMceBasicPhotoPreview(o){if("#potd"==o)jQuery("#wppaphoto-photo-preview").html(wppaNoPreview);else if(-1!=o.indexOf("xxx")){var e=o.replace("xxx","");jQuery("#wppaphoto-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+e+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+e+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'webm" type="video/webm"></video>')}else jQuery("#wppaphoto-photo-preview").html('<img src="'+wppaPhotoDirectory+o+'" style="max-width:400px; max-height:300px;" />')}function wppaDisplaySelectedFile(o,e){var p=jQuery("#"+o)[0].files[0].name;jQuery("#"+e).val("Upload "+p)}
|
1 |
+
tinymce.PluginManager.add("wppaphoto",function(o,e){o.addButton("wppa_photo_button",{image:wppaImageDirectory+"camera32.png",tooltip:"WPPA+ Insert photo",onclick:function(){var o=jQuery(window).width(),e=jQuery(window).height(),p=720<o?720:o;p-=80,e=jQuery(window).height(),e-=120,tb_show("WPPA+ Insert photo","#TB_inline?width="+p+"&height="+e+"&inlineId=wppaphoto-form"),wppaPhotoEvaluate()}})}),jQuery(function(){var p;p=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var o=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcephotodialog";p.open("GET",o,!0),p.send(),p.onreadystatechange=function(){if(4==p.readyState&&404!=p.status){var o=wppaEntityDecode(p.responseText),e=jQuery(o);e.find("table");e.appendTo("body").hide(),e.find("#wppaphoto-submit").click(function(){newShortcode=jQuery("#wppaphoto-shortcode-preview").val(),newShortcode=newShortcode.replace(/"/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),wppaMyPhotoSelection=!0,jQuery("#wppaphoto-allphoto-tr").hide(),jQuery("#wppaphoto-myphoto-tr").show(),jQuery("#wppaphoto-photo-preview").html(""),tb_remove()})}}});var wppaMyPhotoSelection=!0;function wppaPhotoEvaluate(){var o,e;e=wppaMyPhotoSelection?"my":"all",photo=jQuery("#wppaphoto-"+e+"photo").val(),wppaIsEmpty(photo)?(jQuery("#wppaphoto-"+e+"photo").css("color","#700"),o=""):(id=photo.replace(/\//g,""),id=id.split("."),id=id[0],jQuery("#wppaphoto-photo-preview-tr").show(),wppaTinyMceBasicPhotoPreview(photo),jQuery("#wppaphoto-"+e+"photo").css("color","#070"),o="[photo "+id+"]");var p='<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(o=o.replace(/"/g,"""))+'" />';jQuery("#wppaphoto-shortcode-preview-container").html(p),!wppaIsEmpty(photo)?(jQuery("#wppaphoto-submit").show(),jQuery("#wppaphoto-submit-notok").hide()):(jQuery("#wppaphoto-submit").hide(),jQuery("#wppaphoto-submit-notok").show())}function wppaTinyMceBasicPhotoPreview(o){if("#potd"==o)jQuery("#wppaphoto-photo-preview").html(wppaNoPreview);else if(-1!=o.indexOf("xxx")){var e=o.replace("xxx","");jQuery("#wppaphoto-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+e+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+e+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'webm" type="video/webm"></video>')}else jQuery("#wppaphoto-photo-preview").html('<img src="'+wppaPhotoDirectory+o+'" style="max-width:400px; max-height:300px;" />')}function wppaDisplaySelectedFile(o,e){var p=jQuery("#"+o)[0].files[0].name;jQuery("#"+e).val("Upload "+p)}
|
js/wppa-tinymce-shortcodes.js
CHANGED
@@ -39,7 +39,7 @@ jQuery(function(){
|
|
39 |
xmlhttp.send();
|
40 |
xmlhttp.onreadystatechange=function() {
|
41 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
42 |
-
var formtext = xmlhttp.responseText;
|
43 |
|
44 |
var form = jQuery(formtext);
|
45 |
|
39 |
xmlhttp.send();
|
40 |
xmlhttp.onreadystatechange=function() {
|
41 |
if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
|
42 |
+
var formtext = wppaEntityDecode(xmlhttp.responseText);
|
43 |
|
44 |
var form = jQuery(formtext);
|
45 |
|
js/wppa-tinymce-shortcodes.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wppaGalleryEvaluate(){var e;jQuery("#wppagallery-galery-type-tr").hide(),jQuery("#wppagallery-slides-type-tr").hide(),jQuery("#wppagallery-single-type-tr").hide(),jQuery("#wppagallery-search-type-tr").hide(),jQuery("#wppagallery-miscel-type-tr").hide(),jQuery("#wppagallery-album-type-tr").hide(),jQuery("#wppagallery-album-real-tr").hide(),jQuery("#wppagallery-album-real-search-tr").hide(),jQuery("#wppagallery-album-realopt-tr").hide(),jQuery("#wppagallery-album-virt-tr").hide(),jQuery("#wppagallery-album-virt-cover-tr").hide(),jQuery("#wppagallery-owner-tr").hide(),jQuery("#wppagallery-owner-parent-tr").hide(),jQuery("#wppagallery-album-parent-tr").hide(),jQuery("#wppagallery-album-count-tr").hide(),jQuery("#wppagallery-photo-count-tr").hide(),jQuery("#wppagallery-albumcat-tr").hide(),jQuery("#wppagallery-photo-tr").hide(),jQuery("#wppagallery-photo-preview-tr").hide(),jQuery("#wppagallery-phototags-tr").hide(),jQuery("#wppagallery-search-tr").hide(),jQuery("#wppagallery-taglist-tr").hide(),jQuery("#wppagallery-album-super-tr").hide(),jQuery("#wppagallery-calendar-tr").hide(),jQuery("#wppagallery-tags-cats-tr").hide(),jQuery("#wppagallery-landing-tr").hide(),jQuery("#wppagallery-rootalbum-tr").hide(),jQuery("#wppagallery-admins-tr").hide();var a,r,l,p,y,t="[wppa",o="",u="",s="",w="",g="",c="",i="",h="",n="",d="",j="",Q=!1,m=!1,b=!1,v=!1,k=!1,f=!1,E=!1,x=!1,I=!1,P=!1,T="",S="",N="",A="",C="",G=!1,z=!1,B="",D="0",M="0",_="";switch(jQuery("select").css("color","#700"),jQuery("#wppagallery-album-parent-parent").css("color","#070"),jQuery("#wppagallery-align").css("color","#070"),a=jQuery("#wppagallery-top-type").val(),wppaIsEmpty(a)||jQuery("#wppagallery-top-type").css("color","#070"),a){case"galerytype":jQuery("#wppagallery-galery-type-tr").show(),o=jQuery("#wppagallery-galery-type").val(),b=Q=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-galery-type").css("color","#070"),u=o);break;case"slidestype":jQuery("#wppagallery-slides-type-tr").show(),o=jQuery("#wppagallery-slides-type").val(),b=m=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-slides-type").css("color","#070"),s=o);break;case"singletype":jQuery("#wppagallery-single-type-tr").show(),o=jQuery("#wppagallery-single-type").val(),v=!0,jQuery("#wppagallery-photo-tr").show(),wppaIsEmpty(o)||jQuery("#wppagallery-single-type").css("color","#070");break;case"searchtype":switch(jQuery("#wppagallery-search-type-tr").show(),I=!0,g=o=jQuery("#wppagallery-search-type").val(),wppaIsEmpty(o)||jQuery("#wppagallery-search-type").css("color","#070"),o){case"search":jQuery("#wppagallery-search-tr").show(),jQuery("#wppagallery-root").prop("checked")&&jQuery("#wppagallery-rootalbum-tr").show(),M=jQuery("#wppagallery-rootalbum").val(),jQuery("#wppagallery-landing-tr").show(),D=jQuery("#wppagallery-landing").val();break;case"supersearch":break;case"tagcloud":case"multitag":if(jQuery("#wppagallery-taglist-tr").show(),!jQuery("#wppagallery-alltags").prop("checked")){E=!0,jQuery("#wppagallery-seltags").show(),l=jQuery(".wppagallery-taglist-tags");var L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;T=wppaArrayToEnum(L,",")}break;case"superview":jQuery("#wppagallery-album-super-tr").show(),i=jQuery("#wppagallery-album-super-parent").val();break;case"calendar":jQuery("#wppagallery-calendar-tr").show(),jQuery("#wppagallery-album-super-tr").show(),C=jQuery("#wppagallery-calendar-type").val(),G=jQuery("#wppagallery-calendar-reverse").prop("checked"),z=jQuery("#wppagallery-calendar-allopen").prop("checked"),h=jQuery("#wppagallery-album-super-parent").val()}break;case"misceltype":switch(jQuery("#wppagallery-miscel-type-tr").show(),o=jQuery("#wppagallery-miscel-type").val(),P=!0,wppaIsEmpty(o)||jQuery("#wppagallery-miscel-type").css("color","#070"),o){case"generic":c=o;break;case"upload":c=o,jQuery("#wppagallery-album-realopt-tr").show(),i=(i=jQuery("#wppagallery-album-realopt").val()).toString().replace(/,/g,".");break;case"landing":case"stereo":c=o;break;case"choice":c=o,jQuery("#wppagallery-admins-tr").show(),_=wppaGetSelectionEnumByClass(".wppagallery-admin",",")}}if(wppaIsEmpty(o)||(t+=' type="'+o+'"'),b)switch(w=jQuery("#wppagallery-album-type").val(),wppaIsEmpty(w)||jQuery("#wppagallery-album-type").css("color","#070"),w){case"real":if(jQuery("#wppagallery-album-real-tr").show(),jQuery("#wppagallery-album-real-search-tr").show(),jQuery("#wppagallery-album-real-search"))if(jQuery("#wppagallery-album-real-search").val()){var q=jQuery("#wppagallery-album-real-search").val().toLowerCase();if(!wppaIsEmpty(q)&&(albums=jQuery(".wppagallery-album-r"),0<albums.length))for(var H=0;H<albums.length;){-1==albums[H].innerHTML.toLowerCase().search(q)?(jQuery(albums[H]).removeAttr("selected"),jQuery(albums[H]).hide()):jQuery(albums[H]).show(),H++}}else jQuery(".wppagallery-album-r").show();i=(i=jQuery("#wppagallery-album-real").val()).toString().replace(/,/g,".");break;case"virtual":if("cover"==o?(jQuery("#wppagallery-album-virt-cover-tr").show(),i=jQuery("#wppagallery-album-virt-cover").val()):(jQuery("#wppagallery-album-virt-tr").show(),i=jQuery("#wppagallery-album-virt").val()),!wppaIsEmpty(i))switch(jQuery("#wppagallery-album-virt").css("color","#070"),i){case"#topten":case"#lasten":case"#featen":case"#comten":jQuery("#wppagallery-album-realopt-tr").show(),0<jQuery(".wppagallery-album-ropt").length?h=wppaGetSelectionEnumByClass(".wppagallery-album-ropt","."):-1!=(h=jQuery("#wppagallery-album-realopt").val()).indexOf(",")&&(parr=h.split(","),h=wppaArrayToEnum(parr,".")),""==h&&(h="0"),jQuery("#wppagallery-photo-count-tr").show(),n=jQuery("#wppagallery-photo-count").val();break;case"#tags":jQuery("#wppagallery-phototags-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",f=!0,l=jQuery(".wppagallery-phototags");L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;N=wppaArrayToEnum(L,B);break;case"#last":jQuery("#wppagallery-album-parent-tr").show(),h=jQuery("#wppagallery-album-parent-parent").val(),jQuery("#wppagallery-album-count-tr").show(),n=jQuery("#wppagallery-album-count").val();break;case"#cat":jQuery("#wppagallery-albumcat-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",x=!0,l=jQuery(".wppagallery-albumcat");var O=[];for(r=H=0;H<l.length;)l[H].selected&&(O[r]=l[H].value,r++),H++;A=wppaArrayToEnum(O,B);break;case"#owner":case"#upldr":jQuery("#wppagallery-owner-tr").show(),k=!0,S=jQuery("#wppagallery-owner").val(),wppaIsEmpty(S)||(jQuery("#wppagallery-owner").css("color","#070"),jQuery("#wppagallery-owner-parent-tr").show(),h=(h=wppaGetSelectionEnumByClass(".wppagallery-album-p",".")).toString().replace("zero","0"));break;case"#all":break;default:null!=i&&alert(wppaUIERR+": "+i)}break;default:i=""}wppaIsEmpty(i)||(t+=' album="'+i,""!=S&&(t+=","+S),""==h&&""!=n&&(h="0"),""!=h&&(t+=","+h),""!=n&&(t+=","+n),""!=N&&(t+=","+N),""!=A&&(t+=","+A),t+='"'),v&&(d=jQuery("#wppagallery-photo").val())&&(j=(j=(j=d.replace(/\//g,"")).split("."))[0],jQuery("#wppagallery-photo-preview-tr").show(),wppaTinyMcePhotoPreview(d),t+=' photo="'+j+'"',jQuery("#wppagallery-photo").css("color","#070")),"search"==o&&(jQuery("#wppagallery-sub").prop("checked")&&(t+=' sub="1"'),jQuery("#wppagallery-root").prop("checked")&&(t+="0"!=M?' root="#'+M+'"':' root="1"'),"0"!=D&&(t+=' landing="'+D+'"')),"tagcloud"!=o&&"multitag"!=o||""!=T&&(t+=' taglist="'+T+'"'),"calendar"==o&&(t+=' calendar="'+C+'"',h&&(t+=' album="'+h+'"'),G&&(t+=' reverse="1"'),z&&(t+=' all="1"')),"choice"==o&&0<_.length&&(t+=' admin="'+_+'"');var R=document.getElementById("wppagallery-size").value,U=R.split(",");if(U[1]?"auto"==U[0]&&parseInt(U[1])==U[1]&&100<U[1]?jQuery("#wppagallery-size").css("color","#070"):(R=0,jQuery("#wppagallery-size").css("color","#700")):(""!=R&&"auto"!=R&&parseInt(R)!=R&&(R=0,jQuery("#wppagallery-size").css("color","#700")),R<0&&(R=-R),R<100&&(R/=100),jQuery("#wppagallery-size").css("color","#070")),0!=R&&(t+=' size="'+R+'"'),"none"!=(p=jQuery("#wppagallery-align").val())&&(t+=' align="'+p+'"'),y='<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(t=(t+="]").replace(/"/g,"""))+'" />',jQuery("#wppagallery-shortcode-preview-container").html(y),!(e=!(""==i&&b||""==d&&v||""==S&&k||""==T&&E||""==u&&Q||""==s&&m||""==g&&I||""==c&&P||""==N&&f||""==A&&x))){""==i&&b&&"Need album\n",""==d&&v&&"Need photo\n",""==S&&k&&"Need owner",""==T&&E&&"Need taglist",""==u&&Q&&"Need galType",""==s&&m&&"Need slideType",""==g&&I&&"Need searchType",""==c&&P&&"Need miscType",""==N&&f&&"Need tags",""==A&&x&&"Need cats"}e?(jQuery("#wppagallery-submit").show(),jQuery("#wppagallery-submit-notok").hide()):(jQuery("#wppagallery-submit").hide(),jQuery("#wppagallery-submit-notok").show())}function wppaTinyMcePhotoPreview(e){if("#potd"==e)jQuery("#wppagallery-photo-preview").html(wppaNoPreview);else if(-1!=e.indexOf("xxx")){var a=e.replace("xxx","");jQuery("#wppagallery-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+a+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+a+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'webm" type="video/webm"></video>')}else jQuery("#wppagallery-photo-preview").html('<img src="'+wppaPhotoDirectory+e+'" style="max-width:400px; max-height:300px;" />')}tinymce.PluginManager.add("wppagallery",function(e,a){e.addButton("wppa_gallery_button",{image:wppaImageDirectory+"albumnew32.png",tooltip:"WPPA+ Shortcode Generator",onclick:function(){var e=jQuery(window).width(),a=jQuery(window).height(),r=720<e?720:e;r-=80,a=jQuery(window).height(),a-=120,tb_show("WPPA+ Shortcode Generator","#TB_inline?width="+r+"&height="+a+"&inlineId=wppagallery-form")}})}),jQuery(function(){var r=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcedialog";r.open("GET",e,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState&&404!=r.status){var e=r.responseText,a=jQuery(e);a.find("table");a.appendTo("body").hide(),a.find("#wppagallery-submit").click(function(){newShortcode=document.getElementById("wppagallery-shortcode-preview").value,newShortcode=newShortcode.replace(/"/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),tb_remove()})}}});
|
1 |
+
function wppaGalleryEvaluate(){var e;jQuery("#wppagallery-galery-type-tr").hide(),jQuery("#wppagallery-slides-type-tr").hide(),jQuery("#wppagallery-single-type-tr").hide(),jQuery("#wppagallery-search-type-tr").hide(),jQuery("#wppagallery-miscel-type-tr").hide(),jQuery("#wppagallery-album-type-tr").hide(),jQuery("#wppagallery-album-real-tr").hide(),jQuery("#wppagallery-album-real-search-tr").hide(),jQuery("#wppagallery-album-realopt-tr").hide(),jQuery("#wppagallery-album-virt-tr").hide(),jQuery("#wppagallery-album-virt-cover-tr").hide(),jQuery("#wppagallery-owner-tr").hide(),jQuery("#wppagallery-owner-parent-tr").hide(),jQuery("#wppagallery-album-parent-tr").hide(),jQuery("#wppagallery-album-count-tr").hide(),jQuery("#wppagallery-photo-count-tr").hide(),jQuery("#wppagallery-albumcat-tr").hide(),jQuery("#wppagallery-photo-tr").hide(),jQuery("#wppagallery-photo-preview-tr").hide(),jQuery("#wppagallery-phototags-tr").hide(),jQuery("#wppagallery-search-tr").hide(),jQuery("#wppagallery-taglist-tr").hide(),jQuery("#wppagallery-album-super-tr").hide(),jQuery("#wppagallery-calendar-tr").hide(),jQuery("#wppagallery-tags-cats-tr").hide(),jQuery("#wppagallery-landing-tr").hide(),jQuery("#wppagallery-rootalbum-tr").hide(),jQuery("#wppagallery-admins-tr").hide();var a,r,l,p,y,t="[wppa",o="",u="",s="",w="",c="",g="",i="",h="",n="",d="",j="",Q=!1,m=!1,b=!1,v=!1,k=!1,f=!1,E=!1,x=!1,I=!1,P=!1,T="",S="",N="",A="",C="",G=!1,z=!1,B="",D="0",M="0",_="";switch(jQuery("select").css("color","#700"),jQuery("#wppagallery-album-parent-parent").css("color","#070"),jQuery("#wppagallery-align").css("color","#070"),a=jQuery("#wppagallery-top-type").val(),wppaIsEmpty(a)||jQuery("#wppagallery-top-type").css("color","#070"),a){case"galerytype":jQuery("#wppagallery-galery-type-tr").show(),o=jQuery("#wppagallery-galery-type").val(),b=Q=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-galery-type").css("color","#070"),u=o);break;case"slidestype":jQuery("#wppagallery-slides-type-tr").show(),o=jQuery("#wppagallery-slides-type").val(),b=m=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(o)||(jQuery("#wppagallery-slides-type").css("color","#070"),s=o);break;case"singletype":jQuery("#wppagallery-single-type-tr").show(),o=jQuery("#wppagallery-single-type").val(),v=!0,jQuery("#wppagallery-photo-tr").show(),wppaIsEmpty(o)||jQuery("#wppagallery-single-type").css("color","#070");break;case"searchtype":switch(jQuery("#wppagallery-search-type-tr").show(),I=!0,c=o=jQuery("#wppagallery-search-type").val(),wppaIsEmpty(o)||jQuery("#wppagallery-search-type").css("color","#070"),o){case"search":jQuery("#wppagallery-search-tr").show(),jQuery("#wppagallery-root").prop("checked")&&jQuery("#wppagallery-rootalbum-tr").show(),M=jQuery("#wppagallery-rootalbum").val(),jQuery("#wppagallery-landing-tr").show(),D=jQuery("#wppagallery-landing").val();break;case"supersearch":break;case"tagcloud":case"multitag":if(jQuery("#wppagallery-taglist-tr").show(),!jQuery("#wppagallery-alltags").prop("checked")){E=!0,jQuery("#wppagallery-seltags").show(),l=jQuery(".wppagallery-taglist-tags");var L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;T=wppaArrayToEnum(L,",")}break;case"superview":jQuery("#wppagallery-album-super-tr").show(),i=jQuery("#wppagallery-album-super-parent").val();break;case"calendar":jQuery("#wppagallery-calendar-tr").show(),jQuery("#wppagallery-album-super-tr").show(),C=jQuery("#wppagallery-calendar-type").val(),G=jQuery("#wppagallery-calendar-reverse").prop("checked"),z=jQuery("#wppagallery-calendar-allopen").prop("checked"),h=jQuery("#wppagallery-album-super-parent").val()}break;case"misceltype":switch(jQuery("#wppagallery-miscel-type-tr").show(),o=jQuery("#wppagallery-miscel-type").val(),P=!0,wppaIsEmpty(o)||jQuery("#wppagallery-miscel-type").css("color","#070"),o){case"generic":g=o;break;case"upload":g=o,jQuery("#wppagallery-album-realopt-tr").show(),i=(i=jQuery("#wppagallery-album-realopt").val()).toString().replace(/,/g,".");break;case"landing":case"stereo":g=o;break;case"choice":g=o,jQuery("#wppagallery-admins-tr").show(),_=wppaGetSelectionEnumByClass(".wppagallery-admin",",")}}if(wppaIsEmpty(o)||(t+=' type="'+o+'"'),b)switch(w=jQuery("#wppagallery-album-type").val(),wppaIsEmpty(w)||jQuery("#wppagallery-album-type").css("color","#070"),w){case"real":if(jQuery("#wppagallery-album-real-tr").show(),jQuery("#wppagallery-album-real-search-tr").show(),jQuery("#wppagallery-album-real-search"))if(jQuery("#wppagallery-album-real-search").val()){var q=jQuery("#wppagallery-album-real-search").val().toLowerCase();if(!wppaIsEmpty(q)&&(albums=jQuery(".wppagallery-album-r"),0<albums.length))for(var H=0;H<albums.length;){-1==albums[H].innerHTML.toLowerCase().search(q)?(jQuery(albums[H]).removeAttr("selected"),jQuery(albums[H]).hide()):jQuery(albums[H]).show(),H++}}else jQuery(".wppagallery-album-r").show();i=(i=jQuery("#wppagallery-album-real").val()).toString().replace(/,/g,".");break;case"virtual":if("cover"==o?(jQuery("#wppagallery-album-virt-cover-tr").show(),i=jQuery("#wppagallery-album-virt-cover").val()):(jQuery("#wppagallery-album-virt-tr").show(),i=jQuery("#wppagallery-album-virt").val()),!wppaIsEmpty(i))switch(jQuery("#wppagallery-album-virt").css("color","#070"),i){case"#topten":case"#lasten":case"#featen":case"#comten":jQuery("#wppagallery-album-realopt-tr").show(),0<jQuery(".wppagallery-album-ropt").length?h=wppaGetSelectionEnumByClass(".wppagallery-album-ropt","."):-1!=(h=jQuery("#wppagallery-album-realopt").val()).indexOf(",")&&(parr=h.split(","),h=wppaArrayToEnum(parr,".")),""==h&&(h="0"),jQuery("#wppagallery-photo-count-tr").show(),n=jQuery("#wppagallery-photo-count").val();break;case"#tags":jQuery("#wppagallery-phototags-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",f=!0,l=jQuery(".wppagallery-phototags");L=[];for(r=H=0;H<l.length;)l[H].selected&&(L[r]=l[H].value,r++),H++;N=wppaArrayToEnum(L,B);break;case"#last":jQuery("#wppagallery-album-parent-tr").show(),h=jQuery("#wppagallery-album-parent-parent").val(),jQuery("#wppagallery-album-count-tr").show(),n=jQuery("#wppagallery-album-count").val();break;case"#cat":jQuery("#wppagallery-albumcat-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),B="or"==jQuery("[name=andor]:checked").val()?";":",",x=!0,l=jQuery(".wppagallery-albumcat");var O=[];for(r=H=0;H<l.length;)l[H].selected&&(O[r]=l[H].value,r++),H++;A=wppaArrayToEnum(O,B);break;case"#owner":case"#upldr":jQuery("#wppagallery-owner-tr").show(),k=!0,S=jQuery("#wppagallery-owner").val(),wppaIsEmpty(S)||(jQuery("#wppagallery-owner").css("color","#070"),jQuery("#wppagallery-owner-parent-tr").show(),h=(h=wppaGetSelectionEnumByClass(".wppagallery-album-p",".")).toString().replace("zero","0"));break;case"#all":break;default:null!=i&&alert(wppaUIERR+": "+i)}break;default:i=""}wppaIsEmpty(i)||(t+=' album="'+i,""!=S&&(t+=","+S),""==h&&""!=n&&(h="0"),""!=h&&(t+=","+h),""!=n&&(t+=","+n),""!=N&&(t+=","+N),""!=A&&(t+=","+A),t+='"'),v&&(d=jQuery("#wppagallery-photo").val())&&(j=(j=(j=d.replace(/\//g,"")).split("."))[0],jQuery("#wppagallery-photo-preview-tr").show(),wppaTinyMcePhotoPreview(d),t+=' photo="'+j+'"',jQuery("#wppagallery-photo").css("color","#070")),"search"==o&&(jQuery("#wppagallery-sub").prop("checked")&&(t+=' sub="1"'),jQuery("#wppagallery-root").prop("checked")&&(t+="0"!=M?' root="#'+M+'"':' root="1"'),"0"!=D&&(t+=' landing="'+D+'"')),"tagcloud"!=o&&"multitag"!=o||""!=T&&(t+=' taglist="'+T+'"'),"calendar"==o&&(t+=' calendar="'+C+'"',h&&(t+=' album="'+h+'"'),G&&(t+=' reverse="1"'),z&&(t+=' all="1"')),"choice"==o&&0<_.length&&(t+=' admin="'+_+'"');var R=document.getElementById("wppagallery-size").value,U=R.split(",");if(U[1]?"auto"==U[0]&&parseInt(U[1])==U[1]&&100<U[1]?jQuery("#wppagallery-size").css("color","#070"):(R=0,jQuery("#wppagallery-size").css("color","#700")):(""!=R&&"auto"!=R&&parseInt(R)!=R&&(R=0,jQuery("#wppagallery-size").css("color","#700")),R<0&&(R=-R),R<100&&(R/=100),jQuery("#wppagallery-size").css("color","#070")),0!=R&&(t+=' size="'+R+'"'),"none"!=(p=jQuery("#wppagallery-align").val())&&(t+=' align="'+p+'"'),y='<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(t=(t+="]").replace(/"/g,"""))+'" />',jQuery("#wppagallery-shortcode-preview-container").html(y),!(e=!(""==i&&b||""==d&&v||""==S&&k||""==T&&E||""==u&&Q||""==s&&m||""==c&&I||""==g&&P||""==N&&f||""==A&&x))){""==i&&b&&"Need album\n",""==d&&v&&"Need photo\n",""==S&&k&&"Need owner",""==T&&E&&"Need taglist",""==u&&Q&&"Need galType",""==s&&m&&"Need slideType",""==c&&I&&"Need searchType",""==g&&P&&"Need miscType",""==N&&f&&"Need tags",""==A&&x&&"Need cats"}e?(jQuery("#wppagallery-submit").show(),jQuery("#wppagallery-submit-notok").hide()):(jQuery("#wppagallery-submit").hide(),jQuery("#wppagallery-submit-notok").show())}function wppaTinyMcePhotoPreview(e){if("#potd"==e)jQuery("#wppagallery-photo-preview").html(wppaNoPreview);else if(-1!=e.indexOf("xxx")){var a=e.replace("xxx","");jQuery("#wppagallery-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+a+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+a+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'webm" type="video/webm"></video>')}else jQuery("#wppagallery-photo-preview").html('<img src="'+wppaPhotoDirectory+e+'" style="max-width:400px; max-height:300px;" />')}tinymce.PluginManager.add("wppagallery",function(e,a){e.addButton("wppa_gallery_button",{image:wppaImageDirectory+"albumnew32.png",tooltip:"WPPA+ Shortcode Generator",onclick:function(){var e=jQuery(window).width(),a=jQuery(window).height(),r=720<e?720:e;r-=80,a=jQuery(window).height(),a-=120,tb_show("WPPA+ Shortcode Generator","#TB_inline?width="+r+"&height="+a+"&inlineId=wppagallery-form")}})}),jQuery(function(){var r=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcedialog";r.open("GET",e,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState&&404!=r.status){var e=wppaEntityDecode(r.responseText),a=jQuery(e);a.find("table");a.appendTo("body").hide(),a.find("#wppagallery-submit").click(function(){newShortcode=document.getElementById("wppagallery-shortcode-preview").value,newShortcode=newShortcode.replace(/"/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),tb_remove()})}}});
|
js/wppa-utils.js
CHANGED
@@ -395,5 +395,19 @@ function wppaIconSize( mocc, dflt, large ) {
|
|
395 |
return result;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
// Say we're in
|
399 |
wppaConsoleLog( 'wppa-utils.js version '+wppaJsUtilsVersion+' loaded.', 'force' );
|
395 |
return result;
|
396 |
}
|
397 |
|
398 |
+
// Revert php htmlentities()
|
399 |
+
function wppaEntityDecode( txt ) {
|
400 |
+
var result;
|
401 |
+
|
402 |
+
result = txt;
|
403 |
+
result = result.split('&').join('&');
|
404 |
+
result = result.split('>').join('>');
|
405 |
+
result = result.split('<').join('<');
|
406 |
+
result = result.split('"').join('"');
|
407 |
+
result = result.split(''').join("'");
|
408 |
+
|
409 |
+
return result;
|
410 |
+
}
|
411 |
+
|
412 |
// Say we're in
|
413 |
wppaConsoleLog( 'wppa-utils.js version '+wppaJsUtilsVersion+' loaded.', 'force' );
|
js/wppa-utils.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaDebug,wppaJsUtilsVersion="7.0.00";function wppaTrim(e,
|
1 |
+
var wppaDebug,wppaJsUtilsVersion="7.0.00";function wppaTrim(e,t){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,r,p,o,n,i,s;switch(typeof t){case"string":for(r=(a=e).length,p=t.length;p<=r&&a.substr(0,p)==t;)r=(a=a.substr(p)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<t.length;)s=wppaTrimLeft(s,t[o]),o++;n=i==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,r,p,o,n,i,s;switch(typeof t){case"string":for(r=(a=e).length,p=t.length;p<=r&&a.substr(r-p)==t;)r=(a=a.substr(0,r-p)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<t.length;)s=wppaTrimRight(s,t[o]),o++;n=i==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var r=new Date;r.setDate(r.getDate()+a);var p=escape(t)+(null==a?"":"; expires="+r.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){var t,a,r,p=document.cookie.split(";");for(t=0;t<p.length;t++)if(a=p[t].substr(0,p[t].indexOf("=")),r=p[t].substr(p[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,r=Math.floor(a/36e5);a-=60*r*60*1e3;var p=Math.floor(a/6e4);a-=60*p*1e3;var o=Math.floor(a/1e3);a-=1e3*o,console.log("At: "+r+":"+p+":"+o+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,r,p,o,n,i){var s,l,c;switch(p||(p="0"),o||(o="10"),n||(n="20"),i||(i="50"),!1,wppaSvgCornerStyle){case"gif":case"none":radius=p;break;case"light":radius=o;break;case"medium":radius=n;break;case"heavy":radius=i}t||(t="32px"),a?(s=wppaOvlSvgFillcolor,l=wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,l=wppaSvgBgcolor),c=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+c+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+l+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e,t=(new Date).getTime();t<wppaLastLazy+200||(jQuery(".wppa-lazy").each(function(){e=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))}),wppaLastLazy=t)}function wppaIsElementInViewport(e){var t=e.getBoundingClientRect();return!t||0<t.bottom&&0<t.right&&t.left<jQuery(window).width()&&t.top<jQuery(window).height()}function wppaSizeThumbArea(){0<wppaThumbAreaMaxFrac&&wppaThumbAreaMaxFrac<1&&jQuery(".wppa-thumb-area").css("max-height",jQuery(window).height()*wppaThumbAreaMaxFrac)}function wppaIconSize(e,t,a){var r=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?t:(wppaIsMini[e]?r/2:r)+"px;"}function wppaEntityDecode(e){return e.split("&").join("&").split(">").join(">").split("<").join("<").split(""").join('"').split("'").join("'")}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
|
wppa-admin-functions.php
CHANGED
@@ -194,25 +194,25 @@ global $wpdb;
|
|
194 |
// display usefull message
|
195 |
function wppa_update_message( $msg, $fixed = false, $id = '' ) {
|
196 |
|
197 |
-
echo '<div class="notice notice-info is-dismissible"><p>' . $msg . '</p></div>';
|
198 |
}
|
199 |
|
200 |
// display error message
|
201 |
function wppa_error_message( $msg ) {
|
202 |
|
203 |
-
echo '<div class="notice notice-error is-dismissible"><p>' . $msg . '</p></div>';
|
204 |
}
|
205 |
|
206 |
// display warning message
|
207 |
function wppa_warning_message( $msg, $fixed = false, $id = '' ) {
|
208 |
|
209 |
-
echo '<div class="notice notice-warning is-dismissible"><p>' . $msg . '</p></div>';
|
210 |
}
|
211 |
|
212 |
// display ok message
|
213 |
function wppa_ok_message( $msg ) {
|
214 |
|
215 |
-
echo '<div class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
|
216 |
}
|
217 |
|
218 |
function wppa_check_numeric( $value, $minval, $target, $maxval = '' ) {
|
194 |
// display usefull message
|
195 |
function wppa_update_message( $msg, $fixed = false, $id = '' ) {
|
196 |
|
197 |
+
echo '<div class="notice notice-info is-dismissible"><p>' . strip_tags( $msg, '<br><input><div><em><strong><b>' ) . '</p></div>';
|
198 |
}
|
199 |
|
200 |
// display error message
|
201 |
function wppa_error_message( $msg ) {
|
202 |
|
203 |
+
echo '<div class="notice notice-error is-dismissible"><p>' . strip_tags( $msg, '<br><input><div><em><strong><b>' ) . '</p></div>';
|
204 |
}
|
205 |
|
206 |
// display warning message
|
207 |
function wppa_warning_message( $msg, $fixed = false, $id = '' ) {
|
208 |
|
209 |
+
echo '<div class="notice notice-warning is-dismissible"><p>' . strip_tags( $msg, '<br><input><div><em><strong><b>' ) . '</p></div>';
|
210 |
}
|
211 |
|
212 |
// display ok message
|
213 |
function wppa_ok_message( $msg ) {
|
214 |
|
215 |
+
echo '<div class="notice notice-success is-dismissible"><p>' . strip_tags( $msg, '<br><input><div><em><strong><b>' ) . '</p></div>';
|
216 |
}
|
217 |
|
218 |
function wppa_check_numeric( $value, $minval, $target, $maxval = '' ) {
|
wppa-admin.php
CHANGED
@@ -326,8 +326,8 @@ global $wpdb;
|
|
326 |
echo
|
327 |
'<tr>' .
|
328 |
'<td>' .
|
329 |
-
'<a href="' . $href . '" target="_blank" >' .
|
330 |
-
'<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
|
331 |
'</a>' .
|
332 |
'</td>' .
|
333 |
'<td>';
|
@@ -399,15 +399,15 @@ function wppa_show_potd_log() {
|
|
399 |
echo
|
400 |
'<tr style="border-bottom:1px solid #444;" >' .
|
401 |
'<td>' .
|
402 |
-
'<a href="' . $href . '" target="_blank" >' .
|
403 |
-
'<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
|
404 |
'</a>' .
|
405 |
'</td>' .
|
406 |
'<td>' .
|
407 |
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $time ) . '<br />' .
|
408 |
__( 'Name', 'wp-photo-album-plus' ) . ': ' . wppa_get_photo_name( $photo['id'] ) . '<br />' .
|
409 |
__( 'Description', 'wp-photo-album-plus' ) . ':<br />' .
|
410 |
-
wppa_get_photo_desc( $photo['id'] ) .
|
411 |
'</td>' .
|
412 |
'</tr>';
|
413 |
}
|
326 |
echo
|
327 |
'<tr>' .
|
328 |
'<td>' .
|
329 |
+
'<a href="' . esc_url( $href ) . '" target="_blank" >' .
|
330 |
+
'<img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" /> ' .
|
331 |
'</a>' .
|
332 |
'</td>' .
|
333 |
'<td>';
|
399 |
echo
|
400 |
'<tr style="border-bottom:1px solid #444;" >' .
|
401 |
'<td>' .
|
402 |
+
'<a href="' . esc_url( $href ) . '" target="_blank" >' .
|
403 |
+
'<img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" /> ' .
|
404 |
'</a>' .
|
405 |
'</td>' .
|
406 |
'<td>' .
|
407 |
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $time ) . '<br />' .
|
408 |
__( 'Name', 'wp-photo-album-plus' ) . ': ' . wppa_get_photo_name( $photo['id'] ) . '<br />' .
|
409 |
__( 'Description', 'wp-photo-album-plus' ) . ':<br />' .
|
410 |
+
htmlentities( strip_tags( wppa_get_photo_desc( $photo['id'] ) ) ) .
|
411 |
'</td>' .
|
412 |
'</tr>';
|
413 |
}
|
wppa-ajax.php
CHANGED
@@ -72,7 +72,11 @@ global $wppa_log_file;
|
|
72 |
// Existing list type?
|
73 |
if ( ! in_array( $list_type, array( 'newalbum',
|
74 |
'photoapproved',
|
|
|
75 |
'commentapproved',
|
|
|
|
|
|
|
76 |
) ) ) {
|
77 |
_e( 'Requested mailinglist does not exist', 'wp-photo-album-plus' );
|
78 |
wppa_exit();
|
@@ -85,10 +89,6 @@ global $wppa_log_file;
|
|
85 |
}
|
86 |
|
87 |
// Prepare additional data
|
88 |
-
$list_type_text = array( 'newalbum' => __( 'new albums', 'wp-photo-album-plus' ),
|
89 |
-
'photoapproved' => __( 'photo approved', 'wp-photo-album-plus'),
|
90 |
-
'commentapproved' => __( 'comment approved', 'wp-photo-album-plus'),
|
91 |
-
);
|
92 |
$mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
|
93 |
$userarray = wppa_index_string_to_array( $mailinglist );
|
94 |
|
@@ -97,14 +97,17 @@ global $wppa_log_file;
|
|
97 |
case 'newalbum':
|
98 |
case 'photoapproved':
|
99 |
case 'commentapproved':
|
|
|
|
|
|
|
100 |
|
101 |
if ( $onoff == 'on' ) {
|
102 |
$userarray[] = wppa_get_user( 'id' );
|
103 |
-
$msg =
|
104 |
}
|
105 |
else {
|
106 |
$userarray = array_diff( $userarray, array( wppa_get_user( 'id' ) ) );
|
107 |
-
$msg =
|
108 |
}
|
109 |
$mailinglist = wppa_index_array_to_string( $userarray );
|
110 |
update_option( 'wppa_mailinglist_' . $list_type, $mailinglist );
|
@@ -808,7 +811,7 @@ global $wppa_log_file;
|
|
808 |
}
|
809 |
|
810 |
$desturl = WPPA_UPLOAD_URL.'/temp/'.$name.'.'.$ext;
|
811 |
-
echo '||0||'
|
812 |
wppa_exit();
|
813 |
}
|
814 |
else {
|
@@ -820,31 +823,31 @@ global $wppa_log_file;
|
|
820 |
|
821 |
case 'tinymcedialog':
|
822 |
$result = wppa_make_tinymce_dialog();
|
823 |
-
echo $result;
|
824 |
wppa_exit();
|
825 |
break;
|
826 |
|
827 |
case 'tinymcephotodialog':
|
828 |
$result = wppa_make_tinymce_photo_dialog();
|
829 |
-
echo $result;
|
830 |
wppa_exit();
|
831 |
break;
|
832 |
|
833 |
case 'tinymcephotodialogfront':
|
834 |
$result = wppa_make_tinymce_photo_dialog( 'front' );
|
835 |
-
echo $result;
|
836 |
wppa_exit();
|
837 |
break;
|
838 |
|
839 |
case 'gutenbergphotodialog':
|
840 |
$result = wppa_make_gutenberg_photo_dialog();
|
841 |
-
echo $result;
|
842 |
wppa_exit();
|
843 |
break;
|
844 |
|
845 |
case 'gutenbergwppadialog':
|
846 |
$result = wppa_make_gutenberg_wppa_dialog();
|
847 |
-
echo $result;
|
848 |
wppa_exit();
|
849 |
break;
|
850 |
|
@@ -2123,7 +2126,13 @@ global $wppa_log_file;
|
|
2123 |
'<b>' . wppa_get_album_name( wppa_get_photo_item( $photo, 'album' ) ) . '</b>'
|
2124 |
);
|
2125 |
if ( wppa_is_user_in_mailinglist( $owner, 'photoapproved' ) ) {
|
2126 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
|
|
2127 |
}
|
2128 |
}
|
2129 |
}
|
@@ -3530,7 +3539,7 @@ global $wppa_log_file;
|
|
3530 |
echo 'Security check failure||'.$slug.'||Error||0';
|
3531 |
wppa_exit();
|
3532 |
}
|
3533 |
-
echo wppa_do_maintenance_popup( $slug );
|
3534 |
wppa_exit();
|
3535 |
break;
|
3536 |
|
@@ -3541,9 +3550,9 @@ global $wppa_log_file;
|
|
3541 |
wppa_user_upload();
|
3542 |
echo wppa( 'out' );
|
3543 |
global $wppa_upload_succes_id;
|
3544 |
-
if ( isset( $_GET['fromtinymce'] ) && $wppa_upload_succes_id ) {
|
3545 |
echo '||' . $wppa_upload_succes_id . '||';
|
3546 |
-
echo wppa_get_myphotos_selection_body_for_tinymce( $wppa_upload_succes_id );
|
3547 |
}
|
3548 |
wppa_exit();
|
3549 |
break;
|
72 |
// Existing list type?
|
73 |
if ( ! in_array( $list_type, array( 'newalbum',
|
74 |
'photoapproved',
|
75 |
+
'commentnotify',
|
76 |
'commentapproved',
|
77 |
+
'commentprevious',
|
78 |
+
'moderatephoto',
|
79 |
+
'moderatecomment',
|
80 |
) ) ) {
|
81 |
_e( 'Requested mailinglist does not exist', 'wp-photo-album-plus' );
|
82 |
wppa_exit();
|
89 |
}
|
90 |
|
91 |
// Prepare additional data
|
|
|
|
|
|
|
|
|
92 |
$mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
|
93 |
$userarray = wppa_index_string_to_array( $mailinglist );
|
94 |
|
97 |
case 'newalbum':
|
98 |
case 'photoapproved':
|
99 |
case 'commentapproved':
|
100 |
+
case 'commentprevious':
|
101 |
+
case 'moderatephoto':
|
102 |
+
case 'moderatecomment':
|
103 |
|
104 |
if ( $onoff == 'on' ) {
|
105 |
$userarray[] = wppa_get_user( 'id' );
|
106 |
+
$msg = __( 'You have been added to this mailinglist', 'wp-photo-album-plus' );
|
107 |
}
|
108 |
else {
|
109 |
$userarray = array_diff( $userarray, array( wppa_get_user( 'id' ) ) );
|
110 |
+
$msg = __( 'You have been removed from this mailinglist', 'wp-photo-album-plus' );
|
111 |
}
|
112 |
$mailinglist = wppa_index_array_to_string( $userarray );
|
113 |
update_option( 'wppa_mailinglist_' . $list_type, $mailinglist );
|
811 |
}
|
812 |
|
813 |
$desturl = WPPA_UPLOAD_URL.'/temp/'.$name.'.'.$ext;
|
814 |
+
echo '||0||' . esc_url( $desturl ); // No error: return url
|
815 |
wppa_exit();
|
816 |
}
|
817 |
else {
|
823 |
|
824 |
case 'tinymcedialog':
|
825 |
$result = wppa_make_tinymce_dialog();
|
826 |
+
echo htmlentities( $result );
|
827 |
wppa_exit();
|
828 |
break;
|
829 |
|
830 |
case 'tinymcephotodialog':
|
831 |
$result = wppa_make_tinymce_photo_dialog();
|
832 |
+
echo htmlentities( $result );
|
833 |
wppa_exit();
|
834 |
break;
|
835 |
|
836 |
case 'tinymcephotodialogfront':
|
837 |
$result = wppa_make_tinymce_photo_dialog( 'front' );
|
838 |
+
echo htmlentities( $result );
|
839 |
wppa_exit();
|
840 |
break;
|
841 |
|
842 |
case 'gutenbergphotodialog':
|
843 |
$result = wppa_make_gutenberg_photo_dialog();
|
844 |
+
echo htmlentities( $result );
|
845 |
wppa_exit();
|
846 |
break;
|
847 |
|
848 |
case 'gutenbergwppadialog':
|
849 |
$result = wppa_make_gutenberg_wppa_dialog();
|
850 |
+
echo htmlentities( $result );
|
851 |
wppa_exit();
|
852 |
break;
|
853 |
|
2126 |
'<b>' . wppa_get_album_name( wppa_get_photo_item( $photo, 'album' ) ) . '</b>'
|
2127 |
);
|
2128 |
if ( wppa_is_user_in_mailinglist( $owner, 'photoapproved' ) ) {
|
2129 |
+
wppa_send_mail( array( 'to' =>$to,
|
2130 |
+
'subj' =>$subj,
|
2131 |
+
'cont' =>$cont,
|
2132 |
+
'photo' =>$photo,
|
2133 |
+
'email' =>'void',
|
2134 |
+
'listtype' =>'photoapproved',
|
2135 |
+
));
|
2136 |
}
|
2137 |
}
|
2138 |
}
|
3539 |
echo 'Security check failure||'.$slug.'||Error||0';
|
3540 |
wppa_exit();
|
3541 |
}
|
3542 |
+
echo htmlentities( wppa_do_maintenance_popup( $slug ) );
|
3543 |
wppa_exit();
|
3544 |
break;
|
3545 |
|
3550 |
wppa_user_upload();
|
3551 |
echo wppa( 'out' );
|
3552 |
global $wppa_upload_succes_id;
|
3553 |
+
if ( ( isset( $_GET['fromtinymce'] ) || isset( $_GET['fromgutenberg']) ) && $wppa_upload_succes_id ) {
|
3554 |
echo '||' . $wppa_upload_succes_id . '||';
|
3555 |
+
echo htmlentities( wppa_get_myphotos_selection_body_for_tinymce( $wppa_upload_succes_id ) );
|
3556 |
}
|
3557 |
wppa_exit();
|
3558 |
break;
|
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 |
*
|
8 |
*/
|
9 |
|
@@ -825,7 +825,7 @@ global $wppa_revno;
|
|
825 |
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
826 |
foreach ( $catlist as $cat ) {
|
827 |
echo '
|
828 |
-
<option value="' . $cat['cat'] . '" >' . $cat['cat'] . '</option>';
|
829 |
}
|
830 |
}
|
831 |
else {
|
@@ -1279,11 +1279,11 @@ global $wppa_revno;
|
|
1279 |
<img src="<?php echo WPPA_URL.'/img/albumdel32.png' ?>" />
|
1280 |
<h1 style="display:inline;" ><?php _e('Delete Album', 'wp-photo-album-plus'); ?></h1>
|
1281 |
|
1282 |
-
<p><?php _e('Album:', 'wp-photo-album-plus'); ?> <b><?php echo wppa_get_album_name($_REQUEST['edit_id']); ?>.</b></p>
|
1283 |
<p><?php _e('Are you sure you want to delete this album?', 'wp-photo-album-plus'); ?><br />
|
1284 |
<?php _e('Press Delete to continue, and Cancel to go back.', 'wp-photo-album-plus'); ?>
|
1285 |
</p>
|
1286 |
-
<form name="wppa-del-form" action="<?php echo(wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu')) ?>" method="post">
|
1287 |
<?php wp_nonce_field('$wppa_nonce', WPPA_NONCE) ?>
|
1288 |
<p>
|
1289 |
<?php _e('What would you like to do with photos currently in the album?', 'wp-photo-album-plus'); ?><br />
|
@@ -1936,21 +1936,21 @@ global $wpdb;
|
|
1936 |
$done = true;
|
1937 |
|
1938 |
foreach ( $albums as $a ) {
|
1939 |
-
|
1940 |
$parent = $a['a_parent'];
|
1941 |
-
|
1942 |
if ( $parent > '0' ) {
|
1943 |
-
|
1944 |
$found = false;
|
1945 |
-
|
1946 |
foreach ( $albums as $p ) {
|
1947 |
-
|
1948 |
if ( $p['id'] == $parent ) {
|
1949 |
$found = true;
|
1950 |
}
|
1951 |
}
|
1952 |
if ( ! $found ) {
|
1953 |
-
|
1954 |
$done = false;
|
1955 |
|
1956 |
// Add missing parent
|
@@ -3006,59 +3006,60 @@ global $wpdb;
|
|
3006 |
echo
|
3007 |
'<img' .
|
3008 |
' class="wppa-cover-image"' .
|
3009 |
-
' src="' . wppa_get_thumb_url( wppa_get_coverphoto_id( $album['id'] ) ) . '"' .
|
3010 |
' style="max-height:50px; margin: 5px;"' .
|
3011 |
' />';
|
3012 |
}
|
|
|
3013 |
echo
|
3014 |
'</div>' .
|
3015 |
'<div style="height:100%;width:40%;float:left;font-size:12px;overflow:hidden;" >' .
|
3016 |
-
'<b>' . wppa_get_album_name( $
|
3017 |
'<br />' .
|
3018 |
-
wppa_get_album_desc( $
|
3019 |
'</div>' .
|
3020 |
'<div style="float:right;width:10%;" >' .
|
3021 |
'<table>' .
|
3022 |
'<tr><td>' .
|
3023 |
'<img' .
|
3024 |
-
' src="' . wppa_get_imgdir( 'up.png' ) . '"' .
|
3025 |
' title="' . esc_attr( __( 'To top', 'wp-photo-album-plus' ) ) . '"' .
|
3026 |
' style="cursor:pointer;"' .
|
3027 |
' onclick="' .
|
3028 |
-
'jQuery( \'#albumitem-' . $
|
3029 |
'wppaDoRenumber();' .
|
3030 |
'"' .
|
3031 |
' />' .
|
3032 |
'</td></tr>' .
|
3033 |
'<tr><td>' .
|
3034 |
'<img' .
|
3035 |
-
' src="' . wppa_get_imgdir( 'up.png' ) . '"' .
|
3036 |
' title="' . esc_attr( __( 'One up', 'wp-photo-album-plus' ) ) . '"' .
|
3037 |
' style="cursor:pointer;width:24px;"' .
|
3038 |
' onclick="' .
|
3039 |
-
'jQuery( \'#albumitem-' . $
|
3040 |
'wppaDoRenumber();' .
|
3041 |
'"' .
|
3042 |
' />' .
|
3043 |
'</td></tr>' .
|
3044 |
'<tr><td>' .
|
3045 |
'<img' .
|
3046 |
-
' src="' . wppa_get_imgdir( 'down.png' ) . '"' .
|
3047 |
' title="' . esc_attr( __( 'One down', 'wp-photo-album-plus' ) ) . '"' .
|
3048 |
' style="cursor:pointer;width:24px;"' .
|
3049 |
' onclick="' .
|
3050 |
-
'jQuery( \'#albumitem-' . $
|
3051 |
'wppaDoRenumber();' .
|
3052 |
'"' .
|
3053 |
' />' .
|
3054 |
'</td></tr>' .
|
3055 |
'<tr><td>' .
|
3056 |
'<img' .
|
3057 |
-
' src="' . wppa_get_imgdir( 'down.png' ) . '"' .
|
3058 |
' title="' . esc_attr( __( 'To bottom', 'wp-photo-album-plus' ) ) . '"' .
|
3059 |
' style="cursor:pointer;"' .
|
3060 |
' onclick="' .
|
3061 |
-
'jQuery( \'#albumitem-' . $
|
3062 |
'wppaDoRenumber();' .
|
3063 |
'"' .
|
3064 |
' />' .
|
@@ -3066,15 +3067,15 @@ global $wpdb;
|
|
3066 |
'</table>' .
|
3067 |
'</div>' .
|
3068 |
'<div style="float:right; width:25%;" >' .
|
3069 |
-
'<span style=""> ' . __( 'Id:' , 'wp-photo-album-plus' ) . ' ' . $
|
3070 |
'<span style=""> - ' . __( 'Ord:' , 'wp-photo-album-plus' ) . '</span>' .
|
3071 |
-
'<span id="wppa-album-seqno-' . $
|
3072 |
'<br />' .
|
3073 |
-
'<a href="' . wppa_ea_url( $
|
3074 |
'</div>' .
|
3075 |
-
'<input type="hidden" id="album-nonce-' . $
|
3076 |
-
'<input type="hidden" class="wppa-sort-item-albums" value="' . $
|
3077 |
-
'<input type="hidden" class="wppa-sort-seqn-albums" id="wppa-sort-seqn-albums-' . $
|
3078 |
'</div>';
|
3079 |
} ?>
|
3080 |
</div>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 7.0.00
|
7 |
*
|
8 |
*/
|
9 |
|
825 |
<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
826 |
foreach ( $catlist as $cat ) {
|
827 |
echo '
|
828 |
+
<option value="' . esc_attr( $cat['cat'] ) . '" >' . strip_tags( $cat['cat'] ) . '</option>';
|
829 |
}
|
830 |
}
|
831 |
else {
|
1279 |
<img src="<?php echo WPPA_URL.'/img/albumdel32.png' ?>" />
|
1280 |
<h1 style="display:inline;" ><?php _e('Delete Album', 'wp-photo-album-plus'); ?></h1>
|
1281 |
|
1282 |
+
<p><?php _e('Album:', 'wp-photo-album-plus'); ?> <b><?php echo htmlentities( wppa_get_album_name($_REQUEST['edit_id']) ); ?>.</b></p>
|
1283 |
<p><?php _e('Are you sure you want to delete this album?', 'wp-photo-album-plus'); ?><br />
|
1284 |
<?php _e('Press Delete to continue, and Cancel to go back.', 'wp-photo-album-plus'); ?>
|
1285 |
</p>
|
1286 |
+
<form name="wppa-del-form" action="<?php echo( esc_url( wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu'))) ?>" method="post">
|
1287 |
<?php wp_nonce_field('$wppa_nonce', WPPA_NONCE) ?>
|
1288 |
<p>
|
1289 |
<?php _e('What would you like to do with photos currently in the album?', 'wp-photo-album-plus'); ?><br />
|
1936 |
$done = true;
|
1937 |
|
1938 |
foreach ( $albums as $a ) {
|
1939 |
+
|
1940 |
$parent = $a['a_parent'];
|
1941 |
+
|
1942 |
if ( $parent > '0' ) {
|
1943 |
+
|
1944 |
$found = false;
|
1945 |
+
|
1946 |
foreach ( $albums as $p ) {
|
1947 |
+
|
1948 |
if ( $p['id'] == $parent ) {
|
1949 |
$found = true;
|
1950 |
}
|
1951 |
}
|
1952 |
if ( ! $found ) {
|
1953 |
+
|
1954 |
$done = false;
|
1955 |
|
1956 |
// Add missing parent
|
3006 |
echo
|
3007 |
'<img' .
|
3008 |
' class="wppa-cover-image"' .
|
3009 |
+
' src="' . esc_url( wppa_get_thumb_url( wppa_get_coverphoto_id( $album['id'] ) ) ) . '"' .
|
3010 |
' style="max-height:50px; margin: 5px;"' .
|
3011 |
' />';
|
3012 |
}
|
3013 |
+
$albid = strval( intval( $album['id'] ) );
|
3014 |
echo
|
3015 |
'</div>' .
|
3016 |
'<div style="height:100%;width:40%;float:left;font-size:12px;overflow:hidden;" >' .
|
3017 |
+
'<b>' . htmlentities( wppa_get_album_name( $albid ) ) . '</b>' .
|
3018 |
'<br />' .
|
3019 |
+
wppa_get_album_desc( $albid ) .
|
3020 |
'</div>' .
|
3021 |
'<div style="float:right;width:10%;" >' .
|
3022 |
'<table>' .
|
3023 |
'<tr><td>' .
|
3024 |
'<img' .
|
3025 |
+
' src="' . esc_url( wppa_get_imgdir( 'up.png' ) ) . '"' .
|
3026 |
' title="' . esc_attr( __( 'To top', 'wp-photo-album-plus' ) ) . '"' .
|
3027 |
' style="cursor:pointer;"' .
|
3028 |
' onclick="' .
|
3029 |
+
'jQuery( \'#albumitem-' . $albid . '\' ).parent().prepend(jQuery( \'#albumitem-' . $albid . '\' ));' .
|
3030 |
'wppaDoRenumber();' .
|
3031 |
'"' .
|
3032 |
' />' .
|
3033 |
'</td></tr>' .
|
3034 |
'<tr><td>' .
|
3035 |
'<img' .
|
3036 |
+
' src="' . esc_url( wppa_get_imgdir( 'up.png' ) ) . '"' .
|
3037 |
' title="' . esc_attr( __( 'One up', 'wp-photo-album-plus' ) ) . '"' .
|
3038 |
' style="cursor:pointer;width:24px;"' .
|
3039 |
' onclick="' .
|
3040 |
+
'jQuery( \'#albumitem-' . $albid . '\' ).prev().before(jQuery( \'#albumitem-' . $albid . '\' ));' .
|
3041 |
'wppaDoRenumber();' .
|
3042 |
'"' .
|
3043 |
' />' .
|
3044 |
'</td></tr>' .
|
3045 |
'<tr><td>' .
|
3046 |
'<img' .
|
3047 |
+
' src="' . esc_url( wppa_get_imgdir( 'down.png' ) ) . '"' .
|
3048 |
' title="' . esc_attr( __( 'One down', 'wp-photo-album-plus' ) ) . '"' .
|
3049 |
' style="cursor:pointer;width:24px;"' .
|
3050 |
' onclick="' .
|
3051 |
+
'jQuery( \'#albumitem-' . $albid . '\' ).next().after(jQuery( \'#albumitem-' . $albid . '\' ));' .
|
3052 |
'wppaDoRenumber();' .
|
3053 |
'"' .
|
3054 |
' />' .
|
3055 |
'</td></tr>' .
|
3056 |
'<tr><td>' .
|
3057 |
'<img' .
|
3058 |
+
' src="' . esc_url( wppa_get_imgdir( 'down.png' ) ) . '"' .
|
3059 |
' title="' . esc_attr( __( 'To bottom', 'wp-photo-album-plus' ) ) . '"' .
|
3060 |
' style="cursor:pointer;"' .
|
3061 |
' onclick="' .
|
3062 |
+
'jQuery( \'#albumitem-' . $albid . '\' ).parent().append(jQuery( \'#albumitem-' . $albid . '\' ));' .
|
3063 |
'wppaDoRenumber();' .
|
3064 |
'"' .
|
3065 |
' />' .
|
3067 |
'</table>' .
|
3068 |
'</div>' .
|
3069 |
'<div style="float:right; width:25%;" >' .
|
3070 |
+
'<span style=""> ' . __( 'Id:' , 'wp-photo-album-plus' ) . ' ' . $albid . '</span>' .
|
3071 |
'<span style=""> - ' . __( 'Ord:' , 'wp-photo-album-plus' ) . '</span>' .
|
3072 |
+
'<span id="wppa-album-seqno-' . $albid . '" > ' . $album['a_order'] . '</span>' .
|
3073 |
'<br />' .
|
3074 |
+
'<a href="' . esc_url( wppa_ea_url( $albid ) ) . '" style="position:absolute;bottom:0;" >' . __( 'Edit', 'wp-photo-album-plus' ) . '</a>' .
|
3075 |
'</div>' .
|
3076 |
+
'<input type="hidden" id="album-nonce-' . $albid . '" value="' . wp_create_nonce( 'wppa_nonce_' . $albid ) . '" />' .
|
3077 |
+
'<input type="hidden" class="wppa-sort-item-albums" value="' . $albid . '" />' .
|
3078 |
+
'<input type="hidden" class="wppa-sort-seqn-albums" id="wppa-sort-seqn-albums-' . $albid . '" value="' . $album['a_order'] . '" />' .
|
3079 |
'</div>';
|
3080 |
} ?>
|
3081 |
</div>
|
wppa-comment-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
-
* Version
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
+
* Version 7.0.00
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
wppa-common-functions.php
CHANGED
@@ -1128,6 +1128,9 @@ global $wppa;
|
|
1128 |
if ( $escape ) {
|
1129 |
$msg = esc_js( $msg );
|
1130 |
}
|
|
|
|
|
|
|
1131 |
|
1132 |
if ( ! $reload && $msg ) {
|
1133 |
wppa_add_js_page_data( '<script type="text/javascript" >alert( \'' . $msg . '\' );jQuery( "#wppaer" ).html( "" );</script>' );
|
1128 |
if ( $escape ) {
|
1129 |
$msg = esc_js( $msg );
|
1130 |
}
|
1131 |
+
else {
|
1132 |
+
$msg = htmlentities( strip_tags( $msg ) );
|
1133 |
+
}
|
1134 |
|
1135 |
if ( ! $reload && $msg ) {
|
1136 |
wppa_add_js_page_data( '<script type="text/javascript" >alert( \'' . $msg . '\' );jQuery( "#wppaer" ).html( "" );</script>' );
|
wppa-featen-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
-
* Version
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
+
* Version 7.0.00
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
wppa-functions.php
CHANGED
@@ -2532,6 +2532,10 @@ global $wppa_done;
|
|
2532 |
}
|
2533 |
|
2534 |
// SEND EMAILS
|
|
|
|
|
|
|
|
|
2535 |
// Initialize
|
2536 |
$subj = __( 'Comment on photo:' , 'wp-photo-album-plus').' '.wppa_get_photo_name( $id );
|
2537 |
$usr = $user;
|
@@ -2573,7 +2577,7 @@ global $wppa_done;
|
|
2573 |
|
2574 |
// Send, but not to the commenter himself
|
2575 |
if ( $to != $email ) {
|
2576 |
-
|
2577 |
}
|
2578 |
|
2579 |
// Remember if we sent him or skipped him because its his own comment
|
@@ -2593,7 +2597,7 @@ global $wppa_done;
|
|
2593 |
$cont['5'] = __( 'You receive this email as administrator of the site' , 'wp-photo-album-plus');
|
2594 |
|
2595 |
// Send!
|
2596 |
-
|
2597 |
}
|
2598 |
|
2599 |
// Remember if we sent him or skipped him because its his own comment
|
@@ -2616,7 +2620,7 @@ global $wppa_done;
|
|
2616 |
|
2617 |
// Send!
|
2618 |
if ( $to != $email ) {
|
2619 |
-
|
2620 |
}
|
2621 |
$sentto[] = $moduser->user_login;
|
2622 |
}
|
@@ -2636,7 +2640,7 @@ global $wppa_done;
|
|
2636 |
|
2637 |
// Send!
|
2638 |
if ( $to != $email ) {
|
2639 |
-
|
2640 |
}
|
2641 |
$sentto[] = $moduser->user_login;
|
2642 |
}
|
@@ -2656,7 +2660,7 @@ global $wppa_done;
|
|
2656 |
|
2657 |
// Send!
|
2658 |
if ( $to != $email ) {
|
2659 |
-
|
2660 |
}
|
2661 |
$sentto[] = $to;
|
2662 |
}
|
@@ -3679,10 +3683,10 @@ global $thumbs;
|
|
3679 |
|
3680 |
foreach ( $thumbs as $thumb ) {
|
3681 |
if ( wppa_switch( 'next_on_callback' ) ) {
|
3682 |
-
wppa_add_js_page_data( "\n" . 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, $thumb['id'], $thumb['next_id'] ) . ' );' );
|
3683 |
}
|
3684 |
else {
|
3685 |
-
wppa_add_js_page_data( "\n" . 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, $thumb['id'] ) . ' );' );
|
3686 |
}
|
3687 |
if ( $startid == $thumb['id'] ) $startindex = $index; // Found the requested id, put the corresponding index in $startindex
|
3688 |
$index++;
|
@@ -4362,6 +4366,8 @@ global $wppa_upload_succes_id;
|
|
4362 |
wppa_invalidate_treecounts( $parent );
|
4363 |
wppa_verify_treecounts_a( $parent );
|
4364 |
wppa_create_pl_htaccess();
|
|
|
|
|
4365 |
if ( wppa_opt( 'fe_create_ntfy' ) ) {
|
4366 |
$users = explode( ',', wppa_opt( 'fe_create_ntfy' ) );
|
4367 |
if ( ! empty( $users ) ) foreach( $users as $usr ) {
|
@@ -4382,10 +4388,11 @@ global $wppa_upload_succes_id;
|
|
4382 |
$cont[] = sprintf( __('The new album is a subalbum of album %s', 'wp-photo-album-plus'), '<b>' . wppa_get_album_name( $parent ) . '</b>' );
|
4383 |
}
|
4384 |
$cont[] = __('You are receiving this email because you are assigned to monitor new album creations.', 'wp-photo-album-plus');
|
4385 |
-
|
4386 |
}
|
4387 |
}
|
4388 |
}
|
|
|
4389 |
}
|
4390 |
else {
|
4391 |
wppa_alert( __( 'Could not create album' , 'wp-photo-album-plus') );
|
@@ -4891,7 +4898,12 @@ global $wppa_alert;
|
|
4891 |
$cont['1'] = __( 'Details:' , 'wp-photo-album-plus');
|
4892 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo' , 'wp-photo-album-plus').'</a>';
|
4893 |
}
|
4894 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
4895 |
}
|
4896 |
|
4897 |
// Do pdf postprocessing
|
2532 |
}
|
2533 |
|
2534 |
// SEND EMAILS
|
2535 |
+
wppa_do_mailinglist( 'commentnotify', wppa_get_post( 'returnurl' ) );
|
2536 |
+
|
2537 |
+
/*
|
2538 |
+
|
2539 |
// Initialize
|
2540 |
$subj = __( 'Comment on photo:' , 'wp-photo-album-plus').' '.wppa_get_photo_name( $id );
|
2541 |
$usr = $user;
|
2577 |
|
2578 |
// Send, but not to the commenter himself
|
2579 |
if ( $to != $email ) {
|
2580 |
+
w ppa_send_mail( $to, $subj, $cont, $photo, ( wppa_switch( 'mail_upl_email' ) ? $email : 'void' ), 'moderatecomment' );
|
2581 |
}
|
2582 |
|
2583 |
// Remember if we sent him or skipped him because its his own comment
|
2597 |
$cont['5'] = __( 'You receive this email as administrator of the site' , 'wp-photo-album-plus');
|
2598 |
|
2599 |
// Send!
|
2600 |
+
w ppa_send_mail( $to, $subj, $cont, $photo, $email, $returnurl );
|
2601 |
}
|
2602 |
|
2603 |
// Remember if we sent him or skipped him because its his own comment
|
2620 |
|
2621 |
// Send!
|
2622 |
if ( $to != $email ) {
|
2623 |
+
w ppa_send_mail( $to, $subj, $cont, $photo, ( wppa_switch( 'mail_upl_email' ) ? $email : 'void' ), $returnurl );
|
2624 |
}
|
2625 |
$sentto[] = $moduser->user_login;
|
2626 |
}
|
2640 |
|
2641 |
// Send!
|
2642 |
if ( $to != $email ) {
|
2643 |
+
w ppa_send_mail( $to, $subj, $cont, $photo, ( wppa_switch( 'mail_upl_email' ) ? $email : 'void' ), $returnurl );
|
2644 |
}
|
2645 |
$sentto[] = $moduser->user_login;
|
2646 |
}
|
2660 |
|
2661 |
// Send!
|
2662 |
if ( $to != $email ) {
|
2663 |
+
w ppa_send_mail( $to, $subj, $cont, $photo, ( wppa_switch( 'mail_upl_email' ) ? $email : 'void' ), $returnurl );
|
2664 |
}
|
2665 |
$sentto[] = $to;
|
2666 |
}
|
3683 |
|
3684 |
foreach ( $thumbs as $thumb ) {
|
3685 |
if ( wppa_switch( 'next_on_callback' ) ) {
|
3686 |
+
wppa_add_js_page_data( "\n" . 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, strval( intval( $thumb['id'] ) ), strval( intval( $thumb['next_id'] ) ) ) . ' );' );
|
3687 |
}
|
3688 |
else {
|
3689 |
+
wppa_add_js_page_data( "\n" . 'wppaStoreSlideInfo( ' . wppa_get_slide_info( $index, strval( intval( $thumb['id'] ) ) ) . ' );' );
|
3690 |
}
|
3691 |
if ( $startid == $thumb['id'] ) $startindex = $index; // Found the requested id, put the corresponding index in $startindex
|
3692 |
$index++;
|
4366 |
wppa_invalidate_treecounts( $parent );
|
4367 |
wppa_verify_treecounts_a( $parent );
|
4368 |
wppa_create_pl_htaccess();
|
4369 |
+
|
4370 |
+
/*
|
4371 |
if ( wppa_opt( 'fe_create_ntfy' ) ) {
|
4372 |
$users = explode( ',', wppa_opt( 'fe_create_ntfy' ) );
|
4373 |
if ( ! empty( $users ) ) foreach( $users as $usr ) {
|
4388 |
$cont[] = sprintf( __('The new album is a subalbum of album %s', 'wp-photo-album-plus'), '<b>' . wppa_get_album_name( $parent ) . '</b>' );
|
4389 |
}
|
4390 |
$cont[] = __('You are receiving this email because you are assigned to monitor new album creations.', 'wp-photo-album-plus');
|
4391 |
+
w ppa_send_mail( $user->user_email, __( 'New useralbum created', 'wp-photo-album-plus'), $cont );
|
4392 |
}
|
4393 |
}
|
4394 |
}
|
4395 |
+
*/
|
4396 |
}
|
4397 |
else {
|
4398 |
wppa_alert( __( 'Could not create album' , 'wp-photo-album-plus') );
|
4898 |
$cont['1'] = __( 'Details:' , 'wp-photo-album-plus');
|
4899 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo' , 'wp-photo-album-plus').'</a>';
|
4900 |
}
|
4901 |
+
wppa_send_mail( array( 'to' => $to,
|
4902 |
+
'subj' => $subj,
|
4903 |
+
'cont' => $cont,
|
4904 |
+
'photo' => $id,
|
4905 |
+
'listtype' => 'feupload',
|
4906 |
+
));
|
4907 |
}
|
4908 |
|
4909 |
// Do pdf postprocessing
|
wppa-gutenberg-photo.php
CHANGED
@@ -236,7 +236,7 @@ global $wpdb;
|
|
236 |
jQuery("#message").html( \'<span style="font-size: 10px;" >\'+resparr[0]+\'</span>\' );
|
237 |
}
|
238 |
else {
|
239 |
-
jQuery( "#wppaphoto-myphoto" ).html( resparr[2] );
|
240 |
}
|
241 |
wppaPhotoEvaluate();
|
242 |
|
236 |
jQuery("#message").html( \'<span style="font-size: 10px;" >\'+resparr[0]+\'</span>\' );
|
237 |
}
|
238 |
else {
|
239 |
+
jQuery( "#wppaphoto-myphoto" ).html( wppaEntityDecode( resparr[2] ) );
|
240 |
}
|
241 |
wppaPhotoEvaluate();
|
242 |
|
wppa-import.php
CHANGED
@@ -1641,7 +1641,12 @@ function wppa_backend_upload_mail( $id, $alb, $name ) {
|
|
1641 |
$cont['1'] = __( 'Details:', 'wp-photo-album-plus' );
|
1642 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo', 'wp-photo-album-plus').'</a>';
|
1643 |
}
|
1644 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
1645 |
}
|
1646 |
}
|
1647 |
|
@@ -2057,7 +2062,7 @@ global $wppa_supported_audio_extensions;
|
|
2057 |
if ( wppa_is_file( $newpath ) ) {
|
2058 |
wppa_unlink( $newpath );
|
2059 |
}
|
2060 |
-
|
2061 |
}
|
2062 |
else {
|
2063 |
wppa_copy( $file, $newpath );
|
1641 |
$cont['1'] = __( 'Details:', 'wp-photo-album-plus' );
|
1642 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo', 'wp-photo-album-plus').'</a>';
|
1643 |
}
|
1644 |
+
wppa_send_mail( array( 'to' => $to,
|
1645 |
+
'subj' => $subj,
|
1646 |
+
'cont' => $cont,
|
1647 |
+
'photo' => $id,
|
1648 |
+
'listtype' => 'importbackend',
|
1649 |
+
));
|
1650 |
}
|
1651 |
}
|
1652 |
|
2062 |
if ( wppa_is_file( $newpath ) ) {
|
2063 |
wppa_unlink( $newpath );
|
2064 |
}
|
2065 |
+
wppa_rename( $file, $newpath );
|
2066 |
}
|
2067 |
else {
|
2068 |
wppa_copy( $file, $newpath );
|
wppa-lasten-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
-
* Version
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
@@ -146,7 +146,7 @@ class LasTenWidget extends WP_Widget {
|
|
146 |
|
147 |
$widget_content .= "\n\t".'<div style="font-size:' . wppa_opt( 'fontsize_widget_thumb' ) . 'px; line-height:'.$lineheight.'px;">';
|
148 |
if ( $timesince == 'yes' ) {
|
149 |
-
$widget_content .= "\n\t".'<div>'.wppa_get_time_since( $image[$order_by] ).'</div>';
|
150 |
}
|
151 |
$widget_content .= '</div>';
|
152 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
+
* Version 7.0.00
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
146 |
|
147 |
$widget_content .= "\n\t".'<div style="font-size:' . wppa_opt( 'fontsize_widget_thumb' ) . 'px; line-height:'.$lineheight.'px;">';
|
148 |
if ( $timesince == 'yes' ) {
|
149 |
+
$widget_content .= "\n\t".'<div>' . htmlentities( wppa_get_time_since( $image[$order_by] ) ) . '</div>';
|
150 |
}
|
151 |
$widget_content .= '</div>';
|
152 |
}
|
wppa-mailing.php
CHANGED
@@ -12,14 +12,15 @@
|
|
12 |
add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 1 );
|
13 |
|
14 |
// Call this function to schedule a mailinglist emission
|
15 |
-
function wppa_schedule_mailinglist( $type ) {
|
16 |
|
17 |
-
wp_schedule_single_event( time() +
|
18 |
|
19 |
}
|
20 |
|
21 |
// Send the mails for a mailinglist
|
22 |
-
function wppa_do_mailinglist( $type ) {
|
|
|
23 |
|
24 |
// Get mailinglist user ids
|
25 |
$mailinglist = get_option( 'wppa_mailinglist_' . $type, '' );
|
@@ -43,7 +44,7 @@ function wppa_do_mailinglist( $type ) {
|
|
43 |
return false;
|
44 |
}
|
45 |
|
46 |
-
// Get
|
47 |
$name = wppa_get_album_name( $alb );
|
48 |
$desc = wppa_get_album_desc( $alb );
|
49 |
|
@@ -56,6 +57,7 @@ function wppa_do_mailinglist( $type ) {
|
|
56 |
// Process all subscribed users
|
57 |
foreach( $userarray as $usr ) {
|
58 |
|
|
|
59 |
$user = get_user_by( 'ID', $usr );
|
60 |
|
61 |
// The content of the mail
|
@@ -67,7 +69,9 @@ function wppa_do_mailinglist( $type ) {
|
|
67 |
if ( $desc ) {
|
68 |
$content .=
|
69 |
'<br /><br />' . __( 'Description', 'wp-photo-album-plus' ) . ':<br /><br />' .
|
70 |
-
'<
|
|
|
|
|
71 |
}
|
72 |
|
73 |
if ( $link ) {
|
@@ -77,7 +81,58 @@ function wppa_do_mailinglist( $type ) {
|
|
77 |
}
|
78 |
|
79 |
// Send the mail
|
80 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
break;
|
83 |
|
@@ -113,4 +168,121 @@ function wppa_is_user_in_mailinglist( $usr, $list ) {
|
|
113 |
$mailinglist = get_option( 'wppa_mailinglist_' . $list, '' );
|
114 |
$userarray = wppa_index_string_to_array( $mailinglist );
|
115 |
return ( in_array( $user_id, $userarray ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
12 |
add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 1 );
|
13 |
|
14 |
// Call this function to schedule a mailinglist emission
|
15 |
+
function wppa_schedule_mailinglist( $type, $time = 600 ) {
|
16 |
|
17 |
+
wp_schedule_single_event( time() + $time, 'wppa_do_mailinglist_cron', array( $type ) );
|
18 |
|
19 |
}
|
20 |
|
21 |
// Send the mails for a mailinglist
|
22 |
+
function wppa_do_mailinglist( $type, $returnurl = null ) {
|
23 |
+
global $wpdb;
|
24 |
|
25 |
// Get mailinglist user ids
|
26 |
$mailinglist = get_option( 'wppa_mailinglist_' . $type, '' );
|
44 |
return false;
|
45 |
}
|
46 |
|
47 |
+
// Get the album items we need
|
48 |
$name = wppa_get_album_name( $alb );
|
49 |
$desc = wppa_get_album_desc( $alb );
|
50 |
|
57 |
// Process all subscribed users
|
58 |
foreach( $userarray as $usr ) {
|
59 |
|
60 |
+
// Get the user data
|
61 |
$user = get_user_by( 'ID', $usr );
|
62 |
|
63 |
// The content of the mail
|
69 |
if ( $desc ) {
|
70 |
$content .=
|
71 |
'<br /><br />' . __( 'Description', 'wp-photo-album-plus' ) . ':<br /><br />' .
|
72 |
+
'<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" >' .
|
73 |
+
'<em>' . $desc . '</em><br />' .
|
74 |
+
'</blockquote>';
|
75 |
}
|
76 |
|
77 |
if ( $link ) {
|
81 |
}
|
82 |
|
83 |
// Send the mail
|
84 |
+
wppa_send_mail( array( 'to' => $user->user_email,
|
85 |
+
'subj' => __( 'New album created', 'wp-photo-album-plus' ),
|
86 |
+
'cont' => $content,
|
87 |
+
'email' => 'void',
|
88 |
+
'listtype' => $type,
|
89 |
+
) );
|
90 |
+
}
|
91 |
+
break;
|
92 |
+
|
93 |
+
case 'commentnotify':
|
94 |
+
|
95 |
+
// Get the last added commentnotify
|
96 |
+
$com = $wpdb->get_row( "SELECT * FROM {$wpdb->wppa_comments} ORDER BY id DESC LIMIT 1" );
|
97 |
+
|
98 |
+
// The blog
|
99 |
+
$blog = get_bloginfo( 'name' );
|
100 |
+
|
101 |
+
// The standard content
|
102 |
+
$content =
|
103 |
+
$com['user'] . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $com['photo'] ) . ':' .
|
104 |
+
'<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" >
|
105 |
+
<em> ' . stripslashes( $com['comment'] ) . '</em>
|
106 |
+
</blockquote>';
|
107 |
+
|
108 |
+
// Additional content for moderators
|
109 |
+
$moderator_content =
|
110 |
+
'<a href="' . get_admin_url() . 'admin.php?page=wppa_manage_comments&commentid=' . $com['id'] . '" >' .
|
111 |
+
__( 'Moderate comment admin' , 'wp-photo-album-plus') .
|
112 |
+
'</a>';
|
113 |
+
|
114 |
+
|
115 |
+
// Process all subscribed users
|
116 |
+
foreach( $userarray as $usr ) {
|
117 |
+
|
118 |
+
// Get the user data
|
119 |
+
$user = get_user_by( 'ID', $usr );
|
120 |
+
|
121 |
+
// Create the content
|
122 |
+
$cont = $content;
|
123 |
+
if ( user_can( $usr, 'wppa_moderate' ) ) {
|
124 |
+
$cont .= $moderator_content;
|
125 |
+
}
|
126 |
+
|
127 |
+
// Send the mail
|
128 |
+
wppa_send_mail( array( 'to' => $user->user_email,
|
129 |
+
'subj' => __( 'Comment on photo:' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $id ),
|
130 |
+
'cont' => $content,
|
131 |
+
'photo' => $com['photo'],
|
132 |
+
'replyurl' => $returnurl,
|
133 |
+
'listtype' => $type,
|
134 |
+
));
|
135 |
+
|
136 |
}
|
137 |
break;
|
138 |
|
168 |
$mailinglist = get_option( 'wppa_mailinglist_' . $list, '' );
|
169 |
$userarray = wppa_index_string_to_array( $mailinglist );
|
170 |
return ( in_array( $user_id, $userarray ) );
|
171 |
+
}
|
172 |
+
|
173 |
+
// Send a mail
|
174 |
+
function wppa_send_mail( $args ) {
|
175 |
+
|
176 |
+
$defaults = array( 'to' => '',
|
177 |
+
'subj' => '',
|
178 |
+
'cont' => '',
|
179 |
+
'photo' => '0',
|
180 |
+
'email' => '',
|
181 |
+
'listtype' => '',
|
182 |
+
'replyurl' => '',
|
183 |
+
);
|
184 |
+
$args = wp_parse_args( $args, $defaults );
|
185 |
+
extract( $args );
|
186 |
+
|
187 |
+
// User id given?
|
188 |
+
if ( is_numeric( $to ) ) {
|
189 |
+
$user = get_user_by( 'id', $to );
|
190 |
+
if ( $user ) {
|
191 |
+
$to = $user->user_email;
|
192 |
+
}
|
193 |
+
else {
|
194 |
+
wppa_log( 'err', 'Attempt to mail to a non existing user', true );
|
195 |
+
return;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
$message_part_1 = '';
|
200 |
+
$message_part_2 = '';
|
201 |
+
$message_part_3 = '';
|
202 |
+
|
203 |
+
$site = home_url();
|
204 |
+
$site = str_replace( 'https://www.', '', $site );
|
205 |
+
$site = str_replace( 'http://www.', '', $site );
|
206 |
+
$site = str_replace( 'https://', '', $site );
|
207 |
+
$site = str_replace( 'http://', '', $site );
|
208 |
+
$spos = strpos( $site, '/' );
|
209 |
+
if ( $spos > '2' ) {
|
210 |
+
$site = substr( $site, 0, $spos );
|
211 |
+
}
|
212 |
+
|
213 |
+
$headers = array( 'From: noreply@' . $site,
|
214 |
+
'Content-Type: text/html; charset=UTF-8'
|
215 |
+
);
|
216 |
+
|
217 |
+
$message_part_1 .=
|
218 |
+
'<html>' .
|
219 |
+
'<head>' .
|
220 |
+
'<title>'.$subj.'</title>' .
|
221 |
+
'</head>' .
|
222 |
+
'<body>' .
|
223 |
+
'<h3>'.$subj.'</h3>' .
|
224 |
+
( $photo ? '<p><img src="'.wppa_get_thumb_url($photo).'" '.wppa_get_imgalt($photo).'/></p>' : '' );
|
225 |
+
if ( is_array($cont) ) {
|
226 |
+
foreach ( $cont as $c ) if ( $c ) {
|
227 |
+
$message_part_1 .= '<p>'.$c.'</p>';
|
228 |
+
}
|
229 |
+
}
|
230 |
+
else {
|
231 |
+
$message_part_1 .= '<p>'.$cont.'</p>';
|
232 |
+
}
|
233 |
+
|
234 |
+
if ( $email != 'void' ) {
|
235 |
+
if ( is_user_logged_in() ) {
|
236 |
+
global $current_user;
|
237 |
+
$current_user = wp_get_current_user();
|
238 |
+
$e = $current_user->user_email;
|
239 |
+
$eml = sprintf(__('The visitors email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $e, $e);
|
240 |
+
$message_part_2 .= '<p>'.$eml.'</p>';
|
241 |
+
}
|
242 |
+
elseif ( $email ) {
|
243 |
+
$e = $email;
|
244 |
+
$eml = sprintf(__('The visitor says his email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $e, $e);
|
245 |
+
$message_part_2 .= '<p>'.$eml.'</p>';
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
if ( $replyurl ) {
|
250 |
+
$message_part_2 .= '<a href="' . $replyurl . '" >' . __( 'Reply' , 'wp-photo-album-plus') . '</a>';
|
251 |
+
}
|
252 |
+
|
253 |
+
$message_part_3 .=
|
254 |
+
'<p>' .
|
255 |
+
'<small>' .
|
256 |
+
sprintf(__('This message is automatically generated at %s. It is useless to respond to it.', 'wp-photo-album-plus'), '<a href="'.home_url().'" >'.home_url().'</a>') .
|
257 |
+
'</small>' .
|
258 |
+
( defined( 'WP_DEBUG' ) ? ' <small>(' . $listtype . ')</small>' : '' ) .
|
259 |
+
'</p>' .
|
260 |
+
'</body>' .
|
261 |
+
'</html>';
|
262 |
+
|
263 |
+
$subject = '['.str_replace(''', '', get_bloginfo('name') ).'] '.$subj;
|
264 |
+
|
265 |
+
// Try to send it with extra headers and with html
|
266 |
+
$iret = wp_mail( $to,
|
267 |
+
$subject,
|
268 |
+
$message_part_1 . $message_part_2 . $message_part_3,
|
269 |
+
$headers,
|
270 |
+
'' );
|
271 |
+
if ( $iret ) {
|
272 |
+
wppa_log( 'eml', 'Mail send to: ' . $to . ', subject: ' . $subject . ', photo: ' . ( $photo ? $photo : 'not supplied.' ) );
|
273 |
+
return;
|
274 |
+
}
|
275 |
+
|
276 |
+
wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $message_part_1 . $message_part_2 . $message_part_3 );
|
277 |
+
|
278 |
+
// Failed
|
279 |
+
if ( ! wppa_is_cron() ) {
|
280 |
+
echo 'Mail sending Failed';
|
281 |
+
wppa_process_failed_mail( $to,
|
282 |
+
$subject,
|
283 |
+
$message_part_1 . $message_part_2 . $message_part_3,
|
284 |
+
$headers,
|
285 |
+
'' );
|
286 |
+
}
|
287 |
+
|
288 |
}
|
wppa-maintenance.php
CHANGED
@@ -1571,7 +1571,7 @@ function wppa_log_page() {
|
|
1571 |
'<div class="wrap">' .
|
1572 |
wppa_admin_spinner() .
|
1573 |
wp_nonce_field( 'wppa-nonce', 'wppa-nonce', true, false ) .
|
1574 |
-
'<img id="icon-album" src="' . WPPA_URL . '/img/page_green.png" />' .
|
1575 |
'<h1 style="display:inline" >' . __('WP Photo Album Plus Logfile', 'wp-photo-album-plus') .
|
1576 |
'<input' .
|
1577 |
' class="button-secundary"' .
|
1571 |
'<div class="wrap">' .
|
1572 |
wppa_admin_spinner() .
|
1573 |
wp_nonce_field( 'wppa-nonce', 'wppa-nonce', true, false ) .
|
1574 |
+
'<img id="icon-album" src="' . esc_url( WPPA_URL . '/img/page_green.png' ) . '" />' .
|
1575 |
'<h1 style="display:inline" >' . __('WP Photo Album Plus Logfile', 'wp-photo-album-plus') .
|
1576 |
'<input' .
|
1577 |
' class="button-secundary"' .
|
wppa-multitag-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
-
* Version
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -98,7 +98,7 @@ class MultitagPhotos extends WP_Widget {
|
|
98 |
$body = '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
99 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
100 |
if ( in_array( $tag, $stags ) ) $sel = ' selected="selected"'; else $sel = '';
|
101 |
-
$body .= '<option value="' . $tag . '"' . $sel . ' >' . $tag . '</option>';
|
102 |
}
|
103 |
echo
|
104 |
wppa_widget_selection_frame( $this, 'tags', $body, __( 'Select multiple tags or --- all ---', 'wp-photo-album-plus' ), 'multi' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
+
* Version 7.0.00
|
7 |
*
|
8 |
*/
|
9 |
|
98 |
$body = '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
99 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
100 |
if ( in_array( $tag, $stags ) ) $sel = ' selected="selected"'; else $sel = '';
|
101 |
+
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlentities( $tag ) . '</option>';
|
102 |
}
|
103 |
echo
|
104 |
wppa_widget_selection_frame( $this, 'tags', $body, __( 'Select multiple tags or --- all ---', 'wp-photo-album-plus' ), 'multi' );
|
wppa-notify-widget.php
CHANGED
@@ -23,7 +23,11 @@ class wppaNotifyWidget extends WP_Widget {
|
|
23 |
'newalbum' => 'no',
|
24 |
'newalbumlink' => '',
|
25 |
'photoapproved' => 'no',
|
|
|
26 |
'commentapproved' => 'no',
|
|
|
|
|
|
|
27 |
'logonly' => 'yes',
|
28 |
) );
|
29 |
// Logged in only and logged out?
|
@@ -36,67 +40,154 @@ class wppaNotifyWidget extends WP_Widget {
|
|
36 |
|
37 |
$widget_content .= __( 'Notyfy me when...', 'wp-photo-album-plus' ) . '<br />';
|
38 |
|
|
|
|
|
|
|
39 |
// New album
|
40 |
if ( wppa_switch( 'mail_new_album' ) ) {
|
41 |
$in_list = wppa_am_i_in_mailinglist( 'newalbum' );
|
42 |
-
$
|
43 |
-
<
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
-
//
|
60 |
-
if ( wppa_switch( '
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
style="
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
-
//
|
80 |
-
if (
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
style="
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
99 |
|
|
|
100 |
$widget_content .= '<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />';
|
101 |
$widget_content .= '<div style="clear:both" ></div>';
|
102 |
$widget_content .= "\n".'<!-- WPPA+ notify Widget end -->';
|
@@ -118,16 +209,17 @@ class wppaNotifyWidget extends WP_Widget {
|
|
118 |
'newalbum' => 'no',
|
119 |
'newalbumlink' => '',
|
120 |
'photoapproved' => 'no',
|
|
|
121 |
'commentapproved' => 'no',
|
|
|
|
|
|
|
122 |
'logonly' => 'yes',
|
123 |
) );
|
124 |
|
125 |
-
|
126 |
-
$instance['title'] = strip_tags( $
|
127 |
-
$instance['
|
128 |
-
$instance['newalbumlink'] = $new_instance['newalbumlink'];
|
129 |
-
$instance['photoapproved'] = $new_instance['photoapproved'];
|
130 |
-
$instance['logonly'] = $new_instance['logonly'];
|
131 |
|
132 |
return $instance;
|
133 |
}
|
@@ -140,7 +232,11 @@ class wppaNotifyWidget extends WP_Widget {
|
|
140 |
'newalbum' => 'no',
|
141 |
'newalbumlink' => '',
|
142 |
'photoapproved' => 'no',
|
|
|
143 |
'commentapproved' => 'no',
|
|
|
|
|
|
|
144 |
'logonly' => 'yes',
|
145 |
) );
|
146 |
|
@@ -157,24 +253,67 @@ class wppaNotifyWidget extends WP_Widget {
|
|
157 |
__( 'See Table IX-D19 and 20: Mail on new album', 'wp-photo-album-plus'),
|
158 |
'disabled' );
|
159 |
|
160 |
-
//
|
161 |
-
echo
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
// Loggedin only
|
180 |
echo
|
23 |
'newalbum' => 'no',
|
24 |
'newalbumlink' => '',
|
25 |
'photoapproved' => 'no',
|
26 |
+
'commentnotify' => 'no',
|
27 |
'commentapproved' => 'no',
|
28 |
+
'commentprevious' => 'no',
|
29 |
+
'moderatephoto' => 'no',
|
30 |
+
'moderatecomment' => 'no',
|
31 |
'logonly' => 'yes',
|
32 |
) );
|
33 |
// Logged in only and logged out?
|
40 |
|
41 |
$widget_content .= __( 'Notyfy me when...', 'wp-photo-album-plus' ) . '<br />';
|
42 |
|
43 |
+
// Get the body of the widget
|
44 |
+
$body = '';
|
45 |
+
|
46 |
// New album
|
47 |
if ( wppa_switch( 'mail_new_album' ) ) {
|
48 |
$in_list = wppa_am_i_in_mailinglist( 'newalbum' );
|
49 |
+
$body .= '
|
50 |
+
<div style="clear:both;" >
|
51 |
+
<input
|
52 |
+
id="wppa-newalbum-notify"
|
53 |
+
type="checkbox"
|
54 |
+
style="float:left;" ' .
|
55 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
56 |
+
'onchange="wppaAjaxNotify(this,\'newalbum\');"
|
57 |
+
/>
|
58 |
+
<label
|
59 |
+
for="wppa-newalbum-notify"
|
60 |
+
style="float:left;padding-left:4px;width:90%;"
|
61 |
+
> ' .
|
62 |
+
__( 'A new album is created', 'wp-photo-album-plus' ) . '
|
63 |
+
</label>
|
64 |
+
</div>';
|
65 |
+
}
|
66 |
+
|
67 |
+
// Only if upload moderation is activated
|
68 |
+
if ( wppa_switch( 'upload_moderate' ) ) {
|
69 |
+
|
70 |
+
// Photo approved
|
71 |
+
if ( wppa_switch( 'mail_on_approve' ) ) {
|
72 |
+
$in_list = wppa_am_i_in_mailinglist( 'photoapproved' );
|
73 |
+
$body .= '
|
74 |
+
<div style="clear:both;" >
|
75 |
+
<input
|
76 |
+
id="wppa-photoapproved-notify"
|
77 |
+
type="checkbox"
|
78 |
+
style="float:left;" ' .
|
79 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
80 |
+
'onchange="wppaAjaxNotify(this,\'photoapproved\');"
|
81 |
+
/>
|
82 |
+
<label
|
83 |
+
for="wppa-photoapproved-notify"
|
84 |
+
style="float:left;padding-left:4px;width:90%;"
|
85 |
+
> ' .
|
86 |
+
__( 'My photo is approved', 'wp-photo-album-plus' ) . '
|
87 |
+
</label>
|
88 |
+
</div>';
|
89 |
+
}
|
90 |
}
|
91 |
|
92 |
+
// Only if comments sytem is activated
|
93 |
+
if ( wppa_switch( 'show_comments' ) ) {
|
94 |
+
|
95 |
+
// Comment approved (to photo owner)
|
96 |
+
if ( wppa_switch( 'com_notify_approved' ) ) {
|
97 |
+
$in_list = wppa_am_i_in_mailinglist( 'commentapproved' );
|
98 |
+
$body .= '
|
99 |
+
<div style="clear:both;" >
|
100 |
+
<input
|
101 |
+
id="wppa-commentapproved-notify"
|
102 |
+
type="checkbox"
|
103 |
+
style="float:left;" ' .
|
104 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
105 |
+
'onchange="wppaAjaxNotify(this,\'commentapproved\');"
|
106 |
+
/>
|
107 |
+
<label
|
108 |
+
for="wppa-commentapproved-notify"
|
109 |
+
style="float:left;padding-left:4px;width:90%;"
|
110 |
+
> ' .
|
111 |
+
__( 'Comment on my photo is approved', 'wp-photo-album-plus' ) . '
|
112 |
+
</label>
|
113 |
+
</div>';
|
114 |
+
}
|
115 |
+
|
116 |
+
// Commented previous (to photo owner)
|
117 |
+
if ( wppa_switch( 'com_notify_previous' ) ) {
|
118 |
+
$in_list = wppa_am_i_in_mailinglist( 'commentprevious' );
|
119 |
+
$body .= '
|
120 |
+
<div style="clear:both;" >
|
121 |
+
<input
|
122 |
+
id="wppa-commentprevious-notify"
|
123 |
+
type="checkbox"
|
124 |
+
style="float:left;" ' .
|
125 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
126 |
+
'onchange="wppaAjaxNotify(this,\'commentprevious\');"
|
127 |
+
/>
|
128 |
+
<label
|
129 |
+
for="wppa-commentprevious-notify"
|
130 |
+
style="float:left;padding-left:4px;width:90%;"
|
131 |
+
> ' .
|
132 |
+
__( 'Comment on a photo that i commented before', 'wp-photo-album-plus' ) . '
|
133 |
+
</label>
|
134 |
+
</div>';
|
135 |
+
}
|
136 |
+
|
137 |
}
|
138 |
|
139 |
+
// Only show to moderators
|
140 |
+
if ( current_user_can( 'wppa_moderate' ) ) {
|
141 |
+
|
142 |
+
// Only if photo modaration activated
|
143 |
+
if ( wppa_switch( 'upload_moderate' ) ) {
|
144 |
+
$in_list = wppa_am_i_in_mailinglist( 'moderatephoto' );
|
145 |
+
$body .= '
|
146 |
+
<div style="clear:both;" >
|
147 |
+
<input
|
148 |
+
id="wppa-upload-moderate"
|
149 |
+
type="checkbox"
|
150 |
+
style="float:left;" ' .
|
151 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
152 |
+
'onchange="wppaAjaxNotify(this,\'moderatephoto\');"
|
153 |
+
/>
|
154 |
+
<label
|
155 |
+
for="wppa-upload-moderate"
|
156 |
+
style="float:left;padding-left:4px;width:90%;"
|
157 |
+
> ' .
|
158 |
+
__( 'A photo needs moderation', 'wp-photo-album-plus' ) . '
|
159 |
+
</label>
|
160 |
+
</div>';
|
161 |
+
}
|
162 |
+
|
163 |
+
// Only if comment moderation activated
|
164 |
+
if ( wppa_opt( 'comment_moderation' ) != 'none' ) {
|
165 |
+
$in_list = wppa_am_i_in_mailinglist( 'moderatecomment' );
|
166 |
+
$body .= '
|
167 |
+
<div style="clear:both;" >
|
168 |
+
<input
|
169 |
+
id="wppa-upload-moderate-comment"
|
170 |
+
type="checkbox"
|
171 |
+
style="float:left;" ' .
|
172 |
+
( $in_list ? 'checked="checked" ' : ' ' ) .
|
173 |
+
'onchange="wppaAjaxNotify(this,\'moderatecomment\');"
|
174 |
+
/>
|
175 |
+
<label
|
176 |
+
for="wppa-upload-moderate-comment"
|
177 |
+
style="float:left;padding-left:4px;width:90%;"
|
178 |
+
> ' .
|
179 |
+
__( 'A comment needs moderation', 'wp-photo-album-plus' ) . '
|
180 |
+
</label>
|
181 |
+
</div>';
|
182 |
+
}
|
183 |
}
|
184 |
|
185 |
+
// Nothing to show?
|
186 |
+
if ( ! $body ) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
|
190 |
+
$widget_content .= $body;
|
191 |
$widget_content .= '<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />';
|
192 |
$widget_content .= '<div style="clear:both" ></div>';
|
193 |
$widget_content .= "\n".'<!-- WPPA+ notify Widget end -->';
|
209 |
'newalbum' => 'no',
|
210 |
'newalbumlink' => '',
|
211 |
'photoapproved' => 'no',
|
212 |
+
'commentnotify' => 'no',
|
213 |
'commentapproved' => 'no',
|
214 |
+
'commentprevious' => 'no',
|
215 |
+
'moderatephoto' => 'no',
|
216 |
+
'moderatecomment' => 'no',
|
217 |
'logonly' => 'yes',
|
218 |
) );
|
219 |
|
220 |
+
$instance = $new_instance;
|
221 |
+
$instance['title'] = strip_tags( $instance['title'] );
|
222 |
+
$instance['newalbumlink'] = esc_url( $instance['newalbumlink'] );
|
|
|
|
|
|
|
223 |
|
224 |
return $instance;
|
225 |
}
|
232 |
'newalbum' => 'no',
|
233 |
'newalbumlink' => '',
|
234 |
'photoapproved' => 'no',
|
235 |
+
'commentnotify' => 'no',
|
236 |
'commentapproved' => 'no',
|
237 |
+
'commentprevious' => 'no',
|
238 |
+
'moderatephoto' => 'no',
|
239 |
+
'moderatecomment' => 'no',
|
240 |
'logonly' => 'yes',
|
241 |
) );
|
242 |
|
253 |
__( 'See Table IX-D19 and 20: Mail on new album', 'wp-photo-album-plus'),
|
254 |
'disabled' );
|
255 |
|
256 |
+
// Only when upload moderation is acitvated
|
257 |
+
echo '<div style="padding:0 6px 6px;border:1px solid lightgray;margin-top:2px;margin-bottom:1em;" >' .
|
258 |
+
'<small>' . __( 'These boxes only show up when upload moderation is activated in Table VII-B7.0', 'wp-photo-album-plus' ) . '</small>';
|
259 |
+
|
260 |
+
// Notify when photo approved
|
261 |
+
echo
|
262 |
+
wppa_widget_checkbox( $this,
|
263 |
+
'photoapproved',
|
264 |
+
wppa_switch( 'mail_on_approve' ) ? 'yes' : 'no',
|
265 |
+
__( 'Photo approved', 'wp-photo-album-plus' ),
|
266 |
+
__( 'See Table VII-B7.2: Notify approve photo', 'wp-photo-album-plus' ),
|
267 |
+
'disabled' );
|
268 |
+
|
269 |
+
echo '</div>';
|
270 |
+
|
271 |
+
// Only when comments system is activated
|
272 |
+
echo '<div style="padding:0 6px 6px;border:1px solid lightgray;margin-top:2px;margin-bottom:1em;" >' .
|
273 |
+
'<small>' . __( 'These boxes only show up when the comments system is activated in Table II-B10', 'wp-photo-album-plus' ) . '</small>';
|
274 |
+
|
275 |
+
// Notify when comment on photo approved
|
276 |
+
echo
|
277 |
+
wppa_widget_checkbox( $this,
|
278 |
+
'commentapproved',
|
279 |
+
wppa_switch( 'com_notify_approved' ) ? 'yes' : 'no',
|
280 |
+
__( 'Comment on photo approved', 'wp-photo-album-plus' ),
|
281 |
+
__( 'See Table IV-F5.2 and 5.3: Comment notify approved', 'wp-photo-album-plus' ),
|
282 |
+
'disabled' );
|
283 |
+
|
284 |
+
echo
|
285 |
+
wppa_widget_checkbox( $this,
|
286 |
+
'commentprevious',
|
287 |
+
wppa_switch( 'com_notify_previous' ) ? 'yes' : 'no',
|
288 |
+
__( 'Commented the photo before', 'wp-photo-album-plus' ),
|
289 |
+
__( 'See Table IV-F5.1: Comment notify previous', 'wp-photo-album-plus' ),
|
290 |
+
'disabled' );
|
291 |
+
|
292 |
+
echo '</div>';
|
293 |
+
|
294 |
+
// Only for moderators
|
295 |
+
echo '<div style="padding:0 6px 6px;border:1px solid lightgray;margin-top:2px;margin-bottom:1em;" >' .
|
296 |
+
'<small>' . __( 'These boxes only show up to moderators', 'wp-photo-album-plus' ) . '</small>';
|
297 |
+
|
298 |
+
// Notify when photo needs moderation
|
299 |
+
echo
|
300 |
+
wppa_widget_checkbox( $this,
|
301 |
+
'moderatephoto',
|
302 |
+
wppa_switch( 'upload_moderate' ) ? 'yes' : 'no',
|
303 |
+
__( 'Upload moderation', 'wp-photo-album-plus' ),
|
304 |
+
__( 'See Table VII-B7.0: Upload moderation', 'wp-photo-album-plus' ),
|
305 |
+
'disabled' );
|
306 |
+
|
307 |
+
// Notify when comment needs moderation
|
308 |
+
echo
|
309 |
+
wppa_widget_checkbox( $this,
|
310 |
+
'moderatecomment',
|
311 |
+
wppa_opt( 'comment_moderation' ) != 'none' ? 'yes' : 'no',
|
312 |
+
__( 'Comment moderation', 'wp-photo-album-plus' ),
|
313 |
+
__( 'See Table IV-F3: Comment moderation', 'wp-photo-album-plus' ),
|
314 |
+
'disabled' );
|
315 |
+
|
316 |
+
echo '</div>';
|
317 |
|
318 |
// Loggedin only
|
319 |
echo
|
wppa-photo-admin-autosave.php
CHANGED
@@ -663,19 +663,18 @@ function wppaToggleExif( id, count ) {
|
|
663 |
// --- More or less static data ---
|
664 |
|
665 |
// ID
|
666 |
-
'ID = ' . $id . '. ' .
|
667 |
|
668 |
// Crypt
|
669 |
-
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' . $crypt . '. ' .
|
670 |
|
671 |
// Filename
|
672 |
-
__( 'Filename:', 'wp-photo-album-plus' ) . ' ' . $filename . '. ' .
|
673 |
|
674 |
// Upload
|
675 |
-
__( 'Upload:', 'wp-photo-album-plus' ) . ' ' . wppa_local_date( '', $timestamp ) . ' ' . __( 'local time' , 'wp-photo-album-plus') . '. '
|
676 |
|
677 |
// Owner
|
678 |
-
( $owner_editable ? '' : __( 'By:', 'wp-photo-album-plus' ) . ' ' . $owner );
|
679 |
if ( $owner_editable ) {
|
680 |
echo
|
681 |
__( 'Owned by:', 'wp-photo-album-plus' ) .
|
@@ -683,11 +682,13 @@ function wppaToggleExif( id, count ) {
|
|
683 |
' type="text"' .
|
684 |
' onkeyup="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this )"' .
|
685 |
' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this )"' .
|
686 |
-
' value="' . $owner . '"' .
|
687 |
-
' />';
|
|
|
|
|
|
|
|
|
688 |
}
|
689 |
-
echo
|
690 |
-
' ';
|
691 |
|
692 |
// Album
|
693 |
$deleted = false;
|
@@ -696,7 +697,7 @@ function wppaToggleExif( id, count ) {
|
|
696 |
$deleted = true;
|
697 |
}
|
698 |
echo
|
699 |
-
sprintf( __( 'Album: %d (%s).' , 'wp-photo-album-plus'), $album, wppa_get_album_name( $album ) );
|
700 |
|
701 |
// Modified
|
702 |
if ( $deleted ) {
|
@@ -732,7 +733,7 @@ function wppaToggleExif( id, count ) {
|
|
732 |
' />';
|
733 |
}
|
734 |
else {
|
735 |
-
echo $exifdtm . '.';
|
736 |
}
|
737 |
echo
|
738 |
' ';
|
@@ -829,7 +830,7 @@ function wppaToggleExif( id, count ) {
|
|
829 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
830 |
echo
|
831 |
__( 'Views' , 'wp-photo-album-plus' ) . ': ' .
|
832 |
-
$views .
|
833 |
'. ';
|
834 |
}
|
835 |
|
@@ -837,7 +838,7 @@ function wppaToggleExif( id, count ) {
|
|
837 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
838 |
echo
|
839 |
__( 'Clicks', 'wp-photo-album-plus' ) . ': ' .
|
840 |
-
$clicks .
|
841 |
'. ';
|
842 |
}
|
843 |
|
@@ -889,7 +890,7 @@ function wppaToggleExif( id, count ) {
|
|
889 |
'<input' .
|
890 |
' type="hidden"' .
|
891 |
' id="status-' . $id . '"' .
|
892 |
-
' value="' . $status . '"' .
|
893 |
' />';
|
894 |
if ( $status == 'pending' ) _e( 'Pending', 'wp-photo-album-plus' );
|
895 |
elseif ( $status == 'publish' ) _e( 'Publish', 'wp-photo-album-plus' );
|
@@ -1193,8 +1194,8 @@ function wppaToggleExif( id, count ) {
|
|
1193 |
echo
|
1194 |
__( 'Watermark:', 'wp-photo-album-plus') . ' ';
|
1195 |
echo
|
1196 |
-
__( 'File:', 'wp-photo-album-plus' ) . ' ' . basename( $wmfile ) . ' ' .
|
1197 |
-
__( 'Pos:', 'wp-photo-album-plus') . ' ' .
|
1198 |
}
|
1199 |
echo ' ';
|
1200 |
}
|
@@ -1808,7 +1809,7 @@ function wppaToggleExif( id, count ) {
|
|
1808 |
if ( is_array( $taglist ) ) {
|
1809 |
echo '<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
1810 |
foreach ( $taglist as $tag ) {
|
1811 |
-
echo '<option value="' . $tag['tag'] . '" >' . $tag['tag'] . '</option>';
|
1812 |
}
|
1813 |
if ( ! $allowed ) {
|
1814 |
echo '<option value="-clear-" >' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>';
|
@@ -2004,7 +2005,7 @@ function wppaToggleExif( id, count ) {
|
|
2004 |
__( 'Permalink', 'wp-photo-album-plus' ) . ':' .
|
2005 |
'</td>' .
|
2006 |
'<td>' .
|
2007 |
-
'<a href="' . esc_attr( $spl ) . '" target="_blank" >' . $spl . '</a>' .
|
2008 |
'</td>' .
|
2009 |
'<td>' .
|
2010 |
'</td>' .
|
@@ -2594,7 +2595,7 @@ function wppaSetConfirmMove( id ) {
|
|
2594 |
<?php
|
2595 |
|
2596 |
foreach ( $users as $user ) {
|
2597 |
-
echo '<option value="'
|
2598 |
}
|
2599 |
?>
|
2600 |
</select>
|
@@ -2666,9 +2667,16 @@ function wppaSetConfirmMove( id ) {
|
|
2666 |
static $modalbum;
|
2667 |
if ( $album == 'moderate' ) {
|
2668 |
if ( $modalbum != $photo['album'] ) {
|
2669 |
-
echo '
|
2670 |
-
|
2671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2672 |
$modalbum = $photo['album'];
|
2673 |
}
|
2674 |
}
|
@@ -2759,7 +2767,7 @@ function wppaSetConfirmMove( id ) {
|
|
2759 |
<!-- Size -->
|
2760 |
<?php
|
2761 |
if ( wppa_is_video( $photo['id'] ) ) {
|
2762 |
-
echo '<br />'.wppa_get_videox( $photo['id'] ).' x '.wppa_get_videoy( $photo['id'] ).' px.';
|
2763 |
}
|
2764 |
else {
|
2765 |
$sp = wppa_get_source_path( $photo['id'] );
|
@@ -3058,7 +3066,7 @@ global $wpdb;
|
|
3058 |
echo
|
3059 |
'<img' .
|
3060 |
' class="wppa-bulk-thumb ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
|
3061 |
-
' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . wppa_get_thumb_url( $photo['id'] ) . '"' .
|
3062 |
' style="max-width:' . $mw . 'px; max-height:' . $mh . 'px; margin-top:' . $mt . 'px;" />';
|
3063 |
} ?>
|
3064 |
<div style="font-size:9px; position:absolute; bottom:24px; text-align:center; width:<?php echo $size ?>px;" ><?php echo wppa_get_photo_name( $photo['id'] ) ?></div>
|
663 |
// --- More or less static data ---
|
664 |
|
665 |
// ID
|
666 |
+
'ID = ' . strval( intval( $id ) ) . '. ' .
|
667 |
|
668 |
// Crypt
|
669 |
+
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' . htmlentities( $crypt ) . '. ' .
|
670 |
|
671 |
// Filename
|
672 |
+
__( 'Filename:', 'wp-photo-album-plus' ) . ' ' . htmlentities( $filename ) . '. ' .
|
673 |
|
674 |
// Upload
|
675 |
+
__( 'Upload:', 'wp-photo-album-plus' ) . ' ' . htmlentities( wppa_local_date( '', $timestamp ) ) . ' ' . __( 'local time' , 'wp-photo-album-plus') . '. ';
|
676 |
|
677 |
// Owner
|
|
|
678 |
if ( $owner_editable ) {
|
679 |
echo
|
680 |
__( 'Owned by:', 'wp-photo-album-plus' ) .
|
682 |
' type="text"' .
|
683 |
' onkeyup="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this )"' .
|
684 |
' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this )"' .
|
685 |
+
' value="' . esc_attr( $owner ) . '"' .
|
686 |
+
' /> ';
|
687 |
+
}
|
688 |
+
else {
|
689 |
+
echo
|
690 |
+
__( 'By:', 'wp-photo-album-plus' ) . ' ' . htmlentities( $owner ) . ' ';
|
691 |
}
|
|
|
|
|
692 |
|
693 |
// Album
|
694 |
$deleted = false;
|
697 |
$deleted = true;
|
698 |
}
|
699 |
echo
|
700 |
+
sprintf( __( 'Album: %d (%s).' , 'wp-photo-album-plus'), strval( intval( $album ) ), htmlentities( wppa_get_album_name( $album ) ) );
|
701 |
|
702 |
// Modified
|
703 |
if ( $deleted ) {
|
733 |
' />';
|
734 |
}
|
735 |
else {
|
736 |
+
echo htmlentities( $exifdtm ) . '.';
|
737 |
}
|
738 |
echo
|
739 |
' ';
|
830 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
831 |
echo
|
832 |
__( 'Views' , 'wp-photo-album-plus' ) . ': ' .
|
833 |
+
htmlentities( $views ) .
|
834 |
'. ';
|
835 |
}
|
836 |
|
838 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
839 |
echo
|
840 |
__( 'Clicks', 'wp-photo-album-plus' ) . ': ' .
|
841 |
+
htmlentities( $clicks ) .
|
842 |
'. ';
|
843 |
}
|
844 |
|
890 |
'<input' .
|
891 |
' type="hidden"' .
|
892 |
' id="status-' . $id . '"' .
|
893 |
+
' value="' . esc_attr( $status ) . '"' .
|
894 |
' />';
|
895 |
if ( $status == 'pending' ) _e( 'Pending', 'wp-photo-album-plus' );
|
896 |
elseif ( $status == 'publish' ) _e( 'Publish', 'wp-photo-album-plus' );
|
1194 |
echo
|
1195 |
__( 'Watermark:', 'wp-photo-album-plus') . ' ';
|
1196 |
echo
|
1197 |
+
__( 'File:', 'wp-photo-album-plus' ) . ' ' . strip_tags( basename( $wmfile ) ) . ' ' .
|
1198 |
+
__( 'Pos:', 'wp-photo-album-plus') . ' ' . strip_tags( $wmpos );
|
1199 |
}
|
1200 |
echo ' ';
|
1201 |
}
|
1809 |
if ( is_array( $taglist ) ) {
|
1810 |
echo '<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
|
1811 |
foreach ( $taglist as $tag ) {
|
1812 |
+
echo '<option value="' . esc_attr( $tag['tag'] ) . '" >' . htmlentities( $tag['tag'] ) . '</option>';
|
1813 |
}
|
1814 |
if ( ! $allowed ) {
|
1815 |
echo '<option value="-clear-" >' . __( '- clear -', 'wp-photo-album-plus' ) . '</option>';
|
2005 |
__( 'Permalink', 'wp-photo-album-plus' ) . ':' .
|
2006 |
'</td>' .
|
2007 |
'<td>' .
|
2008 |
+
'<a href="' . esc_attr( $spl ) . '" target="_blank" >' . htmlentities( $spl ) . '</a>' .
|
2009 |
'</td>' .
|
2010 |
'<td>' .
|
2011 |
'</td>' .
|
2595 |
<?php
|
2596 |
|
2597 |
foreach ( $users as $user ) {
|
2598 |
+
echo '<option value="' . esc_attr( $user['user_login'] ) . '" >' . htmlentities( $user['display_name'] ) . ' (' . htmlentities( $user['user_login'] ) . ')</option>';
|
2599 |
}
|
2600 |
?>
|
2601 |
</select>
|
2667 |
static $modalbum;
|
2668 |
if ( $album == 'moderate' ) {
|
2669 |
if ( $modalbum != $photo['album'] ) {
|
2670 |
+
echo '
|
2671 |
+
<tr>
|
2672 |
+
<td colspan="8" style="background-color:lightgreen;" >
|
2673 |
+
<h3 style="margin:0;" >' .
|
2674 |
+
sprintf( __( 'Moderate photos from album %s by %s', 'wp-photo-album-plus' ),
|
2675 |
+
'<i>' . htmlentities( wppa_get_album_name( $photo['album'] ) ) . '</i>',
|
2676 |
+
'<i>' . htmlentities( wppa_get_album_item( $photo['album'], 'owner' ) ) . '</i>' ) .
|
2677 |
+
'</h3>
|
2678 |
+
</td>
|
2679 |
+
</tr>';
|
2680 |
$modalbum = $photo['album'];
|
2681 |
}
|
2682 |
}
|
2767 |
<!-- Size -->
|
2768 |
<?php
|
2769 |
if ( wppa_is_video( $photo['id'] ) ) {
|
2770 |
+
echo '<br />'.strval(intval(wppa_get_videox( $photo['id'] ))).' x '.strval(intval(wppa_get_videoy( $photo['id'] ))).' px.';
|
2771 |
}
|
2772 |
else {
|
2773 |
$sp = wppa_get_source_path( $photo['id'] );
|
3066 |
echo
|
3067 |
'<img' .
|
3068 |
' class="wppa-bulk-thumb ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
|
3069 |
+
' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
3070 |
' style="max-width:' . $mw . 'px; max-height:' . $mh . 'px; margin-top:' . $mt . 'px;" />';
|
3071 |
} ?>
|
3072 |
<div style="font-size:9px; position:absolute; bottom:24px; text-align:center; width:<?php echo $size ?>px;" ><?php echo wppa_get_photo_name( $photo['id'] ) ?></div>
|
wppa-settings-autosave.php
CHANGED
@@ -233,7 +233,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
233 |
'document.location=' .
|
234 |
'document.location+"&' .
|
235 |
'wppa_settings_submit=Doit&' .
|
236 |
-
'wppa-nonce=' .
|
237 |
'wppa-key=' . $key . '&' .
|
238 |
'_wp_http_referer=' . esc_url( $_REQUEST['_wp_http_referer'] ) . '"' .
|
239 |
'</script>';
|
@@ -253,7 +253,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
253 |
'document.location=' .
|
254 |
'document.location+"&' .
|
255 |
'wppa_settings_submit=Doit&' .
|
256 |
-
'wppa-nonce=' .
|
257 |
'wppa-key=' . $key . '&' .
|
258 |
'_wp_http_referer=' . esc_url( $_REQUEST['_wp_http_referer'] ) . '"' .
|
259 |
'</script>';
|
@@ -4990,34 +4990,10 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
4990 |
wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
|
4991 |
|
4992 |
$name = __('Comment notify', 'wp-photo-album-plus');
|
4993 |
-
$desc = __('Select
|
4994 |
$help = '';
|
4995 |
$slug = 'wppa_comment_notify';
|
4996 |
-
$
|
4997 |
-
__('--- Admin ---', 'wp-photo-album-plus'),
|
4998 |
-
__('--- Album owner ---', 'wp-photo-album-plus'),
|
4999 |
-
__('--- Admin & Owner ---', 'wp-photo-album-plus'),
|
5000 |
-
__('--- Uploader ---', 'wp-photo-album-plus'),
|
5001 |
-
__('--- Up & admin ---', 'wp-photo-album-plus'),
|
5002 |
-
__('--- Up & Owner ---', 'wp-photo-album-plus')
|
5003 |
-
);
|
5004 |
-
$values = array( 'none',
|
5005 |
-
'admin',
|
5006 |
-
'owner',
|
5007 |
-
'both',
|
5008 |
-
'upload',
|
5009 |
-
'upadmin',
|
5010 |
-
'upowner'
|
5011 |
-
);
|
5012 |
-
$usercount = wppa_get_user_count();
|
5013 |
-
if ( $usercount <= wppa_opt( 'max_users') ) {
|
5014 |
-
$users = wppa_get_users();
|
5015 |
-
foreach ( $users as $usr ) {
|
5016 |
-
$options[] = $usr['display_name'];
|
5017 |
-
$values[] = $usr['ID'];
|
5018 |
-
}
|
5019 |
-
}
|
5020 |
-
$html = wppa_select($slug, $options, $values);
|
5021 |
$clas = 'wppa_comment_';
|
5022 |
$tags = 'comment,mail';
|
5023 |
wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
|
@@ -6739,7 +6715,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
6739 |
$clas = '';
|
6740 |
$tags = 'access,album';
|
6741 |
wppa_setting($slug, '1.2', $name, $desc, $html, $help, $clas, $tags);
|
6742 |
-
|
6743 |
$name = __('User create notify', 'wp-photo-album-plus');
|
6744 |
$desc = __('Notify these users when an album is created at the front-end', 'wp-photo-album-plus');
|
6745 |
$help = esc_js(__('Enter login names seperated by comma\'s (,)', 'wp-photo-album-plus'));
|
@@ -6750,7 +6726,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
6750 |
$clas = '';
|
6751 |
$tags = 'mail,album';
|
6752 |
wppa_setting($slug, '1.3', $name, $desc, $html, $help, $clas, $tags);
|
6753 |
-
|
6754 |
$name = __('User create Albums login', 'wp-photo-album-plus');
|
6755 |
$desc = __('Frontend album creation requires the user is logged in.', 'wp-photo-album-plus');
|
6756 |
$help = '';
|
@@ -7313,6 +7289,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
7313 |
$blacklist = get_option( 'wppa_black_listed_users', array() );
|
7314 |
|
7315 |
if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
|
|
|
7316 |
$options = array( __('--- select a user to blacklist ---', 'wp-photo-album-plus') );
|
7317 |
$values = array( '0' );
|
7318 |
foreach ( $users as $usr ) {
|
@@ -7376,6 +7353,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
7376 |
$superlist = get_option( 'wppa_super_users', array() );
|
7377 |
|
7378 |
if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
|
|
|
7379 |
$options = array( __('--- select a user to make superuser ---', 'wp-photo-album-plus') );
|
7380 |
$values = array( '0' );
|
7381 |
foreach ( $users as $usr ) {
|
@@ -10652,15 +10630,15 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
10652 |
if ( is_array( $labels ) ) {
|
10653 |
$i = '1';
|
10654 |
foreach ( $labels as $label ) {
|
10655 |
-
$name = $label['tag'];
|
10656 |
$desc = '';
|
10657 |
$help = '';
|
10658 |
$slug1 = 'wppa_iptc_label_'.$name;
|
10659 |
$slug2 = 'wppa_iptc_status_'.$name;
|
10660 |
-
$html1 = wppa_edit($slug1, $label['description']);
|
10661 |
$options = array(__('Display', 'wp-photo-album-plus'), __('Hide', 'wp-photo-album-plus'), __('Optional', 'wp-photo-album-plus'));
|
10662 |
$values = array('display', 'hide', 'option');
|
10663 |
-
$html2 = wppa_select_e($slug2, $label['status'], $options, $values);
|
10664 |
$html = array($html1, $html2);
|
10665 |
$clas = '';
|
10666 |
$tags = 'meta';
|
@@ -10720,7 +10698,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
10720 |
if ( is_array( $labels ) ) {
|
10721 |
$i = '1';
|
10722 |
foreach ( $labels as $label ) {
|
10723 |
-
$name = $label['tag'];
|
10724 |
|
10725 |
$desc = '';
|
10726 |
foreach ( $wppa_supported_camara_brands as $brand ) {
|
@@ -10734,7 +10712,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
10734 |
$slug1 = 'wppa_exif_label_'.$name;
|
10735 |
$slug2 = 'wppa_exif_status_'.$name;
|
10736 |
|
10737 |
-
$html1 = wppa_edit($slug1, $label['description']);
|
10738 |
foreach ( $wppa_supported_camara_brands as $brand ) {
|
10739 |
$lbl = wppa_exif_tagname( $label['tag'], $brand, 'brandonly' );
|
10740 |
if ( $lbl ) {
|
@@ -10744,7 +10722,7 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
|
|
10744 |
|
10745 |
$options = array(__('Display', 'wp-photo-album-plus'), __('Hide', 'wp-photo-album-plus'), __('Optional', 'wp-photo-album-plus'));
|
10746 |
$values = array('display', 'hide', 'option');
|
10747 |
-
$html2 = wppa_select_e($slug2, $label['status'], $options, $values);
|
10748 |
$html = array($html1, $html2);
|
10749 |
$clas = '';
|
10750 |
$tags = 'meta';
|
@@ -11155,12 +11133,25 @@ global $wppa_totcols;
|
|
11155 |
$result .= '</tr>';
|
11156 |
|
11157 |
if ( $help ) {
|
11158 |
-
$result .=
|
11159 |
-
|
11160 |
-
'
|
11161 |
-
'
|
11162 |
-
|
11163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11164 |
}
|
11165 |
|
11166 |
echo $result;
|
233 |
'document.location=' .
|
234 |
'document.location+"&' .
|
235 |
'wppa_settings_submit=Doit&' .
|
236 |
+
'wppa-nonce=' . esc_attr( $_REQUEST['wppa-nonce'] ) . '&' .
|
237 |
'wppa-key=' . $key . '&' .
|
238 |
'_wp_http_referer=' . esc_url( $_REQUEST['_wp_http_referer'] ) . '"' .
|
239 |
'</script>';
|
253 |
'document.location=' .
|
254 |
'document.location+"&' .
|
255 |
'wppa_settings_submit=Doit&' .
|
256 |
+
'wppa-nonce=' . esc_attr( $_REQUEST['wppa-nonce'] ) . '&' .
|
257 |
'wppa-key=' . $key . '&' .
|
258 |
'_wp_http_referer=' . esc_url( $_REQUEST['_wp_http_referer'] ) . '"' .
|
259 |
'</script>';
|
4990 |
wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
|
4991 |
|
4992 |
$name = __('Comment notify', 'wp-photo-album-plus');
|
4993 |
+
$desc = __('Select if users can subscribe to e-mail notification of a new comment.', 'wp-photo-album-plus');
|
4994 |
$help = '';
|
4995 |
$slug = 'wppa_comment_notify';
|
4996 |
+
$html = wppa_checkbox($slug, $options, $values);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4997 |
$clas = 'wppa_comment_';
|
4998 |
$tags = 'comment,mail';
|
4999 |
wppa_setting($slug, '5', $name, $desc, $html, $help, $clas, $tags);
|
6715 |
$clas = '';
|
6716 |
$tags = 'access,album';
|
6717 |
wppa_setting($slug, '1.2', $name, $desc, $html, $help, $clas, $tags);
|
6718 |
+
/*
|
6719 |
$name = __('User create notify', 'wp-photo-album-plus');
|
6720 |
$desc = __('Notify these users when an album is created at the front-end', 'wp-photo-album-plus');
|
6721 |
$help = esc_js(__('Enter login names seperated by comma\'s (,)', 'wp-photo-album-plus'));
|
6726 |
$clas = '';
|
6727 |
$tags = 'mail,album';
|
6728 |
wppa_setting($slug, '1.3', $name, $desc, $html, $help, $clas, $tags);
|
6729 |
+
*/
|
6730 |
$name = __('User create Albums login', 'wp-photo-album-plus');
|
6731 |
$desc = __('Frontend album creation requires the user is logged in.', 'wp-photo-album-plus');
|
6732 |
$help = '';
|
7289 |
$blacklist = get_option( 'wppa_black_listed_users', array() );
|
7290 |
|
7291 |
if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
|
7292 |
+
$users = wppa_get_users();
|
7293 |
$options = array( __('--- select a user to blacklist ---', 'wp-photo-album-plus') );
|
7294 |
$values = array( '0' );
|
7295 |
foreach ( $users as $usr ) {
|
7353 |
$superlist = get_option( 'wppa_super_users', array() );
|
7354 |
|
7355 |
if ( wppa_get_user_count() <= wppa_opt( 'max_users' ) ) {
|
7356 |
+
$users = wppa_get_users();
|
7357 |
$options = array( __('--- select a user to make superuser ---', 'wp-photo-album-plus') );
|
7358 |
$values = array( '0' );
|
7359 |
foreach ( $users as $usr ) {
|
10630 |
if ( is_array( $labels ) ) {
|
10631 |
$i = '1';
|
10632 |
foreach ( $labels as $label ) {
|
10633 |
+
$name = htmlentities( $label['tag'] );
|
10634 |
$desc = '';
|
10635 |
$help = '';
|
10636 |
$slug1 = 'wppa_iptc_label_'.$name;
|
10637 |
$slug2 = 'wppa_iptc_status_'.$name;
|
10638 |
+
$html1 = wppa_edit($slug1, htmlentities( $label['description'] ) );
|
10639 |
$options = array(__('Display', 'wp-photo-album-plus'), __('Hide', 'wp-photo-album-plus'), __('Optional', 'wp-photo-album-plus'));
|
10640 |
$values = array('display', 'hide', 'option');
|
10641 |
+
$html2 = wppa_select_e($slug2, htmlentities( $label['status'] ), $options, $values);
|
10642 |
$html = array($html1, $html2);
|
10643 |
$clas = '';
|
10644 |
$tags = 'meta';
|
10698 |
if ( is_array( $labels ) ) {
|
10699 |
$i = '1';
|
10700 |
foreach ( $labels as $label ) {
|
10701 |
+
$name = htmlentities( $label['tag'] );
|
10702 |
|
10703 |
$desc = '';
|
10704 |
foreach ( $wppa_supported_camara_brands as $brand ) {
|
10712 |
$slug1 = 'wppa_exif_label_'.$name;
|
10713 |
$slug2 = 'wppa_exif_status_'.$name;
|
10714 |
|
10715 |
+
$html1 = wppa_edit( $slug1, htmlentities( $label['description'] ) );
|
10716 |
foreach ( $wppa_supported_camara_brands as $brand ) {
|
10717 |
$lbl = wppa_exif_tagname( $label['tag'], $brand, 'brandonly' );
|
10718 |
if ( $lbl ) {
|
10722 |
|
10723 |
$options = array(__('Display', 'wp-photo-album-plus'), __('Hide', 'wp-photo-album-plus'), __('Optional', 'wp-photo-album-plus'));
|
10724 |
$values = array('display', 'hide', 'option');
|
10725 |
+
$html2 = wppa_select_e($slug2, htmlentities( $label['status'] ), $options, $values);
|
10726 |
$html = array($html1, $html2);
|
10727 |
$clas = '';
|
10728 |
$tags = 'meta';
|
11133 |
$result .= '</tr>';
|
11134 |
|
11135 |
if ( $help ) {
|
11136 |
+
$result .= '
|
11137 |
+
<tr
|
11138 |
+
id="' . esc_attr( $wppa_table . $wppa_subtable . $num . '-help' ) . '"
|
11139 |
+
class="wppa-setting-help wppa-' . $wppa_table . '-' . $wppa_subtable . '-help "
|
11140 |
+
style="display:none;"
|
11141 |
+
>
|
11142 |
+
<td></td>
|
11143 |
+
<td></td>
|
11144 |
+
<td
|
11145 |
+
colspan="' . esc_attr( $wppa_totcols - 2 ) . '"
|
11146 |
+
style="color:#000077;"
|
11147 |
+
>
|
11148 |
+
<small>
|
11149 |
+
<i>' .
|
11150 |
+
stripslashes( str_replace( '\n', ' ', $hlp ) ) . '
|
11151 |
+
</i>
|
11152 |
+
</small>
|
11153 |
+
</td>
|
11154 |
+
</tr>';
|
11155 |
}
|
11156 |
|
11157 |
echo $result;
|
wppa-setup.php
CHANGED
@@ -588,6 +588,10 @@ global $silent;
|
|
588 |
update_option( 'wppa_photo_admin_pagesize', '20' );
|
589 |
}
|
590 |
}
|
|
|
|
|
|
|
|
|
591 |
}
|
592 |
|
593 |
// Set Defaults
|
@@ -1301,7 +1305,7 @@ cursorborder:'2px solid transparent',";
|
|
1301 |
'wppa_comments_desc' => 'no',
|
1302 |
'wppa_comment_moderation' => 'logout',
|
1303 |
'wppa_comment_email_required' => 'required',
|
1304 |
-
'wppa_comment_notify' => '
|
1305 |
'wppa_com_notify_previous' => 'no',
|
1306 |
'wppa_com_notify_approved' => 'no',
|
1307 |
'wppa_com_notify_approved_text' => '',
|
@@ -1525,7 +1529,7 @@ cursorborder:'2px solid transparent',";
|
|
1525 |
'wppa_fe_alert' => 'all',
|
1526 |
'wppa_fe_upload_max_albums' => '500', // VII-B13
|
1527 |
|
1528 |
-
'wppa_fe_create_ntfy' => '', // VII-B1.3
|
1529 |
|
1530 |
'wppa_editor_upload_limit_count' => '0',
|
1531 |
'wppa_editor_upload_limit_time' => '0',
|
588 |
update_option( 'wppa_photo_admin_pagesize', '20' );
|
589 |
}
|
590 |
}
|
591 |
+
|
592 |
+
if ( $old_rev <= '7000' ) {
|
593 |
+
update_option( 'wppa_comment_notify', 'no' );
|
594 |
+
}
|
595 |
}
|
596 |
|
597 |
// Set Defaults
|
1305 |
'wppa_comments_desc' => 'no',
|
1306 |
'wppa_comment_moderation' => 'logout',
|
1307 |
'wppa_comment_email_required' => 'required',
|
1308 |
+
'wppa_comment_notify' => 'no',
|
1309 |
'wppa_com_notify_previous' => 'no',
|
1310 |
'wppa_com_notify_approved' => 'no',
|
1311 |
'wppa_com_notify_approved_text' => '',
|
1529 |
'wppa_fe_alert' => 'all',
|
1530 |
'wppa_fe_upload_max_albums' => '500', // VII-B13
|
1531 |
|
1532 |
+
// 'wppa_fe_create_ntfy' => '', // VII-B1.3
|
1533 |
|
1534 |
'wppa_editor_upload_limit_count' => '0',
|
1535 |
'wppa_editor_upload_limit_time' => '0',
|
wppa-tagcloud-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
-
* Version
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -93,7 +93,7 @@ class TagcloudPhotos extends WP_Widget {
|
|
93 |
'<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
94 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
95 |
if ( in_array( $tag, $stags ) ) $sel = ' selected="selected"'; else $sel = '';
|
96 |
-
$body .= '<option value="' . $tag . '"' . $sel . ' >' . $tag . '</option>';
|
97 |
}
|
98 |
echo
|
99 |
wppa_widget_selection_frame( $this, 'tags', $body, __( 'Select multiple tags or --- all ---', 'wp-photo-album-plus' ), 'multi' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
+
* Version 7.0.00
|
7 |
*
|
8 |
*/
|
9 |
|
93 |
'<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
94 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
95 |
if ( in_array( $tag, $stags ) ) $sel = ' selected="selected"'; else $sel = '';
|
96 |
+
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlentities( $tag ) . '</option>';
|
97 |
}
|
98 |
echo
|
99 |
wppa_widget_selection_frame( $this, 'tags', $body, __( 'Select multiple tags or --- all ---', 'wp-photo-album-plus' ), 'multi' );
|
wppa-thumbnail-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail photos
|
6 |
-
* Version
|
7 |
*/
|
8 |
|
9 |
class ThumbnailWidget extends WP_Widget {
|
@@ -137,8 +137,8 @@ class ThumbnailWidget extends WP_Widget {
|
|
137 |
|
138 |
echo $before_title;
|
139 |
|
140 |
-
if (!empty($widget_link)) {
|
141 |
-
echo "\n".'<a href="'
|
142 |
}
|
143 |
else {
|
144 |
echo $widget_title;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail photos
|
6 |
+
* Version 7.0.00
|
7 |
*/
|
8 |
|
9 |
class ThumbnailWidget extends WP_Widget {
|
137 |
|
138 |
echo $before_title;
|
139 |
|
140 |
+
if ( ! empty($widget_link)) {
|
141 |
+
echo "\n".'<a href="' . esc_url( $widget_link ) . '" title="' . esc_attr( $linktitle ) . '" >' . $widget_title . '</a>';
|
142 |
}
|
143 |
else {
|
144 |
echo $widget_title;
|
wppa-tinymce-common.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -275,7 +275,7 @@ global $wpdb;
|
|
275 |
jQuery("#message").html( \'<span style="font-size: 10px;" >\'+resparr[0]+\'</span>\' );
|
276 |
}
|
277 |
else {
|
278 |
-
jQuery( "#wppaphoto-myphoto" ).html( resparr[2] );
|
279 |
}
|
280 |
wppaPhotoEvaluate();
|
281 |
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 7.0.00
|
6 |
*
|
7 |
*/
|
8 |
|
275 |
jQuery("#message").html( \'<span style="font-size: 10px;" >\'+resparr[0]+\'</span>\' );
|
276 |
}
|
277 |
else {
|
278 |
+
jQuery( "#wppaphoto-myphoto" ).html( wppaEntityDecode( resparr[2] ) );
|
279 |
}
|
280 |
wppaPhotoEvaluate();
|
281 |
|
wppa-upldr-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
-
* Version
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -269,7 +269,7 @@ class UpldrWidget extends WP_Widget {
|
|
269 |
foreach ( $albums as $album ) {
|
270 |
$s = in_array( $album['id'], $selalbs );
|
271 |
$sel = $s ? 'selected="selected" ' : '';
|
272 |
-
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="' . $album['id'] . '" '.$sel.'>'.stripslashes( __( $album['name'] , 'wp-photo-album-plus') ) . ' (' . $album['id'] . ')</option>';
|
273 |
}
|
274 |
?>
|
275 |
</select>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
+
* Version 7.0.00
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
269 |
foreach ( $albums as $album ) {
|
270 |
$s = in_array( $album['id'], $selalbs );
|
271 |
$sel = $s ? 'selected="selected" ' : '';
|
272 |
+
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="' . esc_attr( $album['id'] ) . '" '.$sel.'>'.stripslashes( __( $album['name'] , 'wp-photo-album-plus') ) . ' (' . $album['id'] . ')</option>';
|
273 |
}
|
274 |
?>
|
275 |
</select>
|
wppa-upload.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload pages and functions
|
6 |
-
* Version
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -638,7 +638,12 @@ function wppa_backend_upload_mail( $id, $alb, $name ) {
|
|
638 |
$cont['1'] = __( 'Details:' , 'wp-photo-album-plus');
|
639 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo' , 'wp-photo-album-plus').'</a>';
|
640 |
}
|
641 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
642 |
}
|
643 |
}
|
644 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload pages and functions
|
6 |
+
* Version 7.0.00
|
7 |
*
|
8 |
*/
|
9 |
|
638 |
$cont['1'] = __( 'Details:' , 'wp-photo-album-plus');
|
639 |
$cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo' , 'wp-photo-album-plus').'</a>';
|
640 |
}
|
641 |
+
wppa_send_mail( array( 'to' => $to,
|
642 |
+
'subj' => $subj,
|
643 |
+
'cont' => $cont,
|
644 |
+
'photo' => $id,
|
645 |
+
'listtype' => 'uploadbackend',
|
646 |
+
));
|
647 |
}
|
648 |
}
|
649 |
|
wppa-utils.php
CHANGED
@@ -858,7 +858,11 @@ global $wpdb;
|
|
858 |
$subj = __('Notification of inappropriate image', 'wp-photo-album-plus');
|
859 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
860 |
$cont['1'] = '<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo', 'wp-photo-album-plus').'</a>';
|
861 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
862 |
}
|
863 |
}
|
864 |
|
@@ -870,7 +874,11 @@ global $wpdb;
|
|
870 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
871 |
$cont['0'] .= "\n".__('The status has been changed to \'pending\'.', 'wp-photo-album-plus');
|
872 |
$cont['1'] = '<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo', 'wp-photo-album-plus').'</a>';
|
873 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
874 |
}
|
875 |
}
|
876 |
|
@@ -881,7 +889,11 @@ global $wpdb;
|
|
881 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
882 |
$cont['0'] .= "\n".__('It has been deleted.', 'wp-photo-album-plus');
|
883 |
$cont['1'] = '';//<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo').'</a>';
|
884 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
885 |
wppa_delete_photo($photo);
|
886 |
}
|
887 |
}
|
@@ -958,8 +970,8 @@ global $wpdb;
|
|
958 |
|
959 |
// Failed
|
960 |
if ( ! wppa_is_cron() ) {
|
961 |
-
echo 'Mail sending Failed';
|
962 |
-
echo 'Subj='.$subject.', content='.$content;
|
963 |
wppa_process_failed_mail( $user->user_email,
|
964 |
$subject,
|
965 |
$content,
|
@@ -986,100 +998,17 @@ global $wpdb;
|
|
986 |
|
987 |
// Send mail
|
988 |
if ( wppa_is_user_in_mailinglist( $owner, 'commentapproved' ) ) {
|
989 |
-
wppa_send_mail(
|
|
|
|
|
|
|
|
|
|
|
990 |
}
|
991 |
|
992 |
}
|
993 |
|
994 |
|
995 |
-
function wppa_send_mail( $to, $subj, $cont, $photo = '0', $email = '' ) {
|
996 |
-
|
997 |
-
$message_part_1 = '';
|
998 |
-
$message_part_2 = '';
|
999 |
-
$message_part_3 = '';
|
1000 |
-
|
1001 |
-
$site = home_url();
|
1002 |
-
$site = str_replace( 'https://www.', '', $site );
|
1003 |
-
$site = str_replace( 'http://www.', '', $site );
|
1004 |
-
$site = str_replace( 'https://', '', $site );
|
1005 |
-
$site = str_replace( 'http://', '', $site );
|
1006 |
-
$spos = strpos( $site, '/' );
|
1007 |
-
if ( $spos > '2' ) {
|
1008 |
-
$site = substr( $site, 0, $spos );
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
$headers = array( 'From: noreply@' . $site,
|
1012 |
-
'Content-Type: text/html; charset=UTF-8'
|
1013 |
-
);
|
1014 |
-
|
1015 |
-
$message_part_1 .=
|
1016 |
-
'<html>' .
|
1017 |
-
'<head>' .
|
1018 |
-
'<title>'.$subj.'</title>' .
|
1019 |
-
'</head>' .
|
1020 |
-
'<body>' .
|
1021 |
-
'<h3>'.$subj.'</h3>' .
|
1022 |
-
( $photo ? '<p><img src="'.wppa_get_thumb_url($photo).'" '.wppa_get_imgalt($photo).'/></p>' : '' );
|
1023 |
-
if ( is_array($cont) ) {
|
1024 |
-
foreach ( $cont as $c ) if ( $c ) {
|
1025 |
-
$message_part_1 .= '<p>'.$c.'</p>';
|
1026 |
-
}
|
1027 |
-
}
|
1028 |
-
else {
|
1029 |
-
$message_part_1 .= '<p>'.$cont.'</p>';
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
if ( $email != 'void' ) {
|
1033 |
-
if ( is_user_logged_in() ) {
|
1034 |
-
global $current_user;
|
1035 |
-
$current_user = wp_get_current_user();
|
1036 |
-
$e = $current_user->user_email;
|
1037 |
-
$eml = sprintf(__('The visitors email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $e, $e);
|
1038 |
-
$message_part_2 .= '<p>'.$eml.'</p>';
|
1039 |
-
}
|
1040 |
-
elseif ( $email ) {
|
1041 |
-
$e = $email;
|
1042 |
-
$eml = sprintf(__('The visitor says his email address is: <a href="mailto:%s">%s</a>', 'wp-photo-album-plus'), $e, $e);
|
1043 |
-
$message_part_2 .= '<p>'.$eml.'</p>';
|
1044 |
-
}
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
$message_part_3 .=
|
1048 |
-
'<p>' .
|
1049 |
-
'<small>' .
|
1050 |
-
sprintf(__('This message is automatically generated at %s. It is useless to respond to it.', 'wp-photo-album-plus'), '<a href="'.home_url().'" >'.home_url().'</a>') .
|
1051 |
-
'</small>' .
|
1052 |
-
'</p>' .
|
1053 |
-
'</body>' .
|
1054 |
-
'</html>';
|
1055 |
-
|
1056 |
-
$subject = '['.str_replace(''', '', get_bloginfo('name') ).'] '.$subj;
|
1057 |
-
|
1058 |
-
// Try to send it with extra headers and with html
|
1059 |
-
$iret = wp_mail( $to,
|
1060 |
-
$subject,
|
1061 |
-
$message_part_1 . $message_part_2 . $message_part_3,
|
1062 |
-
$headers,
|
1063 |
-
'' );
|
1064 |
-
if ( $iret ) {
|
1065 |
-
wppa_log( 'eml', 'Mail send to: ' . $to . ', subject: ' . $subject . ', photo: ' . ( $photo ? $photo : 'not supplied.' ) );
|
1066 |
-
return;
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $message_part_1 . $message_part_2 . $message_part_3 );
|
1070 |
-
|
1071 |
-
// Failed
|
1072 |
-
if ( ! wppa_is_cron() ) {
|
1073 |
-
echo 'Mail sending Failed';
|
1074 |
-
wppa_process_failed_mail( $to,
|
1075 |
-
$subject,
|
1076 |
-
$message_part_1 . $message_part_2 . $message_part_3,
|
1077 |
-
$headers,
|
1078 |
-
'' );
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
}
|
1082 |
-
|
1083 |
function wppa_get_imgalt( $id, $lb = false ) {
|
1084 |
|
1085 |
// Get photo data
|
@@ -3716,17 +3645,6 @@ function wppa_chmod( $fso ) {
|
|
3716 |
wppa_log( 'Fso', sprintf( 'Successfully set filepermissions on %s from %o to 0755', $fso, $perms ) );
|
3717 |
}
|
3718 |
}
|
3719 |
-
|
3720 |
-
// Verify existance of index.php
|
3721 |
-
if ( ! is_file( $fso . '/index.php' ) ) {
|
3722 |
-
@ wppa_copy( WPPA_PATH . '/index.php', $fso . '/index.php' );
|
3723 |
-
if ( is_file( $fso . '/index.php' ) ) {
|
3724 |
-
wppa_log( 'fso', 'Added: ' . $fso . '/index.php' );
|
3725 |
-
}
|
3726 |
-
else {
|
3727 |
-
wppa_log( 'fso', 'Could not add ' . $fso . '/index.php' );
|
3728 |
-
}
|
3729 |
-
}
|
3730 |
}
|
3731 |
|
3732 |
if ( is_file( $fso ) ) {
|
858 |
$subj = __('Notification of inappropriate image', 'wp-photo-album-plus');
|
859 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
860 |
$cont['1'] = '<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo', 'wp-photo-album-plus').'</a>';
|
861 |
+
wppa_send_mail( array( 'to' => $to,
|
862 |
+
'subj' => $subj,
|
863 |
+
'cont' => $cont,
|
864 |
+
'photo' => $photo,
|
865 |
+
));
|
866 |
}
|
867 |
}
|
868 |
|
874 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
875 |
$cont['0'] .= "\n".__('The status has been changed to \'pending\'.', 'wp-photo-album-plus');
|
876 |
$cont['1'] = '<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo', 'wp-photo-album-plus').'</a>';
|
877 |
+
wppa_send_mail( array( 'to' => $to,
|
878 |
+
'subj' => $subj,
|
879 |
+
'cont' => $cont,
|
880 |
+
'photo' => $photo,
|
881 |
+
));
|
882 |
}
|
883 |
}
|
884 |
|
889 |
$cont['0'] = sprintf(__('Photo %s has been marked as inappropriate by %s different visitors.', 'wp-photo-album-plus'), $photo, $count);
|
890 |
$cont['0'] .= "\n".__('It has been deleted.', 'wp-photo-album-plus');
|
891 |
$cont['1'] = '';//<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$photo.'" >'.__('Manage photo').'</a>';
|
892 |
+
wppa_send_mail( array( 'to' => $to,
|
893 |
+
'subj' => $subj,
|
894 |
+
'cont' => $cont,
|
895 |
+
'photo' => $photo,
|
896 |
+
));
|
897 |
wppa_delete_photo($photo);
|
898 |
}
|
899 |
}
|
970 |
|
971 |
// Failed
|
972 |
if ( ! wppa_is_cron() ) {
|
973 |
+
// echo 'Mail sending Failed';
|
974 |
+
// echo 'Subj='.$subject.', content='.$content;
|
975 |
wppa_process_failed_mail( $user->user_email,
|
976 |
$subject,
|
977 |
$content,
|
998 |
|
999 |
// Send mail
|
1000 |
if ( wppa_is_user_in_mailinglist( $owner, 'commentapproved' ) ) {
|
1001 |
+
wppa_send_mail( array( 'to' => $user->user_email,
|
1002 |
+
'subj' => __( 'Approved comment on photo', 'wp-photo-album-plus' ),
|
1003 |
+
'cont' => $content,
|
1004 |
+
'photo' => $com['photo'],
|
1005 |
+
'email' => 'void'
|
1006 |
+
));
|
1007 |
}
|
1008 |
|
1009 |
}
|
1010 |
|
1011 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1012 |
function wppa_get_imgalt( $id, $lb = false ) {
|
1013 |
|
1014 |
// Get photo data
|
3645 |
wppa_log( 'Fso', sprintf( 'Successfully set filepermissions on %s from %o to 0755', $fso, $perms ) );
|
3646 |
}
|
3647 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3648 |
}
|
3649 |
|
3650 |
if ( is_file( $fso ) ) {
|
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.0.00.
|
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,7 +23,7 @@ global $wp_version;
|
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
global $wppa_revno; $wppa_revno = '7000'; // WPPA db version
|
26 |
-
global $wppa_api_version; $wppa_api_version = '7-0-00-
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime( true );
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.0.00.009
|
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 |
|
24 |
/* WPPA GLOBALS */
|
25 |
global $wppa_revno; $wppa_revno = '7000'; // WPPA db version
|
26 |
+
global $wppa_api_version; $wppa_api_version = '7-0-00-009'; // WPPA software version
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime( true );
|