WP Photo Album Plus - Version 6.6.22

Version Description

Download this release

Release Info

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

Code changes from version 6.6.21.invre.beta.001 to 6.6.22

invre-modifications.txt DELETED
@@ -1,54 +0,0 @@
1
- Install version 6.6.21.invre.beta.001 version from: https://downloads.wordpress.org/plugin/wp-photo-album-plus.6.6.21.invre.beta.001.zip
2
- Do a clean install, do not copy over an existing version, OR: remove the minified js files from .../wp-photo-album-plus/js/
3
-
4
- Go to the Photo ALbums -> Settings admin page: Table VII-D5: Comment captcha. Set it to Use Google invisible reCaptcha
5
- Create an album on the Photo Albums -> Album admin page.
6
- Upload at least 2 photos on the Photo Albums -> Upload photos admin page, using Box A
7
- Create a page with shortcode: [wppa][/wppa] as content.
8
- Go to this page, and click the Slideshow link on the album cover.
9
- Enter a comment...
10
-
11
- So far i made the following modifications:
12
-
13
- wppa-boxes-html.php line 3371:
14
- /* invre modification */
15
- /* Place the invre placeholder into the commentform */
16
- if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
17
- $result .= '<div class="inv-recaptcha-holder"></div>';
18
- }
19
- else
20
- /* end invre modification */
21
-
22
- wppa-slideshow.js line 841:
23
- /* invre modification */
24
- /* activate the placeholder with actual html */
25
- if ( renderInvisibleReCaptcha ) {
26
- renderInvisibleReCaptcha();
27
- }
28
- /* end invre modification */
29
-
30
- The onclick procedure of the Send! button is in wppa-ajax-front.js line 938:
31
- // Enter a comment to a photo
32
- function wppaAjaxComment( mocc, id ) {
33
-
34
- The server side of the ajax call is in wppa-ajax.php line 292:
35
- wppa_do_comment( $_REQUEST['photo-id'] ); // Process the comment
36
-
37
- The wppa_do_comment(); function is in wppa-functions line 2260:
38
- // Process a comment request
39
- function wppa_do_comment( $id ) {
40
-
41
- wppa-functions.php line 2308:
42
- /* invre modification */
43
- if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
44
- $is_valid = apply_filters('google_invre_is_valid_request_filter', true);
45
- if( ! $is_valid ) {
46
- $status = 'spam';
47
- }
48
- }
49
- else
50
- /* end invre modification */
51
- This always fails.... (the errortext in the alertbox still refers to the old captcha)
52
-
53
- The link where you can see an example:
54
- https://beta.opajaap.nl/en/test-page/?wppa-occur=1&wppa-cover=0&wppa-album=205&wppa-photo=48895
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.6.19
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -1241,6 +1241,10 @@ function wppaAjaxUpdatePhoto( photo, actionslug, elem, refresh, photoAlfaid ) {
1241
  wppaAjaxUpdatePhotoMonitor();
1242
  }
1243
 
 
 
 
 
1244
  // This monitor keeps track of running ajax requests
1245
  // If many chars are typed quickly ( busy flag true ) updating will be skipped
1246
  // until the running ajax request ends. A new request will catch up the rest of the data mods.
@@ -2160,6 +2164,14 @@ function wppaPhotoStatusChange(id) {
2160
  else {
2161
  jQuery( '.wppa-datetime-'+id ).css('display', 'none'); //prop( 'disabled', true );
2162
  }
 
 
 
 
 
 
 
 
2163
  }
2164
 
2165
  function wppaSetComBgCol( id ) {
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.6.22
5
  /* Various js routines used in admin pages
6
  */
7
 
1241
  wppaAjaxUpdatePhotoMonitor();
1242
  }
1243
 
1244
+ function wppaAjaxUpdateDelphoto( photo, actionslug, elem ) {
1245
+ wppaAjaxUpdatePhoto( photo, 'del' + actionslug, elem );
1246
+ }
1247
+
1248
  // This monitor keeps track of running ajax requests
1249
  // If many chars are typed quickly ( busy flag true ) updating will be skipped
1250
  // until the running ajax request ends. A new request will catch up the rest of the data mods.
2164
  else {
2165
  jQuery( '.wppa-datetime-'+id ).css('display', 'none'); //prop( 'disabled', true );
2166
  }
2167
+
2168
+ // schedule delete
2169
+ if ( jQuery( '#scheduledel-' + id ).attr( 'checked' ) == 'checked' ) {
2170
+ jQuery( '.wppa-del-datetime-' + id ).css( 'display', '' );
2171
+ }
2172
+ else {
2173
+ jQuery( '.wppa-del-datetime-' + id ).css( 'display', 'none' );
2174
+ }
2175
  }
2176
 
2177
  function wppaSetComBgCol( id ) {
js/wppa-ajax-front.js CHANGED
@@ -167,9 +167,6 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
167
  // Remove spinner
168
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
169
 
170
- // Prevent comment submit from reloading the page
171
- document.getElementById("comsubmit-"+mocc).addEventListener("click", function(event){event.preventDefault()});
172
-
173
  }
174
  } );
175
  }
@@ -963,11 +960,6 @@ function wppaAjaxComment( mocc, id ) {
963
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
964
  }
965
 
966
- /* invre modification */
967
- data += '&g-recaptcha-response='+jQuery('#g-recaptcha-response-1').val();
968
- /* end invre mod */
969
-
970
-
971
  // Do the ajax commit
972
  jQuery.ajax( { url: wppaAjaxUrl,
973
  data: data,//'action=wppa' +
@@ -979,10 +971,6 @@ function wppaAjaxComment( mocc, id ) {
979
 
980
  // Show spinner
981
  jQuery( "#wppa-comment-spin-"+mocc ).css( 'display', 'inline' );
982
-
983
- // Prevent submit default action (reload)
984
- // document.getElementById("comsubmit-"+mocc).addEventListener("click", function(event){event.preventDefault()});
985
-
986
  },
987
  success: function( result, status, xhr ) {
988
 
167
  // Remove spinner
168
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
169
 
 
 
 
170
  }
171
  } );
172
  }
960
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
961
  }
962
 
 
 
 
 
 
963
  // Do the ajax commit
964
  jQuery.ajax( { url: wppaAjaxUrl,
965
  data: data,//'action=wppa' +
971
 
972
  // Show spinner
973
  jQuery( "#wppa-comment-spin-"+mocc ).css( 'display', 'inline' );
 
 
 
 
974
  },
975
  success: function( result, status, xhr ) {
976
 
js/wppa-ajax-front.min.js ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-ajax-front.js
2
+ //
3
+ // Contains frontend ajax modules
4
+ // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+
7
+ var wppaJsAjaxVersion='6.6.21';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor,addHilite){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
8
+ wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(addHilite&&_wppaCurIdx[mocc]&&_wppaId[mocc][_wppaCurIdx[mocc]])ajaxurl+='&wppa-hilite='+_wppaId[mocc][_wppaCurIdx[mocc]];if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).fadeIn();},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
9
+ else{if(wppaRenderModal){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});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(mocc);});}
10
+ else{jQuery('#wppa-container-'+mocc).html(result);}}
11
+ if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
12
+ catch(err){try{history.replaceState({page:wppaHis,occur:mocc,type:'html'},"",newurl);wppaConsoleLog('Ajax rendering: History stack updated','force');}
13
+ catch(err){wppaConsoleLog('Ajax rendering: History stack update failed','force');}}
14
+ if(wppaFirstOccur==0)wppaFirstOccur=mocc;}
15
+ wppaUpdateLightboxes();if(typeof(wppaQRUpdate)!='undefined'){wppaConsoleLog('Ajax render asked qr code for '+newurl,'force');wppaQRUpdate(newurl);}
16
+ wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);var scriptPos=result.indexOf('<script');var scriptPosLast=result.lastIndexOf('<script');if(scriptPos==-1){wppaConsoleLog('Ajax render did NOT contain a script tag','force');}
17
+ else{wppaConsoleLog('Ajax render did contain a script tag at position '+scriptPos+' last at '+scriptPosLast,'force');}},error:function(xhr,status,error){wppaConsoleLog('wppaDoAjaxRender failed. Error = '+error+', status = '+status,'force');document.location.href=newurl;wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);},complete:function(xhr,status,newurl){wppaWaitForCounter++;wppaReplaceSvg();if(!wppaRenderModal){jQuery('html, body').animate({scrollTop:jQuery("#wppa-container-"+mocc).offset().top-32-wppaStickyHeaderHeight},1000);}
18
+ jQuery('#wppa-ajax-spin-'+mocc).stop().fadeOut();}});}
19
+ else{document.location.href=newurl;wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}
20
+ function wppaAjaxApprovePhoto(photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+photo).css('display','none');}
21
+ else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApprovePhoto failed. Error = '+error+', status = '+status,'force');},});}
22
+ function wppaAjaxRemovePhoto(mocc,photo,isslide){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){rtxt=result.split('||');if(rtxt[0]=='OK'){if(isslide){jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');wppaNext(mocc);}
23
+ else{jQuery('.wppa-approve-'+photo).css('display','none');jQuery('.thumbnail-frame-photo-'+photo).css('display','none');}}
24
+ else{if(rtxt[3]){alert(rtxt[3]);jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');}
25
+ else{alert(result);}}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemovePhoto failed. Error = '+error+', status = '+status,'force');}});}
26
+ function wppaAjaxApproveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');}
27
+ else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApproveComment failed. Error = '+error+', status = '+status,'force');}});}
28
+ function wppaAjaxRemoveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');jQuery('.wppa-comment-'+comment).css('display','none');}
29
+ else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemoveComment failed. Error = '+error+', status = '+status,'force');},});}
30
+ function wppaAjaxAddPhotoToZip(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=addtozip'+'&photo-id='+id,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('#admin-choice-'+id+'-'+mocc).html(rtxt[1]);}
31
+ else{alert(result);}
32
+ if(reload){document.location.reload(true);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxAddPhotoToZip failed. Error = '+error+', status = '+status,'force');},});}
33
+ function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=delmyzip',async:true,type:'GET',timeout:60000,success:function(result,status,xhr){document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDeleteMyZip failed. Error = '+error+', status = '+status,'force');},});}
34
+ function wppaEditPhoto(mocc,xid){var id=String(xid);var name='Edit Photo '+id;var desc='';var width=wppaEditPhotoWidth;var height=512;if(screen.availWidth<width)width=screen.availWidth;var wnd;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=front-edit'+'&photo-id='+id+'&moccur='+mocc,async:true,type:'POST',timeout:60000,beforeSend:function(xhr){if(wppaUploadEdit=='classic'){wnd=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+width+", height="+height,true);wnd.document.write('<! DOCTYPE html>');wnd.document.write('<html>');wnd.document.write('<head>');var myHead='<meta name="viewport" content="width='+width+'" >'+'<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" />'+'<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>'+'<title>'+name+'</title>'+'<script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";</script>';wnd.document.write(myHead);wnd.document.write('</head>');wnd.document.write('<body>');}},success:function(result,status,xhr){if(wppaUploadEdit=='classic'){wnd.document.write(result);}
35
+ if(wppaUploadEdit=='new'){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'24px',})
36
+ 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(xhr,status,error){if(wppaUploadEdit=='classic'){wnd.document.write(status+' '+error);}
37
+ wppaConsoleLog('wppaEditPhoto failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){if(wppaUploadEdit=='classic'){wnd.document.write('<script>wppaPhotoStatusChange( "'+id+'" )</script>');wnd.document.write('</body>');wnd.document.write('</html>');}}});}
38
+ function wppaPrevTags(tagsSel,tagsEdit,tagsAlbum,tagsPrev){var sel=jQuery('.'+tagsSel);var selArr=[];var editTag='';var album=jQuery('#'+tagsAlbum).val();var i=0;var j=0;var tags='';while(i<sel.length){if(sel[i].selected){selArr[j]=sel[i].value;j++;}
39
+ i++;}
40
+ editTag=jQuery('#'+tagsEdit).val();if(editTag!=''){selArr[j]=editTag;}
41
+ tags=selArr.join();if(editTag!=''||tagsAlbum!=''){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=sanitizetags'+'&tags='+tags+'&album='+album,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#'+tagsPrev).html('Working...');},success:function(result,status,xhr){jQuery('#'+tagsPrev).html(wppaTrim(result,','));},error:function(xhr,status,error){jQuery('#'+tagsPrev).html('<span style="color:red" >'+error+'</span>');wppaConsoleLog('wppaPrevTags failed. Error = '+error+', status = '+status,'force');},});}}
42
+ function wppaAjaxDestroyAlbum(album,nonce){if(confirm('Are you sure you want to delete this album?')){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=destroyalbum'+'&album='+album+'&nonce='+nonce,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){alert(result+'\n'+'Page will be reloaded');document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDestroyAlbum failed. Error = '+error+', status = '+status,'force');},});}
43
+ return false;}
44
+ function _bumpClickCount(photo){if(!wppaBumpClickCount)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpclickcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:false,type:'GET',timeout:60000,success:function(result,status,xhr){wppaConsoleLog('_bumpClickCount success.');},error:function(xhr,status,error){wppaConsoleLog('_bumpClickCount failed. Error = '+error+', status = '+status,'force');},});}
45
+ function _bumpViewCount(photo){if(!wppaBumpViewCount)return;if(wppaPhotoView[photo])return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpviewcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){wppaPhotoView[photo]=true;},error:function(xhr,status,error){wppaConsoleLog('_bumpViewCount failed. Error = '+error+', status = '+status,'force');},});}
46
+ function wppaVoteThumb(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating=1'+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index=0'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){jQuery('#wppa-vote-button-'+mocc+'-'+photo).val(wppaVotedForMe);},error:function(xhr,status,error){wppaConsoleLog('wppaVoteThumb failed. Error = '+error+', status = '+status,'force');},});}
47
+ function _wppaRateIt(mocc,value){if(value==0)return;if(_wppaSSRuns[mocc])return;var photo=_wppaId[mocc][_wppaCurIdx[mocc]];var oldval=_wppaMyr[mocc][_wppaCurIdx[mocc]];var waittext=_wppaWaitTexts[mocc][_wppaCurIdx[mocc]];if(waittext.length>0){alert(waittext);return;}
48
+ if(oldval!=0&&wppaRatingOnce){return;}
49
+ if(oldval<0)return;_wppaVoteInProgress=true;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index='+_wppaCurIdx[mocc]+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('#wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'spinner.gif');},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);_wppaSetRatingDisplay(mocc);}
50
+ else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}}
51
+ else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
52
+ else{jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
53
+ _wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];}
54
+ else{_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];_wppaDisc[ArrValues[0]][ArrValues[2]]=ArrValues[5];_wppaSetRatingDisplay(mocc);if(wppaCommentRequiredAfterVote){if(ArrValues[6]==0){alert(ArrValues[7]);}}}
55
+ if(wppaNextOnCallback)_wppaNextOnCallback(mocc);}},error:function(xhr,status,error){wppaConsoleLog('_wppaRateIt failed. Error = '+error+', status = '+status,'force');},});}
56
+ function _wppaOvlRateIt(id,value,mocc,reloadAfter){if(value==0)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+id+'&wppa-occur=1'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('.wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'spinner.gif');jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'spinner.gif');},success:function(result,status,xhr){wppaConsoleLog(result,'force');var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);}
57
+ else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}
58
+ jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'cross.png');}
59
+ else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-0').attr('title',likeText[0]);jQuery('#wppa-liketext-0').html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbdown.png');}
60
+ else{jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbup.png');}
61
+ jQuery('#wppa-like-'+id+'-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+id+'-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
62
+ else{jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
63
+ return;}
64
+ _wppaSetRd(mocc,ArrValues[4],'.wppa-avg-');_wppaSetRd(mocc,ArrValues[3],'.wppa-rate-');if(reloadAfter){return;}
65
+ if(wppaNextOnCallback)wppaOvlShowNext();}},error:function(xhr,status,error){wppaConsoleLog('_wppaOvlRateIt failed. Error = '+error+', status = '+status,'force');},});}
66
+ function wppaAjaxMakeOrigName(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=makeorigname'+'&photo-id='+photo+'&from=fsname',async:true,type:'GET',timeout:60000,beforeSend:function(xhr){},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[1]=='0'){if(wppaIsSafari){if(wppaArtMonkyLink=='file')wppaWindowReference.location=ArrValues[2];if(wppaArtMonkyLink=='zip')document.location=ArrValues[2];}
67
+ else{if(wppaArtMonkyLink=='file')window.open(ArrValues[2]);if(wppaArtMonkyLink=='zip')document.location=ArrValues[2];}}
68
+ else{if(wppaIsSafari&&wppaArtMonkyLink=='file')wppaWindowReference.close();alert('Error: '+ArrValues[1]+'\n\n'+ArrValues[2]);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxMakeOrigName failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){}});}
69
+ function wppaAjaxDownloadAlbum(mocc,id){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=downloadalbum'+'&album-id='+id,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#dwnspin-'+mocc+'-'+id).css('display','');},success:function(result,status,xhr){var ArrValues=result.split("||");var url=ArrValues[0];var erok=ArrValues[1];var text=ArrValues[2];if(ArrValues.length==3&&text!='')alert('Attention:\n\n'+text);if(erok=='OK'){document.location=url;}
70
+ else{alert('The server could not complete the request.\nPlease try again.');}},error:function(xhr,status,error){alert('An error occurred:\n'+error+'\nPlease try again');},complete:function(xhr,status,newurl){jQuery('#dwnspin-'+mocc+'-'+id).css('display','none');}});}
71
+ function wppaAjaxComment(mocc,id){if(!_wppaValidateComment(mocc,id))return;var data='action=wppa'+'&wppa-action=do-comment'+'&photo-id='+id+'&comname='+jQuery("#wppa-comname-"+mocc).val()+'&comment='+wppaEncode(jQuery("#wppa-comment-"+mocc).val())+'&wppa-captcha='+jQuery("#wppa-captcha-"+mocc).val()+'&wppa-nonce='+jQuery("#wppa-nonce-"+mocc).val()+'&moccur='+mocc;if(typeof(jQuery("#wppa-comemail-"+mocc).val())!='undefined'){data+='&comemail='+jQuery("#wppa-comemail-"+mocc).val();}
72
+ if(typeof(jQuery("#wppa-comment-edit-"+mocc).val())!='undefined'){data+='&comment-edit='+jQuery("#wppa-comment-edit-"+mocc).val();}
73
+ if(typeof(jQuery("#wppa-returnurl-"+mocc).val())!='undefined'){data+='&returnurl='+encodeURIComponent(jQuery("#wppa-returnurl-"+mocc).val());}
74
+ jQuery.ajax({url:wppaAjaxUrl,data:data,async:true,type:'POST',timeout:60000,beforeSend:function(xhr){jQuery("#wppa-comment-spin-"+mocc).css('display','inline');},success:function(result,status,xhr){result=result.replace(/\\/g,'');jQuery("#wppa-comments-"+mocc).html(result);if(_wppaCurIdx[mocc]){_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]=result;}
75
+ wppaOpenComments(mocc);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxComment failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery("#wppa-comment-spin-"+mocc).css('display','none');}});}
76
+ function wppaUpdatePhotoNew(id){var myItems=['name','description','tags','custom_0','custom_1','custom_2','custom_3','custom_4','custom_5','custom_6','custom_7','custom_8','custom_9'];var myData='action=wppa'+'&wppa-action=update-photo-new'+'&photo-id='+id+'&wppa-nonce='+jQuery('#wppa-nonce-'+id).val();var i=0;while(i<myItems.length){if(typeof(jQuery('#'+myItems[i]).val())!='undefined'){myData+='&'+myItems[i]+'='+jQuery('#'+myItems[i]).val();}
77
+ i++;}
78
+ jQuery.ajax({url:wppaAjaxUrl,data:myData,async:false,type:'POST',timeout:10000,beforeSend:function(xhr){},success:function(result,status,xhr){if(result.length>0){alert(result);}},error:function(xhr,status,error){alert(result);wppaConsoleLog('wppaUpdatePhotoNew failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){}});}
79
+ function wppaAjaxSetQrCodeSrc(url,elm){var myData='action=wppa'+'&wppa-action=getqrcode'+'&wppa-qr-nonce='+jQuery('#wppa-qr-nonce').val()+'&url='+encodeURIComponent(url);jQuery.ajax({url:wppaAjaxUrl,data:myData,async:true,type:'POST',timeout:10000,success:function(result,status,xhr){document.getElementById(elm).src=result;wppaConsoleLog('wppaAjaxSetQrCodeSrc put '+result+' into '+elm);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxSetQrCodeSrc failed. Error = '+error+', status = '+status,'force');}});}
80
+ wppaConsoleLog('wppa-ajax-front.js version '+wppaJsAjaxVersion+' loaded.','force');
js/wppa-lightbox.min.js ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-lightbox.js
2
+ //
3
+ // Conatins lightbox modules
4
+ // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+
7
+ var wppaLightboxVersion='6.6.20';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaDoOnOrientationChange(e){if(wppaOvlMode!='normal'&&document.getElementById('wppa-overlay-img')){setTimeout('wppaOvlShow( '+wppaOvlIdx+' )',100);return;}}
8
+ function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
9
+ var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
10
+ wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
11
+ switch(key){case'p':wppaOvlShowPrev();break;case'n':wppaOvlShowNext();break;case's':wppaOvlStartStop();break;case'd':jQuery('#wppa-ovl-legenda-1').css('visibility','hidden');jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';break;case'f':wppaOvlFull();break;case'l':wppaOvlNorm();break;case'q':case'x':wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
12
+ wppaOvlHide();break;}
13
+ return false;}
14
+ function wppaOvlFull(init){wppaConsoleLog('wppaOvlFull');wppaNormsBtnOpac=0.75;var oldMode=wppaOvlMode;if(!init){wppaOvlStepMode();}
15
+ var elem=document.getElementById('wppa-overlay-ic');if(!elem)return;if(init||oldMode=='normal'){if(elem.requestFullscreen){elem.requestFullscreen();}else if(elem.mozRequestFullScreen){elem.mozRequestFullScreen();}else if(elem.webkitRequestFullscreen){elem.webkitRequestFullscreen();}
16
+ setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500);}
17
+ if(wppaOvlMode=='normal'){if(document.cancelFullScreen){document.cancelFullScreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen();}}
18
+ setTimeout(function(){wppaShowFsButtons(0.75)},300);jQuery('#wppa-ovl-legenda-1').html('');}
19
+ function wppaOvlNorm(exit){wppaConsoleLog('wppaOvlNorm');wppaOvlMode='normal';wppaNormsBtnOpac=0.75;if(document.cancelFullScreen){document.cancelFullScreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen();}
20
+ if(exit){wppaOvlMode=wppaOvlModeInitial;return;}
21
+ setTimeout(function(){wppaShowFsButtons(0.75)},300);setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500);}
22
+ function wppaOvlShow(arg){wppaConsoleLog('wppaOvlShow arg='+arg);if(wppaOvlFirst){jQuery('#weaver-final').removeClass('wvr-hide-bang');jQuery('#wppa-overlay-bg').stop().fadeTo(3,wppaOvlOpacity);if(!wppaKbHandlerInstalled){jQuery(document).on('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=true;}
23
+ jQuery('#wppa-overlay-bg').css({width:window.innerWidth,height:window.innerHeight,});if(wppaOvlModeInitial!='normal'){wppaOvlFull(true);}}
24
+ if(typeof(arg)=='object'){wppaOvlUrls=[];wppaOvlTitles=[];wppaOvlAlts=[];wppaOvlVideoHtmls=[];wppaOvlAudioHtmls=[];wppaOvlVideoNaturalWidths=[];wppaOvlVideoNaturalHeights=[];wppaOvlImgs=[];wppaOvlIdx=0;var rel;if(arg.rel){rel=arg.rel;}
25
+ else if(jQuery(arg).attr('data-rel')){rel=jQuery(arg).attr('data-rel');}
26
+ else{rel=false;}
27
+ var temp=rel.split('[');if(temp[1]){var setname=temp[1];var anchors=jQuery('a');var anchor;var i,j=0;for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
28
+ else{temp=false;}
29
+ if(temp.length>1){if(temp[0]=='wppa'&&temp[1]==setname){wppaOvlUrls[j]=anchor.href;if(jQuery(anchor).attr('data-lbtitle')){wppaOvlTitles[j]=wppaRepairScriptTags(jQuery(anchor).attr('data-lbtitle'));}
30
+ else{wppaOvlTitles[j]=wppaRepairScriptTags(anchor.title);}
31
+ wppaOvlAlts[j]=jQuery(anchor).attr('data-alt')?jQuery(anchor).attr('data-alt'):'';wppaOvlVideoHtmls[j]=jQuery(anchor).attr('data-videohtml')?decodeURI(jQuery(anchor).attr('data-videohtml')):'';wppaOvlAudioHtmls[j]=jQuery(anchor).attr('data-audiohtml')?decodeURI(jQuery(anchor).attr('data-audiohtml')):'';wppaOvlVideoNaturalWidths[j]=jQuery(anchor).attr('data-videonatwidth')?jQuery(anchor).attr('data-videonatwidth'):'';wppaOvlVideoNaturalHeights[j]=jQuery(anchor).attr('data-videonatheight')?jQuery(anchor).attr('data-videonatheight'):'';if(anchor.href==arg.href){wppaOvlIdx=j;}
32
+ j++;}}}}
33
+ else{wppaOvlUrls[0]=arg.href;if(jQuery(arg).attr('data-lbtitle')){wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(arg).attr('data-lbtitle'));}
34
+ else{wppaOvlTitles[0]=wppaRepairScriptTags(arg.title);}
35
+ wppaOvlAlts[0]=jQuery(arg).attr('data-alt')?jQuery(arg).attr('data-alt'):'';wppaOvlVideoHtmls[0]=jQuery(arg).attr('data-videohtml')?decodeURI(jQuery(arg).attr('data-videohtml')):'';wppaOvlAudioHtmls[0]=jQuery(arg).attr('data-audiohtml')?decodeURI(jQuery(arg).attr('data-audiohtml')):'';wppaOvlVideoNaturalWidths[0]=jQuery(arg).attr('data-videonatwidth')?jQuery(arg).attr('data-videonatwidth'):'';wppaOvlVideoNaturalHeights[0]=jQuery(arg).attr('data-videonatheight')?jQuery(arg).attr('data-videonatheight'):'';wppaOvlIdx=0;}}
36
+ else{wppaOvlIdx=arg;}
37
+ setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100);}
38
+ function _wppaOvlShow(idx){wppaConsoleLog('_wppaOvlShow, idx='+idx);wppaOvlCurIdx=idx;if(wppaOvlFirst){jQuery("#wppa-ovl-spin").fadeIn(1500);}
39
+ wppaIsVideo=wppaOvlVideoHtmls[idx]!='';wppaHasAudio=wppaOvlAudioHtmls[idx]!='';if(wppaOvlUrls[idx].length>0&&!wppaIsVideo){wppaOvlImgs[idx]=new Image();wppaOvlImgs[idx].src=wppaOvlUrls[idx];wppaConsoleLog('Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)');if(!wppaOvlImgs[idx].complete){wppaConsoleLog('Retrying preload current image');setTimeout('_wppaOvlShow('+idx+')',100);return;}}
40
+ var next;var prev;if(wppaOvlIdx==(wppaOvlUrls.length-1)){next=0;}
41
+ else{next=wppaOvlIdx+1;}
42
+ if(wppaOvlVideoHtmls[next]==''){wppaOvlImgs[next]=new Image();wppaOvlImgs[next].src=wppaOvlUrls[next];wppaConsoleLog('Preloading > '+(next+1));}
43
+ if(!wppaOvlRunning){if(wppaOvlIdx==0){prev=wppaOvlUrls.length-1;}
44
+ else{prev=wppaOvlIdx-1;}
45
+ if(wppaOvlVideoHtmls[prev]==''){wppaOvlImgs[prev]=new Image();wppaOvlImgs[prev].src=wppaOvlUrls[prev];wppaConsoleLog('Preloading < '+(prev+1));}}
46
+ wppaPhotoId=wppaUrlToId(wppaOvlUrls[idx]);_bumpViewCount(wppaPhotoId);wppaOvlIsSingle=(wppaOvlUrls.length==1);if(wppaOvlMode!='normal'){var html;if(wppaIsVideo){html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" >'+'<video id="wppa-overlay-img" controls preload="metadata"'+
47
+ (wppaOvlVideoStart?' autoplay':'')+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;"'+' alt="'+wppaOvlAlts[idx]+'"'+' >'+
48
+ wppaOvlVideoHtmls[idx]+'</video>'+'<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
49
+ html+='</div>';'</div>';}
50
+ else{html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).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 );"'+' src="'+wppaOvlUrls[idx]+'"'+' style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;"'+' alt="'+wppaOvlAlts[idx]+'"'+' />';if(wppaHasAudio){html+='<audio'+' id="wppa-overlay-audio"'+' class="wppa-overlay-audio"'+' data-from="wppa"'+' preload="metadata"'+
51
+ ((wppaOvlAudioStart)?' autoplay':'')+' onpause="wppaOvlAudioPlaying = false;"'+' onplay="wppaOvlAudioPlaying = true;"'+' style="'+'width:100%;'+'position:absolute;'+'left:0px;'+'bottom:0px;'+'padding:0;'+'"'+' controls'+' >'+
52
+ wppaOvlAudioHtmls[idx]+'</audio>';}
53
+ html+='<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
54
+ html+='</div>';'</div>';}
55
+ var dark=wppaIsMobile?'0.1':'0.1';html+='<div'+' id="wppa-exit-btn"'+' style="height:48px;z-index:100098;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+';"'+' onclick="wppaOvlHide()"'+' onmouseover="jQuery(this).stop().fadeTo(300,1);"'+' ontouchstart="jQuery(this).stop().fadeTo(300,1);"'+' onmouseout="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' ontouchend="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' >'+
56
+ wppaSvgHtml('Exit','48px',true,true,'0','0','0','0')+'</div>';html+='<div'+' id="wppa-norms-btn"'+' style="height:48px;z-index:100098;position:fixed;top:0;right:48px;opacity:'+wppaNormsBtnOpac+';"'+' onclick="wppaOvlNorm()"'+' onmouseover="jQuery(this).stop().fadeTo(300,1);"'+' ontouchstart="jQuery(this).stop().fadeTo(300,1);"'+' onmouseout="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' ontouchend="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' >'+
57
+ wppaSvgHtml('Exit-Full-Screen','48px',true,true,'0','0','0','0')+'</div>';if((!wppaIsVideo&&!wppaHasAudio)||wppaOvlFsPhotoId!=wppaPhotoId||wppaPhotoId==0){wppaStopVideo(0);wppaStopAudio();jQuery('#wppa-overlay-ic').html(html);}
58
+ jQuery('#wppa-overlay-img').bind('contextmenu',function(e){return false;});wppaOvlIsVideo=wppaIsVideo;setTimeout('wppaOvlFormatFull()',10);if(wppaIsVideo||wppaHasAudio){setTimeout('wppaOvlUpdateFsId()',2000);}
59
+ else{wppaOvlFsPhotoId=0;}
60
+ wppaOvlFirst=false;return false;}
61
+ else{wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaStopVideo(0);var txtcol=wppaOvlTheme=='black'?'#a7a7a7':'#272727';if(wppaOvlFontColor){txtcol=wppaOvlFontColor;}
62
+ var showNav=wppaOvlUrls.length>1;jQuery('#wppa-overlay-ic').css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,});var html='';html+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >';if(wppaIsVideo){html+='<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"'+
63
+ (wppaOvlVideoStart?' autoplay':'')+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( 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[idx]+'"'+' >'+
64
+ wppaOvlVideoHtmls[idx]+'</video>';wppaOvlIsVideo=true;}
65
+ else{html+='<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 );"'+' src="'+wppaOvlUrls[idx]+'"'+' 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[idx]+'"'+' />';if(wppaHasAudio){html+='<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'+' >'+
66
+ wppaOvlAudioHtmls[idx]+'</audio>';}
67
+ wppaOvlIsVideo=false;}
68
+ if(wppaOvlShowStartStop&&!wppaOvlIsSingle&&!wppaIsVideo){html+='<div'+' id="wppa-ovl-start-stop-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'z-index:100101;'+'position:absolute;'+'top:50%;'+'margin-top:-24px;'+'left:50%;'+'margin-left:-24px;'+
69
+ (wppaOvlIdx==-1?'visibility:hidden;':'')+'box-shadow:none;'+
70
+ (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlStartStop()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
71
+ wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50')+'</div>';}
72
+ if(!wppaOvlIsSingle){html+='<div'+' id="wppa-ovl-prev-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'position:absolute;'+'z-index:100101;'+'width:48px;'+'top:50%;'+'margin-top:-24px;'+'left:1px;'+'box-shadow:none;'+
73
+ (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlShowPrev()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
74
+ wppaSvgHtml('Prev-Button','48px',true,true)+'</div>';html+='<div'+' id="wppa-ovl-next-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'position:absolute;'+'z-index:100101;'+'width:48px;'+'top:50%;'+'margin-top:-24px;'+'right:1px;'+'box-shadow:none;'+
75
+ (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlShowNext()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
76
+ wppaSvgHtml('Next-Button','48px',true,true)+'</div>';}
77
+ html+='</div>';var showCounter=!wppaOvlIsSingle&&wppaOvlShowCounter;html+='<div id="wppa-overlay-txt-container"'+' style="'+'position:relative;'+'padding:10px;'+'background-color:'+wppaOvlTheme+';'+'color:'+txtcol+';'+'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%;'+
78
+ (wppaOvlTxtHeight=='auto'?'max-height:200px;':'max-height:'+wppaOvlTxtHeight+'px;')+'overflow:auto;'+'box-shadow:none;'+'"'+' >'+
79
+ (showCounter?(wppaOvlIdx+1)+'/'+wppaOvlUrls.length+'<br />':'')+
80
+ wppaOvlTitles[idx]+'</div>';'</div>';jQuery('#wppa-overlay-ic').html(html);jQuery('#wppa-overlay-img').bind('contextmenu',function(e){return false;});wppaOvlResize();return false;}}
81
+ function wppaOvlSize(speed){wppaConsoleLog('wppaOvlSize');var img=document.getElementById('wppa-overlay-img');var txt=document.getElementById('wppa-overlay-txt');if(!img||!txt||jQuery('#wppa-overlay-bg').css('display')=='none'){wppaConsoleLog('Lb quitted');return;}
82
+ if(wppaOvlMode!='normal'){wppaOvlFormatFull();return;}
83
+ var iw=jQuery(window).width();var ih=jQuery(window).height();var cw,nw,nh;if(wppaOvlIsVideo){cw=img.clientWidth;nw=wppaOvlVideoNaturalWidths[wppaOvlCurIdx];nh=wppaOvlVideoNaturalHeights[wppaOvlCurIdx];}
84
+ else{cw=img.clientWidth;nw=img.naturalWidth;nh=img.naturalHeight;}
85
+ var fakt1;var fakt2;var fakt;if(typeof(nw)=='undefined'){nw=img.clientWidth;nh=img.clientHeight;}
86
+ fakt1=(iw-3*wppaOvlBorderWidth)/nw;fakt2=ih/nh;if(fakt1<fakt2)fakt=fakt1;else fakt=fakt2;if(fakt<1.0){nw=parseInt(nw*fakt);nh=parseInt(nh*fakt);}
87
+ var mh;var tch=jQuery('#wppa-overlay-txt').height();if(wppaOvlTxtHeight=='auto'){if(tch==0)tch=20+2*wppaOvlBorderWidth;mh=ih-tch-20-2*wppaOvlBorderWidth;}
88
+ else{mh=ih-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;}
89
+ var mw=parseInt(mh*nw/nh);var pt=wppaOvlPadTop;var lft=parseInt((iw-mw)/2);var wid=mw;if(nh<mh){pt=wppaOvlPadTop+(mh-nh)/2;lft=parseInt((iw-nw)/2);wid=nw;}
90
+ var done=(wppaSavedImageWidth-wid<3&&wid-wppaSavedImageWidth<3);if(wid<=10){wid=240;nh=180;nw=240;done=false;}
91
+ wid=parseInt(wid);wppaSavedImageWidth=parseInt(wid);wppaSavedImageHeight=parseInt(wid*nh/nw);wppaSavedMarginLeft=-parseInt((wid/2+wppaOvlBorderWidth));wppaSavedContainerWidth=parseInt(wid+2*wppaOvlBorderWidth);wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery('#wppa-overlay-txt-container').height()+20);wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2);jQuery('#wppa-overlay-img').animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight,},speed);jQuery('#wppa-overlay-ic').animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,},speed);if(!done){setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},speed+100);wppaConsoleLog('Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+', img complete='+document.getElementById('wppa-overlay-img').complete);}
92
+ else{jQuery('#wppa-ovl-spin').stop().fadeOut();wppaConsoleLog('Done '+wppaOvlIdx);wppaOvlFirst=false;}
93
+ return true;}
94
+ function wppaOvlFormatFull(){wppaConsoleLog('wppaOvlFormatFull '+wppaOvlMode);var img;var natWidth;var natHeight;if(wppaOvlIsVideo){img=document.getElementById('wppa-overlay-img');natWidth=wppaOvlVideoNaturalWidths[wppaOvlIdx];natHeight=wppaOvlVideoNaturalHeights[wppaOvlIdx];}
95
+ else{img=document.getElementById('wppa-overlay-img');if(!img||!img.complete){setTimeout('wppaOvlFormatFull()',100);return;}
96
+ natWidth=img.naturalWidth;natHeight=img.naturalHeight;}
97
+ var screenRatio=jQuery(window).width()/jQuery(window).height();var imageRatio=natWidth/natHeight;var margLeft=0;var margTop=0;var imgHeight=0;var imgWidth=0;var scrollTop=0;var scrollLeft=0;var Overflow='hidden';switch(wppaOvlMode){case'padded':if(screenRatio>imageRatio){margLeft=(jQuery(window).width()-jQuery(window).height()*imageRatio)/2;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).height()*imageRatio;}
98
+ else{margLeft=0;margTop=(jQuery(window).height()-jQuery(window).width()/imageRatio)/2;imgHeight=jQuery(window).width()/imageRatio;imgWidth=jQuery(window).width();}
99
+ break;case'stretched':margLeft=0;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).width();break;case'clipped':if(screenRatio>imageRatio){margLeft=0;margTop=(jQuery(window).height()-jQuery(window).width()/imageRatio)/2;imgHeight=jQuery(window).width()/imageRatio;imgWidth=jQuery(window).width();}
100
+ else{margLeft=(jQuery(window).width()-jQuery(window).height()*imageRatio)/2;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).height()*imageRatio;}
101
+ break;case'realsize':margLeft=(jQuery(window).width()-natWidth)/2;if(margLeft<0){scrollLeft=parseInt(-margLeft);margLeft=0;}
102
+ margTop=(jQuery(window).height()-natHeight)/2;if(margTop<0){scrollTop=parseInt(-margTop);margTop=0;}
103
+ imgHeight=natHeight;imgWidth=natWidth;Overflow='auto';break;}
104
+ margLeft=parseInt(margLeft);margTop=parseInt(margTop);imgHeight=parseInt(imgHeight);imgWidth=parseInt(imgWidth);jQuery(img).css({height:imgHeight,width:imgWidth,marginLeft:margLeft,marginTop:margTop,left:0,top:0,maxWidth:10000});jQuery(img).css({visibility:'visible'});jQuery('#wppa-ovl-full-bg').css({overflow:Overflow});jQuery('#wppa-ovl-full-bg').scrollTop(scrollTop);jQuery('#wppa-ovl-full-bg').scrollLeft(scrollLeft);jQuery('#wppa-ovl-spin').stop().fadeOut();return true;}
105
+ function wppaOvlUpdateFsId(){wppaConsoleLog('wppaOvlUpdateFsId');wppaOvlFsPhotoId=wppaPhotoId;}
106
+ function wppaOvlStartAudio(){wppaConsoleLog('wppaOvlStartAudio');var elm=document.getElementById('wppa-overlay-audio');if(elm){if(typeof(elm.play)=='function'){elm.play();wppaConsoleLog('Audio play '+'wppa-overlay-audio');}}}
107
+ function wppaOvlStepMode(){wppaConsoleLog('wppaOvlStepMode from '+wppaOvlMode);var modes=new Array('normal','padded','stretched','clipped','realsize','padded');var i=0;while(i<modes.length){if(wppaOvlMode==modes[i]){wppaOvlMode=modes[i+1];wppaOvlShow(wppaOvlIdx);return;}
108
+ i++;}}
109
+ function wppaOvlStartStop(){wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);if(wppaOvlRunning){wppaOvlRunning=false;jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50'));if(wppaOvlIdx!=-1){if(wppaOvlIdx!=0){jQuery('#wppa-ovl-prev-btn').css('visibility','visible');}
110
+ if(wppaOvlIdx!=(wppaOvlUrls.length-1)){jQuery('#wppa-ovl-next-btn').css('visibility','visible');}}}
111
+ else{jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Pause-Button'),'48px',true,true,'0','20','50','50'));wppaOvlRunning=true;wppaOvlRun();}}
112
+ function wppaOvlRun(){wppaConsoleLog('wppaOvlRun, running='+wppaOvlRunning);if(!wppaOvlRunning)return;if(wppaOvlVideoPlaying||wppaOvlAudioPlaying){setTimeout('wppaOvlRun()',500);return;}
113
+ if(!wppaIsVideo){var elm=document.getElementById('wppa-overlay-img');if(elm){if(!elm.complete){wppaConsoleLog('Wait during run');setTimeout('wppaOvlRun()',500);return;}}}
114
+ var next;if(wppaOvlIdx>=(wppaOvlUrls.length-1))next=0;else next=wppaOvlIdx+1;wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlShow(next);setTimeout('wppaOvlRun()',wppaOvlSlideSpeed);}
115
+ function wppaOvlShowPrev(){wppaConsoleLog('wppaOvlShowPrev');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx<1){wppaOvlIdx=wppaOvlUrls.length;}
116
+ wppaOvlShow(wppaOvlIdx-1);return false;}
117
+ function wppaOvlShowNext(){wppaConsoleLog('wppaOvlShowNext');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx>=(wppaOvlUrls.length-1)){wppaOvlIdx=-1;}
118
+ wppaOvlShow(wppaOvlIdx+1);return false;}
119
+ function wppaOvlHide(){wppaConsoleLog('wppaOvlHide');wppaStopAudio();if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
120
+ jQuery('#wppa-overlay-ic').html('');jQuery('#wppa-overlay-bg').fadeOut(300);jQuery(document).off('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=false;wppaOvlFirst=true;wppaOvlRunning=false;wppaOvlMode=wppaOvlModeInitial;wppaNormsBtnOpac=0.75;jQuery('#wppa-ovl-spin').stop().fadeOut();}
121
+ function wppaOvlOnclick(event){wppaConsoleLog('wppaOvlOnClick');switch(wppaOvlOnclickType){case'none':break;case'close':if(wppaOvlMode=='normal'){wppaOvlHide();}
122
+ break;case'browse':var x=event.screenX-window.screenX;var y=event.clientY;if(y>48){if(x<jQuery(window).width()/2)wppaOvlShowPrev();else wppaOvlShowNext();}
123
+ break;default:alert('Unimplemented action: '+wppaOvlOnclickType);break;}
124
+ return true;}
125
+ function wppaInitOverlay(){wppaConsoleLog('wppaInitOverlay');if(wppaOvlMode==''){wppaOvlMode=wppaOvlModeInitial;}
126
+ var anchors=jQuery('a');var anchor;var i;var temp=[];wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlCurIdx=0;if(wppaSavedContainerWidth==0){wppaSavedContainerWidth=240+2*wppaOvlBorderWidth;wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+(wppaOvlTxtHeight=='auto'?50:wppaOvlTxtHeight);wppaSavedMarginLeft=-(120+wppaOvlBorderWidth);wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+(wppaOvlTxtHeight=='auto'?25:wppaOvlTxtHeight/2));wppaSavedImageWidth=240;wppaSavedImageHeight=180+wppaOvlBorderWidth;}
127
+ for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
128
+ else if(anchor.rel){temp=anchor.rel.split("[");}
129
+ else{temp[0]='';}
130
+ if(temp[0]=='wppa'){wppaWppaOverlayActivated=true;if(wppaIsMobile){jQuery(anchor).on('touchstart',function(event){wppaStartTime();});jQuery(anchor).on('touchend',function(event){if(wppaInTime()){wppaOvlShow(this);}
131
+ event.preventDefault();});}
132
+ else{jQuery(anchor).on('click',function(event){wppaOvlShow(this);event.preventDefault();});}
133
+ if(wppaIsMobile){window.addEventListener('orientationchange',wppaDoOnOrientationChange);}}}}
134
+ function wppaOvlResize(){wppaConsoleLog('wppaOvlResize');setTimeout('wppaOvlSize( '+wppaOvlAnimSpeed+' )',100);if(wppaOvlAudioStart&&!wppaOvlAudioPlaying){setTimeout('wppaOvlStartAudio()',1000);}}
135
+ function wppaShowFsButtons(opac){if(typeof(opac)!='undefined'){wppaNormsBtnOpac=opac;}
136
+ jQuery('#wppa-exit-btn').stop().fadeTo(3,wppaNormsBtnOpac);if(wppaOvlMode=='normal'){jQuery('#wppa-fulls-btn').stop().fadeTo(3,wppaNormsBtnOpac);}
137
+ else{jQuery('#wppa-norms-btn').stop().fadeTo(3,wppaNormsBtnOpac);}}
138
+ wppaConsoleLog('wppa-lightbox.js version '+wppaLightboxVersion+' loaded.','force');
js/wppa-popup.min.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-popup.js
2
+ //
3
+ // Contains popup modules
4
+ // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+
7
+ var wppaJsPopupVersion='6.1.9';function wppaPopUp(mocc,elm,id,name,desc,rating,ncom,videohtml,maxsizex,maxsizey){var topDivBig,topDivSmall,leftDivBig,leftDivSmall;var heightImgBig,heightImgSmall,widthImgBig,widthImgSmall,widthImgBigSpace;var puImg;var imghtml;if(document.getElementById('x-'+id+'-'+mocc)){var namediv=name?'<div id="wppa-name-'+mocc+'" style="display:none; padding:1px;" class="wppa_pu_info">'+name+'</div>':'';var descdiv=desc?'<div id="wppa-desc-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+desc+'</div>':'';var ratediv=rating?'<div id="wppa-rat-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+rating+'</div>':'';var ncomdiv=ncom?'<div id="wppa-ncom-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+ncom+'</div>':'';var popuptext=namediv+descdiv+ratediv+ncomdiv;var target='';if(wppaThumbTargetBlank){target='target="_blank"';}
8
+ switch(wppaPopupLinkType){case'none':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;case'fullpopup':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[id]+'" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;default:if(elm.onclick){imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');document.getElementById('wppa-img-'+mocc).onclick=elm.onclick;}
9
+ else{imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById('x-'+id+'-'+mocc).href+'" '+target+' style="line-height:1px;" >'+imghtml+'</a>'+popuptext+'</div>');}}}
10
+ puImg=document.getElementById('wppa-img-'+mocc);widthImgBig=parseInt(maxsizex);heightImgBig=parseInt(maxsizey);if(puImg)jQuery(".wppa_pu_info").css('width',((widthImgBig>heightImgBig?widthImgBig:heightImgBig)-8)+'px');leftDivSmall=parseInt(elm.offsetLeft)-7-5-1;topDivSmall=parseInt(elm.offsetTop)-7-1;widthImgSmall=parseInt(elm.clientWidth);heightImgSmall=parseInt(elm.clientHeight);widthImgBigSpace=widthImgBig>heightImgBig?widthImgBig:heightImgBig;leftDivBig=leftDivSmall-parseInt((widthImgBigSpace-widthImgSmall)/2);topDivBig=topDivSmall-parseInt((heightImgBig-heightImgSmall)/2);var lrMarg=parseInt((widthImgBigSpace-widthImgBig)/2);jQuery('#wppa-img-'+mocc).css({"maxWidth":widthImgBig+"px"});jQuery('#wppa-popup-'+mocc).css({"marginLeft":leftDivSmall+"px","marginTop":topDivSmall+"px"});jQuery('#wppa-img-'+mocc).css({"marginLeft":0,"marginRight":0,"width":widthImgSmall+"px","height":heightImgSmall+"px"});jQuery('#wppa-popup-'+mocc).stop().animate({"marginLeft":leftDivBig+"px","marginTop":topDivBig+"px"},400);jQuery('#wppa-img-'+mocc).stop().animate({"marginLeft":lrMarg+"px","marginRight":lrMarg+"px","width":widthImgBig+"px","height":heightImgBig+"px"},400);setTimeout('wppaPopReady( '+mocc+' )',400);}
11
+ function wppaPopReady(mocc){jQuery("#wppa-name-"+mocc).show();jQuery("#wppa-desc-"+mocc).show();jQuery("#wppa-rat-"+mocc).show();jQuery("#wppa-ncom-"+mocc).show();}
12
+ function wppaPopDown(mocc){jQuery('#wppa-popup-'+mocc).html("");return;}
13
+ function wppaFullPopUp(mocc,id,url,xwidth,xheight){var height=xheight+50;var width=xwidth+14;var name='';var desc='';var elm=document.getElementById('i-'+id+'-'+mocc);if(elm){name=elm.alt;desc=elm.title;}
14
+ var wnd=window.open('','Print','width='+width+', height='+height+', location=no, resizable=no, menubar=yes ');wnd.document.write('<html>');wnd.document.write('<head>');wnd.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+'; text-align:center;}</style>');wnd.document.write('<title>'+name+'</title>');wnd.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ></script>'+'<script type="text/javascript">function wppa_downl() {'+'jQuery.ajax( { url: \''+wppaAjaxUrl+'\','+'data: \'action=wppa'+'&wppa-action=makeorigname'+'&photo-id='+id+'&from=popup'+'\','+'async: true,'+'type: \'GET\','+'timeout: 10000,'+'beforeSend: function( xhr ) {'+'},'+'success: function( 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: function( xhr, status, error ) {'+'wppaConsoleLog( \'wppaFullPopUp failed. Error = \' + error + \', status = \' + status, \'force\' );'+'},'+'} );'+'}</script>');wnd.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>');wnd.document.write('</head>');wnd.document.write('<body>');wnd.document.write('<div style="width:'+xwidth+'px;">');wnd.document.write('<img src="'+url+'" style="padding-bottom:6px;" /><br/>');wnd.document.write('<div style="text-align:center">'+desc+'</div>');var left=xwidth-66;wnd.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />');left=xwidth-30;wnd.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />');wnd.document.write('</div>');wnd.document.write('</body>');wnd.document.write('</html>');}
15
+ wppaConsoleLog('wppa-popup.js version '+wppaJsPopupVersion+' loaded.','force');
js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '6.6.20';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -837,13 +837,6 @@ function _wppaNextSlide_5( mocc ) {
837
  }
838
  }
839
  }
840
-
841
- /* invre modification */
842
- /* activate the placeholder with actual html */
843
- if ( renderInvisibleReCaptcha ) {
844
- renderInvisibleReCaptcha();
845
- }
846
- /* end invre modification */
847
  }
848
 
849
  // Format a slide
@@ -1492,35 +1485,13 @@ return;
1492
  if ( ! document.getElementById( 'slide_frame-'+mocc ) ) return; // filmonly
1493
 
1494
  jQuery( "#wppa-ajax-spin-" + mocc ).fadeIn( 3000 );
1495
- // jQuery( "#wppa-ajax-spin-" + mocc ).fadeIn(); //css( 'display', '' );
1496
- /*
1497
- var top;
1498
- var lft;
1499
- var elm;
1500
-
1501
- var flag = true;
1502
 
1503
- if ( document.getElementById( 'theimg0-'+mocc ) ) {
1504
- if ( document.getElementById( 'theimg0-'+mocc ).complete ) flag = false;
1505
- }
1506
- if ( document.getElementById( 'theimg1-'+mocc ) ) {
1507
- if ( document.getElementById( 'theimg1-'+mocc ).complete ) flag = false;
1508
- }
1509
-
1510
- top = parseInt( document.getElementById( 'slide_frame-'+mocc ).clientHeight / 2 ) - 16;
1511
- lft = parseInt( document.getElementById( 'slide_frame-'+mocc ).clientWidth / 2 ) - 16;
1512
-
1513
- jQuery( '#spinner-'+mocc ).css( 'top',top );
1514
- jQuery( '#spinner-'+mocc ).css( 'left',lft );
1515
- jQuery( '#spinner-'+mocc ).html( '<img id="spinnerimg-'+mocc+'" src="'+wppaImageDirectory+'loading.gif" style="box-shadow: none" />' );
1516
- */
1517
  }
1518
 
1519
  function _wppaUnloadSpinner( mocc ) {
1520
 
1521
- // jQuery( "#wppa-ajax-spin-" + mocc ).stop().fadeOut(); //css( 'display', 'none' );
1522
-
1523
  jQuery( '#wppa-slide-spin-' + mocc ).stop().fadeOut();
 
1524
 
1525
  }
1526
 
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.6.22';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
837
  }
838
  }
839
  }
 
 
 
 
 
 
 
840
  }
841
 
842
  // Format a slide
1485
  if ( ! document.getElementById( 'slide_frame-'+mocc ) ) return; // filmonly
1486
 
1487
  jQuery( "#wppa-ajax-spin-" + mocc ).fadeIn( 3000 );
 
 
 
 
 
 
 
1488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1489
  }
1490
 
1491
  function _wppaUnloadSpinner( mocc ) {
1492
 
 
 
1493
  jQuery( '#wppa-slide-spin-' + mocc ).stop().fadeOut();
1494
+ setTimeout( function() { jQuery( '#wppa-slide-spin-' + mocc ).stop().fadeOut(); }, 1000 );
1495
 
1496
  }
1497
 
js/wppa-slideshow.min.js ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-slideshow.js
2
+ //
3
+ // Contains slideshow modules
4
+ // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+
7
+ var wppaJsSlideshowVersion='6.6.22';function wppaStoreSlideInfo(mocc,id,url,size,width,height,fullname,name,desc,photoid,avgrat,discount,myrat,rateurl,linkurl,linktitle,linktarget,iwtimeout,commenthtml,iptchtml,exifhtml,lbtitle,shareurl,smhtml,ogdsc,hiresurl,videohtml,audiohtml,waittext,imagealt,posterurl){var cursor;desc=wppaRepairScriptTags(desc);if(!_wppaSlides[mocc]||'0'==id){_wppaSlides[mocc]=[];_wppaNames[mocc]=[];_wppaFullNames[mocc]=[];_wppaDsc[mocc]=[];_wppaOgDsc[mocc]=[];_wppaCurIdx[mocc]=-1;_wppaNxtIdx[mocc]=0;if(parseInt(iwtimeout)>0)_wppaTimeOut[mocc]=parseInt(iwtimeout);else _wppaTimeOut[mocc]=wppaSlideShowTimeOut;_wppaSSRuns[mocc]=false;_wppaTP[mocc]=-2;_wppaFg[mocc]=0;_wppaIsBusy[mocc]=false;_wppaFirst[mocc]=true;_wppaId[mocc]=[];_wppaAvg[mocc]=[];_wppaDisc[mocc]=[];_wppaMyr[mocc]=[];_wppaVRU[mocc]=[];_wppaLinkUrl[mocc]=[];_wppaLinkTitle[mocc]=[];_wppaLinkTarget[mocc]=[];_wppaCommentHtml[mocc]=[];_wppaIptcHtml[mocc]=[];_wppaExifHtml[mocc]=[];_wppaUrl[mocc]=[];_wppaSkipRated[mocc]=false;_wppaLbTitle[mocc]=[];_wppaDidGoto[mocc]=false;wppaSlidePause[mocc]=false;_wppaShareUrl[mocc]=[];_wppaShareHtml[mocc]=[];_wppaFilmNoMove[mocc]=false;_wppaHiresUrl[mocc]=[];_wppaIsVideo[mocc]=[];_wppaVideoHtml[mocc]=[];_wppaAudioHtml[mocc]=[];_wppaVideoNatWidth[mocc]=[];_wppaVideoNatHeight[mocc]=[];wppaVideoPlaying[mocc]=false;wppaAudioPlaying[mocc]=false;_wppaWaitTexts[mocc]=[];_wppaImageAlt[mocc]=[];}
8
+ cursor='default';if(linkurl!=''){cursor='pointer';}
9
+ else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
10
+ _wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
11
+ if(posterurl.length>0){_wppaSlides[mocc][id]+=' poster="'+posterurl+'" ';}}
12
+ else{_wppaSlides[mocc][id]=' src="'+url+'" alt="'+imagealt+'" class="theimg theimg-'+mocc+' big stereo" ';}
13
+ if(wppaSlideSwipe){_wppaSlides[mocc][id]+=' ontouchstart="wppaTouchStart( event, this.id, '+mocc+' );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );" ';}
14
+ if(!wppaAutoColumnWidth[mocc])_wppaSlides[mocc][id]+='width="'+width+'" height="'+height+'" ';if(_wppaIsVideo[mocc][id]){var controls;controls='wppa'==wppaLightBox[mocc]?'':'controls';_wppaSlides[mocc][id]+='style="'+size+'; cursor:'+cursor+'; display:none;" '+controls+'>'+videohtml+'</video>';}
15
+ else{_wppaSlides[mocc][id]+='style="'+size+'; cursor:'+cursor+'; display:none; vertical-align:middle;">';}
16
+ _wppaFullNames[mocc][id]=fullname;_wppaNames[mocc][id]=name;_wppaDsc[mocc][id]=desc;_wppaOgDsc[mocc][id]=ogdsc;_wppaId[mocc][id]=photoid;_wppaAvg[mocc][id]=avgrat;wppaConsoleLog('_wppaAvg[mocc][id]='+_wppaAvg[mocc][id],'force');_wppaDisc[mocc][id]=discount;wppaConsoleLog('discount='+discount,'force');_wppaMyr[mocc][id]=myrat;wppaConsoleLog('myrat='+myrat,'force');_wppaVRU[mocc][id]=rateurl;_wppaLinkUrl[mocc][id]=linkurl;_wppaLinkTitle[mocc][id]=linktitle;if(linktarget!=''){_wppaLinkTarget[mocc][id]=linktarget;}
17
+ else if(wppaSlideBlank[mocc]){_wppaLinkTarget[mocc][id]='_blank';}
18
+ else{_wppaLinkTarget[mocc][id]='_self';}
19
+ _wppaCommentHtml[mocc][id]=commenthtml;_wppaIptcHtml[mocc][id]=iptchtml;_wppaExifHtml[mocc][id]=exifhtml;_wppaUrl[mocc][id]=url;_wppaLbTitle[mocc][id]=wppaRepairScriptTags(lbtitle);_wppaShareUrl[mocc][id]=shareurl;_wppaShareHtml[mocc][id]=wppaRepairScriptTags(smhtml);_wppaHiresUrl[mocc][id]=hiresurl;_wppaVideoHtml[mocc][id]=videohtml;_wppaAudioHtml[mocc][id]=audiohtml;_wppaVideoNatWidth[mocc][id]=width;_wppaVideoNatHeight[mocc][id]=height;_wppaWaitTexts[mocc][id]=waittext;_wppaImageAlt[mocc][id]=imagealt;}
20
+ function wppaSpeed(mocc,faster){if(_wppaSSRuns[mocc]){_wppaSpeed(mocc,faster);}}
21
+ function wppaStopShow(mocc){if(_wppaSSRuns[mocc]){_wppaStop(mocc);}}
22
+ function wppaStartStop(mocc,index){if(_wppaIsBusy[mocc]){_wppaTP[mocc]=index;}
23
+ else{if(_wppaSSRuns[mocc]){_wppaStop(mocc);jQuery('#wppa-startstop-icon-'+mocc).html(wppaSvgHtml('Play-Button','48px',false,true,'0','10','50','50'));}
24
+ else{_wppaStart(mocc,index);if(index==-1){jQuery('#wppa-startstop-icon-'+mocc).html(wppaSvgHtml('Pause-Button','48px',false,true,'0','10','50','50'));}}
25
+ if(wppaIsMobile){jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(10,1).fadeTo(3000,0);jQuery('.ubb-'+mocc).stop().fadeTo(10,1).fadeTo(3000,0);}}}
26
+ function wppaBbb(mocc,where,act){if(!_wppaSSRuns[mocc]){_wppaBbb(mocc,where,act);}}
27
+ function wppaUbb(mocc,where,act){_wppaUbb(mocc,where,act);}
28
+ function wppaRateIt(mocc,value){_wppaRateIt(mocc,value);}
29
+ function wppaOvlRateIt(id,value,mocc,reloadAfter){_wppaOvlRateIt(id,value,mocc,reloadAfter);}
30
+ function wppaPrev(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaPrev(mocc);}}
31
+ function wppaPrevN(mocc,n){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaPrevN(mocc,n);}}
32
+ function wppaFirst(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,0);}}
33
+ function wppaNext(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaNext(mocc);}}
34
+ function wppaNextN(mocc,n){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaNextN(mocc,n);}}
35
+ function wppaLast(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,_wppaSlides[mocc].length-1);}}
36
+ function wppaFollowMe(mocc,idx){if(!_wppaSSRuns[mocc]){_wppaFollowMe(mocc,idx);}}
37
+ function wppaLeaveMe(mocc,idx){if(!_wppaSSRuns[mocc]){_wppaLeaveMe(mocc,idx);}}
38
+ function wppaGoto(mocc,idx){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,idx);}}
39
+ function wppaGotoFilmNoMove(mocc,idx){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaFilmNoMove[mocc]=true;_wppaGoto(mocc,idx);}}
40
+ function wppaGotoKeepState(mocc,idx){if(_wppaNxtIdx[mocc]==idx)return;_wppaDidGoto[mocc]=true;_wppaGotoKeepState(mocc,idx);}
41
+ function _wppaGotoKeepState(mocc,idx){if(_wppaSSRuns[mocc]){_wppaGotoRunning(mocc,idx);}
42
+ else{_wppaGoto(mocc,idx);}}
43
+ function wppaGotoRunning(mocc,idx){_wppaDidGoto[mocc]=true;_wppaGotoRunning(mocc,idx);}
44
+ function wppaValidateComment(mocc){return _wppaValidateComment(mocc);}
45
+ function _wppaNextSlide(mocc,mode){var fg=_wppaFg[mocc];var bg=1-fg;if((wppaVideoPlaying[mocc]||wppaAudioPlaying[mocc])&&_wppaSSRuns[mocc]){setTimeout('_wppaNextSlide( '+mocc+', \''+mode+'\' )',500);return;}
46
+ wppaStopVideo(mocc);wppaStopAudio(mocc);if('auto'==mode){if(wppaSlidePause[mocc]){jQuery('#theimg'+fg+'-'+mocc).attr("title",wppaSlidePause[mocc]);jQuery('#slide_frame-'+mocc).attr("title",wppaSlidePause[mocc]);setTimeout('_wppaNextSlide( '+mocc+', "auto" )',250);return;}}
47
+ else{jQuery('#slide_frame-'+mocc).removeAttr("title");}
48
+ if(!_wppaSSRuns[mocc]&&'auto'==mode)return;if(!_wppaSlides[mocc])return;if(_wppaSlides[mocc].length<2&&!_wppaFirst[mocc])return;if(!_wppaSSRuns[mocc]&&'reset'==mode){_wppaSSRuns[mocc]=true;__wppaOverruleRun=false;}
49
+ _wppaVoteInProgress=false;_wppaIsBusy[mocc]=true;if(_wppaSSRuns[mocc])_wppaShowMetaData(mocc,'hide');if(_wppaSSRuns[mocc]){_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;}
50
+ jQuery('#geodiv-'+mocc+'-'+_wppaId[mocc][_wppaCurIdx[mocc]]).css({display:'none'});jQuery('#geodiv-'+mocc+'-'+_wppaId[mocc][_wppaNxtIdx[mocc]]).css({display:''});if(typeof(_wppaLat)!='undefined'){if(_wppaLat[mocc]){if(_wppaLat[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]]){jQuery('#map-canvas-'+mocc).css('display','');wppaGeoInit(mocc,_wppaLat[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]],_wppaLon[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]]);}
51
+ else jQuery('#map-canvas-'+mocc).css('display','none');}
52
+ else jQuery('#map-canvas-'+mocc).css('display','none');}
53
+ else jQuery('#map-canvas-'+mocc).css('display','none');jQuery('[id^=wppa-numbar-'+mocc+'-]').css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar});jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive});if(_wppaSlides[mocc].length>wppaNumbarMax){jQuery('[id^=wppa-numbar-'+mocc+'-]').html(' . ');jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).html(' '+(_wppaNxtIdx[mocc]+1)+' ');}
54
+ if(_wppaFirst[mocc]){if(_wppaCurIdx[mocc]!=-1){wppaMakeTheSlideHtml(mocc,'0',_wppaCurIdx[mocc]);}
55
+ wppaMakeTheSlideHtml(mocc,'1',_wppaNxtIdx[mocc]);jQuery("#imagedesc-"+mocc).html(_wppaDsc[mocc][_wppaCurIdx[mocc]]);jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);if(wppaSlideshowNavigationType=='icons'){jQuery('#prev-arrow-'+mocc).html(wppaSvgHtml('Prev-Button','1.5em',false,true));jQuery('#next-arrow-'+mocc).html(wppaSvgHtml('Next-Button','1.5em',false,true));}
56
+ else{if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#prev-arrow-'+mocc).html('&laquo;&nbsp;'+wppaPrevP);jQuery('#next-arrow-'+mocc).html(wppaNextP+'&nbsp;&raquo;');}
57
+ else{jQuery('#prev-arrow-'+mocc).html('&laquo;&nbsp;'+wppaPreviousPhoto);jQuery('#next-arrow-'+mocc).html(wppaNextPhoto+'&nbsp;&raquo;');}}
58
+ if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);}
59
+ else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);}}
60
+ else{wppaMakeTheSlideHtml(mocc,bg,_wppaNxtIdx[mocc]);}
61
+ _wppaLoadSpinner(mocc);_wppaFirst[mocc]=false;_wppaCheckRewind(mocc);wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);setTimeout('_wppaNextSlide_2( '+mocc+' )',10);}
62
+ function _wppaNextSlide_2(mocc){var fg=_wppaFg[mocc];var bg=1-fg;var elm=document.getElementById('theimg'+bg+"-"+mocc);if(elm){if(1==elm.nodeType){if('IMG'==elm.nodeName){if(!elm.complete){setTimeout('_wppaNextSlide_2( '+mocc+' )',100);wppaConsoleLog('Retry next2');return;}}}}
63
+ wppaUpdateLightboxes();_wppaUnloadSpinner(mocc);if(_wppaSSRuns[mocc]!=-1){if(!_wppaToTheSame){_wppaShowMetaData(mocc,'hide');}}
64
+ _wppaFg[mocc]=1-_wppaFg[mocc];fg=_wppaFg[mocc];bg=1-fg;setTimeout('_wppaNextSlide_3( '+mocc+' )',10);}
65
+ function _wppaNextSlide_3(mocc){var nw=_wppaFg[mocc];var ol=1-nw;var olIdx=_wppaCurIdx[mocc];var nwIdx=_wppaNxtIdx[mocc];var olSli="#theslide"+ol+"-"+mocc;var nwSli="#theslide"+nw+"-"+mocc;var olImg="#theimg"+ol+"-"+mocc;var nwImg="#theimg"+nw+"-"+mocc;var w=parseInt(jQuery(olSli).css('width'));var dir='nil';if(olIdx==nwIdx)dir='none';if(olIdx==nwIdx-1)dir='left';if(olIdx==nwIdx+1)dir='right';if(olIdx==_wppaSlides[mocc].length-1&&0==nwIdx&&wppaSlideWrap)dir='left';if(0==olIdx&&nwIdx==_wppaSlides[mocc].length-1&&wppaSlideWrap)dir='right';if('nil'==dir){if(olIdx<nwIdx)dir='left';else dir='right';}
66
+ jQuery(olSli).css({marginLeft:0,width:w});jQuery(nwSli).css({marginLeft:0,width:w});wppaFormatSlide(mocc);switch(wppaAnimationType){case'fadeover':jQuery(olImg).fadeOut(wppaAnimationSpeed);jQuery(nwImg).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(mocc));break;case'fadeafter':jQuery(olImg).fadeOut(wppaAnimationSpeed);jQuery(nwImg).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(mocc));break;case'swipe':switch(dir){case'left':jQuery(olSli).animate({marginLeft:-w+"px"},wppaAnimationSpeed,"swing");jQuery(nwSli).css({marginLeft:w+"px"});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'right':jQuery(olSli).animate({marginLeft:w+"px"},wppaAnimationSpeed,"swing");jQuery(nwSli).css({marginLeft:-w+"px"});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
67
+ break;case'stackon':switch(dir){case'left':jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({marginLeft:w+"px",zIndex:81});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'right':jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({marginLeft:-w+"px",zIndex:81});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
68
+ break;case'stackoff':switch(dir){case'left':jQuery(olSli).css({marginLeft:0,zIndex:81});jQuery(olSli).animate({marginLeft:-w+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(nwSli).css({marginLeft:0,zIndex:80});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'right':jQuery(olSli).css({marginLeft:0,zIndex:81});jQuery(olSli).animate({marginLeft:w+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(nwSli).css({marginLeft:0,zIndex:80});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
69
+ break;case'turnover':switch(dir){case'left':case'right':var nwImgWid=parseInt(jQuery(nwSli).css('width'));var nwMarLft=parseInt(jQuery(nwImg).css('marginLeft'));jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({zIndex:81,width:0});jQuery(nwImg).css({maxWidth:0,marginLeft:0});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({width:w},wppaAnimationSpeed,"swing");jQuery(nwImg).animate({maxWidth:nwImgWid,marginLeft:nwMarLft},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
70
+ break;default:alert('Animation type '+wppaAnimationType+' is not supported in this version');}}
71
+ function _wppaNextSlide_4(mocc){var nw=_wppaFg[mocc];var ol=1-nw;var olSli="#theslide"+ol+"-"+mocc;var nwSli="#theslide"+nw+"-"+mocc;jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({zIndex:81});_wppaCurIdx[mocc]=_wppaNxtIdx[mocc];wppaFormatSlide(mocc);if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
72
+ else{jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}
73
+ jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);_wppaAdjustFilmstrip(mocc);_wppaSetRatingDisplay(mocc);setTimeout('_wppaNextSlide_5( '+mocc+' )',_wppaTextDelay);}
74
+ function _wppaNextSlide_5(mocc){if(!_wppaToTheSame){var imageDescHtml=_wppaDsc[mocc][_wppaCurIdx[mocc]];jQuery('#imagedesc-'+mocc).html(imageDescHtml);if(wppaHideWhenEmpty){var desc=_wppaDsc[mocc][_wppaCurIdx[mocc]];if(''==desc||'&nbsp;'==desc){jQuery('#descbox-'+mocc).css('display','none');}
75
+ else{jQuery('#descbox-'+mocc).css('display','');}}
76
+ jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#wppa-share-"+mocc).html(_wppaShareHtml[mocc][_wppaCurIdx[mocc]]);}
77
+ _wppaToTheSame=false;if(_wppaSSRuns[mocc]&&!wppaSlideWrap&&((_wppaCurIdx[mocc]+1)==_wppaSlides[mocc].length)){_wppaIsBusy[mocc]=false;_wppaStop(mocc);return;}
78
+ _wppaShowMetaData(mocc,'show');if(_wppaTP[mocc]!=-2){var index=_wppaTP[mocc];_wppaTP[mocc]=-2;_wppaDidGoto[mocc]=false;_wppaIsBusy[mocc]=false;if(!wppaIsMini[mocc]){_bumpViewCount(_wppaId[mocc][_wppaCurIdx[mocc]]);}
79
+ _wppaDoAutocol(mocc);wppaStartStop(mocc,index);return;}
80
+ else{wppaUpdateLightboxes();if(!wppaIsMini[mocc]){var visurl=wppaGetCurrentFullUrl(mocc,_wppaCurIdx[mocc]);if(''==visurl){visurl=_wppaShareUrl[mocc][_wppaCurIdx[mocc]];}
81
+ if(typeof(wppaQRUpdate)!='undefined'){wppaQRUpdate(_wppaShareUrl[mocc][_wppaCurIdx[mocc]]);}
82
+ if(_wppaSlides[mocc].length>1){wppaPushStateSlide(mocc,_wppaCurIdx[mocc],visurl);}}
83
+ if(_wppaSSRuns[mocc]){setTimeout('_wppaNextSlide( '+mocc+', "auto" )',wppaGetSlideshowTimeout(mocc));}}
84
+ jQuery(document).trigger('glossaryTooltipReady');_wppaDidGoto[mocc]=false;_wppaIsBusy[mocc]=false;if(!wppaIsMini[mocc]){_bumpViewCount(_wppaId[mocc][_wppaCurIdx[mocc]]);}
85
+ _wppaDoAutocol(mocc);wppaStopAudio(mocc);if(wppaSlideAudioStart){var elms=jQuery('.wppa-audio-'+_wppaId[mocc][_wppaCurIdx[mocc]]+'-'+mocc);if(elms.length>0){var audio=elms[elms.length-1];if(audio){if(!wppaAudioPlaying[mocc]){audio.play();}}}}}
86
+ function wppaFormatSlide(mocc){var imgid='theimg'+_wppaFg[mocc]+'-'+mocc;var slideid='theslide'+_wppaFg[mocc]+'-'+mocc;var frameid='slide_frame-'+mocc;var contw=wppaColWidth[mocc];var elm=document.getElementById(imgid);var audios=jQuery('.wppa-audio-'+mocc);if(!elm)return;if(typeof(contw)=='undefined'||contw==0){contw=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=contw;}
87
+ var natwidth=elm.naturalWidth;if(typeof(natwidth)=='undefined')natwidth=parseInt(elm.style.maxWidth);var natheight=elm.naturalHeight;if(typeof(natheight)=='undefined')natheight=parseInt(elm.style.maxHeight);var aspect=wppaAspectRatio[mocc];var fullsize=wppaFullSize[mocc];var delta=wppaFullFrameDelta[mocc];var ponly=wppaPortraitOnly[mocc];var valign=wppaFullValign[mocc];if(typeof(valign)=='undefined')valign='none';var halign=wppaFullHalign[mocc];if(typeof(halign)=='undefined')halign='none';var stretch=wppaStretch;var imgw,imgh;var margl,margt;var slidew,slideh;var framew,frameh;if(ponly){imgw=contw-delta;imgh=parseInt(imgw*natheight/natwidth);margl=0;margt=0;slidew=contw;slideh=imgh+delta;framew=contw;frameh=slideh;jQuery('#'+frameid).css({width:framew,height:frameh});jQuery('#'+slideid).css({width:slidew,height:slideh});jQuery('#'+imgid).css({width:imgw,height:imgh});}
88
+ else{framew=contw;if(fullsize<contw){framew=fullsize;}
89
+ frameh=parseInt(framew*aspect);slidew=framew;slideh=frameh;if(stretch||natwidth>=(framew-delta)||natheight>=(frameh-delta)){if(((natheight+delta)/(natwidth+delta))>aspect){imgh=frameh-delta;imgw=parseInt(imgh*natwidth/natheight);}
90
+ else{imgw=framew-delta;imgh=parseInt(imgw*natheight/natwidth);}}
91
+ else{imgw=natwidth;imgh=natheight;}
92
+ if(valign!='default'&&valign!='none'){switch(valign){case'top':margt=0;break;case'center':margt=parseInt((frameh-(imgh+delta))/2);break;case'bottom':margt=frameh-(imgh+delta);break;case'fit':margt=0;frameh=imgh+delta;slideh=imgh+delta;break;default:}
93
+ jQuery('#'+imgid).css({marginTop:margt,marginBottom:0});}
94
+ jQuery('#'+frameid).css({width:framew,height:frameh});jQuery('#'+slideid).css({width:slidew,height:slideh});jQuery('#'+imgid).css({width:imgw,height:imgh});if(valign!='default'&&valign!='none'&&halign!='none'&&halign!='default'){switch(halign){case'left':margl=0;break;case'center':margl=parseInt((contw-framew)/2);break;case'right':margl=contw-framew;break;default:}
95
+ if(margl<0)margl=0;jQuery('#'+imgid).css({marginLeft:'auto',marginRight:'auto'});jQuery('#'+frameid).css({marginLeft:margl});}
96
+ if(audios.length>0){var i=0;jQuery(audios[i]).css({width:imgw,left:(contw-imgw)/2});i++;}}
97
+ var bbbwidth=parseInt(framew/3);var leftmarg=bbbwidth*2;jQuery('#bbb-'+mocc+'-l').css({height:frameh,width:bbbwidth,left:0});jQuery('#bbb-'+mocc+'-r').css({height:frameh,width:bbbwidth,left:leftmarg});}
98
+ function wppaMakeNameHtml(mocc){var result='';if(_wppaCurIdx[mocc]<0)return'';if(wppaIsMini[mocc]||_wppaIsVideo[mocc][_wppaCurIdx[mocc]]){result=_wppaFullNames[mocc][_wppaCurIdx[mocc]];}
99
+ else switch(wppaArtMonkyLink){case'file':case'zip':if(wppaArtMonkeyButton){if(_wppaFullNames[mocc][_wppaCurIdx[mocc]]){var label=_wppaFullNames[mocc][_wppaCurIdx[mocc]].split('<img');result='<input'+' type="button"'+' title="Download"'+' style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(mocc)-24)+'px;"'+' class="wppa-download-button"'+' onclick="'+(wppaIsSafari&&wppaArtMonkyLink=='file'?'wppaWindowReference = window.open();':'')+'wppaAjaxMakeOrigName( '+mocc+', \''+_wppaId[mocc][_wppaCurIdx[mocc]]+'\' );"'+' value="'+wppaDownLoad+': '+label[0]+'"'+' />';if(label[1])result+='<img'+label[1];}
100
+ else{result='';}}
101
+ else{result='<a'+' title="Download"'+' style="cursor:pointer;"'+' onclick="'+(wppaIsSafari&&wppaArtMonkyLink=='file'?'wppaWindowReference = window.open();':'')+'wppaAjaxMakeOrigName( '+mocc+', \''+_wppaId[mocc][_wppaCurIdx[mocc]]+'\' );"'+' >'+
102
+ wppaDownLoad+': '+_wppaFullNames[mocc][_wppaCurIdx[mocc]]+'</a>';}
103
+ break;case'none':result=_wppaFullNames[mocc][_wppaCurIdx[mocc]];break;default:result='';}
104
+ return wppaRepairBrTags(result);}
105
+ function wppaMakeTheSlideHtml(mocc,bgfg,idx){var imgVideo=(_wppaIsVideo[mocc][idx])?'video':'img';var theHtml;var url;var theTitle='title';if(wppaLightBox[mocc]=='wppa')theTitle='data-lbtitle';var mmEvents=wppaLightBox[mocc]==''?' onpause="wppaVideoPlaying['+mocc+'] = false;" onplay="wppaVideoPlaying['+mocc+'] = true;"':'';if(_wppaLinkUrl[mocc][idx]!=''){if(wppaSlideToFullpopup){theHtml='<a onclick="wppaStopAudio();wppaStopShow('+mocc+');'+_wppaLinkUrl[mocc][idx]+'" target="'+_wppaLinkTarget[mocc][idx]+'" title="'+_wppaLinkTitle[mocc][idx]+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';}
106
+ else{theHtml='<a onclick="_bumpClickCount(\''+_wppaId[mocc][idx]+'\');wppaStopAudio();wppaStopShow('+mocc+');window.open(\''+_wppaLinkUrl[mocc][idx]+'\', \''+_wppaLinkTarget[mocc][idx]+'\');" title="'+_wppaLinkTitle[mocc][idx]+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';}}
107
+ else{if(wppaLightBox[mocc]==''){theHtml='<'+imgVideo+mmEvents+' title="'+_wppaNames[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx];}
108
+ else{var html='';var i=0;var set=wppaLightboxSingle[mocc]?'':'[slide-'+mocc+'-'+bgfg+']';while(i<idx){if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][i];}
109
+ else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][i]);}
110
+ html+='<a href="'+url+'"'+
111
+ ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][i]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][i]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][i])+'"':'')+
112
+ ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][i])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][i]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'"></a>';i++;}
113
+ if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][idx];}
114
+ else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][idx]);}
115
+ html+='<a href="'+url+'"'+' onclick="wppaStopAudio();wppaStopShow('+mocc+');"'+' target="'+_wppaLinkTarget[mocc][idx]+'"'+
116
+ ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][idx]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][idx]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][idx])+'"':'')+
117
+ ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][idx])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][idx]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';i=idx+1;while(i<_wppaUrl[mocc].length){if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][i];}
118
+ else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][i]);}
119
+ html+='<a href="'+url+'"'+
120
+ ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][i]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][i]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][i])+'"':'')+
121
+ ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][i])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][i]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'"></a>';i++;}
122
+ theHtml=html;}}
123
+ if(_wppaAudioHtml[mocc][idx]!=''){theHtml+='<audio'+' controls'+' id="wppa-audio-'+_wppaId[mocc][idx]+'-'+mocc+'"'+' class="wppa-audio-'+mocc+' wppa-audio-'+_wppaId[mocc][idx]+'-'+mocc+'"'+' data-from="wppa"'+' onplay="wppaAudioPlaying['+mocc+'] = true;"'+' onpause="wppaAudioPlaying['+mocc+'] = false"'+' style="'+'position:relative;'+'top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+'px;'+'z-index:10;'+'width:'+_wppaVideoNatWidth[mocc][idx]+'px;'+'left:'+(Math.max(0,(wppaGetContainerWidth(mocc)-_wppaVideoNatWidth[mocc][idx])/2))+'px;'+'padding:0 '+wppaSlideBorderWidth+'px;'+'box-sizing:border-box;'+'"'+' >'+
124
+ _wppaAudioHtml[mocc][idx]+'</audio>';}
125
+ theHtml=theHtml.replace(/title=""/g,'');jQuery("#theslide"+bgfg+"-"+mocc).html(theHtml);}
126
+ function _wppaAdjustFilmstrip(mocc){if(!document.getElementById('wppa-filmstrip-'+mocc))return;jQuery('.wppa-film-'+mocc).removeClass('wppa-filmthumb-active');if(!_wppaFilmNoMove[mocc]){var xoffset;xoffset=wppaFilmStripLength[mocc]/2-(_wppaCurIdx[mocc]+0.5+wppaPreambule)*wppaThumbnailPitch[mocc]-wppaFilmStripMargin[mocc];if(wppaFilmShowGlue)xoffset-=(wppaFilmStripMargin[mocc]*2+2);jQuery('#wppa-filmstrip-'+mocc).stop().animate({marginLeft:xoffset+'px'},wppaAnimationSpeed);}
127
+ else{_wppaFilmNoMove[mocc]=false;}
128
+ if(_wppaCurIdx[mocc]!=-1){var from=_wppaCurIdx[mocc]-10;if(from<0)from=0;var to=_wppaCurIdx[mocc]+10;if(to>_wppaSlides[mocc].length)to=_wppaSlides[mocc].length;var index=0;while(index<_wppaSlides[mocc].length){var html=jQuery('#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc).html();if(html){if(from<=index<=to){if(html.search('<!--')!=-1){html=html.replace('<!--','');html=html.replace('-->','');jQuery('#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc).html(html);}}
129
+ if(jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title')!=''){jQuery('#wppa-film-'+index+'-'+mocc).attr('title',jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title'));jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title'));}
130
+ else if(wppaFilmThumbTitle!=''&&_wppaCurIdx[mocc]==index){jQuery('#wppa-film-'+index+'-'+mocc).attr('title',wppaFilmThumbTitle);jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',wppaFilmThumbTitle);}
131
+ else{jQuery('#wppa-film-'+index+'-'+mocc).attr('title',wppaClickToView+' '+_wppaNames[mocc][index]);jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',wppaClickToView+' '+_wppaNames[mocc][index]);}}
132
+ index++;}}
133
+ jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).addClass('wppa-filmthumb-active');}
134
+ function _wppaNext(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==(_wppaSlides[mocc].length-1))return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;_wppaNextSlide(mocc,0);}
135
+ function _wppaNextN(mocc,n){if(!wppaSlideWrap&&_wppaCurIdx[mocc]>=(_wppaSlides[mocc].length-n))return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+n;while(_wppaNxtIdx[mocc]>=_wppaSlides[mocc].length)_wppaNxtIdx[mocc]-=_wppaSlides[mocc].length;_wppaNextSlide(mocc,0);}
136
+ function _wppaNextOnCallback(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==(_wppaSlides[mocc].length-1))return;if(_wppaSkipRated[mocc]){var now=_wppaCurIdx[mocc];var idx=now+1;if(idx==_wppaSlides[mocc].length)idx=0;var next=idx;if(_wppaMyr[mocc][next]!=0){idx++;if(idx==_wppaSlides[mocc].length)idx=0;while(idx!=next&&_wppaMyr[mocc][idx]!=0){idx++;if(idx==_wppaSlides[mocc].length)idx=0;}
137
+ next=idx;}
138
+ _wppaNxtIdx[mocc]=next;}
139
+ else{_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;}
140
+ _wppaNextSlide(mocc,0);}
141
+ function _wppaPrev(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==0)return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]-1;if(_wppaNxtIdx[mocc]<0)_wppaNxtIdx[mocc]=_wppaSlides[mocc].length-1;_wppaNextSlide(mocc,0);}
142
+ function _wppaPrevN(mocc,n){if(!wppaSlideWrap&&_wppaCurIdx[mocc]<n)return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]-n;while(_wppaNxtIdx[mocc]<0)_wppaNxtIdx[mocc]+=_wppaSlides[mocc].length;_wppaNextSlide(mocc,0);}
143
+ function _wppaGoto(mocc,idx){_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;_wppaNextSlide(mocc,0);}
144
+ function _wppaGotoRunning(mocc,idx){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoRunning( '+mocc+','+idx+' )',10);return;}
145
+ wppaConsoleLog('GotoRunning '+mocc);_wppaSSRuns[mocc]=false;_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;__wppaOverruleRun=true;_wppaNextSlide(mocc,"manual");_wppaGotoContinue(mocc);}
146
+ function _wppaGotoContinue(mocc){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoContinue( '+mocc+' )',10);return;}
147
+ setTimeout('_wppaNextSlide( '+mocc+', "reset" )',wppaGetSlideshowTimeout(mocc)+10);}
148
+ function _wppaStart(mocc,idx){if(wppaSlideshowNavigationType=='icons'){_wppaStartIcons(mocc,idx);}
149
+ else{_wppaStartText(mocc,idx);}}
150
+ function _wppaStartIcons(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
151
+ if(idx>-1){jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
152
+ else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaSvgHtml('Pause-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).show();jQuery('#speed1-'+mocc).show();_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
153
+ else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
154
+ _wppaSetRatingDisplay(mocc);}
155
+ function _wppaStartText(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
156
+ if(idx>-1){jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
157
+ else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaStop);jQuery('#speed0-'+mocc).css('display','inline');jQuery('#speed1-'+mocc).css('display','inline');_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
158
+ else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
159
+ _wppaSetRatingDisplay(mocc);}
160
+ function _wppaStop(mocc){if(wppaSlideshowNavigationType=='icons'){_wppaStopIcons(mocc);}
161
+ else{_wppaStopText(mocc);}}
162
+ function _wppaStopIcons(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
163
+ else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
164
+ function _wppaStopText(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
165
+ else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
166
+ function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
167
+ if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
168
+ else{if(_wppaTimeOut[mocc]<60000)_wppaTimeOut[mocc]*=1.5;}}
169
+ function _wppaLoadSpinner(mocc){return;if(!document.getElementById('slide_frame-'+mocc))return;jQuery("#wppa-ajax-spin-"+mocc).fadeIn(3000);}
170
+ function _wppaUnloadSpinner(mocc){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();setTimeout(function(){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();},1000);}
171
+ function _wppaCheckRewind(mocc){var n_images;var n_diff;var l_substrate;var x_marg;if(!document.getElementById('wppa-filmstrip-'+mocc))return;n_diff=Math.abs(_wppaCurIdx[mocc]-_wppaNxtIdx[mocc]);if(n_diff<=wppaFilmPageSize[mocc])return;var n_images=wppaFilmStripLength[mocc]/wppaThumbnailPitch[mocc];if(n_diff>=((n_images+1)/2)){l_substrate=wppaThumbnailPitch[mocc]*_wppaSlides[mocc].length;if(wppaFilmShowGlue)l_substrate+=(2+2*wppaFilmStripMargin[mocc]);x_marg=parseInt(jQuery('#wppa-filmstrip-'+mocc).css('margin-left'));if(_wppaNxtIdx[mocc]>_wppaCurIdx[mocc]){x_marg-=l_substrate;}
172
+ else{x_marg+=l_substrate;}
173
+ jQuery('#wppa-filmstrip-'+mocc).css('margin-left',x_marg+'px');}}
174
+ function _wppaSetRatingDisplay(mocc){wppaConsoleLog('_wppaSetRatingDisplay() called with arg '+mocc,'force');wppaConsoleLog('_wppaAvg[mocc][_wppaCurIdx[mocc]]='+_wppaAvg[mocc][_wppaCurIdx[mocc]]+' _wppaCurIdx[mocc]='+_wppaCurIdx[mocc],'force');var idx,avg,tmp,cnt,dsc,myr,dsctxt;if(!document.getElementById('wppa-rating-'+mocc))return;avg=_wppaAvg[mocc][_wppaCurIdx[mocc]];if(typeof(avg)=='undefined')return;if(wppaRatingDisplayType=='likes'){var likeText=avg.split("|");jQuery('#wppa-like-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+mocc).html(likeText[1]);if(_wppaMyr[mocc][_wppaCurIdx[mocc]]=='1'){jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
175
+ else{jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
176
+ return;}
177
+ tmp=avg.split('|');avg=tmp[0];cnt=tmp[1];dsc=_wppaDisc[mocc][_wppaCurIdx[mocc]];myr=_wppaMyr[mocc][_wppaCurIdx[mocc]];wppaConsoleLog('avg='+avg+' cnt='+cnt+' dsc='+dsc+' myr='+myr);if(wppaRatingDisplayType=='graphic'){_wppaSetRd(mocc,avg,'#wppa-avg-');_wppaSetRd(mocc,myr,'#wppa-rate-');if(myr==0){jQuery('#wppa-dislike-'+mocc).css('display','inline');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','inline');if(document.getElementById('wppa-dislike-'+mocc))jQuery('#wppa-filler-'+mocc).css('display','none');jQuery('#wppa-dislike-'+mocc).stop().fadeTo(100,wppaStarOpacity);}
178
+ else{jQuery('#wppa-dislike-'+mocc).css('display','none');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','none');jQuery('#wppa-filler-'+mocc).css('display','inline');jQuery('#wppa-filler-'+mocc).stop().fadeTo(100,wppaStarOpacity);jQuery('#wppa-filler-'+mocc).attr('title',dsc);}}
179
+ else{jQuery('#wppa-numrate-avg-'+mocc).html(avg+' ( '+cnt+' ) ');if(wppaRatingOnce&&myr>0){jQuery('#wppa-numrate-mine-'+mocc).html(myr);}
180
+ else if(myr<0){jQuery('#wppa-numrate-mine-'+mocc).html(' dislike');}
181
+ else{var htm='';for(i=1;i<=wppaRatingMax;i++){if(myr==i){htm+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+mocc+', '+i+' )">&nbsp;'+i+'&nbsp;</span>';}
182
+ else{if(myr>(i-1)&&myr<i)htm+='&nbsp;( '+myr+' )&nbsp;';htm+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+mocc+', '+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+'&nbsp;</span>';}}
183
+ jQuery('#wppa-numrate-mine-'+mocc).html(htm);}
184
+ if(myr==0){jQuery('#wppa-dislike-'+mocc).css('display','inline');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','inline');jQuery('#wppa-filler-'+mocc).css('display','none');jQuery('#wppa-dislike-'+mocc).stop().fadeTo(100,wppaStarOpacity);}
185
+ else{jQuery('#wppa-dislike-'+mocc).css('display','none');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','none');jQuery('#wppa-filler-'+mocc).css('display','inline');}
186
+ jQuery('#wppa-discount-'+mocc).html(dsc+'&bull; ');jQuery('#wppa-filler-'+mocc).css('display','none');}
187
+ if(myr==0){jQuery('#wppa-vote-button-'+mocc).val(wppaVoteForMe);}
188
+ else{jQuery('#wppa-vote-button-'+mocc).val(wppaVotedForMe);}
189
+ jQuery('#wppa-vote-count-'+mocc).html(cnt);}
190
+ function wppaGetDislikeText(dsc,myr,incmine){return dsc;}
191
+ function _wppaSetRd(mocc,avg,where){wppaConsoleLog('_wppaSetRd() called with args:'+mocc+' '+avg+' '+where,'force');var idx1=parseInt(avg);var idx2=idx1+1;var frac=avg-idx1;var opac=wppaStarOpacity+frac*(1.0-wppaStarOpacity);var ilow=1;var ihigh=wppaRatingMax;for(idx=ilow;idx<=ihigh;idx++){if(where=='#wppa-rate-'||where=='.wppa-rate-'){if(jQuery(where+mocc+'-'+idx).attr('src')!=wppaImageDirectory+'star.ico'){jQuery(where+mocc+'-'+idx).attr('src',wppaImageDirectory+'star.ico');}}
192
+ if(idx<=idx1){jQuery(where+mocc+'-'+idx).stop().fadeTo(100,1.0);}
193
+ else if(idx==idx2){jQuery(where+mocc+'-'+idx).stop().fadeTo(100,opac);}
194
+ else{jQuery(where+mocc+'-'+idx).stop().fadeTo(100,wppaStarOpacity);}}}
195
+ function _wppaFollowMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,idx,'#wppa-rate-');}
196
+ function wppaOvlFollowMe(mocc,idx,val){if(val)return;_wppaSetRd(mocc,idx,'.wppa-rate-');}
197
+ function _wppaLeaveMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,_wppaMyr[mocc][_wppaCurIdx[mocc]],'#wppa-rate-');}
198
+ function wppaOvlLeaveMe(mocc,idx,val){_wppaSetRd(mocc,val,'.wppa-rate-');}
199
+ function _wppaValidateComment(mocc,photoid){if(!photoid)photoid=_wppaId[mocc][_wppaCurIdx[mocc]];var name=jQuery('#wppa-comname-'+mocc).val();if(name.length<1){alert(wppaPleaseName);return false;}
200
+ if(wppaEmailRequired=='required'||wppaEmailRequired=='optional'){var email=jQuery('#wppa-comemail-'+mocc).val();if(wppaEmailRequired=='optional'&&email.length==0){return true;}
201
+ var atpos=email.indexOf("@");var dotpos=email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=email.length){alert(wppaPleaseEmail);return false;}}
202
+ var text=jQuery('#wppa-comment-'+mocc).val();if(text.length<1){alert(wppaPleaseComment);return false;}
203
+ return true;}
204
+ function _wppaGo(url){document.location=url;}
205
+ function _wppaBbb(mocc,where,act){if(_wppaSSRuns[mocc])return;var elm='#bbb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.bbb-'+mocc).css('cursor','pointer');break;case'hide':jQuery('.bbb-'+mocc).removeAttr('title');jQuery('.bbb-'+mocc).css('cursor','default');break;case'click':if(where=='l')wppaPrev(mocc);if(where=='r')wppaNext(mocc);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
206
+ function _wppaUbb(mocc,where,act){var elm='#ubb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.ubb-'+mocc).css('cursor','pointer');jQuery('.ubb-'+mocc).stop().fadeTo(200,0.8);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,0.8);break;case'hide':jQuery('.ubb-'+mocc).removeAttr('title');jQuery('.ubb-'+mocc).css('cursor','default');jQuery('.ubb-'+mocc).stop().fadeTo(200,0);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,0);break;case'click':var idx;if(where=='l'){idx=_wppaCurIdx[mocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
207
+ idx=_wppaSlides[mocc].length-1;}}
208
+ if(where=='r'){idx=_wppaCurIdx[mocc]+1;if(idx==_wppaSlides[mocc].length){if(!wppaSlideWrap){return;}
209
+ idx=0;}}
210
+ if(wppaIsMobile){jQuery('.ubb-'+mocc).stop().fadeTo(200,1).fadeTo(1000,0);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,1).fadeTo(1000,0);}
211
+ wppaGotoKeepState(mocc,idx);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
212
+ function wppaOpenComments(mocc){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-comtable-wrap-'+mocc).css('display','block');jQuery('#wppa-comform-wrap-'+mocc).css('display','block');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','none');wppaColWidth[mocc]=0;setTimeout('_wppaDoAutocol( '+mocc+' )',100);}
213
+ function _wppaShowMetaData(mocc,key){if(!_wppaSSRuns[mocc]&&!__wppaOverruleRun){if(key=='show'){if(wppaAutoOpenComments){jQuery('#wppa-comtable-wrap-'+mocc).css('display','block');jQuery('#wppa-comform-wrap-'+mocc).css('display','block');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','none');}
214
+ if(_wppaCurIdx[mocc]!=0)
215
+ jQuery('.wppa-first-'+mocc).show();if(_wppaCurIdx[mocc]!=(_wppaSlides[mocc].length-1))
216
+ jQuery('.wppa-last-'+mocc).show();if(wppaShareHideWhenRunning){jQuery('#wppa-share-'+mocc).css('display','');}
217
+ wppaFotomotoToolbar(mocc,_wppaHiresUrl[mocc][_wppaCurIdx[mocc]]);}
218
+ else{jQuery('#wppa-comtable-wrap-'+mocc).css('display','none');jQuery('#wppa-comform-wrap-'+mocc).css('display','none');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','block');wppaFotomotoHide(mocc);}}
219
+ else{if(key=='show'){if(!wppaFotomotoHideWhenRunning)wppaFotomotoToolbar(mocc,_wppaHiresUrl[mocc][_wppaCurIdx[mocc]]);}
220
+ else{if(wppaShareHideWhenRunning){jQuery('#wppa-share-'+mocc).css('display','none');}}}
221
+ if(key=='show'){jQuery("#imagedesc-"+mocc).css('visibility','visible');jQuery("#imagetitle-"+mocc).css('visibility','visible');jQuery("#counter-"+mocc).css('visibility','visible');jQuery("#iptccontent-"+mocc).css('visibility','visible');jQuery("#exifcontent-"+mocc).css('visibility','visible');}
222
+ else{jQuery("#counter-"+mocc).css('visibility','hidden');jQuery('.wppa-first-'+mocc).hide();jQuery('.wppa-last-'+mocc).hide();jQuery("#iptccontent-"+mocc).css('visibility','hidden');jQuery("#exifcontent-"+mocc).css('visibility','hidden');}}
223
+ function wppaGetSlideshowTimeout(mocc){var time;if(_wppaTimeOut[mocc]=='random'){var min=2*wppaAnimationSpeed;var max=7*wppaAnimationSpeed;time=Math.floor(Math.random()*(max-min+1))+min;}
224
+ else{time=_wppaTimeOut[mocc];}
225
+ return time;}
226
+ wppaConsoleLog('wppa-slideshow.js version '+wppaJsSlideshowVersion+' loaded.','force');
js/wppa-touch.min.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-touch.js
2
+ //
3
+ // Contains swipe modules
4
+ // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+
7
+ var wppaJsTouchVersion='6.6.06';var wppaTriggerElementID=null;var wppaFingerCount=0;var wppaStartX=0;var wppaStartY=0;var wppaCurX=0;var wppaCurY=0;var wppaDeltaX=0;var wppaDeltaY=0;var wppaHorzDiff=0;var wppaVertDiff=0;var wppaMinLength=72;var wppaSwipeLength=0;var wppaSwipeAngle=null;var wppaSwipeDirection=null;var wppaSwipeOnLightbox=false;var wppaSwipeMocc=0;var wppaMobileTimeStart=0;function wppaStartTime(){var d=new Date();var t=d.getTime();wppaMobileTimeStart=t;return true;}
8
+ function wppaInTime(){var d=new Date();var t=d.getTime();return(t-wppaMobileTimeStart)<250;}
9
+ function wppaTapLink(id,url){if(wppaInTime()){_bumpClickCount(id);document.location.href=url;}}
10
+ function wppaTouchStart(event,id,mocc){wppaSwipeMocc=mocc;if(mocc==-1){wppaSwipeOnLightbox=true;event.preventDefault();}
11
+ wppaFingerCount=event.touches.length;if(wppaFingerCount==1){wppaStartX=event.touches[0].pageX;wppaStartY=event.touches[0].pageY;wppaTriggerElementID=id;}else{wppaTouchCancel();}}
12
+ function wppaTouchMove(event){if(wppaSwipeOnLightbox){event.preventDefault();}
13
+ if(event.touches.length==1){wppaCurX=event.touches[0].pageX;wppaCurY=event.touches[0].pageY;}else{wppaTouchCancel();}}
14
+ function wppaTouchEnd(event){if(wppaSwipeOnLightbox){event.preventDefault();}
15
+ if(wppaFingerCount==1&&wppaCurX!=0){wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2)));if(wppaSwipeLength>=wppaMinLength){wppaCalculateAngle();wppaDetermineSwipeDirection();wppaProcessingRoutine();}}
16
+ wppaTouchCancel();}
17
+ function wppaTouchCancel(){wppaFingerCount=0;wppaStartX=0;wppaStartY=0;wppaCurX=0;wppaCurY=0;wppaDeltaX=0;wppaDeltaY=0;wppaHorzDiff=0;wppaVertDiff=0;wppaSwipeLength=0;wppaSwipeAngle=null;wppaSwipeDirection=null;wppaTriggerElementID=null;wppaSwipeOnLightbox=false;wppaSwipeMocc=0;}
18
+ function wppaCalculateAngle(){var X=wppaStartX-wppaCurX;var Y=wppaCurY-wppaStartY;var Z=Math.round(Math.sqrt(Math.pow(X,2)+Math.pow(Y,2)));var r=Math.atan2(Y,X);wppaSwipeAngle=Math.round(r*180/Math.PI);if(wppaSwipeAngle<0){wppaSwipeAngle=360-Math.abs(wppaSwipeAngle);}}
19
+ function wppaDetermineSwipeDirection(){if((wppaSwipeAngle<=45)&&(wppaSwipeAngle>=0)){wppaSwipeDirection='left';}
20
+ else if((wppaSwipeAngle<=360)&&(wppaSwipeAngle>=315)){wppaSwipeDirection='left';}
21
+ else if((wppaSwipeAngle>=135)&&(wppaSwipeAngle<=225)){wppaSwipeDirection='right';}
22
+ else if((wppaSwipeAngle>45)&&(wppaSwipeAngle<135)){wppaSwipeDirection='down';}
23
+ else{wppaSwipeDirection='up';}}
24
+ function wppaProcessingRoutine(){var swipedElement=document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox){if(wppaSwipeDirection=='left'){wppaOvlShowNext();}
25
+ else if(wppaSwipeDirection=='right'){wppaOvlShowPrev();}}
26
+ else{if(wppaSwipeDirection=='right'){idx=_wppaCurIdx[wppaSwipeMocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
27
+ idx=_wppaSlides[wppaSwipeMocc].length-1;}
28
+ wppaGotoKeepState(wppaSwipeMocc,idx);}
29
+ if(wppaSwipeDirection=='left'){idx=_wppaCurIdx[wppaSwipeMocc]+1;if(idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap){return;}
30
+ idx=0;}
31
+ wppaGotoKeepState(wppaSwipeMocc,idx);}
32
+ else if(wppaSwipeDirection=='up'){}
33
+ else if(wppaSwipeDirection=='down'){}}
34
+ wppaTouchCancel();}
35
+ wppaConsoleLog('wppa-touch.js version '+wppaJsTouchVersion+' loaded.','force');
js/wppa-utils.min.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-utils.js
2
+ //
3
+ // conatins common vars and functions
4
+ //
5
+
6
+ var wppaJsUtilsVersion='6.6.20';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
+ function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
+ break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
+ done=(oldStr==newStr);}
10
+ result=newStr;break;default:return str.replace(/^\s\s*/,'');}
11
+ return result;}
12
+ function wppaTrimRight(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(strlen-arglen)==arg){result=result.substr(0,strlen-arglen);strlen=result.length;}
13
+ break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimRight(newStr,arg[i]);i++;}
14
+ done=(oldStr==newStr);}
15
+ result=newStr;break;default:return str.replace(/\s\s*$/,'');}
16
+ return result;}
17
+ function wppa_setCookie(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays==null)?"":"; expires="+exdate.toUTCString());document.cookie=c_name+"="+c_value;}
18
+ function wppa_getCookie(c_name){var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++)
19
+ {x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name)
20
+ {return unescape(y);}}
21
+ return"";}
22
+ function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
+ function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
+ function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){var d=new Date();var n=d.getTime();var t=n%(24*60*60*1000);var h=Math.floor(t/(60*60*1000));t-=h*60*60*1000;var m=Math.floor(t/(60*1000));t-=m*60*1000;var s=Math.floor(t/1000);t-=s*1000;console.log('At: '+h+':'+m+':'+s+'.'+t+' message: '+arg);}}
25
+ function wppaConvertScriptToShortcode(scriptId,shortcodeId){var script;var workArr;var temp;var item;var value;var type;var album;var photo;var size;var align;var result;script=jQuery('#'+scriptId).val();if(typeof(script)!='string'||script.length==0){jQuery('#'+shortcodeId).val('No script found');jQuery('#'+shortcodeId).css('color','red');return;}
26
+ workarr=script.split('%%');if(workarr[1]!='wppa'||workarr.length<3){jQuery('#'+shortcodeId).val('No %%wppa%% found');jQuery('#'+shortcodeId).css('color','red');return;}
27
+ for(i=3;i<workarr.length;i+=2){temp=workarr[i].split('=');item=temp[0];value=temp[1];if(item&&value){switch(item){case'size':size=value;break;case'align':align=value;break;case'photo':case'mphoto':case'slphoto':type=item;photo=value;break;case'album':case'cover':case'slide':case'slideonly':case'slideonlyf':case'slidef':type=item;album=value;break;default:jQuery('#'+shortcodeId).val('Token "'+workarr[i]+'" not recognized');jQuery('#'+shortcodeId).css('color','red');return;}}}
28
+ result='[wppa';if(type&&type.length>0){result+=' type="'+type+'"';}
29
+ if(album&&album.length>0){result+=' album="'+album+'"';}
30
+ if(photo&&photo.length>0){result+=' photo="'+photo+'"';}
31
+ if(size&&size.length>0){result+=' size="'+size+'"';}
32
+ if(align&&align.length>0){result+=' align="'+align+'"';}
33
+ result+='][/wppa]';jQuery('#'+shortcodeId).val(result);jQuery('#'+shortcodeId).css('color','green');document.getElementById(shortcodeId).focus();document.getElementById(shortcodeId).select();}
34
+ function wppaSvgHtml(image,height,isLightbox,border,none,light,medium,heavy){var fc;var bc;if(!none)none='0';if(!light)light='10';if(!medium)medium='20';if(!heavy)heavy='50';switch(wppaSvgCornerStyle){case'none':radius=none;break;case'light':radius=light;break;case'medium':radius=medium;break;case'heavy':radius=heavy;break;}
35
+ if(!height){height='32px';}
36
+ if(isLightbox){fc=wppaOvlSvgFillcolor;bc=wppaOvlSvgBgcolor;}
37
+ else{fc=wppaSvgFillcolor;bc=wppaSvgBgcolor;}
38
+ var src;if(wppaIsIe){src=wppaImageDirectory+image+'.png';}
39
+ else{src=wppaImageDirectory+image+'.svg';}
40
+ var result='<img'+' src="'+src+'"'+
41
+ (wppaIsIe?'':' class="wppa-svg"')+' style="'+'height:'+height+';'+'fill:'+fc+';'+'background-color:'+bc+';'+
42
+ (radius?'border-radius:'+radius+'%;':'')+
43
+ (border?'border:2px solid '+bc+';box-sizing:border-box;':'')+
44
+ (wppaIsIe?'':'display:none;')+'text-decoration:none !important;'+'vertical-align:middle;'+'"'+' onload="wppaReplaceSvg()"'+' />';setTimeout(function(){wppaReplaceSvg();},100);return result;}
45
+ function wppaReplaceSvg(){wppaConsoleLog('Doing ReplaceSvg','force');jQuery('img.wppa-svg').each(function(){var $img=jQuery(this);var imgID=$img.attr('id');var imgClass=$img.attr('class');var imgURL=$img.attr('src');var imgStyle=$img.attr('style');jQuery.get(imgURL,function(data){var $svg=jQuery(data).find('svg');if(typeof imgID!=='undefined'){$svg=$svg.attr('id',imgID);}
46
+ if(typeof imgClass!=='undefined'){$svg=$svg.attr('class',imgClass+' replaced-svg');}
47
+ if(typeof imgStyle!=='undefined'){if(typeof(imgID)=='undefined'||(imgID.substr(0,15)!='wppa-ajax-spin-'&&imgID.substr(0,15)!='wppa-ovl-spin')){imgStyle=imgStyle.replace('display:none','display:inline');}
48
+ $svg=$svg.attr('style',imgStyle);}
49
+ $svg=$svg.removeAttr('xmlns:a');$img.replaceWith($svg);},'xml');});}
50
+ wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.6.20';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
@@ -293,9 +293,11 @@ function wppaDoInit( autoOnly ) {
293
 
294
  // Make sure ajax spinners dies
295
  jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
 
296
 
297
  // Make sure ovl spinner dies
298
  jQuery( '.wppa-ovl-spin' ).stop().fadeOut();
 
299
  }
300
 
301
  // Initialize Ajax render partial page content with history update
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.6.22';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
293
 
294
  // Make sure ajax spinners dies
295
  jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
296
+ setTimeout( function() {jQuery( '.wppa-ajax-spin' ).stop().fadeOut();}, 1000 );
297
 
298
  // Make sure ovl spinner dies
299
  jQuery( '.wppa-ovl-spin' ).stop().fadeOut();
300
+ setTimeout( function() {jQuery( '.wppa-ovl-spin' ).stop().fadeOut();}, 1000 );
301
  }
302
 
303
  // Initialize Ajax render partial page content with history update
js/wppa.min.js ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa.js
2
+ //
3
+ // conatins common vars and functions
4
+ //
5
+
6
+ var wppaJsVersion='6.6.22';var wppaVersion='0';var wppaIsIe=false;var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaClickToView='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaBumpClickCount=false;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var wppaRenderModal=false;var wppaModalBgColor='#ffffff';var wppaBoxRadius=0;var wppaModalQuitImg;var wppaUploadEdit='none';var wppaPageArg='';var wppaSlideshowNavigationType='icons';var wppaCoverImageResponsive=[];var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var _wppaImageAlt=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlAlts;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';var wppaIsMobile=false;var wppaSvgFillcolor='gray';var wppaSvgBgcolor='transparent';var wppaSvgCornerStyle='light';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
+ if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}
8
+ wppaReplaceSvg();jQuery('.wppa-ajax-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ajax-spin').stop().fadeOut();},1000);jQuery('.wppa-ovl-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ovl-spin').stop().fadeOut();},1000);}
9
+ jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
10
+ if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
11
+ wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
12
+ if(typeof(myLightbox)!='undefined'){if(typeof(myLightbox.updateImageList)=='function'){myLightbox.updateImageList();}}
13
+ if(jQuery().prettyPhoto){jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:false,});}}
14
+ function wppaStopVideo(mocc){var id=[];var video;var i;id[1]='wppa-overlay-img';id[2]='theimg0-'+mocc;id[3]='theimg1-'+mocc;i=0;while(i<3){i++;if(i!=1||mocc==0){video=document.getElementById(id[i]);if(video){if(typeof(video.pause)=='function'){video.pause();wppaConsoleLog('Video '+id[i]+' paused','force');}}}}}
15
+ function wppaStopAudio(mocc){if(typeof(mocc)=='number'){if(jQuery('#audio-'+mocc).pause){jQuery('#audio-'+mocc).pause();}}
16
+ else{var items=jQuery('audio');if(items.length>0){var i=0;while(i<items.length){if(jQuery(items[i]).attr('data-from')=='wppa'){items[i].pause();}
17
+ i++;}}}}
18
+ function wppaMakeFullsizeUrl(url){var temp;var temp2;url=url.replace('/thumbs/','/');temp=url.split('//');if(temp[1]){temp2=temp[1].split('/');url=temp[0]+'//';}
19
+ else{temp2=temp[0].split('/');url='';}
20
+ var j=0;while(j<temp2.length){var chunk=temp2[j];var w=chunk.split('_');if(w[0]!='w'){if(j!=0)url+='/';url+=chunk;}
21
+ j++;}
22
+ return url;}
23
+ function wppaGetContainerWidth(mocc){var elm=document.getElementById('wppa-container-'+mocc);var w=0;if(!wppaAutoColumnWidth[mocc])return elm.clientWidth;while(w==0){elm=elm.parentNode;w=jQuery(elm).width();}
24
+ return w*wppaAutoColumnFrac[mocc];}
25
+ function _wppaDoAutocol(mocc){wppaConsoleLog('Doing autocol '+mocc);if(!wppaAutoColumnWidth[mocc])return;var w;var h;w=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=w;jQuery(".wppa-container-"+mocc).css('width',w);if(wppaRenderModal){jQuery(".ui-dialog").css('width',w);jQuery(".ui-dialog").attr('height','auto');}
26
+ if(wppaCoverImageResponsive[mocc]){}
27
+ else{jQuery(".wppa-asym-text-frame-"+mocc).css('width',w-wppaTextFrameDelta);jQuery(".wppa-cover-box-"+mocc).css('width',w);}
28
+ var exists=jQuery(".wppa-cover-box-mcr-"+mocc);var MCRWidth;if(exists.length>1){var nCovers=parseInt((w+8)/(wppaMaxCoverWidth+8))+1;var coverMax1=nCovers-1;MCRWidth=parseInt(((w+8)/nCovers)-8);var idx=0;while(idx<exists.length){var col=idx%nCovers;switch(col){case 0:jQuery(exists[idx]).css({'marginLeft':'0px','clear':'both','float':'left'});break;case coverMax1:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'right'});break;default:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'left'});}
29
+ idx++;}
30
+ if(wppaCoverImageResponsive[mocc]){}
31
+ else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',MCRWidth-wppaTextFrameDelta);}
32
+ jQuery(".wppa-cover-box-mcr-"+mocc).css('width',MCRWidth);}
33
+ else{if(wppaCoverImageResponsive[mocc]){}
34
+ else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);var myCss={'marginLeft':'0px','float':'left'}
35
+ jQuery(".wppa-cover-box-mcr-"+mocc).css(myCss);}}
36
+ if(wppaThumbSpaceAuto){var tfw=parseInt(jQuery(".thumbnail-frame-"+mocc).css('width'));if(tfw){var minspc=wppaMinThumbSpace;var weff=w-wppaThumbnailAreaDelta-7;var nthumbs=parseInt(weff/(tfw+minspc));var availsp=weff-nthumbs*tfw;var newspc=parseInt(0.5+availsp/(nthumbs+1));jQuery(".thumbnail-frame-"+mocc).css({marginLeft:newspc});}}
37
+ jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-16);var row=1;var rowHeightPix;var rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');while(rowHeightPerc){rowHeightPix=rowHeightPerc*(w-wppaThumbnailAreaDelta)/100;jQuery('#wppa-mas-h-'+row+'-'+mocc).css('height',rowHeightPix);row++;rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');}
38
+ wppaSetMasHorFrameWidthsForIeAndChrome(mocc);wppaFormatSlide(mocc);jQuery("#audio-slide-"+mocc).css('width',w-wppaBoxDelta-6);jQuery(".wppa-comment-textarea-"+mocc).css('width',w*0.7);wppaFilmStripLength[mocc]=w-wppaFilmStripAreaDelta[mocc];jQuery("#filmwindow-"+mocc).css('width',wppaFilmStripLength[mocc]);_wppaAdjustFilmstrip(mocc);if(!wppaIsMini[mocc]&&typeof(_wppaSlides[mocc])!='undefined'){if(wppaColWidth[mocc]<wppaMiniTreshold){jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
39
+ else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}}
40
+ jQuery(".wppa-sphoto-"+mocc).css('width',w);jQuery(".wppa-simg-"+mocc).css('width',w-2*wppaSlideBorderWidth);jQuery(".wppa-simg-"+mocc).css('height','');jQuery(".wppa-mphoto-"+mocc).css('width',w+10);jQuery(".wppa-mimg-"+mocc).css('width',w);jQuery(".wppa-mimg-"+mocc).css('height','');}
41
+ function wppaSetMasHorFrameWidthsForIeAndChrome(mocc){var frames=jQuery('.wppa-mas-h-'+mocc);var tnm=wppaMinThumbSpace;for(var i=0;i<frames.length;i++){var img=wppaGetChildI(frames[i]);if(img){if(img.nodeName=='IMG'){if(!img.complete){setTimeout('wppaSetMasHorFrameWidthsForIeAndChrome( '+mocc+' )',400);return;}}
42
+ var wd=((img.naturalWidth)/(img.naturalHeight)*(img.height))+tnm;jQuery(frames[i]).css({'width':wd});}}}
43
+ function wppaGetChildI(parent){var children=parent.childNodes;var img=false;var i;for(i=0;i<children.length;i++){var child=children[i];if(child.id){if(child.id.substr(0,2)=='i-'){return child;}}
44
+ var grandChild=wppaGetChildI(child);if(grandChild){return grandChild;}}
45
+ return false;}
46
+ var wppaFotomotoLoaded=false;var wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=true;}
47
+ function wppaFotomotoToolbar(mocc,url){if(wppaColWidth[mocc]>=wppaFotomotoMinWidth){jQuery('#wppa-fotomoto-container-'+mocc).css('display','inline');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','inline');}
48
+ else{jQuery('#wppa-fotomoto-container-'+mocc).css('display','none');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','none');return;}
49
+ if(wppaFotomoto&&document.getElementById('wppa-fotomoto-container-'+mocc)){if(wppaFotomotoLoaded){FOTOMOTO.API.checkinImage(url);wppaFotomotoToolbarIds[mocc]=FOTOMOTO.API.showToolbar('wppa-fotomoto-container-'+mocc,url);}
50
+ else{setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )',200);wppaConsoleLog('Waiting for Fotomoto');}}}
51
+ function wppaFotomotoHide(mocc){jQuery('#wppa-fotomoto-container-'+mocc).css('display','none');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','none');}
52
+ function wppaGetCurrentFullUrl(mocc,idx){var xurl=document.location.href;var url;var temp1=xurl.split("?");var temp2='nil';var temp3;var i=0;var first=true;var pfx;if(!wppaShortQargs)pfx='wppa-';else pfx='';if(temp1[1])temp2=temp1[1].split("&");var albumSeen=false;url=temp1[0];if(temp2!='nil'){if(temp2.length>0){while(i<temp2.length){temp3=temp2[i].split("=");if(temp3[0]==pfx+'album')albumSeen=true;if(temp3[0]!=pfx+'photo'){if(first)url+="?";else url+="&";first=false;url+=temp2[i];}
53
+ i++;}}}
54
+ if(!albumSeen)return'';if(first)url+="?";else url+="&";if(wppaUsePhotoNamesInUrls){url+=pfx+'photo='+encodeURIComponent(_wppaNames[mocc][idx]);}
55
+ else{url+=pfx+'photo='+_wppaId[mocc][idx];}
56
+ return url;}
57
+ function wppaStringContainsForbiddenChars(str){var forbidden=['?','&','#','/','"',"'"];var i=0;while(i<forbidden.length){if(str.indexOf(forbidden[i])!=-1){return true;}
58
+ i++;}
59
+ return false;}
60
+ window.onpopstate=function(event){var occ=0;if(wppaCanPushState){if(event.state){occ=event.state.occur;switch(event.state.type){case'html':jQuery('#wppa-container-'+occ).html(event.state.html);break;case'slide':_wppaGoto(occ,event.state.slide);break;}}
61
+ else if(wppaUpdateAddressLine){occ=wppaFirstOccur;jQuery('#wppa-container-'+occ).html(wppaStartHtml[occ]);wppaFirstOccur=0;if(occ==0){var url=document.location.href;var urls=url.split("&wppa-occur=");occ=parseInt(urls[1]);}
62
+ var url=document.location.href;var urls=url.split("&wppa-photo=");var photo=parseInt(urls[1]);if(photo>0){var idx=0;while(idx<_wppaId[occ].length){if(_wppaId[occ][idx]==photo)break;idx++;}
63
+ if(idx<_wppaId[occ].length)_wppaGoto(occ,idx);}}
64
+ if(document.getElementById('theslide0-'+occ)){_wppaStop(occ);}}
65
+ if(typeof(wppaQRUpdate)!='undefined')wppaQRUpdate(document.location.href);};function wppaPushStateSlide(mocc,slide,url){if(!wppaIsMini[mocc]){if(wppaCanPushState&&wppaUpdateAddressLine){if(url!=''){try{history.pushState({page:wppaHis,occur:mocc,type:'slide',slide:slide},"---",url);wppaConsoleLog('Slide history stack updated');}
66
+ catch(err){wppaConsoleLog('Slide history stack update failed');}}}}}
67
+ function wppaRepairScriptTags(text){var temp;var newtext;if(typeof(text)=='undefined')return'';while(text.indexOf('[script')!=-1){text=text.replace('[script','<script');}
68
+ while(text.indexOf('[/script')!=-1){text=text.replace('[/script','</script');}
69
+ return text;}
70
+ function wppaRepairBrTags(text){var newtext;if(typeof(text)=='undefined')return'';newtext=text.replace('[br /]','<br />');return newtext;}
71
+ function wppaTrimAlt(text){var newtext;if(typeof(text)=='undefined')return'';if(text.length>13){newtext=text.substr(0,10)+'...';}
72
+ else newtext=text;return newtext;}
73
+ var wppaFbInitBusy=false;function wppaFbInit(){if(!wppaFbInitBusy){if(typeof(FB)!='undefined'){wppaFbInitBusy=true;setTimeout('_wppaFbInit()',10);}
74
+ else{wppaConsoleLog('Fb wait');setTimeout('wppaFbInit()',200);}}
75
+ else{wppaConsoleLog('Fb Init busy');}}
76
+ function _wppaFbInit(){FB.init({status:true,xfbml:true});wppaFbInitBusy=false;}
77
+ function wppaInsertAtCursor(elm,value){if(document.selection){elm.focus();sel=document.selection.createRange();sel.text=value;}
78
+ else if(elm.selectionStart||elm.selectionStart=='0'){var startPos=elm.selectionStart;var endPos=elm.selectionEnd;elm.value=elm.value.substring(0,startPos)
79
+ +value
80
+ +elm.value.substring(endPos,elm.value.length);elm.selectionStart=startPos+value.length;elm.selectionEnd=startPos+value.length;}else{elm.value+=value;}}
81
+ function wppaGeoInit(mocc,lat,lon){var myLatLng=new google.maps.LatLng(lat,lon);var mapOptions={disableDefaultUI:false,panControl:false,zoomControl:true,mapTypeControl:true,scaleControl:true,streetViewControl:true,overviewMapControl:true,zoom:10,center:myLatLng,};var map=new google.maps.Map(document.getElementById("map-canvas-"+mocc),mapOptions);var marker=new google.maps.Marker({position:myLatLng,map:map,title:""});google.maps.event.addListener(map,"center_changed",function(){window.setTimeout(function(){map.panTo(marker.getPosition());},1000);});}
82
+ function wppaEncode(xtext){var text,result;if(typeof(xtext)=='undefined')return;text=xtext;result=text.replace(/#/g,'||HASH||');text=result;result=text.replace(/&/g,'||AMP||');text=result;var temp=text.split('+');var idx=0;result='';while(idx<temp.length){result+=temp[idx];idx++;if(idx<temp.length)result+='||PLUS||';}
83
+ return result;}
84
+ function wppaUrlToId(url){var temp=url.split('/wppa/');if(temp.length==1){temp=url.split('/upload/');}
85
+ if(temp.length==1){return 0;}
86
+ temp=temp[1];temp=temp.split('.');temp=temp[0].replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');return temp;}
87
+ function wppaSuperSearchSelect(mocc,go){jQuery('#wppa-ss-albumopt-'+mocc).css('display','none');jQuery('#wppa-ss-albumcat-'+mocc).css('display','none');jQuery('#wppa-ss-albumname-'+mocc).css('display','none');jQuery('#wppa-ss-albumtext-'+mocc).css('display','none');jQuery('#wppa-ss-photoopt-'+mocc).css('display','none');jQuery('#wppa-ss-photoname-'+mocc).css('display','none');jQuery('#wppa-ss-photoowner-'+mocc).css('display','none');jQuery('#wppa-ss-phototag-'+mocc).css('display','none');jQuery('#wppa-ss-phototext-'+mocc).css('display','none');jQuery('#wppa-ss-photoexif-'+mocc).css('display','none');jQuery('#wppa-ss-photoiptc-'+mocc).css('display','none');jQuery('#wppa-ss-exifopts-'+mocc).css('display','none');jQuery('#wppa-ss-iptcopts-'+mocc).css('display','none');jQuery('#wppa-ss-spinner-'+mocc).css('display','none');jQuery('#wppa-ss-button-'+mocc).css('display','none');var s1=jQuery('#wppa-ss-pa-'+mocc).val();var s2='';var s3='';var data='';switch(s1){case'a':jQuery('#wppa-ss-albumopt-'+mocc).css('display','');s2=jQuery('#wppa-ss-albumopt-'+mocc).val();switch(s2){case'c':jQuery('#wppa-ss-albumcat-'+mocc).css('display','');var set=jQuery('.wppa-ss-albumcat-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
88
+ data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
89
+ break;case'n':jQuery('#wppa-ss-albumname-'+mocc).css('display','');data=jQuery('#wppa-ss-albumname-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
90
+ break;case't':jQuery('#wppa-ss-albumtext-'+mocc).css('display','');var set=jQuery('.wppa-ss-albumtext-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
91
+ data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
92
+ break;}
93
+ break;case'p':jQuery('#wppa-ss-photoopt-'+mocc).css('display','');s2=jQuery('#wppa-ss-photoopt-'+mocc).val();switch(s2){case'n':jQuery('#wppa-ss-photoname-'+mocc).css('display','');data=jQuery('#wppa-ss-photoname-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
94
+ break;case'o':jQuery('#wppa-ss-photoowner-'+mocc).css('display','');data=jQuery('#wppa-ss-photoowner-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
95
+ break;case'g':jQuery('#wppa-ss-phototag-'+mocc).css('display','');var set=jQuery('.wppa-ss-phototag-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
96
+ data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
97
+ break;case't':jQuery('#wppa-ss-phototext-'+mocc).css('display','');var set=jQuery('.wppa-ss-phototext-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
98
+ data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
99
+ break;case'i':jQuery('#wppa-ss-photoiptc-'+mocc).css('display','');s3=jQuery('#wppa-ss-photoiptc-'+mocc).val();if(s3){if(s3.length>2){s3=s3.replace('#','H');}
100
+ if(s3!=''){jQuery('#wppa-ss-iptcopts-'+mocc).css('display','');if(wppaLastIptc!=s3){wppaAjaxGetSsIptcList(mocc,s3,'wppa-ss-iptcopts-'+mocc);wppaLastIptc=s3;}
101
+ else{data=jQuery('#wppa-ss-iptcopts-'+mocc).val();if(data!=null&&data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}}}}
102
+ break;case'e':jQuery('#wppa-ss-photoexif-'+mocc).css('display','');s3=jQuery('#wppa-ss-photoexif-'+mocc).val();if(s3){if(s3.length>2){s3=s3.replace('#','H');}
103
+ if(s3!=''){jQuery('#wppa-ss-exifopts-'+mocc).css('display','');if(wppaLastExif!=s3){wppaAjaxGetSsExifList(mocc,s3,'wppa-ss-exifopts-'+mocc);wppaLastExif=s3;}
104
+ else{data=jQuery('#wppa-ss-exifopts-'+mocc).val();if(data!=null&&data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}}}}
105
+ break;}
106
+ break;}
107
+ if(go){var url=jQuery('#wppa-ss-pageurl-'+mocc).val();if(url.indexOf('?')==-1){url+='?';}
108
+ else{url+='&';}
109
+ url+='occur=1&wppa-supersearch='+s1+','+s2+','+s3+','+data;document.location.href=url;}}
110
+ function wppaAjaxGetSsIptcList(mocc,s3,selid){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=getssiptclist'+'&tag='+s3+'&moccur='+mocc,async:true,type:'GET',timeout:10000,beforeSend:function(xhr){jQuery('#wppa-ss-spinner-'+mocc).css('display','');},success:function(result,status,xhr){jQuery('#'+selid).html(result);jQuery('#wppa-ss-iptcopts-'+mocc).css('display','');wppaSuperSearchSelect(mocc);setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+mocc+'", "#'+selid+'" )',10);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxGetSsIptcList failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery('#wppa-ss-spinner-'+mocc).css('display','none');}});}
111
+ function wppaAjaxGetSsExifList(mocc,s3,selid){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=getssexiflist'+'&tag='+s3+'&moccur='+mocc,async:true,type:'GET',timeout:10000,beforeSend:function(xhr){jQuery('#wppa-ss-spinner-'+mocc).css('display','');},success:function(result,status,xhr){jQuery('#'+selid).html(result);jQuery('#wppa-ss-exifopts-'+mocc).css('display','');wppaSuperSearchSelect(mocc);setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+mocc+'", "#'+selid+'" )',10);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxGetSsExifList failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery('#wppa-ss-spinner-'+mocc).css('display','none');}});}
112
+ function wppaSetIptcExifSize(clas,selid){var t=jQuery(clas);var n=t.length;if(n>6)n=6;if(n<2)n=2;jQuery(selid).attr('size',n);}
113
+ function wppaUpdateSearchRoot(text,root){var items=jQuery(".wppa-search-root");var i=0;while(i<items.length){jQuery(items[i]).html(text);i++;}
114
+ items=jQuery(".wppa-rootbox");i=0;while(i<items.length){if(root){jQuery(items[i]).removeAttr('checked');jQuery(items[i]).removeAttr('disabled');}
115
+ else{jQuery(items[i]).attr('checked','checked');jQuery(items[i]).attr('disabled','disabled');}
116
+ i++;}
117
+ items=jQuery(".wppa-search-root-id");i=0;while(i<items.length){jQuery(items[i]).attr('value',root);i++;}}
118
+ function wppaSubboxChange(elm){if(jQuery(elm).attr('checked')=='checked'){var items=jQuery(".wppa-rootbox");var i=0;while(i<items.length){jQuery(items[i]).attr('checked','checked');i++;}}}
119
+ function wppaClearSubsearch(){var items=jQuery(".wppa-display-searchstring");var i=0;while(i<items.length){jQuery(items[i]).html('');i++;}
120
+ items=jQuery(".wppa-search-sub-box");i=0;while(i<items.length){jQuery(items[i]).attr('disabled','disabled');i++;}}
121
+ function wppaEnableSubsearch(){var items=jQuery(".wppa-search-sub-box");var i=0;while(i<items.length){jQuery(items[i]).removeAttr('disabled');i++;}}
122
+ function wppaDisplaySelectedFiles(id){var theFiles=jQuery('#'+id);var i=0;var result='';while(i<theFiles[0].files.length){result+=theFiles[0].files[i].name+' ';i++;}
123
+ jQuery('#'+id+'-display').val(result);}
124
+ wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.','force');
readme.txt CHANGED
@@ -2,12 +2,12 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
5
- Version: 6.6.21
6
  Stable tag: 6.6.21
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
- Tested up to: 4.7
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -180,6 +180,23 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.6.21 =
184
 
185
  = Bug Fixes =
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
5
+ Version: 6.6.22
6
  Stable tag: 6.6.21
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
+ Tested up to: 4.8-alpha-40396
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
183
+ = 6.6.22 =
184
+
185
+ = Bug Fxes =
186
+
187
+ * The header in the edit photo and moderate photo pages was below the photo(s). Fixed.
188
+
189
+ = New Features =
190
+
191
+ * Administrators, wppa superusers and moderators can now schedule the time for the automatic future deletion of photos.
192
+
193
+ = Other Changes =
194
+
195
+ * Status of confirmation boxes on bulk photo admin page are now saved in cookies.
196
+ * Image urls in og:matatags have no longer a version number for cleaner urls.
197
+ * Urls in og:metatags are now always pretty, regardless of Table IV-A6. The wp permalink structure still needs to be non-default.
198
+ * Extra calls to the functions that remove spinners are added running 1 second later to fix possible timing related issues where spinners do not disappear where they should.
199
+
200
  = 6.6.21 =
201
 
202
  = Bug Fixes =
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.6.21
6
  *
7
  */
8
 
@@ -1919,6 +1919,50 @@ global $wppa_log_file;
1919
  }
1920
  break;
1921
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1922
  case 'custom_0':
1923
  case 'custom_1':
1924
  case 'custom_2':
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.6.22
6
  *
7
  */
8
 
1919
  }
1920
  break;
1921
 
1922
+ case 'delyear':
1923
+ case 'delmonth':
1924
+ case 'delday':
1925
+ case 'delhour':
1926
+ case 'delmin':
1927
+ $itemname = __( 'Delete date/time' , 'wp-photo-album-plus');
1928
+ $scheduledel = $wpdb->get_var( $wpdb->prepare( "SELECT `scheduledel` FROM`".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
1929
+ if ( ! $scheduledel ) {
1930
+ $scheduledel = wppa_get_default_scheduledtm();
1931
+ }
1932
+ $temp = explode( ',', $scheduledel );
1933
+ if ( $item == 'delyear' ) $temp[0] = $value;
1934
+ if ( $item == 'delmonth' ) $temp[1] = $value;
1935
+ if ( $item == 'delday' ) $temp[2] = $value;
1936
+ if ( $item == 'delhour' ) $temp[3] = $value;
1937
+ if ( $item == 'delmin' ) $temp[4] = $value;
1938
+ $scheduledel = implode( ',', $temp );
1939
+ wppa_update_photo( array( 'id' => $photo, 'scheduledel' => $scheduledel ) );
1940
+
1941
+ // Make sure not deleted yet
1942
+ $alb = $wpdb->get_var( $wpdb->prepare( "SELECT `album` FROM`".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
1943
+ if ( $alb < '-9' ) {
1944
+ $alb = - ( $alb + '9' );
1945
+ wppa_update_photo( array( 'id' => $photo, 'album' => $alb ) );
1946
+ }
1947
+ wppa_invalidate_treecounts( $alb );
1948
+ wppa_flush_upldr_cache( 'photoid', $photo );
1949
+ if ( wppa_is_video( $photo ) ) {
1950
+ echo '||0||'.sprintf( __( '%s of video %s updated' , 'wp-photo-album-plus'), $itemname, $photo );
1951
+ }
1952
+ else {
1953
+ echo '||0||'.sprintf( __( '%s of photo %s updated' , 'wp-photo-album-plus'), $itemname, $photo );
1954
+ }
1955
+ break;
1956
+ case 'removescheduledel':
1957
+ if ( ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) ) {
1958
+ wppa_update_photo( array( 'id' => $photo, 'scheduledel' => '' ) );
1959
+ echo '||0||'.sprintf( __( 'Scheduled deletion of photo %s cancelled' , 'wp-photo-album-plus'), $photo );
1960
+ }
1961
+ else {
1962
+ echo '||2||'. __( 'No rights' , 'wp-photo-album-plus');
1963
+ }
1964
+ break;
1965
+
1966
  case 'custom_0':
1967
  case 'custom_1':
1968
  case 'custom_2':
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 6.6.20
7
  *
8
  */
9
 
@@ -98,12 +98,16 @@ function _wppa_admin() {
98
 
99
  if ($_REQUEST['edit_id'] == 'trash' ) {
100
  ?>
101
- <h2><?php _e('Manage Trashed Photos', 'wp-photo-album-plus');
102
- echo ' - <small><i>'.__('Edit photo information', 'wp-photo-album-plus').'</i></small>';
 
 
 
 
 
103
  ?>
104
- </h2>
105
  <?php
106
- wppa_album_photos($ei);
107
 
108
  return;
109
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 6.6.22
7
  *
8
  */
9
 
98
 
99
  if ($_REQUEST['edit_id'] == 'trash' ) {
100
  ?>
101
+ <div class="wrap">
102
+ <h2><?php _e('Manage Trashed Photos', 'wp-photo-album-plus');
103
+ echo ' - <small><i>'.__('Edit photo information', 'wp-photo-album-plus').'</i></small>';
104
+ ?>
105
+ </h2>
106
+ <?php
107
+ wppa_album_photos($ei);
108
  ?>
109
+ </div>
110
  <?php
 
111
 
112
  return;
113
  }
wppa-boxes-html.php CHANGED
@@ -3367,17 +3367,6 @@ global $wpdb;
3367
  $result .= '<tr valign="top" style="vertical-align:top;">' .
3368
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
3369
  __( 'Your comment:', 'wp-photo-album-plus' ) . '<br />' . wppa( 'comment_user' ) . '<br />';
3370
-
3371
- /* invre modification */
3372
- /* Place the invre placeholder into the commentform */
3373
- if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
3374
- ob_start();
3375
- do_action('google_invre_render_widget_action');
3376
- $result .= ob_get_clean();
3377
- }
3378
- else
3379
- /* end invre modification */
3380
-
3381
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
3382
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
3383
  $wid = '20%';
@@ -3395,7 +3384,7 @@ global $wpdb;
3395
  }
3396
 
3397
  $result .=
3398
- '<input id="comsubmit-' . wppa( 'mocc' ) . '" type="submit" name="commentbtn" onclick="function(event){event.preventDefault()};wppaAjaxComment( '.wppa( 'mocc' ).', '.$id.' );return false;" value="'.$btn.'" style="margin:0 4px 0 0;" />' .
3399
  '<img id="wppa-comment-spin-'.wppa( 'mocc' ).'" src="'.wppa_get_imgdir().'spinner.gif" style="display:none;" />' .
3400
  '</td>' .
3401
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:70%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >';
3367
  $result .= '<tr valign="top" style="vertical-align:top;">' .
3368
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
3369
  __( 'Your comment:', 'wp-photo-album-plus' ) . '<br />' . wppa( 'comment_user' ) . '<br />';
 
 
 
 
 
 
 
 
 
 
 
3370
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
3371
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
3372
  $wid = '20%';
3384
  }
3385
 
3386
  $result .=
3387
+ '<input type="button" name="commentbtn" onclick="wppaAjaxComment( '.wppa( 'mocc' ).', '.$id.' )" value="'.$btn.'" style="margin:0 4px 0 0;" />' .
3388
  '<img id="wppa-comment-spin-'.wppa( 'mocc' ).'" src="'.wppa_get_imgdir().'spinner.gif" style="display:none;" />' .
3389
  '</td>' .
3390
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:70%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >';
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 6.6.18
6
  *
7
  */
8
 
@@ -209,6 +209,7 @@ global $thumbs;
209
  'admins_choice_users' => '',
210
  'for_sm' => false,
211
  'max_width' => false,
 
212
 
213
  );
214
  }
@@ -1825,17 +1826,29 @@ global $wpdb;
1825
 
1826
  $last_check = get_option( 'wppa_last_schedule_check', '0' );
1827
  if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
 
 
1828
  $to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_PHOTOS."` WHERE `status` = 'scheduled' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
1829
- if ( $to_publish ) foreach ( $to_publish as $photo ) {
1830
  wppa_update_photo( array( 'id' => $photo['id'], 'scheduledtm' => '', 'status' => 'publish', 'timestamp' => time() ) );
1831
  wppa_update_album( array( 'id' => $photo['album'], 'modified' => time() ) ); // For New indicator on album
1832
  wppa_invalidate_treecounts( $photo['album'] );
1833
  }
 
 
1834
  $to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_ALBUMS."` WHERE `scheduledtm` <> '' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
1835
- if ( $to_publish ) foreach ( $to_publish as $album ) {
1836
  wppa_update_album( array( 'id' => $album['id'], 'scheduledtm' => '' ) );
1837
  wppa_invalidate_treecounts( $album['id'] );
1838
  }
 
 
 
 
 
 
 
 
1839
  update_option( 'wppa_last_schedule_check', time() );
1840
  }
1841
  }
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.6.22
6
  *
7
  */
8
 
209
  'admins_choice_users' => '',
210
  'for_sm' => false,
211
  'max_width' => false,
212
+ 'no_ver' => false,
213
 
214
  );
215
  }
1826
 
1827
  $last_check = get_option( 'wppa_last_schedule_check', '0' );
1828
  if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
1829
+
1830
+ // Publish scheduled photos
1831
  $to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_PHOTOS."` WHERE `status` = 'scheduled' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
1832
+ if ( $to_publish ) foreach( $to_publish as $photo ) {
1833
  wppa_update_photo( array( 'id' => $photo['id'], 'scheduledtm' => '', 'status' => 'publish', 'timestamp' => time() ) );
1834
  wppa_update_album( array( 'id' => $photo['album'], 'modified' => time() ) ); // For New indicator on album
1835
  wppa_invalidate_treecounts( $photo['album'] );
1836
  }
1837
+
1838
+ // Publish scheduled albums ( for future use, currently not implemented )
1839
  $to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_ALBUMS."` WHERE `scheduledtm` <> '' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
1840
+ if ( $to_publish ) foreach( $to_publish as $album ) {
1841
  wppa_update_album( array( 'id' => $album['id'], 'scheduledtm' => '' ) );
1842
  wppa_invalidate_treecounts( $album['id'] );
1843
  }
1844
+
1845
+ // Delete photos scheduled for deletion
1846
+ $to_delete = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_PHOTOS."` WHERE `scheduledel` <> '' AND `scheduledel` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
1847
+ if ( $to_delete ) foreach( $to_delete as $photo ) {
1848
+ wppa_delete_photo( $photo['id'] );
1849
+ }
1850
+
1851
+ // Update timestamp of this action
1852
  update_option( 'wppa_last_schedule_check', time() );
1853
  }
1854
  }
wppa-date-time.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
- * Version 6.6.00
7
  *
8
  */
9
 
@@ -72,7 +72,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
72
 
73
  $type = strtoupper( substr( $type, 0, 1 ) ).strtolower( substr( $type, 1 ) );
74
 
75
- if ( $type == 'Photo' ) {
76
  $thumb = wppa_cache_thumb( $id );
77
  }
78
  elseif ( $type == 'Album' ) {
@@ -98,7 +98,20 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
98
  '50', '51', '52', '53', '54', '55', '56', '57', '58', '59' );
99
  $val_mins = $opt_mins;
100
 
101
- $curval = $type == 'Photo' ? $thumb['scheduledtm'] : $album['scheduledtm'];
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  if ( ! $curval ) $curval = wppa_get_default_scheduledtm();
104
 
@@ -113,37 +126,37 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
113
 
114
  if ( $selectable ) {
115
 
116
- $result .= '<select name="wppa-day" id="wppa-day-'.$id.'" class="wppa-datetime-'.$id.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'day\', this);" >';
117
  foreach ( array_keys( $opt_days ) as $key ) {
118
  $sel = $val_days[$key] == $cur_day ? 'selected="selected"' : '';
119
  $result .= '<option value="'.$val_days[$key].'" '.$sel.' >'.$opt_days[$key].'</option>';
120
  }
121
  $result .= '</select >';
122
 
123
- $result .= '<select name="wppa-month" id="wppa-month-'.$id.'" class="wppa-datetime-'.$id.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'month\', this);" >';
124
  foreach ( array_keys( $opt_months ) as $key ) {
125
  $sel = $val_months[$key] == $cur_month ? 'selected="selected"' : '';
126
  $result .= '<option value="'.$val_months[$key].'" '.$sel.' >'.$opt_months[$key].'</option>';
127
  }
128
  $result .= '</select >';
129
 
130
- $result .= '<select name="wppa-year" id="wppa-year-'.$id.'" class="wppa-datetime-'.$id.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'year\', this);" >';
131
  foreach ( array_keys( $opt_years ) as $key ) {
132
  $sel = $val_years[$key] == $cur_year ? 'selected="selected"' : '';
133
  $result .= '<option value="'.$val_years[$key].'" '.$sel.' >'.$opt_years[$key].'</option>';
134
  }
135
  $result .= '</select >';
136
- $result .= '<span class="wppa-datetime-'.$id.'" >@</span>';
137
 
138
- $result .= '<select name="wppa-hour" id="wppa-hour-'.$id.'" class="wppa-datetime-'.$id.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'hour\', this);" >';
139
  foreach ( array_keys( $opt_hours ) as $key ) {
140
  $sel = $val_hours[$key] == $cur_hour ? 'selected="selected"' : '';
141
  $result .= '<option value="'.$val_hours[$key].'" '.$sel.' >'.$opt_hours[$key].'</option>';
142
  }
143
  $result .= '</select >';
144
- $result .= '<span class="wppa-datetime-'.$id.'" >:</span>';
145
 
146
- $result .= '<select name="wppa-min" id="wppa-min-'.$id.'" class="wppa-datetime-'.$id.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'min\', this);">';
147
  foreach ( array_keys( $opt_mins ) as $key ) {
148
  $sel = $val_mins[$key] == $cur_min ? 'selected="selected"' : '';
149
  $result .= '<option value="'.$val_mins[$key].'" '.$sel.' >'.$opt_mins[$key].'</option>';
@@ -152,7 +165,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
152
 
153
  }
154
  else {
155
- $result .= '<span class="wppa-datetime-'.$id.'" >'.$cur_day.' '.$opt_months[strval(intval($cur_month))].' '.$cur_year.'@'.$cur_hour.':'.$cur_min.'</span>';
156
  }
157
 
158
  return $result;
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
+ * Version 6.6.22
7
  *
8
  */
9
 
72
 
73
  $type = strtoupper( substr( $type, 0, 1 ) ).strtolower( substr( $type, 1 ) );
74
 
75
+ if ( $type == 'Photo' || $type == 'Delphoto' ) {
76
  $thumb = wppa_cache_thumb( $id );
77
  }
78
  elseif ( $type == 'Album' ) {
98
  '50', '51', '52', '53', '54', '55', '56', '57', '58', '59' );
99
  $val_mins = $opt_mins;
100
 
101
+ switch ( $type ) {
102
+ case 'Photo':
103
+ $curval = $thumb['scheduledtm'];
104
+ $class = 'wppa-datetime-' . $id;
105
+ break;
106
+ case 'Album':
107
+ $curval = $album['scheduledtm'];
108
+ $class = 'wppa-datetime-' . $id;
109
+ break;
110
+ case 'Delphoto':
111
+ $curval = $thumb['scheduledel'];
112
+ $class = 'wppa-del-datetime-' . $id;
113
+ break;
114
+ }
115
 
116
  if ( ! $curval ) $curval = wppa_get_default_scheduledtm();
117
 
126
 
127
  if ( $selectable ) {
128
 
129
+ $result .= '<select name="wppa-day" id="wppa-day-'.$id.'" class="'.$class.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'day\', this);" >';
130
  foreach ( array_keys( $opt_days ) as $key ) {
131
  $sel = $val_days[$key] == $cur_day ? 'selected="selected"' : '';
132
  $result .= '<option value="'.$val_days[$key].'" '.$sel.' >'.$opt_days[$key].'</option>';
133
  }
134
  $result .= '</select >';
135
 
136
+ $result .= '<select name="wppa-month" id="wppa-month-'.$id.'" class="'.$class.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'month\', this);" >';
137
  foreach ( array_keys( $opt_months ) as $key ) {
138
  $sel = $val_months[$key] == $cur_month ? 'selected="selected"' : '';
139
  $result .= '<option value="'.$val_months[$key].'" '.$sel.' >'.$opt_months[$key].'</option>';
140
  }
141
  $result .= '</select >';
142
 
143
+ $result .= '<select name="wppa-year" id="wppa-year-'.$id.'" class="'.$class.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'year\', this);" >';
144
  foreach ( array_keys( $opt_years ) as $key ) {
145
  $sel = $val_years[$key] == $cur_year ? 'selected="selected"' : '';
146
  $result .= '<option value="'.$val_years[$key].'" '.$sel.' >'.$opt_years[$key].'</option>';
147
  }
148
  $result .= '</select >';
149
+ $result .= '<span class="'.$class.'" >@</span>';
150
 
151
+ $result .= '<select name="wppa-hour" id="wppa-hour-'.$id.'" class="'.$class.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'hour\', this);" >';
152
  foreach ( array_keys( $opt_hours ) as $key ) {
153
  $sel = $val_hours[$key] == $cur_hour ? 'selected="selected"' : '';
154
  $result .= '<option value="'.$val_hours[$key].'" '.$sel.' >'.$opt_hours[$key].'</option>';
155
  }
156
  $result .= '</select >';
157
+ $result .= '<span class="'.$class.'" >:</span>';
158
 
159
+ $result .= '<select name="wppa-min" id="wppa-min-'.$id.'" class="'.$class.'" onchange="wppaAjaxUpdate'.$type.'('.$id.', \'min\', this);">';
160
  foreach ( array_keys( $opt_mins ) as $key ) {
161
  $sel = $val_mins[$key] == $cur_min ? 'selected="selected"' : '';
162
  $result .= '<option value="'.$val_mins[$key].'" '.$sel.' >'.$opt_mins[$key].'</option>';
165
 
166
  }
167
  else {
168
+ $result .= '<span class="'.$class.'" >'.$cur_day.' '.$opt_months[strval(intval($cur_month))].' '.$cur_year.'@'.$cur_hour.':'.$cur_min.'</span>';
169
  }
170
 
171
  return $result;
wppa-functions.php CHANGED
@@ -2305,16 +2305,6 @@ global $wppa_done;
2305
  if ( ! wppa_is_int( $cedit ) ) wp_die( 'Security check falure 14' );
2306
 
2307
  // Check captcha
2308
- /* invre modification */
2309
- if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
2310
- $is_valid = apply_filters('google_invre_is_valid_request_filter', true);
2311
- if( ! $is_valid ) {
2312
- $status = 'spam';
2313
- }
2314
- }
2315
- else
2316
- /* end invre modification */
2317
-
2318
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
2319
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
2320
  $captkey = $id;
2305
  if ( ! wppa_is_int( $cedit ) ) wp_die( 'Security check falure 14' );
2306
 
2307
  // Check captcha
 
 
 
 
 
 
 
 
 
 
2308
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
2309
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
2310
  $captkey = $id;
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 6.6.16
7
  *
8
  *
9
  */
@@ -70,7 +70,7 @@ global $pcount;
70
  $oldalbums[] = $id;
71
 
72
  // Report addition
73
- wppa_log( 'Cron', 'Adding album # {b}'.$id.'{/b} to index slug {b}'.$word.'{/b}');
74
 
75
  // Covert to string again
76
  $newalbums = wppa_index_array_to_string( $oldalbums );
@@ -128,7 +128,7 @@ global $pcount;
128
  $oldphotos[] = $id;
129
 
130
  // Report addition
131
- wppa_log( 'Cron', 'Adding photo # {b}'.$id.'{/b} to index slug {b}'.$word.'{/b}');
132
 
133
  // Covert to string again
134
  $newphotos = wppa_index_array_to_string( $oldphotos );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 6.6.22
7
  *
8
  *
9
  */
70
  $oldalbums[] = $id;
71
 
72
  // Report addition
73
+ // wppa_log( 'Cron', 'Adding album # {b}'.$id.'{/b} to index slug {b}'.$word.'{/b}');
74
 
75
  // Covert to string again
76
  $newalbums = wppa_index_array_to_string( $oldalbums );
128
  $oldphotos[] = $id;
129
 
130
  // Report addition
131
+ // wppa_log( 'Cron', 'Adding photo # {b}'.$id.'{/b} to index slug {b}'.$word.'{/b}');
132
 
133
  // Covert to string again
134
  $newphotos = wppa_index_array_to_string( $oldphotos );
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 6.6.18
7
  *
8
  */
9
 
@@ -298,17 +298,18 @@ function wppa_get_slideshow_url_ajax($id, $page = '') {
298
  // Pretty links decode
299
  function wppa_convert_from_pretty( $uri ) {
300
 
301
- // Test if we should be here anyway
302
- // if ( ! isset($_ENV["SCRIPT_URI"]) ) return $uri;
303
- $wppapos = stripos($uri, '/wppaspec/');
304
- if ( ! $wppapos ) return $uri; // Is not a pretty link
305
- if ( ! get_option('permalink_structure') ) return $uri;
 
306
 
307
  // copy start up to including slash before wppaspec
308
- $newuri = substr($uri, 0, $wppapos+1);
309
 
310
  // explode part after wppaspec/
311
- $args = explode('/', substr($uri, $wppapos+10));
312
 
313
  // process 'arguments'
314
  if ( count($args > 0) ) {
@@ -436,13 +437,13 @@ function wppa_convert_from_pretty( $uri ) {
436
  }
437
 
438
  // Pretty links Encode
439
- function wppa_convert_to_pretty( $xuri, $no_names = false ) {
440
 
441
  // Make local copy
442
  $uri = $xuri;
443
 
444
  // Only when permalink structure is not default
445
- if ( ! get_option('permalink_structure') ) return $uri;
446
 
447
  // Not on front page, the redirection will fail...
448
  // if ( is_front_page() ) {
@@ -573,7 +574,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false ) {
573
  $uri = str_replace( array( ' ', '[', ']' ), array( '%20', '%5B', '%5D' ), $uri );
574
 
575
  // Now the actual conversion to pretty links
576
- if ( ! wppa_switch( 'use_pretty_links' ) ) return $uri;
577
  if ( ! get_option( 'permalink_structure' ) ) return $uri;
578
 
579
  // Leaving the next line out gives 404 on pretty links under certain circumstances.
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 6.6.22
7
  *
8
  */
9
 
298
  // Pretty links decode
299
  function wppa_convert_from_pretty( $uri ) {
300
 
301
+ // Is a pretty link given?
302
+ $wppapos = stripos( $uri, '/wppaspec/' );
303
+ if ( ! $wppapos ) return $uri;
304
+
305
+ // Works only on non-default permalinks
306
+ if ( ! get_option( 'permalink_structure' ) ) return $uri;
307
 
308
  // copy start up to including slash before wppaspec
309
+ $newuri = substr( $uri, 0, $wppapos + 1 );
310
 
311
  // explode part after wppaspec/
312
+ $args = explode( '/', substr( $uri, $wppapos + 10 ) );
313
 
314
  // process 'arguments'
315
  if ( count($args > 0) ) {
437
  }
438
 
439
  // Pretty links Encode
440
+ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
441
 
442
  // Make local copy
443
  $uri = $xuri;
444
 
445
  // Only when permalink structure is not default
446
+ if ( ! get_option( 'permalink_structure' ) ) return $uri;
447
 
448
  // Not on front page, the redirection will fail...
449
  // if ( is_front_page() ) {
574
  $uri = str_replace( array( ' ', '[', ']' ), array( '%20', '%5B', '%5D' ), $uri );
575
 
576
  // Now the actual conversion to pretty links
577
+ if ( ! wppa_switch( 'use_pretty_links' ) && ! $overrule ) return $uri;
578
  if ( ! get_option( 'permalink_structure' ) ) return $uri;
579
 
580
  // Leaving the next line out gives 404 on pretty links under certain circumstances.
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.6.19
7
  *
8
  */
9
 
@@ -850,7 +850,7 @@ global $wppa_timestamp_start;
850
  else {
851
  $words = wppa_index_raw_to_words( wppa_index_get_raw_album( $alb ) );
852
  if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
853
- wppa_log( 'Cron', 'Removed index entry album {b}' . $albums[$aidx] . '{/b} from keyword {b}' . $indexes[$idx]['slug'] . '{/b}' );
854
 
855
  unset( $albums[$aidx] );
856
  }
@@ -887,7 +887,7 @@ global $wppa_timestamp_start;
887
  else {
888
  $words = wppa_index_raw_to_words( wppa_index_get_raw_photo( $pho ) );
889
  if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
890
- wppa_log( 'Cron', 'Removed index entry photo {b}' . $pho . '{/b} from slug {b}' . $indexes[$idx]['slug'] . '{/b}' );
891
  unset( $photos[$pidx] );
892
  }
893
  wppa_cache_thumb( 'invalidate' ); // Prevent cache overflow
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.6.22
7
  *
8
  */
9
 
850
  else {
851
  $words = wppa_index_raw_to_words( wppa_index_get_raw_album( $alb ) );
852
  if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
853
+ // wppa_log( 'Cron', 'Removed index entry album {b}' . $albums[$aidx] . '{/b} from keyword {b}' . $indexes[$idx]['slug'] . '{/b}' );
854
 
855
  unset( $albums[$aidx] );
856
  }
887
  else {
888
  $words = wppa_index_raw_to_words( wppa_index_get_raw_photo( $pho ) );
889
  if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
890
+ // wppa_log( 'Cron', 'Removed index entry photo {b}' . $pho . '{/b} from slug {b}' . $indexes[$idx]['slug'] . '{/b}' );
891
  unset( $photos[$pidx] );
892
  }
893
  wppa_cache_thumb( 'invalidate' ); // Prevent cache overflow
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 6.6.20
7
  *
8
  */
9
 
@@ -82,12 +82,19 @@ global $wpdb;
82
 
83
  // SM may not accept images from the cloud.
84
  wppa( 'for_sm', true );
 
 
 
 
85
  $imgurl = wppa_get_photo_url( $id );
 
86
  wppa( 'for_sm', false );
87
  }
88
  else {
89
  $imgurl = '';
 
90
  }
 
91
  if ( $id ) {
92
 
93
  if ( wppa_switch( 'share_twitter' ) && wppa_opt( 'twitter_account' ) ) {
@@ -140,6 +147,7 @@ global $wpdb;
140
  $title = wppa_get_photo_name( $id );
141
  $desc = wppa_get_og_desc( $id );
142
  $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
 
143
  $site = get_bloginfo('name');
144
  $mime = wppa_get_mime_type( $id );
145
  echo '
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.6.22
7
  *
8
  */
9
 
82
 
83
  // SM may not accept images from the cloud.
84
  wppa( 'for_sm', true );
85
+
86
+ // SM does not want version numbers
87
+ wppa( 'no_ver', true );
88
+
89
  $imgurl = wppa_get_photo_url( $id );
90
+ wppa( 'no_ver', false );
91
  wppa( 'for_sm', false );
92
  }
93
  else {
94
  $imgurl = '';
95
+ echo '<!-- WPPA+ No Photo id -->';
96
  }
97
+
98
  if ( $id ) {
99
 
100
  if ( wppa_switch( 'share_twitter' ) && wppa_opt( 'twitter_account' ) ) {
147
  $title = wppa_get_photo_name( $id );
148
  $desc = wppa_get_og_desc( $id );
149
  $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
150
+ $url = wppa_convert_to_pretty( $url, false, true );
151
  $site = get_bloginfo('name');
152
  $mime = wppa_get_mime_type( $id );
153
  echo '
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.6.20
7
  *
8
  */
9
 
@@ -22,8 +22,9 @@ function _wppa_edit_photo() {
22
  if ( $thumb['owner'] == wppa_get_user() ) {
23
  echo
24
  '<div class="wrap">' .
25
- '<h2>' . __( 'Edit photo' , 'wp-photo-album-plus') . '</h2>' .
26
- wppa_album_photos( '', $photo ) .
 
27
  '</div>';
28
  }
29
  else {
@@ -35,8 +36,9 @@ function _wppa_edit_photo() {
35
  else {
36
  echo
37
  '<div class="wrap">' .
38
- '<h2>' . __( 'Edit photos' , 'wp-photo-album-plus') . '</h2>' .
39
- wppa_album_photos( '', '', wppa_get_user() ) .
 
40
  '</div>';
41
  }
42
  }
@@ -54,8 +56,9 @@ function _wppa_moderate_photos() {
54
 
55
  echo
56
  '<div class="wrap">' .
57
- '<h2>' . __( 'Moderate photos' , 'wp-photo-album-plus') . '</h2>' .
58
- wppa_album_photos( '', $photo, '', true ) .
 
59
  '</div>';
60
  }
61
 
@@ -86,11 +89,16 @@ global $wpdb;
86
  );
87
  }
88
 
89
- // Edit trased photos
90
  elseif ( $album == 'trash' ) {
91
- $photos = $wpdb->get_results( "SELECT * FROM `" . WPPA_PHOTOS . "` WHERE `album` < '0' ORDER BY `modified` DESC", ARRAY_A );
92
- $count = count( $photos );
93
- $link = '';
 
 
 
 
 
94
  }
95
 
96
  // A physical album
@@ -438,6 +446,13 @@ function wppaToggleHorizon() {
438
  }
439
  }
440
 
 
 
 
 
 
 
 
441
  </script>
442
  <?php
443
 
@@ -449,6 +464,7 @@ function wppaToggleHorizon() {
449
 
450
 
451
  // Display the pagelinks
 
452
  wppa_admin_page_links( $page, $pagesize, $count, $link );
453
 
454
  // Horizon
@@ -482,6 +498,7 @@ function wppaToggleHorizon() {
482
  $tags = trim( stripslashes( $photo['tags'] ), ',' );
483
  $stereo = $photo['stereo'];
484
  $magickstack = $photo['magickstack'];
 
485
 
486
  // See if item is a multimedia item
487
  $is_multi = wppa_is_multi( $id );
@@ -843,6 +860,22 @@ function wppaToggleHorizon() {
843
  }
844
  echo ' ';
845
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
846
  // Update status field
847
  echo
848
  __( 'Remark:', 'wp-photo-album-plus' ) . ' ' .
@@ -982,7 +1015,7 @@ function wppaToggleHorizon() {
982
  echo // Section 2
983
  "\n" . '<!-- Section 2 -->';
984
 
985
- if ( ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) || ( ! $is_multi || is_file( wppa_get_photo_path( $id ) ) ) ) {
986
  echo
987
  '<table' .
988
  ' class="wppa-table wppa-photo-table"' .
@@ -1034,60 +1067,52 @@ function wppaToggleHorizon() {
1034
 
1035
  // Watermark
1036
  if ( wppa_switch( 'watermark_on' ) ) {
1037
- if ( is_file( wppa_get_photo_path( $id ) ) ) {
1038
 
1039
- // Get the current watermark file settings
1040
- $temp = wppa_get_water_file_and_pos( $id );
1041
- $wmfile = isset( $temp['file'] ) ? $temp['file'] : '';
1042
- $wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
1043
 
 
 
1044
  echo
1045
  __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1046
- if ( wppa_switch( 'watermark_on' ) ) {
1047
- $user = wppa_get_user();
1048
- if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1049
- echo
1050
- '<select' .
1051
- ' id="wmfsel_' . $id . '"' .
1052
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_file_' . $user . '\', this );"' .
1053
- ' >' .
1054
- wppa_watermark_file_select( 'user', $album ) .
1055
- '</select>' .
1056
- __( 'Pos:', 'wp-photo-album-plus' ) . ' ' .
1057
- '<select' .
1058
- ' id="wmpsel_' . $id . '"' .
1059
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this );"' .
1060
- ' >' .
1061
- wppa_watermark_pos_select( 'user', $album ) .
1062
- '</select>' .
1063
- '<input' .
1064
- ' type="button"' .
1065
- ' class="button-secundary"' .
1066
- ' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
1067
- ' onclick="wppaTryWatermark( ' . $id . ' )"' .
1068
- ' />';
1069
- }
1070
- else {
1071
- echo
1072
- __( 'File:', 'wp-photo-album-plus' ) . ' ' . __( $wmfile, 'wp-photo-album-plus' ) . ' ';
1073
- if ( $wmfile != '--- none ---' ) {
1074
- echo __( 'Pos:', 'wp-photo-album-plus') . ' ' . $wmpos;
1075
- }
1076
- }
1077
- echo
1078
- '<img' .
1079
- ' id="wppa-water-spin-' . $id . '"' .
1080
- ' src="' . wppa_get_imgdir() . 'spinner.' . ( wppa_is_ie() ? 'gif' : 'svg' ) . '"' .
1081
- ' alt="Spin"' .
1082
- ' style="visibility:hidden"' .
1083
- ' />';
1084
- }
1085
- else {
1086
- echo
1087
- __( 'Not configured', 'wp-photo-album-plus' );
1088
- }
1089
- echo ' ';
1090
  }
 
1091
  }
1092
 
1093
  echo
@@ -1538,7 +1563,7 @@ function wppaToggleHorizon() {
1538
  ' style="float:left;max-width:90%;" ' .
1539
  ' />' .
1540
  '<div' .
1541
- ' style="display:inline-block;vertical-align:middle;margin-left:4px;margin-top:' . ( wppa_get_photoy( $id ) / 2 - 30 ) . 'px;"' .
1542
  ' >' .
1543
  '<input' .
1544
  ' type="button"' .
@@ -2160,8 +2185,8 @@ function wppa_album_photos_bulk( $album ) {
2160
  $page = ( isset( $_GET['wppa-page'] ) ? max( strval( intval( $_GET['wppa-page'] ) ), '1' ) : '1' ) + ( isset( $_POST['next-after'] ) ? $_POST['next-after'] : '0' );
2161
  $skip = ( $page > '0' ? ( $page - '1' ) * $pagesize : '0' );
2162
  $limit = ( $pagesize < '1' ) ? '' : ' LIMIT '.$skip.','.$pagesize;
2163
- $no_confirm_delete = ( isset( $_REQUEST['no-confirm-delete'] ) ? true : false );
2164
- $no_confirm_move = ( isset( $_REQUEST['no-confirm-move'] ) ? true : false );
2165
  /*
2166
  echo 'Post=';
2167
  print_r($_POST);
@@ -2185,7 +2210,7 @@ echo 'Page='.$page;
2185
  }
2186
 
2187
  if ( $photos ) {
2188
- $plink = $link . '&next-after=' . $next_after . ( $no_confirm_delete ? '&no-confirm-delete=on' : '' ) . ( $no_confirm_move ? '&no-confirm-move=on' : '' );
2189
  wppa_admin_page_links( $page, $pagesize, $count, $plink, '#manage-photos' );
2190
  ?>
2191
  <script type="text/javascript" >
@@ -2286,11 +2311,49 @@ function wppaTryMove( id, video ) {
2286
  query = '<?php echo esc_js( __( 'Are you sure you want to move this photo?', 'wp-photo-album-plus' ) ) ?>';
2287
  }
2288
 
2289
- if ( jQuery('#no-confirm-move').attr('checked') == 'checked' || confirm( query ) ) {
2290
  jQuery( '#moving-' + id ).html( '<?php _e( 'Moving...', 'wp-photo-album-plus' ) ?>' );
2291
  _wppaAjaxUpdatePhoto( id, 'moveto', jQuery( '#target-' + id ).val(), false, '<td colspan="8" >', '</td>' );
2292
  }
2293
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2294
  </script>
2295
  <?php /**/ ?>
2296
  <form action="<?php echo $link.'&wppa-page='.$page.'#manage-photos' ?>" method="post" >
@@ -2358,15 +2421,31 @@ function wppaTryMove( id, video ) {
2358
  }
2359
  ?>
2360
 
2361
- <input type="checkbox" id="no-confirm-delete" name="no-confirm-delete"<?php if ( $no_confirm_delete ) echo ' checked="checked"' ?> style="display:none;" />
2362
- <input type="checkbox" id="confirm-delete" name="confirm-delete"<?php if ( ! $no_confirm_delete ) echo ' checked="checked"' ?>
2363
- onchange="if ( jQuery(this).val() == 'on' ) jQuery( '#no-confirm-delete' ).attr('checked', 'checked'); else jQuery( '#no-confirm-delete' ).removeAttr( 'checked' );" /><?php _e('Confirm delete', 'wp-photo-album-plus') ?>
2364
- <input type="checkbox" id="no-confirm-move" name="no-confirm-move"<?php if ( $no_confirm_move ) echo ' checked="checked"' ?> style="display:none;" />
2365
- <input type="checkbox" id="confirm-move" name="confirm-move"<?php if ( ! $no_confirm_move ) echo ' checked="checked"' ?>
2366
- onchange="if ( jQuery(this).val() == 'on' ) jQuery( '#no-confirm-move' ).attr('checked', 'checked'); else jQuery( '#no-confirm-move' ).removeAttr( 'checked' );" /><?php _e('Confirm move', 'wp-photo-album-plus') ?>
2367
-
2368
-
2369
- <?php echo '<small style="float:right;" > (' . count( $photos ) . ')</small>'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2370
  </h3>
2371
  <table class="widefat" >
2372
  <thead style="font-weight:bold;" >
@@ -2396,7 +2475,7 @@ function wppaTryMove( id, video ) {
2396
  '<br />' .
2397
  '<a' .
2398
  ' id="wppa-delete-' . $photo['id'] . '"' .
2399
- ' onclick="if ( jQuery(\'#no-confirm-delete\').attr(\'checked\') == \'checked\' ||
2400
  confirm( \'' . esc_js( __( 'Are you sure you want to delete this photo?', 'wp-photo-album-plus' ) ) . '\' ) ) {
2401
  jQuery(this).html( \'' . esc_js( __('Deleting...', 'wp-photo-album-plus') ) . '\' );
2402
  wppaAjaxDeletePhoto( \'' . $photo['id'] . '\', \'<td colspan=8 >\', \'</td>\' ) }"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.6.22
7
  *
8
  */
9
 
22
  if ( $thumb['owner'] == wppa_get_user() ) {
23
  echo
24
  '<div class="wrap">' .
25
+ '<h2>' . __( 'Edit photo' , 'wp-photo-album-plus') . '</h2>';
26
+ wppa_album_photos( '', $photo );
27
+ echo
28
  '</div>';
29
  }
30
  else {
36
  else {
37
  echo
38
  '<div class="wrap">' .
39
+ '<h2>' . __( 'Edit photos' , 'wp-photo-album-plus') . '</h2>';
40
+ wppa_album_photos( '', '', wppa_get_user() );
41
+ echo
42
  '</div>';
43
  }
44
  }
56
 
57
  echo
58
  '<div class="wrap">' .
59
+ '<h2>' . __( 'Moderate photos' , 'wp-photo-album-plus') . '</h2>';
60
+ wppa_album_photos( '', $photo, '', true );
61
+ echo
62
  '</div>';
63
  }
64
 
89
  );
90
  }
91
 
92
+ // Edit trashed photos
93
  elseif ( $album == 'trash' ) {
94
+ $count = $wpdb->get_var( "SELECT COUNT(*) FROM `" . WPPA_PHOTOS . "` WHERE `album` < '0'" );
95
+ $photos = $wpdb->get_results( "SELECT * FROM `" . WPPA_PHOTOS . "` WHERE `album` < '0' ORDER BY `modified` DESC " . $limit, ARRAY_A );
96
+ // $count = count( $photos );
97
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php' .
98
+ '?page=wppa_admin_menu' .
99
+ '&tab=edit' .
100
+ '&edit_id=trash'
101
+ );
102
  }
103
 
104
  // A physical album
446
  }
447
  }
448
 
449
+ function wppaTryScheduledel( id ) {
450
+ wppaPhotoStatusChange( id );
451
+ if ( jQuery( '#scheduledel-' + id ).attr( 'checked' ) != 'checked' ) {
452
+ _wppaAjaxUpdatePhoto( id, 'removescheduledel', 0, true );
453
+ }
454
+ }
455
+
456
  </script>
457
  <?php
458
 
464
 
465
 
466
  // Display the pagelinks
467
+ // echo 'page_links called with: '.$page.' '.$pagesize.' '.$count.' '.$link;
468
  wppa_admin_page_links( $page, $pagesize, $count, $link );
469
 
470
  // Horizon
498
  $tags = trim( stripslashes( $photo['tags'] ), ',' );
499
  $stereo = $photo['stereo'];
500
  $magickstack = $photo['magickstack'];
501
+ $scheduledel = $photo['scheduledel'];
502
 
503
  // See if item is a multimedia item
504
  $is_multi = wppa_is_multi( $id );
860
  }
861
  echo ' ';
862
 
863
+ // Schedule for delete
864
+ $may_change = wppa_user_is( 'administrator' ) || current_user_can( 'wppa_moderate' );
865
+ echo
866
+ __( 'Delete at', 'wp-photo-album-plus' ) .
867
+ ' ' .
868
+ '<input' .
869
+ ' type="checkbox"' .
870
+ ' id="scheduledel-' . $id . '"' .
871
+ ( $scheduledel ? ' checked="checked"' : '' ) .
872
+ ( $may_change ? '' : ' disabled="disabled"' ) .
873
+ ' onchange="wppaTryScheduledel( ' . $id . ' );"' .
874
+ ' />' .
875
+ ' ' .
876
+ wppa_get_date_time_select_html( 'delphoto', $id, $may_change ) .
877
+ ' ';
878
+
879
  // Update status field
880
  echo
881
  __( 'Remark:', 'wp-photo-album-plus' ) . ' ' .
1015
  echo // Section 2
1016
  "\n" . '<!-- Section 2 -->';
1017
 
1018
+ if ( ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) || ( is_file( wppa_get_photo_path( $id ) ) && wppa_switch( 'watermark_on' ) ) ) {
1019
  echo
1020
  '<table' .
1021
  ' class="wppa-table wppa-photo-table"' .
1067
 
1068
  // Watermark
1069
  if ( wppa_switch( 'watermark_on' ) ) {
 
1070
 
1071
+ // Get the current watermark file settings
1072
+ $temp = wppa_get_water_file_and_pos( $id );
1073
+ $wmfile = isset( $temp['file'] ) ? $temp['file'] : '';
1074
+ $wmpos = isset( $temp['pos'] ) && isset ( $wms[$temp['pos']] ) ? $wms[$temp['pos']] : '';
1075
 
1076
+ $user = wppa_get_user();
1077
+ if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1078
  echo
1079
  __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1080
+ echo
1081
+ '<select' .
1082
+ ' id="wmfsel_' . $id . '"' .
1083
+ ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_file_' . $user . '\', this );"' .
1084
+ ' >' .
1085
+ wppa_watermark_file_select( 'user', $album ) .
1086
+ '</select>' .
1087
+ __( 'Pos:', 'wp-photo-album-plus' ) . ' ' .
1088
+ '<select' .
1089
+ ' id="wmpsel_' . $id . '"' .
1090
+ ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'wppa_watermark_pos_' . $user . '\', this );"' .
1091
+ ' >' .
1092
+ wppa_watermark_pos_select( 'user', $album ) .
1093
+ '</select>' .
1094
+ '<input' .
1095
+ ' type="button"' .
1096
+ ' class="button-secundary"' .
1097
+ ' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
1098
+ ' onclick="wppaTryWatermark( ' . $id . ' )"' .
1099
+ ' />' .
1100
+ ' ' .
1101
+ '<img' .
1102
+ ' id="wppa-water-spin-' . $id . '"' .
1103
+ ' src="' . wppa_get_imgdir() . 'spinner.' . ( wppa_is_ie() ? 'gif' : 'svg' ) . '"' .
1104
+ ' alt="Spin"' .
1105
+ ' style="visibility:hidden"' .
1106
+ ' />';
1107
+ }
1108
+ elseif ( basename( $wmfile ) != '--- none ---' ) {
1109
+ echo
1110
+ __( 'Watermark:', 'wp-photo-album-plus') . ' ';
1111
+ echo
1112
+ __( 'File:', 'wp-photo-album-plus' ) . ' ' . basename( $wmfile ) . ' ' .
1113
+ __( 'Pos:', 'wp-photo-album-plus') . ' ' . $wmpos;
 
 
 
 
 
 
 
 
 
 
1114
  }
1115
+ echo ' ';
1116
  }
1117
 
1118
  echo
1563
  ' style="float:left;max-width:90%;" ' .
1564
  ' />' .
1565
  '<div' .
1566
+ ' style="display:inline-block;vertical-align:middle;margin-left:4px;margin-top:' . ( min( 600, wppa_get_photoy( $id ) ) / 2 - 30 ) . 'px;"' .
1567
  ' >' .
1568
  '<input' .
1569
  ' type="button"' .
2185
  $page = ( isset( $_GET['wppa-page'] ) ? max( strval( intval( $_GET['wppa-page'] ) ), '1' ) : '1' ) + ( isset( $_POST['next-after'] ) ? $_POST['next-after'] : '0' );
2186
  $skip = ( $page > '0' ? ( $page - '1' ) * $pagesize : '0' );
2187
  $limit = ( $pagesize < '1' ) ? '' : ' LIMIT '.$skip.','.$pagesize;
2188
+ // $no_confirm_delete = wppa_getCookie(); //( isset( $_REQUEST['no-confirm-delete'] ) ? true : false );
2189
+ // $no_confirm_move = wppa_getCookie(); //( isset( $_REQUEST['no-confirm-move'] ) ? true : false );
2190
  /*
2191
  echo 'Post=';
2192
  print_r($_POST);
2210
  }
2211
 
2212
  if ( $photos ) {
2213
+ $plink = $link . '&next-after=' . $next_after;
2214
  wppa_admin_page_links( $page, $pagesize, $count, $plink, '#manage-photos' );
2215
  ?>
2216
  <script type="text/javascript" >
2311
  query = '<?php echo esc_js( __( 'Are you sure you want to move this photo?', 'wp-photo-album-plus' ) ) ?>';
2312
  }
2313
 
2314
+ if ( jQuery('#confirm-move').attr('checked') != 'checked' || confirm( query ) ) {
2315
  jQuery( '#moving-' + id ).html( '<?php _e( 'Moving...', 'wp-photo-album-plus' ) ?>' );
2316
  _wppaAjaxUpdatePhoto( id, 'moveto', jQuery( '#target-' + id ).val(), false, '<td colspan="8" >', '</td>' );
2317
  }
2318
  }
2319
+
2320
+ function wppaToggleConfirmDelete( elm ) {
2321
+ var status = jQuery( elm ).attr( 'checked' );
2322
+ if ( status == 'checked' ) {
2323
+ wppa_setCookie( 'wppaConfirmDelete', 'checked', 365 );
2324
+ }
2325
+ else {
2326
+ wppa_setCookie( 'wppaConfirmDelete', 'unchecked', 365 );
2327
+ }
2328
+ }
2329
+ function wppaToggleConfirmMove( elm ) {
2330
+ var status = jQuery( elm ).attr( 'checked' );
2331
+ if ( status == 'checked' ) {
2332
+ wppa_setCookie( 'wppaConfirmMove', 'checked', 365 );
2333
+ }
2334
+ else {
2335
+ wppa_setCookie( 'wppaConfirmMove', 'unchecked', 365 );
2336
+ }
2337
+ }
2338
+ function wppaSetConfirmDelete( id ) {
2339
+ var status = wppa_getCookie( 'wppaConfirmDelete' );
2340
+ if ( status == 'checked' ) {
2341
+ jQuery( '#' + id ).attr( 'checked', 'checked' );
2342
+ }
2343
+ else {
2344
+ jQuery( '#' + id ).removeAttr( 'checked' );
2345
+ }
2346
+ }
2347
+ function wppaSetConfirmMove( id ) {
2348
+ var status = wppa_getCookie( 'wppaConfirmMove' );
2349
+ if ( status == 'checked' ) {
2350
+ jQuery( '#' + id ).attr( 'checked', 'checked' );
2351
+ }
2352
+ else {
2353
+ jQuery( '#' + id ).removeAttr( 'checked' );
2354
+ }
2355
+ }
2356
+
2357
  </script>
2358
  <?php /**/ ?>
2359
  <form action="<?php echo $link.'&wppa-page='.$page.'#manage-photos' ?>" method="post" >
2421
  }
2422
  ?>
2423
 
2424
+ <input
2425
+ type="checkbox"
2426
+ id="confirm-delete"
2427
+ name="confirm-delete"
2428
+ checked="checked"
2429
+ onchange="wppaToggleConfirmDelete( this );"
2430
+ />
2431
+ <?php _e('Confirm delete', 'wp-photo-album-plus') ?>
2432
+
2433
+ <input
2434
+ type="checkbox"
2435
+ id="confirm-move"
2436
+ name="confirm-move"
2437
+ checked="checked"
2438
+ onchange="wppaToggleConfirmMove(this);"
2439
+ />
2440
+ <?php _e('Confirm move', 'wp-photo-album-plus') ?>
2441
+
2442
+ <?php echo '<small style="float:right;" > (' . count( $photos ) . ')</small>'; ?>
2443
+ <script>
2444
+ jQuery( document ).ready( function() {
2445
+ wppaSetConfirmDelete( 'confirm-delete' );
2446
+ wppaSetConfirmMove( 'confirm-move' );
2447
+ });
2448
+ </script>
2449
  </h3>
2450
  <table class="widefat" >
2451
  <thead style="font-weight:bold;" >
2475
  '<br />' .
2476
  '<a' .
2477
  ' id="wppa-delete-' . $photo['id'] . '"' .
2478
+ ' onclick="if ( jQuery(\'#confirm-delete\').attr(\'checked\') != \'checked\' ||
2479
  confirm( \'' . esc_js( __( 'Are you sure you want to delete this photo?', 'wp-photo-album-plus' ) ) . '\' ) ) {
2480
  jQuery(this).html( \'' . esc_js( __('Deleting...', 'wp-photo-album-plus') ) . '\' );
2481
  wppaAjaxDeletePhoto( \'' . $photo['id'] . '\', \'<td colspan=8 >\', \'</td>\' ) }"' .
wppa-settings-autosave.php CHANGED
@@ -6681,8 +6681,8 @@ global $wp_version;
6681
  $desc = __('Use a simple calculate captcha on comments form.', 'wp-photo-album-plus');
6682
  $help = '';
6683
  $slug = 'wppa_comment_captcha';
6684
- $opts = array(__('All users', 'wp-photo-album-plus'), __('Logged out users', 'wp-photo-album-plus'), __('No users', 'wp-photo-album-plus'), __('Use Google invisible reCaptcha', 'wp-photo-album-plus'));
6685
- $vals = array('all', 'logout', 'none', 'invre');
6686
  $html1 = wppa_select($slug, $opts, $vals);
6687
  $clas = 'wppa_comment_';
6688
  $html2 = '';
6681
  $desc = __('Use a simple calculate captcha on comments form.', 'wp-photo-album-plus');
6682
  $help = '';
6683
  $slug = 'wppa_comment_captcha';
6684
+ $opts = array(__('All users', 'wp-photo-album-plus'), __('Logged out users', 'wp-photo-album-plus'), __('No users', 'wp-photo-album-plus'));
6685
+ $vals = array('all', 'logout', 'none');
6686
  $html1 = wppa_select($slug, $opts, $vals);
6687
  $clas = 'wppa_comment_';
6688
  $html2 = '';
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.6.20
7
  *
8
  */
9
 
@@ -108,6 +108,7 @@ global $silent;
108
  photox smallint(5) NOT NULL default '0',
109
  photoy smallint(5) NOT NULL default '0',
110
  scheduledtm tinytext NOT NULL,
 
111
  custom longtext NOT NULL,
112
  stereo smallint NOT NULL default '0',
113
  crypt tinytext NOT NULL,
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.6.22
7
  *
8
  */
9
 
108
  photox smallint(5) NOT NULL default '0',
109
  photoy smallint(5) NOT NULL default '0',
110
  scheduledtm tinytext NOT NULL,
111
+ scheduledel tinytext NOT NULL,
112
  custom longtext NOT NULL,
113
  stereo smallint NOT NULL default '0',
114
  crypt tinytext NOT NULL,
wppa-upload.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
- * Version 6.6.16
7
  *
8
  */
9
 
@@ -15,6 +15,9 @@ global $target;
15
  global $wppa_revno;
16
  global $upload_album;
17
 
 
 
 
18
  // sanitize system
19
  $user = wppa_get_user();
20
  wppa_sanitize_files();
@@ -229,7 +232,9 @@ global $upload_album;
229
  '"' .
230
  ' >' .
231
  sprintf( __( '<b>Notice:</b> your server allows you to upload <b>%s</b> files of maximum total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.' , 'wp-photo-album-plus' ), $max_files_txt, $max_size, $max_time ) .
 
232
  __( 'If your request exceeds these limitations, it will fail, probably without an errormessage.' , 'wp-photo-album-plus' ) .
 
233
  __( 'Additionally your hosting provider may have set other limitations on uploading files.' , 'wp-photo-album-plus' ) .
234
  '<br />' .
235
  wppa_check_memory_limit() .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
+ * Version 6.6.22
7
  *
8
  */
9
 
15
  global $wppa_revno;
16
  global $upload_album;
17
 
18
+ // Maybe it helps...
19
+ set_time_limit( 0 );
20
+
21
  // sanitize system
22
  $user = wppa_get_user();
23
  wppa_sanitize_files();
232
  '"' .
233
  ' >' .
234
  sprintf( __( '<b>Notice:</b> your server allows you to upload <b>%s</b> files of maximum total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.' , 'wp-photo-album-plus' ), $max_files_txt, $max_size, $max_time ) .
235
+ ' ' .
236
  __( 'If your request exceeds these limitations, it will fail, probably without an errormessage.' , 'wp-photo-album-plus' ) .
237
+ ' ' .
238
  __( 'Additionally your hosting provider may have set other limitations on uploading files.' , 'wp-photo-album-plus' ) .
239
  '<br />' .
240
  wppa_check_memory_limit() .
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.6.21
7
  *
8
  */
9
 
@@ -122,7 +122,7 @@ global $wppa_supported_stereo_types;
122
  // If in the cloud...
123
  $for_sm = wppa( 'for_sm' ); // Social media do not accept cloud images
124
  $is_old = wppa_too_old_for_cloud( $id );
125
- if ( wppa_cdn( 'front' ) && ! wppa_is_multi( $id ) && ! $is_old && ! wppa_is_stereo( $id ) && ! $for_sm ) {
126
  switch ( wppa_cdn( 'front' ) ) {
127
  case 'cloudinary':
128
  $x = round($x);
@@ -185,7 +185,10 @@ global $wppa_supported_stereo_types;
185
  $result = wppa_fix_poster_ext( $result, $thumb['id'] );
186
  }
187
 
188
- $result .= '?ver=' . get_option( 'wppa_photo_version', '1' );
 
 
 
189
 
190
  return $result;
191
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.6.22
7
  *
8
  */
9
 
122
  // If in the cloud...
123
  $for_sm = wppa( 'for_sm' ); // Social media do not accept cloud images
124
  $is_old = wppa_too_old_for_cloud( $id );
125
+ if ( wppa_cdn( 'front' ) && ! wppa_is_multi( $id ) && ! $is_old && ! wppa_is_stereo( $id ) && ! $for_sm && ! $thumb['magickstack'] ) {
126
  switch ( wppa_cdn( 'front' ) ) {
127
  case 'cloudinary':
128
  $x = round($x);
185
  $result = wppa_fix_poster_ext( $result, $thumb['id'] );
186
  }
187
 
188
+ // Social media do not like querystrings
189
+ if ( ! wppa( 'no_ver' ) ) {
190
+ $result .= '?ver=' . get_option( 'wppa_photo_version', '1' );
191
+ }
192
 
193
  return $result;
194
  }
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 6.6.18
7
  *
8
  */
9
 
@@ -266,6 +266,7 @@ global $wpdb;
266
  'videox' => '0',
267
  'videoy' => '0',
268
  'scheduledtm' => $args['album'] ? $wpdb->get_var( $wpdb->prepare( "SELECT `scheduledtm` FROM `".WPPA_ALBUMS."` WHERE `id` = %s", $args['album'] ) ) : '',
 
269
  'custom' => '',
270
  'crypt' => wppa_get_unique_photo_crypt(),
271
  'magickstack' => '',
@@ -300,11 +301,12 @@ global $wpdb;
300
  `videox`,
301
  `videoy`,
302
  `scheduledtm`,
 
303
  `custom`,
304
  `crypt`,
305
  `magickstack`
306
  )
307
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
308
  $args['id'],
309
  $args['album'],
310
  $args['ext'],
@@ -330,6 +332,7 @@ global $wpdb;
330
  $args['videox'],
331
  $args['videoy'],
332
  $args['scheduledtm'],
 
333
  $args['custom'],
334
  $args['crypt'],
335
  $args['magickstack']
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 6.6.22
7
  *
8
  */
9
 
266
  'videox' => '0',
267
  'videoy' => '0',
268
  'scheduledtm' => $args['album'] ? $wpdb->get_var( $wpdb->prepare( "SELECT `scheduledtm` FROM `".WPPA_ALBUMS."` WHERE `id` = %s", $args['album'] ) ) : '',
269
+ 'scheduledel' => '',
270
  'custom' => '',
271
  'crypt' => wppa_get_unique_photo_crypt(),
272
  'magickstack' => '',
301
  `videox`,
302
  `videoy`,
303
  `scheduledtm`,
304
+ `scheduledel`,
305
  `custom`,
306
  `crypt`,
307
  `magickstack`
308
  )
309
+ VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
310
  $args['id'],
311
  $args['album'],
312
  $args['ext'],
332
  $args['videox'],
333
  $args['videoy'],
334
  $args['scheduledtm'],
335
+ $args['scheduledel'],
336
  $args['custom'],
337
  $args['crypt'],
338
  $args['magickstack']
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
- * Version 6.6.19
7
  *
8
  */
9
 
@@ -135,6 +135,7 @@ global $wpdb;
135
  $doit = true;
136
  break;
137
  case 'scheduledtm':
 
138
  case 'exifdtm':
139
  case 'page_id':
140
  $doit = true;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 6.6.22
7
  *
8
  */
9
 
135
  $doit = true;
136
  break;
137
  case 'scheduledtm':
138
+ case 'scheduledel':
139
  case 'exifdtm':
140
  case 'page_id':
141
  $doit = true;
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: 6.6.21
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/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6620'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-6-21-001'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.6.22
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/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6622'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-6-22-004'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);