WP Photo Album Plus - Version 6.7.09

Version Description

Download this release

Release Info

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

Code changes from version 6.7.08 to 6.7.09

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.7.01';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -554,8 +554,8 @@ function _wppaNextSlide_3( mocc ) {
554
  if ( olIdx == nwIdx ) dir = 'none';
555
  if ( olIdx == nwIdx - 1 ) dir = 'left';
556
  if ( olIdx == nwIdx + 1 ) dir = 'right';
557
- if ( olIdx == _wppaSlides[mocc].length - 1 && 0 == nwIdx && wppaSlideWrap ) dir = 'left';
558
- if ( 0 == olIdx && nwIdx == _wppaSlides[mocc].length - 1 && wppaSlideWrap ) dir = 'right';
559
 
560
  // Not known yet?
561
  if ( 'nil' == dir ) {
@@ -756,7 +756,7 @@ function _wppaNextSlide_5( mocc ) {
756
 
757
  // End of non wrapped show?
758
  if ( _wppaSSRuns[mocc] &&
759
- ! wppaSlideWrap &&
760
  ( ( _wppaCurIdx[mocc] + 1 ) == _wppaSlides[mocc].length ) ) {
761
  _wppaIsBusy[mocc] = false;
762
  _wppaStop( mocc ); // stop
@@ -1189,7 +1189,7 @@ function _wppaAdjustFilmstrip( mocc ) {
1189
 
1190
  if ( ! _wppaFilmNoMove[mocc] ) {
1191
  var xoffset;
1192
- xoffset = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1193
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1194
  jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed);
1195
  }
@@ -1243,7 +1243,7 @@ function _wppaAdjustFilmstrip( mocc ) {
1243
  function _wppaNext( mocc ) {
1244
 
1245
  // Check for end of non wrapped show
1246
- if ( ! wppaSlideWrap && _wppaCurIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) return;
1247
  // Find next index
1248
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] + 1;
1249
  if ( _wppaNxtIdx[mocc] == _wppaSlides[mocc].length ) _wppaNxtIdx[mocc] = 0;
@@ -1254,7 +1254,7 @@ function _wppaNext( mocc ) {
1254
  function _wppaNextN( mocc, n ) {
1255
 
1256
  // Check for end of non wrapped show
1257
- if ( ! wppaSlideWrap && _wppaCurIdx[mocc] >= ( _wppaSlides[mocc].length - n ) ) return;
1258
  // Find next index
1259
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] + n;
1260
  while ( _wppaNxtIdx[mocc] >= _wppaSlides[mocc].length ) _wppaNxtIdx[mocc] -= _wppaSlides[mocc].length;
@@ -1265,7 +1265,7 @@ function _wppaNextN( mocc, n ) {
1265
  function _wppaNextOnCallback( mocc ) {
1266
 
1267
  // Check for end of non wrapped show
1268
- if ( ! wppaSlideWrap && _wppaCurIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) return;
1269
  // Check for skip rated after rating
1270
  if ( _wppaSkipRated[mocc] ) {
1271
  var now = _wppaCurIdx[mocc];
@@ -1293,7 +1293,7 @@ function _wppaNextOnCallback( mocc ) {
1293
  function _wppaPrev( mocc ) {
1294
 
1295
  // Check for begin of non wrapped show
1296
- if ( ! wppaSlideWrap && _wppaCurIdx[mocc] == 0 ) return;
1297
  // Find previous index
1298
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] - 1;
1299
  if ( _wppaNxtIdx[mocc] < 0 ) _wppaNxtIdx[mocc] = _wppaSlides[mocc].length - 1;
@@ -1304,7 +1304,7 @@ function _wppaPrev( mocc ) {
1304
  function _wppaPrevN( mocc, n ) {
1305
 
1306
  // Check for begin of non wrapped show
1307
- if ( ! wppaSlideWrap && _wppaCurIdx[mocc] < n ) return;
1308
  // Find previous index
1309
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] - n;
1310
  while ( _wppaNxtIdx[mocc] < 0 ) _wppaNxtIdx[mocc] += _wppaSlides[mocc].length;
@@ -1820,7 +1820,7 @@ function _wppaUbb( mocc,where,act ) {
1820
  if ( where == 'l' ) { // wppaPrev( mocc );
1821
  idx = _wppaCurIdx[mocc] - 1;
1822
  if ( idx < 0 ) {
1823
- if ( ! wppaSlideWrap ) {
1824
  return;
1825
  }
1826
  idx = _wppaSlides[mocc].length - 1;
@@ -1829,7 +1829,7 @@ function _wppaUbb( mocc,where,act ) {
1829
  if ( where == 'r' ) { // wppaNext( mocc );
1830
  idx = _wppaCurIdx[mocc] + 1;
1831
  if ( idx == _wppaSlides[mocc].length ) {
1832
- if ( ! wppaSlideWrap ) {
1833
  return;
1834
  }
1835
  idx = 0;
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.7.09';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
554
  if ( olIdx == nwIdx ) dir = 'none';
555
  if ( olIdx == nwIdx - 1 ) dir = 'left';
556
  if ( olIdx == nwIdx + 1 ) dir = 'right';
557
+ if ( olIdx == _wppaSlides[mocc].length - 1 && 0 == nwIdx && wppaSlideWrap[mocc] ) dir = 'left';
558
+ if ( 0 == olIdx && nwIdx == _wppaSlides[mocc].length - 1 && wppaSlideWrap[mocc] ) dir = 'right';
559
 
560
  // Not known yet?
561
  if ( 'nil' == dir ) {
756
 
757
  // End of non wrapped show?
758
  if ( _wppaSSRuns[mocc] &&
759
+ ! wppaSlideWrap[mocc] &&
760
  ( ( _wppaCurIdx[mocc] + 1 ) == _wppaSlides[mocc].length ) ) {
761
  _wppaIsBusy[mocc] = false;
762
  _wppaStop( mocc ); // stop
1189
 
1190
  if ( ! _wppaFilmNoMove[mocc] ) {
1191
  var xoffset;
1192
+ xoffset = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1193
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1194
  jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed);
1195
  }
1243
  function _wppaNext( mocc ) {
1244
 
1245
  // Check for end of non wrapped show
1246
+ if ( ! wppaSlideWrap[mocc] && _wppaCurIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) return;
1247
  // Find next index
1248
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] + 1;
1249
  if ( _wppaNxtIdx[mocc] == _wppaSlides[mocc].length ) _wppaNxtIdx[mocc] = 0;
1254
  function _wppaNextN( mocc, n ) {
1255
 
1256
  // Check for end of non wrapped show
1257
+ if ( ! wppaSlideWrap[mocc] && _wppaCurIdx[mocc] >= ( _wppaSlides[mocc].length - n ) ) return;
1258
  // Find next index
1259
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] + n;
1260
  while ( _wppaNxtIdx[mocc] >= _wppaSlides[mocc].length ) _wppaNxtIdx[mocc] -= _wppaSlides[mocc].length;
1265
  function _wppaNextOnCallback( mocc ) {
1266
 
1267
  // Check for end of non wrapped show
1268
+ if ( ! wppaSlideWrap[mocc] && _wppaCurIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) return;
1269
  // Check for skip rated after rating
1270
  if ( _wppaSkipRated[mocc] ) {
1271
  var now = _wppaCurIdx[mocc];
1293
  function _wppaPrev( mocc ) {
1294
 
1295
  // Check for begin of non wrapped show
1296
+ if ( ! wppaSlideWrap[mocc] && _wppaCurIdx[mocc] == 0 ) return;
1297
  // Find previous index
1298
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] - 1;
1299
  if ( _wppaNxtIdx[mocc] < 0 ) _wppaNxtIdx[mocc] = _wppaSlides[mocc].length - 1;
1304
  function _wppaPrevN( mocc, n ) {
1305
 
1306
  // Check for begin of non wrapped show
1307
+ if ( ! wppaSlideWrap[mocc] && _wppaCurIdx[mocc] < n ) return;
1308
  // Find previous index
1309
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc] - n;
1310
  while ( _wppaNxtIdx[mocc] < 0 ) _wppaNxtIdx[mocc] += _wppaSlides[mocc].length;
1820
  if ( where == 'l' ) { // wppaPrev( mocc );
1821
  idx = _wppaCurIdx[mocc] - 1;
1822
  if ( idx < 0 ) {
1823
+ if ( ! wppaSlideWrap[mocc] ) {
1824
  return;
1825
  }
1826
  idx = _wppaSlides[mocc].length - 1;
1829
  if ( where == 'r' ) { // wppaNext( mocc );
1830
  idx = _wppaCurIdx[mocc] + 1;
1831
  if ( idx == _wppaSlides[mocc].length ) {
1832
+ if ( ! wppaSlideWrap[mocc] ) {
1833
  return;
1834
  }
1835
  idx = 0;
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,d,s,u,_,m,c,y,h,S,x,f,g,I,j,Q,b,v,N,T,C,k){var R;if(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":parseInt(h)>0?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),k.length>0&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]){var L;L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"}else _wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=r,_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=l,_wppaAvg[p][a]=d,_wppaDisc[p][a]=s,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=c,""!=y?_wppaLinkTarget[p][a]=y:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button","48px",!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button","48px",!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");(_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(_wppaSlides[p].length<2&&!_wppaFirst[p]||(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax&&(jQuery("[id^=wppa-numbar-"+p+"-]").html(" . "),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).html(" "+(_wppaNxtIdx[p]+1)+" ")),_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button","1.5em",!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button","1.5em",!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),wppaColWidth[p]=0,_wppaDoAutocol(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)))}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),d="nil";switch(t==i&&(d="none"),t==i-1&&(d="left"),t==i+1&&(d="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap&&(d="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap&&(d="right"),"nil"==d&&(d=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(d){case"left":jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(d){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:l+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-l+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(d){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(d){case"left":case"right":var s=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:l},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:s,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+(1-a)+"-"+p,t="#theslide"+a+"-"+p;jQuery(e).css({zIndex:80}),jQuery(t).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=wppaGetCurrentFullUrl(p,_wppaCurIdx[p]);""==i&&(i=_wppaShareUrl[p][_wppaCurIdx[p]]),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),_wppaSlides[p].length>1&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(w.length>0){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}jQuery(window).trigger("resize")}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e="theslide"+_wppaFg[p]+"-"+p,t="slide_frame-"+p,i=wppaColWidth[p],w=document.getElementById(a),r=jQuery(".wppa-audio-"+p);if(w){void 0!==i&&0!=i||(i=wppaGetContainerWidth(p),wppaColWidth[p]=i);var o=w.naturalWidth;void 0===o&&(o=parseInt(w.style.maxWidth));var n=w.naturalHeight;void 0===n&&(n=parseInt(w.style.maxHeight));var l=wppaAspectRatio[p],d=wppaFullSize[p],s=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,x,f,g,I,j=wppaStretch;if(u)c=i-s,h=0,S=0,x=i,g=i,I=f=(y=parseInt(c*n/o))+s,jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y});else{if(g=i,d<i&&(g=d),I=parseInt(g*l),x=g,f=I,j||o>=g-s||n>=I-s?(n+s)/(o+s)>l?(y=I-s,c=parseInt(y*o/n)):(c=g-s,y=parseInt(c*n/o)):(c=o,y=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(y+s))/2);break;case"bottom":S=I-(y+s);break;case"fit":S=0,I=y+s,f=y+s}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((i-g)/2);break;case"right":h=i-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+t).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-c)/2;Q&&Q>0&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v,N=parseInt(g/3),T=2*N;v=r.length>0?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i=_wppaIsVideo[p][e]?"video":"img",w="title";"wppa"==wppaLightBox[p]&&(w="data-lbtitle");var r=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+i+r+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var o="",n=0,l=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";n<e;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;for(o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]))+'" onclick="wppaStopAudio();wppaStopShow('+p+');" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+w+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>",n=e+1;n<_wppaUrl[p].length;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;t=o}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule)*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var e=_wppaCurIdx[p]-10;e<0&&(e=0);var t=_wppaCurIdx[p]+10;t>_wppaSlides[p].length&&(t=_wppaSlides[p].length);for(var i=0;i<_wppaSlides[p].length;){var w=jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html();w&&(e<=i<=t&&-1!=w.search("\x3c!--")&&(w=(w=w.replace("\x3c!--","")).replace("--\x3e",""),jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html(w)),""!=jQuery("#wppa-film-"+i+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==i?(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]))),i++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){(wppaSlideWrap||_wppaCurIdx[p]!=_wppaSlides[p].length-1)&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){(wppaSlideWrap||0!=_wppaCurIdx[p])&&(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}a>-1?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button","1.5em",!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}a>-1?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?_wppaTimeOut[p]>500&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||a>=(wppaFilmStripLength[p]/wppaThumbnailPitch[p]+1)/2&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r;if(void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(e=a.split("|"),a=e[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),wppaRatingOnce&&r>0)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=a-t,r=wppaStarOpacity+w*(1-wppaStarOpacity),o=wppaRatingMax;for(idx=1;idx<=o;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,r):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a||(a=_wppaId[p][_wppaCurIdx[p]]),jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap)return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap)return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}var wppaJsSlideshowVersion="6.7.01";wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,d,s,u,_,m,c,y,h,S,x,f,g,I,j,Q,b,v,N,T,C,k){var R;if(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":parseInt(h)>0?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),k.length>0&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]){var L;L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"}else _wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=r,_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=l,_wppaAvg[p][a]=d,_wppaDisc[p][a]=s,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=c,""!=y?_wppaLinkTarget[p][a]=y:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button","48px",!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button","48px",!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");(_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(_wppaSlides[p].length<2&&!_wppaFirst[p]||(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax&&(jQuery("[id^=wppa-numbar-"+p+"-]").html(" . "),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).html(" "+(_wppaNxtIdx[p]+1)+" ")),_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button","1.5em",!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button","1.5em",!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),wppaColWidth[p]=0,_wppaDoAutocol(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)))}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),d="nil";switch(t==i&&(d="none"),t==i-1&&(d="left"),t==i+1&&(d="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(d="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(d="right"),"nil"==d&&(d=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(d){case"left":jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(d){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:l+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-l+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(d){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(d){case"left":case"right":var s=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:l},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:s,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+(1-a)+"-"+p,t="#theslide"+a+"-"+p;jQuery(e).css({zIndex:80}),jQuery(t).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=wppaGetCurrentFullUrl(p,_wppaCurIdx[p]);""==i&&(i=_wppaShareUrl[p][_wppaCurIdx[p]]),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),_wppaSlides[p].length>1&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(w.length>0){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}jQuery(window).trigger("resize")}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e="theslide"+_wppaFg[p]+"-"+p,t="slide_frame-"+p,i=wppaColWidth[p],w=document.getElementById(a),r=jQuery(".wppa-audio-"+p);if(w){void 0!==i&&0!=i||(i=wppaGetContainerWidth(p),wppaColWidth[p]=i);var o=w.naturalWidth;void 0===o&&(o=parseInt(w.style.maxWidth));var n=w.naturalHeight;void 0===n&&(n=parseInt(w.style.maxHeight));var l=wppaAspectRatio[p],d=wppaFullSize[p],s=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,x,f,g,I,j=wppaStretch;if(u)c=i-s,h=0,S=0,x=i,g=i,I=f=(y=parseInt(c*n/o))+s,jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y});else{if(g=i,d<i&&(g=d),I=parseInt(g*l),x=g,f=I,j||o>=g-s||n>=I-s?(n+s)/(o+s)>l?(y=I-s,c=parseInt(y*o/n)):(c=g-s,y=parseInt(c*n/o)):(c=o,y=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(y+s))/2);break;case"bottom":S=I-(y+s);break;case"fit":S=0,I=y+s,f=y+s}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((i-g)/2);break;case"right":h=i-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+t).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-c)/2;Q&&Q>0&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v,N=parseInt(g/3),T=2*N;v=r.length>0?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i=_wppaIsVideo[p][e]?"video":"img",w="title";"wppa"==wppaLightBox[p]&&(w="data-lbtitle");var r=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+i+r+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var o="",n=0,l=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";n<e;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;for(o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]))+'" onclick="wppaStopAudio();wppaStopShow('+p+');" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+w+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>",n=e+1;n<_wppaUrl[p].length;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;t=o}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var e=_wppaCurIdx[p]-10;e<0&&(e=0);var t=_wppaCurIdx[p]+10;t>_wppaSlides[p].length&&(t=_wppaSlides[p].length);for(var i=0;i<_wppaSlides[p].length;){var w=jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html();w&&(e<=i<=t&&-1!=w.search("\x3c!--")&&(w=(w=w.replace("\x3c!--","")).replace("--\x3e",""),jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html(w)),""!=jQuery("#wppa-film-"+i+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==i?(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]))),i++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1)&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){(wppaSlideWrap[p]||0!=_wppaCurIdx[p])&&(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}a>-1?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button","1.5em",!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}a>-1?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?_wppaTimeOut[p]>500&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||a>=(wppaFilmStripLength[p]/wppaThumbnailPitch[p]+1)/2&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r;if(void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(e=a.split("|"),a=e[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),wppaRatingOnce&&r>0)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=a-t,r=wppaStarOpacity+w*(1-wppaStarOpacity),o=wppaRatingMax;for(idx=1;idx<=o;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,r):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a||(a=_wppaId[p][_wppaCurIdx[p]]),jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}var wppaJsSlideshowVersion="6.7.09";wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
js/wppa-tinymce-photo.js CHANGED
@@ -2,7 +2,7 @@
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
- * Version 6.7.08
6
  *
7
  */
8
 
@@ -18,7 +18,7 @@ tinymce.PluginManager.add('wppaphoto', function(editor, url) {
18
  tb_show( 'WPPA+ Insert photo', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=wppaphoto-form' );
19
  }
20
 
21
- editor.addButton('myphoto_button', {
22
  image: wppaImageDirectory+'camera32.png',
23
  tooltip: 'WPPA+ Insert photo',
24
  onclick: openWppaPhotoShortcodeGenerator
@@ -30,7 +30,13 @@ tinymce.PluginManager.add('wppaphoto', function(editor, url) {
30
  jQuery(function(){
31
 
32
  // creates a form to be displayed everytime the button is clicked
33
- var xmlhttp = wppaGetXmlHttp(); // located in wppa-admin-scripts.js
 
 
 
 
 
 
34
 
35
  // wppa-ajax.php calls wppa_make_tinymce_dialog(); which is located in wppa-tinymce.php
36
  var url = wppaAjaxUrl+'?action=wppa&wppa-action=tinymcephotodialog';
@@ -130,7 +136,7 @@ function wppaTinyMceBasicPhotoPreview( id ) {
130
  }
131
  else if ( id.indexOf('xxx') != -1 ) { // its a video
132
  var idv = id.replace('xxx', '');
133
- jQuery('#wppaphoto-photo-preview').html('<video preload="metadata" style="max-width:600px; max-height:150px; margin-top:3px;" controls>'+
134
  '<source src="'+wppaPhotoDirectory+idv+'mp4" type="video/mp4">'+
135
  '<source src="'+wppaPhotoDirectory+idv+'ogg" type="video/ogg">'+
136
  '<source src="'+wppaPhotoDirectory+idv+'ogv" type="video/ogg">'+
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
+ * Version 6.7.09
6
  *
7
  */
8
 
18
  tb_show( 'WPPA+ Insert photo', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=wppaphoto-form' );
19
  }
20
 
21
+ editor.addButton('wppa_photo_button', {
22
  image: wppaImageDirectory+'camera32.png',
23
  tooltip: 'WPPA+ Insert photo',
24
  onclick: openWppaPhotoShortcodeGenerator
30
  jQuery(function(){
31
 
32
  // creates a form to be displayed everytime the button is clicked
33
+ var xmlhttp;
34
+ if ( window.XMLHttpRequest ) { // code for IE7+, Firefox, Chrome, Opera, Safari
35
+ xmlhttp = new XMLHttpRequest();
36
+ }
37
+ else { // code for IE6, IE5
38
+ xmlhttp=new ActiveXObject( "Microsoft.XMLHTTP" );
39
+ }
40
 
41
  // wppa-ajax.php calls wppa_make_tinymce_dialog(); which is located in wppa-tinymce.php
42
  var url = wppaAjaxUrl+'?action=wppa&wppa-action=tinymcephotodialog';
136
  }
137
  else if ( id.indexOf('xxx') != -1 ) { // its a video
138
  var idv = id.replace('xxx', '');
139
+ jQuery('#wppaphoto-photo-preview').html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls>'+
140
  '<source src="'+wppaPhotoDirectory+idv+'mp4" type="video/mp4">'+
141
  '<source src="'+wppaPhotoDirectory+idv+'ogg" type="video/ogg">'+
142
  '<source src="'+wppaPhotoDirectory+idv+'ogv" type="video/ogg">'+
js/wppa-tinymce-photo.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function wppaPhotoEvaluate(){var o,e="[photo";o=wppaMyPhotoSelection?"my":"all",photo=jQuery("#wppaphoto-"+o+"photo").val(),wppaIsEmpty(photo)?jQuery("#wppaphoto-"+o+"photo").css("color","#700"):(id=photo.replace(/\//g,""),id=id.split("."),id=id[0],jQuery("#wppaphoto-photo-preview-tr").show(),wppaTinyMceBasicPhotoPreview(photo),e+=" "+id,jQuery("#wppaphoto-"+o+"photo").css("color","#070"));var t='<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+(e=(e+="]").replace(/"/g,"&quot;"))+'" />';jQuery("#wppaphoto-shortcode-preview-container").html(t),!wppaIsEmpty(photo)?(jQuery("#wppaphoto-submit").show(),jQuery("#wppaphoto-submit-notok").hide()):(jQuery("#wppaphoto-submit").hide(),jQuery("#wppaphoto-submit-notok").show())}function wppaTinyMceBasicPhotoPreview(o){if("#potd"==o)jQuery("#wppaphoto-photo-preview").html(wppaNoPreview);else if(-1!=o.indexOf("xxx")){var e=o.replace("xxx","");jQuery("#wppaphoto-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+e+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+e+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+e+'webm" type="video/webm"></video>')}else jQuery("#wppaphoto-photo-preview").html('<img src="'+wppaPhotoDirectory+o+'" style="max-width:400px; max-height:300px;" />')}function wppaDisplaySelectedFile(o,e){var t=jQuery("#"+o)[0].files[0].name;jQuery("#"+e).val("Upload "+t)}tinymce.PluginManager.add("wppaphoto",function(o,e){o.addButton("wppa_photo_button",{image:wppaImageDirectory+"camera32.png",tooltip:"WPPA+ Insert photo",onclick:function(){var o=jQuery(window).width(),e=jQuery(window).height(),t=720<o?720:o;t-=80,e=jQuery(window).height(),e-=120,tb_show("WPPA+ Insert photo","#TB_inline?width="+t+"&height="+e+"&inlineId=wppaphoto-form")}})}),jQuery(function(){var o;o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var e=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcephotodialog";o.open("GET",e,!0),o.send(),o.onreadystatechange=function(){if(4==o.readyState&&404!=o.status){var e=o.responseText,t=jQuery(e);t.find("table");t.appendTo("body").hide(),t.find("#wppaphoto-submit").click(function(){newShortcode=jQuery("#wppaphoto-shortcode-preview").val(),newShortcode=newShortcode.replace(/&quot;/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),wppaMyPhotoSelection=!0,jQuery("#wppaphoto-allphoto-tr").hide(),jQuery("#wppaphoto-myphoto-tr").show(),jQuery("#wppaphoto-photo-preview").html(""),tb_remove()})}}});var wppaMyPhotoSelection=!0;jQuery(function(){var o={beforeSend:function(){jQuery("#progress").show(),jQuery("#bar").width("0%"),jQuery("#message").html(""),jQuery("#percent").html("")},uploadProgress:function(o,e,t,p){jQuery("#bar").width(p+"%"),p<95?jQuery("#percent").html(p+"%"):jQuery("#percent").html(wppaTxtProcessing)},success:function(){jQuery("#bar").width("100%"),jQuery("#percent").html(wppaTxtDone)},complete:function(o){var e=o.responseText.split("||");1==e.length?jQuery("#message").html('<span style="font-size: 10px;" >'+e[0]+"</span>"):jQuery("#wppaphoto-myphoto").html(e[2]),wppaPhotoEvaluate()},error:function(){jQuery("#message").html('<span style="color: red;" >'+wppaTxtErrUnable+"</span>")}};setTimeout(function(){jQuery("#wppa-uplform").ajaxForm(o)},1e3)});
js/wppa-tinymce-shortcodes.js CHANGED
@@ -2,7 +2,7 @@
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
- * Version 6.7.07
6
  *
7
  */
8
 
@@ -18,7 +18,7 @@ tinymce.PluginManager.add('wppagallery', function(editor, url) {
18
  tb_show( 'WPPA+ Shortcode Generator', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=wppagallery-form' );
19
  }
20
 
21
- editor.addButton('mygallery_button', {
22
  image: wppaImageDirectory+'albumnew32.png',
23
  tooltip: 'WPPA+ Shortcode Generator',
24
  onclick: openWppaShortcodeGenerator
@@ -140,9 +140,19 @@ function wppaGalleryEvaluate() {
140
  var landing = '0';
141
  var rootalbum = '0';
142
  var admins = '';
 
 
 
 
 
 
 
143
 
144
  // Type
145
  topType = jQuery('#wppagallery-top-type').val();
 
 
 
146
  switch ( topType ) {
147
  case 'galerytype':
148
  jQuery('#wppagallery-galery-type-tr').show();
@@ -150,11 +160,7 @@ function wppaGalleryEvaluate() {
150
  needGalType = true;
151
  needAlbum = true;
152
  jQuery('#wppagallery-album-type-tr').show();
153
- jQuery('#wppagallery-top-type').css('color', '#070');
154
- if ( type == '' ) {
155
- jQuery('#wppagallery-galery-type').css('color', '#700');
156
- }
157
- else {
158
  jQuery('#wppagallery-galery-type').css('color', '#070');
159
  galType = type;
160
  }
@@ -165,11 +171,7 @@ function wppaGalleryEvaluate() {
165
  needSlideType = true;
166
  needAlbum = true;
167
  jQuery('#wppagallery-album-type-tr').show();
168
- jQuery('#wppagallery-top-type').css('color', '#070');
169
- if ( type == '' ) {
170
- jQuery('#wppagallery-slides-type').css('color', '#700');
171
- }
172
- else {
173
  jQuery('#wppagallery-slides-type').css('color', '#070');
174
  slideType = type;
175
  }
@@ -179,17 +181,24 @@ function wppaGalleryEvaluate() {
179
  type = jQuery('#wppagallery-single-type').val();
180
  needPhoto = true;
181
  jQuery('#wppagallery-photo-tr').show();
182
- jQuery('#wppagallery-top-type').css('color', '#070');
 
 
183
  break;
184
  case 'searchtype':
185
  jQuery('#wppagallery-search-type-tr').show();
186
  type = jQuery('#wppagallery-search-type').val();
187
  needSearchType = true;
188
  searchType = type;
 
 
 
189
  switch ( type ) {
190
  case 'search':
191
  jQuery('#wppagallery-search-tr').show();
192
- if ( jQuery('#wppagallery-root').attr('checked') == 'checked' ) jQuery('#wppagallery-rootalbum-tr').show();
 
 
193
  rootalbum = jQuery('#wppagallery-rootalbum').val();
194
  jQuery('#wppagallery-landing-tr').show();
195
  landing = jQuery('#wppagallery-landing').val();
@@ -199,8 +208,8 @@ function wppaGalleryEvaluate() {
199
  case 'tagcloud':
200
  case 'multitag':
201
  jQuery('#wppagallery-taglist-tr').show();
202
- alltags = jQuery('#wppagallery-alltags').attr('checked');
203
- if ( alltags != 'checked' ) {
204
  needTagList = true;
205
  jQuery('#wppagallery-seltags').show();
206
  t = jQuery('.wppagallery-taglist-tags');
@@ -215,12 +224,6 @@ function wppaGalleryEvaluate() {
215
  i++;
216
  }
217
  taglist = wppaArrayToEnum( tagarr, ',' );
218
- if ( taglist == '' ) {
219
- jQuery('.wppagallery-tags').css('color', '#700');
220
- }
221
- else {
222
- jQuery('.wppagallery-tags').css('color', '#070');
223
- }
224
  }
225
  break;
226
  case 'superview':
@@ -231,24 +234,20 @@ function wppaGalleryEvaluate() {
231
  jQuery('#wppagallery-calendar-tr').show();
232
  jQuery('#wppagallery-album-super-tr').show(); // Optional parent album
233
  caltype = jQuery('#wppagallery-calendar-type').val();
234
- reverse = jQuery('#wppagallery-calendar-reverse').attr('checked');
235
- allopen = jQuery('#wppagallery-calendar-allopen').attr('checked');
236
  parent = jQuery('#wppagallery-album-super-parent').val();
237
  break;
238
  default:
239
  }
240
- jQuery('#wppagallery-top-type').css('color', '#070');
241
- if ( type == '' ) {
242
- jQuery('#wppagallery-search-type').css('color', '#700');
243
- }
244
- else {
245
- jQuery('#wppagallery-search-type').css('color', '#070');
246
- }
247
  break;
248
  case 'misceltype':
249
  jQuery('#wppagallery-miscel-type-tr').show();
250
  type = jQuery('#wppagallery-miscel-type').val();
251
  needMiscType = true;
 
 
 
252
  switch ( type ) {
253
  case 'generic':
254
  case 'upload':
@@ -263,67 +262,58 @@ function wppaGalleryEvaluate() {
263
  break;
264
  default:
265
  }
266
- jQuery('#wppagallery-top-type').css('color', '#070');
267
- if ( type == '' ) {
268
- jQuery('#wppagallery-miscel-type').css('color', '#700');
269
- }
270
- else {
271
- jQuery('#wppagallery-miscel-type').css('color', '#070');
272
- }
273
  break;
274
  default:
275
- jQuery('#wppagallery-top-type').css('color', '#700');
276
  }
277
- if ( type != null && type != '' ) {
278
  shortcode += ' type="'+type+'"';
279
  }
280
- else {
281
- }
282
 
283
  // Album
284
  if ( needAlbum ) {
285
  albumType = jQuery('#wppagallery-album-type').val();
 
 
 
286
  switch ( albumType ) {
287
  case 'real':
288
  jQuery('#wppagallery-album-real-tr').show();
289
  jQuery('#wppagallery-album-real-search-tr').show();
290
- // Not many albums
291
- if ( jQuery('#wppagallery-album-real-search').val() ) {
292
- var s = jQuery('#wppagallery-album-real-search').val().toLowerCase();
293
- if ( s != '' ) {
294
- albums = jQuery('.wppagallery-album-r');
295
- if ( albums.length > 0 ) {
296
- var i = 0;
297
- while ( i < albums.length ) {
298
- var a = albums[i].innerHTML.toLowerCase();
299
- if ( a.search( s ) == -1 ) {
300
- jQuery( albums[i] ).removeAttr( 'selected' );
301
- jQuery( albums[i] ).hide();
 
 
 
 
 
 
 
302
  }
303
- else {
304
- jQuery( albums[i] ).show();
305
- }
306
- i++;
307
  }
308
  }
309
  }
310
  else {
311
  jQuery('.wppagallery-album-r').show();
312
  }
313
- album = wppaGetSelectionEnumByClass('.wppagallery-album-r');
314
- }
315
- // Many albums
316
- else {
317
- album = jQuery('#wppagallery-album-real').val();
318
- if ( album.indexOf(',') != -1 ) {
319
- parr = album.split(',');
320
- album = wppaArrayToEnum( parr, '.' );
321
- }
322
- }
323
- if ( album != '' ) {
324
- jQuery('#wppagallery-album-type').css('color', '#070');
325
  }
 
 
 
 
 
 
326
  break;
 
327
  case 'virtual':
328
 
329
  // Open the right selection box dependant of type is cover or not
@@ -339,7 +329,8 @@ function wppaGalleryEvaluate() {
339
 
340
  // Now displatch on album identifier found
341
  // and get the (optional) additional data
342
- if ( album != '' ) {
 
343
  switch ( album ) {
344
  case '#topten':
345
  case '#lasten':
@@ -350,7 +341,7 @@ function wppaGalleryEvaluate() {
350
  // We use parent here for optional album(s), because album is already used for virtual album type
351
  // Not many albums
352
  if ( jQuery('.wppagallery-album-ropt').length > 0 ) {
353
- parent = wppaGetSelectionEnumByClass('.wppagallery-album-ropt');
354
  }
355
  else {
356
  parent = jQuery('#wppagallery-album-realopt').val();
@@ -367,7 +358,7 @@ function wppaGalleryEvaluate() {
367
  jQuery('#wppagallery-phototags-tr').show();
368
  jQuery('#wppagallery-tags-cats-tr').show();
369
  andor = jQuery('[name=andor]:checked').val();
370
- if ( ! andor ) jQuery('#wppagallery-or').attr( 'checked', 'checked' );
371
  andor = jQuery('[name=andor]:checked').val();
372
  if ( andor == 'or' ) sep = ';';
373
  else sep = ',';
@@ -384,9 +375,6 @@ function wppaGalleryEvaluate() {
384
  i++;
385
  }
386
  tags = wppaArrayToEnum( tagarr, sep );
387
- if ( tags != '' ) {
388
- jQuery('.wppagallery-phototags').css('color', '#070');
389
- }
390
  break;
391
  case '#last':
392
  jQuery('#wppagallery-album-parent-tr').show();
@@ -398,7 +386,7 @@ function wppaGalleryEvaluate() {
398
  jQuery('#wppagallery-albumcat-tr').show();
399
  jQuery('#wppagallery-tags-cats-tr').show();
400
  andor = jQuery('[name=andor]:checked').val();
401
- if ( ! andor ) jQuery('#wppagallery-or').attr( 'checked', 'checked' );
402
  andor = jQuery('[name=andor]:checked').val();
403
  if ( andor == 'or' ) sep = ';';
404
  else sep = ',';
@@ -415,20 +403,17 @@ function wppaGalleryEvaluate() {
415
  i++;
416
  }
417
  cats = wppaArrayToEnum( catarr, sep );
418
- if ( cats != '' ) {
419
- jQuery('#wppagallery-albumcat').css('color', '#070');
420
- }
421
  break;
422
  case '#owner':
423
  case '#upldr':
424
  jQuery('#wppagallery-owner-tr').show();
425
- jQuery('#wppagallery-owner').css('color', '#700');
426
  needOwner = true;
427
  owner = jQuery('#wppagallery-owner').val();
428
- if ( owner != '' ) {
429
- jQuery('#wppagallery-owner').css('color', '#070');
430
  jQuery('#wppagallery-owner-parent-tr').show();
431
- parent = wppaGetSelectionEnumByClass('.wppagallery-album-p');
 
432
  }
433
  break;
434
  case '#all':
@@ -445,29 +430,16 @@ function wppaGalleryEvaluate() {
445
  ( album != '#lasten' || parent != '' ) &&
446
  ( album != '#comten' || parent != '' ) &&
447
  ( album != '#featen' || parent != '' ) ) {
448
- jQuery('#wppagallery-album-type').css('color', '#070');
449
  }
450
  }
451
  break;
452
  default:
453
- jQuery('#wppagallery-album-type').css('color', '#700');
454
  album = '';
455
  }
456
  }
457
 
458
- // No album specified
459
- if ( album == '' ) {
460
- jQuery('#wppagallery-album-real').css('color', '#700');
461
- jQuery('#wppagallery-album-virt').css('color', '#700');
462
- jQuery('#wppagallery-album-virt-cover').css('color', '#700');
463
- }
464
-
465
  // Add album specs to shortcode
466
- else {
467
- jQuery('#wppagallery-album-real').css('color', '#070');
468
- jQuery('#wppagallery-album-parent').css('color', '#070');
469
- jQuery('#wppagallery-album-virt').css('color', '#070');
470
- jQuery('#wppagallery-album-virt-cover').css('color', '#070');
471
  shortcode += ' album="'+album;
472
  if ( owner != '' ) shortcode += ','+owner;
473
  if ( parent == '' && count != '' ) parent = '0';
@@ -490,17 +462,14 @@ function wppaGalleryEvaluate() {
490
  shortcode += ' photo="'+id+'"';
491
  jQuery('#wppagallery-photo').css('color', '#070');
492
  }
493
- else {
494
- jQuery('#wppagallery-photo').css('color', '#700');
495
- }
496
  }
497
 
498
  // Search options
499
  if ( type == 'search' ) {
500
- sub = jQuery('#wppagallery-sub').attr('checked');
501
- root = jQuery('#wppagallery-root').attr('checked');
502
- if ( sub == 'checked' ) shortcode += ' sub="1"';
503
- if ( root == 'checked' ) {
504
  if ( rootalbum != '0' ) shortcode += ' root="#'+rootalbum+'"';
505
  else shortcode += ' root="1"';
506
  }
@@ -533,19 +502,24 @@ function wppaGalleryEvaluate() {
533
 
534
  // Size
535
  var size = document.getElementById('wppagallery-size').value;
536
- // Assume valid imput
537
- jQuery('#wppagallery-size').css('color', '#070');
538
  // See if auto with fixed max
539
  var temp = size.split(',');
540
  if ( temp[1] ) {
541
  if ( temp[0] == 'auto' && parseInt( temp[1] ) == temp[1] && temp[1] > 100 ) {
 
542
  // its ok, auto with a static max of size temp[1]
 
543
  }
544
  else {
 
 
545
  size = 0;
546
  jQuery('#wppagallery-size').css('color', '#700');
547
  }
548
  }
 
 
549
  else {
550
  if ( size != '' && size != 'auto' ) {
551
  if ( parseInt(size) != size ) {
@@ -559,13 +533,16 @@ function wppaGalleryEvaluate() {
559
  if ( size < 100 ) {
560
  size = size / 100;
561
  }
 
562
  }
 
 
563
  if ( size != 0 ) {
564
  shortcode += ' size="'+size+'"';
565
  }
566
 
567
  // Align
568
- var align = document.getElementById('wppagallery-align').value;
569
  if ( align != 'none' ) {
570
  shortcode += ' align="'+align+'"';
571
  }
@@ -583,8 +560,8 @@ function wppaGalleryEvaluate() {
583
 
584
  // Display shortcode
585
  shortcode = shortcode.replace(/"/g, '&quot;');
586
- var html = '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+shortcode+'" />';
587
- document.getElementById('wppagallery-shortcode-preview-container').innerHTML = html;
588
 
589
  // Is shortcode complete?
590
  shortcodeOk = ( album != '' || ! needAlbum ) &&
@@ -631,7 +608,7 @@ function wppaTinyMcePhotoPreview( id ) {
631
  }
632
  else if ( id.indexOf('xxx') != -1 ) { // its a video
633
  var idv = id.replace('xxx', '');
634
- jQuery('#wppagallery-photo-preview').html('<video preload="metadata" style="max-width:600px; max-height:150px; margin-top:3px;" controls>'+
635
  '<source src="'+wppaPhotoDirectory+idv+'mp4" type="video/mp4">'+
636
  '<source src="'+wppaPhotoDirectory+idv+'ogg" type="video/ogg">'+
637
  '<source src="'+wppaPhotoDirectory+idv+'ogv" type="video/ogg">'+
2
  * Pachkage: wp-photo-album-plus
3
  *
4
  *
5
+ * Version 6.7.09
6
  *
7
  */
8
 
18
  tb_show( 'WPPA+ Shortcode Generator', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=wppagallery-form' );
19
  }
20
 
21
+ editor.addButton('wppa_gallery_button', {
22
  image: wppaImageDirectory+'albumnew32.png',
23
  tooltip: 'WPPA+ Shortcode Generator',
24
  onclick: openWppaShortcodeGenerator
140
  var landing = '0';
141
  var rootalbum = '0';
142
  var admins = '';
143
+ var align = 'none';
144
+ var html = '';
145
+
146
+ // Init colors of <select> tags
147
+ jQuery( 'select' ).css( 'color', '#700' );
148
+ jQuery( '#wppagallery-album-parent-parent' ).css( 'color', '#070' );
149
+ jQuery( '#wppagallery-align' ).css( 'color', '#070' );
150
 
151
  // Type
152
  topType = jQuery('#wppagallery-top-type').val();
153
+ if ( ! wppaIsEmpty( topType ) ) {
154
+ jQuery('#wppagallery-top-type').css('color', '#070');
155
+ }
156
  switch ( topType ) {
157
  case 'galerytype':
158
  jQuery('#wppagallery-galery-type-tr').show();
160
  needGalType = true;
161
  needAlbum = true;
162
  jQuery('#wppagallery-album-type-tr').show();
163
+ if ( ! wppaIsEmpty( type ) ) {
 
 
 
 
164
  jQuery('#wppagallery-galery-type').css('color', '#070');
165
  galType = type;
166
  }
171
  needSlideType = true;
172
  needAlbum = true;
173
  jQuery('#wppagallery-album-type-tr').show();
174
+ if ( ! wppaIsEmpty( type ) ) {
 
 
 
 
175
  jQuery('#wppagallery-slides-type').css('color', '#070');
176
  slideType = type;
177
  }
181
  type = jQuery('#wppagallery-single-type').val();
182
  needPhoto = true;
183
  jQuery('#wppagallery-photo-tr').show();
184
+ if ( ! wppaIsEmpty( type ) ) {
185
+ jQuery('#wppagallery-single-type').css('color', '#070');
186
+ }
187
  break;
188
  case 'searchtype':
189
  jQuery('#wppagallery-search-type-tr').show();
190
  type = jQuery('#wppagallery-search-type').val();
191
  needSearchType = true;
192
  searchType = type;
193
+ if ( ! wppaIsEmpty( type ) ) {
194
+ jQuery('#wppagallery-search-type').css('color', '#070');
195
+ }
196
  switch ( type ) {
197
  case 'search':
198
  jQuery('#wppagallery-search-tr').show();
199
+ if ( jQuery('#wppagallery-root').prop('checked') ) {
200
+ jQuery('#wppagallery-rootalbum-tr').show();
201
+ }
202
  rootalbum = jQuery('#wppagallery-rootalbum').val();
203
  jQuery('#wppagallery-landing-tr').show();
204
  landing = jQuery('#wppagallery-landing').val();
208
  case 'tagcloud':
209
  case 'multitag':
210
  jQuery('#wppagallery-taglist-tr').show();
211
+ alltags = jQuery('#wppagallery-alltags').prop('checked');
212
+ if ( ! alltags ) {
213
  needTagList = true;
214
  jQuery('#wppagallery-seltags').show();
215
  t = jQuery('.wppagallery-taglist-tags');
224
  i++;
225
  }
226
  taglist = wppaArrayToEnum( tagarr, ',' );
 
 
 
 
 
 
227
  }
228
  break;
229
  case 'superview':
234
  jQuery('#wppagallery-calendar-tr').show();
235
  jQuery('#wppagallery-album-super-tr').show(); // Optional parent album
236
  caltype = jQuery('#wppagallery-calendar-type').val();
237
+ reverse = jQuery('#wppagallery-calendar-reverse').prop('checked');
238
+ allopen = jQuery('#wppagallery-calendar-allopen').prop('checked');
239
  parent = jQuery('#wppagallery-album-super-parent').val();
240
  break;
241
  default:
242
  }
 
 
 
 
 
 
 
243
  break;
244
  case 'misceltype':
245
  jQuery('#wppagallery-miscel-type-tr').show();
246
  type = jQuery('#wppagallery-miscel-type').val();
247
  needMiscType = true;
248
+ if ( ! wppaIsEmpty( type ) ) {
249
+ jQuery('#wppagallery-miscel-type').css('color', '#070');
250
+ }
251
  switch ( type ) {
252
  case 'generic':
253
  case 'upload':
262
  break;
263
  default:
264
  }
 
 
 
 
 
 
 
265
  break;
266
  default:
 
267
  }
268
+ if ( ! wppaIsEmpty( type ) ) {
269
  shortcode += ' type="'+type+'"';
270
  }
 
 
271
 
272
  // Album
273
  if ( needAlbum ) {
274
  albumType = jQuery('#wppagallery-album-type').val();
275
+ if ( ! wppaIsEmpty( albumType ) ) {
276
+ jQuery( '#wppagallery-album-type' ).css('color', '#070');
277
+ }
278
  switch ( albumType ) {
279
  case 'real':
280
  jQuery('#wppagallery-album-real-tr').show();
281
  jQuery('#wppagallery-album-real-search-tr').show();
282
+
283
+ // WPPA has Not many albums, there is a quick select box. If used, ...val() is not empty,
284
+ if ( jQuery('#wppagallery-album-real-search') ) {
285
+ if ( jQuery('#wppagallery-album-real-search').val() ) {
286
+ var s = jQuery('#wppagallery-album-real-search').val().toLowerCase();
287
+ if ( ! wppaIsEmpty( s ) ) {
288
+ albums = jQuery('.wppagallery-album-r');
289
+ if ( albums.length > 0 ) {
290
+ var i = 0;
291
+ while ( i < albums.length ) {
292
+ var a = albums[i].innerHTML.toLowerCase();
293
+ if ( a.search( s ) == -1 ) {
294
+ jQuery( albums[i] ).removeAttr( 'selected' );
295
+ jQuery( albums[i] ).hide();
296
+ }
297
+ else {
298
+ jQuery( albums[i] ).show();
299
+ }
300
+ i++;
301
  }
 
 
 
 
302
  }
303
  }
304
  }
305
  else {
306
  jQuery('.wppagallery-album-r').show();
307
  }
 
 
 
 
 
 
 
 
 
 
 
 
308
  }
309
+
310
+ // Get the selected album(s)
311
+ album = jQuery('#wppagallery-album-real').val();
312
+
313
+ // Make sure right delimiter
314
+ album = album.toString().replace( /,/g, '.' );
315
  break;
316
+
317
  case 'virtual':
318
 
319
  // Open the right selection box dependant of type is cover or not
329
 
330
  // Now displatch on album identifier found
331
  // and get the (optional) additional data
332
+ if ( ! wppaIsEmpty( album ) ) {
333
+ jQuery('#wppagallery-album-virt').css('color', '#070');
334
  switch ( album ) {
335
  case '#topten':
336
  case '#lasten':
341
  // We use parent here for optional album(s), because album is already used for virtual album type
342
  // Not many albums
343
  if ( jQuery('.wppagallery-album-ropt').length > 0 ) {
344
+ parent = wppaGetSelectionEnumByClass('.wppagallery-album-ropt', '.');
345
  }
346
  else {
347
  parent = jQuery('#wppagallery-album-realopt').val();
358
  jQuery('#wppagallery-phototags-tr').show();
359
  jQuery('#wppagallery-tags-cats-tr').show();
360
  andor = jQuery('[name=andor]:checked').val();
361
+ if ( ! andor ) jQuery('#wppagallery-or').prop( 'checked', true );
362
  andor = jQuery('[name=andor]:checked').val();
363
  if ( andor == 'or' ) sep = ';';
364
  else sep = ',';
375
  i++;
376
  }
377
  tags = wppaArrayToEnum( tagarr, sep );
 
 
 
378
  break;
379
  case '#last':
380
  jQuery('#wppagallery-album-parent-tr').show();
386
  jQuery('#wppagallery-albumcat-tr').show();
387
  jQuery('#wppagallery-tags-cats-tr').show();
388
  andor = jQuery('[name=andor]:checked').val();
389
+ if ( ! andor ) jQuery('#wppagallery-or').prop( 'checked', true );
390
  andor = jQuery('[name=andor]:checked').val();
391
  if ( andor == 'or' ) sep = ';';
392
  else sep = ',';
403
  i++;
404
  }
405
  cats = wppaArrayToEnum( catarr, sep );
 
 
 
406
  break;
407
  case '#owner':
408
  case '#upldr':
409
  jQuery('#wppagallery-owner-tr').show();
 
410
  needOwner = true;
411
  owner = jQuery('#wppagallery-owner').val();
412
+ if ( ! wppaIsEmpty( owner ) ) {
413
+ jQuery( '#wppagallery-owner' ).css( 'color', '#070' );
414
  jQuery('#wppagallery-owner-parent-tr').show();
415
+ parent = wppaGetSelectionEnumByClass('.wppagallery-album-p', '.');
416
+ parent = parent.toString().replace( 'zero', '0' );
417
  }
418
  break;
419
  case '#all':
430
  ( album != '#lasten' || parent != '' ) &&
431
  ( album != '#comten' || parent != '' ) &&
432
  ( album != '#featen' || parent != '' ) ) {
 
433
  }
434
  }
435
  break;
436
  default:
 
437
  album = '';
438
  }
439
  }
440
 
 
 
 
 
 
 
 
441
  // Add album specs to shortcode
442
+ if ( ! wppaIsEmpty( album ) ) {
 
 
 
 
443
  shortcode += ' album="'+album;
444
  if ( owner != '' ) shortcode += ','+owner;
445
  if ( parent == '' && count != '' ) parent = '0';
462
  shortcode += ' photo="'+id+'"';
463
  jQuery('#wppagallery-photo').css('color', '#070');
464
  }
 
 
 
465
  }
466
 
467
  // Search options
468
  if ( type == 'search' ) {
469
+ sub = jQuery('#wppagallery-sub').prop('checked');
470
+ root = jQuery('#wppagallery-root').prop('checked');
471
+ if ( sub ) shortcode += ' sub="1"';
472
+ if ( root ) {
473
  if ( rootalbum != '0' ) shortcode += ' root="#'+rootalbum+'"';
474
  else shortcode += ' root="1"';
475
  }
502
 
503
  // Size
504
  var size = document.getElementById('wppagallery-size').value;
505
+
 
506
  // See if auto with fixed max
507
  var temp = size.split(',');
508
  if ( temp[1] ) {
509
  if ( temp[0] == 'auto' && parseInt( temp[1] ) == temp[1] && temp[1] > 100 ) {
510
+
511
  // its ok, auto with a static max of size temp[1]
512
+ jQuery('#wppagallery-size').css('color', '#070');
513
  }
514
  else {
515
+
516
+ // Not ok
517
  size = 0;
518
  jQuery('#wppagallery-size').css('color', '#700');
519
  }
520
  }
521
+
522
+ // Numeric?
523
  else {
524
  if ( size != '' && size != 'auto' ) {
525
  if ( parseInt(size) != size ) {
533
  if ( size < 100 ) {
534
  size = size / 100;
535
  }
536
+ jQuery('#wppagallery-size').css('color', '#070');
537
  }
538
+
539
+ // Add size to shortcode
540
  if ( size != 0 ) {
541
  shortcode += ' size="'+size+'"';
542
  }
543
 
544
  // Align
545
+ align = jQuery('#wppagallery-align').val();
546
  if ( align != 'none' ) {
547
  shortcode += ' align="'+align+'"';
548
  }
560
 
561
  // Display shortcode
562
  shortcode = shortcode.replace(/"/g, '&quot;');
563
+ html = '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+shortcode+'" />';
564
+ jQuery('#wppagallery-shortcode-preview-container').html( html );
565
 
566
  // Is shortcode complete?
567
  shortcodeOk = ( album != '' || ! needAlbum ) &&
608
  }
609
  else if ( id.indexOf('xxx') != -1 ) { // its a video
610
  var idv = id.replace('xxx', '');
611
+ jQuery('#wppagallery-photo-preview').html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls>'+
612
  '<source src="'+wppaPhotoDirectory+idv+'mp4" type="video/mp4">'+
613
  '<source src="'+wppaPhotoDirectory+idv+'ogg" type="video/ogg">'+
614
  '<source src="'+wppaPhotoDirectory+idv+'ogv" type="video/ogg">'+
js/wppa-tinymce-shortcodes.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function wppaGalleryEvaluate(){var e=!0;jQuery("#wppagallery-galery-type-tr").hide(),jQuery("#wppagallery-slides-type-tr").hide(),jQuery("#wppagallery-single-type-tr").hide(),jQuery("#wppagallery-search-type-tr").hide(),jQuery("#wppagallery-miscel-type-tr").hide(),jQuery("#wppagallery-album-type-tr").hide(),jQuery("#wppagallery-album-real-tr").hide(),jQuery("#wppagallery-album-real-search-tr").hide(),jQuery("#wppagallery-album-realopt-tr").hide(),jQuery("#wppagallery-album-virt-tr").hide(),jQuery("#wppagallery-album-virt-cover-tr").hide(),jQuery("#wppagallery-owner-tr").hide(),jQuery("#wppagallery-owner-parent-tr").hide(),jQuery("#wppagallery-album-parent-tr").hide(),jQuery("#wppagallery-album-count-tr").hide(),jQuery("#wppagallery-photo-count-tr").hide(),jQuery("#wppagallery-albumcat-tr").hide(),jQuery("#wppagallery-photo-tr").hide(),jQuery("#wppagallery-photo-preview-tr").hide(),jQuery("#wppagallery-phototags-tr").hide(),jQuery("#wppagallery-search-tr").hide(),jQuery("#wppagallery-taglist-tr").hide(),jQuery("#wppagallery-album-super-tr").hide(),jQuery("#wppagallery-calendar-tr").hide(),jQuery("#wppagallery-tags-cats-tr").hide(),jQuery("#wppagallery-landing-tr").hide(),jQuery("#wppagallery-rootalbum-tr").hide(),jQuery("#wppagallery-admins-tr").hide();var a,r,l="[wppa",p="",t="",y="",o="",u="",s="",w="",c="",g="",i="",h="",n="",d="",j="",Q=!1,m=!1,b=!1,v=!1,k=!1,f=!1,E=!1,x=!1,I=!1,P=!1,T="",S="",N="",A="",B="",C=!1,G=!1,z="",D="0",M="0",_="",q="none",L="";switch(jQuery("select").css("color","#700"),jQuery("#wppagallery-album-parent-parent").css("color","#070"),jQuery("#wppagallery-align").css("color","#070"),p=jQuery("#wppagallery-top-type").val(),wppaIsEmpty(p)||jQuery("#wppagallery-top-type").css("color","#070"),p){case"galerytype":jQuery("#wppagallery-galery-type-tr").show(),t=jQuery("#wppagallery-galery-type").val(),Q=!0,b=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(t)||(jQuery("#wppagallery-galery-type").css("color","#070"),y=t);break;case"slidestype":jQuery("#wppagallery-slides-type-tr").show(),t=jQuery("#wppagallery-slides-type").val(),m=!0,b=!0,jQuery("#wppagallery-album-type-tr").show(),wppaIsEmpty(t)||(jQuery("#wppagallery-slides-type").css("color","#070"),o=t);break;case"singletype":jQuery("#wppagallery-single-type-tr").show(),t=jQuery("#wppagallery-single-type").val(),v=!0,jQuery("#wppagallery-photo-tr").show(),wppaIsEmpty(t)||jQuery("#wppagallery-single-type").css("color","#070");break;case"searchtype":switch(jQuery("#wppagallery-search-type-tr").show(),t=jQuery("#wppagallery-search-type").val(),I=!0,s=t,wppaIsEmpty(t)||jQuery("#wppagallery-search-type").css("color","#070"),t){case"search":jQuery("#wppagallery-search-tr").show(),jQuery("#wppagallery-root").prop("checked")&&jQuery("#wppagallery-rootalbum-tr").show(),M=jQuery("#wppagallery-rootalbum").val(),jQuery("#wppagallery-landing-tr").show(),D=jQuery("#wppagallery-landing").val();break;case"supersearch":break;case"tagcloud":case"multitag":if(jQuery("#wppagallery-taglist-tr").show(),!jQuery("#wppagallery-alltags").prop("checked")){E=!0,jQuery("#wppagallery-seltags").show(),r=jQuery(".wppagallery-taglist-tags");R=[];for(O=0,a=0;O<r.length;)r[O].selected&&(R[a]=r[O].value,a++),O++;T=wppaArrayToEnum(R,",")}break;case"superview":jQuery("#wppagallery-album-super-tr").show(),c=jQuery("#wppagallery-album-super-parent").val();break;case"calendar":jQuery("#wppagallery-calendar-tr").show(),jQuery("#wppagallery-album-super-tr").show(),B=jQuery("#wppagallery-calendar-type").val(),C=jQuery("#wppagallery-calendar-reverse").prop("checked"),G=jQuery("#wppagallery-calendar-allopen").prop("checked"),g=jQuery("#wppagallery-album-super-parent").val()}break;case"misceltype":switch(jQuery("#wppagallery-miscel-type-tr").show(),t=jQuery("#wppagallery-miscel-type").val(),P=!0,wppaIsEmpty(t)||jQuery("#wppagallery-miscel-type").css("color","#070"),t){case"generic":case"upload":case"landing":case"stereo":w=t;break;case"choice":w=t,jQuery("#wppagallery-admins-tr").show(),_=wppaGetSelectionEnumByClass(".wppagallery-admin",",")}}if(wppaIsEmpty(t)||(l+=' type="'+t+'"'),b)switch(u=jQuery("#wppagallery-album-type").val(),wppaIsEmpty(u)||jQuery("#wppagallery-album-type").css("color","#070"),u){case"real":if(jQuery("#wppagallery-album-real-tr").show(),jQuery("#wppagallery-album-real-search-tr").show(),jQuery("#wppagallery-album-real-search"))if(jQuery("#wppagallery-album-real-search").val()){var H=jQuery("#wppagallery-album-real-search").val().toLowerCase();if(!wppaIsEmpty(H)&&(albums=jQuery(".wppagallery-album-r"),albums.length>0))for(var O=0;O<albums.length;)-1==albums[O].innerHTML.toLowerCase().search(H)?(jQuery(albums[O]).removeAttr("selected"),jQuery(albums[O]).hide()):jQuery(albums[O]).show(),O++}else jQuery(".wppagallery-album-r").show();c=(c=jQuery("#wppagallery-album-real").val()).toString().replace(/,/g,".");break;case"virtual":if("cover"==t?(jQuery("#wppagallery-album-virt-cover-tr").show(),c=jQuery("#wppagallery-album-virt-cover").val()):(jQuery("#wppagallery-album-virt-tr").show(),c=jQuery("#wppagallery-album-virt").val()),!wppaIsEmpty(c))switch(jQuery("#wppagallery-album-virt").css("color","#070"),c){case"#topten":case"#lasten":case"#featen":case"#comten":jQuery("#wppagallery-album-realopt-tr").show(),jQuery(".wppagallery-album-ropt").length>0?g=wppaGetSelectionEnumByClass(".wppagallery-album-ropt","."):-1!=(g=jQuery("#wppagallery-album-realopt").val()).indexOf(",")&&(parr=g.split(","),g=wppaArrayToEnum(parr,".")),""==g&&(g="0"),jQuery("#wppagallery-photo-count-tr").show(),i=jQuery("#wppagallery-photo-count").val();break;case"#tags":jQuery("#wppagallery-phototags-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),z="or"==jQuery("[name=andor]:checked").val()?";":",",f=!0,r=jQuery(".wppagallery-phototags");var R=[];for(O=0,a=0;O<r.length;)r[O].selected&&(R[a]=r[O].value,a++),O++;N=wppaArrayToEnum(R,z);break;case"#last":jQuery("#wppagallery-album-parent-tr").show(),g=jQuery("#wppagallery-album-parent-parent").val(),jQuery("#wppagallery-album-count-tr").show(),i=jQuery("#wppagallery-album-count").val();break;case"#cat":jQuery("#wppagallery-albumcat-tr").show(),jQuery("#wppagallery-tags-cats-tr").show(),jQuery("[name=andor]:checked").val()||jQuery("#wppagallery-or").prop("checked",!0),z="or"==jQuery("[name=andor]:checked").val()?";":",",x=!0,r=jQuery(".wppagallery-albumcat");var U=[];for(O=0,a=0;O<r.length;)r[O].selected&&(U[a]=r[O].value,a++),O++;A=wppaArrayToEnum(U,z);break;case"#owner":case"#upldr":jQuery("#wppagallery-owner-tr").show(),k=!0,S=jQuery("#wppagallery-owner").val(),wppaIsEmpty(S)||(jQuery("#wppagallery-owner").css("color","#070"),jQuery("#wppagallery-owner-parent-tr").show(),g=(g=wppaGetSelectionEnumByClass(".wppagallery-album-p",".")).toString().replace("zero","0"));break;case"#all":break;default:null!=c&&alert(wppaUIERR+": "+c)}break;default:c=""}wppaIsEmpty(c)||(l+=' album="'+c,""!=S&&(l+=","+S),""==g&&""!=i&&(g="0"),""!=g&&(l+=","+g),""!=i&&(l+=","+i),""!=N&&(l+=","+N),""!=A&&(l+=","+A),l+='"'),v&&(h=jQuery("#wppagallery-photo").val())&&(n=(n=(n=h.replace(/\//g,"")).split("."))[0],jQuery("#wppagallery-photo-preview-tr").show(),wppaTinyMcePhotoPreview(h),l+=' photo="'+n+'"',jQuery("#wppagallery-photo").css("color","#070")),"search"==t&&(d=jQuery("#wppagallery-sub").prop("checked"),j=jQuery("#wppagallery-root").prop("checked"),d&&(l+=' sub="1"'),j&&(l+="0"!=M?' root="#'+M+'"':' root="1"'),"0"!=D&&(l+=' landing="'+D+'"')),"tagcloud"!=t&&"multitag"!=t||""!=T&&(l+=' taglist="'+T+'"'),"calendar"==t&&(l+=' calendar="'+B+'"',g&&(l+=' album="'+g+'"'),C&&(l+=' reverse="1"'),G&&(l+=' all="1"')),"choice"==t&&_.length>0&&(l+=' admin="'+_+'"');var W=document.getElementById("wppagallery-size").value,X=W.split(",");if(X[1]?"auto"==X[0]&&parseInt(X[1])==X[1]&&X[1]>100?jQuery("#wppagallery-size").css("color","#070"):(W=0,jQuery("#wppagallery-size").css("color","#700")):(""!=W&&"auto"!=W&&parseInt(W)!=W&&(W=0,jQuery("#wppagallery-size").css("color","#700")),W<0&&(W=-W),W<100&&(W/=100),jQuery("#wppagallery-size").css("color","#070")),0!=W&&(l+=' size="'+W+'"'),"none"!=(q=jQuery("#wppagallery-align").val())&&(l+=' align="'+q+'"'),l+="]"+(r=(r=(r=(r=(r=document.getElementById("wppagallery-shortcode-preview").value).replace(/&quot;/g,'"')).split("]"))[1]).split("["))[0]+"[/wppa]",l=l.replace(/"/g,"&quot;"),L='<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+l+'" />',jQuery("#wppagallery-shortcode-preview-container").html(L),!(e=!(""==c&&b||""==h&&v||""==S&&k||""==T&&E||""==y&&Q||""==o&&m||""==s&&I||""==w&&P||""==N&&f||""==A&&x))){var F="";""==c&&b&&(F+="Need album\n"),""==h&&v&&(F+="Need photo\n"),""==S&&k&&(F+="Need owner"),""==T&&E&&(F+="Need taglist"),""==y&&Q&&(F+="Need galType"),""==o&&m&&(F+="Need slideType"),""==s&&I&&(F+="Need searchType"),""==w&&P&&(F+="Need miscType"),""==N&&f&&(F+="Need tags"),""==A&&x&&(F+="Need cats")}e?(jQuery("#wppagallery-submit").show(),jQuery("#wppagallery-submit-notok").hide()):(jQuery("#wppagallery-submit").hide(),jQuery("#wppagallery-submit-notok").show())}function wppaTinyMcePhotoPreview(e){if("#potd"==e)jQuery("#wppagallery-photo-preview").html(wppaNoPreview);else if(-1!=e.indexOf("xxx")){var a=e.replace("xxx","");jQuery("#wppagallery-photo-preview").html('<video preload="metadata" style="max-width:400px; max-height:300px; margin-top:3px;" controls><source src="'+wppaPhotoDirectory+a+'mp4" type="video/mp4"><source src="'+wppaPhotoDirectory+a+'ogg" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'ogv" type="video/ogg"><source src="'+wppaPhotoDirectory+a+'webm" type="video/webm"></video>')}else jQuery("#wppagallery-photo-preview").html('<img src="'+wppaPhotoDirectory+e+'" style="max-width:400px; max-height:300px;" />')}tinymce.PluginManager.add("wppagallery",function(e,a){e.addButton("wppa_gallery_button",{image:wppaImageDirectory+"albumnew32.png",tooltip:"WPPA+ Shortcode Generator",onclick:function(){var e=jQuery(window).width(),a=jQuery(window).height(),r=720<e?720:e;r-=80,a=jQuery(window).height(),a-=120,tb_show("WPPA+ Shortcode Generator","#TB_inline?width="+r+"&height="+a+"&inlineId=wppagallery-form")}})}),jQuery(function(){var e=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=tinymcedialog";e.open("GET",a,!0),e.send(),e.onreadystatechange=function(){if(4==e.readyState&&404!=e.status){var a=e.responseText,r=jQuery(a);r.find("table");r.appendTo("body").hide(),r.find("#wppagallery-submit").click(function(){newShortcode=document.getElementById("wppagallery-shortcode-preview").value,newShortcode=newShortcode.replace(/&quot;/g,'"'),tinyMCE.activeEditor.execCommand("mceInsertContent",0,newShortcode),tb_remove()})}}});
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.7.08';
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!!
@@ -25,7 +25,7 @@ var wppaSlideShowTimeOut = 2500;
25
  var wppaFadeInAfterFadeOut = false;
26
  var wppaTextFrameDelta = 0;
27
  var wppaBoxDelta = 0;
28
- var wppaPreambule;
29
  var wppaHideWhenEmpty = false;
30
  var wppaThumbnailPitch = [];
31
  var wppaFilmStripLength = [];
@@ -70,7 +70,6 @@ var wppaAjaxUrl = '';
70
  var wppaLang = '';
71
  var wppaNextOnCallback = false;
72
  var wppaStarOpacity = 0.2;
73
- var wppaSlideWrap = true;
74
  var wppaLightBox = [];
75
  var wppaEmailRequired = 'required';
76
  var wppaSlideBorderWidth = 0;
@@ -150,6 +149,7 @@ var wppaPageArg = '';
150
  var wppaSlideshowNavigationType = 'icons';
151
  var wppaCoverImageResponsive = [];
152
  var wppaSearchBoxSelItems = [];
 
153
 
154
  // 'Internal' variables ( private )
155
  var _wppaId = [];
@@ -1325,6 +1325,7 @@ function wppaDisplaySelectedFiles(id) {
1325
  }
1326
 
1327
  function wppaIsEmpty( str ) {
 
1328
  if ( typeof( str ) == 'undefined' ) return true;
1329
  if ( str == '' ) return true;
1330
  if ( str == false ) return true;
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.7.09';
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!!
25
  var wppaFadeInAfterFadeOut = false;
26
  var wppaTextFrameDelta = 0;
27
  var wppaBoxDelta = 0;
28
+ var wppaPreambule = [];
29
  var wppaHideWhenEmpty = false;
30
  var wppaThumbnailPitch = [];
31
  var wppaFilmStripLength = [];
70
  var wppaLang = '';
71
  var wppaNextOnCallback = false;
72
  var wppaStarOpacity = 0.2;
 
73
  var wppaLightBox = [];
74
  var wppaEmailRequired = 'required';
75
  var wppaSlideBorderWidth = 0;
149
  var wppaSlideshowNavigationType = 'icons';
150
  var wppaCoverImageResponsive = [];
151
  var wppaSearchBoxSelItems = [];
152
+ var wppaSlideWrap = [];
153
 
154
  // 'Internal' variables ( private )
155
  var _wppaId = [];
1325
  }
1326
 
1327
  function wppaIsEmpty( str ) {
1328
+ if ( str == null ) return true;
1329
  if ( typeof( str ) == 'undefined' ) return true;
1330
  if ( str == '' ) return true;
1331
  if ( str == false ) return true;
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3)}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){if(wppaAutoColumnWidth[p]){var a;if(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,s=o-1;e=parseInt((a+8)/o-8);for(var r=0;r<t.length;){switch(r%o){case 0:jQuery(t[r]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"left"})}r++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);var i={marginLeft:"0px",float:"left"};jQuery(".wppa-cover-box-mcr-"+p).css(i)}if(wppaThumbSpaceAuto){var n=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(n){var w=wppaMinThumbSpace,l=a-wppaThumbnailAreaDelta-7,u=parseInt(l/(n+w)),c=l-u*n,d=parseInt(.5+c/(u+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:d})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");y;)h=y*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%"))}}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var s=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:s})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaGetCurrentFullUrl(p,a){var e,t,o,s=document.location.href.split("?"),r="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",s[1]&&(r=s[1].split("&"));var w=!1;if(e=s[0],"nil"!=r&&r.length>0)for(;i<r.length;)(t=r[i].split("="))[0]==o+"album"&&(w=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=r[i]),i++;return w?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?p.substr(0,10)+"...":p}function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:10,center:t},s=new google.maps.Map(document.getElementById("map-canvas-"+p),o),r=new google.maps.Marker({position:t,map:s,title:""});google.maps.event.addListener(s,"center_changed",function(){window.setTimeout(function(){s.panTo(r.getPosition())},1e3)})}function wppaEncode(p){var a,e;if(void 0!==p){var t=(a=e=(a=e=(a=p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(e="";o<t.length;)e+=t[o],++o<t.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:(a=a[1],a=a.split("."),a=a[0].replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""))}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",s="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");r=jQuery(".wppa-ss-albumcat-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");r=jQuery(".wppa-ss-albumtext-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");r=jQuery(".wppa-ss-phototag-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var r=jQuery(".wppa-ss-phototext-"+p);s="";var i;for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(s=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(s=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+s,document.location.href=n}}function wppaAjaxGetSsIptcList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return void 0===p||(""==p||(0==p||(0==p||void 0)))}var wppaJsVersion="6.7.08",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule,wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaSlideWrap=!0,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),wppaFirstOccur=0,0==a){t=(e=document.location.href).split("&wppa-occur=");a=parseInt(t[1])}var e=document.location.href,t=e.split("&wppa-photo="),o=parseInt(t[1]);if(o>0){for(var s=0;s<_wppaId[a].length&&_wppaId[a][s]!=o;)s++;s<_wppaId[a].length&&_wppaGoto(a,s)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3)}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){if(wppaAutoColumnWidth[p]){var a;if(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,s=o-1;e=parseInt((a+8)/o-8);for(var r=0;r<t.length;){switch(r%o){case 0:jQuery(t[r]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"left"})}r++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);var i={marginLeft:"0px",float:"left"};jQuery(".wppa-cover-box-mcr-"+p).css(i)}if(wppaThumbSpaceAuto){var n=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(n){var w=wppaMinThumbSpace,l=a-wppaThumbnailAreaDelta-7,u=parseInt(l/(n+w)),c=l-u*n,d=parseInt(.5+c/(u+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:d})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");y;)h=y*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%"))}}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var s=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:s})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaGetCurrentFullUrl(p,a){var e,t,o,s=document.location.href.split("?"),r="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",s[1]&&(r=s[1].split("&"));var w=!1;if(e=s[0],"nil"!=r&&r.length>0)for(;i<r.length;)(t=r[i].split("="))[0]==o+"album"&&(w=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=r[i]),i++;return w?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?p.substr(0,10)+"...":p}function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:10,center:t},s=new google.maps.Map(document.getElementById("map-canvas-"+p),o),r=new google.maps.Marker({position:t,map:s,title:""});google.maps.event.addListener(s,"center_changed",function(){window.setTimeout(function(){s.panTo(r.getPosition())},1e3)})}function wppaEncode(p){var a,e;if(void 0!==p){var t=(a=e=(a=e=(a=p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(e="";o<t.length;)e+=t[o],++o<t.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:(a=a[1],a=a.split("."),a=a[0].replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""))}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",s="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");r=jQuery(".wppa-ss-albumcat-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");r=jQuery(".wppa-ss-albumtext-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");r=jQuery(".wppa-ss-phototag-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var r=jQuery(".wppa-ss-phototext-"+p);s="";var i;for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(s=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(s=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+s,document.location.href=n}}function wppaAjaxGetSsIptcList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}var wppaJsVersion="6.7.09",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),wppaFirstOccur=0,0==a){t=(e=document.location.href).split("&wppa-occur=");a=parseInt(t[1])}var e=document.location.href,t=e.split("&wppa-photo="),o=parseInt(t[1]);if(o>0){for(var s=0;s<_wppaId[a].length&&_wppaId[a][s]!=o;)s++;s<_wppaId[a].length&&_wppaGoto(a,s)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.7.08
6
- Stable tag: 6.7.07
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -127,6 +127,32 @@ If this happens, make sure (ask your hosting provider) that you have all the rig
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  = 6.7.08 =
131
 
132
  = 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, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 6.7.09
6
+ Stable tag: 6.7.08
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
130
+ = 6.7.09 =
131
+
132
+ = Bug Fixes =
133
+
134
+ * Slideshow widget bug fixes:
135
+ --- all albums --- did not work, fixed.
136
+ On initial display of the activation screen, the default setting values were not shown. Fixed.
137
+ Album selectionbox was not sorted. Fixed.
138
+ Height could not be set to 0 (auto). Fixed.
139
+ * Shortcode generator bug fixes:
140
+ Fixed album enumeration delimiter; must be '.' rather than ','
141
+ Fixed colors in selectionboxes (red: required selection missing or invalid input; green: selection/input is ok).
142
+ Single image preview videos work correctly now.
143
+
144
+ = New Features =
145
+
146
+ * Slideshow widget new features:
147
+ Added checkbox 'Random' for random photo sequence. The sequence will change every pageload.
148
+ Added checkbox 'Include subalbums'.
149
+
150
+ = Other Changes =
151
+
152
+ * Sildeshow widget other changes:
153
+ You can set a maximum number of slides, to prevent heavy pageloads, especially when --- all albums --- is used.
154
+ The slideshow now always wraps around, regardless of the setting of Table IV-B8.
155
+
156
  = 6.7.08 =
157
 
158
  = Bug Fixes =
wppa-ajax.php CHANGED
@@ -1838,7 +1838,7 @@ global $wppa_log_file;
1838
  if ( $oldstatus == 'pending' ) {
1839
  if ( $value == 'publish' ) {
1840
  $owner = wppa_get_photo_item( $photo, 'owner' );
1841
- $user = get_user_by( 'login', $owner );
1842
  $to = $user->user_email;
1843
  $subj = __('Photo approved', 'wp-photo-album-plus');
1844
  $cont = sprintf( __('Your recently uploaded photo %s in album %s has been approved', 'wp-photo-album-plus'),
1838
  if ( $oldstatus == 'pending' ) {
1839
  if ( $value == 'publish' ) {
1840
  $owner = wppa_get_photo_item( $photo, 'owner' );
1841
+ $user = wppa_get_user_by( 'login', $owner );
1842
  $to = $user->user_email;
1843
  $subj = __('Photo approved', 'wp-photo-album-plus');
1844
  $cont = sprintf( __('Your recently uploaded photo %s in album %s has been approved', 'wp-photo-album-plus'),
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.7.07
7
  *
8
  */
9
 
@@ -167,7 +167,7 @@ global $wppa_session;
167
  }
168
  }
169
 
170
- wppa_dbg_msg( 'Root='.$root.': '.wppa_get_album_name( $root ) );
171
 
172
  // Open the form
173
  $result =
@@ -1946,7 +1946,7 @@ function wppa_upload_box() {
1946
  if ( wppa_switch( 'user_upload_login' ) ) {
1947
  if ( ! is_user_logged_in() ) return;
1948
  }
1949
-
1950
  // Are roles specified and do i have one?
1951
  if ( ! wppa_check_user_upload_role() ) {
1952
  return;
@@ -3025,8 +3025,8 @@ static $albums_granted;
3025
 
3026
  // If ajax upload and from cover or thumbnail area, go display the thumbnails after upload
3027
  if ( $where == 'cover' || $where == 'thumb' ) {
3028
- $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . $alb;
3029
- $ajax_url_after_upload = str_replace( '&amp;', '&', wppa_get_ajaxlink() ) . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . $alb;
3030
  $on_complete = 'wppaDoAjaxRender( ' . $occur . ', \'' . $ajax_url_after_upload . '\', \'' . $url_after_ajax_upload . '\' );';
3031
  }
3032
  else {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.7.09
7
  *
8
  */
9
 
167
  }
168
  }
169
 
170
+ wppa_dbg_msg( 'Root=' . $root . ': ' . ( $root > '0' ? wppa_get_album_name( $root ) : '' ) );
171
 
172
  // Open the form
173
  $result =
1946
  if ( wppa_switch( 'user_upload_login' ) ) {
1947
  if ( ! is_user_logged_in() ) return;
1948
  }
1949
+
1950
  // Are roles specified and do i have one?
1951
  if ( ! wppa_check_user_upload_role() ) {
1952
  return;
3025
 
3026
  // If ajax upload and from cover or thumbnail area, go display the thumbnails after upload
3027
  if ( $where == 'cover' || $where == 'thumb' ) {
3028
+ $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3029
+ $ajax_url_after_upload = str_replace( '&amp;', '&', wppa_get_ajaxlink() ) . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3030
  $on_complete = 'wppaDoAjaxRender( ' . $occur . ', \'' . $ajax_url_after_upload . '\', \'' . $url_after_ajax_upload . '\' );';
3031
  }
3032
  else {
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.7.07
6
  *
7
  */
8
 
@@ -124,9 +124,8 @@ global $thumbs;
124
  'comment_email' => '',
125
  'comment_text' => '',
126
  'no_default' => false,
127
- 'in_widget_frame_height' => '',
128
- 'in_widget_frame_width' => '',
129
- // 'user_uploaded' => false,
130
  'current_album' => '0',
131
  'searchstring' => wppa_test_for_search(),
132
  'searchresults' => '',
@@ -215,6 +214,8 @@ global $thumbs;
215
  'catbox' => '',
216
  'is_pdf' => false,
217
  'is_button' => '',
 
 
218
 
219
  );
220
  }
@@ -438,6 +439,12 @@ function wppa_get_photo_order( $id = '0', $no_random = false ) {
438
  global $wpdb;
439
  global $wppa;
440
 
 
 
 
 
 
 
441
  // Album specified?
442
  if ( wppa_is_int( $id ) && $id > '0' ) {
443
  $order = wppa_get_album_item( $id, 'p_order_by' );
@@ -1661,7 +1668,7 @@ global $wpdb;
1661
  else {
1662
  $is_newformat = false;
1663
  }
1664
-
1665
  // Provide default selection if no selected given
1666
  if ( $args['selected'] === '' ) {
1667
  $args['selected'] = wppa_get_last_album();
@@ -1686,25 +1693,25 @@ global $wpdb;
1686
  elseif ( wppa_has_many_albums() ) {
1687
  $is_many = true;
1688
  }
1689
-
1690
-
1691
  // Process the many case
1692
  if ( $is_many ) {
1693
-
1694
  // Many newformat
1695
  if ( $is_newformat ) {
1696
-
1697
  $result =
1698
  '<input' .
1699
- ' name="' . $args['tagname'] . '"' .
1700
  ( $args['tagid'] ? ' id="' . $args['tagid'] . '"' : '' ) .
1701
  ( $args['multiple'] ? '' : ' type="number"' ) .
1702
  ' value="' . $args['selected'] . '"' .
1703
  ' onchange="' . $args['tagonchange'] . '"' .
1704
  ' style="' . $args['tagstyle'] . '"' .
1705
- ' title="' .
1706
  esc_attr( __( 'Enter album number', 'wp-photo-album-plus' ) );
1707
-
1708
  if ( $args['addnone'] ) $result .= esc_attr( "\n" . __( '0 for --- none ---' , 'wp-photo-album-plus' ) );
1709
  if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '0 for --- all ---' , 'wp-photo-album-plus' ) );
1710
  if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '-2 for --- generic ---' , 'wp-photo-album-plus' ) );
@@ -1712,14 +1719,14 @@ global $wpdb;
1712
  if ( $args['addmultiple'] ) $result .= esc_attr( "\n" . __( '-99 for --- multiple see below ---' , 'wp-photo-album-plus' ) );
1713
  if ( $args['addselbox'] ) $result .= esc_attr( "\n" . __( '0 for --- a selection box ---' , 'wp-photo-album-plus' ) );
1714
  if ( $args['addseparate'] ) $result .= esc_attr( "\n" . __( '-1 for --- separate ---' , 'wp-photo-album-plus' ) );
1715
-
1716
  $result .=
1717
  '"' .
1718
  ' />' ;
1719
-
1720
  return $result;
1721
  }
1722
-
1723
  // Many old format
1724
  else {
1725
  $result = '';
@@ -1775,14 +1782,14 @@ global $wpdb;
1775
  '<option value="-1"' . $selected . '>' .
1776
  __( '--- separate ---' , 'wp-photo-album-plus' ) .
1777
  '</option>';
1778
-
1779
  return $result;
1780
  }
1781
  }
1782
-
1783
  // Continue processing Not many albums
1784
  else {
1785
-
1786
  // Get roughly the albums that might be in the selection
1787
  if ( $args['checkarray'] && ! empty( $args['array'] ) ) {
1788
 
@@ -1867,7 +1874,7 @@ global $wpdb;
1867
 
1868
  // Output
1869
  $result = '';
1870
-
1871
  // New format
1872
  if ( $is_newformat ) {
1873
  $result .= $args['tagopen'];
@@ -1970,17 +1977,18 @@ global $wpdb;
1970
  '<option value="-1"' . $selected . '>' .
1971
  __( '--- separate ---' , 'wp-photo-album-plus' ) .
1972
  '</option>';
1973
-
1974
  // New format
1975
  if ( $is_newformat ) {
1976
  $result .= '</select>';
1977
  }
1978
-
1979
  return $result;
1980
  }
1981
  }
1982
 
1983
  function wppa_delete_obsolete_tempfiles() {
 
1984
  // To prevent filling up diskspace, divide lifetime by 2 and repeat removing obsolete files until count <= 10
1985
  $filecount = 101;
1986
  $lifetime = 3600;
@@ -1991,7 +1999,7 @@ function wppa_delete_obsolete_tempfiles() {
1991
  $timnow = time();
1992
  $expired = $timnow - $lifetime;
1993
  foreach ( $files as $file ) {
1994
- if ( is_file( $file ) ) {
1995
  $modified = filemtime( $file );
1996
  if ( $modified < $expired ) @ unlink( $file );
1997
  else $filecount++;
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.7.09
6
  *
7
  */
8
 
124
  'comment_email' => '',
125
  'comment_text' => '',
126
  'no_default' => false,
127
+ 'in_widget_frame_height' => '0',
128
+ 'in_widget_frame_width' => '0',
 
129
  'current_album' => '0',
130
  'searchstring' => wppa_test_for_search(),
131
  'searchresults' => '',
214
  'catbox' => '',
215
  'is_pdf' => false,
216
  'is_button' => '',
217
+ 'max_slides_in_ss_widget' => '',
218
+ 'is_random' => false,
219
 
220
  );
221
  }
439
  global $wpdb;
440
  global $wppa;
441
 
442
+ // Random overrule?
443
+ if ( wppa( 'is_random' ) ) {
444
+ $result = " ORDER BY RAND(" . time() % 4711 . ")";
445
+ return $result;
446
+ }
447
+
448
  // Album specified?
449
  if ( wppa_is_int( $id ) && $id > '0' ) {
450
  $order = wppa_get_album_item( $id, 'p_order_by' );
1668
  else {
1669
  $is_newformat = false;
1670
  }
1671
+
1672
  // Provide default selection if no selected given
1673
  if ( $args['selected'] === '' ) {
1674
  $args['selected'] = wppa_get_last_album();
1693
  elseif ( wppa_has_many_albums() ) {
1694
  $is_many = true;
1695
  }
1696
+
1697
+
1698
  // Process the many case
1699
  if ( $is_many ) {
1700
+
1701
  // Many newformat
1702
  if ( $is_newformat ) {
1703
+
1704
  $result =
1705
  '<input' .
1706
+ ' name="' . $args['tagname'] . '"' .
1707
  ( $args['tagid'] ? ' id="' . $args['tagid'] . '"' : '' ) .
1708
  ( $args['multiple'] ? '' : ' type="number"' ) .
1709
  ' value="' . $args['selected'] . '"' .
1710
  ' onchange="' . $args['tagonchange'] . '"' .
1711
  ' style="' . $args['tagstyle'] . '"' .
1712
+ ' title="' .
1713
  esc_attr( __( 'Enter album number', 'wp-photo-album-plus' ) );
1714
+
1715
  if ( $args['addnone'] ) $result .= esc_attr( "\n" . __( '0 for --- none ---' , 'wp-photo-album-plus' ) );
1716
  if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '0 for --- all ---' , 'wp-photo-album-plus' ) );
1717
  if ( $args['addall'] ) $result .= esc_attr( "\n" . __( '-2 for --- generic ---' , 'wp-photo-album-plus' ) );
1719
  if ( $args['addmultiple'] ) $result .= esc_attr( "\n" . __( '-99 for --- multiple see below ---' , 'wp-photo-album-plus' ) );
1720
  if ( $args['addselbox'] ) $result .= esc_attr( "\n" . __( '0 for --- a selection box ---' , 'wp-photo-album-plus' ) );
1721
  if ( $args['addseparate'] ) $result .= esc_attr( "\n" . __( '-1 for --- separate ---' , 'wp-photo-album-plus' ) );
1722
+
1723
  $result .=
1724
  '"' .
1725
  ' />' ;
1726
+
1727
  return $result;
1728
  }
1729
+
1730
  // Many old format
1731
  else {
1732
  $result = '';
1782
  '<option value="-1"' . $selected . '>' .
1783
  __( '--- separate ---' , 'wp-photo-album-plus' ) .
1784
  '</option>';
1785
+
1786
  return $result;
1787
  }
1788
  }
1789
+
1790
  // Continue processing Not many albums
1791
  else {
1792
+
1793
  // Get roughly the albums that might be in the selection
1794
  if ( $args['checkarray'] && ! empty( $args['array'] ) ) {
1795
 
1874
 
1875
  // Output
1876
  $result = '';
1877
+
1878
  // New format
1879
  if ( $is_newformat ) {
1880
  $result .= $args['tagopen'];
1977
  '<option value="-1"' . $selected . '>' .
1978
  __( '--- separate ---' , 'wp-photo-album-plus' ) .
1979
  '</option>';
1980
+
1981
  // New format
1982
  if ( $is_newformat ) {
1983
  $result .= '</select>';
1984
  }
1985
+
1986
  return $result;
1987
  }
1988
  }
1989
 
1990
  function wppa_delete_obsolete_tempfiles() {
1991
+
1992
  // To prevent filling up diskspace, divide lifetime by 2 and repeat removing obsolete files until count <= 10
1993
  $filecount = 101;
1994
  $lifetime = 3600;
1999
  $timnow = time();
2000
  $expired = $timnow - $lifetime;
2001
  foreach ( $files as $file ) {
2002
+ if ( is_file( $file ) && basename( $file ) != 'index.php' ) {
2003
  $modified = filemtime( $file );
2004
  if ( $modified < $expired ) @ unlink( $file );
2005
  else $filecount++;
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.7.08
7
  *
8
  */
9
 
@@ -1696,6 +1696,12 @@ global $wppa_session;
1696
  // Normal
1697
  else {
1698
 
 
 
 
 
 
 
1699
  // Status
1700
  $status = "`status` <> 'pending' AND `status` <> 'scheduled'";
1701
  if ( ! is_user_logged_in() ) $status .= " AND `status` <> 'private'";
@@ -1708,14 +1714,17 @@ global $wppa_session;
1708
 
1709
  // All albums ?
1710
  if ( wppa( 'start_album' ) == -2 ) {
 
1711
  if ( current_user_can( 'wppa_moderate' ) ) {
1712
- $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " . wppa_get_photo_order( '0' );
1713
  }
1714
  else {
1715
  $query = $wpdb->prepare( "SELECT * FROM `".WPPA_PHOTOS."` " .
1716
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) " .
1717
  "AND `album` > '0' " .
1718
- wppa_get_photo_order( '0' ), wppa_get_user() );
 
 
1719
  }
1720
  }
1721
 
@@ -1724,12 +1733,15 @@ global $wppa_session;
1724
  if ( current_user_can( 'wppa_moderate' ) ) {
1725
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1726
  "WHERE `album` = " . wppa( 'start_album' ) . " " .
1727
- wppa_get_photo_order( wppa( 'start_album' ) );
 
1728
  }
1729
  else {
1730
  $query = $wpdb->prepare( "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1731
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) AND `album` = " . wppa( 'start_album' ) . " " .
1732
- wppa_get_photo_order( wppa( 'start_album' ) ), wppa_get_user() );
 
 
1733
  }
1734
  }
1735
 
@@ -1739,12 +1751,15 @@ global $wppa_session;
1739
  if ( current_user_can( 'wppa_moderate' ) ) {
1740
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1741
  "WHERE " . $wherealbum . " " .
1742
- wppa_get_photo_order( '0' );
 
1743
  }
1744
  else {
1745
  $query = $wpdb->prepare( "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1746
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) AND " . $wherealbum . " " .
1747
- wppa_get_photo_order( '0' ), wppa_get_user() );
 
 
1748
  }
1749
  }
1750
  }
@@ -1908,11 +1923,13 @@ global $wpdb;
1908
  $invers = true;
1909
  }
1910
 
1911
- // Do we need to get the count first to dicede if we get the full data and probably cache it ?
1912
  if ( $count_first || $invers ) {
1913
 
1914
- // First get the count of the result
1915
- $count = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT(*)', $query ) );
 
 
1916
 
1917
  // If less than 5000, get them and cache them
1918
  if ( $count <= 5000 && ! $invers ) {
@@ -1920,10 +1937,9 @@ global $wpdb;
1920
  $caching = true;
1921
  }
1922
 
1923
- // If more than 2500, or inverse requested, get the ids only, and do not cache them
1924
  else {
1925
- $query = str_replace( 'SELECT *', 'SELECT `id`', $query );
1926
- $thumbs = $wpdb->get_results( $query , ARRAY_A );
1927
  $caching = false;
1928
  }
1929
  }
@@ -1932,7 +1948,7 @@ global $wpdb;
1932
  else {
1933
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
1934
  $caching = true;
1935
- $count = empty( $thumbs ) ? '0' : count( $thumbs );
1936
  }
1937
 
1938
  // Inverse selection requested?
@@ -1968,7 +1984,8 @@ global $wpdb;
1968
  $time += microtime( true );
1969
  wppa_dbg_msg( 'Get thumbs query took ' . $time . ' seconds. ' .
1970
  'Found: ' . $count . ' items. ' .
1971
- 'Mem used=' . ceil( memory_get_peak_usage( true ) / ( 1024*1024 ) ) . ' Mb.'
 
1972
  );
1973
  if ( $caching ) {
1974
  wppa_cache_photo( 'add', $thumbs );
@@ -3400,6 +3417,8 @@ global $blog_id;
3400
  $temp = 2*6 + 2*42 + 2*wppa_opt( 'bwidth' );
3401
  if ( wppa_in_widget() ) $temp = 2*6 + 2*21 + 2*wppa_opt( 'bwidth' );
3402
  wppa_add_js_page_data( "\n" . 'wppaFilmStripAreaDelta['.wppa( 'mocc' ).'] = '.$temp.';' );
 
 
3403
  if ( wppa_in_widget() ) {
3404
  wppa_add_js_page_data( "\n" . 'wppaIsMini['.wppa( 'mocc' ).'] = true;' );
3405
  }
@@ -3416,6 +3435,8 @@ global $blog_id;
3416
  else {
3417
  wppa_add_js_page_data( "\n" . 'wppaSlideBlank['.wppa( 'mocc' ).'] = false;' );
3418
  }
 
 
3419
 
3420
  wppa_add_js_page_data( "\n" . 'wppaLightBox['.wppa( 'mocc' ).'] = "xxx";' );
3421
 
@@ -3744,7 +3765,9 @@ function wppa_is_pagination() {
3744
 
3745
  function wppa_get_preambule() {
3746
 
3747
- if ( ! wppa_switch( 'slide_wrap' ) ) return '0';
 
 
3748
  $result = is_numeric( wppa_opt( 'colwidth' ) ) ? wppa_opt( 'colwidth' ) : wppa_opt( 'fullsize' );
3749
  $result = ceil( ceil( $result / wppa_opt( 'thumbsize' ) ) / 2 ) + 2;
3750
  return $result;
@@ -4321,7 +4344,7 @@ global $wppa_upload_succes_id;
4321
  if ( wppa_opt( 'fe_create_ntfy' ) ) {
4322
  $users = explode( ',', wppa_opt( 'fe_create_ntfy' ) );
4323
  if ( ! empty( $users ) ) foreach( $users as $usr ) {
4324
- $user = get_user_by( 'login', trim( $usr ) );
4325
  if ( ! empty( $user ) ) {
4326
  $cont = array();
4327
  $cont[] = sprintf( __( 'User %s created album #%s with name %s.' ), '<b>' . wppa_get_user() . '</b>', $album, '<b>' . $albumname . '</b>' );
@@ -5268,7 +5291,7 @@ global $wpdb;
5268
  */
5269
  if ( 1 == get_option( 'comment_whitelist' ) ) {
5270
  if ( $user != '' && $email != '' ) {
5271
- $comment_user = get_user_by( 'email', wp_unslash( $email ) );
5272
  if ( ! empty( $comment_user->ID ) ) {
5273
  $ok_to_comment =
5274
  $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE user_id = %d AND comment_approved = '1'", $comment_user->ID ) ) +
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.7.09
7
  *
8
  */
9
 
1696
  // Normal
1697
  else {
1698
 
1699
+ // Special case slideshow widget limit?
1700
+ $lim = '';
1701
+ if ( wppa( 'max_slides_in_ss_widget' ) ) {
1702
+ $lim = " LIMIT " . wppa( 'max_slides_in_ss_widget' );
1703
+ }
1704
+
1705
  // Status
1706
  $status = "`status` <> 'pending' AND `status` <> 'scheduled'";
1707
  if ( ! is_user_logged_in() ) $status .= " AND `status` <> 'private'";
1714
 
1715
  // All albums ?
1716
  if ( wppa( 'start_album' ) == -2 ) {
1717
+
1718
  if ( current_user_can( 'wppa_moderate' ) ) {
1719
+ $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " . wppa_get_photo_order( '0' ) . $lim;
1720
  }
1721
  else {
1722
  $query = $wpdb->prepare( "SELECT * FROM `".WPPA_PHOTOS."` " .
1723
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) " .
1724
  "AND `album` > '0' " .
1725
+ wppa_get_photo_order( '0' ) .
1726
+ $lim,
1727
+ wppa_get_user() );
1728
  }
1729
  }
1730
 
1733
  if ( current_user_can( 'wppa_moderate' ) ) {
1734
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1735
  "WHERE `album` = " . wppa( 'start_album' ) . " " .
1736
+ wppa_get_photo_order( wppa( 'start_album' ) ) .
1737
+ $lim;
1738
  }
1739
  else {
1740
  $query = $wpdb->prepare( "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1741
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) AND `album` = " . wppa( 'start_album' ) . " " .
1742
+ wppa_get_photo_order( wppa( 'start_album' ) ) .
1743
+ $lim,
1744
+ wppa_get_user() );
1745
  }
1746
  }
1747
 
1751
  if ( current_user_can( 'wppa_moderate' ) ) {
1752
  $query = "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1753
  "WHERE " . $wherealbum . " " .
1754
+ wppa_get_photo_order( '0' ) .
1755
+ $lim;
1756
  }
1757
  else {
1758
  $query = $wpdb->prepare( "SELECT * FROM `" . WPPA_PHOTOS . "` " .
1759
  "WHERE ( ( " . $status . " ) OR `owner` = %s ) AND " . $wherealbum . " " .
1760
+ wppa_get_photo_order( '0' ) .
1761
+ $lim,
1762
+ wppa_get_user() );
1763
  }
1764
  }
1765
  }
1923
  $invers = true;
1924
  }
1925
 
1926
+ // Do we need to get the count first to decide if we get the full data and probably cache it ?
1927
  if ( $count_first || $invers ) {
1928
 
1929
+ // Find count of the query result
1930
+ $tempquery = str_replace( 'SELECT *', 'SELECT `id`', $query );
1931
+ $wpdb->query( $tempquery );
1932
+ $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
1933
 
1934
  // If less than 5000, get them and cache them
1935
  if ( $count <= 5000 && ! $invers ) {
1937
  $caching = true;
1938
  }
1939
 
1940
+ // If more than 5000, or inverse requested, use the ids only, and do not cache them
1941
  else {
1942
+ $thumbs = $wpdb->get_results( $tempquery, ARRAY_A );
 
1943
  $caching = false;
1944
  }
1945
  }
1948
  else {
1949
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
1950
  $caching = true;
1951
+ $count = count( $thumbs );
1952
  }
1953
 
1954
  // Inverse selection requested?
1984
  $time += microtime( true );
1985
  wppa_dbg_msg( 'Get thumbs query took ' . $time . ' seconds. ' .
1986
  'Found: ' . $count . ' items. ' .
1987
+ 'Mem used=' . ceil( memory_get_peak_usage( true ) / ( 1024*1024 ) ) . ' Mb. ' .
1988
+ 'Caching: ' . ( $caching ? 'yes' : 'no' )
1989
  );
1990
  if ( $caching ) {
1991
  wppa_cache_photo( 'add', $thumbs );
3417
  $temp = 2*6 + 2*42 + 2*wppa_opt( 'bwidth' );
3418
  if ( wppa_in_widget() ) $temp = 2*6 + 2*21 + 2*wppa_opt( 'bwidth' );
3419
  wppa_add_js_page_data( "\n" . 'wppaFilmStripAreaDelta['.wppa( 'mocc' ).'] = '.$temp.';' );
3420
+ $temp = wppa_get_preambule();
3421
+ wppa_add_js_page_data( "\n" . 'wppaPreambule['.wppa( 'mocc' ).'] = '.$temp.';' );
3422
  if ( wppa_in_widget() ) {
3423
  wppa_add_js_page_data( "\n" . 'wppaIsMini['.wppa( 'mocc' ).'] = true;' );
3424
  }
3435
  else {
3436
  wppa_add_js_page_data( "\n" . 'wppaSlideBlank['.wppa( 'mocc' ).'] = false;' );
3437
  }
3438
+ // Slideshow widget always wraps around
3439
+ wppa_add_js_page_data( "\n" . 'wppaSlideWrap['.wppa( 'mocc' ).'] = ' . ( wppa_switch( 'slide_wrap' ) || wppa_in_widget() == 'ss' ? 'true;' : 'false;' ) );
3440
 
3441
  wppa_add_js_page_data( "\n" . 'wppaLightBox['.wppa( 'mocc' ).'] = "xxx";' );
3442
 
3765
 
3766
  function wppa_get_preambule() {
3767
 
3768
+ if ( ! wppa_switch( 'slide_wrap' ) && wppa( 'in_widget' ) != 'ss' ) {
3769
+ return '0';
3770
+ }
3771
  $result = is_numeric( wppa_opt( 'colwidth' ) ) ? wppa_opt( 'colwidth' ) : wppa_opt( 'fullsize' );
3772
  $result = ceil( ceil( $result / wppa_opt( 'thumbsize' ) ) / 2 ) + 2;
3773
  return $result;
4344
  if ( wppa_opt( 'fe_create_ntfy' ) ) {
4345
  $users = explode( ',', wppa_opt( 'fe_create_ntfy' ) );
4346
  if ( ! empty( $users ) ) foreach( $users as $usr ) {
4347
+ $user = wppa_get_user_by( 'login', trim( $usr ) );
4348
  if ( ! empty( $user ) ) {
4349
  $cont = array();
4350
  $cont[] = sprintf( __( 'User %s created album #%s with name %s.' ), '<b>' . wppa_get_user() . '</b>', $album, '<b>' . $albumname . '</b>' );
5291
  */
5292
  if ( 1 == get_option( 'comment_whitelist' ) ) {
5293
  if ( $user != '' && $email != '' ) {
5294
+ $comment_user = wppa_get_user_by( 'email', wp_unslash( $email ) );
5295
  if ( ! empty( $comment_user->ID ) ) {
5296
  $ok_to_comment =
5297
  $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE user_id = %d AND comment_approved = '1'", $comment_user->ID ) ) +
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 6.7.00
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 6.7.09
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 6.6.30
7
  *
8
  */
9
 
@@ -445,6 +445,7 @@ function wppa_get_album_name( $id, $xargs = array() ) { // $extended = false ) {
445
  // Sanitize args
446
  if ( ! is_numeric( $id ) ) {
447
  wppa_dbg_msg( 'Invalid arg wppa_get_album_name(' . $id . ')', 'red' );
 
448
  return '';
449
  }
450
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 6.7.09
7
  *
8
  */
9
 
445
  // Sanitize args
446
  if ( ! is_numeric( $id ) ) {
447
  wppa_dbg_msg( 'Invalid arg wppa_get_album_name(' . $id . ')', 'red' );
448
+ wppa_log( 'Err', 'Invalid arg wppa_get_album_name(' . $id . ')', true );
449
  return '';
450
  }
451
 
wppa-multitag-widget.php CHANGED
@@ -3,17 +3,25 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
- * Version 6.7.01
7
  *
8
  */
9
 
10
  class MultitagPhotos extends WP_Widget {
 
11
  /** constructor */
12
  function __construct() {
13
  $widget_ops = array( 'classname' => 'wppa_multitag_photos', 'description' => __( 'Display checkboxes to select photos by one or more tags', 'wp-photo-album-plus' ) );
14
  parent::__construct( 'wppa_multitag_photos', __( 'WPPA+ Photo Tags Filter', 'wp-photo-album-plus' ), $widget_ops );
 
 
15
  }
16
 
 
 
 
 
 
17
  /** @see WP_Widget::widget */
18
  function widget($args, $instance) {
19
  global $widget_content;
@@ -31,14 +39,14 @@ class MultitagPhotos extends WP_Widget {
31
 
32
  extract( $args );
33
 
34
- $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Photo Tags Filter', 'wp-photo-album-plus'), 'cols' => '2', 'tags' => array() ) );
35
 
36
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
37
 
38
  // Display the widget
39
  echo $before_widget;
40
 
41
- if ( !empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
42
 
43
  $tags = is_array( $instance['tags'] ) ? implode( ',', $instance['tags'] ) : '';
44
 
@@ -52,12 +60,13 @@ class MultitagPhotos extends WP_Widget {
52
  /** @see WP_Widget::update */
53
  function update( $new_instance, $old_instance ) {
54
 
55
- $instance = $old_instance;
56
- $instance['title'] = strip_tags( $new_instance['title'] );
57
- $cols = $new_instance['cols'];
58
- if ( ! is_numeric($cols) || $cols < '1' ) $cols = '2';
59
- $instance['cols'] = min( max( '1', $cols ), '6' );
60
- $instance['tags'] = $new_instance['tags'];
 
61
  return $instance;
62
  }
63
 
@@ -65,7 +74,8 @@ class MultitagPhotos extends WP_Widget {
65
  function form( $instance ) {
66
 
67
  //Defaults
68
- $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Photo Tags Filter', 'wp-photo-album-plus' ), 'cols' => '2', 'tags' => '' ) );
 
69
  $title = $instance['title'];
70
  $cols = $instance['cols'];
71
  $stags = (array) $instance['tags'];
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
+ * Version 6.7.09
7
  *
8
  */
9
 
10
  class MultitagPhotos extends WP_Widget {
11
+
12
  /** constructor */
13
  function __construct() {
14
  $widget_ops = array( 'classname' => 'wppa_multitag_photos', 'description' => __( 'Display checkboxes to select photos by one or more tags', 'wp-photo-album-plus' ) );
15
  parent::__construct( 'wppa_multitag_photos', __( 'WPPA+ Photo Tags Filter', 'wp-photo-album-plus' ), $widget_ops );
16
+
17
+ $this -> defaults['title'] = __( 'Photo Tags Filter', 'wp-photo-album-plus' );
18
  }
19
 
20
+ var $defaults = array( 'title' => '',
21
+ 'cols' => '2',
22
+ 'tags' => '',
23
+ );
24
+
25
  /** @see WP_Widget::widget */
26
  function widget($args, $instance) {
27
  global $widget_content;
39
 
40
  extract( $args );
41
 
42
+ $instance = wppa_parse_args( (array) $instance, $this -> defaults );
43
 
44
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
45
 
46
  // Display the widget
47
  echo $before_widget;
48
 
49
+ if ( ! empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
50
 
51
  $tags = is_array( $instance['tags'] ) ? implode( ',', $instance['tags'] ) : '';
52
 
60
  /** @see WP_Widget::update */
61
  function update( $new_instance, $old_instance ) {
62
 
63
+ // Defaults
64
+ $instance = wppa_parse_args( $new_instance, $this->defaults );
65
+
66
+ // Sanitize
67
+ $instance['title'] = strip_tags( $instance['title'] );
68
+ $instance['cols'] = min( max( '1', $instance['cols'] ), '6' );
69
+
70
  return $instance;
71
  }
72
 
74
  function form( $instance ) {
75
 
76
  //Defaults
77
+ $instance = wppa_parse_args( $instance, $this->defaults );
78
+
79
  $title = $instance['title'];
80
  $cols = $instance['cols'];
81
  $stags = (array) $instance['tags'];
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.7.07
7
  *
8
  */
9
 
@@ -845,7 +845,6 @@ global $wppa_init_js_data;
845
  wppaTextFrameDelta = '.wppa_get_textframe_delta().';
846
  wppaBoxDelta = '.wppa_get_box_delta().';
847
  wppaSlideShowTimeOut = '.wppa_opt( 'slideshow_timeout' ).';
848
- wppaPreambule = '.wppa_get_preambule().';
849
  wppaFilmShowGlue = '.( wppa_switch( 'film_show_glue') ? 'true' : 'false' ).';
850
  wppaSlideShow = "'.__('Slideshow', 'wp-photo-album-plus').'";
851
  wppaStart = "'.__('Start', 'wp-photo-album-plus').'";
@@ -885,7 +884,6 @@ global $wppa_init_js_data;
885
  wppaLang = "'.$wppa_lang.'";
886
  wppaNextOnCallback = '.( wppa_switch( 'next_on_callback') ? 'true' : 'false' ).';
887
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
888
- wppaSlideWrap = '.( wppa_switch( 'slide_wrap') ? 'true' : 'false' ).';
889
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
890
  wppaSlideBorderWidth = '.$fbw.';
891
  wppaAllowAjax = '.( wppa_switch( 'allow_ajax') ? 'true' : 'false' ).';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.7.09
7
  *
8
  */
9
 
845
  wppaTextFrameDelta = '.wppa_get_textframe_delta().';
846
  wppaBoxDelta = '.wppa_get_box_delta().';
847
  wppaSlideShowTimeOut = '.wppa_opt( 'slideshow_timeout' ).';
 
848
  wppaFilmShowGlue = '.( wppa_switch( 'film_show_glue') ? 'true' : 'false' ).';
849
  wppaSlideShow = "'.__('Slideshow', 'wp-photo-album-plus').'";
850
  wppaStart = "'.__('Start', 'wp-photo-album-plus').'";
884
  wppaLang = "'.$wppa_lang.'";
885
  wppaNextOnCallback = '.( wppa_switch( 'next_on_callback') ? 'true' : 'false' ).';
886
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
 
887
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
888
  wppaSlideBorderWidth = '.$fbw.';
889
  wppaAllowAjax = '.( wppa_switch( 'allow_ajax') ? 'true' : 'false' ).';
wppa-photo-admin-autosave.php CHANGED
@@ -3312,4 +3312,4 @@ function wppa_can_admin_magick( $id ) {
3312
  }
3313
 
3314
  return true;
3315
- }
3312
  }
3313
 
3314
  return true;
3315
+ }
wppa-settings-autosave.php CHANGED
@@ -26,6 +26,7 @@ global $wppa_tags;
26
  global $wp_version;
27
 
28
  // Start test area
 
29
  // End test area
30
 
31
  // Initialize
@@ -341,7 +342,7 @@ global $wp_version;
341
  wppa_opt( 'tf_height_alt') < wppa_opt( 'thumbsize_alt' ) ) ) {
342
  wppa_warning_message( __( 'A thumbframe width or height should not be smaller than a thumbnail size. Please correct the corresponding setting(s) in Table I-C' , 'wp-photo-album-plus') );
343
  }
344
-
345
  // Check for 'many' albums
346
  if ( wppa_opt( 'photo_admin_max_albums' ) ) { // Not OFF
347
  $abs = $wpdb->get_var( "SELECT COUNT(*) FROM `" . WPPA_ALBUMS . "` " );
@@ -2752,7 +2753,7 @@ global $wp_version;
2752
  $clas = 'wppa_feup';
2753
  $tags = 'access,upload';
2754
  wppa_setting($slug, '2', $name, $desc, $html, $help, $clas, $tags);
2755
-
2756
  $name = __('User upload roles', 'wp-photo-album-plus');
2757
  $desc = __('Optionally limit access to selected userroles', 'wp-photo-album-plus');
2758
  $help = esc_js(__('This selection only applies when the previous item is ticked', 'wp-photo-album-plus'));
@@ -8955,8 +8956,8 @@ global $wp_version;
8955
  $desc = __('Select the way the search results should be displayed.', 'wp-photo-album-plus');
8956
  $help = esc_js(__('If you select anything different from "Albums and thumbnails", "Photos only" is assumed (Table IX-E6).', 'wp-photo-album-plus'));
8957
  $slug = 'wppa_search_display_type';
8958
- $opts = array( __('Albums and thumbnails', 'wp-photo-album-plus'),
8959
- __('Slideshow', 'wp-photo-album-plus'),
8960
  __('Slideonly slideshow', 'wp-photo-album-plus'),
8961
  __('Albums only', 'wp-photo-album-plus')
8962
  );
26
  global $wp_version;
27
 
28
  // Start test area
29
+
30
  // End test area
31
 
32
  // Initialize
342
  wppa_opt( 'tf_height_alt') < wppa_opt( 'thumbsize_alt' ) ) ) {
343
  wppa_warning_message( __( 'A thumbframe width or height should not be smaller than a thumbnail size. Please correct the corresponding setting(s) in Table I-C' , 'wp-photo-album-plus') );
344
  }
345
+
346
  // Check for 'many' albums
347
  if ( wppa_opt( 'photo_admin_max_albums' ) ) { // Not OFF
348
  $abs = $wpdb->get_var( "SELECT COUNT(*) FROM `" . WPPA_ALBUMS . "` " );
2753
  $clas = 'wppa_feup';
2754
  $tags = 'access,upload';
2755
  wppa_setting($slug, '2', $name, $desc, $html, $help, $clas, $tags);
2756
+
2757
  $name = __('User upload roles', 'wp-photo-album-plus');
2758
  $desc = __('Optionally limit access to selected userroles', 'wp-photo-album-plus');
2759
  $help = esc_js(__('This selection only applies when the previous item is ticked', 'wp-photo-album-plus'));
8956
  $desc = __('Select the way the search results should be displayed.', 'wp-photo-album-plus');
8957
  $help = esc_js(__('If you select anything different from "Albums and thumbnails", "Photos only" is assumed (Table IX-E6).', 'wp-photo-album-plus'));
8958
  $slug = 'wppa_search_display_type';
8959
+ $opts = array( __('Albums and thumbnails', 'wp-photo-album-plus'),
8960
+ __('Slideshow', 'wp-photo-album-plus'),
8961
  __('Slideonly slideshow', 'wp-photo-album-plus'),
8962
  __('Albums only', 'wp-photo-album-plus')
8963
  );
wppa-slideshow-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -17,10 +17,37 @@ class SlideshowWidget extends WP_Widget {
17
  function __construct() {
18
  $widget_ops = array( 'classname' => 'slideshow_widget', 'description' => __( 'Display a slideshow', 'wp-photo-album-plus' ) );
19
  parent::__construct( 'slideshow_widget', __( 'WPPA+ Sidebar Slideshow', 'wp-photo-album-plus' ), $widget_ops);
 
 
 
 
 
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /** @see WP_Widget::widget */
23
- function widget($args, $instance) {
24
  global $wpdb;
25
 
26
  require_once(dirname(__FILE__) . '/wppa-links.php');
@@ -33,35 +60,19 @@ class SlideshowWidget extends WP_Widget {
33
 
34
  extract( $args );
35
 
36
- $instance = wp_parse_args( (array) $instance,
37
- array( 'title' => __( 'Sidebar Slideshow', 'wp-photo-album-plus' ),
38
- 'album' => '',
39
- 'width' => wppa_opt( 'widget_width' ),
40
- 'height' => round( wppa_opt( 'widget_width' ) * wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' ) ),
41
- 'ponly' => 'no',
42
- 'linkurl' => '',
43
- 'linktitle' => '',
44
- 'subtext' => '',
45
- 'supertext' => '',
46
- 'valign' => 'center',
47
- 'timeout' => '4',
48
- 'film' => 'no',
49
- 'browse' => 'no',
50
- 'name' => 'no',
51
- 'numbar' => 'no',
52
- 'desc' => 'no'
53
- ) );
54
-
55
  $title = apply_filters( 'widget_title', $instance['title'] );
56
  $album = $instance['album'];
57
- if ( $instance['height'] == '0' ) {
58
- $instance['height'] = round( $instance['width'] * wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' ) );
59
- }
60
  $page = in_array( wppa_opt( 'slideonly_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' :
61
  wppa_get_the_landing_page( 'slideonly_widget_linkpage', __( 'Widget landing page', 'wp-photo-album-plus' ) );
62
 
 
 
 
 
 
63
  // Do the widget if we know the album
64
- if ( is_numeric( $album ) && wppa_album_exists( $album ) ) {
65
 
66
  // Open widget
67
  echo $before_widget;
@@ -74,12 +85,13 @@ class SlideshowWidget extends WP_Widget {
74
  // Show text above slideshow
75
  if ( __( $instance['supertext'] ) ) {
76
  echo
77
- '<div style="padding-top:2px; padding-bottom:4px; text-align:center">' .
78
  __( $instance['supertext'] ) .
79
  '</div>';
80
  }
81
 
82
  // Fill in runtime parameters to tune the slideshow
 
83
  if ( $instance['linkurl'] && wppa_opt( 'slideonly_widget_linktype' ) == 'widget' ) {
84
  wppa( 'in_widget_linkurl', $instance['linkurl'] );
85
  wppa( 'in_widget_linktitle', __( $instance['linktitle'] ) );
@@ -96,6 +108,13 @@ class SlideshowWidget extends WP_Widget {
96
  wppa( 'name_on', wppa_checked( $instance['name'] ) );
97
  wppa( 'numbar_on', wppa_checked( $instance['numbar'] ) );
98
  wppa( 'desc_on', wppa_checked( $instance['desc'] ) );
 
 
 
 
 
 
 
99
 
100
  // Open the slideshow container
101
  echo
@@ -135,28 +154,16 @@ class SlideshowWidget extends WP_Widget {
135
  /** @see WP_Widget::update */
136
  function update( $new_instance, $old_instance ) {
137
 
138
- $instance = $old_instance;
139
- $instance['title'] = strip_tags( $new_instance['title'] );
140
- $instance['album'] = $new_instance['album'];
141
- $instance['width'] = $new_instance['width'];
142
- $instance['height'] = $new_instance['height'];
143
- $instance['ponly'] = $new_instance['ponly'];
144
- $instance['linkurl'] = $new_instance['linkurl'];
145
- $instance['linktitle'] = $new_instance['linktitle'];
146
- $instance['supertext'] = $new_instance['supertext'];
147
- $instance['subtext'] = $new_instance['subtext'];
148
- if ( wppa_checked( $instance['ponly'] ) ) {
149
- $instance['valign'] = 'fit';
150
- }
151
- else {
152
- $instance['valign'] = $new_instance['valign'];
153
- }
154
- $instance['timeout'] = $new_instance['timeout'];
155
- $instance['film'] = $new_instance['film'];
156
- $instance['browse'] = $new_instance['browse'];
157
- $instance['name'] = $new_instance['name'];
158
- $instance['numbar'] = $new_instance['numbar'];
159
- $instance['desc'] = $new_instance['desc'];
160
 
161
  return $instance;
162
  }
@@ -165,24 +172,7 @@ class SlideshowWidget extends WP_Widget {
165
  function form( $instance ) {
166
 
167
  // Defaults
168
- $instance = wp_parse_args( (array) $instance,
169
- array( 'title' => __( 'Sidebar Slideshow' , 'wp-photo-album-plus'),
170
- 'album' => '',
171
- 'width' => wppa_opt( 'widget_width' ),
172
- 'height' => round( wppa_opt( 'widget_width' ) * wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' ) ),
173
- 'ponly' => false,
174
- 'linkurl' => '',
175
- 'linktitle' => '',
176
- 'subtext' => '',
177
- 'supertext' => '',
178
- 'valign' => 'center',
179
- 'timeout' => '4',
180
- 'film' => false,
181
- 'browse' => false,
182
- 'name' => false,
183
- 'numbar' => false,
184
- 'desc' => false,
185
- ) );
186
 
187
  // Title
188
  echo
@@ -190,12 +180,47 @@ class SlideshowWidget extends WP_Widget {
190
 
191
  // Album
192
  $body =
193
- '<option value="-2">' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>' .
194
- wppa_album_select_a( array ( 'selected' => $instance['album'], 'path' => wppa_switch( 'hier_albsel' ) ) );
 
 
 
 
195
 
196
  echo
197
  wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  // Sizes and alignment
200
  echo
201
  __( 'Sizes and alignment', 'wp-photo-album-plus' ) . ':' .
@@ -224,7 +249,7 @@ class SlideshowWidget extends WP_Widget {
224
  'height',
225
  $instance['height'],
226
  __( 'Height in pixels', 'wp-photo-album-plus' ),
227
- '50',
228
  '500',
229
  '',
230
  'float'
@@ -235,7 +260,7 @@ class SlideshowWidget extends WP_Widget {
235
  wppa_widget_checkbox( $this,
236
  'ponly',
237
  $instance['ponly'],
238
- __( 'Portrait only:', 'wp-photo-album-plus' )
239
  );
240
 
241
  // Vertical alignment
@@ -267,30 +292,39 @@ class SlideshowWidget extends WP_Widget {
267
 
268
  echo
269
  // Timeout
270
- wppa_widget_number( $this, 'timeout', $instance['timeout'], __( 'Slideshow timeout in seconds', 'wp-photo-album-plus' ), '1', '60' ) .
271
 
272
  // Linkurl
273
- wppa_widget_input( $this,
274
- 'linkurl',
275
- $instance['linkurl'],
276
- __( 'Link to', 'wp-photo-album-plus' ),
277
- __( 'If you want that a click on the image links to another web address, type the full url here.', 'wp-photo-album-plus' )
278
- ) .
 
 
 
279
 
280
- // Name
281
- wppa_widget_checkbox( $this, 'name', $instance['name'], __( 'Show name', 'wp-photo-album-plus' ) ) .
 
 
 
 
 
282
 
283
- // Description
284
- wppa_widget_checkbox( $this, 'desc', $instance['desc'], __( 'Show description', 'wp-photo-album-plus' ) ) .
285
 
286
- // Filmstrip
287
- wppa_widget_checkbox( $this, 'film', $instance['film'], __( 'Show filmstrip', 'wp-photo-album-plus' ) ) .
288
 
289
- // Browsebar
290
- wppa_widget_checkbox( $this, 'browse', $instance['browse'], __( 'Show browsebar', 'wp-photo-album-plus' ) ) .
291
 
292
- // Numbar
293
- wppa_widget_checkbox( $this, 'numbar', $instance['numbar'], __( 'Show number bar', 'wp-photo-album-plus' ) );
 
294
 
295
  // qTranslate supported textfields
296
  echo
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
+ * Version 6.7.09
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
17
  function __construct() {
18
  $widget_ops = array( 'classname' => 'slideshow_widget', 'description' => __( 'Display a slideshow', 'wp-photo-album-plus' ) );
19
  parent::__construct( 'slideshow_widget', __( 'WPPA+ Sidebar Slideshow', 'wp-photo-album-plus' ), $widget_ops);
20
+
21
+ // Fix non constant defaults
22
+ $this -> defaults['title'] = __( 'Sidebar Slideshow', 'wp-photo-album-plus' );
23
+ $this -> defaults['width'] = get_option( 'wppa_widget_width' );
24
+
25
  }
26
 
27
+ // Default settins. Can not use functions or calculations here. Only constants are allowed
28
+ var $defaults = array( 'title' => '',
29
+ 'album' => '-2',
30
+ 'width' => '0',
31
+ 'height' => '0',
32
+ 'ponly' => 'no',
33
+ 'linkurl' => '',
34
+ 'linktitle' => '',
35
+ 'subtext' => '',
36
+ 'supertext' => '',
37
+ 'valign' => 'center',
38
+ 'timeout' => '4',
39
+ 'film' => 'no',
40
+ 'browse' => 'no',
41
+ 'name' => 'no',
42
+ 'numbar' => 'no',
43
+ 'desc' => 'no',
44
+ 'maxslides' => '100',
45
+ 'random' => 'no',
46
+ 'incsubs' => 'no',
47
+ );
48
+
49
  /** @see WP_Widget::widget */
50
+ function widget( $args, $instance ) {
51
  global $wpdb;
52
 
53
  require_once(dirname(__FILE__) . '/wppa-links.php');
60
 
61
  extract( $args );
62
 
63
+ $instance = wppa_parse_args( (array) $instance, $this->defaults );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  $title = apply_filters( 'widget_title', $instance['title'] );
65
  $album = $instance['album'];
 
 
 
66
  $page = in_array( wppa_opt( 'slideonly_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' :
67
  wppa_get_the_landing_page( 'slideonly_widget_linkpage', __( 'Widget landing page', 'wp-photo-album-plus' ) );
68
 
69
+ // Calculate the height if set to 0
70
+ if ( ! $instance['height'] ) {
71
+ $instance['height'] = round( wppa_opt( 'widget_width' ) * wppa_opt( 'maxheight' ) / wppa_opt( 'fullsize' ) );
72
+ }
73
+
74
  // Do the widget if we know the album
75
+ if ( is_numeric( $album ) && ( wppa_album_exists( $album ) || $album == '-2' ) ) {
76
 
77
  // Open widget
78
  echo $before_widget;
85
  // Show text above slideshow
86
  if ( __( $instance['supertext'] ) ) {
87
  echo
88
+ '<div style="padding-top:2px; padding-bottom:4px; text-align:center" >' .
89
  __( $instance['supertext'] ) .
90
  '</div>';
91
  }
92
 
93
  // Fill in runtime parameters to tune the slideshow
94
+ wppa_reset_occurrance();
95
  if ( $instance['linkurl'] && wppa_opt( 'slideonly_widget_linktype' ) == 'widget' ) {
96
  wppa( 'in_widget_linkurl', $instance['linkurl'] );
97
  wppa( 'in_widget_linktitle', __( $instance['linktitle'] ) );
108
  wppa( 'name_on', wppa_checked( $instance['name'] ) );
109
  wppa( 'numbar_on', wppa_checked( $instance['numbar'] ) );
110
  wppa( 'desc_on', wppa_checked( $instance['desc'] ) );
111
+ wppa( 'max_slides_in_ss_widget', $instance['maxslides'] );
112
+ wppa( 'is_random', wppa_checked( $instance['random'] ) );
113
+
114
+ // Including subalbums?
115
+ if ( $album > '0' && wppa_checked( $instance['incsubs'] ) ) {
116
+ $album = wppa_alb_to_enum_children( $album );
117
+ }
118
 
119
  // Open the slideshow container
120
  echo
154
  /** @see WP_Widget::update */
155
  function update( $new_instance, $old_instance ) {
156
 
157
+ // Completize all parms
158
+ $instance = wppa_parse_args( $new_instance, $this->defaults );
159
+
160
+ // Sanitize certain args
161
+ $instance['title'] = strip_tags( $instance['title'] );
162
+ $instance['linkurl'] = $instance['linkurl'];
163
+ $instance['linktitle'] = strip_tags( $instance['linktitle'] );
164
+ $instance['supertext'] = force_balance_tags( $instance['supertext'] );
165
+ $instance['subtext'] = force_balance_tags( $instance['subtext'] );
166
+ $instance['linkurl'] = esc_url( $instance['linkurl'] );
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  return $instance;
169
  }
172
  function form( $instance ) {
173
 
174
  // Defaults
175
+ $instance = wppa_parse_args( (array) $instance, $this->defaults );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
 
177
  // Title
178
  echo
180
 
181
  // Album
182
  $body =
183
+ '<option value="-2"' . ( $instance['album'] == '-2' ? ' selected="selected"' : '' ) . ' >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>' .
184
+ wppa_album_select_a( array (
185
+ 'selected' => $instance['album'],
186
+ 'path' => wppa_switch( 'hier_albsel' ),
187
+ 'sort' => true,
188
+ ) );
189
 
190
  echo
191
  wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
192
 
193
+ // Including sub albums?
194
+ echo
195
+ wppa_widget_checkbox( $this,
196
+ 'incsubs',
197
+ $instance['incsubs'],
198
+ __( 'Including subalbums', 'wp-photo-album-plus' )
199
+ );
200
+
201
+ // Max
202
+ $body =
203
+ '<option value="10" ' . ( $instance['maxslides'] == '10' ? 'selected="selected"' : '' ) . ' >10</option>' .
204
+ '<option value="25" ' . ( $instance['maxslides'] == '25' ? 'selected="selected"' : '' ) . ' >25</option>' .
205
+ '<option value="50" ' . ( $instance['maxslides'] == '50' ? 'selected="selected"' : '' ) . ' >50</option>' .
206
+ '<option value="75" ' . ( $instance['maxslides'] == '75' ? 'selected="selected"' : '' ) . ' >75</option>' .
207
+ '<option value="100" ' . ( $instance['maxslides'] == '100' ? 'selected="selected"' : '' ) . ' >100</option>' .
208
+ '<option value="150" ' . ( $instance['maxslides'] == '150' ? 'selected="selected"' : '' ) . ' >150</option>' .
209
+ '<option value="200" ' . ( $instance['maxslides'] == '200' ? 'selected="selected"' : '' ) . ' >200</option>' .
210
+ '<option value="250" ' . ( $instance['maxslides'] == '250' ? 'selected="selected"' : '' ) . ' >250</option>' .
211
+ '<option value="350" ' . ( $instance['maxslides'] == '350' ? 'selected="selected"' : '' ) . ' >350</option>' .
212
+ '<option value="500" ' . ( $instance['maxslides'] == '500' ? 'selected="selected"' : '' ) . ' >500</option>';
213
+ echo
214
+ wppa_widget_selection_frame( $this, 'maxslides', $body, __( 'Max slides', 'wp-photo-album-plus' ), false, __( 'High numbers may cause slow pageloads!', 'wp-photo-album-plus' ) );
215
+
216
+ // Random
217
+ echo
218
+ wppa_widget_checkbox( $this,
219
+ 'random',
220
+ $instance['random'],
221
+ __( 'Random sequence', 'wp-photo-album-plus' )
222
+ );
223
+
224
  // Sizes and alignment
225
  echo
226
  __( 'Sizes and alignment', 'wp-photo-album-plus' ) . ':' .
249
  'height',
250
  $instance['height'],
251
  __( 'Height in pixels', 'wp-photo-album-plus' ),
252
+ '0',
253
  '500',
254
  '',
255
  'float'
260
  wppa_widget_checkbox( $this,
261
  'ponly',
262
  $instance['ponly'],
263
+ __( 'Portrait only', 'wp-photo-album-plus' )
264
  );
265
 
266
  // Vertical alignment
292
 
293
  echo
294
  // Timeout
295
+ wppa_widget_number( $this, 'timeout', $instance['timeout'], __( 'Slideshow timeout in seconds', 'wp-photo-album-plus' ), '1', '60' ) ;
296
 
297
  // Linkurl
298
+ if ( wppa_opt( 'slideonly_widget_linktype' ) == 'widget' ) {
299
+ echo
300
+ wppa_widget_input( $this,
301
+ 'linkurl',
302
+ $instance['linkurl'],
303
+ __( 'Link to', 'wp-photo-album-plus' ),
304
+ __( 'If you want that a click on the image links to another web address, type the full url here.', 'wp-photo-album-plus' )
305
+ );
306
+ }
307
 
308
+ // Additional boxes
309
+ echo
310
+ __( 'Slideshow options to display', 'wp-photo-album-plus' ) .
311
+ '<div style="padding:6px;border:1px solid lightgray;margin-top:2px;margin-bottom:1em;" >' .
312
+
313
+ // Name
314
+ wppa_widget_checkbox( $this, 'name', $instance['name'], __( 'Show name', 'wp-photo-album-plus' ) ) .
315
 
316
+ // Description
317
+ wppa_widget_checkbox( $this, 'desc', $instance['desc'], __( 'Show description', 'wp-photo-album-plus' ) ) .
318
 
319
+ // Filmstrip
320
+ wppa_widget_checkbox( $this, 'film', $instance['film'], __( 'Show filmstrip', 'wp-photo-album-plus' ) ) .
321
 
322
+ // Browsebar
323
+ wppa_widget_checkbox( $this, 'browse', $instance['browse'], __( 'Show browsebar', 'wp-photo-album-plus' ) ) .
324
 
325
+ // Numbar
326
+ wppa_widget_checkbox( $this, 'numbar', $instance['numbar'], __( 'Show number bar', 'wp-photo-album-plus' ) ) .
327
+ '</div>';
328
 
329
  // qTranslate supported textfields
330
  echo
wppa-thumbnails.php CHANGED
@@ -1883,7 +1883,7 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1883
 
1884
  $result .= '</div>';
1885
  }
1886
-
1887
  wppa_out( $result );
1888
  }
1889
 
1883
 
1884
  $result .= '</div>';
1885
  }
1886
+
1887
  wppa_out( $result );
1888
  }
1889
 
wppa-tinymce-photo.php CHANGED
@@ -2,76 +2,75 @@
2
  /* wppa-tinymce-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 6.7.08
6
  *
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) )
10
  die( "Can't load this file directly" );
11
 
12
- class wppaPhoto
13
- {
14
- function __construct() {
15
- add_action( 'init', array( $this, 'action_admin_init' ) ); // 'admin_init'
16
- }
17
 
18
- function action_admin_init() {
19
- // only hook up these filters if we're in the admin panel, and the current user has permission
20
- // to edit posts or pages, and the feature is enabled
21
- // Only activate if the [photo] shortcode is enabled
22
- if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
23
- if ( wppa_user_is( 'administrator' ) || ( wppa_switch( 'enable_generator' ) && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) ) {
24
- add_filter( 'mce_buttons', array( $this, 'filter_mce_button' ) );
25
- add_filter( 'mce_external_plugins', array( $this, 'filter_mce_plugin' ) );
26
- }
27
- }
28
- }
29
 
30
- function filter_mce_button( $buttons ) {
31
- // add a separation before our button.
32
- array_push( $buttons, ' ', 'myphoto_button' );
33
- return $buttons;
34
  }
 
 
 
 
 
 
 
 
35
 
36
- function filter_mce_plugin( $plugins ) {
37
- // this plugin file will work the magic of our button
 
 
 
 
 
38
  $file = 'js/wppa-tinymce-photo.js';
39
- $plugins['wppaphoto'] = plugin_dir_url( __FILE__ ) . $file;
40
- return $plugins;
41
  }
42
-
 
43
  }
44
 
45
- $wppaphoto = new wppaPhoto();
46
-
47
- add_action('admin_head', 'wppa_inject_2_js');
48
 
49
  function wppa_inject_2_js() {
50
  global $wppa_api_version;
51
-
52
- // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
53
- echo('<script type="text/javascript">'."\n");
54
- echo('/* <![CDATA[ */'."\n");
55
- echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
56
- echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
57
- echo("\t".'wppaPhotoDirectory = "'.WPPA_UPLOAD_URL.'/";'."\n");
58
- echo("\t".'wppaThumbDirectory = "'.WPPA_UPLOAD_URL.'/thumbs/";'."\n");
59
- echo("\t".'wppaTempDirectory = "'.WPPA_UPLOAD_URL.'/temp/";'."\n");
60
- echo("\t".'wppaFontDirectory = "'.WPPA_UPLOAD_URL.'/fonts/";'."\n");
61
- echo("\t".'wppaNoPreview = "'.__('No Preview available', 'wp-photo-album-plus').'";'."\n");
62
- echo("\t".'wppaVersion = "'.$wppa_api_version.'";'."\n");
63
- echo("\t".'wppaSiteUrl = "'.site_url().'";'."\n");
64
- echo("\t".'wppaWppaUrl = "'.WPPA_URL.'";'."\n");
65
- echo("\t".'wppaIncludeUrl = "'.trim(includes_url(), '/').'";'."\n");
66
- echo("\t".'wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";');
67
- echo("\t".'wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";');
68
- echo("\t".'wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";');
69
- echo("\t".'wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";');
70
- // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
71
- // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
72
- // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
73
- echo("/* ]]> */\n");
74
- echo("</script>\n");
 
 
 
75
  }
76
 
77
  function wppa_make_tinymce_photo_dialog() {
@@ -324,29 +323,30 @@ global $wpdb;
324
  // Most recent 100 photos of this owner
325
  foreach ( $my_photos as $photo ) {
326
 
327
- // Find name
328
- $name = stripslashes( __( $photo['name'] ) );
329
- if ( strlen( $name ) > '50' ) $name = substr( $name, '0', '50' ) . '...';
330
-
331
- // Make the html
332
  if ( get_option( 'wppa_file_system' ) == 'flat' ) {
333
- $result .= '<option' .
334
- ' value="' . wppa_fix_poster_ext( $photo['id'] . '.' . $photo['ext'], $photo['id'] ) . '"' .
335
- ( $selected == $photo['id'] ? ' selected="selected"' : '' ) .
336
- ' >' .
337
- $name .
338
- ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
339
- '</option>';
340
  }
341
  else {
342
- $result .= '<option' .
343
- ' value="' . wppa_fix_poster_ext( wppa_expand_id( $photo['id'] ) . '.' . $photo['ext'], $photo['id'] ) . '"' .
344
- ( $selected == $photo['id'] ? ' selected="selected"' : '' ) .
345
- ' >' .
346
- $name .
347
- ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
348
- '</option>';
349
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  }
351
  }
352
  else {
2
  /* wppa-tinymce-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 6.7.09
6
  *
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) )
10
  die( "Can't load this file directly" );
11
 
12
+ add_action( 'init', 'wppa_tinymce_photo_action_init' ); // 'admin_init'
 
 
 
 
13
 
14
+ function wppa_tinymce_photo_action_init() {
 
 
 
 
 
 
 
 
 
 
15
 
16
+ if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
17
+
18
+ add_filter( 'mce_buttons', 'wppa_filter_mce_photo_button', 11 );
19
+ add_filter( 'mce_external_plugins', 'wppa_filter_mce_photo_plugin' );
20
  }
21
+ }
22
+
23
+ function wppa_filter_mce_photo_button( $buttons ) {
24
+
25
+ // add a separation before our button.
26
+ array_push( $buttons, ' ', 'wppa_photo_button' );
27
+ return $buttons;
28
+ }
29
 
30
+ function wppa_filter_mce_photo_plugin( $plugins ) {
31
+
32
+ // this plugin file will work the magic of our button
33
+ if ( is_file( WPPA_PATH . '/js/wppa-tinymce-shortcodes.min.js' ) ) {
34
+ $file = 'js/wppa-tinymce-photo.min.js';
35
+ }
36
+ else {
37
  $file = 'js/wppa-tinymce-photo.js';
 
 
38
  }
39
+ $plugins['wppaphoto'] = plugin_dir_url( __FILE__ ) . $file;
40
+ return $plugins;
41
  }
42
 
43
+ add_action( 'admin_head', 'wppa_inject_2_js' );
 
 
44
 
45
  function wppa_inject_2_js() {
46
  global $wppa_api_version;
47
+ static $done;
48
+
49
+ if ( wppa_switch( 'photo_shortcode_enabled' ) && ! $done ) {
50
+
51
+ // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
52
+ echo('<script type="text/javascript">'."\n");
53
+ echo('/* <![CDATA[ */'."\n");
54
+ echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
55
+ echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
56
+ echo("\t".'wppaPhotoDirectory = "'.WPPA_UPLOAD_URL.'/";'."\n");
57
+ echo("\t".'wppaThumbDirectory = "'.WPPA_UPLOAD_URL.'/thumbs/";'."\n");
58
+ echo("\t".'wppaTempDirectory = "'.WPPA_UPLOAD_URL.'/temp/";'."\n");
59
+ echo("\t".'wppaFontDirectory = "'.WPPA_UPLOAD_URL.'/fonts/";'."\n");
60
+ echo("\t".'wppaNoPreview = "'.__('No Preview available', 'wp-photo-album-plus').'";'."\n");
61
+ echo("\t".'wppaVersion = "'.$wppa_api_version.'";'."\n");
62
+ echo("\t".'wppaSiteUrl = "'.site_url().'";'."\n");
63
+ echo("\t".'wppaWppaUrl = "'.WPPA_URL.'";'."\n");
64
+ echo("\t".'wppaIncludeUrl = "'.trim(includes_url(), '/').'";'."\n");
65
+ echo("\t".'wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";');
66
+ echo("\t".'wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";');
67
+ echo("\t".'wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";');
68
+ echo("\t".'wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";');
69
+ echo("/* ]]> */\n");
70
+ echo("</script>\n");
71
+
72
+ $done = true;
73
+ }
74
  }
75
 
76
  function wppa_make_tinymce_photo_dialog() {
323
  // Most recent 100 photos of this owner
324
  foreach ( $my_photos as $photo ) {
325
 
326
+ $name = stripslashes(__($photo['name']));
327
+ if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
328
+
 
 
329
  if ( get_option( 'wppa_file_system' ) == 'flat' ) {
330
+ $val = $photo['id'] . '.' . $photo['ext'];
 
 
 
 
 
 
331
  }
332
  else {
333
+ $val = wppa_expand_id( $photo['id'] ) . '.' . $photo['ext'];
 
 
 
 
 
 
334
  }
335
+
336
+ if ( wppa_has_audio() && is_file( WPPA_UPLOAD_PATH . '/' . wppa_fix_poster_ext( $val, $photo['id'] ) ) ) {
337
+ $value = wppa_fix_poster_ext( $val );
338
+ }
339
+ else {
340
+ $value = $val;
341
+ }
342
+
343
+ $result .= '<option' .
344
+ ' value="' . $value . '"' .
345
+ ' >' .
346
+ $name .
347
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
348
+ '</option>';
349
+
350
  }
351
  }
352
  else {
wppa-tinymce-shortcodes.php CHANGED
@@ -3,46 +3,46 @@
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
- * Version 6.7.07
7
  *
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) )
11
  die( "Can't load this file directly" );
12
 
13
- class wppaGallery
14
- {
15
- function __construct() {
16
- add_action( 'init', array( $this, 'action_admin_init' ) ); // 'admin_init'
17
- }
18
 
19
- function action_admin_init() {
20
- // only hook up these filters if we're in the admin panel, and the current user has permission
21
- // to edit posts or pages, and the feature is enabled
22
- if ( wppa_user_is( 'administrator' ) || ( wppa_switch( 'enable_generator' ) && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) ) {
23
- add_filter( 'mce_buttons', array( $this, 'filter_mce_button' ) );
24
- add_filter( 'mce_external_plugins', array( $this, 'filter_mce_plugin' ) );
25
- }
26
- }
27
 
28
- function filter_mce_button( $buttons ) {
29
- // add a separation before our button.
30
- array_push( $buttons, '|', 'mygallery_button' );
31
- return $buttons;
32
- }
33
 
34
- function filter_mce_plugin( $plugins ) {
35
- // this plugin file will work the magic of our button
36
- $file = 'js/wppa-tinymce-shortcodes.js';
37
- $plugins['wppagallery'] = plugin_dir_url( __FILE__ ) . $file;
38
- return $plugins;
39
  }
 
 
 
40
 
 
 
41
  }
42
 
43
- $wppagallery = new wppaGallery();
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- add_action('admin_head', 'wppa_inject_js');
46
 
47
  function wppa_inject_js() {
48
  global $wppa_api_version;
@@ -119,7 +119,17 @@ global $wpdb;
119
 
120
  // Make the html
121
  $result =
122
- '<style>#TB_ajaxContent {box-sizing:border-box; width:100% !important;}</style>'.
 
 
 
 
 
 
 
 
 
 
123
  '<div id="wppagallery-form">'.
124
  '<style type="text/css">'.
125
  '#wppagallery-table tr, #wppagallery-table th, #wppagallery-table td {'.
@@ -133,12 +143,12 @@ global $wpdb;
133
  '<th><label for="wppagallery-top-type">'.__('Type of WPPA display:', 'wp-photo-album-plus').'</label></th>'.
134
  '<td>'.
135
  '<select id="wppagallery-top-type" name="type" onchange="wppaGalleryEvaluate()">'.
136
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a display type', 'wp-photo-album-plus').' --</option>'.
137
- '<option value="galerytype" style="color:#070" >'.__('A gallery with covers and/or thumbnails', 'wp-photo-album-plus').'</option>'.
138
- '<option value="slidestype" style="color:#070" >'.__('A slideshow', 'wp-photo-album-plus').'</option>'.
139
- '<option value="singletype" style="color:#070" >'.__('A single image', 'wp-photo-album-plus').'</option>'.
140
- '<option value="searchtype" style="color:#070" >'.__('A search/selection box', 'wp-photo-album-plus').'</option>'.
141
- '<option value="misceltype" style="color:#070" >'.__('An other box type', 'wp-photo-album-plus').'</option>'.
142
  '</select>'.
143
  '</td>'.
144
  '</tr>'.
@@ -148,11 +158,11 @@ global $wpdb;
148
  '<th><label for="wppagallery-galery-type">'.__('Type of gallery display:', 'wp-photo-album-plus').'</label></th>'.
149
  '<td>'.
150
  '<select id="wppagallery-galery-type" name="type" onchange="wppaGalleryEvaluate()">'.
151
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a gallery type', 'wp-photo-album-plus').' --</option>'.
152
- '<option value="cover" style="color:#070" >'.__('The cover(s) of specific album(s)', 'wp-photo-album-plus').'</option>'.
153
- '<option value="content" style="color:#070" >'.__('The content of specific album(s)', 'wp-photo-album-plus').'</option>'.
154
- '<option value="covers" style="color:#070" >'.__('The covers of the subalbums of specific album(s)', 'wp-photo-album-plus').'</option>'.
155
- '<option value="thumbs" style="color:#070" >'.__('The thumbnails of specific album(s)', 'wp-photo-album-plus').'</option>'.
156
  '</select>'.
157
  '</td>'.
158
  '</tr>'.
@@ -162,11 +172,11 @@ global $wpdb;
162
  '<th><label for="wppagallery-slides-type">'.__('Type of slideshow:', 'wp-photo-album-plus').'</label></th>'.
163
  '<td>'.
164
  '<select id="wppagallery-slides-type" name="type" onchange="wppaGalleryEvaluate()">'.
165
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a slideshow type', 'wp-photo-album-plus').' --</option>'.
166
- '<option value="slide" style="color:#070" >'.__('A fully featured slideshow', 'wp-photo-album-plus').'</option>'.
167
- '<option value="slideonly" style="color:#070" >'.__('A slideshow without supporting boxes', 'wp-photo-album-plus').'</option>'.
168
- '<option value="slideonlyf" style="color:#070" >'.__('A slideshow with a filmstrip only', 'wp-photo-album-plus').'</option>'.
169
- '<option value="filmonly" style="color:#070" >'.__('A filmstrip only', 'wp-photo-album-plus').'</option>'.
170
  '</select>'.
171
  '</td>'.
172
  '</tr>'.
@@ -176,11 +186,11 @@ global $wpdb;
176
  '<th><label for="wppagallery-single-type">'.__('Type of single image:', 'wp-photo-album-plus').'</label></th>'.
177
  '<td>'.
178
  '<select id="wppagallery-single-type" name="type" onchange="wppaGalleryEvaluate()">'.
179
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a single image type', 'wp-photo-album-plus').' --</option>'.
180
- '<option value="photo" style="color:#070" >'.__('A plain single photo', 'wp-photo-album-plus').'</option>'.
181
- '<option value="mphoto" style="color:#070" >'.__('A single photo with caption', 'wp-photo-album-plus').'</option>'.
182
- '<option value="xphoto" style="color:#070" >'.__('A single photo with extended caption', 'wp-photo-album-plus').'</option>'.
183
- '<option value="slphoto" style="color:#070" >'.__('A single photo in the style of a slideshow', 'wp-photo-album-plus').'</option>'.
184
  '</select>'.
185
  '</td>'.
186
  '</tr>'.
@@ -190,13 +200,13 @@ global $wpdb;
190
  '<th><label for="wppagallery-search-type">'.__('Type of search:', 'wp-photo-album-plus').'</label></th>'.
191
  '<td>'.
192
  '<select id="wppagallery-search-type" name="type" onchange="wppaGalleryEvaluate()">'.
193
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a search type', 'wp-photo-album-plus').' --</option>'.
194
- '<option value="search" style="color:#070" >'.__('A search box', 'wp-photo-album-plus').'</option>'.
195
- '<option value="supersearch" style="color:#070" >'.__('A supersearch box', 'wp-photo-album-plus').'</option>'.
196
- '<option value="tagcloud" style="color:#070" >'.__('A tagcloud box', 'wp-photo-album-plus').'</option>'.
197
- '<option value="multitag" style="color:#070" >'.__('A multitag box', 'wp-photo-album-plus').'</option>'.
198
- '<option value="superview" style="color:#070" >'.__('A superview box', 'wp-photo-album-plus').'</option>'.
199
- '<option value="calendar" style="color:#070" >'.__('A calendar box', 'wp-photo-album-plus').'</option>'.
200
  '</select>'.
201
  '</td>'.
202
  '</tr>'.
@@ -206,7 +216,7 @@ global $wpdb;
206
  '<th><label for="wppagallery-miscel-type">'.__('Type miscellaneous:', 'wp-photo-album-plus').'</label></th>'.
207
  '<td>'.
208
  '<select id="wppagallery-miscel-type" name="type" onchange="wppaGalleryEvaluate()">'.
209
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a miscellaneous display', 'wp-photo-album-plus').' --</option>'.
210
  '<option value="generic">'.__('A generic albums display', 'wp-photo-album-plus').'</option>'.
211
  '<option value="upload">'.__('An upload box', 'wp-photo-album-plus').'</option>'.
212
  '<option value="landing">'.__('A landing page shortcode', 'wp-photo-album-plus').'</option>'.
@@ -229,7 +239,7 @@ global $wpdb;
229
  $users = get_option( 'wppa_super_users', array() );
230
  foreach( $users as $user ) {
231
  $result .=
232
- '<option value="'.$user.'" class="wppagallery-admin" style="color:#070" >'.$user.'</option>';
233
  }
234
  $result .=
235
  '</select>'.
@@ -241,7 +251,7 @@ global $wpdb;
241
  '<th><label for="wppagallery-album-type">'.__('Kind of selection:', 'wp-photo-album-plus').'</label></th>'.
242
  '<td>'.
243
  '<select id="wppagallery-album-type" name="type" onchange="wppaGalleryEvaluate()">'.
244
- '<option value="" selected="selected" disabled="disabled" style="color:#700" >-- '.__('Please select a type of selection to be used', 'wp-photo-album-plus').' --</option>'.
245
  '<option value="real">'.__('One or more wppa+ albums', 'wp-photo-album-plus').'</option>'.
246
  '<option value="virtual">'.__('A special selection', 'wp-photo-album-plus').'</option>'.
247
  '</select>'.
@@ -253,7 +263,7 @@ global $wpdb;
253
  '<th><label for="wppagallery-album-virt">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
254
  '<td>'.
255
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
256
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
257
  '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
258
  '<option value="#topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
259
  '<option value="#lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
@@ -273,7 +283,7 @@ global $wpdb;
273
  '<th><label for="wppagallery-album-virt-cover">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
274
  '<td>'.
275
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
276
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
277
  '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
278
  '<option value="#owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
279
  '<option value="#cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
@@ -298,7 +308,7 @@ global $wpdb;
298
  if ( $albums ) {
299
 
300
  // Please select
301
- $result .= '<option id="wppagallery-album-0" value="0" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select one or more albums', 'wp-photo-album-plus').' --</option>';
302
 
303
  // All standard albums
304
  foreach ( $albums as $album ) {
@@ -307,7 +317,7 @@ global $wpdb;
307
  }
308
  }
309
  else {
310
- $result .= '<option value="0" >' . __('There are no albums yet', 'wp-photo-album-plus') . '</option>';
311
  }
312
  $result .= '</select>';
313
  }
@@ -345,12 +355,12 @@ global $wpdb;
345
  if ( $albums ) {
346
 
347
  // Please select
348
- $result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected="selected" style="color:#070" >-- '.__('All albums', 'wp-photo-album-plus').' --</option>';
349
 
350
  // All standard albums
351
  foreach ( $albums as $album ) {
352
  $id = $album['id'];
353
- $result .= '<option class="wppagallery-album-ropt" style="color:#070" value="' . $id . '" >'.stripslashes( __( $album['name'] ) ) . ' (' . $id . ')</option>';
354
  }
355
  }
356
  else {
@@ -367,7 +377,7 @@ global $wpdb;
367
  '<th><label for="wppagallery-owner">'.__('The album owner:', 'wp-photo-album-plus').'</label></th>'.
368
  '<td>'.
369
  '<select id="wppagallery-owner" name="owner" class="wppagallery-owner" onchange="wppaGalleryEvaluate()">'.
370
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select a user', 'wp-photo-album-plus').' --</option>'.
371
  '<option value="#me" >-- '.__('The logged in visitor', 'wp-photo-album-plus').' --</option>';
372
  $users = wppa_get_users();
373
  if ( $users ) foreach ( $users as $user ) {
@@ -385,14 +395,14 @@ global $wpdb;
385
  '<tr id="wppagallery-owner-parent-tr" style="display:none;" >'.
386
  '<th><label for="wppagallery-owner-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
387
  '<td>'.
388
- '<select id="wppagallery-owner-parent" style="color:#070;max-width:400px;" name="parentalbum" multiple="multiple" onchange="wppaGalleryEvaluate()">';
389
  if ( $albums ) {
390
 
391
  // Please select
392
- $result .= '<option value="" selected="selected" >-- '.__('No parent specification', 'wp-photo-album-plus').' --</option>';
393
 
394
  // Generic
395
- $result .= '<option value="0" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
396
 
397
  // All standard albums
398
  foreach ( $albums as $album ) {
@@ -411,11 +421,11 @@ global $wpdb;
411
  '<tr id="wppagallery-album-parent-tr" style="display:none;" >'.
412
  '<th><label for="wppagallery-album-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
413
  '<td>'.
414
- '<select id="wppagallery-album-parent-parent" style="color:#070;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
415
  if ($albums) {
416
 
417
  // Please select
418
- $result .= '<option id="wppagallery-album-0" value="0" selected="selected" style="color:#700" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
419
 
420
  // All standard albums
421
  foreach ( $albums as $album ) {
@@ -450,8 +460,8 @@ global $wpdb;
450
  '<tr id="wppagallery-albumcat-tr" style="display:none;" >'.
451
  '<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
452
  '<td>'.
453
- '<select id="wppagallery-albumcat" style="color:#700;" onchange="wppaGalleryEvaluate()" multiple="multiple" >'.
454
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >'.__('--- please select category ---', 'wp-photo-album-plus').'</option>';
455
  if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
456
  $result .= '<option class="wppagallery-albumcat" value="'.$cat.'" >'.$cat.'</option>';
457
  }
@@ -468,19 +478,35 @@ global $wpdb;
468
  if ( $photos ) {
469
 
470
  // Please select
471
- $result .= '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select a photo', 'wp-photo-album-plus').' --</option>';
472
  $result .= '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
473
 
474
  // Most recent 100 photos
475
  foreach ( $photos as $photo ) {
 
476
  $name = stripslashes(__($photo['name']));
477
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
 
478
  if ( get_option( 'wppa_file_system' ) == 'flat' ) {
479
- $result .= '<option value="'.wppa_fix_poster_ext($photo['id'].'.'.$photo['ext'], $photo['id']).'" >'.$name.' ('.wppa_get_album_name($photo['album']).')'.'</option>';
 
 
 
 
 
 
 
480
  }
481
  else {
482
- $result .= '<option value="'.wppa_fix_poster_ext(wppa_expand_id($photo['id']).'.'.$photo['ext'], $photo['id']).'" >'.$name.' ('.wppa_get_album_name($photo['album']).')'.'</option>';
483
  }
 
 
 
 
 
 
 
484
  }
485
  $result .= '<option value="#last" >-- '.__('The most recently uploaded photo', 'wp-photo-album-plus').' --</option>'.
486
  '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
@@ -509,8 +535,8 @@ global $wpdb;
509
  '<tr id="wppagallery-phototags-tr" style="display:none;" >'.
510
  '<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
511
  '<td>'.
512
- '<select id="wppagallery-phototags" style="color:#700;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
513
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
514
  if ( $tags ) foreach ( array_keys($tags) as $tag ) {
515
  $result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
516
  }
@@ -541,7 +567,7 @@ global $wpdb;
541
  '<tr id="wppagallery-rootalbum-tr" style="display:none;" >'.
542
  '<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
543
  '<td>'.
544
- '<select id="wppagallery-rootalbum" style="color:#070" onchange="wppaGalleryEvaluate()" >'.
545
  '<option value="0" selected="selected" >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
546
  if ( $albums ) {
547
 
@@ -560,7 +586,7 @@ global $wpdb;
560
  '<tr id="wppagallery-landing-tr" style="display:none;" >'.
561
  '<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
562
  '<td>'.
563
- '<select id="wppagallery-landing" style="color:#070" onchange="wppaGalleryEvaluate()" >'.
564
  '<option value="0" selected="selected" >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
565
  if ( $pages ) {
566
  foreach( $pages as $page ) {
@@ -583,13 +609,13 @@ global $wpdb;
583
  '<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').'&nbsp;'.
584
  '<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGalleryEvaluate()">';
585
  if ( $tags ) {
586
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('Please select the tags to show', 'wp-photo-album-plus').' --</option>';
587
  foreach( array_keys($tags) as $tag ) {
588
- $result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'"style="color:#700" >'.$tag.'</option>';
589
  }
590
  }
591
  else {
592
- '<option value="" disabled="disabled" selected="selected" style="color:#700" >-- '.__('There are no tags', 'wp-photo-album-plus').' --</option>';
593
  }
594
  $result .= '</select>'.
595
  '</td>'.
@@ -603,7 +629,7 @@ global $wpdb;
603
  if ( $albums ) {
604
 
605
  // Please select
606
- $result .= '<option value="" selected="selected" style="color:#700" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
607
 
608
  // All standard albums
609
  foreach ( $albums as $album ) {
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
+ * Version 6.7.09
7
  *
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) )
11
  die( "Can't load this file directly" );
12
 
13
+ add_action( 'admin_init', 'wppa_tinymce_gallery_action_init' );
 
 
 
 
14
 
15
+ function wppa_tinymce_gallery_action_init() {
 
 
 
 
 
 
 
16
 
17
+ // only hook up these filters if we're in the admin panel, and the current user has permission
18
+ // to edit posts or pages, and the feature is enabled
19
+ if ( wppa_user_is( 'administrator' ) || ( wppa_switch( 'enable_generator' ) && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) ) {
 
 
20
 
21
+ add_filter( 'mce_buttons', 'wppa_filter_mce_gallery_button' );
22
+ add_filter( 'mce_external_plugins', 'wppa_filter_mce_gallery_plugin' );
 
 
 
23
  }
24
+ }
25
+
26
+ function wppa_filter_mce_gallery_button( $buttons ) {
27
 
28
+ array_push( $buttons, ' ', 'wppa_gallery_button' );
29
+ return $buttons;
30
  }
31
 
32
+ function wppa_filter_mce_gallery_plugin( $plugins ) {
33
+
34
+ // this plugin file will work the magic of our button
35
+ if ( is_file( WPPA_PATH . '/js/wppa-tinymce-shortcodes.min.js' ) ) {
36
+ $file = 'js/wppa-tinymce-shortcodes.min.js';
37
+ }
38
+ else {
39
+ $file = 'js/wppa-tinymce-shortcodes.js';
40
+ }
41
+ $plugins['wppagallery'] = plugin_dir_url( __FILE__ ) . $file;
42
+ return $plugins;
43
+ }
44
 
45
+ add_action( 'admin_head', 'wppa_inject_js' );
46
 
47
  function wppa_inject_js() {
48
  global $wppa_api_version;
119
 
120
  // Make the html
121
  $result =
122
+ '<style>
123
+ #TB_ajaxContent {
124
+ box-sizing:border-box; width:100% !important;
125
+ }
126
+ #wppagallery-table select {
127
+ max-width:540px;
128
+ }
129
+ #wppagallery-table option {
130
+ color: #070;
131
+ }
132
+ </style>'.
133
  '<div id="wppagallery-form">'.
134
  '<style type="text/css">'.
135
  '#wppagallery-table tr, #wppagallery-table th, #wppagallery-table td {'.
143
  '<th><label for="wppagallery-top-type">'.__('Type of WPPA display:', 'wp-photo-album-plus').'</label></th>'.
144
  '<td>'.
145
  '<select id="wppagallery-top-type" name="type" onchange="wppaGalleryEvaluate()">'.
146
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a display type', 'wp-photo-album-plus').' --</option>'.
147
+ '<option value="galerytype" >'.__('A gallery with covers and/or thumbnails', 'wp-photo-album-plus').'</option>'.
148
+ '<option value="slidestype" >'.__('A slideshow', 'wp-photo-album-plus').'</option>'.
149
+ '<option value="singletype" >'.__('A single image', 'wp-photo-album-plus').'</option>'.
150
+ '<option value="searchtype" >'.__('A search/selection box', 'wp-photo-album-plus').'</option>'.
151
+ '<option value="misceltype" >'.__('An other box type', 'wp-photo-album-plus').'</option>'.
152
  '</select>'.
153
  '</td>'.
154
  '</tr>'.
158
  '<th><label for="wppagallery-galery-type">'.__('Type of gallery display:', 'wp-photo-album-plus').'</label></th>'.
159
  '<td>'.
160
  '<select id="wppagallery-galery-type" name="type" onchange="wppaGalleryEvaluate()">'.
161
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a gallery type', 'wp-photo-album-plus').' --</option>'.
162
+ '<option value="cover" >'.__('The cover(s) of specific album(s)', 'wp-photo-album-plus').'</option>'.
163
+ '<option value="content" >'.__('The content of specific album(s)', 'wp-photo-album-plus').'</option>'.
164
+ '<option value="covers" >'.__('The covers of the subalbums of specific album(s)', 'wp-photo-album-plus').'</option>'.
165
+ '<option value="thumbs" >'.__('The thumbnails of specific album(s)', 'wp-photo-album-plus').'</option>'.
166
  '</select>'.
167
  '</td>'.
168
  '</tr>'.
172
  '<th><label for="wppagallery-slides-type">'.__('Type of slideshow:', 'wp-photo-album-plus').'</label></th>'.
173
  '<td>'.
174
  '<select id="wppagallery-slides-type" name="type" onchange="wppaGalleryEvaluate()">'.
175
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a slideshow type', 'wp-photo-album-plus').' --</option>'.
176
+ '<option value="slide" >'.__('A fully featured slideshow', 'wp-photo-album-plus').'</option>'.
177
+ '<option value="slideonly" >'.__('A slideshow without supporting boxes', 'wp-photo-album-plus').'</option>'.
178
+ '<option value="slideonlyf" >'.__('A slideshow with a filmstrip only', 'wp-photo-album-plus').'</option>'.
179
+ '<option value="filmonly" >'.__('A filmstrip only', 'wp-photo-album-plus').'</option>'.
180
  '</select>'.
181
  '</td>'.
182
  '</tr>'.
186
  '<th><label for="wppagallery-single-type">'.__('Type of single image:', 'wp-photo-album-plus').'</label></th>'.
187
  '<td>'.
188
  '<select id="wppagallery-single-type" name="type" onchange="wppaGalleryEvaluate()">'.
189
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a single image type', 'wp-photo-album-plus').' --</option>'.
190
+ '<option value="photo" >'.__('A plain single photo', 'wp-photo-album-plus').'</option>'.
191
+ '<option value="mphoto" >'.__('A single photo with caption', 'wp-photo-album-plus').'</option>'.
192
+ '<option value="xphoto" >'.__('A single photo with extended caption', 'wp-photo-album-plus').'</option>'.
193
+ '<option value="slphoto" >'.__('A single photo in the style of a slideshow', 'wp-photo-album-plus').'</option>'.
194
  '</select>'.
195
  '</td>'.
196
  '</tr>'.
200
  '<th><label for="wppagallery-search-type">'.__('Type of search:', 'wp-photo-album-plus').'</label></th>'.
201
  '<td>'.
202
  '<select id="wppagallery-search-type" name="type" onchange="wppaGalleryEvaluate()">'.
203
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a search type', 'wp-photo-album-plus').' --</option>'.
204
+ '<option value="search" >'.__('A search box', 'wp-photo-album-plus').'</option>'.
205
+ '<option value="supersearch" >'.__('A supersearch box', 'wp-photo-album-plus').'</option>'.
206
+ '<option value="tagcloud" >'.__('A tagcloud box', 'wp-photo-album-plus').'</option>'.
207
+ '<option value="multitag" >'.__('A multitag box', 'wp-photo-album-plus').'</option>'.
208
+ '<option value="superview" >'.__('A superview box', 'wp-photo-album-plus').'</option>'.
209
+ '<option value="calendar" >'.__('A calendar box', 'wp-photo-album-plus').'</option>'.
210
  '</select>'.
211
  '</td>'.
212
  '</tr>'.
216
  '<th><label for="wppagallery-miscel-type">'.__('Type miscellaneous:', 'wp-photo-album-plus').'</label></th>'.
217
  '<td>'.
218
  '<select id="wppagallery-miscel-type" name="type" onchange="wppaGalleryEvaluate()">'.
219
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a miscellaneous display', 'wp-photo-album-plus').' --</option>'.
220
  '<option value="generic">'.__('A generic albums display', 'wp-photo-album-plus').'</option>'.
221
  '<option value="upload">'.__('An upload box', 'wp-photo-album-plus').'</option>'.
222
  '<option value="landing">'.__('A landing page shortcode', 'wp-photo-album-plus').'</option>'.
239
  $users = get_option( 'wppa_super_users', array() );
240
  foreach( $users as $user ) {
241
  $result .=
242
+ '<option value="'.$user.'" class="wppagallery-admin" >'.$user.'</option>';
243
  }
244
  $result .=
245
  '</select>'.
251
  '<th><label for="wppagallery-album-type">'.__('Kind of selection:', 'wp-photo-album-plus').'</label></th>'.
252
  '<td>'.
253
  '<select id="wppagallery-album-type" name="type" onchange="wppaGalleryEvaluate()">'.
254
+ '<option value="" selected="selected" disabled="disabled" style="color:#700 !important;" >-- '.__('Please select a type of selection to be used', 'wp-photo-album-plus').' --</option>'.
255
  '<option value="real">'.__('One or more wppa+ albums', 'wp-photo-album-plus').'</option>'.
256
  '<option value="virtual">'.__('A special selection', 'wp-photo-album-plus').'</option>'.
257
  '</select>'.
263
  '<th><label for="wppagallery-album-virt">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
264
  '<td>'.
265
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
266
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
267
  '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
268
  '<option value="#topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
269
  '<option value="#lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
283
  '<th><label for="wppagallery-album-virt-cover">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
284
  '<td>'.
285
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">'.
286
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
287
  '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
288
  '<option value="#owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
289
  '<option value="#cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
308
  if ( $albums ) {
309
 
310
  // Please select
311
+ $result .= '<option id="wppagallery-album-0" value="0" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select one or more albums', 'wp-photo-album-plus').' --</option>';
312
 
313
  // All standard albums
314
  foreach ( $albums as $album ) {
317
  }
318
  }
319
  else {
320
+ $result .= '<option value="0" style="color:#700;" >' . __('There are no albums yet', 'wp-photo-album-plus') . '</option>';
321
  }
322
  $result .= '</select>';
323
  }
355
  if ( $albums ) {
356
 
357
  // Please select
358
+ $result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected="selected" >-- '.__('All albums', 'wp-photo-album-plus').' --</option>';
359
 
360
  // All standard albums
361
  foreach ( $albums as $album ) {
362
  $id = $album['id'];
363
+ $result .= '<option class="wppagallery-album-ropt" value="' . $id . '" >'.stripslashes( __( $album['name'] ) ) . ' (' . $id . ')</option>';
364
  }
365
  }
366
  else {
377
  '<th><label for="wppagallery-owner">'.__('The album owner:', 'wp-photo-album-plus').'</label></th>'.
378
  '<td>'.
379
  '<select id="wppagallery-owner" name="owner" class="wppagallery-owner" onchange="wppaGalleryEvaluate()">'.
380
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a user', 'wp-photo-album-plus').' --</option>'.
381
  '<option value="#me" >-- '.__('The logged in visitor', 'wp-photo-album-plus').' --</option>';
382
  $users = wppa_get_users();
383
  if ( $users ) foreach ( $users as $user ) {
395
  '<tr id="wppagallery-owner-parent-tr" style="display:none;" >'.
396
  '<th><label for="wppagallery-owner-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
397
  '<td>'.
398
+ '<select id="wppagallery-owner-parent" style="color:#070 !important;max-width:400px;" name="parentalbum" multiple="multiple" onchange="wppaGalleryEvaluate()">';
399
  if ( $albums ) {
400
 
401
  // Please select
402
+ $result .= '<option class="wppagallery-album-p" value="" selected="selected" >-- '.__('No parent specification', 'wp-photo-album-plus').' --</option>';
403
 
404
  // Generic
405
+ $result .= '<option class="wppagallery-album-p" value="zero" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
406
 
407
  // All standard albums
408
  foreach ( $albums as $album ) {
421
  '<tr id="wppagallery-album-parent-tr" style="display:none;" >'.
422
  '<th><label for="wppagallery-album-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
423
  '<td>'.
424
+ '<select id="wppagallery-album-parent-parent" style="color:#070 !important;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
425
  if ($albums) {
426
 
427
  // Please select
428
+ $result .= '<option id="wppagallery-album-0" value="0" selected="selected" style="color:#700 !important;" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
429
 
430
  // All standard albums
431
  foreach ( $albums as $album ) {
460
  '<tr id="wppagallery-albumcat-tr" style="display:none;" >'.
461
  '<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
462
  '<td>'.
463
+ '<select id="wppagallery-albumcat" style="color:#700 !important;" onchange="wppaGalleryEvaluate()" multiple="multiple" >'.
464
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >'.__('--- please select category ---', 'wp-photo-album-plus').'</option>';
465
  if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
466
  $result .= '<option class="wppagallery-albumcat" value="'.$cat.'" >'.$cat.'</option>';
467
  }
478
  if ( $photos ) {
479
 
480
  // Please select
481
+ $result .= '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a photo', 'wp-photo-album-plus').' --</option>';
482
  $result .= '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
483
 
484
  // Most recent 100 photos
485
  foreach ( $photos as $photo ) {
486
+
487
  $name = stripslashes(__($photo['name']));
488
  if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
489
+
490
  if ( get_option( 'wppa_file_system' ) == 'flat' ) {
491
+ $val = $photo['id'] . '.' . $photo['ext'];
492
+ }
493
+ else {
494
+ $val = wppa_expand_id( $photo['id'] ) . '.' . $photo['ext'];
495
+ }
496
+
497
+ if ( wppa_has_audio() && is_file( WPPA_UPLOAD_PATH . '/' . wppa_fix_poster_ext( $val, $photo['id'] ) ) ) {
498
+ $value = wppa_fix_poster_ext( $val );
499
  }
500
  else {
501
+ $value = $val;
502
  }
503
+
504
+ $result .= '<option' .
505
+ ' value="' . $value . '"' .
506
+ ' >' .
507
+ $name .
508
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
509
+ '</option>';
510
  }
511
  $result .= '<option value="#last" >-- '.__('The most recently uploaded photo', 'wp-photo-album-plus').' --</option>'.
512
  '<option value="#potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
535
  '<tr id="wppagallery-phototags-tr" style="display:none;" >'.
536
  '<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
537
  '<td>'.
538
+ '<select id="wppagallery-phototags" style="color:#700 !important;;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
539
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
540
  if ( $tags ) foreach ( array_keys($tags) as $tag ) {
541
  $result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
542
  }
567
  '<tr id="wppagallery-rootalbum-tr" style="display:none;" >'.
568
  '<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
569
  '<td>'.
570
+ '<select id="wppagallery-rootalbum" onchange="wppaGalleryEvaluate()" >'.
571
  '<option value="0" selected="selected" >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
572
  if ( $albums ) {
573
 
586
  '<tr id="wppagallery-landing-tr" style="display:none;" >'.
587
  '<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
588
  '<td>'.
589
+ '<select id="wppagallery-landing" onchange="wppaGalleryEvaluate()" >'.
590
  '<option value="0" selected="selected" >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
591
  if ( $pages ) {
592
  foreach( $pages as $page ) {
609
  '<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').'&nbsp;'.
610
  '<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGalleryEvaluate()">';
611
  if ( $tags ) {
612
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select the tags to show', 'wp-photo-album-plus').' --</option>';
613
  foreach( array_keys($tags) as $tag ) {
614
+ $result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'" >'.$tag.'</option>';
615
  }
616
  }
617
  else {
618
+ '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('There are no tags', 'wp-photo-album-plus').' --</option>';
619
  }
620
  $result .= '</select>'.
621
  '</td>'.
629
  if ( $albums ) {
630
 
631
  // Please select
632
+ $result .= '<option value="" selected="selected" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
633
 
634
  // All standard albums
635
  foreach ( $albums as $album ) {
wppa-users.php CHANGED
@@ -41,7 +41,18 @@ static $users;
41
  // Wrapper for get_user_by()
42
  function wppa_get_user_by( $key, $user ) {
43
  // wppa_log( 'Obs', 'wppa_get_user_by called with args ' . $key . ', ' . $user, true );
44
- return get_user_by( $key, $user );
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  // Get user
41
  // Wrapper for get_user_by()
42
  function wppa_get_user_by( $key, $user ) {
43
  // wppa_log( 'Obs', 'wppa_get_user_by called with args ' . $key . ', ' . $user, true );
44
+ static $usercache;
45
+
46
+ // Done this one before?
47
+ if ( isset( $usercache[$key][$user] ) ) {
48
+ // wppa_log( 'Obs', 'wppa_get_user_by cache used for ' . $key . ', ' . $user );
49
+ return $usercache[$key][$user];
50
+ }
51
+
52
+ $result = get_user_by( $key, $user );
53
+ $usercache[$key][$user] = $result;
54
+ // wppa_log( 'Obs', 'wppa_get_user_by new cache entry for ' . $key . ', ' . $user );
55
+ return $result;
56
  }
57
 
58
  // Get user
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.7.07
7
  *
8
  */
9
 
@@ -443,22 +443,30 @@ global $wppa;
443
  wppa_reset_occurrance();
444
  }
445
 
446
- // Valid key?
447
- if ( isset( $wppa[$key] ) ) {
448
 
449
- // Get old value
450
- $oldval = $wppa[$key];
 
 
 
451
 
452
- // New value supplied?
453
- if ( $newval !== 'nil' ) {
454
- $wppa[$key] = $newval;
 
 
 
455
  }
456
  }
457
 
458
- // Invalid key
459
- else {
460
- wppa_log( 'Err', '$wppa[\''.$key.'\'] is not defined in reset_occurrance', true );
461
- return false;
 
 
462
  }
463
 
464
  return $oldval;
@@ -4113,4 +4121,28 @@ function wppa_check_user_upload_role() {
4113
 
4114
  // No matching role
4115
  return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4116
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.7.09
7
  *
8
  */
9
 
443
  wppa_reset_occurrance();
444
  }
445
 
446
+ // Invalid key?
447
+ if ( ! isset( $wppa[$key] ) ) {
448
 
449
+ // If indesx not exists: fatal error
450
+ if ( ! in_array( $key, array_keys( $wppa ) ) ) {
451
+ wppa_log( 'Err', '$wppa[\'' . $key . '\'] is not defined in reset_occurrance', true );
452
+ return false;
453
+ }
454
 
455
+ // Exists but NULL, Not fatal
456
+ else {
457
+ wppa_log( 'Err', '$wppa[\'' . $key . '\'] has value NULL', true );
458
+
459
+ // NULL is illegal, replace it by false, to prevent many equal errormessages
460
+ $wppa[$key] = false;
461
  }
462
  }
463
 
464
+ // Existing key, Get old value
465
+ $oldval = $wppa[$key];
466
+
467
+ // New value supplied?
468
+ if ( $newval !== 'nil' ) {
469
+ $wppa[$key] = $newval;
470
  }
471
 
472
  return $oldval;
4121
 
4122
  // No matching role
4123
  return false;
4124
+ }
4125
+
4126
+ // Like wp_parse_args (args is array only), but it replaces NULL array elements also with the defaults.
4127
+ function wppa_parse_args( $args, $defaults ) {
4128
+
4129
+ // Remove NULL elements from $args
4130
+ $r = (array) $args;
4131
+
4132
+ foreach( array_keys( $r ) as $key ) {
4133
+
4134
+ // This looks funny, but:
4135
+ // a NULL element is regarded as being not set,
4136
+ // but it would not be overwritten by the default value in the merge
4137
+ if ( ! isset( $r[$key] ) ) {
4138
+ unset( $r[$key] );
4139
+ }
4140
+ }
4141
+
4142
+ // Do the merge
4143
+ if ( is_array( $defaults ) ) {
4144
+ $r = array_merge( $defaults, $r );
4145
+ }
4146
+
4147
+ return $r;
4148
  }
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.7.08
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 = '6708'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-7-08-005'; // 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.7.09
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 = '6709'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-7-09'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );