Version Description
= 7.7.07 =
- This version addresses various minor bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.0.00.015 |
Comparing to | |
See all releases |
Code changes from version 8.0.00.012 to 8.0.00.015
- changelog.txt +2 -1
- js/wppa-all.js +3 -3
- js/wppa-lightbox.js +4 -8
- js/wppa-lightbox.min.js +1 -1
- js/wppa-spheric.js +9 -11
- js/wppa-spheric.min.js +1 -1
- js/wppa-zoom.js +2 -2
- js/wppa-zoom.min.js +1 -1
- wppa-admin.php +2 -2
- wppa-ajax-front.php +30 -0
- wppa-ajax.php +3 -5
- wppa-boxes-html.php +8 -12
- wppa-common-functions.php +1 -5
- wppa-defaults.php +2 -6
- wppa-functions.php +5 -9
- wppa-gp-widget.php +161 -0
- wppa-non-admin.php +3 -3
- wppa-photo-admin-autosave.php +5 -5
- wppa-picture.php +8 -8
- wppa-potd-widget.php +1 -1
- wppa-settings-autosave.php +140 -158
- wppa-setup.php +7 -1
- wppa-thumbnails.php +24 -24
- wppa-users.php +2 -28
- wppa-utils.php +19 -1
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -4,7 +4,8 @@ WP Photo Album Plus Changelog
|
|
4 |
|
5 |
* Restructured and greatly simplified settings page. Removed obsolete and redundant settings. Made the layout more friendly.
|
6 |
* Photo of the day admin page is now in the Settings page under Photos.
|
7 |
-
*
|
|
|
8 |
On the settings page you will only see the custom css items that are not empty. The help text encourages you to move the content to the wp customizer.
|
9 |
* Ajax method changed. No longer possible to choose between admin or non admin ajax.
|
10 |
Ajax is always activated, because there can no longer be conflicts due to inaccessibility of both ajax files from the frontend by http request.
|
4 |
|
5 |
* Restructured and greatly simplified settings page. Removed obsolete and redundant settings. Made the layout more friendly.
|
6 |
* Photo of the day admin page is now in the Settings page under Photos.
|
7 |
+
* To create albums or upload photos can only be done by logged in users, you can no longer configure these features for loggedout visitors.
|
8 |
+
* Custom css settings are being fased out. One is encouraged to move that to the wp customizer.
|
9 |
On the settings page you will only see the custom css items that are not empty. The help text encourages you to move the content to the wp customizer.
|
10 |
* Ajax method changed. No longer possible to choose between admin or non admin ajax.
|
11 |
Ajax is always activated, because there can no longer be conflicts due to inaccessibility of both ajax files from the frontend by http request.
|
js/wppa-all.js
CHANGED
@@ -7,12 +7,12 @@ var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,
|
|
7 |
// wppa-ajax-front
|
8 |
var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),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:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),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-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),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-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
|
9 |
// wppa-lightbox
|
10 |
-
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.012",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
|
11 |
// wppa-popup
|
12 |
var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
|
13 |
// wppa-touch
|
14 |
var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
|
15 |
// wppa-zoom
|
16 |
-
var wppaJsZoomVersion="8.0.00.
|
17 |
// wppa-spheric
|
18 |
-
var wppaJsSphericVersion="8.0.00.
|
7 |
// wppa-ajax-front
|
8 |
var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),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:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),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-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),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-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
|
9 |
// wppa-lightbox
|
10 |
+
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.015",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama&&(wppaSavedContainerHeight=wppaSavedContainerWidth=100),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
|
11 |
// wppa-popup
|
12 |
var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
|
13 |
// wppa-touch
|
14 |
var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
|
15 |
// wppa-zoom
|
16 |
+
var wppaJsZoomVersion="8.0.00.015";function wppaDoZoomPan(n,a){var p=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&m(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){m(a)},250),p("#wppa-ovl-pan-container").show())}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),m(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),m(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),m(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),m(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=a.touches?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=t.touches?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
|
17 |
// wppa-spheric
|
18 |
+
var wppaJsSphericVersion="8.0.00.015";function wppaDoSphericPan(t,e){var s=jQuery;e&&(wppaSphericData[t]=e);var w=f(t,w);if(!w.initialized&&!w.abort&&(!w.isLightbox||wppaOvlOpen)){if(!w.isLightbox&&!wppaIsElementInViewport(s("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(e){r(t)}),w.right.on("touchend",function(e){v(t)}),w.left.on("touchstart",function(e){u(t)}),w.left.on("touchend",function(e){v(t)}),w.up.on("touchstart",function(e){c(t)}),w.up.on("touchend",function(e){v(t)}),w.down.on("touchstart",function(e){m(t)}),w.down.on("touchend",function(e){v(t)}),w.zoomin.on("touchstart",function(e){p(t)}),w.zoomin.on("touchend",function(e){v(t)}),w.zoomout.on("touchstart",function(e){i(t)}),w.zoomout.on("touchend",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){o(t)})),w.right.on("mousedown",function(e){r(t)}),w.right.on("mouseup",function(e){v(t)}),w.left.on("mousedown",function(e){u(t)}),w.left.on("mouseup",function(e){v(t)}),w.up.on("mousedown",function(e){c(t)}),w.up.on("mouseup",function(e){v(t)}),w.down.on("mousedown",function(e){m(t)}),w.down.on("mouseup",function(e){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(e){p(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(e){v(t)}),w.zoomout.on("mousedown",function(e){i(t)}),w.zoomout.on("mouseup",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){o(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),w=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*w.zoomsensitivity/(wppaIsChrome?60:6)}),l(n),setTimeout(function(){f(n,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(e){var n;w=f(n=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+n+" canvas").hide(),s("#wppa-pctl-div-"+n).hide()}),s("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,w),s(window).on("wpparesizeend",function(e){h(t)}),wppaProtect(),s(document).on("tabbychange",function(e){var n;n=t,w.wppaRenderer.state.reset(),w=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),h(t),w.intervalTimer=setInterval(function(){h(t)},1e3)}function l(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(s("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){l(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){l(e)},25)),f(e,n))}}function h(e,n){wppaConsoleLog("Resize spheric mocc "+e+" called by "+h.caller,"force");var t=!wppaIsFs();if(w=f(e)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").css("display",""),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-pan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-pan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(e,w),w.timer=setTimeout(function(){l(e)},250)}}function n(e,n){n.preventDefault(),n.stopPropagation(),w=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:w.lon,sLat:w.lat}),l(e)}function a(e,n){n.preventDefault(),n.stopPropagation(),(w=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(w.sX-n.touches[0].clientX)+w.sLon,lat:.1*(n.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(e,{lon:.1*(w.sX-n.clientX)+w.sLon,lat:.1*(n.clientY-w.sY)+w.sLat,pause:!1}),l(e))}function o(e){f(e,{manCtrl:!1})}function p(e){w=f(e),f(e,{dFov:-.4*w.mFakt,butDown:!0}),l(e)}function i(e){w=f(e),f(e,{dFov:.4*w.mFakt,butDown:!0}),l(e)}function r(e){w=f(e),f(e,{dX:.2*w.mFakt,butDown:!0}),l(e)}function u(e){w=f(e),f(e,{dX:-.2*w.mFakt,butDown:!0}),l(e)}function c(e){w=f(e),f(e,{dY:.2*w.mFakt,butDown:!0}),l(e)}function m(e){w=f(e),f(e,{dY:-.2*w.mFakt,butDown:!0}),l(e)}function v(e){w=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
|
js/wppa-lightbox.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
//
|
7 |
-
var wppaJsLightboxVersion = '8.0.00.
|
8 |
|
9 |
// Global inits
|
10 |
var wppaIsVideo = false;
|
@@ -103,6 +103,8 @@ function wppaOvlShow( arg ) {
|
|
103 |
// Panorama requires image container top=0 left=0
|
104 |
// Non panorama: 50%
|
105 |
if ( wppaOvlActivePanorama > 0 ) {
|
|
|
|
|
106 |
}
|
107 |
|
108 |
// Make sure background is present
|
@@ -120,12 +122,6 @@ function wppaOvlShow( arg ) {
|
|
120 |
wppaKbHandlerInstalled = true;
|
121 |
}
|
122 |
|
123 |
-
// Adjust background size
|
124 |
-
// $( '#wppa-overlay-bg' ).css({
|
125 |
-
// width:window.innerWidth,
|
126 |
-
// height:window.innerHeight,
|
127 |
-
// });
|
128 |
-
|
129 |
// Trigger lightbox open event
|
130 |
$(window).trigger( 'wppalightboxstart' );
|
131 |
}
|
@@ -1293,7 +1289,7 @@ function wppaInitOverlay() {
|
|
1293 |
}
|
1294 |
|
1295 |
// Install orientationchange handler
|
1296 |
-
window.addEventListener( 'orientationchange', wppaOvlShowSame);
|
1297 |
|
1298 |
// Install fullscreen navigation bar positioning
|
1299 |
$(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
//
|
7 |
+
var wppaJsLightboxVersion = '8.0.00.015';
|
8 |
|
9 |
// Global inits
|
10 |
var wppaIsVideo = false;
|
103 |
// Panorama requires image container top=0 left=0
|
104 |
// Non panorama: 50%
|
105 |
if ( wppaOvlActivePanorama > 0 ) {
|
106 |
+
wppaSavedContainerWidth = 100; // reset
|
107 |
+
wppaSavedContainerHeight = 100;
|
108 |
}
|
109 |
|
110 |
// Make sure background is present
|
122 |
wppaKbHandlerInstalled = true;
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
// Trigger lightbox open event
|
126 |
$(window).trigger( 'wppalightboxstart' );
|
127 |
}
|
1289 |
}
|
1290 |
|
1291 |
// Install orientationchange handler
|
1292 |
+
// window.addEventListener( 'orientationchange', wppaOvlShowSame);
|
1293 |
|
1294 |
// Install fullscreen navigation bar positioning
|
1295 |
$(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
|
js/wppa-lightbox.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.012",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
|
1 |
+
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.015",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama&&(wppaSavedContainerHeight=wppaSavedContainerWidth=100),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
|
js/wppa-spheric.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
-
var wppaJsSphericVersion = '8.0.00.
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoSphericPan(mocc, xdata) {
|
@@ -17,7 +17,6 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
17 |
|
18 |
// If in lightbox but lightbox not open, quitImage
|
19 |
if ( data.isLightbox && ! wppaOvlOpen ) {
|
20 |
-
// wppaConsoleLog('lightbox not open, quitting spheric mooc 0');
|
21 |
return;
|
22 |
}
|
23 |
|
@@ -25,7 +24,6 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
25 |
if ( ! data.isLightbox && ! wppaIsElementInViewport( $("#wppa-pan-div-"+mocc) ) ) {
|
26 |
|
27 |
setTimeout( function() {wppaDoSphericPan(mocc)}, 1000 );
|
28 |
-
// wppaConsoleLog('(setTimeout) Spheric not in viewport mocc='+mocc);
|
29 |
update(mocc,{vtime:timnow()});
|
30 |
return;
|
31 |
}
|
@@ -89,7 +87,6 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
89 |
data.wppaSphereMesh = new THREE.Mesh(data.wppaSphere, data.wppaSphereMaterial);
|
90 |
data.wppaScene.add(data.wppaSphereMesh);
|
91 |
|
92 |
-
|
93 |
data.right.on("touchstart", function(e){rDown(mocc,e)});
|
94 |
data.right.on("touchend", function(e){bUp(mocc,e)});
|
95 |
data.left.on("touchstart", function(e){lDown(mocc,e)});
|
@@ -142,13 +139,13 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
142 |
update(mocc,data);
|
143 |
|
144 |
// Install Resize handler
|
145 |
-
if ( data.isLightbox ) {
|
146 |
-
$(window).off("wpparesizeend",wppaOvlShowSame);
|
147 |
-
$(window).on("wpparesizeend",wppaOvlShowSame);
|
148 |
-
}
|
149 |
-
else {
|
150 |
$(window).on("wpparesizeend",function(e){resize(mocc,e)});
|
151 |
-
}
|
152 |
|
153 |
// Optionally disable rightclick
|
154 |
wppaProtect();
|
@@ -164,6 +161,7 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
164 |
|
165 |
function render(mocc){
|
166 |
|
|
|
167 |
var data = update(mocc);
|
168 |
var inViewport = wppaIsElementInViewport($("#wppa-pan-div-"+mocc+" canvas"));
|
169 |
|
@@ -233,7 +231,7 @@ function wppaDoSphericPan(mocc, xdata) {
|
|
233 |
|
234 |
function resize(mocc,e) {
|
235 |
|
236 |
-
|
237 |
var modeIsNormal = ! wppaIsFs();
|
238 |
|
239 |
var newWidth;
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
+
var wppaJsSphericVersion = '8.0.00.015';
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoSphericPan(mocc, xdata) {
|
17 |
|
18 |
// If in lightbox but lightbox not open, quitImage
|
19 |
if ( data.isLightbox && ! wppaOvlOpen ) {
|
|
|
20 |
return;
|
21 |
}
|
22 |
|
24 |
if ( ! data.isLightbox && ! wppaIsElementInViewport( $("#wppa-pan-div-"+mocc) ) ) {
|
25 |
|
26 |
setTimeout( function() {wppaDoSphericPan(mocc)}, 1000 );
|
|
|
27 |
update(mocc,{vtime:timnow()});
|
28 |
return;
|
29 |
}
|
87 |
data.wppaSphereMesh = new THREE.Mesh(data.wppaSphere, data.wppaSphereMaterial);
|
88 |
data.wppaScene.add(data.wppaSphereMesh);
|
89 |
|
|
|
90 |
data.right.on("touchstart", function(e){rDown(mocc,e)});
|
91 |
data.right.on("touchend", function(e){bUp(mocc,e)});
|
92 |
data.left.on("touchstart", function(e){lDown(mocc,e)});
|
139 |
update(mocc,data);
|
140 |
|
141 |
// Install Resize handler
|
142 |
+
// if ( data.isLightbox ) {
|
143 |
+
// $(window).off("wpparesizeend",wppaOvlShowSame);
|
144 |
+
// $(window).on("wpparesizeend",wppaOvlShowSame);
|
145 |
+
// }
|
146 |
+
// else {
|
147 |
$(window).on("wpparesizeend",function(e){resize(mocc,e)});
|
148 |
+
// }
|
149 |
|
150 |
// Optionally disable rightclick
|
151 |
wppaProtect();
|
161 |
|
162 |
function render(mocc){
|
163 |
|
164 |
+
wppaConsoleLog("spheric render called","force");
|
165 |
var data = update(mocc);
|
166 |
var inViewport = wppaIsElementInViewport($("#wppa-pan-div-"+mocc+" canvas"));
|
167 |
|
231 |
|
232 |
function resize(mocc,e) {
|
233 |
|
234 |
+
wppaConsoleLog("Resize spheric mocc "+mocc+" called by "+resize.caller,"force");
|
235 |
var modeIsNormal = ! wppaIsFs();
|
236 |
|
237 |
var newWidth;
|
js/wppa-spheric.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsSphericVersion="8.0.00.
|
1 |
+
var wppaJsSphericVersion="8.0.00.015";function wppaDoSphericPan(t,e){var s=jQuery;e&&(wppaSphericData[t]=e);var w=f(t,w);if(!w.initialized&&!w.abort&&(!w.isLightbox||wppaOvlOpen)){if(!w.isLightbox&&!wppaIsElementInViewport(s("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(e){r(t)}),w.right.on("touchend",function(e){v(t)}),w.left.on("touchstart",function(e){u(t)}),w.left.on("touchend",function(e){v(t)}),w.up.on("touchstart",function(e){c(t)}),w.up.on("touchend",function(e){v(t)}),w.down.on("touchstart",function(e){m(t)}),w.down.on("touchend",function(e){v(t)}),w.zoomin.on("touchstart",function(e){p(t)}),w.zoomin.on("touchend",function(e){v(t)}),w.zoomout.on("touchstart",function(e){i(t)}),w.zoomout.on("touchend",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){o(t)})),w.right.on("mousedown",function(e){r(t)}),w.right.on("mouseup",function(e){v(t)}),w.left.on("mousedown",function(e){u(t)}),w.left.on("mouseup",function(e){v(t)}),w.up.on("mousedown",function(e){c(t)}),w.up.on("mouseup",function(e){v(t)}),w.down.on("mousedown",function(e){m(t)}),w.down.on("mouseup",function(e){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(e){p(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(e){v(t)}),w.zoomout.on("mousedown",function(e){i(t)}),w.zoomout.on("mouseup",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){o(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),w=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*w.zoomsensitivity/(wppaIsChrome?60:6)}),l(n),setTimeout(function(){f(n,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(e){var n;w=f(n=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+n+" canvas").hide(),s("#wppa-pctl-div-"+n).hide()}),s("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,w),s(window).on("wpparesizeend",function(e){h(t)}),wppaProtect(),s(document).on("tabbychange",function(e){var n;n=t,w.wppaRenderer.state.reset(),w=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),h(t),w.intervalTimer=setInterval(function(){h(t)},1e3)}function l(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(s("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){l(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){l(e)},25)),f(e,n))}}function h(e,n){wppaConsoleLog("Resize spheric mocc "+e+" called by "+h.caller,"force");var t=!wppaIsFs();if(w=f(e)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").css("display",""),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-pan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-pan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(e,w),w.timer=setTimeout(function(){l(e)},250)}}function n(e,n){n.preventDefault(),n.stopPropagation(),w=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:w.lon,sLat:w.lat}),l(e)}function a(e,n){n.preventDefault(),n.stopPropagation(),(w=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(w.sX-n.touches[0].clientX)+w.sLon,lat:.1*(n.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(e,{lon:.1*(w.sX-n.clientX)+w.sLon,lat:.1*(n.clientY-w.sY)+w.sLat,pause:!1}),l(e))}function o(e){f(e,{manCtrl:!1})}function p(e){w=f(e),f(e,{dFov:-.4*w.mFakt,butDown:!0}),l(e)}function i(e){w=f(e),f(e,{dFov:.4*w.mFakt,butDown:!0}),l(e)}function r(e){w=f(e),f(e,{dX:.2*w.mFakt,butDown:!0}),l(e)}function u(e){w=f(e),f(e,{dX:-.2*w.mFakt,butDown:!0}),l(e)}function c(e){w=f(e),f(e,{dY:.2*w.mFakt,butDown:!0}),l(e)}function m(e){w=f(e),f(e,{dY:-.2*w.mFakt,butDown:!0}),l(e)}function v(e){w=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
|
js/wppa-zoom.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
-
var wppaJsZoomVersion = '8.0.00.
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoZoomPan(mocc, xdata) {
|
@@ -367,7 +367,7 @@ function wppaDoZoomPan(mocc, xdata) {
|
|
367 |
}
|
368 |
|
369 |
// Set css common for all 4 situations
|
370 |
-
$("#wppa-ovl-pan-container").css({top:topMarg
|
371 |
$("#wppa-overlay-pc").css({top:0,left:0});
|
372 |
|
373 |
data.canvasWidth = newWidth;
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
+
var wppaJsZoomVersion = '8.0.00.015';
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoZoomPan(mocc, xdata) {
|
367 |
}
|
368 |
|
369 |
// Set css common for all 4 situations
|
370 |
+
$("#wppa-ovl-pan-container").css({top:topMarg});//,width:newWidth});
|
371 |
$("#wppa-overlay-pc").css({top:0,left:0});
|
372 |
|
373 |
data.canvasWidth = newWidth;
|
js/wppa-zoom.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsZoomVersion="8.0.00.
|
1 |
+
var wppaJsZoomVersion="8.0.00.015";function wppaDoZoomPan(n,a){var p=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&m(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){m(a)},250),p("#wppa-ovl-pan-container").show())}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),m(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),m(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),m(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),m(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=a.touches?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=t.touches?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -142,7 +142,7 @@ global $wppa_api_version;
|
|
142 |
wppaWppaUrl = "'.WPPA_URL.'";
|
143 |
wppaIncludeUrl = "'.trim(includes_url(), '/').'";
|
144 |
wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";
|
145 |
-
wppaLazyLoad = '.(
|
146 |
wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";
|
147 |
wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";
|
148 |
wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
142 |
wppaWppaUrl = "'.WPPA_URL.'";
|
143 |
wppaIncludeUrl = "'.trim(includes_url(), '/').'";
|
144 |
wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";
|
145 |
+
wppaLazyLoad = '.( wppa_lazy() ? 'true' : 'false' ).';
|
146 |
wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";
|
147 |
wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";
|
148 |
wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";
|
wppa-ajax-front.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* wppa-ajax-front.php
|
3 |
+
*
|
4 |
+
* Supplies the functionality like wp-admin/admin-ajax.php for wppa frontend ajax requests without using wp-admin files
|
5 |
+
* version 7.3.00
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
define( 'DOING_AJAX', true );
|
9 |
+
|
10 |
+
/** Load WordPress Bootstrap */
|
11 |
+
require_once ( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
|
12 |
+
|
13 |
+
/** Allow for cross-domain requests (from the frontend). */
|
14 |
+
send_origin_headers();
|
15 |
+
|
16 |
+
// Require an action parameter
|
17 |
+
if ( empty( $_REQUEST['action'] ) )
|
18 |
+
die( '0' );
|
19 |
+
|
20 |
+
// Load the wppa admin functions
|
21 |
+
require_once 'wppa-admin.php';
|
22 |
+
|
23 |
+
@header( 'Content-Type: text/html; charset=' . wppa_get_option( 'blog_charset' ) );
|
24 |
+
@header( 'X-Robots-Tag: noindex' );
|
25 |
+
|
26 |
+
send_nosniff_header();
|
27 |
+
nocache_headers();
|
28 |
+
|
29 |
+
wppa_ajax_callback();
|
30 |
+
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 8.0.00.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1102,7 +1102,7 @@ global $wppa;
|
|
1102 |
$shortcode = stripslashes( $_REQUEST['shortcode'] );
|
1103 |
$shortcode = str_replace( '@', '#', $shortcode );
|
1104 |
$wppa['mocc']++; // = strval( intval ( $_REQUEST['moccur'] ) );
|
1105 |
-
$wppa_opt['wppa_lazy'] = '
|
1106 |
$wppa_opt['wppa_inline_css'] = 'yes';
|
1107 |
$result = do_shortcode( $shortcode );
|
1108 |
echo $result;
|
@@ -4002,9 +4002,7 @@ global $wppa;
|
|
4002 |
// May I?
|
4003 |
$imay = true;
|
4004 |
if ( ! wppa_switch( 'user_destroy_on' ) ) $may = false;
|
4005 |
-
if (
|
4006 |
-
if ( ! is_user_logged_in() ) $may = false; // Must login
|
4007 |
-
}
|
4008 |
if ( ! wppa_have_access( $album ) ) {
|
4009 |
$may = false; // No album access
|
4010 |
}
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.0.00.014
|
6 |
*
|
7 |
*/
|
8 |
|
1102 |
$shortcode = stripslashes( $_REQUEST['shortcode'] );
|
1103 |
$shortcode = str_replace( '@', '#', $shortcode );
|
1104 |
$wppa['mocc']++; // = strval( intval ( $_REQUEST['moccur'] ) );
|
1105 |
+
$wppa_opt['wppa_lazy'] = 'none';
|
1106 |
$wppa_opt['wppa_inline_css'] = 'yes';
|
1107 |
$result = do_shortcode( $shortcode );
|
1108 |
echo $result;
|
4002 |
// May I?
|
4003 |
$imay = true;
|
4004 |
if ( ! wppa_switch( 'user_destroy_on' ) ) $may = false;
|
4005 |
+
if ( ! is_user_logged_in() ) $may = false; // Must login
|
|
|
|
|
4006 |
if ( ! wppa_have_access( $album ) ) {
|
4007 |
$may = false; // No album access
|
4008 |
}
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2427,10 +2427,8 @@ function wppa_upload_box() {
|
|
2427 |
return;
|
2428 |
}
|
2429 |
|
2430 |
-
// Must login
|
2431 |
-
if (
|
2432 |
-
if ( ! is_user_logged_in() ) return;
|
2433 |
-
}
|
2434 |
|
2435 |
// Are roles specified and do i have one?
|
2436 |
if ( ! wppa_check_user_upload_role() ) {
|
@@ -2481,8 +2479,8 @@ function wppa_user_destroy_html( $alb, $width, $where, $rsp ) {
|
|
2481 |
}
|
2482 |
|
2483 |
// Must login ?
|
2484 |
-
if (
|
2485 |
-
|
2486 |
}
|
2487 |
|
2488 |
// Album access ?
|
@@ -2843,11 +2841,9 @@ static $albums_granted;
|
|
2843 |
return '';
|
2844 |
}
|
2845 |
|
2846 |
-
// Login required
|
2847 |
-
if (
|
2848 |
-
|
2849 |
-
return '';
|
2850 |
-
}
|
2851 |
}
|
2852 |
|
2853 |
// Are roles specified and do i have one?
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
2427 |
return;
|
2428 |
}
|
2429 |
|
2430 |
+
// Must login
|
2431 |
+
if ( ! is_user_logged_in() ) return;
|
|
|
|
|
2432 |
|
2433 |
// Are roles specified and do i have one?
|
2434 |
if ( ! wppa_check_user_upload_role() ) {
|
2479 |
}
|
2480 |
|
2481 |
// Must login ?
|
2482 |
+
if ( ! is_user_logged_in() ) {
|
2483 |
+
return;
|
2484 |
}
|
2485 |
|
2486 |
// Album access ?
|
2841 |
return '';
|
2842 |
}
|
2843 |
|
2844 |
+
// Login required
|
2845 |
+
if ( ! is_user_logged_in() ) {
|
2846 |
+
return '';
|
|
|
|
|
2847 |
}
|
2848 |
|
2849 |
// Are roles specified and do i have one?
|
wppa-common-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
-
* Version 8.0.00.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1392,7 +1392,6 @@ global $wp_roles;
|
|
1392 |
}
|
1393 |
else {
|
1394 |
$roles = $wp_roles->roles;
|
1395 |
-
$roles['loggedout'] = '';
|
1396 |
unset ( $roles['administrator'] );
|
1397 |
foreach ( array_keys( $roles ) as $role ) if ( ! $limits ) {
|
1398 |
if ( current_user_can( $role ) ) {
|
@@ -1401,9 +1400,6 @@ global $wp_roles;
|
|
1401 |
}
|
1402 |
}
|
1403 |
}
|
1404 |
-
else {
|
1405 |
-
$limits = wppa_opt( 'loggedout_upload_limit_count' ).'/'.wppa_opt( 'loggedout_upload_limit_time' );
|
1406 |
-
}
|
1407 |
return $limits;
|
1408 |
}
|
1409 |
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 8.0.00.014
|
6 |
*
|
7 |
*/
|
8 |
|
1392 |
}
|
1393 |
else {
|
1394 |
$roles = $wp_roles->roles;
|
|
|
1395 |
unset ( $roles['administrator'] );
|
1396 |
foreach ( array_keys( $roles ) as $role ) if ( ! $limits ) {
|
1397 |
if ( current_user_can( $role ) ) {
|
1400 |
}
|
1401 |
}
|
1402 |
}
|
|
|
|
|
|
|
1403 |
return $limits;
|
1404 |
}
|
1405 |
|
wppa-defaults.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -309,7 +309,6 @@ horizrailenabled:false,";
|
|
309 |
'wppa_email_on' => 'yes',
|
310 |
'wppa_user_upload_video_on' => 'no',
|
311 |
'wppa_user_upload_audio_on' => 'no',
|
312 |
-
'wppa_user_upload_login' => 'yes',
|
313 |
'wppa_user_opload_roles' => '',
|
314 |
'wppa_ajax_upload' => 'yes',
|
315 |
'wppa_copyright_on' => 'yes', // 19
|
@@ -489,7 +488,7 @@ horizrailenabled:false,";
|
|
489 |
'wppa_cre_uploads_htaccess' => 'remove',
|
490 |
'wppa_debug_trace_on' => 'no',
|
491 |
'wppa_relative_urls' => 'no',
|
492 |
-
'wppa_lazy' => '
|
493 |
|
494 |
'wppa_thumbs_first' => 'no',
|
495 |
'wppa_login_links' => 'yes',
|
@@ -809,7 +808,6 @@ horizrailenabled:false,";
|
|
809 |
'wppa_spam_maxage' => 'none',
|
810 |
'wppa_user_create_on' => 'no',
|
811 |
'wppa_user_create_max_level' => '99',
|
812 |
-
'wppa_user_create_login' => 'yes',
|
813 |
'wppa_user_create_captcha' => 'yes', // VII-B3
|
814 |
'wppa_user_destroy_on' => 'no',
|
815 |
'wppa_upload_frontend_minsize' => '0',
|
@@ -826,8 +824,6 @@ horizrailenabled:false,";
|
|
826 |
'wppa_contributor_upload_limit_time' => '0',
|
827 |
'wppa_subscriber_upload_limit_count' => '0',
|
828 |
'wppa_subscriber_upload_limit_time' => '0',
|
829 |
-
'wppa_loggedout_upload_limit_count' => '0',
|
830 |
-
'wppa_loggedout_upload_limit_time' => '0',
|
831 |
|
832 |
'wppa_role_limit_per_album' => 'no',
|
833 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains default settings
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
309 |
'wppa_email_on' => 'yes',
|
310 |
'wppa_user_upload_video_on' => 'no',
|
311 |
'wppa_user_upload_audio_on' => 'no',
|
|
|
312 |
'wppa_user_opload_roles' => '',
|
313 |
'wppa_ajax_upload' => 'yes',
|
314 |
'wppa_copyright_on' => 'yes', // 19
|
488 |
'wppa_cre_uploads_htaccess' => 'remove',
|
489 |
'wppa_debug_trace_on' => 'no',
|
490 |
'wppa_relative_urls' => 'no',
|
491 |
+
'wppa_lazy' => 'pc',
|
492 |
|
493 |
'wppa_thumbs_first' => 'no',
|
494 |
'wppa_login_links' => 'yes',
|
808 |
'wppa_spam_maxage' => 'none',
|
809 |
'wppa_user_create_on' => 'no',
|
810 |
'wppa_user_create_max_level' => '99',
|
|
|
811 |
'wppa_user_create_captcha' => 'yes', // VII-B3
|
812 |
'wppa_user_destroy_on' => 'no',
|
813 |
'wppa_upload_frontend_minsize' => '0',
|
824 |
'wppa_contributor_upload_limit_time' => '0',
|
825 |
'wppa_subscriber_upload_limit_count' => '0',
|
826 |
'wppa_subscriber_upload_limit_time' => '0',
|
|
|
|
|
827 |
|
828 |
'wppa_role_limit_per_album' => 'no',
|
829 |
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1383,8 +1383,8 @@ global $wppa_session;
|
|
1383 |
if ( ! is_user_logged_in() ) $status .= " AND status <> 'private'";
|
1384 |
|
1385 |
$query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
1386 |
-
WHERE " . $album_clause . " AND owner = %s AND ( " . $status . " )
|
1387 |
-
|
1388 |
}
|
1389 |
|
1390 |
// Topten?
|
@@ -4871,15 +4871,11 @@ global $wppa_upload_succes_id;
|
|
4871 |
|
4872 |
// Upload possible?
|
4873 |
$may_upload = wppa_switch( 'user_upload_on' );
|
4874 |
-
if (
|
4875 |
-
if ( ! is_user_logged_in() ) $may_upload = false; // Must login
|
4876 |
-
}
|
4877 |
|
4878 |
// Create album possible?
|
4879 |
$may_create = wppa_switch( 'user_create_on' );
|
4880 |
-
if (
|
4881 |
-
if ( ! is_user_logged_in() ) $may_create = false; // Must login
|
4882 |
-
}
|
4883 |
|
4884 |
// Edit album possible?
|
4885 |
$may_edit = wppa_switch( 'user_album_edit_on' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.0.00.015
|
7 |
*
|
8 |
*/
|
9 |
|
1383 |
if ( ! is_user_logged_in() ) $status .= " AND status <> 'private'";
|
1384 |
|
1385 |
$query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
1386 |
+
WHERE " . $album_clause . " AND owner = %s AND ( " . $status . " ) " .
|
1387 |
+
wppa_get_photo_order(), wppa( 'is_upldr' ) );
|
1388 |
}
|
1389 |
|
1390 |
// Topten?
|
4871 |
|
4872 |
// Upload possible?
|
4873 |
$may_upload = wppa_switch( 'user_upload_on' );
|
4874 |
+
if ( ! is_user_logged_in() ) $may_upload = false; // Must login
|
|
|
|
|
4875 |
|
4876 |
// Create album possible?
|
4877 |
$may_create = wppa_switch( 'user_create_on' );
|
4878 |
+
if ( ! is_user_logged_in() ) $may_create = false; // Must login
|
|
|
|
|
4879 |
|
4880 |
// Edit album possible?
|
4881 |
$may_edit = wppa_switch( 'user_album_edit_on' );
|
wppa-gp-widget.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* wppa-gp-widget.php
|
3 |
+
* Package: wp-photo-album-plus
|
4 |
+
*
|
5 |
+
* A text widget that interpretes wppa shortcodes
|
6 |
+
*
|
7 |
+
* Version 7.3.08
|
8 |
+
*/
|
9 |
+
|
10 |
+
class WppaGpWidget extends WP_Widget {
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
$widget_ops = array( 'classname' => 'wppa_gp_widget', 'description' => __( 'General purpose widget that may contain [wppa] shortcodes', 'wp-photo-album-plus' ) );
|
14 |
+
parent::__construct( 'wppa_gp_widget', __( 'WPPA+ Text', 'wp-photo-album-plus' ), $widget_ops );
|
15 |
+
}
|
16 |
+
|
17 |
+
function widget( $args, $instance ) {
|
18 |
+
|
19 |
+
// Initialize
|
20 |
+
wppa_widget_timer( 'init' );
|
21 |
+
wppa_reset_occurrance();
|
22 |
+
wppa( 'in_widget', 'gp' );
|
23 |
+
wppa_bump_mocc();
|
24 |
+
extract( $args );
|
25 |
+
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
26 |
+
$widget_title = apply_filters( 'widget_title', $instance['title'] );
|
27 |
+
$cache = $instance['cache'];
|
28 |
+
$cachefile = wppa_get_widget_cache_path( $this->id );
|
29 |
+
|
30 |
+
// Logged in only and logged out?
|
31 |
+
if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
|
32 |
+
return;
|
33 |
+
}
|
34 |
+
|
35 |
+
// Cache?
|
36 |
+
if ( $cache ) {
|
37 |
+
|
38 |
+
if ( wppa_is_file( $cachefile ) ) {
|
39 |
+
|
40 |
+
// Cache expired?
|
41 |
+
if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
|
42 |
+
wppa_remove_widget_cache_path( $this->id );
|
43 |
+
}
|
44 |
+
|
45 |
+
// No, use it
|
46 |
+
else {
|
47 |
+
echo wppa_get_contents( $cachefile );
|
48 |
+
echo wppa_widget_timer( 'show', $widget_title, true );
|
49 |
+
wppa( 'in_widget', false );
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
// Other inits
|
56 |
+
|
57 |
+
// Body
|
58 |
+
$text = $instance['text'];
|
59 |
+
$text = __( $text );
|
60 |
+
if ( wppa_checked( $instance['filter'] ) ) { // Do wpautop BEFORE do_shortcode
|
61 |
+
$text = wpautop( $text );
|
62 |
+
}
|
63 |
+
$text = do_shortcode( $text );
|
64 |
+
$text = apply_filters( 'widget_text', $text ); // If shortcode at wppa filter priority, insert result. See wppa-filter.php
|
65 |
+
|
66 |
+
$widget_content = '
|
67 |
+
<div' .
|
68 |
+
' class="wppa-gp-widget"' .
|
69 |
+
' style="margin-top:2px; margin-left:2px;"' .
|
70 |
+
' data-wppa="yes"' .
|
71 |
+
' >' .
|
72 |
+
$text .
|
73 |
+
'</div>' .
|
74 |
+
'<div style="clear:both"></div>';
|
75 |
+
|
76 |
+
// Output
|
77 |
+
$result = "\n" . $before_widget;
|
78 |
+
if ( ! empty( $widget_title ) ) {
|
79 |
+
$result .= $before_title . $widget_title . $after_title;
|
80 |
+
}
|
81 |
+
$result .= $widget_content . $after_widget;
|
82 |
+
|
83 |
+
echo $result;
|
84 |
+
echo wppa_widget_timer( 'show', $widget_title );
|
85 |
+
|
86 |
+
// Cache?
|
87 |
+
if ( $cache ) {
|
88 |
+
wppa_put_contents( $cachefile, $result );
|
89 |
+
}
|
90 |
+
|
91 |
+
wppa( 'in_widget', false );
|
92 |
+
wppa( 'fullsize', '' ); // Reset to prevent inheritage of wrong size in case widget is rendered before main column
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
function update( $new_instance, $old_instance ) {
|
97 |
+
|
98 |
+
// Completize all parms
|
99 |
+
$instance = wppa_parse_args( $new_instance, $this->get_defaults() );
|
100 |
+
|
101 |
+
// Sanitize certain args
|
102 |
+
$instance['title'] = strip_tags( $instance['title'] );
|
103 |
+
if ( current_user_can('unfiltered_html') ) {
|
104 |
+
$instance['text'] = $new_instance['text'];
|
105 |
+
}
|
106 |
+
else {
|
107 |
+
$instance['text'] = stripslashes( wp_filter_post_kses( addslashes( $new_instance['text'] ) ) ); // wp_filter_post_kses() expects slashed
|
108 |
+
}
|
109 |
+
|
110 |
+
wppa_remove_widget_cache_path( $this->id );
|
111 |
+
|
112 |
+
return $instance;
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
function form( $instance ) {
|
117 |
+
|
118 |
+
// Defaults
|
119 |
+
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
120 |
+
|
121 |
+
// Widget title
|
122 |
+
echo
|
123 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
124 |
+
|
125 |
+
// Text area
|
126 |
+
echo
|
127 |
+
wppa_widget_textarea( $this, 'text', $instance['text'], __( 'Enter the content just like a normal text widget. This widget will interpret [wppa] shortcodes', 'wp-photo-album-plus' ) );
|
128 |
+
|
129 |
+
// Run wpautop?
|
130 |
+
echo
|
131 |
+
wppa_widget_checkbox( $this, 'filter', $instance['filter'], __( 'Automatically add paragraphs', 'wp-photo-album-plus' ) );
|
132 |
+
|
133 |
+
// Logged in only?
|
134 |
+
echo
|
135 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
136 |
+
|
137 |
+
// Cache
|
138 |
+
echo
|
139 |
+
wppa_widget_cache( $this, $instance['cache'] );
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
// Set defaults
|
144 |
+
function get_defaults() {
|
145 |
+
|
146 |
+
$defaults = array( 'title' => __( 'Text', 'wp-photo-album-plus' ),
|
147 |
+
'text' => '',
|
148 |
+
'filter' => 'no',
|
149 |
+
'logonly' => 'no',
|
150 |
+
'cache' => '0',
|
151 |
+
);
|
152 |
+
return $defaults;
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
// register WppaGpWidget widget
|
157 |
+
add_action( 'widgets_init', 'wppa_register_WppaGpWidget' );
|
158 |
+
|
159 |
+
function wppa_register_WppaGpWidget() {
|
160 |
+
register_widget( "WppaGpWidget" );
|
161 |
+
}
|
wppa-non-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -432,7 +432,7 @@ global $wppa_session;
|
|
432 |
'top:0;' .
|
433 |
'left:0;' .
|
434 |
'width:100%;' .
|
435 |
-
'height:
|
436 |
'background-color:'.wppa_opt( 'ovl_bgcolor' ).';' .
|
437 |
'"' .
|
438 |
' onclick="wppaOvlOnclick(event)"' .
|
@@ -954,7 +954,7 @@ wppaOvlSvgBgcolor = "' . wppa_opt( 'ovl_svg_bg_color' ) . '";
|
|
954 |
wppaSvgCornerStyle = "' . wppa_opt( 'icon_corner_style' ) . '";
|
955 |
wppaHideRightClick = ' . ( wppa_switch( 'no_rightclick' ) ? 'true' : 'false' ) . ';
|
956 |
wppaGeoZoom = ' . wppa_opt( 'geo_zoom' ) . ';
|
957 |
-
wppaLazyLoad = ' . (
|
958 |
wppaAreaMaxFrac = ' . ( wppa_opt( 'area_size' ) < 1 ? wppa_opt( 'area_size' ) : 1.0 ) . ';
|
959 |
wppaIconSizeNormal = "' . wppa_opt( 'nav_icon_size' ) . '";
|
960 |
wppaIconSizeSlide = "' . wppa_opt( 'nav_icon_size_slide' ) . '";
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
+
* Version 8.0.00.015
|
7 |
*
|
8 |
*/
|
9 |
|
432 |
'top:0;' .
|
433 |
'left:0;' .
|
434 |
'width:100%;' .
|
435 |
+
'height:10000px;' .
|
436 |
'background-color:'.wppa_opt( 'ovl_bgcolor' ).';' .
|
437 |
'"' .
|
438 |
' onclick="wppaOvlOnclick(event)"' .
|
954 |
wppaSvgCornerStyle = "' . wppa_opt( 'icon_corner_style' ) . '";
|
955 |
wppaHideRightClick = ' . ( wppa_switch( 'no_rightclick' ) ? 'true' : 'false' ) . ';
|
956 |
wppaGeoZoom = ' . wppa_opt( 'geo_zoom' ) . ';
|
957 |
+
wppaLazyLoad = ' . ( wppa_lazy() ? 'true' : 'false' ) . ';
|
958 |
wppaAreaMaxFrac = ' . ( wppa_opt( 'area_size' ) < 1 ? wppa_opt( 'area_size' ) : 1.0 ) . ';
|
959 |
wppaIconSizeNormal = "' . wppa_opt( 'nav_icon_size' ) . '";
|
960 |
wppaIconSizeSlide = "' . wppa_opt( 'nav_icon_size_slide' ) . '";
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -678,7 +678,7 @@ function wppaToggleExif( id, count ) {
|
|
678 |
>
|
679 |
<img
|
680 |
id="thumburl-' . $id . '"' .
|
681 |
-
(
|
682 |
alt="' . esc_attr( $name ) . '"
|
683 |
style="max-width: 160px; vertical-align:middle;"' .
|
684 |
' />
|
@@ -3047,7 +3047,7 @@ function wppaSetConfirmMove( id ) {
|
|
3047 |
' >' .
|
3048 |
'<img' .
|
3049 |
' class="wppa-bulk-thumb"' .
|
3050 |
-
' ' . (
|
3051 |
' style="max-width:' . $maxsize . 'max-height:' . $maxsize . 'px;"' .
|
3052 |
' />' .
|
3053 |
'</a>';
|
@@ -3360,7 +3360,7 @@ global $wpdb;
|
|
3360 |
echo
|
3361 |
'<img' .
|
3362 |
' class="wppa-bulk-thumb"' .
|
3363 |
-
' ' . (
|
3364 |
' style="max-width:' . $mw . 'px; max-height:' . $mh . 'px; margin-top:' . $mt . 'px;" />';
|
3365 |
} ?>
|
3366 |
<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>
|
@@ -3624,7 +3624,7 @@ function wppa_fe_edit_new_style( $photo ) {
|
|
3624 |
'<h3>' .
|
3625 |
'<img' .
|
3626 |
' style="height:50px;"' .
|
3627 |
-
' ' . (
|
3628 |
' alt="' . esc_attr( $photo ) . '"' .
|
3629 |
' />' .
|
3630 |
' ' .
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
678 |
>
|
679 |
<img
|
680 |
id="thumburl-' . $id . '"' .
|
681 |
+
( wppa_lazy() && $count > '1' ? 'data-' : '' ) . 'src="' . $src . '"
|
682 |
alt="' . esc_attr( $name ) . '"
|
683 |
style="max-width: 160px; vertical-align:middle;"' .
|
684 |
' />
|
3047 |
' >' .
|
3048 |
'<img' .
|
3049 |
' class="wppa-bulk-thumb"' .
|
3050 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
3051 |
' style="max-width:' . $maxsize . 'max-height:' . $maxsize . 'px;"' .
|
3052 |
' />' .
|
3053 |
'</a>';
|
3360 |
echo
|
3361 |
'<img' .
|
3362 |
' class="wppa-bulk-thumb"' .
|
3363 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
3364 |
' style="max-width:' . $mw . 'px; max-height:' . $mh . 'px; margin-top:' . $mt . 'px;" />';
|
3365 |
} ?>
|
3366 |
<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>
|
3624 |
'<h3>' .
|
3625 |
'<img' .
|
3626 |
' style="height:50px;"' .
|
3627 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo ) ) . '"' .
|
3628 |
' alt="' . esc_attr( $photo ) . '"' .
|
3629 |
' />' .
|
3630 |
' ' .
|
wppa-picture.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -284,7 +284,7 @@ function wppa_get_picture_html( $args ) {
|
|
284 |
$result .=
|
285 |
'<img' .
|
286 |
' id="' . $imgid . '"' .
|
287 |
-
' ' . (
|
288 |
' ' . wppa_get_imgalt( $id ) .
|
289 |
( $class ? ' class="' . $class . '" ' : '' ) .
|
290 |
( $title ? ' title="' . $title . '" ' : '' ) .
|
@@ -1143,7 +1143,8 @@ function wppa_get_flat_pan_html( $args ) {
|
|
1143 |
'}
|
1144 |
if(run<5)run--;' .
|
1145 |
|
1146 |
-
|
|
|
1147 |
|
1148 |
'}' .
|
1149 |
/*
|
@@ -1316,7 +1317,7 @@ function wppa_get_flat_pan_html( $args ) {
|
|
1316 |
'}' .
|
1317 |
|
1318 |
// Set css common for all 4 situations
|
1319 |
-
'$("#wppa-ovl-pan-container").css({top:
|
1320 |
|
1321 |
canvas.width = newWidth;
|
1322 |
canvas.height = newHeight;
|
@@ -1356,11 +1357,10 @@ function wppa_get_flat_pan_html( $args ) {
|
|
1356 |
borderRadius:"0px",
|
1357 |
width:newWidth,
|
1358 |
left:(contWidth-newWidth)/2
|
1359 |
-
});' .
|
1360 |
-
|
1361 |
-
'wppaAdjustControlbar();
|
1362 |
|
1363 |
-
}' .
|
1364 |
|
1365 |
'run=(autorun?5:4);
|
1366 |
render();
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
+
* Version 8.0.00.015
|
7 |
*
|
8 |
*/
|
9 |
|
284 |
$result .=
|
285 |
'<img' .
|
286 |
' id="' . $imgid . '"' .
|
287 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $href . '"' .
|
288 |
' ' . wppa_get_imgalt( $id ) .
|
289 |
( $class ? ' class="' . $class . '" ' : '' ) .
|
290 |
( $title ? ' title="' . $title . '" ' : '' ) .
|
1143 |
'}
|
1144 |
if(run<5)run--;' .
|
1145 |
|
1146 |
+
'setTimeout(function(){jQuery("#wppa-pctl-div-"+' . $mocc . ').css({visibility:"visible"});}, 100);' .
|
1147 |
+
// 'wppaAdjustControlbar();' .
|
1148 |
|
1149 |
'}' .
|
1150 |
/*
|
1317 |
'}' .
|
1318 |
|
1319 |
// Set css common for all 4 situations
|
1320 |
+
'$("#wppa-ovl-pan-container").css({top:topMarg,marginTop:0});
|
1321 |
|
1322 |
canvas.width = newWidth;
|
1323 |
canvas.height = newHeight;
|
1357 |
borderRadius:"0px",
|
1358 |
width:newWidth,
|
1359 |
left:(contWidth-newWidth)/2
|
1360 |
+
});' .
|
1361 |
+
'wppaAdjustControlbar();' .
|
|
|
1362 |
|
1363 |
+
'}' .
|
1364 |
|
1365 |
'run=(autorun?5:4);
|
1366 |
render();
|
wppa-potd-widget.php
CHANGED
@@ -136,7 +136,7 @@ class PhotoOfTheDay extends WP_Widget {
|
|
136 |
else {
|
137 |
$widget_content .= '<img' .
|
138 |
' src="'.$imgurl.'"' .
|
139 |
-
' style="width:
|
140 |
' ' . wppa_get_imgalt( $id ) .
|
141 |
( $title ? 'title="' . $title . '"' : '' ) .
|
142 |
' />';
|
136 |
else {
|
137 |
$widget_content .= '<img' .
|
138 |
' src="'.$imgurl.'"' .
|
139 |
+
' style="width: 100%;'.$cursor.'"' .
|
140 |
' ' . wppa_get_imgalt( $id ) .
|
141 |
( $title ? 'title="' . $title . '"' : '' ) .
|
142 |
' />';
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -885,7 +885,7 @@ global $wppa_subtab_names;
|
|
885 |
$help = '';
|
886 |
$slug = 'wppa_user_upload_on';
|
887 |
$onch = 'wppaRefreshAfter();';
|
888 |
-
$html = wppa_checkbox($slug, $onch) . wppa_see_also( 'users', '1', '', 'user_upload_on' );
|
889 |
wppa_setting_new($slug, '6', $name, $desc, $html, $help);
|
890 |
|
891 |
$name = __('Enable Email', 'wp-photo-album-plus');
|
@@ -5785,14 +5785,6 @@ global $wppa_subtab_names;
|
|
5785 |
$html = wppa_checkbox($slug);
|
5786 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_switch( 'enable_audio' ));
|
5787 |
|
5788 |
-
$name = __('User upload login', 'wp-photo-album-plus');
|
5789 |
-
$desc = __('Frontend upload requires the user is logged in.', 'wp-photo-album-plus');
|
5790 |
-
$help = '';
|
5791 |
-
$slug = 'wppa_user_upload_login';
|
5792 |
-
$onch = 'wppaSlave(this,"wppa_user_opload_roles")';
|
5793 |
-
$html = wppa_checkbox($slug, $onch);
|
5794 |
-
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
5795 |
-
|
5796 |
$name = __('User upload roles', 'wp-photo-album-plus');
|
5797 |
$desc = __('Optionally limit access to selected userroles', 'wp-photo-album-plus');
|
5798 |
$help = '';
|
@@ -5810,35 +5802,35 @@ global $wppa_subtab_names;
|
|
5810 |
}
|
5811 |
$onch = '';
|
5812 |
$html = wppa_select_m($slug, $opts, $vals, $onch, '', false, '', '220' );
|
5813 |
-
wppa_setting_new($slug, '
|
5814 |
|
5815 |
$name = __('Progressin bar', 'wp-photo-album-plus');
|
5816 |
$desc = __('Shows the upload progression bar.', 'wp-photo-album-plus');
|
5817 |
$help = '';
|
5818 |
$slug = 'wppa_ajax_upload';
|
5819 |
$html = wppa_checkbox($slug);
|
5820 |
-
wppa_setting_new($slug, '
|
5821 |
|
5822 |
$name = __('Show Copyright', 'wp-photo-album-plus');
|
5823 |
$desc = __('Show a copyright warning on frontend upload form.', 'wp-photo-album-plus');
|
5824 |
$help = '';
|
5825 |
$slug = 'wppa_copyright_on';
|
5826 |
$html = wppa_checkbox($slug, 'wppaSlave(this,\'wppa_copyright_notice\');');
|
5827 |
-
wppa_setting_new($slug, '
|
5828 |
|
5829 |
$name = __('Copyright notice', 'wp-photo-album-plus');
|
5830 |
$desc = __('The message to be displayed.', 'wp-photo-album-plus');
|
5831 |
$help = '';
|
5832 |
$slug = 'wppa_copyright_notice';
|
5833 |
$html = wppa_textarea($slug, $name);
|
5834 |
-
wppa_setting_new($slug, '
|
5835 |
|
5836 |
$name = __('User Watermark', 'wp-photo-album-plus');
|
5837 |
$desc = __('Uploading users may select watermark settings', 'wp-photo-album-plus');
|
5838 |
$help = __('If checked, anyone who can upload and/or import photos can overrule the default watermark settings.', 'wp-photo-album-plus');
|
5839 |
$slug = 'wppa_watermark_user';
|
5840 |
$html = wppa_checkbox($slug);
|
5841 |
-
wppa_setting_new($slug, '
|
5842 |
|
5843 |
$name = __('User name', 'wp-photo-album-plus');
|
5844 |
$desc = __('Uploading users may overrule the default name.', 'wp-photo-album-plus');
|
@@ -5847,7 +5839,7 @@ global $wppa_subtab_names;
|
|
5847 |
$slug1 = 'wppa_name_user';
|
5848 |
$slug2 = 'wppa_name_user_mandatory';
|
5849 |
$html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
|
5850 |
-
wppa_setting_new($slug1, '
|
5851 |
|
5852 |
$name = __('Apply Newphoto desc user', 'wp-photo-album-plus');
|
5853 |
$desc = __('Give each new frontend uploaded photo a standard description.', 'wp-photo-album-plus');
|
@@ -5856,7 +5848,7 @@ global $wppa_subtab_names;
|
|
5856 |
$help .= '<br />'.wppa_see_also( 'new', '1', '13' );
|
5857 |
$slug = 'wppa_apply_newphoto_desc_user';
|
5858 |
$html = wppa_checkbox($slug);
|
5859 |
-
wppa_setting_new($slug, '
|
5860 |
|
5861 |
$name = __('User desc', 'wp-photo-album-plus');
|
5862 |
$desc = __('Uploading users may overrule the default description.', 'wp-photo-album-plus');
|
@@ -5864,21 +5856,21 @@ global $wppa_subtab_names;
|
|
5864 |
$slug1 = 'wppa_desc_user';
|
5865 |
$slug2 = 'wppa_desc_user_mandatory';
|
5866 |
$html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
|
5867 |
-
wppa_setting_new($slug, '
|
5868 |
|
5869 |
$name = __('User upload custom', 'wp-photo-album-plus');
|
5870 |
$desc = __('Frontend upload can fill in custom data fields.', 'wp-photo-album-plus');
|
5871 |
$help = '';
|
5872 |
$slug = 'wppa_fe_custom_fields';
|
5873 |
$html = wppa_checkbox($slug).wppa_see_also( 'custom', '2' );;
|
5874 |
-
wppa_setting_new($slug, '
|
5875 |
|
5876 |
$name = __('User upload tags', 'wp-photo-album-plus');
|
5877 |
$desc = __('Frontend upload can add tags.', 'wp-photo-album-plus');
|
5878 |
$help = '';
|
5879 |
$slug = 'wppa_fe_upload_tags';
|
5880 |
$html = wppa_checkbox($slug, 'wppaRefreshAfter();');
|
5881 |
-
wppa_setting_new($slug, '
|
5882 |
|
5883 |
if ( wppa_switch( 'fe_upload_tags' ) ) {
|
5884 |
|
@@ -5888,21 +5880,21 @@ global $wppa_subtab_names;
|
|
5888 |
$slug1 = 'wppa_up_tagselbox_on_1';
|
5889 |
$slug2 = 'wppa_up_tagselbox_multi_1';
|
5890 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5891 |
-
wppa_setting_new($slug, '
|
5892 |
|
5893 |
$name = __('Caption box', 'wp-photo-album-plus').' 1';
|
5894 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5895 |
$help = '';
|
5896 |
$slug = 'wppa_up_tagselbox_title_1';
|
5897 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5898 |
-
wppa_setting_new($slug, '
|
5899 |
|
5900 |
$name = __('Tags box', 'wp-photo-album-plus').' 1';
|
5901 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5902 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5903 |
$slug = 'wppa_up_tagselbox_content_1';
|
5904 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5905 |
-
wppa_setting_new($slug, '
|
5906 |
|
5907 |
$name = __('Tag selection box', 'wp-photo-album-plus').' 2';
|
5908 |
$desc = __('Front-end upload tags selecion box.', 'wp-photo-album-plus');
|
@@ -5910,21 +5902,21 @@ global $wppa_subtab_names;
|
|
5910 |
$slug1 = 'wppa_up_tagselbox_on_2';
|
5911 |
$slug2 = 'wppa_up_tagselbox_multi_2';
|
5912 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5913 |
-
wppa_setting_new($slug, '
|
5914 |
|
5915 |
$name = __('Caption box', 'wp-photo-album-plus').' 2';
|
5916 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5917 |
$help = '';
|
5918 |
$slug = 'wppa_up_tagselbox_title_2';
|
5919 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5920 |
-
wppa_setting_new($slug, '
|
5921 |
|
5922 |
$name = __('Tags box', 'wp-photo-album-plus').' 2';
|
5923 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5924 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5925 |
$slug = 'wppa_up_tagselbox_content_2';
|
5926 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5927 |
-
wppa_setting_new($slug, '
|
5928 |
|
5929 |
$name = __('Tag selection box', 'wp-photo-album-plus').' 3';
|
5930 |
$desc = __('Front-end upload tags selecion box.', 'wp-photo-album-plus');
|
@@ -5932,49 +5924,49 @@ global $wppa_subtab_names;
|
|
5932 |
$slug1 = 'wppa_up_tagselbox_on_3';
|
5933 |
$slug2 = 'wppa_up_tagselbox_multi_3';
|
5934 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5935 |
-
wppa_setting_new($slug, '
|
5936 |
|
5937 |
$name = __('Caption box', 'wp-photo-album-plus').' 3';
|
5938 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5939 |
$help = '';
|
5940 |
$slug = 'wppa_up_tagselbox_title_3';
|
5941 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5942 |
-
wppa_setting_new($slug, '
|
5943 |
|
5944 |
$name = __('Tags box', 'wp-photo-album-plus').' 3';
|
5945 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5946 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5947 |
$slug = 'wppa_up_tagselbox_content_3';
|
5948 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5949 |
-
wppa_setting_new($slug, '
|
5950 |
|
5951 |
$name = __('New tags', 'wp-photo-album-plus');
|
5952 |
$desc = __('Input field for any user defined tags.', 'wp-photo-album-plus');
|
5953 |
$help = '';
|
5954 |
$slug = 'wppa_up_tag_input_on';
|
5955 |
$html = wppa_checkbox($slug);
|
5956 |
-
wppa_setting_new($slug, '
|
5957 |
|
5958 |
$name = __('New tags caption', 'wp-photo-album-plus');
|
5959 |
$desc = __('The caption above the tags input field.', 'wp-photo-album-plus');
|
5960 |
$help = '';
|
5961 |
$slug = 'wppa_up_tag_input_title';
|
5962 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5963 |
-
wppa_setting_new($slug, '
|
5964 |
|
5965 |
$name = __('Tags box New', 'wp-photo-album-plus');
|
5966 |
$desc = __('The tags in the New tags input box.', 'wp-photo-album-plus');
|
5967 |
$help = '';
|
5968 |
$slug = 'wppa_up_tagbox_new';
|
5969 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5970 |
-
wppa_setting_new($slug, '
|
5971 |
|
5972 |
$name = __('Preview tags', 'wp-photo-album-plus');
|
5973 |
$desc = __('Show a preview of all tags that will be added to the photo info.', 'wp-photo-album-plus');
|
5974 |
$help = '';
|
5975 |
$slug = 'wppa_up_tag_preview';
|
5976 |
$html = wppa_checkbox($slug);
|
5977 |
-
wppa_setting_new($slug, '
|
5978 |
}
|
5979 |
|
5980 |
$name = __('Camera connect', 'wp-photo-album-plus');
|
@@ -5982,7 +5974,7 @@ global $wppa_subtab_names;
|
|
5982 |
$help = '';
|
5983 |
$slug = 'wppa_camera_connect';
|
5984 |
$html = wppa_checkbox($slug);
|
5985 |
-
wppa_setting_new($slug, '
|
5986 |
|
5987 |
$name = __('Blog It!', 'wp-photo-album-plus');
|
5988 |
$desc = __('Enable blogging photos.', 'wp-photo-album-plus');
|
@@ -5997,21 +5989,21 @@ global $wppa_subtab_names;
|
|
5997 |
'always',
|
5998 |
);
|
5999 |
$html = wppa_select($slug, $opts, $vals);
|
6000 |
-
wppa_setting_new($slug, '
|
6001 |
|
6002 |
$name = __('Blog It need moderation', 'wp-photo-album-plus');
|
6003 |
$desc = __('Posts with blogged photos need moderation.', 'wp-photo-album-plus');
|
6004 |
$help = '';
|
6005 |
$slug = 'wppa_blog_it_moderate';
|
6006 |
$html = wppa_checkbox($slug);
|
6007 |
-
wppa_setting_new($slug, '
|
6008 |
|
6009 |
$name = __('Blog It shortcode', 'wp-photo-album-plus');
|
6010 |
$desc = __('Shortcode to be used on the blog post', 'wp-photo-album-plus');
|
6011 |
$help = __('Make sure it contains photo="#id"', 'wp-photo-album-plus');
|
6012 |
$slug = 'wppa_blog_it_shortcode';
|
6013 |
$html = wppa_input($slug, '85%');
|
6014 |
-
wppa_setting_new($slug, '
|
6015 |
|
6016 |
$name = __('Frontend ending label', 'wp-photo-album-plus');
|
6017 |
$desc = __('Frontend upload / create / edit dialog closing label text.', 'wp-photo-album-plus');
|
@@ -6020,7 +6012,7 @@ global $wppa_subtab_names;
|
|
6020 |
$opts = array( __('Abort', 'wp-photo-album-plus'), __('Cancel', 'wp-photo-album-plus'), __('Close', 'wp-photo-album-plus'), __('Exit', 'wp-photo-album-plus'), __('Quit', 'wp-photo-album-plus') );
|
6021 |
$vals = array( 'Abort', 'Cancel', 'Close', 'Exit', 'Quit' );
|
6022 |
$html = wppa_select($slug, $opts, $vals);
|
6023 |
-
wppa_setting_new($slug, '
|
6024 |
|
6025 |
wppa_setting_box_footer_new();
|
6026 |
}
|
@@ -6589,7 +6581,9 @@ global $wppa_subtab_names;
|
|
6589 |
$desc = __('Load photos from the server at the moment they will show up.', 'wp-photo-album-plus');
|
6590 |
$help = '';
|
6591 |
$slug = 'wppa_lazy';
|
6592 |
-
$
|
|
|
|
|
6593 |
wppa_setting_new($slug, '23', $name, $desc, $html, $help);
|
6594 |
|
6595 |
$name = __('Thumbs first', 'wp-photo-album-plus');
|
@@ -6991,102 +6985,104 @@ global $wppa_subtab_names;
|
|
6991 |
$desc = __('Create an album for each user logging in.', 'wp-photo-album-plus');
|
6992 |
$help = '';
|
6993 |
$slug = 'wppa_grant_an_album';
|
6994 |
-
$html = wppa_checkbox($slug);
|
6995 |
wppa_setting_new($slug, '18', $name, $desc, $html, $help);
|
6996 |
|
6997 |
-
|
6998 |
-
|
6999 |
-
|
7000 |
-
|
7001 |
-
|
7002 |
-
|
7003 |
-
|
7004 |
-
|
|
|
7005 |
|
7006 |
-
|
7007 |
-
|
7008 |
-
|
7009 |
-
|
7010 |
-
|
7011 |
-
|
7012 |
-
|
7013 |
-
|
7014 |
-
|
7015 |
-
|
7016 |
-
|
7017 |
-
|
7018 |
-
|
7019 |
-
|
7020 |
-
|
7021 |
|
7022 |
-
|
7023 |
-
|
7024 |
-
|
7025 |
-
|
7026 |
-
|
7027 |
-
|
7028 |
-
|
7029 |
-
|
7030 |
-
|
7031 |
-
|
7032 |
-
|
7033 |
-
|
7034 |
-
|
|
|
7035 |
}
|
7036 |
-
|
7037 |
-
|
7038 |
-
|
7039 |
-
|
7040 |
-
|
7041 |
-
|
7042 |
-
|
7043 |
-
|
7044 |
-
|
7045 |
-
|
7046 |
-
|
7047 |
-
|
7048 |
-
|
7049 |
-
|
7050 |
-
|
7051 |
-
|
7052 |
-
|
7053 |
-
|
7054 |
-
|
7055 |
-
|
7056 |
-
|
7057 |
-
|
7058 |
-
|
7059 |
-
|
7060 |
-
|
7061 |
-
|
7062 |
-
|
7063 |
-
|
7064 |
-
|
7065 |
-
|
7066 |
-
|
7067 |
-
|
7068 |
-
}
|
7069 |
|
7070 |
-
|
7071 |
-
|
7072 |
-
|
7073 |
-
|
7074 |
-
|
7075 |
-
|
7076 |
|
7077 |
-
|
7078 |
-
|
7079 |
-
|
7080 |
-
|
7081 |
-
|
7082 |
-
|
7083 |
|
7084 |
-
|
7085 |
-
|
7086 |
-
|
7087 |
-
|
7088 |
-
|
7089 |
-
|
|
|
7090 |
|
7091 |
$name = __('Iptc 025 keywords to tags', 'wp-photo-album-plus');
|
7092 |
$desc = __('Convert IPTC025 keywords to tags during upload.', 'wp-photo-album-plus');
|
@@ -7095,14 +7091,6 @@ global $wppa_subtab_names;
|
|
7095 |
$html = wppa_checkbox( $slug );
|
7096 |
wppa_setting_new($slug, '27', $name, $desc, $html, $help);
|
7097 |
|
7098 |
-
$name = __('Max user albums', 'wp-photo-album-plus');
|
7099 |
-
$desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
|
7100 |
-
$help = (__('The maximum number of albums a user can create when he is not admin and owner only is active', 'wp-photo-album-plus'));
|
7101 |
-
$help .= '<br />'.(__('A number of 0 means No limit', 'wp-photo-album-plus'));
|
7102 |
-
$slug = 'wppa_max_albums';
|
7103 |
-
$html = wppa_input($slug, '50px', '', 'albums');
|
7104 |
-
wppa_setting_new($slug, '28', $name, $desc, $html, $help);
|
7105 |
-
|
7106 |
$name = __('Default photo name', 'wp-photo-album-plus');
|
7107 |
$desc = __('Select the way the name of a new uploaded photo should be determined.', 'wp-photo-album-plus');
|
7108 |
$help = __('If you select an IPTC Tag and it is not found, the filename will be used instead.', 'wp-photo-album-plus');
|
@@ -7231,7 +7219,6 @@ global $wppa_subtab_names;
|
|
7231 |
__('Moderate', 'wp-photo-album-plus') => 'auto;',
|
7232 |
__('Export', 'wp-photo-album-plus') => 'auto;',
|
7233 |
__('Settings', 'wp-photo-album-plus') => 'auto;',
|
7234 |
-
__('Photo of the day', 'wp-photo-album-plus') => 'auto;',
|
7235 |
__('Comments', 'wp-photo-album-plus') => 'auto;',
|
7236 |
__('Documentation', 'wp-photo-album-plus') => 'auto;',
|
7237 |
__('Membership', 'wp-photo-album-plus') => 'auto;',
|
@@ -7246,7 +7233,6 @@ global $wppa_subtab_names;
|
|
7246 |
'wppa_moderate',
|
7247 |
'wppa_export',
|
7248 |
'wppa_settings',
|
7249 |
-
'wppa_potd',
|
7250 |
'wppa_comments',
|
7251 |
'wppa_help',
|
7252 |
'wppa_medal',
|
@@ -7317,6 +7303,16 @@ global $wppa_subtab_names;
|
|
7317 |
$html = array( $html1, $html2 );
|
7318 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
7319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7320 |
$name = __('Max nesting level', 'wp-photo-album-plus');
|
7321 |
$desc = __('Limits the max nesting level for frontent created albums', 'wp-photo-album-plus');
|
7322 |
$help = '';
|
@@ -7325,7 +7321,7 @@ global $wppa_subtab_names;
|
|
7325 |
$html1 = wppa_number($slug, '0', '99');
|
7326 |
$html2 = '';
|
7327 |
$html = array( $html1, $html2 );
|
7328 |
-
wppa_setting_new($slug, '
|
7329 |
|
7330 |
$name = __('User edit album', 'wp-photo-album-plus');
|
7331 |
$desc = __('Enable frontend edit album name and description.', 'wp-photo-album-plus');
|
@@ -7334,7 +7330,7 @@ global $wppa_subtab_names;
|
|
7334 |
$html1 = wppa_checkbox($slug);
|
7335 |
$html2 = '';
|
7336 |
$html = array( $html1, $html2 );
|
7337 |
-
wppa_setting_new($slug, '
|
7338 |
|
7339 |
$name = __('User delete Albums', 'wp-photo-album-plus');
|
7340 |
$desc = __('Enable frontend album deletion', 'wp-photo-album-plus');
|
@@ -7344,15 +7340,6 @@ global $wppa_subtab_names;
|
|
7344 |
$html1 = wppa_checkbox($slug, $onchange);
|
7345 |
$html2 = '';
|
7346 |
$html = array( $html1, $html2 );
|
7347 |
-
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
7348 |
-
|
7349 |
-
$name = __('User create Albums login', 'wp-photo-album-plus');
|
7350 |
-
$desc = __('Frontend album creation requires the user is logged in.', 'wp-photo-album-plus');
|
7351 |
-
$help = '';
|
7352 |
-
$slug = 'wppa_user_create_login';
|
7353 |
-
$html1 = wppa_checkbox($slug, 'wppaRefreshAfter();');
|
7354 |
-
$html2 = '';
|
7355 |
-
$html = array( $html1, $html2 );
|
7356 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
7357 |
|
7358 |
$name = __('User create Albums Captcha', 'wp-photo-album-plus');
|
@@ -7384,33 +7371,28 @@ global $wppa_subtab_names;
|
|
7384 |
$vals = array( '0', '3600', '86400', '604800', '2592000', '31449600');
|
7385 |
|
7386 |
$roles = $wp_roles->roles;
|
7387 |
-
$roles['loggedout'] = array();
|
7388 |
-
$roles['loggedout']['name'] = __('Logged out', 'wp-photo-album-plus');
|
7389 |
unset ( $roles['administrator'] );
|
7390 |
foreach (array_keys($roles) as $role) {
|
7391 |
$t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
|
7392 |
if ( wppa_get_option('wppa_'.$role.'_upload_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_count', '0');
|
7393 |
if ( wppa_get_option('wppa_'.$role.'_upload_limit_time', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_time', '0');
|
7394 |
$name = sprintf(__('Upload limit %s', 'wp-photo-album-plus'), $t_role);
|
7395 |
-
|
7396 |
-
|
7397 |
-
if ( $role == 'loggedout' ) $help = __('This setting has only effect when User Create Album Login is unchecked.', 'wp-photo-album-plus');
|
7398 |
-
else $help = __('This limitation only applies to frontend uploads when the same userrole does not have the Upload checkbox checked.', 'wp-photo-album-plus');
|
7399 |
$help .= '<br />'.__('A value of 0 means: no limit.', 'wp-photo-album-plus') . wppa_see_also( 'admin', '1' );
|
7400 |
$slug1 = 'wppa_'.$role.'_upload_limit_count';
|
7401 |
$html1 = wppa_input($slug1, '50px', '', __('photos', 'wp-photo-album-plus'));
|
7402 |
$slug2 = 'wppa_'.$role.'_upload_limit_time';
|
7403 |
$html2 = wppa_select($slug2, $opts, $vals);
|
7404 |
$html = array( $html1, $html2 );
|
7405 |
-
|
7406 |
}
|
7407 |
|
7408 |
foreach (array_keys($roles) as $role) {
|
7409 |
$t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
|
7410 |
if ( wppa_get_option('wppa_'.$role.'_album_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_album_limit_count', '0');
|
7411 |
$name = sprintf(__('Album limit %s', 'wp-photo-album-plus'), $t_role);
|
7412 |
-
|
7413 |
-
else $desc = sprintf(__('Limit number of albums for the user role %s.', 'wp-photo-album-plus'), $t_role);
|
7414 |
$help = __('This limitation only applies to frontend create albums when the same userrole does not have the Album admin checkbox checked.', 'wp-photo-album-plus');
|
7415 |
$help .= '<br />'.__('A value of 0 means: no limit.', 'wp-photo-album-plus') . wppa_see_also( 'admin', '1' );
|
7416 |
$slug1 = 'wppa_'.$role.'_album_limit_count';
|
@@ -7418,7 +7400,7 @@ global $wppa_subtab_names;
|
|
7418 |
$slug2 = '';
|
7419 |
$html2 = '';
|
7420 |
$html = array( $html1, $html2 );
|
7421 |
-
|
7422 |
}
|
7423 |
|
7424 |
$name = __('Upload one only', 'wp-photo-album-plus');
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
885 |
$help = '';
|
886 |
$slug = 'wppa_user_upload_on';
|
887 |
$onch = 'wppaRefreshAfter();';
|
888 |
+
$html = wppa_checkbox($slug, $onch) . wppa_see_also( 'users', '1', '', 'user_upload_on' ) . wppa_see_also( 'new', '1', '18..26', 'user_upload_on' );
|
889 |
wppa_setting_new($slug, '6', $name, $desc, $html, $help);
|
890 |
|
891 |
$name = __('Enable Email', 'wp-photo-album-plus');
|
5785 |
$html = wppa_checkbox($slug);
|
5786 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_switch( 'enable_audio' ));
|
5787 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5788 |
$name = __('User upload roles', 'wp-photo-album-plus');
|
5789 |
$desc = __('Optionally limit access to selected userroles', 'wp-photo-album-plus');
|
5790 |
$help = '';
|
5802 |
}
|
5803 |
$onch = '';
|
5804 |
$html = wppa_select_m($slug, $opts, $vals, $onch, '', false, '', '220' );
|
5805 |
+
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
5806 |
|
5807 |
$name = __('Progressin bar', 'wp-photo-album-plus');
|
5808 |
$desc = __('Shows the upload progression bar.', 'wp-photo-album-plus');
|
5809 |
$help = '';
|
5810 |
$slug = 'wppa_ajax_upload';
|
5811 |
$html = wppa_checkbox($slug);
|
5812 |
+
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
5813 |
|
5814 |
$name = __('Show Copyright', 'wp-photo-album-plus');
|
5815 |
$desc = __('Show a copyright warning on frontend upload form.', 'wp-photo-album-plus');
|
5816 |
$help = '';
|
5817 |
$slug = 'wppa_copyright_on';
|
5818 |
$html = wppa_checkbox($slug, 'wppaSlave(this,\'wppa_copyright_notice\');');
|
5819 |
+
wppa_setting_new($slug, '6', $name, $desc, $html, $help);
|
5820 |
|
5821 |
$name = __('Copyright notice', 'wp-photo-album-plus');
|
5822 |
$desc = __('The message to be displayed.', 'wp-photo-album-plus');
|
5823 |
$help = '';
|
5824 |
$slug = 'wppa_copyright_notice';
|
5825 |
$html = wppa_textarea($slug, $name);
|
5826 |
+
wppa_setting_new($slug, '7', $name, $desc, $html, $help, wppa_switch( 'copyright_on' ));
|
5827 |
|
5828 |
$name = __('User Watermark', 'wp-photo-album-plus');
|
5829 |
$desc = __('Uploading users may select watermark settings', 'wp-photo-album-plus');
|
5830 |
$help = __('If checked, anyone who can upload and/or import photos can overrule the default watermark settings.', 'wp-photo-album-plus');
|
5831 |
$slug = 'wppa_watermark_user';
|
5832 |
$html = wppa_checkbox($slug);
|
5833 |
+
wppa_setting_new($slug, '8', $name, $desc, $html, $help, wppa_switch('watermark_on'));
|
5834 |
|
5835 |
$name = __('User name', 'wp-photo-album-plus');
|
5836 |
$desc = __('Uploading users may overrule the default name.', 'wp-photo-album-plus');
|
5839 |
$slug1 = 'wppa_name_user';
|
5840 |
$slug2 = 'wppa_name_user_mandatory';
|
5841 |
$html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
|
5842 |
+
wppa_setting_new($slug1, '9', $name, $desc, $html, $help);
|
5843 |
|
5844 |
$name = __('Apply Newphoto desc user', 'wp-photo-album-plus');
|
5845 |
$desc = __('Give each new frontend uploaded photo a standard description.', 'wp-photo-album-plus');
|
5848 |
$help .= '<br />'.wppa_see_also( 'new', '1', '13' );
|
5849 |
$slug = 'wppa_apply_newphoto_desc_user';
|
5850 |
$html = wppa_checkbox($slug);
|
5851 |
+
wppa_setting_new($slug, '10', $name, $desc, $html, $help);
|
5852 |
|
5853 |
$name = __('User desc', 'wp-photo-album-plus');
|
5854 |
$desc = __('Uploading users may overrule the default description.', 'wp-photo-album-plus');
|
5856 |
$slug1 = 'wppa_desc_user';
|
5857 |
$slug2 = 'wppa_desc_user_mandatory';
|
5858 |
$html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
|
5859 |
+
wppa_setting_new($slug, '11', $name, $desc, $html, $help);
|
5860 |
|
5861 |
$name = __('User upload custom', 'wp-photo-album-plus');
|
5862 |
$desc = __('Frontend upload can fill in custom data fields.', 'wp-photo-album-plus');
|
5863 |
$help = '';
|
5864 |
$slug = 'wppa_fe_custom_fields';
|
5865 |
$html = wppa_checkbox($slug).wppa_see_also( 'custom', '2' );;
|
5866 |
+
wppa_setting_new($slug, '12', $name, $desc, $html, $help);
|
5867 |
|
5868 |
$name = __('User upload tags', 'wp-photo-album-plus');
|
5869 |
$desc = __('Frontend upload can add tags.', 'wp-photo-album-plus');
|
5870 |
$help = '';
|
5871 |
$slug = 'wppa_fe_upload_tags';
|
5872 |
$html = wppa_checkbox($slug, 'wppaRefreshAfter();');
|
5873 |
+
wppa_setting_new($slug, '13', $name, $desc, $html, $help);
|
5874 |
|
5875 |
if ( wppa_switch( 'fe_upload_tags' ) ) {
|
5876 |
|
5880 |
$slug1 = 'wppa_up_tagselbox_on_1';
|
5881 |
$slug2 = 'wppa_up_tagselbox_multi_1';
|
5882 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5883 |
+
wppa_setting_new($slug, '14', $name, $desc, $html, $help, wppa_switch( 'fe_upload_tags' ) );
|
5884 |
|
5885 |
$name = __('Caption box', 'wp-photo-album-plus').' 1';
|
5886 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5887 |
$help = '';
|
5888 |
$slug = 'wppa_up_tagselbox_title_1';
|
5889 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5890 |
+
wppa_setting_new($slug, '15', $name, $desc, $html, $help, wppa_switch( 'fe_upload_tags' ) );
|
5891 |
|
5892 |
$name = __('Tags box', 'wp-photo-album-plus').' 1';
|
5893 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5894 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5895 |
$slug = 'wppa_up_tagselbox_content_1';
|
5896 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5897 |
+
wppa_setting_new($slug, '16', $name, $desc, $html, $help);
|
5898 |
|
5899 |
$name = __('Tag selection box', 'wp-photo-album-plus').' 2';
|
5900 |
$desc = __('Front-end upload tags selecion box.', 'wp-photo-album-plus');
|
5902 |
$slug1 = 'wppa_up_tagselbox_on_2';
|
5903 |
$slug2 = 'wppa_up_tagselbox_multi_2';
|
5904 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5905 |
+
wppa_setting_new($slug, '17', $name, $desc, $html, $help);
|
5906 |
|
5907 |
$name = __('Caption box', 'wp-photo-album-plus').' 2';
|
5908 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5909 |
$help = '';
|
5910 |
$slug = 'wppa_up_tagselbox_title_2';
|
5911 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5912 |
+
wppa_setting_new($slug, '18', $name, $desc, $html, $help);
|
5913 |
|
5914 |
$name = __('Tags box', 'wp-photo-album-plus').' 2';
|
5915 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5916 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5917 |
$slug = 'wppa_up_tagselbox_content_2';
|
5918 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5919 |
+
wppa_setting_new($slug, '19', $name, $desc, $html, $help);
|
5920 |
|
5921 |
$name = __('Tag selection box', 'wp-photo-album-plus').' 3';
|
5922 |
$desc = __('Front-end upload tags selecion box.', 'wp-photo-album-plus');
|
5924 |
$slug1 = 'wppa_up_tagselbox_on_3';
|
5925 |
$slug2 = 'wppa_up_tagselbox_multi_3';
|
5926 |
$html = '<span style="float:left" >'.__('On:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug1).'<span style="float:left" >'.__('Multi:', 'wp-photo-album-plus').'</span>'.wppa_checkbox($slug2);
|
5927 |
+
wppa_setting_new($slug, '20', $name, $desc, $html, $help);
|
5928 |
|
5929 |
$name = __('Caption box', 'wp-photo-album-plus').' 3';
|
5930 |
$desc = __('The title of the tag selection box.', 'wp-photo-album-plus');
|
5931 |
$help = '';
|
5932 |
$slug = 'wppa_up_tagselbox_title_3';
|
5933 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5934 |
+
wppa_setting_new($slug, '21', $name, $desc, $html, $help);
|
5935 |
|
5936 |
$name = __('Tags box', 'wp-photo-album-plus').' 3';
|
5937 |
$desc = __('The tags in the selection box.', 'wp-photo-album-plus');
|
5938 |
$help = __('Enter the tags you want to appear in the selection box. Empty means: all existing tags', 'wp-photo-album-plus');
|
5939 |
$slug = 'wppa_up_tagselbox_content_3';
|
5940 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5941 |
+
wppa_setting_new($slug, '22', $name, $desc, $html, $help);
|
5942 |
|
5943 |
$name = __('New tags', 'wp-photo-album-plus');
|
5944 |
$desc = __('Input field for any user defined tags.', 'wp-photo-album-plus');
|
5945 |
$help = '';
|
5946 |
$slug = 'wppa_up_tag_input_on';
|
5947 |
$html = wppa_checkbox($slug);
|
5948 |
+
wppa_setting_new($slug, '23', $name, $desc, $html, $help);
|
5949 |
|
5950 |
$name = __('New tags caption', 'wp-photo-album-plus');
|
5951 |
$desc = __('The caption above the tags input field.', 'wp-photo-album-plus');
|
5952 |
$help = '';
|
5953 |
$slug = 'wppa_up_tag_input_title';
|
5954 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5955 |
+
wppa_setting_new($slug, '24', $name, $desc, $html, $help);
|
5956 |
|
5957 |
$name = __('Tags box New', 'wp-photo-album-plus');
|
5958 |
$desc = __('The tags in the New tags input box.', 'wp-photo-album-plus');
|
5959 |
$help = '';
|
5960 |
$slug = 'wppa_up_tagbox_new';
|
5961 |
$html = wppa_edit( $slug, wppa_get_option( $slug ), '300px' );
|
5962 |
+
wppa_setting_new($slug, '25', $name, $desc, $html, $help);
|
5963 |
|
5964 |
$name = __('Preview tags', 'wp-photo-album-plus');
|
5965 |
$desc = __('Show a preview of all tags that will be added to the photo info.', 'wp-photo-album-plus');
|
5966 |
$help = '';
|
5967 |
$slug = 'wppa_up_tag_preview';
|
5968 |
$html = wppa_checkbox($slug);
|
5969 |
+
wppa_setting_new($slug, '26', $name, $desc, $html, $help);
|
5970 |
}
|
5971 |
|
5972 |
$name = __('Camera connect', 'wp-photo-album-plus');
|
5974 |
$help = '';
|
5975 |
$slug = 'wppa_camera_connect';
|
5976 |
$html = wppa_checkbox($slug);
|
5977 |
+
wppa_setting_new($slug, '27', $name, $desc, $html, $help);
|
5978 |
|
5979 |
$name = __('Blog It!', 'wp-photo-album-plus');
|
5980 |
$desc = __('Enable blogging photos.', 'wp-photo-album-plus');
|
5989 |
'always',
|
5990 |
);
|
5991 |
$html = wppa_select($slug, $opts, $vals);
|
5992 |
+
wppa_setting_new($slug, '28', $name, $desc, $html, $help);
|
5993 |
|
5994 |
$name = __('Blog It need moderation', 'wp-photo-album-plus');
|
5995 |
$desc = __('Posts with blogged photos need moderation.', 'wp-photo-album-plus');
|
5996 |
$help = '';
|
5997 |
$slug = 'wppa_blog_it_moderate';
|
5998 |
$html = wppa_checkbox($slug);
|
5999 |
+
wppa_setting_new($slug, '29', $name, $desc, $html, $help);
|
6000 |
|
6001 |
$name = __('Blog It shortcode', 'wp-photo-album-plus');
|
6002 |
$desc = __('Shortcode to be used on the blog post', 'wp-photo-album-plus');
|
6003 |
$help = __('Make sure it contains photo="#id"', 'wp-photo-album-plus');
|
6004 |
$slug = 'wppa_blog_it_shortcode';
|
6005 |
$html = wppa_input($slug, '85%');
|
6006 |
+
wppa_setting_new($slug, '30', $name, $desc, $html, $help);
|
6007 |
|
6008 |
$name = __('Frontend ending label', 'wp-photo-album-plus');
|
6009 |
$desc = __('Frontend upload / create / edit dialog closing label text.', 'wp-photo-album-plus');
|
6012 |
$opts = array( __('Abort', 'wp-photo-album-plus'), __('Cancel', 'wp-photo-album-plus'), __('Close', 'wp-photo-album-plus'), __('Exit', 'wp-photo-album-plus'), __('Quit', 'wp-photo-album-plus') );
|
6013 |
$vals = array( 'Abort', 'Cancel', 'Close', 'Exit', 'Quit' );
|
6014 |
$html = wppa_select($slug, $opts, $vals);
|
6015 |
+
wppa_setting_new($slug, '31', $name, $desc, $html, $help);
|
6016 |
|
6017 |
wppa_setting_box_footer_new();
|
6018 |
}
|
6581 |
$desc = __('Load photos from the server at the moment they will show up.', 'wp-photo-album-plus');
|
6582 |
$help = '';
|
6583 |
$slug = 'wppa_lazy';
|
6584 |
+
$opts = array(__('Off', 'wp-photo-album-plus'),__('On pc only', 'wp-photo-album-plus'),__('On mobile only', 'wp-photo-album-plus'),__('On both', 'wp-photo-album-plus'));
|
6585 |
+
$vals = array('none','pc','mob','all');
|
6586 |
+
$html = wppa_select($slug, $opts, $vals);
|
6587 |
wppa_setting_new($slug, '23', $name, $desc, $html, $help);
|
6588 |
|
6589 |
$name = __('Thumbs first', 'wp-photo-album-plus');
|
6985 |
$desc = __('Create an album for each user logging in.', 'wp-photo-album-plus');
|
6986 |
$help = '';
|
6987 |
$slug = 'wppa_grant_an_album';
|
6988 |
+
$html = wppa_checkbox($slug, 'wppaRefreshAfter();');
|
6989 |
wppa_setting_new($slug, '18', $name, $desc, $html, $help);
|
6990 |
|
6991 |
+
if ( wppa_switch( 'grant_an_album' ) ) {
|
6992 |
+
$name = __('Grant album name', 'wp-photo-album-plus');
|
6993 |
+
$desc = __('The name to be used for the album.', 'wp-photo-album-plus');
|
6994 |
+
$help = '';
|
6995 |
+
$slug = 'wppa_grant_name';
|
6996 |
+
$opts = array(__('Login name', 'wp-photo-album-plus'), __('Display name', 'wp-photo-album-plus'), __('Id', 'wp-photo-album-plus'), __('Firstname Lastname', 'wp-photo-album-plus'));
|
6997 |
+
$vals = array('login', 'display', 'id', 'firstlast');
|
6998 |
+
$html = wppa_select($slug, $opts, $vals);
|
6999 |
+
wppa_setting_new($slug, '19', $name, $desc, $html, $help);
|
7000 |
|
7001 |
+
$name = __('Grant parent selection method', 'wp-photo-album-plus');
|
7002 |
+
$desc = __('The way the grant parents are defined.', 'wp-photo-album-plus');
|
7003 |
+
$help = '';
|
7004 |
+
$slug = 'wppa_grant_parent_sel_method';
|
7005 |
+
$opts = array( __('An album (multi)selectionbox', 'wp-photo-album-plus'),
|
7006 |
+
__('An album category', 'wp-photo-album-plus'),
|
7007 |
+
__('An index search token', 'wp-photo-album-plus'),
|
7008 |
+
);
|
7009 |
+
$vals = array( 'selectionbox',
|
7010 |
+
'category',
|
7011 |
+
'indexsearch'
|
7012 |
+
);
|
7013 |
+
$onch = 'wppaRefreshAfter();';
|
7014 |
+
$html = wppa_select($slug, $opts, $vals, $onch);
|
7015 |
+
wppa_setting_new($slug, '20', $name, $desc, $html, $help);
|
7016 |
|
7017 |
+
switch( wppa_opt( 'grant_parent_sel_method' ) ) {
|
7018 |
+
case 'selectionbox':
|
7019 |
+
$name = __('Grant parent', 'wp-photo-album-plus');
|
7020 |
+
$desc = __('The parent album(s) of the auto created albums.', 'wp-photo-album-plus');
|
7021 |
+
$help = (__('You may select multiple albums. All logged in visitors will get their own sub-album in each granted parent.', 'wp-photo-album-plus'));
|
7022 |
+
$slug = 'wppa_grant_parent';
|
7023 |
+
$opts = array( __('--- none ---', 'wp-photo-album-plus'), __('--- separate ---', 'wp-photo-album-plus') );
|
7024 |
+
$vals = array( 'zero', '-1');
|
7025 |
+
$albs = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY name", ARRAY_A );
|
7026 |
+
if ( $albs ) {
|
7027 |
+
foreach ( $albs as $alb ) {
|
7028 |
+
$opts[] = __(stripslashes($alb['name']), 'wp-photo-album-plus');
|
7029 |
+
$vals[] = $alb['id'];
|
7030 |
+
}
|
7031 |
}
|
7032 |
+
$html = wppa_select_m($slug, $opts, $vals);//, '', '', true);
|
7033 |
+
wppa_setting_new($slug, '21', $name, $desc, $html, $help);
|
7034 |
+
break;
|
7035 |
+
|
7036 |
+
case 'category':
|
7037 |
+
$name = __('Grant parent category', 'wp-photo-album-plus');
|
7038 |
+
$desc = __('The category of the parent album(s) of the auto created albums.', 'wp-photo-album-plus');
|
7039 |
+
$help = '';
|
7040 |
+
$slug = 'wppa_grant_parent';
|
7041 |
+
$catlist = wppa_get_catlist();
|
7042 |
+
$opts = array();
|
7043 |
+
foreach( $catlist as $cat ) {
|
7044 |
+
$opts[] = $cat['cat'];
|
7045 |
+
}
|
7046 |
+
$vals = $opts;
|
7047 |
+
$html = wppa_select($slug, $opts, $vals);
|
7048 |
+
wppa_setting_new($slug, '22', $name, $desc, $html, $help);
|
7049 |
+
break;
|
7050 |
+
|
7051 |
+
case 'indexsearch':
|
7052 |
+
$name = __('Grant parent index token', 'wp-photo-album-plus');
|
7053 |
+
$desc = __('The index token that defines the parent album(s) of the auto created albums.', 'wp-photo-album-plus');
|
7054 |
+
$help = '';
|
7055 |
+
$slug = 'wppa_grant_parent';
|
7056 |
+
$html = wppa_input($slug, '150px');
|
7057 |
+
wppa_setting_new($slug, '23', $name, $desc, $html, $help);
|
7058 |
+
break;
|
7059 |
+
|
7060 |
+
default:
|
7061 |
+
wppa_log( 'err', 'Unimplemented grant_parent_sel_method in settings page' );
|
7062 |
+
break;
|
7063 |
+
}
|
|
|
7064 |
|
7065 |
+
$name = __('Grant categories', 'wp-photo-album-plus');
|
7066 |
+
$desc = __('The categories a new granted album will get.', 'wp-photo-album-plus');
|
7067 |
+
$help = '';
|
7068 |
+
$slug = 'wppa_grant_cats';
|
7069 |
+
$html = wppa_input($slug, '150px');
|
7070 |
+
wppa_setting_new($slug, '24', $name, $desc, $html, $help);
|
7071 |
|
7072 |
+
$name = __('Grant tags', 'wp-photo-album-plus');
|
7073 |
+
$desc = __('The default tags the photos in a new granted album will get.', 'wp-photo-album-plus');
|
7074 |
+
$help = '';
|
7075 |
+
$slug = 'wppa_grant_tags';
|
7076 |
+
$html = wppa_input($slug, '150px');
|
7077 |
+
wppa_setting_new($slug, '25', $name, $desc, $html, $help);
|
7078 |
|
7079 |
+
$name = __('Grant restrict', 'wp-photo-album-plus');
|
7080 |
+
$desc = __('Only create albums for users with Album Admin rights', 'wp-photo-album-plus');
|
7081 |
+
$help = '';
|
7082 |
+
$slug = 'wppa_grant_restrict';
|
7083 |
+
$html = wppa_checkbox($slug) . wppa_see_also( 'admin', '1' );
|
7084 |
+
wppa_setting_new($slug, '26', $name, $desc, $html, $help);
|
7085 |
+
}
|
7086 |
|
7087 |
$name = __('Iptc 025 keywords to tags', 'wp-photo-album-plus');
|
7088 |
$desc = __('Convert IPTC025 keywords to tags during upload.', 'wp-photo-album-plus');
|
7091 |
$html = wppa_checkbox( $slug );
|
7092 |
wppa_setting_new($slug, '27', $name, $desc, $html, $help);
|
7093 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7094 |
$name = __('Default photo name', 'wp-photo-album-plus');
|
7095 |
$desc = __('Select the way the name of a new uploaded photo should be determined.', 'wp-photo-album-plus');
|
7096 |
$help = __('If you select an IPTC Tag and it is not found, the filename will be used instead.', 'wp-photo-album-plus');
|
7219 |
__('Moderate', 'wp-photo-album-plus') => 'auto;',
|
7220 |
__('Export', 'wp-photo-album-plus') => 'auto;',
|
7221 |
__('Settings', 'wp-photo-album-plus') => 'auto;',
|
|
|
7222 |
__('Comments', 'wp-photo-album-plus') => 'auto;',
|
7223 |
__('Documentation', 'wp-photo-album-plus') => 'auto;',
|
7224 |
__('Membership', 'wp-photo-album-plus') => 'auto;',
|
7233 |
'wppa_moderate',
|
7234 |
'wppa_export',
|
7235 |
'wppa_settings',
|
|
|
7236 |
'wppa_comments',
|
7237 |
'wppa_help',
|
7238 |
'wppa_medal',
|
7303 |
$html = array( $html1, $html2 );
|
7304 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
7305 |
|
7306 |
+
$name = __('Max user albums', 'wp-photo-album-plus');
|
7307 |
+
$desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
|
7308 |
+
$help = __('The maximum number of albums a user can create when he is not admin', 'wp-photo-album-plus');
|
7309 |
+
$help .= '<br />'.__('A number of 0 means No limit', 'wp-photo-album-plus');
|
7310 |
+
$slug = 'wppa_max_albums';
|
7311 |
+
$html1 = wppa_input($slug, '50px', '', 'albums');
|
7312 |
+
$html2 = '';
|
7313 |
+
$html = array( $html1, $html2 );
|
7314 |
+
wppa_setting_new($slug, '2', $name, $desc, $html, $help, wppa_switch( 'user_create_on' ));
|
7315 |
+
|
7316 |
$name = __('Max nesting level', 'wp-photo-album-plus');
|
7317 |
$desc = __('Limits the max nesting level for frontent created albums', 'wp-photo-album-plus');
|
7318 |
$help = '';
|
7321 |
$html1 = wppa_number($slug, '0', '99');
|
7322 |
$html2 = '';
|
7323 |
$html = array( $html1, $html2 );
|
7324 |
+
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
7325 |
|
7326 |
$name = __('User edit album', 'wp-photo-album-plus');
|
7327 |
$desc = __('Enable frontend edit album name and description.', 'wp-photo-album-plus');
|
7330 |
$html1 = wppa_checkbox($slug);
|
7331 |
$html2 = '';
|
7332 |
$html = array( $html1, $html2 );
|
7333 |
+
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
7334 |
|
7335 |
$name = __('User delete Albums', 'wp-photo-album-plus');
|
7336 |
$desc = __('Enable frontend album deletion', 'wp-photo-album-plus');
|
7340 |
$html1 = wppa_checkbox($slug, $onchange);
|
7341 |
$html2 = '';
|
7342 |
$html = array( $html1, $html2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7343 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
7344 |
|
7345 |
$name = __('User create Albums Captcha', 'wp-photo-album-plus');
|
7371 |
$vals = array( '0', '3600', '86400', '604800', '2592000', '31449600');
|
7372 |
|
7373 |
$roles = $wp_roles->roles;
|
|
|
|
|
7374 |
unset ( $roles['administrator'] );
|
7375 |
foreach (array_keys($roles) as $role) {
|
7376 |
$t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
|
7377 |
if ( wppa_get_option('wppa_'.$role.'_upload_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_count', '0');
|
7378 |
if ( wppa_get_option('wppa_'.$role.'_upload_limit_time', 'nil') == 'nil') update_option('wppa_'.$role.'_upload_limit_time', '0');
|
7379 |
$name = sprintf(__('Upload limit %s', 'wp-photo-album-plus'), $t_role);
|
7380 |
+
$desc = sprintf(__('Limit upload capacity for the user role %s.', 'wp-photo-album-plus'), $t_role);
|
7381 |
+
$help = __('This limitation only applies to frontend uploads when the same userrole does not have the Upload checkbox checked.', 'wp-photo-album-plus');
|
|
|
|
|
7382 |
$help .= '<br />'.__('A value of 0 means: no limit.', 'wp-photo-album-plus') . wppa_see_also( 'admin', '1' );
|
7383 |
$slug1 = 'wppa_'.$role.'_upload_limit_count';
|
7384 |
$html1 = wppa_input($slug1, '50px', '', __('photos', 'wp-photo-album-plus'));
|
7385 |
$slug2 = 'wppa_'.$role.'_upload_limit_time';
|
7386 |
$html2 = wppa_select($slug2, $opts, $vals);
|
7387 |
$html = array( $html1, $html2 );
|
7388 |
+
wppa_setting_new(false, '8.'.$t_role, $name, $desc, $html, $help);
|
7389 |
}
|
7390 |
|
7391 |
foreach (array_keys($roles) as $role) {
|
7392 |
$t_role = isset( $roles[$role]['name'] ) ? translate_user_role( $roles[$role]['name'] ) : $role;
|
7393 |
if ( wppa_get_option('wppa_'.$role.'_album_limit_count', 'nil') == 'nil') update_option('wppa_'.$role.'_album_limit_count', '0');
|
7394 |
$name = sprintf(__('Album limit %s', 'wp-photo-album-plus'), $t_role);
|
7395 |
+
$desc = sprintf(__('Limit number of albums for the user role %s.', 'wp-photo-album-plus'), $t_role);
|
|
|
7396 |
$help = __('This limitation only applies to frontend create albums when the same userrole does not have the Album admin checkbox checked.', 'wp-photo-album-plus');
|
7397 |
$help .= '<br />'.__('A value of 0 means: no limit.', 'wp-photo-album-plus') . wppa_see_also( 'admin', '1' );
|
7398 |
$slug1 = 'wppa_'.$role.'_album_limit_count';
|
7400 |
$slug2 = '';
|
7401 |
$html2 = '';
|
7402 |
$html = array( $html1, $html2 );
|
7403 |
+
wppa_setting_new(false, '9.'.$t_role, $name, $desc, $html, $help);
|
7404 |
}
|
7405 |
|
7406 |
$name = __('Upload one only', 'wp-photo-album-plus');
|
wppa-setup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -260,6 +260,12 @@ global $wppa_error;
|
|
260 |
get_option( 'wppa_keep_source_frontend', 'yes' ) == 'no' ) {
|
261 |
update_option( 'wppa_keep_source', 'no' );
|
262 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
}
|
265 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
260 |
get_option( 'wppa_keep_source_frontend', 'yes' ) == 'no' ) {
|
261 |
update_option( 'wppa_keep_source', 'no' );
|
262 |
}
|
263 |
+
if ( get_option( 'wppa_lazy', 'no' ) == 'no' ) {
|
264 |
+
update_option( 'wppa_lazy', 'none' );
|
265 |
+
}
|
266 |
+
elseif ( get_option( 'wppa_lazy', 'no' ) == 'yes' ) {
|
267 |
+
update_option( 'wppa_lazy', 'all' );
|
268 |
+
}
|
269 |
}
|
270 |
}
|
271 |
|
wppa-thumbnails.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
-
* Version 8.0.00.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -252,7 +252,7 @@ global $wpdb;
|
|
252 |
$result .= '<img' .
|
253 |
' onclick="' . $onclick . '"' .
|
254 |
' id="i-' . $xid . '-'.$mocc . '"' .
|
255 |
-
' ' . (
|
256 |
' ' . $imgalt .
|
257 |
( $title ? ' title="' . $title . '"' : '' ) .
|
258 |
' width="' . $imgwidth . '"' .
|
@@ -293,7 +293,7 @@ global $wpdb;
|
|
293 |
else {
|
294 |
$result .= '<img' .
|
295 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
296 |
-
' ' . (
|
297 |
( $title ? ' title="' . $title . '"' : '' ) .
|
298 |
' width="' . $imgwidth . '"' .
|
299 |
' height="' . $imgheight . '"' .
|
@@ -350,7 +350,7 @@ global $wpdb;
|
|
350 |
$title = wppa_zoom_in( $id );
|
351 |
$result .= '<img' .
|
352 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
353 |
-
' ' . (
|
354 |
' ' . $imgalt .
|
355 |
( $title ? ' title="' . $title . '"' : '' ) .
|
356 |
' width="' . $imgwidth . '"' .
|
@@ -388,7 +388,7 @@ global $wpdb;
|
|
388 |
else {
|
389 |
$result .= '<img' .
|
390 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
391 |
-
' ' . (
|
392 |
' ' . $imgalt .
|
393 |
( $title ? ' title="' . $title . '"' : '' ) .
|
394 |
' width="' . $imgwidth . '"' .
|
@@ -429,7 +429,7 @@ global $wpdb;
|
|
429 |
}
|
430 |
else {
|
431 |
$result .= '<img' .
|
432 |
-
' ' . (
|
433 |
' ' . $imgalt .
|
434 |
( $title ? ' title="' . $title . '"' : '' ) .
|
435 |
' width="' . $imgwidth . '"' .
|
@@ -462,7 +462,7 @@ global $wpdb;
|
|
462 |
}
|
463 |
else {
|
464 |
$result .= '<img' .
|
465 |
-
' ' . (
|
466 |
' ' . $imgalt .
|
467 |
( $title ? ' title="' . $title . '"' : '' ) .
|
468 |
' width="' . $imgwidth . '"' .
|
@@ -566,11 +566,11 @@ global $wpdb;
|
|
566 |
|
567 |
'<img' .
|
568 |
' id="wppa-like-' . $id . '-' . $mocc . '"' .
|
569 |
-
' ' . (
|
570 |
' alt="up"' .
|
571 |
' title="' . esc_attr( $lt['title'] ) . '"' .
|
572 |
' style="height:16px; margin:0 0 -3px 0; padding:0 4px; box-shadow:none; display:inline;"' .
|
573 |
-
' class="no-shadow
|
574 |
' onmouseover="jQuery(this).stop().fadeTo(100, 1.0);"' .
|
575 |
' onmouseout="jQuery(this).stop().fadeTo(100, wppaStarOpacity);"' .
|
576 |
' onclick="wppaOvlRateIt( \'' . wppa_encrypt_photo( $id ) . '\', 1, ' . $mocc . ' );' . '"' .
|
@@ -981,7 +981,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
981 |
}
|
982 |
else {
|
983 |
$result .= '<img' .
|
984 |
-
' ' . (
|
985 |
' ' . wppa_get_imgalt( $id ) .
|
986 |
' class="image wppa-img"' .
|
987 |
' width="' . $imgwidth . '"' .
|
@@ -1020,7 +1020,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
1020 |
}
|
1021 |
else {
|
1022 |
$result .= '<img' .
|
1023 |
-
' ' . (
|
1024 |
' ' . wppa_get_imgalt( $id ) .
|
1025 |
' class="image wppa-img"' .
|
1026 |
' width="' . $imgwidth . '"' .
|
@@ -1053,7 +1053,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
1053 |
}
|
1054 |
else {
|
1055 |
$result .= '<img' .
|
1056 |
-
' ' . (
|
1057 |
' ' . wppa_get_imgalt( $id ) .
|
1058 |
' class="image wppa-img"' .
|
1059 |
' width="' . $imgwidth . '"' .
|
@@ -1206,7 +1206,7 @@ global $wpdb;
|
|
1206 |
$style = $imgattr_a['style'];
|
1207 |
$result .= '<a href="' . get_permalink() . '">' .
|
1208 |
'<img' .
|
1209 |
-
' ' . (
|
1210 |
' ' . $imgalt .
|
1211 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1212 |
' style="'.$style.'"' .
|
@@ -1302,7 +1302,7 @@ global $wpdb;
|
|
1302 |
$result .= '<img' .
|
1303 |
' onclick="' . $onclick . '"' .
|
1304 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1305 |
-
' ' . (
|
1306 |
' ' . $imgalt .
|
1307 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1308 |
' style="' . $imgstyle . ' cursor:pointer;"' .
|
@@ -1338,7 +1338,7 @@ global $wpdb;
|
|
1338 |
else {
|
1339 |
$result .= '<img' .
|
1340 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1341 |
-
' ' . (
|
1342 |
' ' . $imgalt .
|
1343 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1344 |
' style="' . $imgstyle . 'cursor:pointer;"' .
|
@@ -1397,7 +1397,7 @@ global $wpdb;
|
|
1397 |
else {
|
1398 |
$result .= '<img' .
|
1399 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1400 |
-
' ' . (
|
1401 |
' ' . $imgalt .
|
1402 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1403 |
' style="' . $imgstyle . $cursor . '"' .
|
@@ -1439,7 +1439,7 @@ global $wpdb;
|
|
1439 |
else {
|
1440 |
$result .= '<img' .
|
1441 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1442 |
-
' ' . (
|
1443 |
' ' . $imgalt .
|
1444 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1445 |
' style="' . $imgstyle . 'cursor:pointer;"' .
|
@@ -1481,7 +1481,7 @@ global $wpdb;
|
|
1481 |
else {
|
1482 |
$result .= '<img' .
|
1483 |
' id="i-'.$xid.'-'.$mocc.'"' .
|
1484 |
-
' ' . (
|
1485 |
' ' . $imgalt .
|
1486 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1487 |
' width="' . $imgwidth . '"' .
|
@@ -1517,7 +1517,7 @@ global $wpdb;
|
|
1517 |
else {
|
1518 |
$result .= '<img' .
|
1519 |
' id="i-'.$xid.'-'.$mocc.'"' .
|
1520 |
-
' ' . (
|
1521 |
' ' . $imgalt .
|
1522 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1523 |
' width="' . $imgwidth . '"' .
|
@@ -1666,7 +1666,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1666 |
$result .= '<img' .
|
1667 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1668 |
( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
|
1669 |
-
' ' . (
|
1670 |
' width="' . strval( intval( $imgstyle_a['width'] ) ) . '"' .
|
1671 |
' height="' . strval( intval( $imgstyle_a['height'] ) ) . '"' .
|
1672 |
' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
|
@@ -1720,7 +1720,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1720 |
$result .= '<img' .
|
1721 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1722 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1723 |
-
' ' . (
|
1724 |
' width="' . $imgstyle_a['width'] . '"' .
|
1725 |
' height="' . $imgstyle_a['height'] . '"' .
|
1726 |
' style="' . $imgstyle_a['style'] . '"' .
|
@@ -1756,7 +1756,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1756 |
$result .= '<img' .
|
1757 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1758 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1759 |
-
' ' . (
|
1760 |
' width="' . $imgstyle_a['width'] . '"' .
|
1761 |
' height="' . $imgstyle_a['height'] . '"' .
|
1762 |
' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
|
@@ -1797,7 +1797,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1797 |
$result .= '<img' .
|
1798 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1799 |
( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
|
1800 |
-
' ' . (
|
1801 |
' width="' . $imgstyle_a['width'] . '"' .
|
1802 |
' height="' . $imgstyle_a['height'] . '"' .
|
1803 |
' style="' . $imgstyle_a['style'] . '"' .
|
@@ -1928,7 +1928,7 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
|
|
1928 |
$result .= '<img' .
|
1929 |
' id="wppa-' . $tmp . '-' . $idx . '-' . $mocc . '"' .
|
1930 |
' class="wppa-' . $tmp . '-' . $mocc . '"' .
|
1931 |
-
' ' . ( (
|
1932 |
' ' . $imgalt .
|
1933 |
' style="' . $imgstyle . $cursor . '"' .
|
1934 |
' ' . $events .
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
+
* Version 8.0.00.014
|
9 |
*
|
10 |
*/
|
11 |
|
252 |
$result .= '<img' .
|
253 |
' onclick="' . $onclick . '"' .
|
254 |
' id="i-' . $xid . '-'.$mocc . '"' .
|
255 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
256 |
' ' . $imgalt .
|
257 |
( $title ? ' title="' . $title . '"' : '' ) .
|
258 |
' width="' . $imgwidth . '"' .
|
293 |
else {
|
294 |
$result .= '<img' .
|
295 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
296 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '" ' . $imgalt .
|
297 |
( $title ? ' title="' . $title . '"' : '' ) .
|
298 |
' width="' . $imgwidth . '"' .
|
299 |
' height="' . $imgheight . '"' .
|
350 |
$title = wppa_zoom_in( $id );
|
351 |
$result .= '<img' .
|
352 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
353 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
354 |
' ' . $imgalt .
|
355 |
( $title ? ' title="' . $title . '"' : '' ) .
|
356 |
' width="' . $imgwidth . '"' .
|
388 |
else {
|
389 |
$result .= '<img' .
|
390 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
391 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
392 |
' ' . $imgalt .
|
393 |
( $title ? ' title="' . $title . '"' : '' ) .
|
394 |
' width="' . $imgwidth . '"' .
|
429 |
}
|
430 |
else {
|
431 |
$result .= '<img' .
|
432 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
433 |
' ' . $imgalt .
|
434 |
( $title ? ' title="' . $title . '"' : '' ) .
|
435 |
' width="' . $imgwidth . '"' .
|
462 |
}
|
463 |
else {
|
464 |
$result .= '<img' .
|
465 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
466 |
' ' . $imgalt .
|
467 |
( $title ? ' title="' . $title . '"' : '' ) .
|
468 |
' width="' . $imgwidth . '"' .
|
566 |
|
567 |
'<img' .
|
568 |
' id="wppa-like-' . $id . '-' . $mocc . '"' .
|
569 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
570 |
' alt="up"' .
|
571 |
' title="' . esc_attr( $lt['title'] ) . '"' .
|
572 |
' style="height:16px; margin:0 0 -3px 0; padding:0 4px; box-shadow:none; display:inline;"' .
|
573 |
+
' class="no-shadow"' .
|
574 |
' onmouseover="jQuery(this).stop().fadeTo(100, 1.0);"' .
|
575 |
' onmouseout="jQuery(this).stop().fadeTo(100, wppaStarOpacity);"' .
|
576 |
' onclick="wppaOvlRateIt( \'' . wppa_encrypt_photo( $id ) . '\', 1, ' . $mocc . ' );' . '"' .
|
981 |
}
|
982 |
else {
|
983 |
$result .= '<img' .
|
984 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
985 |
' ' . wppa_get_imgalt( $id ) .
|
986 |
' class="image wppa-img"' .
|
987 |
' width="' . $imgwidth . '"' .
|
1020 |
}
|
1021 |
else {
|
1022 |
$result .= '<img' .
|
1023 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1024 |
' ' . wppa_get_imgalt( $id ) .
|
1025 |
' class="image wppa-img"' .
|
1026 |
' width="' . $imgwidth . '"' .
|
1053 |
}
|
1054 |
else {
|
1055 |
$result .= '<img' .
|
1056 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1057 |
' ' . wppa_get_imgalt( $id ) .
|
1058 |
' class="image wppa-img"' .
|
1059 |
' width="' . $imgwidth . '"' .
|
1206 |
$style = $imgattr_a['style'];
|
1207 |
$result .= '<a href="' . get_permalink() . '">' .
|
1208 |
'<img' .
|
1209 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1210 |
' ' . $imgalt .
|
1211 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1212 |
' style="'.$style.'"' .
|
1302 |
$result .= '<img' .
|
1303 |
' onclick="' . $onclick . '"' .
|
1304 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1305 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1306 |
' ' . $imgalt .
|
1307 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1308 |
' style="' . $imgstyle . ' cursor:pointer;"' .
|
1338 |
else {
|
1339 |
$result .= '<img' .
|
1340 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1341 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1342 |
' ' . $imgalt .
|
1343 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1344 |
' style="' . $imgstyle . 'cursor:pointer;"' .
|
1397 |
else {
|
1398 |
$result .= '<img' .
|
1399 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1400 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1401 |
' ' . $imgalt .
|
1402 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1403 |
' style="' . $imgstyle . $cursor . '"' .
|
1439 |
else {
|
1440 |
$result .= '<img' .
|
1441 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1442 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1443 |
' ' . $imgalt .
|
1444 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1445 |
' style="' . $imgstyle . 'cursor:pointer;"' .
|
1481 |
else {
|
1482 |
$result .= '<img' .
|
1483 |
' id="i-'.$xid.'-'.$mocc.'"' .
|
1484 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1485 |
' ' . $imgalt .
|
1486 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1487 |
' width="' . $imgwidth . '"' .
|
1517 |
else {
|
1518 |
$result .= '<img' .
|
1519 |
' id="i-'.$xid.'-'.$mocc.'"' .
|
1520 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1521 |
' ' . $imgalt .
|
1522 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1523 |
' width="' . $imgwidth . '"' .
|
1666 |
$result .= '<img' .
|
1667 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1668 |
( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
|
1669 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
|
1670 |
' width="' . strval( intval( $imgstyle_a['width'] ) ) . '"' .
|
1671 |
' height="' . strval( intval( $imgstyle_a['height'] ) ) . '"' .
|
1672 |
' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
|
1720 |
$result .= '<img' .
|
1721 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1722 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1723 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1724 |
' width="' . $imgstyle_a['width'] . '"' .
|
1725 |
' height="' . $imgstyle_a['height'] . '"' .
|
1726 |
' style="' . $imgstyle_a['style'] . '"' .
|
1756 |
$result .= '<img' .
|
1757 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1758 |
( $title ? ' title="' . $title . '"' : '' ) .
|
1759 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
1760 |
' width="' . $imgstyle_a['width'] . '"' .
|
1761 |
' height="' . $imgstyle_a['height'] . '"' .
|
1762 |
' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
|
1797 |
$result .= '<img' .
|
1798 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
1799 |
( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
|
1800 |
+
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
|
1801 |
' width="' . $imgstyle_a['width'] . '"' .
|
1802 |
' height="' . $imgstyle_a['height'] . '"' .
|
1803 |
' style="' . $imgstyle_a['style'] . '"' .
|
1928 |
$result .= '<img' .
|
1929 |
' id="wppa-' . $tmp . '-' . $idx . '-' . $mocc . '"' .
|
1930 |
' class="wppa-' . $tmp . '-' . $mocc . '"' .
|
1931 |
+
' ' . ( ( wppa_lazy() && $tmp == 'film' && $idx > '5' ) ? 'data-' : '' ) . 'src="' . $url . '"' .
|
1932 |
' ' . $imgalt .
|
1933 |
' style="' . $imgstyle . $cursor . '"' .
|
1934 |
' ' . $events .
|
wppa-users.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -137,33 +137,7 @@ global $wp_roles;
|
|
137 |
|
138 |
// Test for logged out users
|
139 |
if ( ! is_user_logged_in() ) {
|
140 |
-
|
141 |
-
// Login required ?
|
142 |
-
if ( wppa_switch( 'user_create_login' ) ) {
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
|
146 |
-
// Login not required and logged out
|
147 |
-
else {
|
148 |
-
$rmax = wppa_get_option( 'wppa_loggedout_album_limit_count', '0' );
|
149 |
-
|
150 |
-
// If logged out max set, check if limit reached
|
151 |
-
if ( $rmax ) {
|
152 |
-
$albs = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_albums
|
153 |
-
WHERE owner = %s", wppa_get_user() ) );
|
154 |
-
if ( $albs >= $rmax ) {
|
155 |
-
return false; // Limit reached
|
156 |
-
}
|
157 |
-
else {
|
158 |
-
return true; // Limit not yet reached
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
// No logged out limit set
|
163 |
-
else {
|
164 |
-
return true;
|
165 |
-
}
|
166 |
-
}
|
167 |
}
|
168 |
|
169 |
// Admin can do everything
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
137 |
|
138 |
// Test for logged out users
|
139 |
if ( ! is_user_logged_in() ) {
|
140 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
// Admin can do everything
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 8.0.00.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5130,3 +5130,21 @@ function wppa_get_shortcode( $key, $atts ) {
|
|
5130 |
|
5131 |
return $result;
|
5132 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 8.0.00.014
|
7 |
*
|
8 |
*/
|
9 |
|
5130 |
|
5131 |
return $result;
|
5132 |
}
|
5133 |
+
|
5134 |
+
// Do we do lazy loading?
|
5135 |
+
function wppa_lazy() {
|
5136 |
+
|
5137 |
+
$setting = wppa_opt( 'lazy' );
|
5138 |
+
if ( $setting == 'all' ) {
|
5139 |
+
return true;
|
5140 |
+
}
|
5141 |
+
if ( $setting == 'none' ) {
|
5142 |
+
return false;
|
5143 |
+
}
|
5144 |
+
if ( wppa_is_mobile() ) {
|
5145 |
+
return ( $setting == 'mobile' );
|
5146 |
+
}
|
5147 |
+
else {
|
5148 |
+
return ( $setting == 'pc' );
|
5149 |
+
}
|
5150 |
+
}
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 8.0.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/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
-
$wppa_api_version = '8.0.00.
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 8.0.00.015
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
+
$wppa_api_version = '8.0.00.015'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|